Mock Version: 3.0 Mock Version: 3.0 Mock Version: 3.0 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target riscv64 --nodeps /builddir/build/SPECS/postgresql.spec'], chrootPath='/var/lib/mock/f37-build-side-32-misc-devel-356064-15586/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=864000uid=996gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target riscv64 --nodeps /builddir/build/SPECS/postgresql.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False sh: line 1: /usr/bin/perl: No such file or directory Building target platforms: riscv64 Building for target riscv64 setting SOURCE_DATE_EPOCH=1666224000 Wrote: /builddir/build/SRPMS/postgresql-14.3-9.fc37.src.rpm Child return code was: 0 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target riscv64 --nodeps /builddir/build/SPECS/postgresql.spec'], chrootPath='/var/lib/mock/f37-build-side-32-misc-devel-356064-15586/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=864000uid=996gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target riscv64 --nodeps /builddir/build/SPECS/postgresql.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False Building target platforms: riscv64 Building for target riscv64 setting SOURCE_DATE_EPOCH=1666224000 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.iwBPjl + umask 022 + cd /builddir/build/BUILD ++ dirname /builddir/build/SOURCES/postgresql-14.3.tar.bz2 + cd /builddir/build/SOURCES + sha256sum -c /builddir/build/SOURCES/postgresql-14.3.tar.bz2.sha256 postgresql-14.3.tar.bz2: OK + sha256sum -c /builddir/build/SOURCES/postgresql-13.7.tar.bz2.sha256 postgresql-13.7.tar.bz2: OK + cd /builddir/build/BUILD + rm -rf postgresql-14.3 + /usr/lib/rpm/rpmuncompress -x /builddir/build/SOURCES/postgresql-14.3.tar.bz2 + STATUS=0 + '[' 0 -ne 0 ']' + cd postgresql-14.3 + /usr/lib/rpm/rpmuncompress -x /builddir/build/SOURCES/postgresql-setup-8.7.tar.gz + STATUS=0 + '[' 0 -ne 0 ']' + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + echo 'Patch #1 (rpm-pgsql.patch):' Patch #1 (rpm-pgsql.patch): + /usr/bin/patch --no-backup-if-mismatch -p1 --fuzz=0 patching file src/Makefile.global.in Hunk #1 succeeded at 82 (offset 27 lines). Hunk #2 succeeded at 100 (offset 27 lines). Patch #2 (postgresql-logging.patch): + echo 'Patch #2 (postgresql-logging.patch):' + /usr/bin/patch --no-backup-if-mismatch -p1 --fuzz=0 patching file src/backend/utils/misc/postgresql.conf.sample Hunk #1 succeeded at 436 (offset 1 line). Hunk #2 succeeded at 444 (offset 1 line). Patch #5 (postgresql-var-run-socket.patch): + echo 'Patch #5 (postgresql-var-run-socket.patch):' + /usr/bin/patch --no-backup-if-mismatch -p1 --fuzz=0 patching file src/backend/utils/misc/guc.c Hunk #1 succeeded at 4308 (offset 1112 lines). patching file src/bin/initdb/initdb.c Hunk #1 succeeded at 1075 (offset -159 lines). patching file src/include/pg_config_manual.h Hunk #1 succeeded at 207 (offset 6 lines). + echo 'Patch #12 (postgresql-no-libecpg.patch):' Patch #12 (postgresql-no-libecpg.patch): + /usr/bin/patch --no-backup-if-mismatch -p1 --fuzz=0 patching file src/interfaces/Makefile + echo 'Patch #9 (postgresql-server-pg_config.patch):' Patch #9 (postgresql-server-pg_config.patch): + /usr/bin/patch --no-backup-if-mismatch -p1 --fuzz=0 patching file src/bin/pg_config/Makefile patching file src/bin/pg_config/nls.mk + echo 'Patch #10 (postgresql-datalayout-mismatch-on-s390.patch):' Patch #10 (postgresql-datalayout-mismatch-on-s390.patch): + /usr/bin/patch --no-backup-if-mismatch -p1 --fuzz=0 patching file src/backend/jit/llvm/llvmjit.c + echo 'Patch #14 (postgresql-pgcrypto-openssl3-tests.patch):' Patch #14 (postgresql-pgcrypto-openssl3-tests.patch): + /usr/bin/patch --no-backup-if-mismatch -p1 --fuzz=0 patching file contrib/pgcrypto/expected/pgp-decrypt.out patching file contrib/pgcrypto/expected/pgp-pubkey-decrypt.out patching file contrib/pgcrypto/Makefile patching file contrib/pgcrypto/sql/pgp-decrypt.sql patching file contrib/pgcrypto/sql/pgp-pubkey-decrypt.sql Patch #15 (postgresql-SPI-s-handling-of-errors-during-transaction-comm.patch): + echo 'Patch #15 (postgresql-SPI-s-handling-of-errors-during-transaction-comm.patch):' + /usr/bin/patch --no-backup-if-mismatch -p1 --fuzz=0 patching file doc/src/sgml/spi.sgml patching file src/backend/executor/spi.c patching file src/backend/tcop/postgres.c patching file src/backend/utils/mmgr/portalmem.c Hunk #1 succeeded at 1275 (offset 14 lines). patching file src/include/executor/spi.h patching file src/pl/plperl/expected/plperl_transaction.out patching file src/pl/plperl/plperl.c Hunk #1 succeeded at 3983 (offset -3 lines). Hunk #2 succeeded at 4009 (offset -3 lines). patching file src/pl/plperl/sql/plperl_transaction.sql patching file src/pl/plpgsql/src/pl_exec.c Hunk #1 succeeded at 4890 (offset -26 lines). Hunk #2 succeeded at 4914 (offset -26 lines). patching file src/pl/plpython/expected/plpython_transaction.out patching file src/pl/plpython/plpy_plpymodule.c patching file src/pl/plpython/plpy_spi.c patching file src/pl/plpython/plpy_spi.h patching file src/pl/plpython/sql/plpython_transaction.sql patching file src/pl/tcl/expected/pltcl_transaction.out patching file src/pl/tcl/pltcl.c Hunk #1 succeeded at 2928 (offset -7 lines). Hunk #2 succeeded at 2967 (offset -7 lines). patching file src/pl/tcl/sql/pltcl_transaction.sql Patch #16 (postgresql-pl-perl-test-case.patch): + echo 'Patch #16 (postgresql-pl-perl-test-case.patch):' + /usr/bin/patch --no-backup-if-mismatch -p1 --fuzz=0 patching file src/pl/plperl/expected/plperl.out patching file src/pl/plperl/sql/plperl.sql Patch #17 (postgresql-llvm-15-compat.patch): + echo 'Patch #17 (postgresql-llvm-15-compat.patch):' + /usr/bin/patch --no-backup-if-mismatch -p1 --fuzz=0 patching file configure Hunk #1 succeeded at 7214 (offset -45 lines). patching file configure.ac Hunk #1 succeeded at 593 (offset -7 lines). patching file src/backend/jit/llvm/llvmjit.c Hunk #1 succeeded at 828 (offset 30 lines). Hunk #2 succeeded at 1164 (offset 42 lines). Hunk #3 succeeded at 1286 (offset 42 lines). patching file src/backend/jit/llvm/llvmjit_inline.cpp + cp -p /builddir/build/SOURCES/postgresql-14.3-US.pdf . + find . -type f -name Makefile -exec sed -i -e 's/SO_MAJOR_VERSION=\s\?\([0-9]\+\)/SO_MAJOR_VERSION= private14-\1/' '{}' ';' + tar xfj /builddir/build/SOURCES/postgresql-13.7.tar.bz2 + find . -type f -name Makefile -exec sed -i -e 's/SO_MAJOR_VERSION=\s\?\([0-9]\+\)/SO_MAJOR_VERSION= private14-\1/' '{}' ';' + find . -type f -name .gitignore + xargs rm + RPM_EC=0 ++ jobs -p + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.KT8HeM + umask 022 + cd /builddir/build/BUILD + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib64/gfortran/modules' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib64/gfortran/modules' + export FCFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib64: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd postgresql-14.3 ++ id -u + '[' x996 = x0 ']' + cd postgresql-setup-8.7 + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib64/gfortran/modules' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib64/gfortran/modules' + export FCFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib64: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + '[' '-flto=auto -ffat-lto-objectsx' '!=' x ']' ++ find . -type f -name configure -print + for file in $(find . -type f -name configure -print) + /usr/bin/sed -r --in-place=.backup 's/^char \(\*f\) \(\) = /__attribute__ ((used)) char (*f) () = /g' ./configure + diff -u ./configure.backup ./configure + mv ./configure.backup ./configure + /usr/bin/sed -r --in-place=.backup 's/^char \(\*f\) \(\);/__attribute__ ((used)) char (*f) ();/g' ./configure + diff -u ./configure.backup ./configure + mv ./configure.backup ./configure + /usr/bin/sed -r --in-place=.backup 's/^char \$2 \(\);/__attribute__ ((used)) char \$2 ();/g' ./configure + diff -u ./configure.backup ./configure + mv ./configure.backup ./configure + /usr/bin/sed --in-place=.backup '1{$!N;$!N};$!N;s/int x = 1;\nint y = 0;\nint z;\nint nan;/volatile int x = 1; volatile int y = 0; volatile int z, nan;/;P;D' ./configure + diff -u ./configure.backup ./configure + mv ./configure.backup ./configure + /usr/bin/sed --in-place=.backup 's#^lt_cv_sys_global_symbol_to_cdecl=.*#lt_cv_sys_global_symbol_to_cdecl="sed -n -e '\''s/^T .* \\(.*\\)$/extern int \\1();/p'\'' -e '\''s/^$symcode* .* \\(.*\\)$/extern char \\1;/p'\''"#' ./configure + diff -u ./configure.backup ./configure + mv ./configure.backup ./configure + '[' 1 = 1 ']' +++ dirname ./configure ++ find . -name config.guess -o -name config.sub + '[' 1 = 1 ']' + '[' x '!=' 'x-Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld' ']' ++ find . -name ltmain.sh + ./configure --build=riscv64-koji-linux-gnu --host=riscv64-koji-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info pgdocdir=/usr/share/doc/postgresql PGVERSION=14.3 PGMAJORVERSION=14 NAME_DEFAULT_PREV_SERVICE=postgresql configure: WARNING: unrecognized options: --disable-dependency-tracking checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /usr/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking whether make supports nested variables... (cached) yes checking for sed... /usr/bin/sed checking for rpmmacrosdir... /usr/lib/rpm/macros.d checking for sed... (cached) /usr/bin/sed checking for runuser... /usr/sbin/runuser checking for mountpoint... /usr/bin/mountpoint checking for operating system (distribution) family... redhat checking for rpm... /usr/bin/rpm checking for postgres... no checking for pg_upgrade... no checking whether to install compat %pgtest_* macros... yes checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating tests/Makefile config.status: executing tests/atconfig commands configure: WARNING: unrecognized options: --disable-dependency-tracking configure: Configured the folowing way: PostgreSQL version: 14.3 PGDATADIR: ${localstatedir}/lib/pgsql/data PostgreSQL service: postgresql PostgreSQL package: postgresql PostgreSQL bin_pfx: postgresql Init system: systemd + make -j8 Making all in . make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/postgresql-setup-8.7' GEN bin/postgresql-setup GEN bin/postgresql-upgrade GEN upgrade GEN initdb GEN postgresql-check-db-dir GEN sbin/postgresql-new-systemd-unit GEN share/postgresql-setup/library.sh GEN share/postgresql-setup/postgresql_pkg_tests.sh GEN lib/rpm/macros.d/macros.postgresql GEN postgresql.service GEN lib/rpm/macros.d/macros.postgresql-test GEN README.rpm-dist.sed GEN postgresql@.service GEN doc/postgresql-setup.1 GEN doc/postgresql-new-systemd-unit.1 GEN doc/postgresql-upgrade.1 GEN README.rpm-dist.m4 GEN README.rpm-dist.sgml GEN README.rpm-dist GEN .generated_files make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/postgresql-setup-8.7' Making all in tests make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/postgresql-setup-8.7/tests' make[1]: Nothing to be done for 'all'. make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/postgresql-setup-8.7/tests' + cd .. + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection' ++ xargs -n 1 ++ echo -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection ++ xargs -n 100 ++ grep -v ffast-math + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection' + export CFLAGS + common_configure_options=' --disable-rpath --with-perl --with-tcl --with-tclconfig=/usr/lib64 --with-ldap --with-openssl --with-pam --with-gssapi --with-ossp-uuid --with-libxml --with-libxslt --enable-nls --enable-dtrace --with-selinux --with-system-tzdata=/usr/share/zoneinfo --datadir=/usr/share/pgsql --with-systemd --with-lz4 --with-icu --with-llvm --with-python ' + export PYTHON=/usr/bin/python3 + PYTHON=/usr/bin/python3 + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib64/gfortran/modules' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib64/gfortran/modules' + export FCFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib64: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + '[' '-flto=auto -ffat-lto-objectsx' '!=' x ']' ++ find . -type f -name configure -print + for file in $(find . -type f -name configure -print) + /usr/bin/sed -r --in-place=.backup 's/^char \(\*f\) \(\) = /__attribute__ ((used)) char (*f) () = /g' ./postgresql-13.7/configure + diff -u ./postgresql-13.7/configure.backup ./postgresql-13.7/configure + mv ./postgresql-13.7/configure.backup ./postgresql-13.7/configure + /usr/bin/sed -r --in-place=.backup 's/^char \(\*f\) \(\);/__attribute__ ((used)) char (*f) ();/g' ./postgresql-13.7/configure + diff -u ./postgresql-13.7/configure.backup ./postgresql-13.7/configure + mv ./postgresql-13.7/configure.backup ./postgresql-13.7/configure + /usr/bin/sed -r --in-place=.backup 's/^char \$2 \(\);/__attribute__ ((used)) char \$2 ();/g' ./postgresql-13.7/configure + diff -u ./postgresql-13.7/configure.backup ./postgresql-13.7/configure --- ./postgresql-13.7/configure.backup 2022-05-09 17:16:30.000000000 -0400 +++ ./postgresql-13.7/configure 2023-02-20 18:18:44.218639089 -0500 @@ -2043,7 +2043,7 @@ #ifdef __cplusplus extern "C" #endif -char $2 (); +__attribute__ ((used)) char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ + /usr/bin/sed --in-place=.backup '1{$!N;$!N};$!N;s/int x = 1;\nint y = 0;\nint z;\nint nan;/volatile int x = 1; volatile int y = 0; volatile int z, nan;/;P;D' ./postgresql-13.7/configure + diff -u ./postgresql-13.7/configure.backup ./postgresql-13.7/configure + mv ./postgresql-13.7/configure.backup ./postgresql-13.7/configure + /usr/bin/sed --in-place=.backup 's#^lt_cv_sys_global_symbol_to_cdecl=.*#lt_cv_sys_global_symbol_to_cdecl="sed -n -e '\''s/^T .* \\(.*\\)$/extern int \\1();/p'\'' -e '\''s/^$symcode* .* \\(.*\\)$/extern char \\1;/p'\''"#' ./postgresql-13.7/configure + diff -u ./postgresql-13.7/configure.backup ./postgresql-13.7/configure + mv ./postgresql-13.7/configure.backup ./postgresql-13.7/configure + for file in $(find . -type f -name configure -print) + /usr/bin/sed -r --in-place=.backup 's/^char \(\*f\) \(\) = /__attribute__ ((used)) char (*f) () = /g' ./configure + diff -u ./configure.backup ./configure + mv ./configure.backup ./configure + /usr/bin/sed -r --in-place=.backup 's/^char \(\*f\) \(\);/__attribute__ ((used)) char (*f) ();/g' ./configure + diff -u ./configure.backup ./configure + mv ./configure.backup ./configure + /usr/bin/sed -r --in-place=.backup 's/^char \$2 \(\);/__attribute__ ((used)) char \$2 ();/g' ./configure + diff -u ./configure.backup ./configure --- ./configure.backup 2023-02-20 18:16:12.828629597 -0500 +++ ./configure 2023-02-20 18:18:45.908639195 -0500 @@ -2054,7 +2054,7 @@ #ifdef __cplusplus extern "C" #endif -char $2 (); +__attribute__ ((used)) char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ + /usr/bin/sed --in-place=.backup '1{$!N;$!N};$!N;s/int x = 1;\nint y = 0;\nint z;\nint nan;/volatile int x = 1; volatile int y = 0; volatile int z, nan;/;P;D' ./configure + diff -u ./configure.backup ./configure + mv ./configure.backup ./configure + /usr/bin/sed --in-place=.backup 's#^lt_cv_sys_global_symbol_to_cdecl=.*#lt_cv_sys_global_symbol_to_cdecl="sed -n -e '\''s/^T .* \\(.*\\)$/extern int \\1();/p'\'' -e '\''s/^$symcode* .* \\(.*\\)$/extern char \\1;/p'\''"#' ./configure + diff -u ./configure.backup ./configure + mv ./configure.backup ./configure + for file in $(find . -type f -name configure -print) + /usr/bin/sed -r --in-place=.backup 's/^char \(\*f\) \(\) = /__attribute__ ((used)) char (*f) () = /g' ./postgresql-setup-8.7/configure + diff -u ./postgresql-setup-8.7/configure.backup ./postgresql-setup-8.7/configure + mv ./postgresql-setup-8.7/configure.backup ./postgresql-setup-8.7/configure + /usr/bin/sed -r --in-place=.backup 's/^char \(\*f\) \(\);/__attribute__ ((used)) char (*f) ();/g' ./postgresql-setup-8.7/configure + diff -u ./postgresql-setup-8.7/configure.backup ./postgresql-setup-8.7/configure + mv ./postgresql-setup-8.7/configure.backup ./postgresql-setup-8.7/configure + /usr/bin/sed -r --in-place=.backup 's/^char \$2 \(\);/__attribute__ ((used)) char \$2 ();/g' ./postgresql-setup-8.7/configure + diff -u ./postgresql-setup-8.7/configure.backup ./postgresql-setup-8.7/configure + mv ./postgresql-setup-8.7/configure.backup ./postgresql-setup-8.7/configure + /usr/bin/sed --in-place=.backup '1{$!N;$!N};$!N;s/int x = 1;\nint y = 0;\nint z;\nint nan;/volatile int x = 1; volatile int y = 0; volatile int z, nan;/;P;D' ./postgresql-setup-8.7/configure + diff -u ./postgresql-setup-8.7/configure.backup ./postgresql-setup-8.7/configure + mv ./postgresql-setup-8.7/configure.backup ./postgresql-setup-8.7/configure + /usr/bin/sed --in-place=.backup 's#^lt_cv_sys_global_symbol_to_cdecl=.*#lt_cv_sys_global_symbol_to_cdecl="sed -n -e '\''s/^T .* \\(.*\\)$/extern int \\1();/p'\'' -e '\''s/^$symcode* .* \\(.*\\)$/extern char \\1;/p'\''"#' ./postgresql-setup-8.7/configure + diff -u ./postgresql-setup-8.7/configure.backup ./postgresql-setup-8.7/configure + mv ./postgresql-setup-8.7/configure.backup ./postgresql-setup-8.7/configure + '[' 1 = 1 ']' +++ dirname ./configure ++ find . -name config.guess -o -name config.sub + for i in $(find $(dirname ./configure) -name config.guess -o -name config.sub) ++ basename ./config/config.sub + '[' -f /usr/lib/rpm/redhat/config.sub ']' + /usr/bin/rm -f ./config/config.sub ++ basename ./config/config.sub + /usr/bin/cp -fv /usr/lib/rpm/redhat/config.sub ./config/config.sub '/usr/lib/rpm/redhat/config.sub' -> './config/config.sub' + for i in $(find $(dirname ./configure) -name config.guess -o -name config.sub) ++ basename ./config/config.guess + '[' -f /usr/lib/rpm/redhat/config.guess ']' + /usr/bin/rm -f ./config/config.guess ++ basename ./config/config.guess + /usr/bin/cp -fv /usr/lib/rpm/redhat/config.guess ./config/config.guess '/usr/lib/rpm/redhat/config.guess' -> './config/config.guess' + for i in $(find $(dirname ./configure) -name config.guess -o -name config.sub) ++ basename ./postgresql-13.7/config/config.sub + '[' -f /usr/lib/rpm/redhat/config.sub ']' + /usr/bin/rm -f ./postgresql-13.7/config/config.sub ++ basename ./postgresql-13.7/config/config.sub + /usr/bin/cp -fv /usr/lib/rpm/redhat/config.sub ./postgresql-13.7/config/config.sub '/usr/lib/rpm/redhat/config.sub' -> './postgresql-13.7/config/config.sub' + for i in $(find $(dirname ./configure) -name config.guess -o -name config.sub) ++ basename ./postgresql-13.7/config/config.guess + '[' -f /usr/lib/rpm/redhat/config.guess ']' + /usr/bin/rm -f ./postgresql-13.7/config/config.guess ++ basename ./postgresql-13.7/config/config.guess + /usr/bin/cp -fv /usr/lib/rpm/redhat/config.guess ./postgresql-13.7/config/config.guess '/usr/lib/rpm/redhat/config.guess' -> './postgresql-13.7/config/config.guess' + '[' 1 = 1 ']' + '[' x '!=' 'x-Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld' ']' ++ find . -name ltmain.sh + ./configure --build=riscv64-koji-linux-gnu --host=riscv64-koji-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --disable-rpath --with-perl --with-tcl --with-tclconfig=/usr/lib64 --with-ldap --with-openssl --with-pam --with-gssapi --with-ossp-uuid --with-libxml --with-libxslt --enable-nls --enable-dtrace --with-selinux --with-system-tzdata=/usr/share/zoneinfo --datadir=/usr/share/pgsql --with-systemd --with-lz4 --with-icu --with-llvm --with-python configure: WARNING: unrecognized options: --disable-dependency-tracking checking build system type... riscv64-koji-linux-gnu checking host system type... riscv64-koji-linux-gnu checking which template to use... linux checking whether NLS is wanted... yes checking for default port number... 5432 checking for dtrace... /usr/bin/dtrace checking for block size... 8kB checking for segment size... 1GB checking for WAL block size... 8kB checking for riscv64-koji-linux-gnu-gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for gcc option to accept ISO C99... none needed checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking for gawk... gawk checking for llvm-config... /usr/bin/llvm-config checking for clang... /usr/bin/clang checking whether gcc supports -Wdeclaration-after-statement, for CFLAGS... yes checking whether gcc supports -Werror=vla, for CFLAGS... yes checking whether gcc supports -Werror=unguarded-availability-new, for CFLAGS... no checking whether g++ supports -Werror=unguarded-availability-new, for CXXFLAGS... no checking whether gcc supports -Wendif-labels, for CFLAGS... yes checking whether g++ supports -Wendif-labels, for CXXFLAGS... yes checking whether gcc supports -Wmissing-format-attribute, for CFLAGS... yes checking whether g++ supports -Wmissing-format-attribute, for CXXFLAGS... yes checking whether gcc supports -Wimplicit-fallthrough=3, for CFLAGS... yes checking whether g++ supports -Wimplicit-fallthrough=3, for CXXFLAGS... yes checking whether gcc supports -Wcast-function-type, for CFLAGS... yes checking whether g++ supports -Wcast-function-type, for CXXFLAGS... yes checking whether gcc supports -Wformat-security, for CFLAGS... yes checking whether g++ supports -Wformat-security, for CXXFLAGS... yes checking whether gcc supports -fno-strict-aliasing, for CFLAGS... yes checking whether g++ supports -fno-strict-aliasing, for CXXFLAGS... yes checking whether gcc supports -fwrapv, for CFLAGS... yes checking whether g++ supports -fwrapv, for CXXFLAGS... yes checking whether gcc supports -fexcess-precision=standard, for CFLAGS... yes checking whether g++ supports -fexcess-precision=standard, for CXXFLAGS... no checking whether gcc supports -funroll-loops, for CFLAGS_UNROLL_LOOPS... yes checking whether gcc supports -ftree-vectorize, for CFLAGS_VECTORIZE... yes checking whether gcc supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... no checking whether gcc supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... no checking whether gcc supports -Wformat-truncation, for NOT_THE_CFLAGS... yes checking whether gcc supports -Wstringop-truncation, for NOT_THE_CFLAGS... yes checking whether /usr/bin/clang supports -fno-strict-aliasing, for BITCODE_CFLAGS... yes checking whether /usr/bin/clang -xc++ supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... yes checking whether /usr/bin/clang supports -fwrapv, for BITCODE_CFLAGS... yes checking whether /usr/bin/clang -xc++ supports -fwrapv, for BITCODE_CXXFLAGS... yes checking whether /usr/bin/clang supports -fexcess-precision=standard, for BITCODE_CFLAGS... no checking whether /usr/bin/clang -xc++ supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... no checking whether /usr/bin/clang supports -Xclang -no-opaque-pointers, for BITCODE_CFLAGS... yes checking whether /usr/bin/clang -xc++ supports -Xclang -no-opaque-pointers, for BITCODE_CXXFLAGS... yes checking whether /usr/bin/clang supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... yes checking whether /usr/bin/clang supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... yes checking whether /usr/bin/clang supports -Wformat-truncation, for NOT_THE_CFLAGS... no checking whether /usr/bin/clang supports -Wstringop-truncation, for NOT_THE_CFLAGS... no checking whether the C compiler still works... yes checking how to run the C preprocessor... gcc -E checking for riscv64-koji-linux-gnu-pkg-config... no checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking allow thread-safe client libraries... yes checking whether to build with ICU support... yes checking for icu-uc icu-i18n... yes checking whether to build with Tcl... yes checking whether to build Perl modules... yes checking whether to build Python modules... yes checking whether to build with GSSAPI support... yes checking whether to build with PAM support... yes checking whether to build with BSD Authentication support... no checking whether to build with LDAP support... yes checking whether to build with Bonjour support... no checking whether to build with SELinux support... yes checking whether to build with systemd support... yes checking whether to build with XML support... yes checking for libxml-2.0 >= 2.6.23... yes checking whether to build with LZ4 support... yes checking for liblz4... yes checking for ld used by GCC... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for riscv64-koji-linux-gnu-ranlib... no checking for ranlib... ranlib checking for riscv64-koji-linux-gnu-strip... no checking for strip... strip checking whether it is possible to strip libraries... yes checking for riscv64-koji-linux-gnu-ar... no checking for ar... ar checking for a BSD-compatible install... /usr/bin/install -c checking for tar... /usr/bin/tar checking whether ln -s works... yes checking for a thread-safe mkdir -p... /usr/bin/mkdir -p checking for bison... /usr/bin/bison configure: using bison (GNU Bison) 3.8.2 checking for flex... /usr/bin/flex configure: using flex 2.6.4 checking for perl... /usr/bin/perl configure: using perl 5.36.0 checking for Perl archlibexp... /usr/lib64/perl5 checking for Perl privlibexp... /usr/share/perl5 checking for Perl useshrplib... true checking for CFLAGS recommended by Perl... -D_REENTRANT -D_GNU_SOURCE -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 checking for CFLAGS to compile embedded Perl... checking for flags to link embedded Perl... -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -fstack-protector-strong -L/usr/local/lib -L/usr/lib64/perl5/CORE -lperl -lpthread -lresolv -ldl -lm -lcrypt -lutil -lc checking for PYTHON... /usr/bin/python3 configure: using python 3.11.0 (main, Oct 24 2022, 00:00:00) [GCC 12.2.1 20220819 (Red Hat 12.2.1-2)] checking for Python sysconfig module... yes checking Python configuration directory... /usr/lib64/python3.11/config-3.11-riscv64-linux-gnu checking Python include directory... -I/usr/include/python3.11 checking how to link an embedded Python application... -L/usr/lib64 -lpython3.11 -ldl -lm checking for a sed that does not truncate output... /usr/bin/sed checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking whether gcc is Clang... no checking whether pthreads work with -pthread... yes checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE checking whether more special flags are required for pthreads... no checking for PTHREAD_PRIO_INHERIT... yes checking pthread.h usability... yes checking pthread.h presence... yes checking for pthread.h... yes checking for strerror_r... yes checking for getpwuid_r... yes checking for gethostbyname_r... yes checking whether strerror_r returns int... no checking for main in -lm... yes checking for library containing setproctitle... no checking for library containing dlsym... none required checking for library containing socket... none required checking for library containing shl_load... no checking for library containing getopt_long... none required checking for library containing shm_open... none required checking for library containing shm_unlink... none required checking for library containing clock_gettime... none required checking for library containing fdatasync... none required checking for library containing shmget... none required checking for library containing backtrace_symbols... none required checking for library containing gethostbyname_r... none required checking for library containing pthread_barrier_wait... none required checking for library containing readline... -lreadline checking for inflate in -lz... yes checking for library containing gss_init_sec_context... -lgssapi_krb5 checking for CRYPTO_new_ex_data in -lcrypto... yes checking for SSL_new in -lssl... yes checking for X509_get_signature_nid... yes checking for OPENSSL_init_ssl... yes checking for BIO_get_data... yes checking for BIO_meth_new... yes checking for ASN1_STRING_get0_data... yes checking for HMAC_CTX_new... yes checking for HMAC_CTX_free... yes checking for CRYPTO_lock... no checking for pam_start in -lpam... yes checking for xmlSaveToBuffer in -lxml2... yes checking for xsltCleanupGlobals in -lxslt... yes checking for LZ4_compress_default in -llz4... yes checking for ldap_bind in -lldap... yes checking for ldap_initialize... yes checking for ldap_bind in -lldap_r... no checking for security_compute_create_name in -lselinux... yes checking for uuid_export in -lossp-uuid... yes checking for stdbool.h that conforms to C99... yes checking for _Bool... yes checking atomic.h usability... no checking atomic.h presence... no checking for atomic.h... no checking copyfile.h usability... no checking copyfile.h presence... no checking for copyfile.h... no checking execinfo.h usability... yes checking execinfo.h presence... yes checking for execinfo.h... yes checking getopt.h usability... yes checking getopt.h presence... yes checking for getopt.h... yes checking ifaddrs.h usability... yes checking ifaddrs.h presence... yes checking for ifaddrs.h... yes checking langinfo.h usability... yes checking langinfo.h presence... yes checking for langinfo.h... yes checking mbarrier.h usability... no checking mbarrier.h presence... no checking for mbarrier.h... no checking poll.h usability... yes checking poll.h presence... yes checking for poll.h... yes checking sys/epoll.h usability... yes checking sys/epoll.h presence... yes checking for sys/epoll.h... yes checking sys/event.h usability... no checking sys/event.h presence... no checking for sys/event.h... no checking sys/ipc.h usability... yes checking sys/ipc.h presence... yes checking for sys/ipc.h... yes checking sys/prctl.h usability... yes checking sys/prctl.h presence... yes checking for sys/prctl.h... yes checking sys/procctl.h usability... no checking sys/procctl.h presence... no checking for sys/procctl.h... no checking sys/pstat.h usability... no checking sys/pstat.h presence... no checking for sys/pstat.h... no checking sys/resource.h usability... yes checking sys/resource.h presence... yes checking for sys/resource.h... yes checking sys/select.h usability... yes checking sys/select.h presence... yes checking for sys/select.h... yes checking sys/sem.h usability... yes checking sys/sem.h presence... yes checking for sys/sem.h... yes checking sys/shm.h usability... yes checking sys/shm.h presence... yes checking for sys/shm.h... yes checking sys/signalfd.h usability... yes checking sys/signalfd.h presence... yes checking for sys/signalfd.h... yes checking sys/sockio.h usability... no checking sys/sockio.h presence... no checking for sys/sockio.h... no checking sys/tas.h usability... no checking sys/tas.h presence... no checking for sys/tas.h... no checking sys/uio.h usability... yes checking sys/uio.h presence... yes checking for sys/uio.h... yes checking sys/un.h usability... yes checking sys/un.h presence... yes checking for sys/un.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking ucred.h usability... no checking ucred.h presence... no checking for ucred.h... no checking wctype.h usability... yes checking wctype.h presence... yes checking for wctype.h... yes checking for net/if.h... yes checking for sys/ucred.h... no checking for netinet/tcp.h... yes checking readline/readline.h usability... yes checking readline/readline.h presence... yes checking for readline/readline.h... yes checking readline/history.h usability... yes checking readline/history.h presence... yes checking for readline/history.h... yes checking zlib.h usability... yes checking zlib.h presence... yes checking for zlib.h... yes checking lz4.h usability... yes checking lz4.h presence... yes checking for lz4.h... yes checking gssapi/gssapi.h usability... yes checking gssapi/gssapi.h presence... yes checking for gssapi/gssapi.h... yes checking openssl/ssl.h usability... yes checking openssl/ssl.h presence... yes checking for openssl/ssl.h... yes checking openssl/err.h usability... yes checking openssl/err.h presence... yes checking for openssl/err.h... yes checking security/pam_appl.h usability... yes checking security/pam_appl.h presence... yes checking for security/pam_appl.h... yes checking systemd/sd-daemon.h usability... yes checking systemd/sd-daemon.h presence... yes checking for systemd/sd-daemon.h... yes checking libxml/parser.h usability... yes checking libxml/parser.h presence... yes checking for libxml/parser.h... yes checking libxslt/xslt.h usability... yes checking libxslt/xslt.h presence... yes checking for libxslt/xslt.h... yes checking ldap.h usability... yes checking ldap.h presence... yes checking for ldap.h... yes checking for compatible LDAP implementation... yes checking ossp/uuid.h usability... no checking ossp/uuid.h presence... no checking for ossp/uuid.h... no checking uuid.h usability... yes checking uuid.h presence... yes checking for uuid.h... yes checking whether byte ordering is bigendian... no checking for inline... inline checking for printf format archetype... gnu_printf checking for __func__... yes checking for _Static_assert... yes checking for typeof... typeof checking for __builtin_types_compatible_p... yes checking for __builtin_constant_p... yes checking for __builtin_unreachable... yes checking for computed goto support... yes checking for struct tm.tm_zone... yes checking for union semun... no checking for struct sockaddr_un... yes checking for struct sockaddr_storage... yes checking for struct sockaddr_storage.ss_family... yes checking for struct sockaddr_storage.__ss_family... no checking for struct sockaddr_storage.ss_len... no checking for struct sockaddr_storage.__ss_len... no checking for struct sockaddr.sa_len... no checking for struct addrinfo... yes checking for locale_t... yes checking for C/C++ restrict keyword... __restrict checking for struct cmsgcred... no checking for struct option... yes checking for z_streamp... yes checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... no checking size of off_t... 8 checking size of bool... 1 checking for int timezone... yes checking types of arguments for accept()... int, int, struct sockaddr *, socklen_t * checking whether gettimeofday takes only one argument... no checking for wcstombs_l declaration... no checking for backtrace_symbols... yes checking for clock_gettime... yes checking for copyfile... no checking for fdatasync... yes checking for getifaddrs... yes checking for getpeerucred... no checking for getrlimit... yes checking for kqueue... no checking for mbstowcs_l... no checking for memset_s... no checking for poll... yes checking for posix_fallocate... yes checking for ppoll... yes checking for pstat... no checking for pthread_is_threaded_np... no checking for readlink... yes checking for readv... yes checking for setproctitle... no checking for setproctitle_fast... no checking for setsid... yes checking for shm_open... yes checking for strchrnul... yes checking for strsignal... yes checking for symlink... yes checking for syncfs... yes checking for sync_file_range... yes checking for uselocale... yes checking for wcstombs_l... no checking for writev... yes checking for __builtin_bswap16... yes checking for __builtin_bswap32... yes checking for __builtin_bswap64... yes checking for __builtin_clz... yes checking for __builtin_ctz... yes checking for __builtin_popcount... yes checking for __builtin_frame_address... yes checking for _LARGEFILE_SOURCE value needed for large files... no checking how gcc reports undeclared, standard C functions... error checking for posix_fadvise... yes checking whether posix_fadvise is declared... yes checking whether fdatasync is declared... yes checking whether strlcat is declared... no checking whether strlcpy is declared... no checking whether strnlen is declared... yes checking whether preadv is declared... yes checking whether pwritev is declared... yes checking whether F_FULLFSYNC is declared... no checking whether RTLD_GLOBAL is declared... yes checking whether RTLD_NOW is declared... yes checking for struct sockaddr_in6... yes checking for PS_STRINGS... no checking for dlopen... yes checking for explicit_bzero... yes checking for fls... no checking for getopt... yes checking for getpeereid... no checking for getrusage... yes checking for inet_aton... yes checking for link... yes checking for mkdtemp... yes checking for pread... yes checking for pwrite... yes checking for random... yes checking for srandom... yes checking for strlcat... no checking for strlcpy... no checking for strnlen... yes checking for strtof... yes checking for pthread_barrier_wait... yes checking for setenv... yes checking for unsetenv... yes checking for getaddrinfo... yes checking for getopt_long... yes checking for syslog... yes checking syslog.h usability... yes checking syslog.h presence... yes checking for syslog.h... yes checking for opterr... yes checking for optreset... no checking for strtoll... yes checking for strtoull... yes checking whether strtoll is declared... yes checking whether strtoull is declared... yes checking unicode/ucol.h usability... yes checking unicode/ucol.h presence... yes checking for unicode/ucol.h... yes checking whether LLVMOrcGetSymbolAddressIn is declared... no checking whether LLVMGetHostCPUName is declared... yes checking whether LLVMGetHostCPUFeatures is declared... yes checking whether LLVMCreateGDBRegistrationListener is declared... yes checking whether LLVMCreatePerfJITEventListener is declared... yes checking for rl_completion_append_character... yes checking for rl_completion_suppress_quote... yes checking for rl_filename_quote_characters... yes checking for rl_filename_quoting_function... yes checking for rl_completion_matches... yes checking for rl_filename_completion_function... yes checking for rl_reset_screen_size... yes checking for append_history... yes checking for history_truncate_file... yes checking test program... ok checking whether long int is 64 bits... yes checking for __builtin_mul_overflow... yes checking size of void *... 8 checking size of size_t... 8 checking size of long... 8 checking alignment of short... 2 checking alignment of int... 4 checking alignment of long... 8 checking alignment of double... 8 checking for int8... no checking for uint8... no checking for int64... no checking for uint64... no checking for __int128... yes checking for __int128 alignment bug... ok checking alignment of PG_INT128_TYPE... 16 checking for builtin __sync char locking functions... yes checking for builtin __sync int32 locking functions... yes checking for builtin __sync int32 atomic operations... yes checking for builtin __sync int64 atomic operations... yes checking for builtin __atomic int32 atomic operations... yes checking for builtin __atomic int64 atomic operations... yes checking for __get_cpuid... no checking for __cpuid... no checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... no checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... no checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... no checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... no checking which CRC-32C implementation to use... slicing-by-8 checking for library containing sem_init... none required checking which semaphore API to use... unnamed POSIX checking which random number source to use... OpenSSL checking for library containing bind_textdomain_codeset... none required checking libintl.h usability... yes checking libintl.h presence... yes checking for libintl.h... yes checking for msgfmt... /usr/bin/msgfmt checking for msgfmt flags... -c checking for msgmerge... /usr/bin/msgmerge checking for xgettext... /usr/bin/xgettext checking for tclsh... /usr/bin/tclsh checking for tclConfig.sh... /usr/lib64/tclConfig.sh checking tcl.h usability... yes checking tcl.h presence... yes checking for tcl.h... yes checking for perl.h... yes checking for libperl... yes checking Python.h usability... yes checking Python.h presence... yes checking for Python.h... yes checking for xmllint... /usr/bin/xmllint checking for xsltproc... /usr/bin/xsltproc checking for fop... no checking for dbtoepub... no checking whether gcc supports -Wl,--as-needed... yes configure: using compiler=gcc (GCC) 12.2.1 20221121 (Red Hat 12.2.1-4) configure: using CFLAGS=-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection configure: using CPPFLAGS= -D_GNU_SOURCE -I/usr/include/libxml2 configure: using LDFLAGS=-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed configure: using CXX=g++ configure: using CXXFLAGS=-Wall -Wpointer-arith -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection configure: using CLANG=/usr/bin/clang configure: using BITCODE_CFLAGS= -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 configure: using BITCODE_CXXFLAGS= -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -O2 configure: creating ./config.status config.status: creating GNUmakefile config.status: creating src/Makefile.global config.status: creating src/include/pg_config.h config.status: creating src/include/pg_config_ext.h config.status: creating src/interfaces/ecpg/include/ecpg_config.h config.status: linking src/backend/port/tas/dummy.s to src/backend/port/tas.s config.status: linking src/backend/port/posix_sema.c to src/backend/port/pg_sema.c config.status: linking src/backend/port/sysv_shmem.c to src/backend/port/pg_shmem.c config.status: linking src/include/port/linux.h to src/include/pg_config_os.h config.status: linking src/makefiles/Makefile.linux to src/Makefile.port configure: WARNING: unrecognized options: --disable-dependency-tracking + /usr/bin/make -O -j8 V=1 VERBOSE=1 world /usr/bin/make -C ./src/backend generated-headers /usr/bin/make -C catalog distprep generated-header-symlinks /usr/bin/make -C utils distprep generated-header-symlinks make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend' prereqdir=`cd 'parser/' >/dev/null && pwd` && \ cd '../../src/include/parser/' && rm -f gram.h && \ ln -s "$prereqdir/gram.h" . make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend' make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend' prereqdir=`cd 'storage/lmgr/' >/dev/null && pwd` && \ cd '../../src/include/storage/' && rm -f lwlocknames.h && \ ln -s "$prereqdir/lwlocknames.h" . make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend' make[2]: Nothing to be done for 'distprep'. make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils' prereqdir=`cd './' >/dev/null && pwd` && \ cd '../../../src/include/utils/' && for file in fmgroids.h fmgrprotos.h errcodes.h; do \ rm -f $file && ln -s "$prereqdir/$file" . ; \ done touch ../../../src/include/utils/header-stamp make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils' /usr/bin/dtrace -C -h -s probes.d -o probes.h.tmp sed -e 's/POSTGRESQL_/TRACE_POSTGRESQL_/g' \ -e 's/( *char \*/(const char */g' \ -e 's/, *char \*/, const char */g' probes.h.tmp >probes.h rm probes.h.tmp make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils' cd '../../../src/include/utils/' && rm -f probes.h && \ ln -s "../../../src/backend/utils/probes.h" . make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' '/usr/bin/perl' genbki.pl --include-path=../../../src/include/ \ --set-version=14 ../../../src/include/catalog/pg_proc.h ../../../src/include/catalog/pg_type.h ../../../src/include/catalog/pg_attribute.h ../../../src/include/catalog/pg_class.h ../../../src/include/catalog/pg_attrdef.h ../../../src/include/catalog/pg_constraint.h ../../../src/include/catalog/pg_inherits.h ../../../src/include/catalog/pg_index.h ../../../src/include/catalog/pg_operator.h ../../../src/include/catalog/pg_opfamily.h ../../../src/include/catalog/pg_opclass.h ../../../src/include/catalog/pg_am.h ../../../src/include/catalog/pg_amop.h ../../../src/include/catalog/pg_amproc.h ../../../src/include/catalog/pg_language.h ../../../src/include/catalog/pg_largeobject_metadata.h ../../../src/include/catalog/pg_largeobject.h ../../../src/include/catalog/pg_aggregate.h ../../../src/include/catalog/pg_statistic.h ../../../src/include/catalog/pg_statistic_ext.h ../../../src/include/catalog/pg_statistic_ext_data.h ../../../src/include/catalog/pg_rewrite.h ../../../src/include/catalog/pg_trigger.h ../../../src/include/catalog/pg_event_trigger.h ../../../src/include/catalog/pg_description.h ../../../src/include/catalog/pg_cast.h ../../../src/include/catalog/pg_enum.h ../../../src/include/catalog/pg_namespace.h ../../../src/include/catalog/pg_conversion.h ../../../src/include/catalog/pg_depend.h ../../../src/include/catalog/pg_database.h ../../../src/include/catalog/pg_db_role_setting.h ../../../src/include/catalog/pg_tablespace.h ../../../src/include/catalog/pg_authid.h ../../../src/include/catalog/pg_auth_members.h ../../../src/include/catalog/pg_shdepend.h ../../../src/include/catalog/pg_shdescription.h ../../../src/include/catalog/pg_ts_config.h ../../../src/include/catalog/pg_ts_config_map.h ../../../src/include/catalog/pg_ts_dict.h ../../../src/include/catalog/pg_ts_parser.h ../../../src/include/catalog/pg_ts_template.h ../../../src/include/catalog/pg_extension.h ../../../src/include/catalog/pg_foreign_data_wrapper.h ../../../src/include/catalog/pg_foreign_server.h ../../../src/include/catalog/pg_user_mapping.h ../../../src/include/catalog/pg_foreign_table.h ../../../src/include/catalog/pg_policy.h ../../../src/include/catalog/pg_replication_origin.h ../../../src/include/catalog/pg_default_acl.h ../../../src/include/catalog/pg_init_privs.h ../../../src/include/catalog/pg_seclabel.h ../../../src/include/catalog/pg_shseclabel.h ../../../src/include/catalog/pg_collation.h ../../../src/include/catalog/pg_partitioned_table.h ../../../src/include/catalog/pg_range.h ../../../src/include/catalog/pg_transform.h ../../../src/include/catalog/pg_sequence.h ../../../src/include/catalog/pg_publication.h ../../../src/include/catalog/pg_publication_rel.h ../../../src/include/catalog/pg_subscription.h ../../../src/include/catalog/pg_subscription_rel.h touch bki-stamp make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' prereqdir=`cd './' >/dev/null && pwd` && \ cd '../../../src/include/catalog/' && for file in pg_proc_d.h pg_type_d.h pg_attribute_d.h pg_class_d.h pg_attrdef_d.h pg_constraint_d.h pg_inherits_d.h pg_index_d.h pg_operator_d.h pg_opfamily_d.h pg_opclass_d.h pg_am_d.h pg_amop_d.h pg_amproc_d.h pg_language_d.h pg_largeobject_metadata_d.h pg_largeobject_d.h pg_aggregate_d.h pg_statistic_d.h pg_statistic_ext_d.h pg_statistic_ext_data_d.h pg_rewrite_d.h pg_trigger_d.h pg_event_trigger_d.h pg_description_d.h pg_cast_d.h pg_enum_d.h pg_namespace_d.h pg_conversion_d.h pg_depend_d.h pg_database_d.h pg_db_role_setting_d.h pg_tablespace_d.h pg_authid_d.h pg_auth_members_d.h pg_shdepend_d.h pg_shdescription_d.h pg_ts_config_d.h pg_ts_config_map_d.h pg_ts_dict_d.h pg_ts_parser_d.h pg_ts_template_d.h pg_extension_d.h pg_foreign_data_wrapper_d.h pg_foreign_server_d.h pg_user_mapping_d.h pg_foreign_table_d.h pg_policy_d.h pg_replication_origin_d.h pg_default_acl_d.h pg_init_privs_d.h pg_seclabel_d.h pg_shseclabel_d.h pg_collation_d.h pg_partitioned_table_d.h pg_range_d.h pg_transform_d.h pg_sequence_d.h pg_publication_d.h pg_publication_rel_d.h pg_subscription_d.h pg_subscription_rel_d.h schemapg.h system_fk_info.h; do \ rm -f $file && ln -s "$prereqdir/$file" . ; \ done touch ../../../src/include/catalog/header-stamp make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' /usr/bin/make -C doc all /usr/bin/make -C src all /usr/bin/make -C config all /usr/bin/make -C src all make[1]: Nothing to be done for 'all'. /usr/bin/make -C common all /usr/bin/make -C sgml all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/doc/src/sgml' { \ echo ""; \ echo ""; \ } > version.sgml make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/doc/src/sgml' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o archive.o archive.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o config_info.o config_info.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o base64.o base64.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o checksum_helper.o checksum_helper.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/doc/src/sgml' '/usr/bin/perl' ./mk_feature_tables.pl NO ../../../src/backend/catalog/sql_feature_packages.txt ../../../src/backend/catalog/sql_features.txt > features-unsupported.sgml make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/doc/src/sgml' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o encnames.o encnames.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o controldata_utils.o controldata_utils.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/doc/src/sgml' '/usr/bin/perl' ./mk_feature_tables.pl YES ../../../src/backend/catalog/sql_feature_packages.txt ../../../src/backend/catalog/sql_features.txt > features-supported.sgml make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/doc/src/sgml' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/doc/src/sgml' '/usr/bin/perl' ./generate-errcodes-table.pl ../../../src/backend/utils/errcodes.txt > errcodes-table.sgml make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/doc/src/sgml' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/doc/src/sgml' '/usr/bin/perl' ./generate-keywords-table.pl . > keywords-table.sgml make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/doc/src/sgml' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o file_perm.o file_perm.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o ip.o ip.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -Wno-declaration-after-statement -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o d2s.o d2s.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o file_utils.o file_utils.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o exec.o exec.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o hashfn.o hashfn.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -Wno-declaration-after-statement -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o f2s.o f2s.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o keywords.o keywords.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o link-canary.o link-canary.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o kwlookup.o kwlookup.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o md5_common.o md5_common.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o pg_get_line.o pg_get_line.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o pgfnames.o pgfnames.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o psprintf.o psprintf.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o jsonapi.o jsonapi.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o pg_lzcompress.o pg_lzcompress.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o relpath.o relpath.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o rmtree.o rmtree.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o saslprep.o saslprep.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o string.o string.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o scram-common.o scram-common.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o stringinfo.o stringinfo.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o username.o username.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o wait_error.o wait_error.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o cryptohash_openssl.o cryptohash_openssl.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o protocol_openssl.o protocol_openssl.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o hmac_openssl.o hmac_openssl.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o unicode_norm.o unicode_norm.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o fe_memutils.o fe_memutils.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o restricted_token.o restricted_token.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o sprompt.o sprompt.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c archive.c -o archive_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c base64.c -o base64_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o logging.o logging.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c checksum_helper.c -o checksum_helper_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c config_info.c -o config_info_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c controldata_utils.c -o controldata_utils_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c encnames.c -o encnames_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c exec.c -o exec_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c file_perm.c -o file_perm_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c -o wchar.o wchar.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -Wno-declaration-after-statement -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c d2s.c -o d2s_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -Wno-declaration-after-statement -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c f2s.c -o f2s_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c file_utils.c -o file_utils_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c kwlookup.c -o kwlookup_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c ip.c -o ip_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c keywords.c -o keywords_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c link-canary.c -o link-canary_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c hashfn.c -o hashfn_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c pg_get_line.c -o pg_get_line_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c md5_common.c -o md5_common_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c pgfnames.c -o pgfnames_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c psprintf.c -o psprintf_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c pg_lzcompress.c -o pg_lzcompress_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c relpath.c -o relpath_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c rmtree.c -o rmtree_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c jsonapi.c -o jsonapi_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c saslprep.c -o saslprep_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c string.c -o string_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c scram-common.c -o scram-common_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c stringinfo.c -o stringinfo_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c username.c -o username_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c wait_error.c -o wait_error_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c cryptohash_openssl.c -o cryptohash_openssl_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c protocol_openssl.c -o protocol_openssl_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c unicode_norm.c -o unicode_norm_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c fe_memutils.c -o fe_memutils_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c hmac_openssl.c -o hmac_openssl_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c restricted_token.c -o restricted_token_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c archive.c -o archive_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c sprompt.c -o sprompt_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c base64.c -o base64_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c config_info.c -o config_info_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c checksum_helper.c -o checksum_helper_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c controldata_utils.c -o controldata_utils_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c encnames.c -o encnames_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c wchar.c -o wchar_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c file_perm.c -o file_perm_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c exec.c -o exec_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c file_utils.c -o file_utils_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -Wno-declaration-after-statement -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c d2s.c -o d2s_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -Wno-declaration-after-statement -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c f2s.c -o f2s_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c keywords.c -o keywords_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c kwlookup.c -o kwlookup_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c link-canary.c -o link-canary_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c hashfn.c -o hashfn_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c ip.c -o ip_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c md5_common.c -o md5_common_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c pg_get_line.c -o pg_get_line_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c pgfnames.c -o pgfnames_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c psprintf.c -o psprintf_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c relpath.c -o relpath_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c jsonapi.c -o jsonapi_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c rmtree.c -o rmtree_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c pg_lzcompress.c -o pg_lzcompress_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c saslprep.c -o saslprep_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c scram-common.c -o scram-common_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c string.c -o string_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c username.c -o username_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c stringinfo.c -o stringinfo_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c wait_error.c -o wait_error_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' rm -f libpgcommon.a ar crs libpgcommon.a archive.o base64.o checksum_helper.o config_info.o controldata_utils.o d2s.o encnames.o exec.o f2s.o file_perm.o file_utils.o hashfn.o ip.o jsonapi.o keywords.o kwlookup.o link-canary.o md5_common.o pg_get_line.o pg_lzcompress.o pgfnames.o psprintf.o relpath.o rmtree.o saslprep.o scram-common.o string.o stringinfo.o unicode_norm.o username.o wait_error.o wchar.o protocol_openssl.o cryptohash_openssl.o hmac_openssl.o fe_memutils.o restricted_token.o sprompt.o logging.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c protocol_openssl.c -o protocol_openssl_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' rm -f libpgcommon_shlib.a ar crs libpgcommon_shlib.a archive_shlib.o base64_shlib.o checksum_helper_shlib.o config_info_shlib.o controldata_utils_shlib.o d2s_shlib.o encnames_shlib.o exec_shlib.o f2s_shlib.o file_perm_shlib.o file_utils_shlib.o hashfn_shlib.o ip_shlib.o jsonapi_shlib.o keywords_shlib.o kwlookup_shlib.o link-canary_shlib.o md5_common_shlib.o pg_get_line_shlib.o pg_lzcompress_shlib.o pgfnames_shlib.o psprintf_shlib.o relpath_shlib.o rmtree_shlib.o saslprep_shlib.o scram-common_shlib.o string_shlib.o stringinfo_shlib.o unicode_norm_shlib.o username_shlib.o wait_error_shlib.o wchar_shlib.o protocol_openssl_shlib.o cryptohash_openssl_shlib.o hmac_openssl_shlib.o fe_memutils_shlib.o restricted_token_shlib.o sprompt_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c cryptohash_openssl.c -o cryptohash_openssl_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c hmac_openssl.c -o hmac_openssl_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c unicode_norm.c -o unicode_norm_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE -I/usr/include/libxml2\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm \"" -c wchar.c -o wchar_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' rm -f libpgcommon_srv.a ar crs libpgcommon_srv.a archive_srv.o base64_srv.o checksum_helper_srv.o config_info_srv.o controldata_utils_srv.o d2s_srv.o encnames_srv.o exec_srv.o f2s_srv.o file_perm_srv.o file_utils_srv.o hashfn_srv.o ip_srv.o jsonapi_srv.o keywords_srv.o kwlookup_srv.o link-canary_srv.o md5_common_srv.o pg_get_line_srv.o pg_lzcompress_srv.o pgfnames_srv.o psprintf_srv.o relpath_srv.o rmtree_srv.o saslprep_srv.o scram-common_srv.o string_srv.o stringinfo_srv.o unicode_norm_srv.o username_srv.o wait_error_srv.o wchar_srv.o protocol_openssl_srv.o cryptohash_openssl_srv.o hmac_openssl_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' /usr/bin/make -C port all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o strlcpy.o strlcpy.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o strlcat.o strlcat.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o fls.o fls.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o bsearch_arg.o bsearch_arg.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o getpeereid.o getpeereid.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_crc32c_sb8.o pg_crc32c_sb8.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' echo "#define PGBINDIR \"/usr/bin\"" >pg_config_paths.h echo "#define PGSHAREDIR \"/usr/share/pgsql\"" >>pg_config_paths.h echo "#define SYSCONFDIR \"/etc\"" >>pg_config_paths.h echo "#define INCLUDEDIR \"/usr/include\"" >>pg_config_paths.h echo "#define PKGINCLUDEDIR \"/usr/include/pgsql\"" >>pg_config_paths.h echo "#define INCLUDEDIRSERVER \"/usr/include/pgsql/server\"" >>pg_config_paths.h echo "#define LIBDIR \"/usr/lib64\"" >>pg_config_paths.h echo "#define PKGLIBDIR \"/usr/lib64/pgsql\"" >>pg_config_paths.h echo "#define LOCALEDIR \"/usr/share/locale\"" >>pg_config_paths.h echo "#define DOCDIR \"/usr/share/doc//pgsql\"" >>pg_config_paths.h echo "#define HTMLDIR \"/usr/share/doc//pgsql\"" >>pg_config_paths.h echo "#define MANDIR \"/usr/share/man\"" >>pg_config_paths.h make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o noblock.o noblock.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_bitutils.o pg_bitutils.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o chklocale.o chklocale.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o erand48.o erand48.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o inet_net_ntop.o inet_net_ntop.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pgcheckdir.o pgcheckdir.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pgmkdirp.o pgmkdirp.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pgsleep.o pgsleep.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pgstrsignal.o pgstrsignal.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pgstrcasecmp.o pgstrcasecmp.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_strong_random.o pg_strong_random.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pqsignal.o pqsignal.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o quotes.o quotes.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o qsort.o qsort.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o strerror.o strerror.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o qsort_arg.o qsort_arg.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -pthread -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o thread.o thread.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c fls.c -o fls_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c strlcat.c -o strlcat_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tar.o tar.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c getpeereid.c -o getpeereid_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c strlcpy.c -o strlcpy_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c bsearch_arg.c -o bsearch_arg_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c pg_crc32c_sb8.c -o pg_crc32c_sb8_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c chklocale.c -o chklocale_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c erand48.c -o erand48_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c noblock.c -o noblock_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c inet_net_ntop.c -o inet_net_ntop_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c pg_bitutils.c -o pg_bitutils_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o snprintf.o snprintf.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c pgmkdirp.c -o pgmkdirp_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c pgcheckdir.c -o pgcheckdir_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c pgsleep.c -o pgsleep_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o path.o path.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c pg_strong_random.c -o pg_strong_random_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c pgstrcasecmp.c -o pgstrcasecmp_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c pgstrsignal.c -o pgstrsignal_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c pqsignal.c -o pqsignal_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c quotes.c -o quotes_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c strerror.c -o strerror_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c qsort.c -o qsort_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c qsort_arg.c -o qsort_arg_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c tar.c -o tar_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -pthread -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -fPIC -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c thread.c -o thread_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c fls.c -o fls_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c strlcat.c -o strlcat_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c getpeereid.c -o getpeereid_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c strlcpy.c -o strlcpy_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c bsearch_arg.c -o bsearch_arg_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c pg_crc32c_sb8.c -o pg_crc32c_sb8_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c noblock.c -o noblock_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c chklocale.c -o chklocale_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c erand48.c -o erand48_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c inet_net_ntop.c -o inet_net_ntop_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c snprintf.c -o snprintf_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c pg_bitutils.c -o pg_bitutils_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c pgcheckdir.c -o pgcheckdir_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c pgmkdirp.c -o pgmkdirp_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c pg_strong_random.c -o pg_strong_random_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c pgsleep.c -o pgsleep_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c pgstrsignal.c -o pgstrsignal_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c path.c -o path_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c pgstrcasecmp.c -o pgstrcasecmp_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c pqsignal.c -o pqsignal_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c quotes.c -o quotes_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c qsort.c -o qsort_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c qsort_arg.c -o qsort_arg_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c strerror.c -o strerror_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' rm -f libpgport.a ar crs libpgport.a fls.o getpeereid.o strlcat.o strlcpy.o pg_crc32c_sb8.o bsearch_arg.o chklocale.o erand48.o inet_net_ntop.o noblock.o path.o pg_bitutils.o pg_strong_random.o pgcheckdir.o pgmkdirp.o pgsleep.o pgstrcasecmp.o pgstrsignal.o pqsignal.o qsort.o qsort_arg.o quotes.o snprintf.o strerror.o tar.o thread.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c thread.c -o thread_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c tar.c -o tar_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c path.c -o path_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' rm -f libpgport_shlib.a ar crs libpgport_shlib.a fls_shlib.o getpeereid_shlib.o strlcat_shlib.o strlcpy_shlib.o pg_crc32c_sb8_shlib.o bsearch_arg_shlib.o chklocale_shlib.o erand48_shlib.o inet_net_ntop_shlib.o noblock_shlib.o path_shlib.o pg_bitutils_shlib.o pg_strong_random_shlib.o pgcheckdir_shlib.o pgmkdirp_shlib.o pgsleep_shlib.o pgstrcasecmp_shlib.o pgstrsignal_shlib.o pqsignal_shlib.o qsort_shlib.o qsort_arg_shlib.o quotes_shlib.o snprintf_shlib.o strerror_shlib.o tar_shlib.o thread_shlib.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/port -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c snprintf.c -o snprintf_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' rm -f libpgport_srv.a ar crs libpgport_srv.a fls_srv.o getpeereid_srv.o strlcat_srv.o strlcpy_srv.o pg_crc32c_sb8_srv.o bsearch_arg_srv.o chklocale_srv.o erand48_srv.o inet_net_ntop_srv.o noblock_srv.o path_srv.o pg_bitutils_srv.o pg_strong_random_srv.o pgcheckdir_srv.o pgmkdirp_srv.o pgsleep_srv.o pgstrcasecmp_srv.o pgstrsignal_srv.o pqsignal_srv.o qsort_srv.o qsort_arg_srv.o quotes_srv.o snprintf_srv.o strerror_srv.o tar_srv.o thread_srv.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' /usr/bin/make -C timezone all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/timezone' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 '-DSYSTEMTZDIR="/usr/share/zoneinfo"' -c -o pgtz.o pgtz.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/timezone' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/timezone' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 '-DSYSTEMTZDIR="/usr/share/zoneinfo"' -c -o strftime.o strftime.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/timezone' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/timezone' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 '-DSYSTEMTZDIR="/usr/share/zoneinfo"' -flto=thin -emit-llvm -c -o pgtz.bc pgtz.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/timezone' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/timezone' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 '-DSYSTEMTZDIR="/usr/share/zoneinfo"' -flto=thin -emit-llvm -c -o strftime.bc strftime.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/timezone' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/timezone' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 '-DSYSTEMTZDIR="/usr/share/zoneinfo"' -flto=thin -emit-llvm -c -o localtime.bc localtime.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/timezone' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/timezone' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 '-DSYSTEMTZDIR="/usr/share/zoneinfo"' -c -o localtime.o localtime.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/timezone' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/timezone' ( echo src/timezone/localtime.o src/timezone/pgtz.o src/timezone/strftime.o ) >objfiles.txt make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/timezone' /usr/bin/make -C backend all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend' /usr/bin/msgfmt -c -o po/it.mo po/it.po make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend' /usr/bin/msgfmt -c -o po/ko.mo po/ko.po make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend' /usr/bin/msgfmt -c -o po/de.mo po/de.po make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend' /usr/bin/msgfmt -c -o po/ja.mo po/ja.po make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend' /usr/bin/msgfmt -c -o po/es.mo po/es.po make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend' /usr/bin/make -C ../../src/port all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend' /usr/bin/msgfmt -c -o po/fr.mo po/fr.po make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend' /usr/bin/make -C catalog distprep generated-header-symlinks make[3]: Nothing to be done for 'all'. /usr/bin/make -C ../../src/common all make[3]: Nothing to be done for 'all'. /usr/bin/make -C utils distprep generated-header-symlinks make[3]: Nothing to be done for 'distprep'. make[3]: Nothing to be done for 'generated-header-symlinks'. /usr/bin/make -C access all make[3]: Nothing to be done for 'distprep'. make[3]: Nothing to be done for 'generated-header-symlinks'. /usr/bin/make -C brin all /usr/bin/make -C bootstrap all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend' /usr/bin/msgfmt -c -o po/zh_CN.mo po/zh_CN.po make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend' /usr/bin/make -C common all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend' /usr/bin/msgfmt -c -o po/sv.mo po/sv.po make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend' /usr/bin/make -C gin all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend' /usr/bin/msgfmt -c -o po/ru.mo po/ru.po make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend' /usr/bin/make -C gist all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend' /usr/bin/msgfmt -c -o po/uk.mo po/uk.po make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend' /usr/bin/make -C hash all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o ginarrayproc.o ginarrayproc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o attmap.o attmap.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o bufmask.o bufmask.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o hash.o hash.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o brin.o brin.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o gist.o gist.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o ginbtree.o ginbtree.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o detoast.o detoast.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/bootstrap' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o bootparse.o bootparse.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/bootstrap' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o hash_xlog.o hash_xlog.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o ginbulk.o ginbulk.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o brin_bloom.o brin_bloom.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o brin_inclusion.o brin_inclusion.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o hashfunc.o hashfunc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/bootstrap' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o bootstrap.o bootstrap.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/bootstrap' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o gistbuild.o gistbuild.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o heaptuple.o heaptuple.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o brin_minmax.o brin_minmax.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o hashinsert.o hashinsert.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o indextuple.o indextuple.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o gindatapage.o gindatapage.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o gistbuildbuffers.o gistbuildbuffers.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o printsimple.o printsimple.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/bootstrap' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o bootparse.bc bootparse.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/bootstrap' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o ginentrypage.o ginentrypage.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o hashovfl.o hashovfl.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o gistget.o gistget.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o printtup.o printtup.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o brin_minmax_multi.o brin_minmax_multi.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o relation.o relation.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o ginfast.o ginfast.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/bootstrap' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o bootstrap.bc bootstrap.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/bootstrap' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/bootstrap' ( echo src/backend/bootstrap/bootparse.o src/backend/bootstrap/bootstrap.o ) >objfiles.txt make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/bootstrap' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o hashpage.o hashpage.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o brin_pageops.o brin_pageops.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o gistproc.o gistproc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/doc/src/sgml' /usr/bin/xmllint --path . --noout --valid postgres.sgml /usr/bin/xsltproc --path . --stringparam pg.version '14.3' stylesheet-man.xsl postgres.sgml touch man-stamp make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/doc/src/sgml' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o gininsert.o gininsert.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' /usr/bin/make -C heap all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o brin_revmap.o brin_revmap.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o hashsearch.o hashsearch.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o gistscan.o gistscan.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' /usr/bin/make -C index all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o gistsplit.o gistsplit.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o hashsort.o hashsort.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/index' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o amapi.o amapi.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/index' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o reloptions.o reloptions.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o ginget.o ginget.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o scankey.o scankey.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o brin_tuple.o brin_tuple.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/index' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o amvalidate.o amvalidate.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/index' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o session.o session.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o hashutil.o hashutil.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o ginlogic.o ginlogic.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o brin_validate.o brin_validate.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o syncscan.o syncscan.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o brin_xlog.o brin_xlog.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o ginpostinglist.o ginpostinglist.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/index' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o genam.o genam.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/index' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o gistutil.o gistutil.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o hashvalidate.o hashvalidate.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o toast_compression.o toast_compression.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o ginscan.o ginscan.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o gistvacuum.o gistvacuum.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/index' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o indexam.o indexam.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/index' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o toast_internals.o toast_internals.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o brin.bc brin.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o hash.bc hash.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o gistvalidate.o gistvalidate.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tupconvert.o tupconvert.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/index' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o amapi.bc amapi.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/index' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o ginutil.o ginutil.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o brin_bloom.bc brin_bloom.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o gistxlog.o gistxlog.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o hash_xlog.bc hash_xlog.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tupdesc.o tupdesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/index' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o amvalidate.bc amvalidate.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/index' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o ginvacuum.o ginvacuum.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o brin_inclusion.bc brin_inclusion.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o attmap.bc attmap.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o ginvalidate.o ginvalidate.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/index' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o genam.bc genam.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/index' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o hashfunc.bc hashfunc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o gist.bc gist.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o heapam.o heapam.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o brin_minmax.bc brin_minmax.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o bufmask.bc bufmask.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o ginxlog.o ginxlog.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o hashinsert.bc hashinsert.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/index' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o indexam.bc indexam.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/index' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/index' ( echo src/backend/access/index/amapi.o src/backend/access/index/amvalidate.o src/backend/access/index/genam.o src/backend/access/index/indexam.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/index' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o detoast.bc detoast.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o gistbuild.bc gistbuild.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o ginarrayproc.bc ginarrayproc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o brin_minmax_multi.bc brin_minmax_multi.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o hashovfl.bc hashovfl.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o ginbtree.bc ginbtree.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o heaptuple.bc heaptuple.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' /usr/bin/make -C nbtree all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o gistbuildbuffers.bc gistbuildbuffers.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o heapam_handler.o heapam_handler.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o indextuple.bc indextuple.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o ginbulk.bc ginbulk.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nbtcompare.o nbtcompare.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o brin_pageops.bc brin_pageops.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o hashpage.bc hashpage.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o printsimple.bc printsimple.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o gistget.bc gistget.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o heapam_visibility.o heapam_visibility.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o brin_revmap.bc brin_revmap.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o hashsearch.bc hashsearch.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nbtdedup.o nbtdedup.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o heaptoast.o heaptoast.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o gindatapage.bc gindatapage.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o gistproc.bc gistproc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o printtup.bc printtup.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o brin_tuple.bc brin_tuple.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o hashsort.bc hashsort.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o hio.o hio.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o relation.bc relation.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o gistscan.bc gistscan.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o brin_validate.bc brin_validate.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o ginentrypage.bc ginentrypage.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o hashutil.bc hashutil.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nbtinsert.o nbtinsert.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o brin_xlog.bc brin_xlog.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' ( echo src/backend/access/brin/brin.o src/backend/access/brin/brin_bloom.o src/backend/access/brin/brin_inclusion.o src/backend/access/brin/brin_minmax.o src/backend/access/brin/brin_minmax_multi.o src/backend/access/brin/brin_pageops.o src/backend/access/brin/brin_revmap.o src/backend/access/brin/brin_tuple.o src/backend/access/brin/brin_validate.o src/backend/access/brin/brin_xlog.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/brin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pruneheap.o pruneheap.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o gistsplit.bc gistsplit.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o hashvalidate.bc hashvalidate.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' ( echo src/backend/access/hash/hash.o src/backend/access/hash/hash_xlog.o src/backend/access/hash/hashfunc.o src/backend/access/hash/hashinsert.o src/backend/access/hash/hashovfl.o src/backend/access/hash/hashpage.o src/backend/access/hash/hashsearch.o src/backend/access/hash/hashsort.o src/backend/access/hash/hashutil.o src/backend/access/hash/hashvalidate.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/hash' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o reloptions.bc reloptions.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o ginfast.bc ginfast.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o scankey.bc scankey.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nbtree.o nbtree.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o gistutil.bc gistutil.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o rewriteheap.o rewriteheap.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o gistvacuum.bc gistvacuum.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o session.bc session.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nbtpage.o nbtpage.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' /usr/bin/make -C catalog all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o syncscan.bc syncscan.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o gistvalidate.bc gistvalidate.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o ginget.bc ginget.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o gistxlog.bc gistxlog.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' ( echo src/backend/access/gist/gist.o src/backend/access/gist/gistbuild.o src/backend/access/gist/gistbuildbuffers.o src/backend/access/gist/gistget.o src/backend/access/gist/gistproc.o src/backend/access/gist/gistscan.o src/backend/access/gist/gistsplit.o src/backend/access/gist/gistutil.o src/backend/access/gist/gistvacuum.o src/backend/access/gist/gistvalidate.o src/backend/access/gist/gistxlog.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o toast_compression.bc toast_compression.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o toast_internals.bc toast_internals.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o tupconvert.bc tupconvert.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nbtsearch.o nbtsearch.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o gininsert.bc gininsert.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' /usr/bin/make -C rmgrdesc all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o ginlogic.bc ginlogic.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' /usr/bin/make -C spgist all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o brindesc.o brindesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o ginpostinglist.bc ginpostinglist.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o clogdesc.o clogdesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o vacuumlazy.o vacuumlazy.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o tupdesc.bc tupdesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' ( echo src/backend/access/common/attmap.o src/backend/access/common/bufmask.o src/backend/access/common/detoast.o src/backend/access/common/heaptuple.o src/backend/access/common/indextuple.o src/backend/access/common/printsimple.o src/backend/access/common/printtup.o src/backend/access/common/relation.o src/backend/access/common/reloptions.o src/backend/access/common/scankey.o src/backend/access/common/session.o src/backend/access/common/syncscan.o src/backend/access/common/toast_compression.o src/backend/access/common/toast_internals.o src/backend/access/common/tupconvert.o src/backend/access/common/tupdesc.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/common' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o committsdesc.o committsdesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o dbasedesc.o dbasedesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nbtsort.o nbtsort.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o visibilitymap.o visibilitymap.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o ginscan.bc ginscan.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o genericdesc.o genericdesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o gindesc.o gindesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o ginutil.bc ginutil.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o spginsert.o spginsert.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o gistdesc.o gistdesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nbtsplitloc.o nbtsplitloc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o aclchk.o aclchk.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o hashdesc.o hashdesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o spgdoinsert.o spgdoinsert.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o heapdesc.o heapdesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o ginvalidate.bc ginvalidate.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o ginvacuum.bc ginvacuum.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o logicalmsgdesc.o logicalmsgdesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o catalog.o catalog.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o mxactdesc.o mxactdesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o spgkdtreeproc.o spgkdtreeproc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nbtdesc.o nbtdesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o relmapdesc.o relmapdesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o replorigindesc.o replorigindesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o spgproc.o spgproc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o seqdesc.o seqdesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o ginxlog.bc ginxlog.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' ( echo src/backend/access/gin/ginarrayproc.o src/backend/access/gin/ginbtree.o src/backend/access/gin/ginbulk.o src/backend/access/gin/gindatapage.o src/backend/access/gin/ginentrypage.o src/backend/access/gin/ginfast.o src/backend/access/gin/ginget.o src/backend/access/gin/gininsert.o src/backend/access/gin/ginlogic.o src/backend/access/gin/ginpostinglist.o src/backend/access/gin/ginscan.o src/backend/access/gin/ginutil.o src/backend/access/gin/ginvacuum.o src/backend/access/gin/ginvalidate.o src/backend/access/gin/ginxlog.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/gin' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o spgquadtreeproc.o spgquadtreeproc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o smgrdesc.o smgrdesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o spgdesc.o spgdesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o heapam.bc heapam.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nbtutils.o nbtutils.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o standbydesc.o standbydesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tblspcdesc.o tblspcdesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o dependency.o dependency.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nbtvalidate.o nbtvalidate.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o spgtextproc.o spgtextproc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o spgscan.o spgscan.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o xlogdesc.o xlogdesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o xactdesc.o xactdesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o brindesc.bc brindesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o heapam_handler.bc heapam_handler.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o heap.o heap.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o spgvalidate.o spgvalidate.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nbtxlog.o nbtxlog.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o spgvacuum.o spgvacuum.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o clogdesc.bc clogdesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o committsdesc.bc committsdesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o spgutils.o spgutils.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nbtcompare.bc nbtcompare.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o dbasedesc.bc dbasedesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o heapam_visibility.bc heapam_visibility.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o genericdesc.bc genericdesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o spgxlog.o spgxlog.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o spginsert.bc spginsert.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o gindesc.bc gindesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nbtdedup.bc nbtdedup.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o heaptoast.bc heaptoast.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o gistdesc.bc gistdesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o spgdoinsert.bc spgdoinsert.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o index.o index.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o hashdesc.bc hashdesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o hio.bc hio.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o spgkdtreeproc.bc spgkdtreeproc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o heapdesc.bc heapdesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nbtinsert.bc nbtinsert.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nbtree.bc nbtree.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' /usr/bin/make -C table all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nbtpage.bc nbtpage.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o indexing.o indexing.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o logicalmsgdesc.bc logicalmsgdesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o spgproc.bc spgproc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/table' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o table.o table.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/table' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pruneheap.bc pruneheap.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o objectaccess.o objectaccess.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o spgquadtreeproc.bc spgquadtreeproc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o mxactdesc.bc mxactdesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nbtsearch.bc nbtsearch.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nbtdesc.bc nbtdesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/table' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tableam.o tableam.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/table' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o rewriteheap.bc rewriteheap.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o spgscan.bc spgscan.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o relmapdesc.bc relmapdesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' /usr/bin/make -C tablesample all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/table' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tableamapi.o tableamapi.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/table' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o replorigindesc.bc replorigindesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o vacuumlazy.bc vacuumlazy.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/tablesample' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o bernoulli.o bernoulli.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/tablesample' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/table' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o toast_helper.o toast_helper.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/table' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o namespace.o namespace.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o seqdesc.bc seqdesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nbtsort.bc nbtsort.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o spgtextproc.bc spgtextproc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/tablesample' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o system.o system.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/tablesample' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/table' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o table.bc table.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/table' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o smgrdesc.bc smgrdesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o visibilitymap.bc visibilitymap.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' ( echo src/backend/access/heap/heapam.o src/backend/access/heap/heapam_handler.o src/backend/access/heap/heapam_visibility.o src/backend/access/heap/heaptoast.o src/backend/access/heap/hio.o src/backend/access/heap/pruneheap.o src/backend/access/heap/rewriteheap.o src/backend/access/heap/vacuumlazy.o src/backend/access/heap/visibilitymap.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/heap' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/tablesample' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tablesample.o tablesample.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/tablesample' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nbtsplitloc.bc nbtsplitloc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o spgdesc.bc spgdesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o standbydesc.bc standbydesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/table' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o tableam.bc tableam.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/table' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o spgutils.bc spgutils.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/tablesample' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o bernoulli.bc bernoulli.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/tablesample' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o tblspcdesc.bc tblspcdesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/table' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o tableamapi.bc tableamapi.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/table' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o partition.o partition.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/tablesample' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o system.bc system.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/tablesample' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o spgvacuum.bc spgvacuum.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/tablesample' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o tablesample.bc tablesample.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/tablesample' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/tablesample' ( echo src/backend/access/tablesample/bernoulli.o src/backend/access/tablesample/system.o src/backend/access/tablesample/tablesample.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/tablesample' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/table' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o toast_helper.bc toast_helper.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/table' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nbtutils.bc nbtutils.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/table' ( echo src/backend/access/table/table.o src/backend/access/table/tableam.o src/backend/access/table/tableamapi.o src/backend/access/table/toast_helper.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/table' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o xactdesc.bc xactdesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o xlogdesc.bc xlogdesc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' ( echo src/backend/access/rmgrdesc/brindesc.o src/backend/access/rmgrdesc/clogdesc.o src/backend/access/rmgrdesc/committsdesc.o src/backend/access/rmgrdesc/dbasedesc.o src/backend/access/rmgrdesc/genericdesc.o src/backend/access/rmgrdesc/gindesc.o src/backend/access/rmgrdesc/gistdesc.o src/backend/access/rmgrdesc/hashdesc.o src/backend/access/rmgrdesc/heapdesc.o src/backend/access/rmgrdesc/logicalmsgdesc.o src/backend/access/rmgrdesc/mxactdesc.o src/backend/access/rmgrdesc/nbtdesc.o src/backend/access/rmgrdesc/relmapdesc.o src/backend/access/rmgrdesc/replorigindesc.o src/backend/access/rmgrdesc/seqdesc.o src/backend/access/rmgrdesc/smgrdesc.o src/backend/access/rmgrdesc/spgdesc.o src/backend/access/rmgrdesc/standbydesc.o src/backend/access/rmgrdesc/tblspcdesc.o src/backend/access/rmgrdesc/xactdesc.o src/backend/access/rmgrdesc/xlogdesc.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/rmgrdesc' /usr/bin/make -C transam all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_cast.o pg_cast.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o spgvalidate.bc spgvalidate.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nbtvalidate.bc nbtvalidate.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o spgxlog.bc spgxlog.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' ( echo src/backend/access/spgist/spgdoinsert.o src/backend/access/spgist/spginsert.o src/backend/access/spgist/spgkdtreeproc.o src/backend/access/spgist/spgproc.o src/backend/access/spgist/spgquadtreeproc.o src/backend/access/spgist/spgscan.o src/backend/access/spgist/spgtextproc.o src/backend/access/spgist/spgutils.o src/backend/access/spgist/spgvacuum.o src/backend/access/spgist/spgvalidate.o src/backend/access/spgist/spgxlog.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/spgist' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_aggregate.o pg_aggregate.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o objectaddress.o objectaddress.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o clog.o clog.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_collation.o pg_collation.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' /usr/bin/make -C parser all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o generic_xlog.o generic_xlog.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' /usr/bin/make -C commands all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nbtxlog.bc nbtxlog.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' ( echo src/backend/access/nbtree/nbtcompare.o src/backend/access/nbtree/nbtdedup.o src/backend/access/nbtree/nbtinsert.o src/backend/access/nbtree/nbtpage.o src/backend/access/nbtree/nbtree.o src/backend/access/nbtree/nbtsearch.o src/backend/access/nbtree/nbtsort.o src/backend/access/nbtree/nbtsplitloc.o src/backend/access/nbtree/nbtutils.o src/backend/access/nbtree/nbtvalidate.o src/backend/access/nbtree/nbtxlog.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/nbtree' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_conversion.o pg_conversion.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o commit_ts.o commit_ts.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_constraint.o pg_constraint.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o aggregatecmds.o aggregatecmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o amcmds.o amcmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_db_role_setting.o pg_db_role_setting.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o multixact.o multixact.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o alter.o alter.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o rmgr.o rmgr.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o analyze.o analyze.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' /usr/bin/make -C executor all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_depend.o pg_depend.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o parse_agg.o parse_agg.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o parallel.o parallel.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o execAmi.o execAmi.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_enum.o pg_enum.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_inherits.o pg_inherits.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o execAsync.o execAsync.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_largeobject.o pg_largeobject.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o slru.o slru.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o async.o async.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_namespace.o pg_namespace.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o analyze.o analyze.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o execCurrent.o execCurrent.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o subtrans.o subtrans.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o cluster.o cluster.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_operator.o pg_operator.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o timeline.o timeline.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o transam.o transam.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o collationcmds.o collationcmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o execGrouping.o execGrouping.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_proc.o pg_proc.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o twophase_rmgr.o twophase_rmgr.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o comment.o comment.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_range.o pg_range.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o execExpr.o execExpr.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o constraint.o constraint.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_publication.o pg_publication.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o conversioncmds.o conversioncmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o twophase.o twophase.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o execExprInterp.o execExprInterp.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_subscription.o pg_subscription.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o varsup.o varsup.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o execJunk.o execJunk.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_shdepend.o pg_shdepend.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o copy.o copy.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o execIndexing.o execIndexing.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o storage.o storage.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_type.o pg_type.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o copyfrom.o copyfrom.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o xact.o xact.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o xlogarchive.o xlogarchive.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o toasting.o toasting.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o execMain.o execMain.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o createas.o createas.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o copyfromparse.o copyfromparse.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o copyto.o copyto.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o execParallel.o execParallel.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o catalog.bc catalog.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o xlogfuncs.o xlogfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o xloginsert.o xloginsert.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o aclchk.bc aclchk.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o execPartition.o execPartition.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o dbcommands.o dbcommands.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o execProcnode.o execProcnode.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o dependency.bc dependency.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o define.o define.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o discard.o discard.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o heap.bc heap.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o execReplication.o execReplication.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o execSRF.o execSRF.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o xlog.o xlog.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o dropcmds.o dropcmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o execScan.o execScan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o parse_clause.o parse_clause.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o xlogreader.o xlogreader.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o event_trigger.o event_trigger.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o index.bc index.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' /usr/bin/make -C foreign all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o gram.o gram.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' /usr/bin/make -C lib all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o xlogutils.o xlogutils.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o binaryheap.o binaryheap.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o execTuples.o execTuples.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o indexing.bc indexing.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o parse_coerce.o parse_coerce.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o bipartite_match.o bipartite_match.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/foreign' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o foreign.o foreign.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/foreign' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o bloomfilter.o bloomfilter.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o clog.bc clog.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o parse_collate.o parse_collate.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o execUtils.o execUtils.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/foreign' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o foreign.bc foreign.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/foreign' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/foreign' ( echo src/backend/foreign/foreign.o ) >objfiles.txt make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/foreign' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o dshash.o dshash.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o hyperloglog.o hyperloglog.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o instrument.o instrument.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o commit_ts.bc commit_ts.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o namespace.bc namespace.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o ilist.o ilist.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o parse_cte.o parse_cte.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o explain.o explain.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o parse_enr.o parse_enr.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o objectaccess.bc objectaccess.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o functions.o functions.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o integerset.o integerset.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o generic_xlog.bc generic_xlog.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o knapsack.o knapsack.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o multixact.bc multixact.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pairingheap.o pairingheap.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeAppend.o nodeAppend.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o rbtree.o rbtree.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o binaryheap.bc binaryheap.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o objectaddress.bc objectaddress.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o extension.o extension.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o parse_expr.o parse_expr.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o bipartite_match.bc bipartite_match.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o parallel.bc parallel.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o partition.bc partition.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeAgg.o nodeAgg.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pg_aggregate.bc pg_aggregate.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o bloomfilter.bc bloomfilter.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o parse_func.o parse_func.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o rmgr.bc rmgr.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeBitmapAnd.o nodeBitmapAnd.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o foreigncmds.o foreigncmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o slru.bc slru.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pg_cast.bc pg_cast.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o dshash.bc dshash.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o parse_node.o parse_node.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o parse_oper.o parse_oper.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o subtrans.bc subtrans.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o hyperloglog.bc hyperloglog.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeBitmapHeapscan.o nodeBitmapHeapscan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pg_collation.bc pg_collation.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o parse_param.o parse_param.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o timeline.bc timeline.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o ilist.bc ilist.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeBitmapOr.o nodeBitmapOr.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeBitmapIndexscan.o nodeBitmapIndexscan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o transam.bc transam.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeCtescan.o nodeCtescan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o integerset.bc integerset.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o knapsack.bc knapsack.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o functioncmds.o functioncmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pg_constraint.bc pg_constraint.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeCustom.o nodeCustom.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeForeignscan.o nodeForeignscan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pairingheap.bc pairingheap.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o twophase.bc twophase.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pg_conversion.bc pg_conversion.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o parse_relation.o parse_relation.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o twophase_rmgr.bc twophase_rmgr.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeFunctionscan.o nodeFunctionscan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o rbtree.bc rbtree.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' ( echo src/backend/lib/binaryheap.o src/backend/lib/bipartite_match.o src/backend/lib/bloomfilter.o src/backend/lib/dshash.o src/backend/lib/hyperloglog.o src/backend/lib/ilist.o src/backend/lib/integerset.o src/backend/lib/knapsack.o src/backend/lib/pairingheap.o src/backend/lib/rbtree.o ) >objfiles.txt make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/lib' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pg_db_role_setting.bc pg_db_role_setting.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o varsup.bc varsup.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pg_depend.bc pg_depend.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeGather.o nodeGather.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o parse_target.o parse_target.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pg_enum.bc pg_enum.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o indexcmds.o indexcmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeGatherMerge.o nodeGatherMerge.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o parse_type.o parse_type.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o xlogarchive.bc xlogarchive.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o lockcmds.o lockcmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeGroup.o nodeGroup.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pg_inherits.bc pg_inherits.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o parser.o parser.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o xact.bc xact.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o matview.o matview.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pg_largeobject.bc pg_largeobject.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pg_namespace.bc pg_namespace.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pg_operator.bc pg_operator.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o operatorcmds.o operatorcmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeHash.o nodeHash.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o xlog.bc xlog.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o opclasscmds.o opclasscmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pg_proc.bc pg_proc.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o parse_utilcmd.o parse_utilcmd.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o scan.o scan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o xlogfuncs.bc xlogfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o scansup.o scansup.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeHashjoin.o nodeHashjoin.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pg_publication.bc pg_publication.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o policy.o policy.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o xloginsert.bc xloginsert.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o portalcmds.o portalcmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o xlogreader.bc xlogreader.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pg_range.bc pg_range.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeIncrementalSort.o nodeIncrementalSort.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o proclang.o proclang.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o prepare.o prepare.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o xlogutils.bc xlogutils.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' ( echo src/backend/access/transam/clog.o src/backend/access/transam/commit_ts.o src/backend/access/transam/generic_xlog.o src/backend/access/transam/multixact.o src/backend/access/transam/parallel.o src/backend/access/transam/rmgr.o src/backend/access/transam/slru.o src/backend/access/transam/subtrans.o src/backend/access/transam/timeline.o src/backend/access/transam/transam.o src/backend/access/transam/twophase.o src/backend/access/transam/twophase_rmgr.o src/backend/access/transam/varsup.o src/backend/access/transam/xact.o src/backend/access/transam/xlog.o src/backend/access/transam/xlogarchive.o src/backend/access/transam/xlogfuncs.o src/backend/access/transam/xloginsert.o src/backend/access/transam/xlogreader.o src/backend/access/transam/xlogutils.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access/transam' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access' ( cat brin/objfiles.txt common/objfiles.txt gin/objfiles.txt gist/objfiles.txt hash/objfiles.txt heap/objfiles.txt index/objfiles.txt nbtree/objfiles.txt rmgrdesc/objfiles.txt spgist/objfiles.txt table/objfiles.txt tablesample/objfiles.txt transam/objfiles.txt; echo ) >objfiles.txt make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/access' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o analyze.bc analyze.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeIndexonlyscan.o nodeIndexonlyscan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pg_shdepend.bc pg_shdepend.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeLimit.o nodeLimit.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o publicationcmds.o publicationcmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o schemacmds.o schemacmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pg_subscription.bc pg_subscription.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeIndexscan.o nodeIndexscan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o seclabel.o seclabel.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o statscmds.o statscmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pg_type.bc pg_type.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeLockRows.o nodeLockRows.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o sequence.o sequence.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o storage.bc storage.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeMaterial.o nodeMaterial.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o subscriptioncmds.o subscriptioncmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o toasting.bc toasting.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' ( echo src/backend/catalog/aclchk.o src/backend/catalog/catalog.o src/backend/catalog/dependency.o src/backend/catalog/heap.o src/backend/catalog/index.o src/backend/catalog/indexing.o src/backend/catalog/namespace.o src/backend/catalog/objectaccess.o src/backend/catalog/objectaddress.o src/backend/catalog/partition.o src/backend/catalog/pg_aggregate.o src/backend/catalog/pg_cast.o src/backend/catalog/pg_collation.o src/backend/catalog/pg_constraint.o src/backend/catalog/pg_conversion.o src/backend/catalog/pg_db_role_setting.o src/backend/catalog/pg_depend.o src/backend/catalog/pg_enum.o src/backend/catalog/pg_inherits.o src/backend/catalog/pg_largeobject.o src/backend/catalog/pg_namespace.o src/backend/catalog/pg_operator.o src/backend/catalog/pg_proc.o src/backend/catalog/pg_publication.o src/backend/catalog/pg_range.o src/backend/catalog/pg_shdepend.o src/backend/catalog/pg_subscription.o src/backend/catalog/pg_type.o src/backend/catalog/storage.o src/backend/catalog/toasting.o ) >objfiles.txt make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeMergeAppend.o nodeMergeAppend.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeMemoize.o nodeMemoize.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/make -C libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeMergejoin.o nodeMergejoin.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tablespace.o tablespace.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o gram.bc gram.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeNamedtuplestorescan.o nodeNamedtuplestorescan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tsearchcmds.o tsearchcmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o auth-scram.o auth-scram.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeModifyTable.o nodeModifyTable.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o parse_agg.bc parse_agg.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeNestloop.o nodeNestloop.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o parse_coerce.bc parse_coerce.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o trigger.o trigger.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o parse_clause.bc parse_clause.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeRecursiveunion.o nodeRecursiveunion.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeProjectSet.o nodeProjectSet.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o auth.o auth.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeResult.o nodeResult.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeSamplescan.o nodeSamplescan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/make -C main all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o parse_collate.bc parse_collate.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' /usr/bin/make -C nodes all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeSeqscan.o nodeSeqscan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o parse_cte.bc parse_cte.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o be-fsstubs.o be-fsstubs.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/main' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o main.o main.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/main' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o typecmds.o typecmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeSetOp.o nodeSetOp.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o parse_enr.bc parse_enr.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o be-secure-common.o be-secure-common.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' /usr/bin/make -C optimizer all /usr/bin/make -C geqo all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o bitmapset.o bitmapset.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/main' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o main.bc main.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/main' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/main' ( echo src/backend/main/main.o ) >objfiles.txt make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/main' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeSort.o nodeSort.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o geqo_copy.o geqo_copy.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o be-secure.o be-secure.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o geqo_cx.o geqo_cx.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o crypt.o crypt.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o geqo_erx.o geqo_erx.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o parse_expr.bc parse_expr.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeSubplan.o nodeSubplan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o geqo_eval.o geqo_eval.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeSubqueryscan.o nodeSubqueryscan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o geqo_main.o geqo_main.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o geqo_misc.o geqo_misc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o parse_func.bc parse_func.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeTableFuncscan.o nodeTableFuncscan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o geqo_mutation.o geqo_mutation.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o geqo_ox1.o geqo_ox1.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o equalfuncs.o equalfuncs.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeTidrangescan.o nodeTidrangescan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o geqo_ox2.o geqo_ox2.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tablecmds.o tablecmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o ifaddr.o ifaddr.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' /usr/bin/make -C partitioning all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o parse_node.bc parse_node.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o copyfuncs.o copyfuncs.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o geqo_pmx.o geqo_pmx.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o hba.o hba.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeTidscan.o nodeTidscan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o extensible.o extensible.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o geqo_pool.o geqo_pool.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o parse_oper.bc parse_oper.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeUnique.o nodeUnique.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o geqo_px.o geqo_px.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o geqo_random.o geqo_random.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeValuesscan.o nodeValuesscan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o user.o user.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pqcomm.o pqcomm.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o parse_param.bc parse_param.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o geqo_recombination.o geqo_recombination.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o list.o list.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o geqo_selection.o geqo_selection.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pqformat.o pqformat.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o makefuncs.o makefuncs.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o geqo_copy.bc geqo_copy.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o vacuum.o vacuum.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/partitioning' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o partbounds.o partbounds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/partitioning' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o geqo_cx.bc geqo_cx.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pqmq.o pqmq.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o parse_relation.bc parse_relation.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeWindowAgg.o nodeWindowAgg.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o variable.o variable.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pqsignal.o pqsignal.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/partitioning' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o partdesc.o partdesc.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/partitioning' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeWorktablescan.o nodeWorktablescan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o geqo_erx.bc geqo_erx.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodeFuncs.o nodeFuncs.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o view.o view.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nodes.o nodes.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o parse_target.bc parse_target.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o geqo_eval.bc geqo_eval.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o be-secure-openssl.o be-secure-openssl.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o aggregatecmds.bc aggregatecmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o be-gssapi-common.o be-gssapi-common.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o geqo_main.bc geqo_main.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o parse_type.bc parse_type.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/partitioning' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o partprune.o partprune.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/partitioning' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o geqo_misc.bc geqo_misc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o spi.o spi.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o be-secure-gssapi.o be-secure-gssapi.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o geqo_mutation.bc geqo_mutation.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o alter.bc alter.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tqueue.o tqueue.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o geqo_ox1.bc geqo_ox1.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tstoreReceiver.o tstoreReceiver.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o geqo_ox2.bc geqo_ox2.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o amcmds.bc amcmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o auth-scram.bc auth-scram.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o parse_utilcmd.bc parse_utilcmd.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o geqo_pmx.bc geqo_pmx.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o execAmi.bc execAmi.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/partitioning' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o partbounds.bc partbounds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/partitioning' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o outfuncs.o outfuncs.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o parser.bc parser.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o geqo_pool.bc geqo_pool.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o execAsync.bc execAsync.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o params.o params.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/partitioning' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o partdesc.bc partdesc.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/partitioning' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o geqo_px.bc geqo_px.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o analyze.bc analyze.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o execCurrent.bc execCurrent.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o auth.bc auth.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o geqo_random.bc geqo_random.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o print.o print.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o scan.bc scan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o geqo_recombination.bc geqo_recombination.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o read.o read.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/partitioning' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o partprune.bc partprune.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/partitioning' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/partitioning' ( echo src/backend/partitioning/partbounds.o src/backend/partitioning/partdesc.o src/backend/partitioning/partprune.o ) >objfiles.txt make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/partitioning' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o scansup.bc scansup.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' ( echo src/backend/parser/analyze.o src/backend/parser/gram.o src/backend/parser/parse_agg.o src/backend/parser/parse_clause.o src/backend/parser/parse_coerce.o src/backend/parser/parse_collate.o src/backend/parser/parse_cte.o src/backend/parser/parse_enr.o src/backend/parser/parse_expr.o src/backend/parser/parse_func.o src/backend/parser/parse_node.o src/backend/parser/parse_oper.o src/backend/parser/parse_param.o src/backend/parser/parse_relation.o src/backend/parser/parse_target.o src/backend/parser/parse_type.o src/backend/parser/parse_utilcmd.o src/backend/parser/parser.o src/backend/parser/scan.o src/backend/parser/scansup.o ) >objfiles.txt make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/parser' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o be-fsstubs.bc be-fsstubs.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o geqo_selection.bc geqo_selection.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' ( echo src/backend/optimizer/geqo/geqo_copy.o src/backend/optimizer/geqo/geqo_cx.o src/backend/optimizer/geqo/geqo_erx.o src/backend/optimizer/geqo/geqo_eval.o src/backend/optimizer/geqo/geqo_main.o src/backend/optimizer/geqo/geqo_misc.o src/backend/optimizer/geqo/geqo_mutation.o src/backend/optimizer/geqo/geqo_ox1.o src/backend/optimizer/geqo/geqo_ox2.o src/backend/optimizer/geqo/geqo_pmx.o src/backend/optimizer/geqo/geqo_pool.o src/backend/optimizer/geqo/geqo_px.o src/backend/optimizer/geqo/geqo_random.o src/backend/optimizer/geqo/geqo_recombination.o src/backend/optimizer/geqo/geqo_selection.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/geqo' /usr/bin/make -C path all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o async.bc async.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o execExpr.bc execExpr.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o execGrouping.bc execGrouping.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o be-secure-common.bc be-secure-common.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o cluster.bc cluster.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o execExprInterp.bc execExprInterp.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o clausesel.o clausesel.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o collationcmds.bc collationcmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o be-secure.bc be-secure.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o allpaths.o allpaths.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o execJunk.bc execJunk.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o comment.bc comment.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o execIndexing.bc execIndexing.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o crypt.bc crypt.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o readfuncs.o readfuncs.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o ifaddr.bc ifaddr.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o constraint.bc constraint.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o conversioncmds.bc conversioncmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o execParallel.bc execParallel.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o execMain.bc execMain.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o costsize.o costsize.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o value.o value.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o hba.bc hba.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tidbitmap.o tidbitmap.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o copy.bc copy.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o bitmapset.bc bitmapset.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o equivclass.o equivclass.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/doc/src/sgml' /usr/bin/xmllint --path . --noout --valid postgres.sgml /usr/bin/xsltproc --path . --stringparam pg.version '14.3' stylesheet.xsl postgres.sgml cp ./images/genetic-algorithm.svg ./images/gin.svg ./images/pagelayout.svg html/ cp ./stylesheet.css html/ touch html-stamp make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/doc/src/sgml' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o execPartition.bc execPartition.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pqcomm.bc pqcomm.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o copyfrom.bc copyfrom.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o execProcnode.bc execProcnode.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o joinpath.o joinpath.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o joinrels.o joinrels.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pqformat.bc pqformat.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o indxpath.o indxpath.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o execReplication.bc execReplication.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o copyfuncs.bc copyfuncs.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o copyfromparse.bc copyfromparse.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o execSRF.bc execSRF.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tidpath.o tidpath.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' /usr/bin/make -C plan all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pqmq.bc pqmq.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o equalfuncs.bc equalfuncs.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o execScan.bc execScan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o clausesel.bc clausesel.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pathkeys.o pathkeys.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pqsignal.bc pqsignal.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/plan' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o analyzejoins.o analyzejoins.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/plan' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o copyto.bc copyto.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o allpaths.bc allpaths.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o extensible.bc extensible.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o execUtils.bc execUtils.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o execTuples.bc execTuples.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o functions.bc functions.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o be-secure-openssl.bc be-secure-openssl.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o createas.bc createas.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o list.bc list.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o be-gssapi-common.bc be-gssapi-common.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o instrument.bc instrument.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o costsize.bc costsize.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o equivclass.bc equivclass.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o makefuncs.bc makefuncs.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o indxpath.bc indxpath.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o dbcommands.bc dbcommands.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o be-secure-gssapi.bc be-secure-gssapi.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' ( echo src/backend/libpq/auth-scram.o src/backend/libpq/auth.o src/backend/libpq/be-fsstubs.o src/backend/libpq/be-secure-common.o src/backend/libpq/be-secure.o src/backend/libpq/crypt.o src/backend/libpq/hba.o src/backend/libpq/ifaddr.o src/backend/libpq/pqcomm.o src/backend/libpq/pqformat.o src/backend/libpq/pqmq.o src/backend/libpq/pqsignal.o src/backend/libpq/be-secure-openssl.o src/backend/libpq/be-gssapi-common.o src/backend/libpq/be-secure-gssapi.o ) >objfiles.txt make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeAppend.bc nodeAppend.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o define.bc define.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o joinpath.bc joinpath.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeAgg.bc nodeAgg.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o tidpath.bc tidpath.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeFuncs.bc nodeFuncs.c nodeFuncs.c:1943:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(((WithCheckOption *) node)->qual, context); ^ nodeFuncs.c:1961:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker((Node *) expr->aggfilter, context)) ^ nodeFuncs.c:1982:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker((Node *) expr->aggfilter, context)) ^ nodeFuncs.c:1998:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(sbsref->refexpr, context)) ^ nodeFuncs.c:2001:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(sbsref->refassgnexpr, context)) ^ nodeFuncs.c:2015:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(((NamedArgExpr *) node)->arg, context); ^ nodeFuncs.c:2049:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(sublink->testexpr, context)) ^ nodeFuncs.c:2056:18: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(sublink->subselect, context); ^ nodeFuncs.c:2064:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(subplan->testexpr, context)) ^ nodeFuncs.c:2073:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(((AlternativeSubPlan *) node)->subplans, context); ^ nodeFuncs.c:2075:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(((FieldSelect *) node)->arg, context); ^ nodeFuncs.c:2080:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(fstore->arg, context)) ^ nodeFuncs.c:2082:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(fstore->newvals, context)) ^ nodeFuncs.c:2087:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(((RelabelType *) node)->arg, context); ^ nodeFuncs.c:2089:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(((CoerceViaIO *) node)->arg, context); ^ nodeFuncs.c:2094:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(acoerce->arg, context)) ^ nodeFuncs.c:2096:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(acoerce->elemexpr, context)) ^ nodeFuncs.c:2101:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(((ConvertRowtypeExpr *) node)->arg, context); ^ nodeFuncs.c:2103:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(((CollateExpr *) node)->arg, context); ^ nodeFuncs.c:2108:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(caseexpr->arg, context)) ^ nodeFuncs.c:2115:16: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(when->expr, context)) ^ nodeFuncs.c:2117:16: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(when->result, context)) ^ nodeFuncs.c:2120:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(caseexpr->defresult, context)) ^ nodeFuncs.c:2125:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(((ArrayExpr *) node)->elements, context); ^ nodeFuncs.c:2128:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(((RowExpr *) node)->args, context); ^ nodeFuncs.c:2133:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(rcexpr->largs, context)) ^ nodeFuncs.c:2135:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(rcexpr->rargs, context)) ^ nodeFuncs.c:2140:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(((CoalesceExpr *) node)->args, context); ^ nodeFuncs.c:2142:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(((MinMaxExpr *) node)->args, context); ^ nodeFuncs.c:2147:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(xexpr->named_args, context)) ^ nodeFuncs.c:2150:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(xexpr->args, context)) ^ nodeFuncs.c:2155:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(((NullTest *) node)->arg, context); ^ nodeFuncs.c:2157:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(((BooleanTest *) node)->arg, context); ^ nodeFuncs.c:2159:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(((CoerceToDomain *) node)->arg, context); ^ nodeFuncs.c:2161:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(((TargetEntry *) node)->expr, context); ^ nodeFuncs.c:2169:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(wc->partitionClause, context)) ^ nodeFuncs.c:2171:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(wc->orderClause, context)) ^ nodeFuncs.c:2173:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(wc->startOffset, context)) ^ nodeFuncs.c:2175:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(wc->endOffset, context)) ^ nodeFuncs.c:2183:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(cc->cycle_mark_value, context)) ^ nodeFuncs.c:2185:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(cc->cycle_mark_default, context)) ^ nodeFuncs.c:2197:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(cte->ctequery, context)) ^ nodeFuncs.c:2200:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(cte->search_clause, context)) ^ nodeFuncs.c:2202:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(cte->cycle_clause, context)) ^ nodeFuncs.c:2209:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker((Node *) lfirst(temp), context)) ^ nodeFuncs.c:2217:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(from->fromlist, context)) ^ nodeFuncs.c:2219:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(from->quals, context)) ^ nodeFuncs.c:2227:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker((Node *) onconflict->arbiterElems, context)) ^ nodeFuncs.c:2229:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(onconflict->arbiterWhere, context)) ^ nodeFuncs.c:2231:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(onconflict->onConflictSet, context)) ^ nodeFuncs.c:2233:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(onconflict->onConflictWhere, context)) ^ nodeFuncs.c:2235:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(onconflict->exclRelTlist, context)) ^ nodeFuncs.c:2243:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker((Node *) opstep->exprs, context)) ^ nodeFuncs.c:2254:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(join->larg, context)) ^ nodeFuncs.c:2256:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(join->rarg, context)) ^ nodeFuncs.c:2258:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(join->quals, context)) ^ nodeFuncs.c:2270:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(setop->larg, context)) ^ nodeFuncs.c:2272:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(setop->rarg, context)) ^ nodeFuncs.c:2282:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(iclause->rinfo, context)) ^ nodeFuncs.c:2290:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(((PlaceHolderVar *) node)->phexpr, context); ^ nodeFuncs.c:2292:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(((InferenceElem *) node)->expr, context); ^ nodeFuncs.c:2303:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(((PlaceHolderInfo *) node)->ph_var, context); ^ nodeFuncs.c:2305:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(((RangeTblFunction *) node)->funcexpr, context); ^ nodeFuncs.c:2313:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker((Node *) tsc->repeatable, context)) ^ nodeFuncs.c:2321:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(tf->ns_uris, context)) ^ nodeFuncs.c:2323:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(tf->docexpr, context)) ^ nodeFuncs.c:2325:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(tf->rowexpr, context)) ^ nodeFuncs.c:2327:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(tf->colexprs, context)) ^ nodeFuncs.c:2329:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(tf->coldefexprs, context)) ^ nodeFuncs.c:2371:12: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker((Node *) query->targetList, context)) ^ nodeFuncs.c:2373:12: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker((Node *) query->withCheckOptions, context)) ^ nodeFuncs.c:2375:12: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker((Node *) query->onConflict, context)) ^ nodeFuncs.c:2377:12: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker((Node *) query->returningList, context)) ^ nodeFuncs.c:2379:12: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker((Node *) query->jointree, context)) ^ nodeFuncs.c:2381:12: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(query->setOperations, context)) ^ nodeFuncs.c:2383:12: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(query->havingQual, context)) ^ nodeFuncs.c:2385:12: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(query->limitOffset, context)) ^ nodeFuncs.c:2387:12: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(query->limitCount, context)) ^ nodeFuncs.c:2397:13: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker((Node *) query->groupClause, context)) ^ nodeFuncs.c:2399:13: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker((Node *) query->windowClause, context)) ^ nodeFuncs.c:2401:13: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker((Node *) query->sortClause, context)) ^ nodeFuncs.c:2403:13: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker((Node *) query->distinctClause, context)) ^ nodeFuncs.c:2418:14: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(wc->startOffset, context)) ^ nodeFuncs.c:2420:14: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(wc->endOffset, context)) ^ nodeFuncs.c:2439:13: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker((Node *) query->cteList, context)) ^ nodeFuncs.c:2488:13: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(rte, context)) ^ nodeFuncs.c:2494:14: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(rte->tablesample, context)) ^ nodeFuncs.c:2499:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(rte->subquery, context)) ^ nodeFuncs.c:2504:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(rte->joinaliasvars, context)) ^ nodeFuncs.c:2508:14: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(rte->functions, context)) ^ nodeFuncs.c:2512:14: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(rte->tablefunc, context)) ^ nodeFuncs.c:2516:14: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(rte->values_lists, context)) ^ nodeFuncs.c:2526:12: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(rte->securityQuals, context)) ^ nodeFuncs.c:2530:13: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(rte, context)) ^ nodeFuncs.c:2670:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->qual, wco->qual, Node *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2681:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->aggdirectargs, aggref->aggdirectargs, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2682:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->args, aggref->args, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2683:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->aggorder, aggref->aggorder, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2684:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->aggdistinct, aggref->aggdistinct, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2685:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->aggfilter, aggref->aggfilter, Expr *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2695:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->args, grouping->args, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2718:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->args, wfunc->args, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2719:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->aggfilter, wfunc->aggfilter, Expr *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2729:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->refupperindexpr, sbsref->refupperindexpr, ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2731:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->reflowerindexpr, sbsref->reflowerindexpr, ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2733:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->refexpr, sbsref->refexpr, ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2735:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->refassgnexpr, sbsref->refassgnexpr, ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2747:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->args, expr->args, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2757:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->arg, nexpr->arg, Expr *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2767:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->args, expr->args, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2777:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->args, expr->args, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2787:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->args, expr->args, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2797:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->args, expr->args, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2807:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->args, expr->args, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2817:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->testexpr, sublink->testexpr, Node *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2823:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->subselect, sublink->subselect, Node *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2834:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->testexpr, subplan->testexpr, Node *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2836:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->args, subplan->args, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2847:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->subplans, asplan->subplans, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2857:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->arg, fselect->arg, Expr *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2867:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->arg, fstore->arg, Expr *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2868:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->newvals, fstore->newvals, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2879:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->arg, relabel->arg, Expr *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2889:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->arg, iocoerce->arg, Expr *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2899:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->arg, acoerce->arg, Expr *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2900:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->elemexpr, acoerce->elemexpr, Expr *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2910:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->arg, convexpr->arg, Expr *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2920:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->arg, collate->arg, Expr *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2930:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->arg, caseexpr->arg, Expr *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2931:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->args, caseexpr->args, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2932:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->defresult, caseexpr->defresult, Expr *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2942:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->expr, casewhen->expr, Expr *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2943:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->result, casewhen->result, Expr *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2953:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->elements, arrayexpr->elements, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2963:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->args, rowexpr->args, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2974:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->largs, rcexpr->largs, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2975:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->rargs, rcexpr->rargs, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2985:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->args, coalesceexpr->args, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:2995:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->args, minmaxexpr->args, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3005:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->named_args, xexpr->named_args, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3007:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->args, xexpr->args, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3017:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->arg, ntest->arg, Expr *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3027:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->arg, btest->arg, Expr *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3037:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->arg, ctest->arg, Expr *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3047:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->expr, targetentry->expr, Expr *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3060:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->partitionClause, wc->partitionClause, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3061:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->orderClause, wc->orderClause, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3062:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->startOffset, wc->startOffset, Node *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3063:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->endOffset, wc->endOffset, Node *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3073:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->cycle_mark_value, cc->cycle_mark_value, Node *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3074:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->cycle_mark_default, cc->cycle_mark_default, Node *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3089:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->ctequery, cte->ctequery, Node *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3091:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->search_clause, cte->search_clause, CTESearchClause *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3092:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->cycle_clause, cte->cycle_clause, CTECycleClause *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3111:19: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] mutator((Node *) lfirst(temp), ^ nodeFuncs.c:3123:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->fromlist, from->fromlist, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3124:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->quals, from->quals, Node *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3134:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->arbiterElems, oc->arbiterElems, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3135:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->arbiterWhere, oc->arbiterWhere, Node *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3136:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->onConflictSet, oc->onConflictSet, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3137:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->onConflictWhere, oc->onConflictWhere, Node *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3138:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->exclRelTlist, oc->exclRelTlist, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3149:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->exprs, opstep->exprs, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3163:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->larg, join->larg, Node *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3164:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->rarg, join->rarg, Node *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3165:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->quals, join->quals, Node *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3176:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->larg, setop->larg, Node *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3177:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->rarg, setop->rarg, Node *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3188:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->rinfo, iclause->rinfo, RestrictInfo *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3189:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->indexquals, iclause->indexquals, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3199:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->phexpr, phv->phexpr, Expr *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3210:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->expr, newnode->expr, Node *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3220:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->translated_vars, appinfo->translated_vars, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3231:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->ph_var, phinfo->ph_var, PlaceHolderVar *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3242:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->funcexpr, rtfunc->funcexpr, Node *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3253:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->args, tsc->args, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3254:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->repeatable, tsc->repeatable, Expr *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3264:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->ns_uris, tf->ns_uris, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3265:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->docexpr, tf->docexpr, Node *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3266:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->rowexpr, tf->rowexpr, Node *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3267:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->colexprs, tf->colexprs, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3268:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->coldefexprs, tf->coldefexprs, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3317:2: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(query->targetList, query->targetList, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3318:2: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(query->withCheckOptions, query->withCheckOptions, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3319:2: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(query->onConflict, query->onConflict, OnConflictExpr *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3320:2: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(query->returningList, query->returningList, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3321:2: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(query->jointree, query->jointree, FromExpr *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3322:2: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(query->setOperations, query->setOperations, Node *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3323:2: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(query->havingQual, query->havingQual, Node *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3324:2: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(query->limitOffset, query->limitOffset, Node *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3325:2: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(query->limitCount, query->limitCount, Node *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3335:3: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(query->groupClause, query->groupClause, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3336:3: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(query->windowClause, query->windowClause, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3337:3: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(query->sortClause, query->sortClause, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3338:3: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(query->distinctClause, query->distinctClause, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3356:4: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->startOffset, wc->startOffset, Node *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3357:4: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newnode->endOffset, wc->endOffset, Node *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3377:3: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(query->cteList, query->cteList, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3408:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newrte->tablesample, rte->tablesample, ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3416:6: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newrte->subquery, newrte->subquery, Query *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3426:6: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newrte->joinaliasvars, rte->joinaliasvars, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3434:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newrte->functions, rte->functions, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3437:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newrte->tablefunc, rte->tablefunc, TableFunc *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3440:5: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newrte->values_lists, rte->values_lists, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3448:3: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] MUTATE(newrte->securityQuals, rte->securityQuals, List *); ^ nodeFuncs.c:2619:37: note: expanded from macro 'MUTATE' ( (newfield) = (fieldtype) mutator((Node *) (oldfield), context) ) ^ nodeFuncs.c:3474:16: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(node, context); ^ nodeFuncs.c:3497:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return mutator(node, context); ^ nodeFuncs.c:3552:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(((RangeVar *) node)->alias, context); ^ nodeFuncs.c:3554:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(((GroupingFunc *) node)->args, context); ^ nodeFuncs.c:3559:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(sublink->testexpr, context)) ^ nodeFuncs.c:3562:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(sublink->subselect, context)) ^ nodeFuncs.c:3570:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(caseexpr->arg, context)) ^ nodeFuncs.c:3577:16: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(when->expr, context)) ^ nodeFuncs.c:3579:16: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(when->result, context)) ^ nodeFuncs.c:3582:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(caseexpr->defresult, context)) ^ nodeFuncs.c:3588:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(((RowExpr *) node)->args, context); ^ nodeFuncs.c:3590:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(((CoalesceExpr *) node)->args, context); ^ nodeFuncs.c:3592:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(((MinMaxExpr *) node)->args, context); ^ nodeFuncs.c:3597:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(xexpr->named_args, context)) ^ nodeFuncs.c:3600:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(xexpr->args, context)) ^ nodeFuncs.c:3605:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(((NullTest *) node)->arg, context); ^ nodeFuncs.c:3607:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(((BooleanTest *) node)->arg, context); ^ nodeFuncs.c:3612:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(join->larg, context)) ^ nodeFuncs.c:3614:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(join->rarg, context)) ^ nodeFuncs.c:3616:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(join->quals, context)) ^ nodeFuncs.c:3618:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(join->alias, context)) ^ nodeFuncs.c:3627:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(into->rel, context)) ^ nodeFuncs.c:3631:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(into->viewQuery, context)) ^ nodeFuncs.c:3638:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker((Node *) lfirst(temp), context)) ^ nodeFuncs.c:3646:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->relation, context)) ^ nodeFuncs.c:3648:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->cols, context)) ^ nodeFuncs.c:3650:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->selectStmt, context)) ^ nodeFuncs.c:3652:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->onConflictClause, context)) ^ nodeFuncs.c:3654:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->returningList, context)) ^ nodeFuncs.c:3656:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->withClause, context)) ^ nodeFuncs.c:3664:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->relation, context)) ^ nodeFuncs.c:3666:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->usingClause, context)) ^ nodeFuncs.c:3668:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->whereClause, context)) ^ nodeFuncs.c:3670:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->returningList, context)) ^ nodeFuncs.c:3672:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->withClause, context)) ^ nodeFuncs.c:3680:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->relation, context)) ^ nodeFuncs.c:3682:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->targetList, context)) ^ nodeFuncs.c:3684:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->whereClause, context)) ^ nodeFuncs.c:3686:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->fromClause, context)) ^ nodeFuncs.c:3688:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->returningList, context)) ^ nodeFuncs.c:3690:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->withClause, context)) ^ nodeFuncs.c:3698:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->distinctClause, context)) ^ nodeFuncs.c:3700:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->intoClause, context)) ^ nodeFuncs.c:3702:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->targetList, context)) ^ nodeFuncs.c:3704:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->fromClause, context)) ^ nodeFuncs.c:3706:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->whereClause, context)) ^ nodeFuncs.c:3708:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->groupClause, context)) ^ nodeFuncs.c:3710:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->havingClause, context)) ^ nodeFuncs.c:3712:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->windowClause, context)) ^ nodeFuncs.c:3714:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->valuesLists, context)) ^ nodeFuncs.c:3716:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->sortClause, context)) ^ nodeFuncs.c:3718:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->limitOffset, context)) ^ nodeFuncs.c:3720:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->limitCount, context)) ^ nodeFuncs.c:3722:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->lockingClause, context)) ^ nodeFuncs.c:3724:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->withClause, context)) ^ nodeFuncs.c:3726:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->larg, context)) ^ nodeFuncs.c:3728:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->rarg, context)) ^ nodeFuncs.c:3736:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->indirection, context)) ^ nodeFuncs.c:3738:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->val, context)) ^ nodeFuncs.c:3746:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(expr->lexpr, context)) ^ nodeFuncs.c:3748:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(expr->rexpr, context)) ^ nodeFuncs.c:3757:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(expr->args, context)) ^ nodeFuncs.c:3768:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(fcall->args, context)) ^ nodeFuncs.c:3770:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(fcall->agg_order, context)) ^ nodeFuncs.c:3772:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(fcall->agg_filter, context)) ^ nodeFuncs.c:3774:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(fcall->over, context)) ^ nodeFuncs.c:3780:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(((NamedArgExpr *) node)->arg, context); ^ nodeFuncs.c:3785:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(indices->lidx, context)) ^ nodeFuncs.c:3787:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(indices->uidx, context)) ^ nodeFuncs.c:3795:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(indir->arg, context)) ^ nodeFuncs.c:3797:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(indir->indirection, context)) ^ nodeFuncs.c:3802:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(((A_ArrayExpr *) node)->elements, context); ^ nodeFuncs.c:3807:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(rt->indirection, context)) ^ nodeFuncs.c:3809:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(rt->val, context)) ^ nodeFuncs.c:3814:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(((MultiAssignRef *) node)->source, context); ^ nodeFuncs.c:3819:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(tc->arg, context)) ^ nodeFuncs.c:3821:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(tc->typeName, context)) ^ nodeFuncs.c:3826:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(((CollateClause *) node)->arg, context); ^ nodeFuncs.c:3828:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(((SortBy *) node)->node, context); ^ nodeFuncs.c:3833:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(wd->partitionClause, context)) ^ nodeFuncs.c:3835:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(wd->orderClause, context)) ^ nodeFuncs.c:3837:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(wd->startOffset, context)) ^ nodeFuncs.c:3839:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(wd->endOffset, context)) ^ nodeFuncs.c:3847:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(rs->subquery, context)) ^ nodeFuncs.c:3849:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(rs->alias, context)) ^ nodeFuncs.c:3857:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(rf->functions, context)) ^ nodeFuncs.c:3859:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(rf->alias, context)) ^ nodeFuncs.c:3861:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(rf->coldeflist, context)) ^ nodeFuncs.c:3869:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(rts->relation, context)) ^ nodeFuncs.c:3872:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(rts->args, context)) ^ nodeFuncs.c:3874:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(rts->repeatable, context)) ^ nodeFuncs.c:3882:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(rtf->docexpr, context)) ^ nodeFuncs.c:3884:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(rtf->rowexpr, context)) ^ nodeFuncs.c:3886:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(rtf->namespaces, context)) ^ nodeFuncs.c:3888:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(rtf->columns, context)) ^ nodeFuncs.c:3890:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(rtf->alias, context)) ^ nodeFuncs.c:3898:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(rtfc->colexpr, context)) ^ nodeFuncs.c:3900:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(rtfc->coldefexpr, context)) ^ nodeFuncs.c:3908:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(tn->typmods, context)) ^ nodeFuncs.c:3910:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(tn->arrayBounds, context)) ^ nodeFuncs.c:3919:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(coldef->typeName, context)) ^ nodeFuncs.c:3921:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(coldef->compression, context)) ^ nodeFuncs.c:3923:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(coldef->raw_default, context)) ^ nodeFuncs.c:3925:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(coldef->collClause, context)) ^ nodeFuncs.c:3934:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(indelem->expr, context)) ^ nodeFuncs.c:3940:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(((GroupingSet *) node)->content, context); ^ nodeFuncs.c:3942:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(((LockingClause *) node)->lockedRels, context); ^ nodeFuncs.c:3947:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(xs->expr, context)) ^ nodeFuncs.c:3949:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(xs->typeName, context)) ^ nodeFuncs.c:3954:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(((WithClause *) node)->ctes, context); ^ nodeFuncs.c:3959:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->indexElems, context)) ^ nodeFuncs.c:3961:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->whereClause, context)) ^ nodeFuncs.c:3969:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->infer, context)) ^ nodeFuncs.c:3971:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->targetList, context)) ^ nodeFuncs.c:3973:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(stmt->whereClause, context)) ^ nodeFuncs.c:3979:17: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] return walker(((CommonTableExpr *) node)->ctequery, context); ^ nodeFuncs.c:4012:13: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(outerPlanState(planstate), context)) ^ nodeFuncs.c:4019:13: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(innerPlanState(planstate), context)) ^ nodeFuncs.c:4051:14: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(((SubqueryScanState *) planstate)->subplan, context)) ^ nodeFuncs.c:4057:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker((PlanState *) lfirst(lc), context)) ^ nodeFuncs.c:4086:13: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(sps->planstate, context)) ^ nodeFuncs.c:4105:13: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (walker(planstates[j], context)) ^ 327 warnings generated. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o joinrels.bc joinrels.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' /usr/bin/make -C port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o discard.bc discard.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pathkeys.bc pathkeys.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' ( echo src/backend/optimizer/path/allpaths.o src/backend/optimizer/path/clausesel.o src/backend/optimizer/path/costsize.o src/backend/optimizer/path/equivclass.o src/backend/optimizer/path/indxpath.o src/backend/optimizer/path/joinpath.o src/backend/optimizer/path/joinrels.o src/backend/optimizer/path/pathkeys.o src/backend/optimizer/path/tidpath.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/path' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o atomics.o atomics.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/port' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodes.bc nodes.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/plan' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o createplan.o createplan.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/plan' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeBitmapAnd.bc nodeBitmapAnd.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_sema.o pg_sema.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/port' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o dropcmds.bc dropcmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o params.bc params.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o event_trigger.bc event_trigger.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/port' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o atomics.bc atomics.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/port' /usr/bin/make -C postmaster all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/port' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_shmem.o pg_shmem.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/port' /usr/bin/make -C regex all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeBitmapHeapscan.bc nodeBitmapHeapscan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o print.bc print.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/port' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pg_sema.bc pg_sema.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/port' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o outfuncs.bc outfuncs.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/plan' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o initsplan.o initsplan.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/plan' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o explain.bc explain.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeBitmapIndexscan.bc nodeBitmapIndexscan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o read.bc read.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/port' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pg_shmem.bc pg_shmem.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/port' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/port' ( echo src/backend/port/atomics.o src/backend/port/pg_sema.o src/backend/port/pg_shmem.o ) >objfiles.txt make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/port' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/plan' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o planagg.o planagg.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/plan' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeBitmapOr.bc nodeBitmapOr.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/plan' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o planmain.o planmain.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/plan' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o extension.bc extension.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o autovacuum.o autovacuum.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeCtescan.bc nodeCtescan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o foreigncmds.bc foreigncmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o readfuncs.bc readfuncs.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o functioncmds.bc functioncmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o bgworker.o bgworker.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o bgwriter.o bgwriter.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeCustom.bc nodeCustom.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o lockcmds.bc lockcmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/plan' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o setrefs.o setrefs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/plan' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o checkpointer.o checkpointer.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o fork_process.o fork_process.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' /usr/bin/make -C replication all /usr/bin/make -C logical all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o tidbitmap.bc tidbitmap.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o interrupt.o interrupt.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeForeignscan.bc nodeForeignscan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o value.bc value.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' ( echo src/backend/nodes/bitmapset.o src/backend/nodes/copyfuncs.o src/backend/nodes/equalfuncs.o src/backend/nodes/extensible.o src/backend/nodes/list.o src/backend/nodes/makefuncs.o src/backend/nodes/nodeFuncs.o src/backend/nodes/nodes.o src/backend/nodes/outfuncs.o src/backend/nodes/params.o src/backend/nodes/print.o src/backend/nodes/read.o src/backend/nodes/readfuncs.o src/backend/nodes/tidbitmap.o src/backend/nodes/value.o ) >objfiles.txt make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/nodes' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o indexcmds.bc indexcmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pgarch.o pgarch.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o decode.o decode.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o matview.bc matview.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeFunctionscan.bc nodeFunctionscan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/regex' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o regcomp.o regcomp.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/regex' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/plan' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o planner.o planner.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/plan' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/regex' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o regerror.o regerror.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/regex' /usr/bin/make -C prep all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o launcher.o launcher.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o opclasscmds.bc opclasscmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeGather.bc nodeGather.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/prep' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o prepagg.o prepagg.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/prep' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/plan' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o subselect.o subselect.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/plan' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeGatherMerge.bc nodeGatherMerge.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o operatorcmds.bc operatorcmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o logical.o logical.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/regex' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o regexec.o regexec.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/regex' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o postmaster.o postmaster.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/regex' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o regexport.o regexport.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/regex' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/plan' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o analyzejoins.bc analyzejoins.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/plan' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/regex' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o regfree.o regfree.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/regex' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeGroup.bc nodeGroup.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pgstat.o pgstat.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o logicalfuncs.o logicalfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/regex' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o regprefix.o regprefix.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/regex' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o message.o message.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/prep' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o prepjointree.o prepjointree.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/prep' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o policy.bc policy.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o startup.o startup.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o walwriter.o walwriter.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/prep' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o prepqual.o prepqual.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/prep' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o syslogger.o syslogger.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o portalcmds.bc portalcmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o origin.o origin.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeHash.bc nodeHash.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o prepare.bc prepare.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/prep' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o preptlist.o preptlist.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/prep' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/plan' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o createplan.bc createplan.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/plan' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o bgworker.bc bgworker.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o autovacuum.bc autovacuum.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeHashjoin.bc nodeHashjoin.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o proto.o proto.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o proclang.bc proclang.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/prep' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o prepunion.o prepunion.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/prep' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/plan' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o initsplan.bc initsplan.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/plan' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/prep' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o prepagg.bc prepagg.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/prep' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o bgwriter.bc bgwriter.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/regex' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o regcomp.bc regcomp.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/regex' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeIncrementalSort.bc nodeIncrementalSort.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o relation.o relation.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o publicationcmds.bc publicationcmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeIndexonlyscan.bc nodeIndexonlyscan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/regex' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o regerror.bc regerror.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/regex' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/plan' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o planagg.bc planagg.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/plan' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o checkpointer.bc checkpointer.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/prep' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o prepjointree.bc prepjointree.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/prep' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/plan' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o planmain.bc planmain.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/plan' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o schemacmds.bc schemacmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o fork_process.bc fork_process.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeLimit.bc nodeLimit.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeIndexscan.bc nodeIndexscan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/regex' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o regexec.bc regexec.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/regex' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o interrupt.bc interrupt.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/prep' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o prepqual.bc prepqual.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/prep' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pgarch.bc pgarch.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o seclabel.bc seclabel.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/regex' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o regexport.bc regexport.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/regex' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeLockRows.bc nodeLockRows.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/prep' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o preptlist.bc preptlist.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/prep' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/regex' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o regfree.bc regfree.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/regex' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeMaterial.bc nodeMaterial.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/plan' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o setrefs.bc setrefs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/plan' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/regex' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o regprefix.bc regprefix.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/regex' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/plan' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o planner.bc planner.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/plan' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/regex' ( echo src/backend/regex/regcomp.o src/backend/regex/regerror.o src/backend/regex/regexec.o src/backend/regex/regexport.o src/backend/regex/regfree.o src/backend/regex/regprefix.o ) >objfiles.txt make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/regex' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o sequence.bc sequence.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o reorderbuffer.o reorderbuffer.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/prep' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o prepunion.bc prepunion.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/prep' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/prep' ( echo src/backend/optimizer/prep/prepagg.o src/backend/optimizer/prep/prepjointree.o src/backend/optimizer/prep/prepqual.o src/backend/optimizer/prep/preptlist.o src/backend/optimizer/prep/prepunion.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/prep' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeMergeAppend.bc nodeMergeAppend.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pgstat.bc pgstat.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeMemoize.bc nodeMemoize.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeMergejoin.bc nodeMergejoin.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o statscmds.bc statscmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/plan' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o subselect.bc subselect.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/plan' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/plan' ( echo src/backend/optimizer/plan/analyzejoins.o src/backend/optimizer/plan/createplan.o src/backend/optimizer/plan/initsplan.o src/backend/optimizer/plan/planagg.o src/backend/optimizer/plan/planmain.o src/backend/optimizer/plan/planner.o src/backend/optimizer/plan/setrefs.o src/backend/optimizer/plan/subselect.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/plan' /usr/bin/make -C util all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o subscriptioncmds.bc subscriptioncmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeNamedtuplestorescan.bc nodeNamedtuplestorescan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o snapbuild.o snapbuild.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o tablespace.bc tablespace.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o appendinfo.o appendinfo.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o startup.bc startup.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeModifyTable.bc nodeModifyTable.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o syslogger.bc syslogger.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o postmaster.bc postmaster.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o walwriter.bc walwriter.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tablesync.o tablesync.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' ( echo src/backend/postmaster/autovacuum.o src/backend/postmaster/bgworker.o src/backend/postmaster/bgwriter.o src/backend/postmaster/checkpointer.o src/backend/postmaster/fork_process.o src/backend/postmaster/interrupt.o src/backend/postmaster/pgarch.o src/backend/postmaster/pgstat.o src/backend/postmaster/postmaster.o src/backend/postmaster/startup.o src/backend/postmaster/syslogger.o src/backend/postmaster/walwriter.o ) >objfiles.txt make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/postmaster' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o backup_manifest.o backup_manifest.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeNestloop.bc nodeNestloop.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/make -C rewrite all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeProjectSet.bc nodeProjectSet.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/make -C statistics all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeRecursiveunion.bc nodeRecursiveunion.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o repl_gram.o repl_gram.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/rewrite' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o rewriteDefine.o rewriteDefine.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/rewrite' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o basebackup.o basebackup.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' /usr/bin/make -C storage all /usr/bin/make -C buffer all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeResult.bc nodeResult.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o clauses.o clauses.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o worker.o worker.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/statistics' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o dependencies.o dependencies.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/statistics' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/buffer' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o buf_init.o buf_init.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/buffer' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o joininfo.o joininfo.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeSamplescan.bc nodeSamplescan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/buffer' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o buf_table.o buf_table.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/buffer' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o tablecmds.bc tablecmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o inherit.o inherit.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o decode.bc decode.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o orclauses.o orclauses.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeSeqscan.bc nodeSeqscan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o paramassign.o paramassign.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/statistics' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o extended_stats.o extended_stats.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/statistics' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/rewrite' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o rewriteHandler.o rewriteHandler.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/rewrite' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/statistics' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o mcv.o mcv.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/statistics' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeSetOp.bc nodeSetOp.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o launcher.bc launcher.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeSort.bc nodeSort.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o placeholder.o placeholder.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/rewrite' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o rewriteManip.o rewriteManip.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/rewrite' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o trigger.bc trigger.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/statistics' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o mvdistinct.o mvdistinct.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/statistics' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/rewrite' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o rewriteRemove.o rewriteRemove.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/rewrite' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/buffer' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o bufmgr.o bufmgr.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/buffer' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o logical.bc logical.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeSubqueryscan.bc nodeSubqueryscan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeSubplan.bc nodeSubplan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pathnode.o pathnode.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/buffer' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o freelist.o freelist.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/buffer' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o tsearchcmds.bc tsearchcmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/buffer' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o localbuf.o localbuf.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/buffer' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/statistics' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o dependencies.bc dependencies.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/statistics' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/rewrite' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o rewriteSearchCycle.o rewriteSearchCycle.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/rewrite' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o logicalfuncs.bc logicalfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/rewrite' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o rewriteSupport.o rewriteSupport.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/rewrite' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeTableFuncscan.bc nodeTableFuncscan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/buffer' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o buf_init.bc buf_init.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/buffer' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o predtest.o predtest.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o message.bc message.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/rewrite' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o rowsecurity.o rowsecurity.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/rewrite' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/buffer' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o buf_table.bc buf_table.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/buffer' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeTidrangescan.bc nodeTidrangescan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/statistics' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o extended_stats.bc extended_stats.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/statistics' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o plancat.o plancat.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o typecmds.bc typecmds.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o origin.bc origin.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/rewrite' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o rewriteDefine.bc rewriteDefine.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/rewrite' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o relnode.o relnode.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeTidscan.bc nodeTidscan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o user.bc user.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/statistics' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o mcv.bc mcv.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/statistics' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o proto.bc proto.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeUnique.bc nodeUnique.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o restrictinfo.o restrictinfo.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/buffer' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o bufmgr.bc bufmgr.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/buffer' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/rewrite' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o rewriteHandler.bc rewriteHandler.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/rewrite' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o relation.bc relation.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/statistics' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o mvdistinct.bc mvdistinct.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/statistics' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeValuesscan.bc nodeValuesscan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/statistics' ( echo src/backend/statistics/dependencies.o src/backend/statistics/extended_stats.o src/backend/statistics/mcv.o src/backend/statistics/mvdistinct.o ) >objfiles.txt make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/statistics' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o variable.bc variable.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/buffer' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o freelist.bc freelist.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/buffer' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/rewrite' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o rewriteManip.bc rewriteManip.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/rewrite' /usr/bin/make -C tcop all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o vacuum.bc vacuum.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tcop' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o cmdtag.o cmdtag.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tcop' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/rewrite' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o rewriteRemove.bc rewriteRemove.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/rewrite' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tlist.o tlist.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/rewrite' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o rewriteSearchCycle.bc rewriteSearchCycle.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/rewrite' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/buffer' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o localbuf.bc localbuf.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/buffer' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/buffer' ( echo src/backend/storage/buffer/buf_init.o src/backend/storage/buffer/buf_table.o src/backend/storage/buffer/bufmgr.o src/backend/storage/buffer/freelist.o src/backend/storage/buffer/localbuf.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/buffer' /usr/bin/make -C file all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o reorderbuffer.bc reorderbuffer.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o view.bc view.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' ( echo src/backend/commands/aggregatecmds.o src/backend/commands/alter.o src/backend/commands/amcmds.o src/backend/commands/analyze.o src/backend/commands/async.o src/backend/commands/cluster.o src/backend/commands/collationcmds.o src/backend/commands/comment.o src/backend/commands/constraint.o src/backend/commands/conversioncmds.o src/backend/commands/copy.o src/backend/commands/copyfrom.o src/backend/commands/copyfromparse.o src/backend/commands/copyto.o src/backend/commands/createas.o src/backend/commands/dbcommands.o src/backend/commands/define.o src/backend/commands/discard.o src/backend/commands/dropcmds.o src/backend/commands/event_trigger.o src/backend/commands/explain.o src/backend/commands/extension.o src/backend/commands/foreigncmds.o src/backend/commands/functioncmds.o src/backend/commands/indexcmds.o src/backend/commands/lockcmds.o src/backend/commands/matview.o src/backend/commands/opclasscmds.o src/backend/commands/operatorcmds.o src/backend/commands/policy.o src/backend/commands/portalcmds.o src/backend/commands/prepare.o src/backend/commands/proclang.o src/backend/commands/publicationcmds.o src/backend/commands/schemacmds.o src/backend/commands/seclabel.o src/backend/commands/sequence.o src/backend/commands/statscmds.o src/backend/commands/subscriptioncmds.o src/backend/commands/tablecmds.o src/backend/commands/tablespace.o src/backend/commands/trigger.o src/backend/commands/tsearchcmds.o src/backend/commands/typecmds.o src/backend/commands/user.o src/backend/commands/vacuum.o src/backend/commands/variable.o src/backend/commands/view.o ) >objfiles.txt make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/commands' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/rewrite' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o rewriteSupport.bc rewriteSupport.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/rewrite' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tcop' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o dest.o dest.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tcop' /usr/bin/make -C freespace all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o var.o var.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' /usr/bin/make -C ipc all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeWindowAgg.bc nodeWindowAgg.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/file' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o buffile.o buffile.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/file' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o barrier.o barrier.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o appendinfo.bc appendinfo.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tcop' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o fastpath.o fastpath.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tcop' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/file' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o copydir.o copydir.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/file' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/rewrite' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o rowsecurity.bc rowsecurity.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/rewrite' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/rewrite' ( echo src/backend/rewrite/rewriteDefine.o src/backend/rewrite/rewriteHandler.o src/backend/rewrite/rewriteManip.o src/backend/rewrite/rewriteRemove.o src/backend/rewrite/rewriteSearchCycle.o src/backend/rewrite/rewriteSupport.o src/backend/rewrite/rowsecurity.o ) >objfiles.txt make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/rewrite' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o snapbuild.bc snapbuild.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/freespace' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o freespace.o freespace.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/freespace' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o nodeWorktablescan.bc nodeWorktablescan.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/freespace' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o fsmpage.o fsmpage.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/freespace' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o dsm.o dsm.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/freespace' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o indexfsm.o indexfsm.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/freespace' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tcop' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pquery.o pquery.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tcop' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o tablesync.bc tablesync.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o dsm_impl.o dsm_impl.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o clauses.bc clauses.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o spi.bc spi.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o ipc.o ipc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/freespace' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o freespace.bc freespace.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/freespace' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/freespace' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o fsmpage.bc fsmpage.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/freespace' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/file' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o fd.o fd.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/file' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o tqueue.bc tqueue.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/freespace' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o indexfsm.bc indexfsm.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/freespace' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/freespace' ( echo src/backend/storage/freespace/freespace.o src/backend/storage/freespace/fsmpage.o src/backend/storage/freespace/indexfsm.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/freespace' /usr/bin/make -C tsearch all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o inherit.bc inherit.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/file' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o reinit.o reinit.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/file' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o ipci.o ipci.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o joininfo.bc joininfo.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tcop' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o postgres.o postgres.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tcop' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o tstoreReceiver.bc tstoreReceiver.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' ( echo src/backend/executor/execAmi.o src/backend/executor/execAsync.o src/backend/executor/execCurrent.o src/backend/executor/execExpr.o src/backend/executor/execExprInterp.o src/backend/executor/execGrouping.o src/backend/executor/execIndexing.o src/backend/executor/execJunk.o src/backend/executor/execMain.o src/backend/executor/execParallel.o src/backend/executor/execPartition.o src/backend/executor/execProcnode.o src/backend/executor/execReplication.o src/backend/executor/execSRF.o src/backend/executor/execScan.o src/backend/executor/execTuples.o src/backend/executor/execUtils.o src/backend/executor/functions.o src/backend/executor/instrument.o src/backend/executor/nodeAgg.o src/backend/executor/nodeAppend.o src/backend/executor/nodeBitmapAnd.o src/backend/executor/nodeBitmapHeapscan.o src/backend/executor/nodeBitmapIndexscan.o src/backend/executor/nodeBitmapOr.o src/backend/executor/nodeCtescan.o src/backend/executor/nodeCustom.o src/backend/executor/nodeForeignscan.o src/backend/executor/nodeFunctionscan.o src/backend/executor/nodeGather.o src/backend/executor/nodeGatherMerge.o src/backend/executor/nodeGroup.o src/backend/executor/nodeHash.o src/backend/executor/nodeHashjoin.o src/backend/executor/nodeIncrementalSort.o src/backend/executor/nodeIndexonlyscan.o src/backend/executor/nodeIndexscan.o src/backend/executor/nodeLimit.o src/backend/executor/nodeLockRows.o src/backend/executor/nodeMaterial.o src/backend/executor/nodeMemoize.o src/backend/executor/nodeMergeAppend.o src/backend/executor/nodeMergejoin.o src/backend/executor/nodeModifyTable.o src/backend/executor/nodeNamedtuplestorescan.o src/backend/executor/nodeNestloop.o src/backend/executor/nodeProjectSet.o src/backend/executor/nodeRecursiveunion.o src/backend/executor/nodeResult.o src/backend/executor/nodeSamplescan.o src/backend/executor/nodeSeqscan.o src/backend/executor/nodeSetOp.o src/backend/executor/nodeSort.o src/backend/executor/nodeSubplan.o src/backend/executor/nodeSubqueryscan.o src/backend/executor/nodeTableFuncscan.o src/backend/executor/nodeTidrangescan.o src/backend/executor/nodeTidscan.o src/backend/executor/nodeUnique.o src/backend/executor/nodeValuesscan.o src/backend/executor/nodeWindowAgg.o src/backend/executor/nodeWorktablescan.o src/backend/executor/spi.o src/backend/executor/tqueue.o src/backend/executor/tstoreReceiver.o ) >objfiles.txt make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/executor' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o worker.bc worker.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o dict.o dict.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' ( echo src/backend/replication/logical/decode.o src/backend/replication/logical/launcher.o src/backend/replication/logical/logical.o src/backend/replication/logical/logicalfuncs.o src/backend/replication/logical/message.o src/backend/replication/logical/origin.o src/backend/replication/logical/proto.o src/backend/replication/logical/relation.o src/backend/replication/logical/reorderbuffer.o src/backend/replication/logical/snapbuild.o src/backend/replication/logical/tablesync.o src/backend/replication/logical/worker.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/logical' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o dict_ispell.o dict_ispell.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/file' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o sharedfileset.o sharedfileset.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/file' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o latch.o latch.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o orclauses.bc orclauses.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o dict_simple.o dict_simple.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tcop' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o cmdtag.bc cmdtag.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tcop' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pmsignal.o pmsignal.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/file' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o buffile.bc buffile.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/file' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tcop' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o dest.bc dest.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tcop' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o dict_synonym.o dict_synonym.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tcop' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o utility.o utility.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tcop' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o paramassign.bc paramassign.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o slot.o slot.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o dict_thesaurus.o dict_thesaurus.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/file' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o copydir.bc copydir.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/file' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/file' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o reinit.bc reinit.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/file' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o regis.o regis.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tcop' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o fastpath.bc fastpath.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tcop' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/file' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o fd.bc fd.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/file' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o to_tsany.o to_tsany.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o slotfuncs.o slotfuncs.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pathnode.bc pathnode.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o syncrep.o syncrep.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o ts_locale.o ts_locale.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/file' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o sharedfileset.bc sharedfileset.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/file' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/file' ( echo src/backend/storage/file/buffile.o src/backend/storage/file/copydir.o src/backend/storage/file/fd.o src/backend/storage/file/reinit.o src/backend/storage/file/sharedfileset.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/file' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o procarray.o procarray.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o syncrep_gram.o syncrep_gram.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o placeholder.bc placeholder.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o walreceiverfuncs.o walreceiverfuncs.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' /usr/bin/make -C large_object all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o ts_parse.o ts_parse.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' /usr/bin/make -C utils all /usr/bin/make -C activity all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o procsignal.o procsignal.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o spell.o spell.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/activity' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o backend_progress.o backend_progress.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/activity' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o shm_mq.o shm_mq.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tcop' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o postgres.bc postgres.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tcop' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o walreceiver.o walreceiver.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o shm_toc.o shm_toc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o ts_selfuncs.o ts_selfuncs.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/large_object' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o inv_api.o inv_api.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/large_object' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o ts_typanalyze.o ts_typanalyze.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/activity' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o wait_event.o wait_event.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/activity' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/activity' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o backend_status.o backend_status.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/activity' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o plancat.bc plancat.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o shmem.o shmem.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o ts_utils.o ts_utils.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tcop' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pquery.bc pquery.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tcop' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o shmqueue.o shmqueue.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/activity' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o backend_progress.bc backend_progress.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/activity' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/large_object' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o inv_api.bc inv_api.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/large_object' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/large_object' ( echo src/backend/storage/large_object/inv_api.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/large_object' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o wparser.o wparser.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o signalfuncs.o signalfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o sinval.o sinval.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o predtest.bc predtest.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/activity' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o wait_event.bc wait_event.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/activity' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tcop' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o utility.bc utility.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tcop' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tcop' ( echo src/backend/tcop/cmdtag.o src/backend/tcop/dest.o src/backend/tcop/fastpath.o src/backend/tcop/postgres.o src/backend/tcop/pquery.o src/backend/tcop/utility.o ) >objfiles.txt make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tcop' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o dict.bc dict.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/activity' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o backend_status.bc backend_status.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/activity' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/activity' ( echo src/backend/utils/activity/backend_progress.o src/backend/utils/activity/backend_status.o src/backend/utils/activity/wait_event.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/activity' /usr/bin/make -C adt all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o sinvaladt.o sinvaladt.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o walsender.o walsender.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o restrictinfo.bc restrictinfo.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o barrier.bc barrier.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o relnode.bc relnode.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o dict_ispell.bc dict_ispell.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o amutils.o amutils.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o standby.o standby.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o wparser_def.o wparser_def.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o dict_simple.bc dict_simple.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o backup_manifest.bc backup_manifest.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o array_expanded.o array_expanded.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o tlist.bc tlist.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o dsm.bc dsm.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o dsm_impl.bc dsm_impl.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o dict_synonym.bc dict_synonym.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o array_selfuncs.o array_selfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/make -C cache all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o array_typanalyze.o array_typanalyze.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o attoptcache.o attoptcache.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o var.bc var.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' ( echo src/backend/optimizer/util/appendinfo.o src/backend/optimizer/util/clauses.o src/backend/optimizer/util/inherit.o src/backend/optimizer/util/joininfo.o src/backend/optimizer/util/orclauses.o src/backend/optimizer/util/paramassign.o src/backend/optimizer/util/pathnode.o src/backend/optimizer/util/placeholder.o src/backend/optimizer/util/plancat.o src/backend/optimizer/util/predtest.o src/backend/optimizer/util/relnode.o src/backend/optimizer/util/restrictinfo.o src/backend/optimizer/util/tlist.o src/backend/optimizer/util/var.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer/util' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer' ( cat geqo/objfiles.txt path/objfiles.txt plan/objfiles.txt prep/objfiles.txt util/objfiles.txt; echo ) >objfiles.txt make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/optimizer' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o ipc.bc ipc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o repl_gram.bc repl_gram.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o basebackup.bc basebackup.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o evtcache.o evtcache.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o dict_thesaurus.bc dict_thesaurus.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' /usr/bin/make -C ../../src/timezone all make[3]: Nothing to be done for 'all'. make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o ipci.bc ipci.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o acl.o acl.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o regis.bc regis.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' /usr/bin/make -C jit all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o catcache.o catcache.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o latch.bc latch.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/jit' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DDLSUFFIX=\".so\" -c -o jit.o jit.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/jit' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o array_userfuncs.o array_userfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o slotfuncs.bc slotfuncs.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o slot.bc slot.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o syncrep.bc syncrep.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pmsignal.bc pmsignal.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o spell.bc spell.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/jit' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DDLSUFFIX=\".so\" -flto=thin -emit-llvm -c -o jit.bc jit.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/jit' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/jit' ( echo src/backend/jit/jit.o ) >objfiles.txt make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/jit' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o procsignal.bc procsignal.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o inval.o inval.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o syncrep_gram.bc syncrep_gram.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o arraysubs.o arraysubs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o to_tsany.bc to_tsany.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o partcache.o partcache.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o ts_locale.bc ts_locale.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o procarray.bc procarray.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o shm_toc.bc shm_toc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o shm_mq.bc shm_mq.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o walreceiver.bc walreceiver.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o shmem.bc shmem.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o ascii.o ascii.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o ts_selfuncs.bc ts_selfuncs.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o ts_parse.bc ts_parse.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o arrayutils.o arrayutils.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o lsyscache.o lsyscache.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o bool.o bool.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o shmqueue.bc shmqueue.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o walreceiverfuncs.bc walreceiverfuncs.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' /usr/bin/make -C error all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o ts_typanalyze.bc ts_typanalyze.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/error' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o assert.o assert.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/error' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o cash.o cash.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o plancache.o plancache.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o signalfuncs.bc signalfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o ts_utils.bc ts_utils.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o relfilenodemap.o relfilenodemap.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o char.o char.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o walsender.bc walsender.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' ( cat logical/objfiles.txt; echo src/backend/replication/backup_manifest.o src/backend/replication/basebackup.o src/backend/replication/repl_gram.o src/backend/replication/slot.o src/backend/replication/slotfuncs.o src/backend/replication/syncrep.o src/backend/replication/syncrep_gram.o src/backend/replication/walreceiver.o src/backend/replication/walreceiverfuncs.o src/backend/replication/walsender.o ) >objfiles.txt make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o sinval.bc sinval.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o cryptohashfuncs.o cryptohashfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o wparser.bc wparser.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o relmapper.o relmapper.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o sinvaladt.bc sinvaladt.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o standby.bc standby.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' ( echo src/backend/storage/ipc/barrier.o src/backend/storage/ipc/dsm.o src/backend/storage/ipc/dsm_impl.o src/backend/storage/ipc/ipc.o src/backend/storage/ipc/ipci.o src/backend/storage/ipc/latch.o src/backend/storage/ipc/pmsignal.o src/backend/storage/ipc/procarray.o src/backend/storage/ipc/procsignal.o src/backend/storage/ipc/shm_mq.o src/backend/storage/ipc/shm_toc.o src/backend/storage/ipc/shmem.o src/backend/storage/ipc/shmqueue.o src/backend/storage/ipc/signalfuncs.o src/backend/storage/ipc/sinval.o src/backend/storage/ipc/sinvaladt.o src/backend/storage/ipc/standby.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/ipc' /usr/bin/make -C lmgr all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/error' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o assert.bc assert.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/error' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o arrayfuncs.o arrayfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o wparser_def.bc wparser_def.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' ( echo src/backend/tsearch/dict.o src/backend/tsearch/dict_ispell.o src/backend/tsearch/dict_simple.o src/backend/tsearch/dict_synonym.o src/backend/tsearch/dict_thesaurus.o src/backend/tsearch/regis.o src/backend/tsearch/spell.o src/backend/tsearch/to_tsany.o src/backend/tsearch/ts_locale.o src/backend/tsearch/ts_parse.o src/backend/tsearch/ts_selfuncs.o src/backend/tsearch/ts_typanalyze.o src/backend/tsearch/ts_utils.o src/backend/tsearch/wparser.o src/backend/tsearch/wparser_def.o ) >objfiles.txt make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/tsearch' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o spccache.o spccache.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o condition_variable.o condition_variable.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o syscache.o syscache.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o ts_cache.o ts_cache.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/error' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o elog.o elog.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/error' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o relcache.o relcache.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/error' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o elog.bc elog.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/error' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/error' ( echo src/backend/utils/error/assert.o src/backend/utils/error/elog.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/error' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o deadlock.o deadlock.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o attoptcache.bc attoptcache.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o datum.o datum.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o date.o date.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o evtcache.bc evtcache.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o lmgr.o lmgr.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o typcache.o typcache.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o catcache.bc catcache.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o inval.bc inval.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o dbsize.o dbsize.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o expandeddatum.o expandeddatum.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o domains.o domains.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o encode.o encode.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o enum.o enum.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o datetime.o datetime.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o partcache.bc partcache.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o expandedrecord.o expandedrecord.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o relfilenodemap.bc relfilenodemap.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o lsyscache.bc lsyscache.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' /usr/bin/make -C fmgr all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o plancache.bc plancache.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o relmapper.bc relmapper.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o spccache.bc spccache.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o format_type.o format_type.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/fmgr' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DDLSUFFIX=\".so\" -c -o dfmgr.o dfmgr.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/fmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o lock.o lock.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o genfile.o genfile.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o lwlocknames.o lwlocknames.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o relcache.bc relcache.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o syscache.bc syscache.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o geo_selfuncs.o geo_selfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o lwlock.o lwlock.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o geo_spgist.o geo_spgist.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/fmgr' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DDLSUFFIX=\".so\" -c -o fmgr.o fmgr.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/fmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o float.o float.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o ts_cache.bc ts_cache.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o inet_cidr_ntop.o inet_cidr_ntop.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o inet_net_pton.o inet_net_pton.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o s_lock.o s_lock.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/fmgr' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DDLSUFFIX=\".so\" -c -o funcapi.o funcapi.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/fmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/fmgr' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DDLSUFFIX=\".so\" -flto=thin -emit-llvm -c -o dfmgr.bc dfmgr.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/fmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o spin.o spin.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o typcache.bc typcache.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' ( echo src/backend/utils/cache/attoptcache.o src/backend/utils/cache/catcache.o src/backend/utils/cache/evtcache.o src/backend/utils/cache/inval.o src/backend/utils/cache/lsyscache.o src/backend/utils/cache/partcache.o src/backend/utils/cache/plancache.o src/backend/utils/cache/relcache.o src/backend/utils/cache/relfilenodemap.o src/backend/utils/cache/relmapper.o src/backend/utils/cache/spccache.o src/backend/utils/cache/syscache.o src/backend/utils/cache/ts_cache.o src/backend/utils/cache/typcache.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/cache' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o proc.o proc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o predicate.o predicate.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' /usr/bin/make -C hash all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o condition_variable.bc condition_variable.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' /usr/bin/make -C init all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/fmgr' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DDLSUFFIX=\".so\" -flto=thin -emit-llvm -c -o fmgr.bc fmgr.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/fmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o deadlock.bc deadlock.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o formatting.o formatting.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/fmgr' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DDLSUFFIX=\".so\" -flto=thin -emit-llvm -c -o funcapi.bc funcapi.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/fmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/fmgr' ( echo src/backend/utils/fmgr/dfmgr.o src/backend/utils/fmgr/fmgr.o src/backend/utils/fmgr/funcapi.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/fmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/init' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o globals.o globals.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/init' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/hash' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_crc.o pg_crc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/hash' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/hash' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o dynahash.o dynahash.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/hash' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o int.o int.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/hash' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pg_crc.bc pg_crc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/hash' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o lmgr.bc lmgr.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/init' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o globals.bc globals.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/init' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/hash' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o dynahash.bc dynahash.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/hash' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/hash' ( echo src/backend/utils/hash/dynahash.o src/backend/utils/hash/pg_crc.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/hash' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/init' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o postinit.o postinit.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/init' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o geo_ops.o geo_ops.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/make -C mb all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/init' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o miscinit.o miscinit.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/init' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o lwlock.bc lwlock.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o lock.bc lock.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o lwlocknames.bc lwlocknames.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o conv.o conv.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o int8.o int8.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o jsonb_gin.o jsonb_gin.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o json.o json.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/make -C misc all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stringinfo_mb.o stringinfo_mb.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb' /usr/bin/make -C mmgr all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/init' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o miscinit.bc miscinit.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/init' /usr/bin/make -C resowner all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mmgr' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o aset.o aset.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/init' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o postinit.bc postinit.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/init' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/init' ( echo src/backend/utils/init/globals.o src/backend/utils/init/miscinit.o src/backend/utils/init/postinit.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/init' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o jsonb.o jsonb.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o predicate.bc predicate.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' /usr/bin/make -C sort all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o mbutils.o mbutils.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o wstrcmp.o wstrcmp.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o jsonb_op.o jsonb_op.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o proc.bc proc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o wstrncmp.o wstrncmp.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mmgr' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o dsa.o dsa.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/sort' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o logtape.o logtape.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/sort' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o s_lock.bc s_lock.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/resowner' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o resowner.bc resowner.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/resowner' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/resowner' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o resowner.o resowner.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/resowner' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/resowner' ( echo src/backend/utils/resowner/resowner.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/resowner' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o conv.bc conv.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mmgr' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o generation.o generation.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mmgr' /usr/bin/make -C time all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/sort' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o sharedtuplestore.o sharedtuplestore.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/sort' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o spin.bc spin.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' ( echo src/backend/storage/lmgr/condition_variable.o src/backend/storage/lmgr/deadlock.o src/backend/storage/lmgr/lmgr.o src/backend/storage/lmgr/lock.o src/backend/storage/lmgr/lwlock.o src/backend/storage/lmgr/lwlocknames.o src/backend/storage/lmgr/predicate.o src/backend/storage/lmgr/proc.o src/backend/storage/lmgr/s_lock.o src/backend/storage/lmgr/spin.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/lmgr' /usr/bin/make -C page all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/time' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o combocid.o combocid.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/time' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o jsonb_util.o jsonb_util.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/sort' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o sortsupport.o sortsupport.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/sort' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mmgr' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o mcxt.o mcxt.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mmgr' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o freepage.o freepage.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mmgr' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o memdebug.o memdebug.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o mbutils.bc mbutils.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/page' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o bufpage.o bufpage.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/page' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o jsonbsubs.o jsonbsubs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o stringinfo_mb.bc stringinfo_mb.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/page' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -funroll-loops -ftree-vectorize -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o checksum.o checksum.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/page' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/page' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o itemptr.o itemptr.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/page' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/time' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o snapmgr.o snapmgr.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/time' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mmgr' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o portalmem.o portalmem.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o wstrcmp.bc wstrcmp.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o fmgrtab.o fmgrtab.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mmgr' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o slab.o slab.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/time' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o combocid.bc combocid.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/time' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o wstrncmp.bc wstrncmp.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb' ( echo src/backend/utils/mb/conv.o src/backend/utils/mb/mbutils.o src/backend/utils/mb/stringinfo_mb.o src/backend/utils/mb/wstrcmp.o src/backend/utils/mb/wstrncmp.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/page' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o bufpage.bc bufpage.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/page' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mmgr' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o aset.bc aset.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/page' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o checksum.bc checksum.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/page' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/sort' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tuplestore.o tuplestore.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/sort' /usr/bin/make -C smgr all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/sort' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o logtape.bc logtape.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/sort' /usr/bin/make -C sync all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/time' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o snapmgr.bc snapmgr.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/time' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/time' ( echo src/backend/utils/time/combocid.o src/backend/utils/time/snapmgr.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/time' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/page' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o itemptr.bc itemptr.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/page' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/page' ( echo src/backend/storage/page/bufpage.o src/backend/storage/page/checksum.o src/backend/storage/page/itemptr.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/page' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mmgr' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o dsa.bc dsa.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/sort' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tuplesort.o tuplesort.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/sort' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DPG_KRB_SRVTAB='"FILE:/etc/krb5.keytab"' -c -o guc.o guc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' In function 'guc_var_compare', inlined from 'bsearch' at /usr/include/bits/stdlib-bsearch.h:33:23, inlined from 'find_option' at guc.c:5485:35: guc.c:5546:38: warning: array subscript 'const struct config_generic[0]' is partly outside array bounds of 'const char[8]' [-Warray-bounds] 5546 | return guc_name_compare(confa->name, confb->name); | ~~~~~^~~~~~ guc.c: In function 'find_option': guc.c:5472:25: note: object 'name' of size 8 5472 | find_option(const char *name, bool create_placeholders, bool skip_errors, | ~~~~~~~~~~~~^~~~ make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/sync' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o sync.o sync.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/sync' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DPG_KRB_SRVTAB='"FILE:/etc/krb5.keytab"' -c -o help_config.o help_config.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o jsonfuncs.o jsonfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/smgr' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o md.o md.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/smgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/smgr' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o smgr.o smgr.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/smgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/sort' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o sharedtuplestore.bc sharedtuplestore.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/sort' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DPG_KRB_SRVTAB='"FILE:/etc/krb5.keytab"' -c -o pg_config.o pg_config.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/smgr' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o md.bc md.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/smgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/sync' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o sync.bc sync.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/sync' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/sync' ( echo src/backend/storage/sync/sync.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/sync' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mmgr' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o generation.bc generation.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mmgr' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o freepage.bc freepage.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/smgr' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o smgr.bc smgr.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/smgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DPG_KRB_SRVTAB='"FILE:/etc/krb5.keytab"' -c -o pg_rusage.o pg_rusage.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/smgr' ( echo src/backend/storage/smgr/md.o src/backend/storage/smgr/smgr.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage/smgr' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage' ( cat buffer/objfiles.txt file/objfiles.txt freespace/objfiles.txt ipc/objfiles.txt large_object/objfiles.txt lmgr/objfiles.txt page/objfiles.txt smgr/objfiles.txt sync/objfiles.txt; echo ) >objfiles.txt make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/storage' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DPG_KRB_SRVTAB='"FILE:/etc/krb5.keytab"' -c -o pg_controldata.o pg_controldata.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o jsonpath.o jsonpath.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/sort' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o sortsupport.bc sortsupport.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/sort' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mmgr' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o memdebug.bc memdebug.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DPG_KRB_SRVTAB='"FILE:/etc/krb5.keytab"' -c -o queryenvironment.o queryenvironment.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mmgr' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o mcxt.bc mcxt.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DPG_KRB_SRVTAB='"FILE:/etc/krb5.keytab"' -c -o ps_status.o ps_status.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mmgr' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o portalmem.bc portalmem.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mmgr' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o slab.bc slab.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mmgr' ( echo src/backend/utils/mmgr/aset.o src/backend/utils/mmgr/dsa.o src/backend/utils/mmgr/freepage.o src/backend/utils/mmgr/generation.o src/backend/utils/mmgr/mcxt.o src/backend/utils/mmgr/memdebug.o src/backend/utils/mmgr/portalmem.o src/backend/utils/mmgr/slab.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mmgr' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/sort' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o tuplestore.bc tuplestore.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/sort' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DPG_KRB_SRVTAB='"FILE:/etc/krb5.keytab"' -c -o queryjumble.o queryjumble.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o fmgrtab.bc fmgrtab.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o jsonpath_exec.o jsonpath_exec.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DPG_KRB_SRVTAB='"FILE:/etc/krb5.keytab"' -c -o rls.o rls.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DPG_KRB_SRVTAB='"FILE:/etc/krb5.keytab"' -c -o sampling.o sampling.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DPG_KRB_SRVTAB='"FILE:/etc/krb5.keytab"' -c -o superuser.o superuser.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o jsonpath_gram.o jsonpath_gram.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o like.o like.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/sort' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o tuplesort.bc tuplesort.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/sort' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o lockfuncs.o lockfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/sort' ( echo src/backend/utils/sort/logtape.o src/backend/utils/sort/sharedtuplestore.o src/backend/utils/sort/sortsupport.o src/backend/utils/sort/tuplesort.o src/backend/utils/sort/tuplestore.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/sort' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o mac.o mac.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o like_support.o like_support.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DPG_KRB_SRVTAB='"FILE:/etc/krb5.keytab"' -c -o tzparser.o tzparser.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DPG_KRB_SRVTAB='"FILE:/etc/krb5.keytab"' -c -o timeout.o timeout.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o mac8.o mac8.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o mcxtfuncs.o mcxtfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DPG_KRB_SRVTAB='"FILE:/etc/krb5.keytab"' -flto=thin -emit-llvm -c -o help_config.bc help_config.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DPG_KRB_SRVTAB='"FILE:/etc/krb5.keytab"' -flto=thin -emit-llvm -c -o pg_rusage.bc pg_rusage.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DPG_KRB_SRVTAB='"FILE:/etc/krb5.keytab"' -flto=thin -emit-llvm -c -o pg_config.bc pg_config.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DPG_KRB_SRVTAB='"FILE:/etc/krb5.keytab"' -flto=thin -emit-llvm -c -o pg_controldata.bc pg_controldata.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o misc.o misc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DPG_KRB_SRVTAB='"FILE:/etc/krb5.keytab"' -flto=thin -emit-llvm -c -o queryenvironment.bc queryenvironment.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DPG_KRB_SRVTAB='"FILE:/etc/krb5.keytab"' -flto=thin -emit-llvm -c -o ps_status.bc ps_status.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DPG_KRB_SRVTAB='"FILE:/etc/krb5.keytab"' -flto=thin -emit-llvm -c -o sampling.bc sampling.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o multirangetypes_selfuncs.o multirangetypes_selfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DPG_KRB_SRVTAB='"FILE:/etc/krb5.keytab"' -flto=thin -emit-llvm -c -o rls.bc rls.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DPG_KRB_SRVTAB='"FILE:/etc/krb5.keytab"' -flto=thin -emit-llvm -c -o queryjumble.bc queryjumble.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DPG_KRB_SRVTAB='"FILE:/etc/krb5.keytab"' -flto=thin -emit-llvm -c -o superuser.bc superuser.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o name.o name.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DPG_KRB_SRVTAB='"FILE:/etc/krb5.keytab"' -flto=thin -emit-llvm -c -o timeout.bc timeout.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o network_gist.o network_gist.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DPG_KRB_SRVTAB='"FILE:/etc/krb5.keytab"' -flto=thin -emit-llvm -c -o tzparser.bc tzparser.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o network_selfuncs.o network_selfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o network_spgist.o network_spgist.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o multirangetypes.o multirangetypes.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o numutils.o numutils.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o oid.o oid.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DPG_KRB_SRVTAB='"FILE:/etc/krb5.keytab"' -flto=thin -emit-llvm -c -o guc.bc guc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' ( echo src/backend/utils/misc/guc.o src/backend/utils/misc/help_config.o src/backend/utils/misc/pg_config.o src/backend/utils/misc/pg_controldata.o src/backend/utils/misc/pg_rusage.o src/backend/utils/misc/ps_status.o src/backend/utils/misc/queryenvironment.o src/backend/utils/misc/queryjumble.o src/backend/utils/misc/rls.o src/backend/utils/misc/sampling.o src/backend/utils/misc/superuser.o src/backend/utils/misc/timeout.o src/backend/utils/misc/tzparser.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/misc' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o partitionfuncs.o partitionfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o oracle_compat.o oracle_compat.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_lsn.o pg_lsn.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_upgrade_support.o pg_upgrade_support.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o network.o network.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_locale.o pg_locale.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o quote.o quote.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o orderedsetaggs.o orderedsetaggs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pseudotypes.o pseudotypes.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o rangetypes_spgist.o rangetypes_spgist.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o rangetypes_typanalyze.o rangetypes_typanalyze.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o rangetypes_selfuncs.o rangetypes_selfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o rangetypes_gist.o rangetypes_gist.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o regexp.o regexp.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pgstatfuncs.o pgstatfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o rangetypes.o rangetypes.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o regproc.o regproc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o trigfuncs.o trigfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tid.o tid.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o rowtypes.o rowtypes.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o ri_triggers.o ri_triggers.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tsginidx.o tsginidx.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tsgistidx.o tsgistidx.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tsquery_cleanup.o tsquery_cleanup.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tsquery_gist.o tsquery_gist.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tsquery.o tsquery.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tsquery_op.o tsquery_op.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tsquery_util.o tsquery_util.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tsquery_rewrite.o tsquery_rewrite.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -ftree-vectorize -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o numeric.o numeric.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tsvector_parser.o tsvector_parser.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tsvector.o tsvector.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o uuid.o uuid.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tsrank.o tsrank.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o version.o version.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o selfuncs.o selfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o windowfuncs.o windowfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o xid.o xid.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o varchar.o varchar.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o timestamp.o timestamp.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o varbit.o varbit.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tsvector_op.o tsvector_op.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o xid8funcs.o xid8funcs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o amutils.bc amutils.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o array_expanded.bc array_expanded.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o ruleutils.o ruleutils.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o array_typanalyze.bc array_typanalyze.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o array_selfuncs.bc array_selfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o array_userfuncs.bc array_userfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o acl.bc acl.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o arraysubs.bc arraysubs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o arrayutils.bc arrayutils.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o ascii.bc ascii.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o bool.bc bool.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o char.bc char.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o cryptohashfuncs.bc cryptohashfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o xml.o xml.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o cash.bc cash.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o datum.bc datum.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o encode.bc encode.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o domains.bc domains.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o date.bc date.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o arrayfuncs.bc arrayfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o dbsize.bc dbsize.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o expandeddatum.bc expandeddatum.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o datetime.bc datetime.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o enum.bc enum.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o varlena.o varlena.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o format_type.bc format_type.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o expandedrecord.bc expandedrecord.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o geo_selfuncs.bc geo_selfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o genfile.bc genfile.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o float.bc float.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o geo_spgist.bc geo_spgist.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o inet_cidr_ntop.bc inet_cidr_ntop.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o inet_net_pton.bc inet_net_pton.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o int.bc int.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o json.bc json.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o int8.bc int8.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o formatting.bc formatting.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o jsonb_gin.bc jsonb_gin.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o geo_ops.bc geo_ops.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o jsonb_op.bc jsonb_op.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o jsonb.bc jsonb.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o jsonbsubs.bc jsonbsubs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o jsonb_util.bc jsonb_util.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o jsonpath.bc jsonpath.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o like.bc like.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o like_support.bc like_support.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o jsonpath_exec.bc jsonpath_exec.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o mac.bc mac.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o jsonfuncs.bc jsonfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o mac8.bc mac8.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o lockfuncs.bc lockfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o jsonpath_gram.bc jsonpath_gram.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o mcxtfuncs.bc mcxtfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o misc.bc misc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o name.bc name.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o multirangetypes_selfuncs.bc multirangetypes_selfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o network_gist.bc network_gist.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o network_selfuncs.bc network_selfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o network_spgist.bc network_spgist.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o multirangetypes.bc multirangetypes.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o numutils.bc numutils.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o oid.bc oid.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o network.bc network.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o oracle_compat.bc oracle_compat.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o orderedsetaggs.bc orderedsetaggs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o partitionfuncs.bc partitionfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pg_lsn.bc pg_lsn.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pg_locale.bc pg_locale.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pg_upgrade_support.bc pg_upgrade_support.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pseudotypes.bc pseudotypes.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o quote.bc quote.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pgstatfuncs.bc pgstatfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o rangetypes_spgist.bc rangetypes_spgist.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o rangetypes_typanalyze.bc rangetypes_typanalyze.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o rangetypes_selfuncs.bc rangetypes_selfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o rangetypes_gist.bc rangetypes_gist.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o rangetypes.bc rangetypes.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o regexp.bc regexp.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o regproc.bc regproc.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o numeric.bc numeric.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o tid.bc tid.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o ri_triggers.bc ri_triggers.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o rowtypes.bc rowtypes.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o trigfuncs.bc trigfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o tsginidx.bc tsginidx.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o tsquery_cleanup.bc tsquery_cleanup.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o tsquery_gist.bc tsquery_gist.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o selfuncs.bc selfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o tsgistidx.bc tsgistidx.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o tsquery.bc tsquery.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o tsquery_op.bc tsquery_op.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o tsquery_rewrite.bc tsquery_rewrite.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o tsquery_util.bc tsquery_util.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o timestamp.bc timestamp.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o tsrank.bc tsrank.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o tsvector.bc tsvector.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o tsvector_parser.bc tsvector_parser.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o ruleutils.bc ruleutils.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o uuid.bc uuid.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o version.bc version.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o varchar.bc varchar.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o windowfuncs.bc windowfuncs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o tsvector_op.bc tsvector_op.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o varbit.bc varbit.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o xid.bc xid.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o xid8funcs.bc xid8funcs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o xml.bc xml.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o varlena.bc varlena.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' ( echo src/backend/utils/adt/acl.o src/backend/utils/adt/amutils.o src/backend/utils/adt/array_expanded.o src/backend/utils/adt/array_selfuncs.o src/backend/utils/adt/array_typanalyze.o src/backend/utils/adt/array_userfuncs.o src/backend/utils/adt/arrayfuncs.o src/backend/utils/adt/arraysubs.o src/backend/utils/adt/arrayutils.o src/backend/utils/adt/ascii.o src/backend/utils/adt/bool.o src/backend/utils/adt/cash.o src/backend/utils/adt/char.o src/backend/utils/adt/cryptohashfuncs.o src/backend/utils/adt/date.o src/backend/utils/adt/datetime.o src/backend/utils/adt/datum.o src/backend/utils/adt/dbsize.o src/backend/utils/adt/domains.o src/backend/utils/adt/encode.o src/backend/utils/adt/enum.o src/backend/utils/adt/expandeddatum.o src/backend/utils/adt/expandedrecord.o src/backend/utils/adt/float.o src/backend/utils/adt/format_type.o src/backend/utils/adt/formatting.o src/backend/utils/adt/genfile.o src/backend/utils/adt/geo_ops.o src/backend/utils/adt/geo_selfuncs.o src/backend/utils/adt/geo_spgist.o src/backend/utils/adt/inet_cidr_ntop.o src/backend/utils/adt/inet_net_pton.o src/backend/utils/adt/int.o src/backend/utils/adt/int8.o src/backend/utils/adt/json.o src/backend/utils/adt/jsonb.o src/backend/utils/adt/jsonb_gin.o src/backend/utils/adt/jsonb_op.o src/backend/utils/adt/jsonb_util.o src/backend/utils/adt/jsonfuncs.o src/backend/utils/adt/jsonbsubs.o src/backend/utils/adt/jsonpath.o src/backend/utils/adt/jsonpath_exec.o src/backend/utils/adt/jsonpath_gram.o src/backend/utils/adt/like.o src/backend/utils/adt/like_support.o src/backend/utils/adt/lockfuncs.o src/backend/utils/adt/mac.o src/backend/utils/adt/mac8.o src/backend/utils/adt/mcxtfuncs.o src/backend/utils/adt/misc.o src/backend/utils/adt/multirangetypes.o src/backend/utils/adt/multirangetypes_selfuncs.o src/backend/utils/adt/name.o src/backend/utils/adt/network.o src/backend/utils/adt/network_gist.o src/backend/utils/adt/network_selfuncs.o src/backend/utils/adt/network_spgist.o src/backend/utils/adt/numeric.o src/backend/utils/adt/numutils.o src/backend/utils/adt/oid.o src/backend/utils/adt/oracle_compat.o src/backend/utils/adt/orderedsetaggs.o src/backend/utils/adt/partitionfuncs.o src/backend/utils/adt/pg_locale.o src/backend/utils/adt/pg_lsn.o src/backend/utils/adt/pg_upgrade_support.o src/backend/utils/adt/pgstatfuncs.o src/backend/utils/adt/pseudotypes.o src/backend/utils/adt/quote.o src/backend/utils/adt/rangetypes.o src/backend/utils/adt/rangetypes_gist.o src/backend/utils/adt/rangetypes_selfuncs.o src/backend/utils/adt/rangetypes_spgist.o src/backend/utils/adt/rangetypes_typanalyze.o src/backend/utils/adt/regexp.o src/backend/utils/adt/regproc.o src/backend/utils/adt/ri_triggers.o src/backend/utils/adt/rowtypes.o src/backend/utils/adt/ruleutils.o src/backend/utils/adt/selfuncs.o src/backend/utils/adt/tid.o src/backend/utils/adt/timestamp.o src/backend/utils/adt/trigfuncs.o src/backend/utils/adt/tsginidx.o src/backend/utils/adt/tsgistidx.o src/backend/utils/adt/tsquery.o src/backend/utils/adt/tsquery_cleanup.o src/backend/utils/adt/tsquery_gist.o src/backend/utils/adt/tsquery_op.o src/backend/utils/adt/tsquery_rewrite.o src/backend/utils/adt/tsquery_util.o src/backend/utils/adt/tsrank.o src/backend/utils/adt/tsvector.o src/backend/utils/adt/tsvector_op.o src/backend/utils/adt/tsvector_parser.o src/backend/utils/adt/uuid.o src/backend/utils/adt/varbit.o src/backend/utils/adt/varchar.o src/backend/utils/adt/varlena.o src/backend/utils/adt/version.o src/backend/utils/adt/windowfuncs.o src/backend/utils/adt/xid.o src/backend/utils/adt/xid8funcs.o src/backend/utils/adt/xml.o ) >objfiles.txt make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/adt' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils' ( cat activity/objfiles.txt adt/objfiles.txt cache/objfiles.txt error/objfiles.txt fmgr/objfiles.txt hash/objfiles.txt init/objfiles.txt mb/objfiles.txt misc/objfiles.txt mmgr/objfiles.txt resowner/objfiles.txt sort/objfiles.txt time/objfiles.txt; echo src/backend/utils/fmgrtab.o ) >objfiles.txt make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend' /usr/bin/dtrace -C -G -s utils/probes.d access/brin/brin.o access/brin/brin_bloom.o access/brin/brin_inclusion.o access/brin/brin_minmax.o access/brin/brin_minmax_multi.o access/brin/brin_pageops.o access/brin/brin_revmap.o access/brin/brin_tuple.o access/brin/brin_validate.o access/brin/brin_xlog.o access/common/attmap.o access/common/bufmask.o access/common/detoast.o access/common/heaptuple.o access/common/indextuple.o access/common/printsimple.o access/common/printtup.o access/common/relation.o access/common/reloptions.o access/common/scankey.o access/common/session.o access/common/syncscan.o access/common/toast_compression.o access/common/toast_internals.o access/common/tupconvert.o access/common/tupdesc.o access/gin/ginarrayproc.o access/gin/ginbtree.o access/gin/ginbulk.o access/gin/gindatapage.o access/gin/ginentrypage.o access/gin/ginfast.o access/gin/ginget.o access/gin/gininsert.o access/gin/ginlogic.o access/gin/ginpostinglist.o access/gin/ginscan.o access/gin/ginutil.o access/gin/ginvacuum.o access/gin/ginvalidate.o access/gin/ginxlog.o access/gist/gist.o access/gist/gistbuild.o access/gist/gistbuildbuffers.o access/gist/gistget.o access/gist/gistproc.o access/gist/gistscan.o access/gist/gistsplit.o access/gist/gistutil.o access/gist/gistvacuum.o access/gist/gistvalidate.o access/gist/gistxlog.o access/hash/hash.o access/hash/hash_xlog.o access/hash/hashfunc.o access/hash/hashinsert.o access/hash/hashovfl.o access/hash/hashpage.o access/hash/hashsearch.o access/hash/hashsort.o access/hash/hashutil.o access/hash/hashvalidate.o access/heap/heapam.o access/heap/heapam_handler.o access/heap/heapam_visibility.o access/heap/heaptoast.o access/heap/hio.o access/heap/pruneheap.o access/heap/rewriteheap.o access/heap/vacuumlazy.o access/heap/visibilitymap.o access/index/amapi.o access/index/amvalidate.o access/index/genam.o access/index/indexam.o access/nbtree/nbtcompare.o access/nbtree/nbtdedup.o access/nbtree/nbtinsert.o access/nbtree/nbtpage.o access/nbtree/nbtree.o access/nbtree/nbtsearch.o access/nbtree/nbtsort.o access/nbtree/nbtsplitloc.o access/nbtree/nbtutils.o access/nbtree/nbtvalidate.o access/nbtree/nbtxlog.o access/rmgrdesc/brindesc.o access/rmgrdesc/clogdesc.o access/rmgrdesc/committsdesc.o access/rmgrdesc/dbasedesc.o access/rmgrdesc/genericdesc.o access/rmgrdesc/gindesc.o access/rmgrdesc/gistdesc.o access/rmgrdesc/hashdesc.o access/rmgrdesc/heapdesc.o access/rmgrdesc/logicalmsgdesc.o access/rmgrdesc/mxactdesc.o access/rmgrdesc/nbtdesc.o access/rmgrdesc/relmapdesc.o access/rmgrdesc/replorigindesc.o access/rmgrdesc/seqdesc.o access/rmgrdesc/smgrdesc.o access/rmgrdesc/spgdesc.o access/rmgrdesc/standbydesc.o access/rmgrdesc/tblspcdesc.o access/rmgrdesc/xactdesc.o access/rmgrdesc/xlogdesc.o access/spgist/spgdoinsert.o access/spgist/spginsert.o access/spgist/spgkdtreeproc.o access/spgist/spgproc.o access/spgist/spgquadtreeproc.o access/spgist/spgscan.o access/spgist/spgtextproc.o access/spgist/spgutils.o access/spgist/spgvacuum.o access/spgist/spgvalidate.o access/spgist/spgxlog.o access/table/table.o access/table/tableam.o access/table/tableamapi.o access/table/toast_helper.o access/tablesample/bernoulli.o access/tablesample/system.o access/tablesample/tablesample.o access/transam/clog.o access/transam/commit_ts.o access/transam/generic_xlog.o access/transam/multixact.o access/transam/parallel.o access/transam/rmgr.o access/transam/slru.o access/transam/subtrans.o access/transam/timeline.o access/transam/transam.o access/transam/twophase.o access/transam/twophase_rmgr.o access/transam/varsup.o access/transam/xact.o access/transam/xlog.o access/transam/xlogarchive.o access/transam/xlogfuncs.o access/transam/xloginsert.o access/transam/xlogreader.o access/transam/xlogutils.o bootstrap/bootparse.o bootstrap/bootstrap.o catalog/aclchk.o catalog/catalog.o catalog/dependency.o catalog/heap.o catalog/index.o catalog/indexing.o catalog/namespace.o catalog/objectaccess.o catalog/objectaddress.o catalog/partition.o catalog/pg_aggregate.o catalog/pg_cast.o catalog/pg_collation.o catalog/pg_constraint.o catalog/pg_conversion.o catalog/pg_db_role_setting.o catalog/pg_depend.o catalog/pg_enum.o catalog/pg_inherits.o catalog/pg_largeobject.o catalog/pg_namespace.o catalog/pg_operator.o catalog/pg_proc.o catalog/pg_publication.o catalog/pg_range.o catalog/pg_shdepend.o catalog/pg_subscription.o catalog/pg_type.o catalog/storage.o catalog/toasting.o parser/analyze.o parser/gram.o parser/parse_agg.o parser/parse_clause.o parser/parse_coerce.o parser/parse_collate.o parser/parse_cte.o parser/parse_enr.o parser/parse_expr.o parser/parse_func.o parser/parse_node.o parser/parse_oper.o parser/parse_param.o parser/parse_relation.o parser/parse_target.o parser/parse_type.o parser/parse_utilcmd.o parser/parser.o parser/scan.o parser/scansup.o commands/aggregatecmds.o commands/alter.o commands/amcmds.o commands/analyze.o commands/async.o commands/cluster.o commands/collationcmds.o commands/comment.o commands/constraint.o commands/conversioncmds.o commands/copy.o commands/copyfrom.o commands/copyfromparse.o commands/copyto.o commands/createas.o commands/dbcommands.o commands/define.o commands/discard.o commands/dropcmds.o commands/event_trigger.o commands/explain.o commands/extension.o commands/foreigncmds.o commands/functioncmds.o commands/indexcmds.o commands/lockcmds.o commands/matview.o commands/opclasscmds.o commands/operatorcmds.o commands/policy.o commands/portalcmds.o commands/prepare.o commands/proclang.o commands/publicationcmds.o commands/schemacmds.o commands/seclabel.o commands/sequence.o commands/statscmds.o commands/subscriptioncmds.o commands/tablecmds.o commands/tablespace.o commands/trigger.o commands/tsearchcmds.o commands/typecmds.o commands/user.o commands/vacuum.o commands/variable.o commands/view.o executor/execAmi.o executor/execAsync.o executor/execCurrent.o executor/execExpr.o executor/execExprInterp.o executor/execGrouping.o executor/execIndexing.o executor/execJunk.o executor/execMain.o executor/execParallel.o executor/execPartition.o executor/execProcnode.o executor/execReplication.o executor/execSRF.o executor/execScan.o executor/execTuples.o executor/execUtils.o executor/functions.o executor/instrument.o executor/nodeAgg.o executor/nodeAppend.o executor/nodeBitmapAnd.o executor/nodeBitmapHeapscan.o executor/nodeBitmapIndexscan.o executor/nodeBitmapOr.o executor/nodeCtescan.o executor/nodeCustom.o executor/nodeForeignscan.o executor/nodeFunctionscan.o executor/nodeGather.o executor/nodeGatherMerge.o executor/nodeGroup.o executor/nodeHash.o executor/nodeHashjoin.o executor/nodeIncrementalSort.o executor/nodeIndexonlyscan.o executor/nodeIndexscan.o executor/nodeLimit.o executor/nodeLockRows.o executor/nodeMaterial.o executor/nodeMemoize.o executor/nodeMergeAppend.o executor/nodeMergejoin.o executor/nodeModifyTable.o executor/nodeNamedtuplestorescan.o executor/nodeNestloop.o executor/nodeProjectSet.o executor/nodeRecursiveunion.o executor/nodeResult.o executor/nodeSamplescan.o executor/nodeSeqscan.o executor/nodeSetOp.o executor/nodeSort.o executor/nodeSubplan.o executor/nodeSubqueryscan.o executor/nodeTableFuncscan.o executor/nodeTidrangescan.o executor/nodeTidscan.o executor/nodeUnique.o executor/nodeValuesscan.o executor/nodeWindowAgg.o executor/nodeWorktablescan.o executor/spi.o executor/tqueue.o executor/tstoreReceiver.o foreign/foreign.o lib/binaryheap.o lib/bipartite_match.o lib/bloomfilter.o lib/dshash.o lib/hyperloglog.o lib/ilist.o lib/integerset.o lib/knapsack.o lib/pairingheap.o lib/rbtree.o libpq/auth-scram.o libpq/auth.o libpq/be-fsstubs.o libpq/be-secure-common.o libpq/be-secure.o libpq/crypt.o libpq/hba.o libpq/ifaddr.o libpq/pqcomm.o libpq/pqformat.o libpq/pqmq.o libpq/pqsignal.o libpq/be-secure-openssl.o libpq/be-gssapi-common.o libpq/be-secure-gssapi.o main/main.o nodes/bitmapset.o nodes/copyfuncs.o nodes/equalfuncs.o nodes/extensible.o nodes/list.o nodes/makefuncs.o nodes/nodeFuncs.o nodes/nodes.o nodes/outfuncs.o nodes/params.o nodes/print.o nodes/read.o nodes/readfuncs.o nodes/tidbitmap.o nodes/value.o optimizer/geqo/geqo_copy.o optimizer/geqo/geqo_cx.o optimizer/geqo/geqo_erx.o optimizer/geqo/geqo_eval.o optimizer/geqo/geqo_main.o optimizer/geqo/geqo_misc.o optimizer/geqo/geqo_mutation.o optimizer/geqo/geqo_ox1.o optimizer/geqo/geqo_ox2.o optimizer/geqo/geqo_pmx.o optimizer/geqo/geqo_pool.o optimizer/geqo/geqo_px.o optimizer/geqo/geqo_random.o optimizer/geqo/geqo_recombination.o optimizer/geqo/geqo_selection.o optimizer/path/allpaths.o optimizer/path/clausesel.o optimizer/path/costsize.o optimizer/path/equivclass.o optimizer/path/indxpath.o optimizer/path/joinpath.o optimizer/path/joinrels.o optimizer/path/pathkeys.o optimizer/path/tidpath.o optimizer/plan/analyzejoins.o optimizer/plan/createplan.o optimizer/plan/initsplan.o optimizer/plan/planagg.o optimizer/plan/planmain.o optimizer/plan/planner.o optimizer/plan/setrefs.o optimizer/plan/subselect.o optimizer/prep/prepagg.o optimizer/prep/prepjointree.o optimizer/prep/prepqual.o optimizer/prep/preptlist.o optimizer/prep/prepunion.o optimizer/util/appendinfo.o optimizer/util/clauses.o optimizer/util/inherit.o optimizer/util/joininfo.o optimizer/util/orclauses.o optimizer/util/paramassign.o optimizer/util/pathnode.o optimizer/util/placeholder.o optimizer/util/plancat.o optimizer/util/predtest.o optimizer/util/relnode.o optimizer/util/restrictinfo.o optimizer/util/tlist.o optimizer/util/var.o partitioning/partbounds.o partitioning/partdesc.o partitioning/partprune.o port/atomics.o port/pg_sema.o port/pg_shmem.o postmaster/autovacuum.o postmaster/bgworker.o postmaster/bgwriter.o postmaster/checkpointer.o postmaster/fork_process.o postmaster/interrupt.o postmaster/pgarch.o postmaster/pgstat.o postmaster/postmaster.o postmaster/startup.o postmaster/syslogger.o postmaster/walwriter.o regex/regcomp.o regex/regerror.o regex/regexec.o regex/regexport.o regex/regfree.o regex/regprefix.o replication/logical/decode.o replication/logical/launcher.o replication/logical/logical.o replication/logical/logicalfuncs.o replication/logical/message.o replication/logical/origin.o replication/logical/proto.o replication/logical/relation.o replication/logical/reorderbuffer.o replication/logical/snapbuild.o replication/logical/tablesync.o replication/logical/worker.o replication/backup_manifest.o replication/basebackup.o replication/repl_gram.o replication/slot.o replication/slotfuncs.o replication/syncrep.o replication/syncrep_gram.o replication/walreceiver.o replication/walreceiverfuncs.o replication/walsender.o rewrite/rewriteDefine.o rewrite/rewriteHandler.o rewrite/rewriteManip.o rewrite/rewriteRemove.o rewrite/rewriteSearchCycle.o rewrite/rewriteSupport.o rewrite/rowsecurity.o statistics/dependencies.o statistics/extended_stats.o statistics/mcv.o statistics/mvdistinct.o storage/buffer/buf_init.o storage/buffer/buf_table.o storage/buffer/bufmgr.o storage/buffer/freelist.o storage/buffer/localbuf.o storage/file/buffile.o storage/file/copydir.o storage/file/fd.o storage/file/reinit.o storage/file/sharedfileset.o storage/freespace/freespace.o storage/freespace/fsmpage.o storage/freespace/indexfsm.o storage/ipc/barrier.o storage/ipc/dsm.o storage/ipc/dsm_impl.o storage/ipc/ipc.o storage/ipc/ipci.o storage/ipc/latch.o storage/ipc/pmsignal.o storage/ipc/procarray.o storage/ipc/procsignal.o storage/ipc/shm_mq.o storage/ipc/shm_toc.o storage/ipc/shmem.o storage/ipc/shmqueue.o storage/ipc/signalfuncs.o storage/ipc/sinval.o storage/ipc/sinvaladt.o storage/ipc/standby.o storage/large_object/inv_api.o storage/lmgr/condition_variable.o storage/lmgr/deadlock.o storage/lmgr/lmgr.o storage/lmgr/lock.o storage/lmgr/lwlock.o storage/lmgr/lwlocknames.o storage/lmgr/predicate.o storage/lmgr/proc.o storage/lmgr/s_lock.o storage/lmgr/spin.o storage/page/bufpage.o storage/page/checksum.o storage/page/itemptr.o storage/smgr/md.o storage/smgr/smgr.o storage/sync/sync.o tcop/cmdtag.o tcop/dest.o tcop/fastpath.o tcop/postgres.o tcop/pquery.o tcop/utility.o tsearch/dict.o tsearch/dict_ispell.o tsearch/dict_simple.o tsearch/dict_synonym.o tsearch/dict_thesaurus.o tsearch/regis.o tsearch/spell.o tsearch/to_tsany.o tsearch/ts_locale.o tsearch/ts_parse.o tsearch/ts_selfuncs.o tsearch/ts_typanalyze.o tsearch/ts_utils.o tsearch/wparser.o tsearch/wparser_def.o utils/activity/backend_progress.o utils/activity/backend_status.o utils/activity/wait_event.o utils/adt/acl.o utils/adt/amutils.o utils/adt/array_expanded.o utils/adt/array_selfuncs.o utils/adt/array_typanalyze.o utils/adt/array_userfuncs.o utils/adt/arrayfuncs.o utils/adt/arraysubs.o utils/adt/arrayutils.o utils/adt/ascii.o utils/adt/bool.o utils/adt/cash.o utils/adt/char.o utils/adt/cryptohashfuncs.o utils/adt/date.o utils/adt/datetime.o utils/adt/datum.o utils/adt/dbsize.o utils/adt/domains.o utils/adt/encode.o utils/adt/enum.o utils/adt/expandeddatum.o utils/adt/expandedrecord.o utils/adt/float.o utils/adt/format_type.o utils/adt/formatting.o utils/adt/genfile.o utils/adt/geo_ops.o utils/adt/geo_selfuncs.o utils/adt/geo_spgist.o utils/adt/inet_cidr_ntop.o utils/adt/inet_net_pton.o utils/adt/int.o utils/adt/int8.o utils/adt/json.o utils/adt/jsonb.o utils/adt/jsonb_gin.o utils/adt/jsonb_op.o utils/adt/jsonb_util.o utils/adt/jsonfuncs.o utils/adt/jsonbsubs.o utils/adt/jsonpath.o utils/adt/jsonpath_exec.o utils/adt/jsonpath_gram.o utils/adt/like.o utils/adt/like_support.o utils/adt/lockfuncs.o utils/adt/mac.o utils/adt/mac8.o utils/adt/mcxtfuncs.o utils/adt/misc.o utils/adt/multirangetypes.o utils/adt/multirangetypes_selfuncs.o utils/adt/name.o utils/adt/network.o utils/adt/network_gist.o utils/adt/network_selfuncs.o utils/adt/network_spgist.o utils/adt/numeric.o utils/adt/numutils.o utils/adt/oid.o utils/adt/oracle_compat.o utils/adt/orderedsetaggs.o utils/adt/partitionfuncs.o utils/adt/pg_locale.o utils/adt/pg_lsn.o utils/adt/pg_upgrade_support.o utils/adt/pgstatfuncs.o utils/adt/pseudotypes.o utils/adt/quote.o utils/adt/rangetypes.o utils/adt/rangetypes_gist.o utils/adt/rangetypes_selfuncs.o utils/adt/rangetypes_spgist.o utils/adt/rangetypes_typanalyze.o utils/adt/regexp.o utils/adt/regproc.o utils/adt/ri_triggers.o utils/adt/rowtypes.o utils/adt/ruleutils.o utils/adt/selfuncs.o utils/adt/tid.o utils/adt/timestamp.o utils/adt/trigfuncs.o utils/adt/tsginidx.o utils/adt/tsgistidx.o utils/adt/tsquery.o utils/adt/tsquery_cleanup.o utils/adt/tsquery_gist.o utils/adt/tsquery_op.o utils/adt/tsquery_rewrite.o utils/adt/tsquery_util.o utils/adt/tsrank.o utils/adt/tsvector.o utils/adt/tsvector_op.o utils/adt/tsvector_parser.o utils/adt/uuid.o utils/adt/varbit.o utils/adt/varchar.o utils/adt/varlena.o utils/adt/version.o utils/adt/windowfuncs.o utils/adt/xid.o utils/adt/xid8funcs.o utils/adt/xml.o utils/cache/attoptcache.o utils/cache/catcache.o utils/cache/evtcache.o utils/cache/inval.o utils/cache/lsyscache.o utils/cache/partcache.o utils/cache/plancache.o utils/cache/relcache.o utils/cache/relfilenodemap.o utils/cache/relmapper.o utils/cache/spccache.o utils/cache/syscache.o utils/cache/ts_cache.o utils/cache/typcache.o utils/error/assert.o utils/error/elog.o utils/fmgr/dfmgr.o utils/fmgr/fmgr.o utils/fmgr/funcapi.o utils/hash/dynahash.o utils/hash/pg_crc.o utils/init/globals.o utils/init/miscinit.o utils/init/postinit.o utils/mb/conv.o utils/mb/mbutils.o utils/mb/stringinfo_mb.o utils/mb/wstrcmp.o utils/mb/wstrncmp.o utils/misc/guc.o utils/misc/help_config.o utils/misc/pg_config.o utils/misc/pg_controldata.o utils/misc/pg_rusage.o utils/misc/ps_status.o utils/misc/queryenvironment.o utils/misc/queryjumble.o utils/misc/rls.o utils/misc/sampling.o utils/misc/superuser.o utils/misc/timeout.o utils/misc/tzparser.o utils/mmgr/aset.o utils/mmgr/dsa.o utils/mmgr/freepage.o utils/mmgr/generation.o utils/mmgr/mcxt.o utils/mmgr/memdebug.o utils/mmgr/portalmem.o utils/mmgr/slab.o utils/resowner/resowner.o utils/sort/logtape.o utils/sort/sharedtuplestore.o utils/sort/sortsupport.o utils/sort/tuplesort.o utils/sort/tuplestore.o utils/time/combocid.o utils/time/snapmgr.o utils/fmgrtab.o ../../src/timezone/localtime.o ../../src/timezone/pgtz.o ../../src/timezone/strftime.o jit/jit.o -o utils/probes.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection utils/probes.o access/brin/brin.o access/brin/brin_bloom.o access/brin/brin_inclusion.o access/brin/brin_minmax.o access/brin/brin_minmax_multi.o access/brin/brin_pageops.o access/brin/brin_revmap.o access/brin/brin_tuple.o access/brin/brin_validate.o access/brin/brin_xlog.o access/common/attmap.o access/common/bufmask.o access/common/detoast.o access/common/heaptuple.o access/common/indextuple.o access/common/printsimple.o access/common/printtup.o access/common/relation.o access/common/reloptions.o access/common/scankey.o access/common/session.o access/common/syncscan.o access/common/toast_compression.o access/common/toast_internals.o access/common/tupconvert.o access/common/tupdesc.o access/gin/ginarrayproc.o access/gin/ginbtree.o access/gin/ginbulk.o access/gin/gindatapage.o access/gin/ginentrypage.o access/gin/ginfast.o access/gin/ginget.o access/gin/gininsert.o access/gin/ginlogic.o access/gin/ginpostinglist.o access/gin/ginscan.o access/gin/ginutil.o access/gin/ginvacuum.o access/gin/ginvalidate.o access/gin/ginxlog.o access/gist/gist.o access/gist/gistbuild.o access/gist/gistbuildbuffers.o access/gist/gistget.o access/gist/gistproc.o access/gist/gistscan.o access/gist/gistsplit.o access/gist/gistutil.o access/gist/gistvacuum.o access/gist/gistvalidate.o access/gist/gistxlog.o access/hash/hash.o access/hash/hash_xlog.o access/hash/hashfunc.o access/hash/hashinsert.o access/hash/hashovfl.o access/hash/hashpage.o access/hash/hashsearch.o access/hash/hashsort.o access/hash/hashutil.o access/hash/hashvalidate.o access/heap/heapam.o access/heap/heapam_handler.o access/heap/heapam_visibility.o access/heap/heaptoast.o access/heap/hio.o access/heap/pruneheap.o access/heap/rewriteheap.o access/heap/vacuumlazy.o access/heap/visibilitymap.o access/index/amapi.o access/index/amvalidate.o access/index/genam.o access/index/indexam.o access/nbtree/nbtcompare.o access/nbtree/nbtdedup.o access/nbtree/nbtinsert.o access/nbtree/nbtpage.o access/nbtree/nbtree.o access/nbtree/nbtsearch.o access/nbtree/nbtsort.o access/nbtree/nbtsplitloc.o access/nbtree/nbtutils.o access/nbtree/nbtvalidate.o access/nbtree/nbtxlog.o access/rmgrdesc/brindesc.o access/rmgrdesc/clogdesc.o access/rmgrdesc/committsdesc.o access/rmgrdesc/dbasedesc.o access/rmgrdesc/genericdesc.o access/rmgrdesc/gindesc.o access/rmgrdesc/gistdesc.o access/rmgrdesc/hashdesc.o access/rmgrdesc/heapdesc.o access/rmgrdesc/logicalmsgdesc.o access/rmgrdesc/mxactdesc.o access/rmgrdesc/nbtdesc.o access/rmgrdesc/relmapdesc.o access/rmgrdesc/replorigindesc.o access/rmgrdesc/seqdesc.o access/rmgrdesc/smgrdesc.o access/rmgrdesc/spgdesc.o access/rmgrdesc/standbydesc.o access/rmgrdesc/tblspcdesc.o access/rmgrdesc/xactdesc.o access/rmgrdesc/xlogdesc.o access/spgist/spgdoinsert.o access/spgist/spginsert.o access/spgist/spgkdtreeproc.o access/spgist/spgproc.o access/spgist/spgquadtreeproc.o access/spgist/spgscan.o access/spgist/spgtextproc.o access/spgist/spgutils.o access/spgist/spgvacuum.o access/spgist/spgvalidate.o access/spgist/spgxlog.o access/table/table.o access/table/tableam.o access/table/tableamapi.o access/table/toast_helper.o access/tablesample/bernoulli.o access/tablesample/system.o access/tablesample/tablesample.o access/transam/clog.o access/transam/commit_ts.o access/transam/generic_xlog.o access/transam/multixact.o access/transam/parallel.o access/transam/rmgr.o access/transam/slru.o access/transam/subtrans.o access/transam/timeline.o access/transam/transam.o access/transam/twophase.o access/transam/twophase_rmgr.o access/transam/varsup.o access/transam/xact.o access/transam/xlog.o access/transam/xlogarchive.o access/transam/xlogfuncs.o access/transam/xloginsert.o access/transam/xlogreader.o access/transam/xlogutils.o bootstrap/bootparse.o bootstrap/bootstrap.o catalog/aclchk.o catalog/catalog.o catalog/dependency.o catalog/heap.o catalog/index.o catalog/indexing.o catalog/namespace.o catalog/objectaccess.o catalog/objectaddress.o catalog/partition.o catalog/pg_aggregate.o catalog/pg_cast.o catalog/pg_collation.o catalog/pg_constraint.o catalog/pg_conversion.o catalog/pg_db_role_setting.o catalog/pg_depend.o catalog/pg_enum.o catalog/pg_inherits.o catalog/pg_largeobject.o catalog/pg_namespace.o catalog/pg_operator.o catalog/pg_proc.o catalog/pg_publication.o catalog/pg_range.o catalog/pg_shdepend.o catalog/pg_subscription.o catalog/pg_type.o catalog/storage.o catalog/toasting.o parser/analyze.o parser/gram.o parser/parse_agg.o parser/parse_clause.o parser/parse_coerce.o parser/parse_collate.o parser/parse_cte.o parser/parse_enr.o parser/parse_expr.o parser/parse_func.o parser/parse_node.o parser/parse_oper.o parser/parse_param.o parser/parse_relation.o parser/parse_target.o parser/parse_type.o parser/parse_utilcmd.o parser/parser.o parser/scan.o parser/scansup.o commands/aggregatecmds.o commands/alter.o commands/amcmds.o commands/analyze.o commands/async.o commands/cluster.o commands/collationcmds.o commands/comment.o commands/constraint.o commands/conversioncmds.o commands/copy.o commands/copyfrom.o commands/copyfromparse.o commands/copyto.o commands/createas.o commands/dbcommands.o commands/define.o commands/discard.o commands/dropcmds.o commands/event_trigger.o commands/explain.o commands/extension.o commands/foreigncmds.o commands/functioncmds.o commands/indexcmds.o commands/lockcmds.o commands/matview.o commands/opclasscmds.o commands/operatorcmds.o commands/policy.o commands/portalcmds.o commands/prepare.o commands/proclang.o commands/publicationcmds.o commands/schemacmds.o commands/seclabel.o commands/sequence.o commands/statscmds.o commands/subscriptioncmds.o commands/tablecmds.o commands/tablespace.o commands/trigger.o commands/tsearchcmds.o commands/typecmds.o commands/user.o commands/vacuum.o commands/variable.o commands/view.o executor/execAmi.o executor/execAsync.o executor/execCurrent.o executor/execExpr.o executor/execExprInterp.o executor/execGrouping.o executor/execIndexing.o executor/execJunk.o executor/execMain.o executor/execParallel.o executor/execPartition.o executor/execProcnode.o executor/execReplication.o executor/execSRF.o executor/execScan.o executor/execTuples.o executor/execUtils.o executor/functions.o executor/instrument.o executor/nodeAgg.o executor/nodeAppend.o executor/nodeBitmapAnd.o executor/nodeBitmapHeapscan.o executor/nodeBitmapIndexscan.o executor/nodeBitmapOr.o executor/nodeCtescan.o executor/nodeCustom.o executor/nodeForeignscan.o executor/nodeFunctionscan.o executor/nodeGather.o executor/nodeGatherMerge.o executor/nodeGroup.o executor/nodeHash.o executor/nodeHashjoin.o executor/nodeIncrementalSort.o executor/nodeIndexonlyscan.o executor/nodeIndexscan.o executor/nodeLimit.o executor/nodeLockRows.o executor/nodeMaterial.o executor/nodeMemoize.o executor/nodeMergeAppend.o executor/nodeMergejoin.o executor/nodeModifyTable.o executor/nodeNamedtuplestorescan.o executor/nodeNestloop.o executor/nodeProjectSet.o executor/nodeRecursiveunion.o executor/nodeResult.o executor/nodeSamplescan.o executor/nodeSeqscan.o executor/nodeSetOp.o executor/nodeSort.o executor/nodeSubplan.o executor/nodeSubqueryscan.o executor/nodeTableFuncscan.o executor/nodeTidrangescan.o executor/nodeTidscan.o executor/nodeUnique.o executor/nodeValuesscan.o executor/nodeWindowAgg.o executor/nodeWorktablescan.o executor/spi.o executor/tqueue.o executor/tstoreReceiver.o foreign/foreign.o lib/binaryheap.o lib/bipartite_match.o lib/bloomfilter.o lib/dshash.o lib/hyperloglog.o lib/ilist.o lib/integerset.o lib/knapsack.o lib/pairingheap.o lib/rbtree.o libpq/auth-scram.o libpq/auth.o libpq/be-fsstubs.o libpq/be-secure-common.o libpq/be-secure.o libpq/crypt.o libpq/hba.o libpq/ifaddr.o libpq/pqcomm.o libpq/pqformat.o libpq/pqmq.o libpq/pqsignal.o libpq/be-secure-openssl.o libpq/be-gssapi-common.o libpq/be-secure-gssapi.o main/main.o nodes/bitmapset.o nodes/copyfuncs.o nodes/equalfuncs.o nodes/extensible.o nodes/list.o nodes/makefuncs.o nodes/nodeFuncs.o nodes/nodes.o nodes/outfuncs.o nodes/params.o nodes/print.o nodes/read.o nodes/readfuncs.o nodes/tidbitmap.o nodes/value.o optimizer/geqo/geqo_copy.o optimizer/geqo/geqo_cx.o optimizer/geqo/geqo_erx.o optimizer/geqo/geqo_eval.o optimizer/geqo/geqo_main.o optimizer/geqo/geqo_misc.o optimizer/geqo/geqo_mutation.o optimizer/geqo/geqo_ox1.o optimizer/geqo/geqo_ox2.o optimizer/geqo/geqo_pmx.o optimizer/geqo/geqo_pool.o optimizer/geqo/geqo_px.o optimizer/geqo/geqo_random.o optimizer/geqo/geqo_recombination.o optimizer/geqo/geqo_selection.o optimizer/path/allpaths.o optimizer/path/clausesel.o optimizer/path/costsize.o optimizer/path/equivclass.o optimizer/path/indxpath.o optimizer/path/joinpath.o optimizer/path/joinrels.o optimizer/path/pathkeys.o optimizer/path/tidpath.o optimizer/plan/analyzejoins.o optimizer/plan/createplan.o optimizer/plan/initsplan.o optimizer/plan/planagg.o optimizer/plan/planmain.o optimizer/plan/planner.o optimizer/plan/setrefs.o optimizer/plan/subselect.o optimizer/prep/prepagg.o optimizer/prep/prepjointree.o optimizer/prep/prepqual.o optimizer/prep/preptlist.o optimizer/prep/prepunion.o optimizer/util/appendinfo.o optimizer/util/clauses.o optimizer/util/inherit.o optimizer/util/joininfo.o optimizer/util/orclauses.o optimizer/util/paramassign.o optimizer/util/pathnode.o optimizer/util/placeholder.o optimizer/util/plancat.o optimizer/util/predtest.o optimizer/util/relnode.o optimizer/util/restrictinfo.o optimizer/util/tlist.o optimizer/util/var.o partitioning/partbounds.o partitioning/partdesc.o partitioning/partprune.o port/atomics.o port/pg_sema.o port/pg_shmem.o postmaster/autovacuum.o postmaster/bgworker.o postmaster/bgwriter.o postmaster/checkpointer.o postmaster/fork_process.o postmaster/interrupt.o postmaster/pgarch.o postmaster/pgstat.o postmaster/postmaster.o postmaster/startup.o postmaster/syslogger.o postmaster/walwriter.o regex/regcomp.o regex/regerror.o regex/regexec.o regex/regexport.o regex/regfree.o regex/regprefix.o replication/logical/decode.o replication/logical/launcher.o replication/logical/logical.o replication/logical/logicalfuncs.o replication/logical/message.o replication/logical/origin.o replication/logical/proto.o replication/logical/relation.o replication/logical/reorderbuffer.o replication/logical/snapbuild.o replication/logical/tablesync.o replication/logical/worker.o replication/backup_manifest.o replication/basebackup.o replication/repl_gram.o replication/slot.o replication/slotfuncs.o replication/syncrep.o replication/syncrep_gram.o replication/walreceiver.o replication/walreceiverfuncs.o replication/walsender.o rewrite/rewriteDefine.o rewrite/rewriteHandler.o rewrite/rewriteManip.o rewrite/rewriteRemove.o rewrite/rewriteSearchCycle.o rewrite/rewriteSupport.o rewrite/rowsecurity.o statistics/dependencies.o statistics/extended_stats.o statistics/mcv.o statistics/mvdistinct.o storage/buffer/buf_init.o storage/buffer/buf_table.o storage/buffer/bufmgr.o storage/buffer/freelist.o storage/buffer/localbuf.o storage/file/buffile.o storage/file/copydir.o storage/file/fd.o storage/file/reinit.o storage/file/sharedfileset.o storage/freespace/freespace.o storage/freespace/fsmpage.o storage/freespace/indexfsm.o storage/ipc/barrier.o storage/ipc/dsm.o storage/ipc/dsm_impl.o storage/ipc/ipc.o storage/ipc/ipci.o storage/ipc/latch.o storage/ipc/pmsignal.o storage/ipc/procarray.o storage/ipc/procsignal.o storage/ipc/shm_mq.o storage/ipc/shm_toc.o storage/ipc/shmem.o storage/ipc/shmqueue.o storage/ipc/signalfuncs.o storage/ipc/sinval.o storage/ipc/sinvaladt.o storage/ipc/standby.o storage/large_object/inv_api.o storage/lmgr/condition_variable.o storage/lmgr/deadlock.o storage/lmgr/lmgr.o storage/lmgr/lock.o storage/lmgr/lwlock.o storage/lmgr/lwlocknames.o storage/lmgr/predicate.o storage/lmgr/proc.o storage/lmgr/s_lock.o storage/lmgr/spin.o storage/page/bufpage.o storage/page/checksum.o storage/page/itemptr.o storage/smgr/md.o storage/smgr/smgr.o storage/sync/sync.o tcop/cmdtag.o tcop/dest.o tcop/fastpath.o tcop/postgres.o tcop/pquery.o tcop/utility.o tsearch/dict.o tsearch/dict_ispell.o tsearch/dict_simple.o tsearch/dict_synonym.o tsearch/dict_thesaurus.o tsearch/regis.o tsearch/spell.o tsearch/to_tsany.o tsearch/ts_locale.o tsearch/ts_parse.o tsearch/ts_selfuncs.o tsearch/ts_typanalyze.o tsearch/ts_utils.o tsearch/wparser.o tsearch/wparser_def.o utils/activity/backend_progress.o utils/activity/backend_status.o utils/activity/wait_event.o utils/adt/acl.o utils/adt/amutils.o utils/adt/array_expanded.o utils/adt/array_selfuncs.o utils/adt/array_typanalyze.o utils/adt/array_userfuncs.o utils/adt/arrayfuncs.o utils/adt/arraysubs.o utils/adt/arrayutils.o utils/adt/ascii.o utils/adt/bool.o utils/adt/cash.o utils/adt/char.o utils/adt/cryptohashfuncs.o utils/adt/date.o utils/adt/datetime.o utils/adt/datum.o utils/adt/dbsize.o utils/adt/domains.o utils/adt/encode.o utils/adt/enum.o utils/adt/expandeddatum.o utils/adt/expandedrecord.o utils/adt/float.o utils/adt/format_type.o utils/adt/formatting.o utils/adt/genfile.o utils/adt/geo_ops.o utils/adt/geo_selfuncs.o utils/adt/geo_spgist.o utils/adt/inet_cidr_ntop.o utils/adt/inet_net_pton.o utils/adt/int.o utils/adt/int8.o utils/adt/json.o utils/adt/jsonb.o utils/adt/jsonb_gin.o utils/adt/jsonb_op.o utils/adt/jsonb_util.o utils/adt/jsonfuncs.o utils/adt/jsonbsubs.o utils/adt/jsonpath.o utils/adt/jsonpath_exec.o utils/adt/jsonpath_gram.o utils/adt/like.o utils/adt/like_support.o utils/adt/lockfuncs.o utils/adt/mac.o utils/adt/mac8.o utils/adt/mcxtfuncs.o utils/adt/misc.o utils/adt/multirangetypes.o utils/adt/multirangetypes_selfuncs.o utils/adt/name.o utils/adt/network.o utils/adt/network_gist.o utils/adt/network_selfuncs.o utils/adt/network_spgist.o utils/adt/numeric.o utils/adt/numutils.o utils/adt/oid.o utils/adt/oracle_compat.o utils/adt/orderedsetaggs.o utils/adt/partitionfuncs.o utils/adt/pg_locale.o utils/adt/pg_lsn.o utils/adt/pg_upgrade_support.o utils/adt/pgstatfuncs.o utils/adt/pseudotypes.o utils/adt/quote.o utils/adt/rangetypes.o utils/adt/rangetypes_gist.o utils/adt/rangetypes_selfuncs.o utils/adt/rangetypes_spgist.o utils/adt/rangetypes_typanalyze.o utils/adt/regexp.o utils/adt/regproc.o utils/adt/ri_triggers.o utils/adt/rowtypes.o utils/adt/ruleutils.o utils/adt/selfuncs.o utils/adt/tid.o utils/adt/timestamp.o utils/adt/trigfuncs.o utils/adt/tsginidx.o utils/adt/tsgistidx.o utils/adt/tsquery.o utils/adt/tsquery_cleanup.o utils/adt/tsquery_gist.o utils/adt/tsquery_op.o utils/adt/tsquery_rewrite.o utils/adt/tsquery_util.o utils/adt/tsrank.o utils/adt/tsvector.o utils/adt/tsvector_op.o utils/adt/tsvector_parser.o utils/adt/uuid.o utils/adt/varbit.o utils/adt/varchar.o utils/adt/varlena.o utils/adt/version.o utils/adt/windowfuncs.o utils/adt/xid.o utils/adt/xid8funcs.o utils/adt/xml.o utils/cache/attoptcache.o utils/cache/catcache.o utils/cache/evtcache.o utils/cache/inval.o utils/cache/lsyscache.o utils/cache/partcache.o utils/cache/plancache.o utils/cache/relcache.o utils/cache/relfilenodemap.o utils/cache/relmapper.o utils/cache/spccache.o utils/cache/syscache.o utils/cache/ts_cache.o utils/cache/typcache.o utils/error/assert.o utils/error/elog.o utils/fmgr/dfmgr.o utils/fmgr/fmgr.o utils/fmgr/funcapi.o utils/hash/dynahash.o utils/hash/pg_crc.o utils/init/globals.o utils/init/miscinit.o utils/init/postinit.o utils/mb/conv.o utils/mb/mbutils.o utils/mb/stringinfo_mb.o utils/mb/wstrcmp.o utils/mb/wstrncmp.o utils/misc/guc.o utils/misc/help_config.o utils/misc/pg_config.o utils/misc/pg_controldata.o utils/misc/pg_rusage.o utils/misc/ps_status.o utils/misc/queryenvironment.o utils/misc/queryjumble.o utils/misc/rls.o utils/misc/sampling.o utils/misc/superuser.o utils/misc/timeout.o utils/misc/tzparser.o utils/mmgr/aset.o utils/mmgr/dsa.o utils/mmgr/freepage.o utils/mmgr/generation.o utils/mmgr/mcxt.o utils/mmgr/memdebug.o utils/mmgr/portalmem.o utils/mmgr/slab.o utils/resowner/resowner.o utils/sort/logtape.o utils/sort/sharedtuplestore.o utils/sort/sortsupport.o utils/sort/tuplesort.o utils/sort/tuplestore.o utils/time/combocid.o utils/time/snapmgr.o utils/fmgrtab.o ../../src/timezone/localtime.o ../../src/timezone/pgtz.o ../../src/timezone/strftime.o jit/jit.o ../../src/common/libpgcommon_srv.a ../../src/port/libpgport_srv.a -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -Wl,-E -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lm -lldap -licui18n -licuuc -licudata -lsystemd -o postgres make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend' /usr/bin/make -C backend/utils/mb/conversion_procs all /usr/bin/make -C cyrillic_and_mic all /usr/bin/make -C euc_cn_and_mic all /usr/bin/make -C euc_jp_and_sjis all /usr/bin/make -C euc_kr_and_mic all /usr/bin/make -C euc_tw_and_big5 all /usr/bin/make -C latin2_and_win1250 all /usr/bin/make -C latin_and_mic all /usr/bin/make -C utf8_and_big5 all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/latin2_and_win1250' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o latin2_and_win1250.o latin2_and_win1250.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/latin2_and_win1250' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/latin_and_mic' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o latin_and_mic.o latin_and_mic.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/latin_and_mic' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/euc_cn_and_mic' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o euc_cn_and_mic.o euc_cn_and_mic.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/euc_cn_and_mic' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/euc_kr_and_mic' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o euc_kr_and_mic.o euc_kr_and_mic.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/euc_kr_and_mic' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/euc_tw_and_big5' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o big5.o big5.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/euc_tw_and_big5' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/cyrillic_and_mic' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o cyrillic_and_mic.o cyrillic_and_mic.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/cyrillic_and_mic' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_big5' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o utf8_and_big5.o utf8_and_big5.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_big5' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/latin2_and_win1250' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o latin2_and_win1250.so latin2_and_win1250.o -L../../../../../../src/port -L../../../../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/latin2_and_win1250' /usr/bin/make -C utf8_and_cyrillic all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/euc_kr_and_mic' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o euc_kr_and_mic.so euc_kr_and_mic.o -L../../../../../../src/port -L../../../../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/euc_kr_and_mic' /usr/bin/make -C utf8_and_euc_cn all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/euc_cn_and_mic' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o euc_cn_and_mic.so euc_cn_and_mic.o -L../../../../../../src/port -L../../../../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/euc_cn_and_mic' /usr/bin/make -C utf8_and_euc_jp all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/latin_and_mic' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o latin_and_mic.so latin_and_mic.o -L../../../../../../src/port -L../../../../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/latin_and_mic' /usr/bin/make -C utf8_and_euc_kr all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/euc_jp_and_sjis' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o euc_jp_and_sjis.o euc_jp_and_sjis.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/euc_jp_and_sjis' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/cyrillic_and_mic' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o cyrillic_and_mic.so cyrillic_and_mic.o -L../../../../../../src/port -L../../../../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/cyrillic_and_mic' /usr/bin/make -C utf8_and_euc_tw all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/euc_tw_and_big5' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o euc_tw_and_big5.o euc_tw_and_big5.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/euc_tw_and_big5' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_big5' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o utf8_and_big5.so utf8_and_big5.o -L../../../../../../src/port -L../../../../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_big5' /usr/bin/make -C utf8_and_gb18030 all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_cyrillic' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o utf8_and_cyrillic.o utf8_and_cyrillic.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_cyrillic' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_euc_cn' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o utf8_and_euc_cn.o utf8_and_euc_cn.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_euc_cn' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_euc_jp' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o utf8_and_euc_jp.o utf8_and_euc_jp.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_euc_jp' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_euc_kr' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o utf8_and_euc_kr.o utf8_and_euc_kr.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_euc_kr' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_cyrillic' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o utf8_and_cyrillic.so utf8_and_cyrillic.o -L../../../../../../src/port -L../../../../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_cyrillic' /usr/bin/make -C utf8_and_gbk all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/euc_jp_and_sjis' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o euc_jp_and_sjis.so euc_jp_and_sjis.o -L../../../../../../src/port -L../../../../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/euc_jp_and_sjis' /usr/bin/make -C utf8_and_iso8859 all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_euc_tw' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o utf8_and_euc_tw.o utf8_and_euc_tw.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_euc_tw' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/euc_tw_and_big5' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o euc_tw_and_big5.so big5.o euc_tw_and_big5.o -L../../../../../../src/port -L../../../../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/euc_tw_and_big5' /usr/bin/make -C utf8_and_iso8859_1 all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_euc_cn' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o utf8_and_euc_cn.so utf8_and_euc_cn.o -L../../../../../../src/port -L../../../../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_euc_cn' /usr/bin/make -C utf8_and_johab all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_euc_jp' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o utf8_and_euc_jp.so utf8_and_euc_jp.o -L../../../../../../src/port -L../../../../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_euc_jp' /usr/bin/make -C utf8_and_sjis all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_euc_kr' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o utf8_and_euc_kr.so utf8_and_euc_kr.o -L../../../../../../src/port -L../../../../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_euc_kr' /usr/bin/make -C utf8_and_win all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_iso8859' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o utf8_and_iso8859.o utf8_and_iso8859.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_iso8859' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_euc_tw' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o utf8_and_euc_tw.so utf8_and_euc_tw.o -L../../../../../../src/port -L../../../../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_euc_tw' /usr/bin/make -C utf8_and_uhc all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_iso8859_1' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o utf8_and_iso8859_1.o utf8_and_iso8859_1.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_iso8859_1' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_gbk' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o utf8_and_gbk.o utf8_and_gbk.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_gbk' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_gb18030' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o utf8_and_gb18030.o utf8_and_gb18030.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_gb18030' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_win' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o utf8_and_win.o utf8_and_win.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_win' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_sjis' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o utf8_and_sjis.o utf8_and_sjis.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_sjis' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_johab' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o utf8_and_johab.o utf8_and_johab.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_johab' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_iso8859' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o utf8_and_iso8859.so utf8_and_iso8859.o -L../../../../../../src/port -L../../../../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_iso8859' /usr/bin/make -C utf8_and_euc2004 all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_iso8859_1' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o utf8_and_iso8859_1.so utf8_and_iso8859_1.o -L../../../../../../src/port -L../../../../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_iso8859_1' /usr/bin/make -C utf8_and_sjis2004 all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_win' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o utf8_and_win.so utf8_and_win.o -L../../../../../../src/port -L../../../../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_win' /usr/bin/make -C euc2004_sjis2004 all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_gbk' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o utf8_and_gbk.so utf8_and_gbk.o -L../../../../../../src/port -L../../../../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_gbk' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_sjis' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o utf8_and_sjis.so utf8_and_sjis.o -L../../../../../../src/port -L../../../../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_sjis' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_uhc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o utf8_and_uhc.o utf8_and_uhc.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_uhc' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_johab' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o utf8_and_johab.so utf8_and_johab.o -L../../../../../../src/port -L../../../../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_johab' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_gb18030' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o utf8_and_gb18030.so utf8_and_gb18030.o -L../../../../../../src/port -L../../../../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_gb18030' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/euc2004_sjis2004' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o euc2004_sjis2004.o euc2004_sjis2004.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/euc2004_sjis2004' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_sjis2004' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o utf8_and_sjis2004.o utf8_and_sjis2004.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_sjis2004' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_euc2004' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o utf8_and_euc2004.o utf8_and_euc2004.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_euc2004' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_uhc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o utf8_and_uhc.so utf8_and_uhc.o -L../../../../../../src/port -L../../../../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_uhc' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_euc2004' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o utf8_and_euc2004.so utf8_and_euc2004.o -L../../../../../../src/port -L../../../../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_euc2004' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/euc2004_sjis2004' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o euc2004_sjis2004.so euc2004_sjis2004.o -L../../../../../../src/port -L../../../../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/euc2004_sjis2004' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_sjis2004' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o utf8_and_sjis2004.so utf8_and_sjis2004.o -L../../../../../../src/port -L../../../../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils/mb/conversion_procs/utf8_and_sjis2004' /usr/bin/make -C backend/snowball all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o api.o ./libstemmer/api.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_ISO_8859_1_danish.o ./libstemmer/stem_ISO_8859_1_danish.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_ISO_8859_1_basque.o ./libstemmer/stem_ISO_8859_1_basque.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_ISO_8859_1_catalan.o ./libstemmer/stem_ISO_8859_1_catalan.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_ISO_8859_1_dutch.o ./libstemmer/stem_ISO_8859_1_dutch.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o dict_snowball.o dict_snowball.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_ISO_8859_1_english.o ./libstemmer/stem_ISO_8859_1_english.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o utilities.o ./libstemmer/utilities.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_ISO_8859_1_german.o ./libstemmer/stem_ISO_8859_1_german.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_ISO_8859_1_irish.o ./libstemmer/stem_ISO_8859_1_irish.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_ISO_8859_1_indonesian.o ./libstemmer/stem_ISO_8859_1_indonesian.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_ISO_8859_1_finnish.o ./libstemmer/stem_ISO_8859_1_finnish.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_ISO_8859_1_norwegian.o ./libstemmer/stem_ISO_8859_1_norwegian.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_ISO_8859_1_french.o ./libstemmer/stem_ISO_8859_1_french.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_ISO_8859_1_italian.o ./libstemmer/stem_ISO_8859_1_italian.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_ISO_8859_1_swedish.o ./libstemmer/stem_ISO_8859_1_swedish.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_ISO_8859_1_porter.o ./libstemmer/stem_ISO_8859_1_porter.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_ISO_8859_1_portuguese.o ./libstemmer/stem_ISO_8859_1_portuguese.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_ISO_8859_2_hungarian.o ./libstemmer/stem_ISO_8859_2_hungarian.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_ISO_8859_1_spanish.o ./libstemmer/stem_ISO_8859_1_spanish.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_ISO_8859_2_romanian.o ./libstemmer/stem_ISO_8859_2_romanian.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_UTF_8_armenian.o ./libstemmer/stem_UTF_8_armenian.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_KOI8_R_russian.o ./libstemmer/stem_KOI8_R_russian.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_UTF_8_danish.o ./libstemmer/stem_UTF_8_danish.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_UTF_8_basque.o ./libstemmer/stem_UTF_8_basque.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_UTF_8_catalan.o ./libstemmer/stem_UTF_8_catalan.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_UTF_8_dutch.o ./libstemmer/stem_UTF_8_dutch.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_UTF_8_arabic.o ./libstemmer/stem_UTF_8_arabic.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_UTF_8_finnish.o ./libstemmer/stem_UTF_8_finnish.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_UTF_8_hindi.o ./libstemmer/stem_UTF_8_hindi.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_UTF_8_english.o ./libstemmer/stem_UTF_8_english.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_UTF_8_german.o ./libstemmer/stem_UTF_8_german.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_UTF_8_french.o ./libstemmer/stem_UTF_8_french.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_UTF_8_irish.o ./libstemmer/stem_UTF_8_irish.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_UTF_8_hungarian.o ./libstemmer/stem_UTF_8_hungarian.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_UTF_8_nepali.o ./libstemmer/stem_UTF_8_nepali.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_UTF_8_indonesian.o ./libstemmer/stem_UTF_8_indonesian.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_UTF_8_lithuanian.o ./libstemmer/stem_UTF_8_lithuanian.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_UTF_8_norwegian.o ./libstemmer/stem_UTF_8_norwegian.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_UTF_8_italian.o ./libstemmer/stem_UTF_8_italian.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_UTF_8_russian.o ./libstemmer/stem_UTF_8_russian.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_UTF_8_portuguese.o ./libstemmer/stem_UTF_8_portuguese.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_UTF_8_romanian.o ./libstemmer/stem_UTF_8_romanian.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_UTF_8_porter.o ./libstemmer/stem_UTF_8_porter.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_UTF_8_swedish.o ./libstemmer/stem_UTF_8_swedish.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_UTF_8_greek.o ./libstemmer/stem_UTF_8_greek.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_UTF_8_spanish.o ./libstemmer/stem_UTF_8_spanish.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_UTF_8_yiddish.o ./libstemmer/stem_UTF_8_yiddish.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_UTF_8_tamil.o ./libstemmer/stem_UTF_8_tamil.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' echo '-- Language-specific snowball dictionaries' > snowball_create.sql cat ./snowball_func.sql.in >> snowball_create.sql make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_UTF_8_serbian.o ./libstemmer/stem_UTF_8_serbian.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include/snowball -I../../../src/include/snowball/libstemmer -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stem_UTF_8_turkish.o ./libstemmer/stem_UTF_8_turkish.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o dict_snowball.so api.o dict_snowball.o utilities.o stem_ISO_8859_1_basque.o stem_ISO_8859_1_catalan.o stem_ISO_8859_1_danish.o stem_ISO_8859_1_dutch.o stem_ISO_8859_1_english.o stem_ISO_8859_1_finnish.o stem_ISO_8859_1_french.o stem_ISO_8859_1_german.o stem_ISO_8859_1_indonesian.o stem_ISO_8859_1_irish.o stem_ISO_8859_1_italian.o stem_ISO_8859_1_norwegian.o stem_ISO_8859_1_porter.o stem_ISO_8859_1_portuguese.o stem_ISO_8859_1_spanish.o stem_ISO_8859_1_swedish.o stem_ISO_8859_2_hungarian.o stem_ISO_8859_2_romanian.o stem_KOI8_R_russian.o stem_UTF_8_arabic.o stem_UTF_8_armenian.o stem_UTF_8_basque.o stem_UTF_8_catalan.o stem_UTF_8_danish.o stem_UTF_8_dutch.o stem_UTF_8_english.o stem_UTF_8_finnish.o stem_UTF_8_french.o stem_UTF_8_german.o stem_UTF_8_greek.o stem_UTF_8_hindi.o stem_UTF_8_hungarian.o stem_UTF_8_indonesian.o stem_UTF_8_irish.o stem_UTF_8_italian.o stem_UTF_8_lithuanian.o stem_UTF_8_nepali.o stem_UTF_8_norwegian.o stem_UTF_8_porter.o stem_UTF_8_portuguese.o stem_UTF_8_romanian.o stem_UTF_8_russian.o stem_UTF_8_serbian.o stem_UTF_8_spanish.o stem_UTF_8_swedish.o stem_UTF_8_tamil.o stem_UTF_8_turkish.o stem_UTF_8_yiddish.o -L../../../src/port -L../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/snowball' /usr/bin/make -C include all make[2]: Nothing to be done for 'all'. /usr/bin/make -C interfaces all /usr/bin/make -C libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' /usr/bin/msgfmt -c -o po/cs.mo po/cs.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' /usr/bin/msgfmt -c -o po/de.mo po/de.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' /usr/bin/msgfmt -c -o po/el.mo po/el.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' /usr/bin/msgfmt -c -o po/es.mo po/es.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' /usr/bin/msgfmt -c -o po/ru.mo po/ru.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' /usr/bin/make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' /usr/bin/msgfmt -c -o po/fr.mo po/fr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' /usr/bin/msgfmt -c -o po/ja.mo po/ja.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' /usr/bin/msgfmt -c -o po/sv.mo po/sv.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' /usr/bin/msgfmt -c -o po/ko.mo po/ko.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' /usr/bin/msgfmt -c -o po/uk.mo po/uk.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' /usr/bin/msgfmt -c -o po/zh_CN.mo po/zh_CN.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[4]: Nothing to be done for 'all'. make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -pthread -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -fPIC -DFRONTEND -DUNSAFE_STAT_OK -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -I../../../src/port -I../../../src/port -DSO_MAJOR_VERSION=private14-5 -c -o fe-secure.o fe-secure.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -pthread -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -fPIC -DFRONTEND -DUNSAFE_STAT_OK -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -I../../../src/port -I../../../src/port -DSO_MAJOR_VERSION=private14-5 -c -o fe-auth-scram.o fe-auth-scram.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -pthread -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -fPIC -DFRONTEND -DUNSAFE_STAT_OK -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -I../../../src/port -I../../../src/port -DSO_MAJOR_VERSION=private14-5 -c -o fe-lobj.o fe-lobj.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -pthread -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -fPIC -DFRONTEND -DUNSAFE_STAT_OK -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -I../../../src/port -I../../../src/port -DSO_MAJOR_VERSION=private14-5 -c -o fe-misc.o fe-misc.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -pthread -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -fPIC -DFRONTEND -DUNSAFE_STAT_OK -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -I../../../src/port -I../../../src/port -DSO_MAJOR_VERSION=private14-5 -c -o legacy-pqsignal.o legacy-pqsignal.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -pthread -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -fPIC -DFRONTEND -DUNSAFE_STAT_OK -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -I../../../src/port -I../../../src/port -DSO_MAJOR_VERSION=private14-5 -c -o fe-print.o fe-print.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -pthread -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -fPIC -DFRONTEND -DUNSAFE_STAT_OK -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -I../../../src/port -I../../../src/port -DSO_MAJOR_VERSION=private14-5 -c -o pqexpbuffer.o pqexpbuffer.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -pthread -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -fPIC -DFRONTEND -DUNSAFE_STAT_OK -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -I../../../src/port -I../../../src/port -DSO_MAJOR_VERSION=private14-5 -c -o fe-protocol3.o fe-protocol3.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -pthread -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -fPIC -DFRONTEND -DUNSAFE_STAT_OK -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -I../../../src/port -I../../../src/port -DSO_MAJOR_VERSION=private14-5 -c -o libpq-events.o libpq-events.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -pthread -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -fPIC -DFRONTEND -DUNSAFE_STAT_OK -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -I../../../src/port -I../../../src/port -DSO_MAJOR_VERSION=private14-5 -c -o fe-secure-common.o fe-secure-common.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' ( echo '{ global:'; gawk '/^[^#]/ {printf "%s;\n",$1}' exports.txt; echo ' local: *; };' ) >exports.list make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -pthread -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -fPIC -DFRONTEND -DUNSAFE_STAT_OK -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -I../../../src/port -I../../../src/port -DSO_MAJOR_VERSION=private14-5 -c -o fe-trace.o fe-trace.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' echo 'Name: libpq' >libpq.pc echo 'Description: PostgreSQL libpq library' >>libpq.pc echo 'Url: https://www.postgresql.org/' >>libpq.pc echo 'Version: 14.3' >>libpq.pc echo 'Requires: ' >>libpq.pc echo 'Requires.private: libssl libcrypto' >>libpq.pc echo 'Cflags: -I/usr/include' >>libpq.pc echo 'Libs: -L/usr/lib64 -lpq' >>libpq.pc echo 'Libs.private: -L/usr/lib64 -lpgcommon -lpgport -lgssapi_krb5 -lm -lldap' >>libpq.pc make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -pthread -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -fPIC -DFRONTEND -DUNSAFE_STAT_OK -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -I../../../src/port -I../../../src/port -DSO_MAJOR_VERSION=private14-5 -c -o fe-auth.o fe-auth.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -pthread -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -fPIC -DFRONTEND -DUNSAFE_STAT_OK -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -I../../../src/port -I../../../src/port -DSO_MAJOR_VERSION=private14-5 -c -o fe-gssapi-common.o fe-gssapi-common.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -pthread -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -fPIC -DFRONTEND -DUNSAFE_STAT_OK -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -I../../../src/port -I../../../src/port -DSO_MAJOR_VERSION=private14-5 -c -o fe-exec.o fe-exec.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -pthread -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -fPIC -DFRONTEND -DUNSAFE_STAT_OK -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -I../../../src/port -I../../../src/port -DSO_MAJOR_VERSION=private14-5 -c -o fe-secure-gssapi.o fe-secure-gssapi.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -pthread -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -fPIC -DFRONTEND -DUNSAFE_STAT_OK -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -I../../../src/port -I../../../src/port -DSO_MAJOR_VERSION=private14-5 -c -o fe-secure-openssl.o fe-secure-openssl.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -pthread -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -fPIC -DFRONTEND -DUNSAFE_STAT_OK -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -I../../../src/port -I../../../src/port -DSO_MAJOR_VERSION=private14-5 -c -o fe-connect.o fe-connect.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' rm -f libpq.a ar crs libpq.a fe-auth-scram.o fe-connect.o fe-exec.o fe-lobj.o fe-misc.o fe-print.o fe-protocol3.o fe-secure.o fe-trace.o legacy-pqsignal.o libpq-events.o pqexpbuffer.o fe-auth.o fe-secure-common.o fe-secure-openssl.o fe-gssapi-common.o fe-secure-gssapi.o ranlib libpq.a touch libpq.a make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -pthread -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -fPIC -shared -Wl,-soname,libpq.so.private14-5 -Wl,--version-script=exports.list -o libpq.so.private14-5.14 fe-auth-scram.o fe-connect.o fe-exec.o fe-lobj.o fe-misc.o fe-print.o fe-protocol3.o fe-secure.o fe-trace.o legacy-pqsignal.o libpq-events.o pqexpbuffer.o fe-auth.o fe-secure-common.o fe-secure-openssl.o fe-gssapi-common.o fe-secure-gssapi.o -L../../../src/port -L../../../src/common -lpgcommon_shlib -lpgport_shlib -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lssl -lcrypto -lgssapi_krb5 -lm -lldap rm -f libpq.so.private14-5 ln -s libpq.so.private14-5.14 libpq.so.private14-5 rm -f libpq.so ln -s libpq.so.private14-5.14 libpq.so make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' /usr/bin/make -C backend/replication/libpqwalreceiver all /usr/bin/make -C ../../../../src/interfaces/libpq all /usr/bin/make -C ../../../src/port all make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[4]: Nothing to be done for 'all'. make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/libpqwalreceiver' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I../../../../src/interfaces/libpq -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o libpqwalreceiver.o libpqwalreceiver.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/libpqwalreceiver' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/libpqwalreceiver' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o libpqwalreceiver.so libpqwalreceiver.o -L../../../../src/port -L../../../../src/common -L../../../../src/interfaces/libpq -lpq -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/libpqwalreceiver' /usr/bin/make -C backend/replication/pgoutput all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/pgoutput' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pgoutput.o pgoutput.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/pgoutput' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/pgoutput' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o pgoutput.so pgoutput.o -L../../../../src/port -L../../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/replication/pgoutput' /usr/bin/make -C fe_utils all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/fe_utils' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../src/interfaces/libpq -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o option_utils.o option_utils.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/fe_utils' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/fe_utils' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../src/interfaces/libpq -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o cancel.o cancel.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/fe_utils' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/fe_utils' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../src/interfaces/libpq -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o conditional.o conditional.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/fe_utils' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/fe_utils' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../src/interfaces/libpq -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o archive.o archive.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/fe_utils' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/fe_utils' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../src/interfaces/libpq -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o connect_utils.o connect_utils.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/fe_utils' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/fe_utils' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../src/interfaces/libpq -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o mbprint.o mbprint.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/fe_utils' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/fe_utils' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../src/interfaces/libpq -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o parallel_slot.o parallel_slot.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/fe_utils' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/fe_utils' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../src/interfaces/libpq -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o query_utils.o query_utils.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/fe_utils' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/fe_utils' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../src/interfaces/libpq -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o simple_list.o simple_list.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/fe_utils' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/fe_utils' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../src/interfaces/libpq -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o recovery_gen.o recovery_gen.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/fe_utils' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/fe_utils' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../src/interfaces/libpq -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o string_utils.o string_utils.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/fe_utils' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/fe_utils' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../src/interfaces/libpq -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o psqlscan.o psqlscan.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/fe_utils' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/fe_utils' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../src/interfaces/libpq -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o print.o print.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/fe_utils' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/fe_utils' rm -f libpgfeutils.a ar crs libpgfeutils.a archive.o cancel.o conditional.o connect_utils.o mbprint.o option_utils.o parallel_slot.o print.o psqlscan.o query_utils.o recovery_gen.o simple_list.o string_utils.o make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/fe_utils' /usr/bin/make -C bin all /usr/bin/make -C initdb all /usr/bin/make -C pg_amcheck all /usr/bin/make -C pg_archivecleanup all /usr/bin/make -C pg_basebackup all /usr/bin/make -C pg_checksums all /usr/bin/make -C pg_config all /usr/bin/make -C pg_controldata all /usr/bin/make -C pg_ctl all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_archivecleanup' /usr/bin/msgfmt -c -o po/cs.mo po/cs.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_archivecleanup' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' /usr/bin/msgfmt -c -o po/cs.mo po/cs.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_checksums' /usr/bin/msgfmt -c -o po/cs.mo po/cs.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_checksums' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_amcheck' /usr/bin/msgfmt -c -o po/de.mo po/de.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_amcheck' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/initdb' /usr/bin/msgfmt -c -o po/cs.mo po/cs.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/initdb' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_controldata' /usr/bin/msgfmt -c -o po/cs.mo po/cs.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_controldata' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_archivecleanup' /usr/bin/msgfmt -c -o po/de.mo po/de.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_archivecleanup' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_ctl' /usr/bin/msgfmt -c -o po/cs.mo po/cs.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_ctl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' /usr/bin/msgfmt -c -o po/cs.mo po/cs.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_checksums' /usr/bin/msgfmt -c -o po/de.mo po/de.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_checksums' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' /usr/bin/msgfmt -c -o po/de.mo po/de.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_amcheck' /usr/bin/msgfmt -c -o po/el.mo po/el.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_amcheck' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/initdb' /usr/bin/msgfmt -c -o po/de.mo po/de.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/initdb' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_archivecleanup' /usr/bin/msgfmt -c -o po/el.mo po/el.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_archivecleanup' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_controldata' /usr/bin/msgfmt -c -o po/de.mo po/de.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_controldata' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_checksums' /usr/bin/msgfmt -c -o po/el.mo po/el.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_checksums' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_ctl' /usr/bin/msgfmt -c -o po/de.mo po/de.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_ctl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' /usr/bin/msgfmt -c -o po/el.mo po/el.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_amcheck' /usr/bin/msgfmt -c -o po/es.mo po/es.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_amcheck' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_archivecleanup' /usr/bin/msgfmt -c -o po/es.mo po/es.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_archivecleanup' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' /usr/bin/msgfmt -c -o po/de.mo po/de.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_controldata' /usr/bin/msgfmt -c -o po/el.mo po/el.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_controldata' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/initdb' /usr/bin/msgfmt -c -o po/el.mo po/el.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/initdb' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_checksums' /usr/bin/msgfmt -c -o po/es.mo po/es.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_checksums' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' /usr/bin/msgfmt -c -o po/es.mo po/es.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_amcheck' /usr/bin/msgfmt -c -o po/fr.mo po/fr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_amcheck' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_archivecleanup' /usr/bin/msgfmt -c -o po/fr.mo po/fr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_archivecleanup' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_ctl' /usr/bin/msgfmt -c -o po/el.mo po/el.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_ctl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' /usr/bin/msgfmt -c -o po/fr.mo po/fr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' /usr/bin/msgfmt -c -o po/el.mo po/el.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_controldata' /usr/bin/msgfmt -c -o po/es.mo po/es.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_controldata' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_amcheck' /usr/bin/msgfmt -c -o po/ja.mo po/ja.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_amcheck' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_archivecleanup' /usr/bin/msgfmt -c -o po/ja.mo po/ja.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_archivecleanup' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_checksums' /usr/bin/msgfmt -c -o po/fr.mo po/fr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_checksums' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/initdb' /usr/bin/msgfmt -c -o po/es.mo po/es.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/initdb' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_ctl' /usr/bin/msgfmt -c -o po/es.mo po/es.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_ctl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' /usr/bin/msgfmt -c -o po/he.mo po/he.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_controldata' /usr/bin/msgfmt -c -o po/fr.mo po/fr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_controldata' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_archivecleanup' /usr/bin/msgfmt -c -o po/ko.mo po/ko.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_archivecleanup' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_amcheck' /usr/bin/msgfmt -c -o po/ru.mo po/ru.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_amcheck' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_checksums' /usr/bin/msgfmt -c -o po/ja.mo po/ja.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_checksums' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' /usr/bin/msgfmt -c -o po/es.mo po/es.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' /usr/bin/msgfmt -c -o po/it.mo po/it.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/initdb' /usr/bin/msgfmt -c -o po/fr.mo po/fr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/initdb' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_checksums' /usr/bin/msgfmt -c -o po/ko.mo po/ko.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_checksums' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_amcheck' /usr/bin/msgfmt -c -o po/sv.mo po/sv.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_amcheck' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_archivecleanup' /usr/bin/msgfmt -c -o po/ru.mo po/ru.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_archivecleanup' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' /usr/bin/msgfmt -c -o po/ja.mo po/ja.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_controldata' /usr/bin/msgfmt -c -o po/it.mo po/it.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_controldata' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_ctl' /usr/bin/msgfmt -c -o po/fr.mo po/fr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_ctl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/initdb' /usr/bin/msgfmt -c -o po/ja.mo po/ja.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/initdb' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' /usr/bin/msgfmt -c -o po/fr.mo po/fr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_checksums' /usr/bin/msgfmt -c -o po/ru.mo po/ru.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_checksums' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_amcheck' /usr/bin/msgfmt -c -o po/uk.mo po/uk.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_amcheck' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_archivecleanup' /usr/bin/msgfmt -c -o po/sv.mo po/sv.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_archivecleanup' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_controldata' /usr/bin/msgfmt -c -o po/ja.mo po/ja.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_controldata' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' /usr/bin/msgfmt -c -o po/ko.mo po/ko.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_checksums' /usr/bin/msgfmt -c -o po/sv.mo po/sv.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_checksums' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_amcheck' /usr/bin/msgfmt -c -o po/zh_CN.mo po/zh_CN.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_amcheck' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_ctl' /usr/bin/msgfmt -c -o po/it.mo po/it.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_ctl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/initdb' /usr/bin/msgfmt -c -o po/ko.mo po/ko.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/initdb' /usr/bin/make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_archivecleanup' /usr/bin/msgfmt -c -o po/tr.mo po/tr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_archivecleanup' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' /usr/bin/msgfmt -c -o po/pl.mo po/pl.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_controldata' /usr/bin/msgfmt -c -o po/ko.mo po/ko.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_controldata' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' /usr/bin/msgfmt -c -o po/ja.mo po/ja.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_checksums' /usr/bin/msgfmt -c -o po/tr.mo po/tr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_checksums' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_ctl' /usr/bin/msgfmt -c -o po/ja.mo po/ja.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_ctl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/initdb' /usr/bin/msgfmt -c -o po/ru.mo po/ru.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/initdb' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' /usr/bin/msgfmt -c -o po/pt_BR.mo po/pt_BR.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_archivecleanup' /usr/bin/msgfmt -c -o po/uk.mo po/uk.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_archivecleanup' /usr/bin/make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_controldata' /usr/bin/msgfmt -c -o po/ru.mo po/ru.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_controldata' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_checksums' /usr/bin/msgfmt -c -o po/uk.mo po/uk.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_checksums' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' /usr/bin/msgfmt -c -o po/ru.mo po/ru.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_archivecleanup' /usr/bin/msgfmt -c -o po/zh_CN.mo po/zh_CN.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_archivecleanup' /usr/bin/make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/initdb' /usr/bin/msgfmt -c -o po/sv.mo po/sv.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/initdb' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_ctl' /usr/bin/msgfmt -c -o po/ko.mo po/ko.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_ctl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_controldata' /usr/bin/msgfmt -c -o po/sv.mo po/sv.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_controldata' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_checksums' /usr/bin/msgfmt -c -o po/zh_CN.mo po/zh_CN.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_checksums' /usr/bin/make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' /usr/bin/msgfmt -c -o po/ko.mo po/ko.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' make[5]: Nothing to be done for 'all'. /usr/bin/msgfmt -c -o po/sv.mo po/sv.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' /usr/bin/make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_controldata' /usr/bin/msgfmt -c -o po/tr.mo po/tr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_controldata' make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' /usr/bin/msgfmt -c -o po/tr.mo po/tr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' make[4]: Nothing to be done for 'all'. make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/initdb' /usr/bin/msgfmt -c -o po/tr.mo po/tr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/initdb' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_ctl' /usr/bin/msgfmt -c -o po/ru.mo po/ru.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_ctl' /usr/bin/make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_controldata' /usr/bin/msgfmt -c -o po/uk.mo po/uk.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_controldata' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' /usr/bin/msgfmt -c -o po/ru.mo po/ru.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' /usr/bin/msgfmt -c -o po/uk.mo po/uk.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' make[5]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_ctl' /usr/bin/msgfmt -c -o po/sv.mo po/sv.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_ctl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/initdb' /usr/bin/msgfmt -c -o po/uk.mo po/uk.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/initdb' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_controldata' /usr/bin/msgfmt -c -o po/zh_CN.mo po/zh_CN.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_controldata' /usr/bin/make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' /usr/bin/msgfmt -c -o po/vi.mo po/vi.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' make[4]: Nothing to be done for 'all'. make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' /usr/bin/msgfmt -c -o po/zh_CN.mo po/zh_CN.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' /usr/bin/make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_ctl' /usr/bin/msgfmt -c -o po/tr.mo po/tr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_ctl' make[4]: Nothing to be done for 'all'. make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/initdb' /usr/bin/msgfmt -c -o po/zh_CN.mo po/zh_CN.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/initdb' /usr/bin/make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' /usr/bin/msgfmt -c -o po/sv.mo po/sv.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_ctl' /usr/bin/msgfmt -c -o po/uk.mo po/uk.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_ctl' make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' /usr/bin/msgfmt -c -o po/tr.mo po/tr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' /usr/bin/make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_ctl' /usr/bin/msgfmt -c -o po/zh_CN.mo po/zh_CN.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_ctl' /usr/bin/make -C ../../../src/port all make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/port all make[4]: Nothing to be done for 'all'. make[4]: Nothing to be done for 'all'. make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' /usr/bin/msgfmt -c -o po/uk.mo po/uk.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[5]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' /usr/bin/msgfmt -c -o po/zh_CN.mo po/zh_CN.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' /usr/bin/make -C ../../../src/interfaces/libpq all make[5]: Nothing to be done for 'all'. make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/port all make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/fe_utils all /usr/bin/make -C ../../../src/port all make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[4]: Nothing to be done for 'all'. make[5]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/port all make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[5]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/port all make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/fe_utils all make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[4]: Nothing to be done for 'all'. make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/port all make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/fe_utils all make[4]: Nothing to be done for 'all'. make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_config.o pg_config.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_controldata' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_controldata.o pg_controldata.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_controldata' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_archivecleanup' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_archivecleanup.o pg_archivecleanup.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_archivecleanup' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_checksums' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_checksums.o pg_checksums.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_checksums' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/initdb' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../../src/interfaces/libpq -I../../../src/timezone -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 '-DSYSTEMTZDIR="/usr/share/zoneinfo"' -c -o findtimezone.o findtimezone.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/initdb' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_ctl' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_ctl.o pg_ctl.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_ctl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_amcheck' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_amcheck.o pg_amcheck.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_amcheck' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_basebackup.o pg_basebackup.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection pg_config.o -L../../../src/port -L../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o pg_server_config make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_config' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_archivecleanup' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection pg_archivecleanup.o -L../../../src/port -L../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o pg_archivecleanup make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_archivecleanup' /usr/bin/make -C pg_dump all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' /usr/bin/msgfmt -c -o po/cs.mo po/cs.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_controldata' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection pg_controldata.o -L../../../src/port -L../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o pg_controldata make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_controldata' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' /usr/bin/msgfmt -c -o po/de.mo po/de.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' /usr/bin/msgfmt -c -o po/el.mo po/el.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' /usr/bin/msgfmt -c -o po/es.mo po/es.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' /usr/bin/msgfmt -c -o po/fr.mo po/fr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' /usr/bin/msgfmt -c -o po/ja.mo po/ja.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' /usr/bin/msgfmt -c -o po/ko.mo po/ko.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' /usr/bin/make -C pg_resetwal all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' /usr/bin/msgfmt -c -o po/ru.mo po/ru.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_resetwal' /usr/bin/msgfmt -c -o po/cs.mo po/cs.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_resetwal' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' /usr/bin/msgfmt -c -o po/sv.mo po/sv.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_resetwal' /usr/bin/msgfmt -c -o po/de.mo po/de.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_resetwal' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_resetwal' /usr/bin/msgfmt -c -o po/el.mo po/el.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_resetwal' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/initdb' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../../src/interfaces/libpq -I../../../src/timezone -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 '-DSYSTEMTZDIR="/usr/share/zoneinfo"' -c -o initdb.o initdb.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/initdb' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_resetwal' /usr/bin/msgfmt -c -o po/es.mo po/es.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_resetwal' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' /usr/bin/msgfmt -c -o po/tr.mo po/tr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_resetwal' /usr/bin/msgfmt -c -o po/fr.mo po/fr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_resetwal' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/initdb' rm -f localtime.c && ln -s ../../../src/timezone/localtime.c . make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/initdb' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' /usr/bin/msgfmt -c -o po/uk.mo po/uk.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_resetwal' /usr/bin/msgfmt -c -o po/ja.mo po/ja.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_resetwal' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_resetwal' /usr/bin/msgfmt -c -o po/ko.mo po/ko.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_resetwal' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' /usr/bin/msgfmt -c -o po/zh_CN.mo po/zh_CN.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' /usr/bin/make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_resetwal' /usr/bin/msgfmt -c -o po/ru.mo po/ru.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_resetwal' /usr/bin/make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_resetwal' /usr/bin/msgfmt -c -o po/sv.mo po/sv.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_resetwal' make[5]: Nothing to be done for 'all'. make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_resetwal' /usr/bin/msgfmt -c -o po/tr.mo po/tr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_resetwal' /usr/bin/make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o streamutil.o streamutil.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_resetwal' /usr/bin/make -C ../../../src/port all /usr/bin/msgfmt -c -o po/uk.mo po/uk.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_resetwal' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_checksums' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection pg_checksums.o -L../../../src/port -L../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o pg_checksums make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_checksums' /usr/bin/make -C pg_rewind all make[5]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_resetwal' /usr/bin/msgfmt -c -o po/zh_CN.mo po/zh_CN.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_resetwal' /usr/bin/make -C ../../../src/port all make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' /usr/bin/msgfmt -c -o po/cs.mo po/cs.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' make[4]: Nothing to be done for 'all'. make[4]: Nothing to be done for 'all'. /usr/bin/make -C pg_test_fsync all make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/fe_utils all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' /usr/bin/msgfmt -c -o po/de.mo po/de.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' make[4]: Nothing to be done for 'all'. make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o receivelog.o receivelog.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' /usr/bin/msgfmt -c -o po/el.mo po/el.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_fsync' /usr/bin/msgfmt -c -o po/cs.mo po/cs.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_fsync' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_fsync' /usr/bin/msgfmt -c -o po/de.mo po/de.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_fsync' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' /usr/bin/msgfmt -c -o po/es.mo po/es.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_fsync' /usr/bin/msgfmt -c -o po/el.mo po/el.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_fsync' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_fsync' /usr/bin/msgfmt -c -o po/es.mo po/es.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_fsync' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' /usr/bin/msgfmt -c -o po/fr.mo po/fr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_fsync' /usr/bin/msgfmt -c -o po/fr.mo po/fr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_fsync' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' /usr/bin/msgfmt -c -o po/ja.mo po/ja.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_fsync' /usr/bin/msgfmt -c -o po/ja.mo po/ja.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_fsync' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_fsync' /usr/bin/msgfmt -c -o po/ko.mo po/ko.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_fsync' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' /usr/bin/msgfmt -c -o po/ru.mo po/ru.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_fsync' /usr/bin/msgfmt -c -o po/pl.mo po/pl.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_fsync' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' /usr/bin/msgfmt -c -o po/sv.mo po/sv.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_fsync' /usr/bin/msgfmt -c -o po/ru.mo po/ru.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_fsync' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' /usr/bin/msgfmt -c -o po/uk.mo po/uk.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_fsync' /usr/bin/msgfmt -c -o po/sv.mo po/sv.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_fsync' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' /usr/bin/msgfmt -c -o po/zh_CN.mo po/zh_CN.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' /usr/bin/make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_fsync' /usr/bin/msgfmt -c -o po/tr.mo po/tr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_fsync' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_fsync' /usr/bin/msgfmt -c -o po/uk.mo po/uk.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_fsync' /usr/bin/make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_fsync' /usr/bin/msgfmt -c -o po/vi.mo po/vi.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_fsync' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_fsync' /usr/bin/msgfmt -c -o po/zh_CN.mo po/zh_CN.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_fsync' /usr/bin/make -C ../../../src/port all make[5]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[5]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/port all make[4]: Nothing to be done for 'all'. make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[4]: Nothing to be done for 'all'. make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -DFRONTEND -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o datapagemap.o datapagemap.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_ctl' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection pg_ctl.o -L../../../src/port -L../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o pg_ctl make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_ctl' /usr/bin/make -C pg_test_timing all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_timing' /usr/bin/msgfmt -c -o po/de.mo po/de.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_timing' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_timing' /usr/bin/msgfmt -c -o po/el.mo po/el.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_timing' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_timing' /usr/bin/msgfmt -c -o po/es.mo po/es.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_timing' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_timing' /usr/bin/msgfmt -c -o po/fr.mo po/fr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_timing' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_timing' /usr/bin/msgfmt -c -o po/ja.mo po/ja.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_timing' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_timing' /usr/bin/msgfmt -c -o po/ru.mo po/ru.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_timing' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o walmethods.o walmethods.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_timing' /usr/bin/msgfmt -c -o po/sv.mo po/sv.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_timing' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_timing' /usr/bin/msgfmt -c -o po/uk.mo po/uk.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_timing' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_fsync' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_test_fsync.o pg_test_fsync.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_fsync' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_timing' /usr/bin/msgfmt -c -o po/zh_CN.mo po/zh_CN.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_timing' /usr/bin/make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_resetwal' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_resetwal.o pg_resetwal.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_resetwal' make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[4]: Nothing to be done for 'all'. make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -DFRONTEND -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o file_ops.o file_ops.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_amcheck' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection pg_amcheck.o -L../../../src/port -L../../../src/common -L../../../src/fe_utils -lpgfeutils -L../../../src/common -lpgcommon -L../../../src/port -lpgport -L../../../src/interfaces/libpq -lpq -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o pg_amcheck make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_amcheck' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_timing' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_test_timing.o pg_test_timing.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_timing' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/initdb' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../../src/interfaces/libpq -I../../../src/timezone -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 '-DSYSTEMTZDIR="/usr/share/zoneinfo"' -c -o localtime.o localtime.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/initdb' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_receivewal.o pg_receivewal.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -DFRONTEND -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o filemap.o filemap.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o common.o common.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_recvlogical.o pg_recvlogical.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -DFRONTEND -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o libpq_source.o libpq_source.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_fsync' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection pg_test_fsync.o -L../../../src/port -L../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o pg_test_fsync make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_fsync' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_timing' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection pg_test_timing.o -L../../../src/port -L../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o pg_test_timing make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_test_timing' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -DFRONTEND -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o local_source.o local_source.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_resetwal' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection pg_resetwal.o -L../../../src/port -L../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o pg_resetwal make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_resetwal' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o compress_io.o compress_io.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_dump_sort.o pg_dump_sort.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -DFRONTEND -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o parsexlog.o parsexlog.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o dumputils.o dumputils.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o parallel.o parallel.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -DFRONTEND -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_rewind.o pg_rewind.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -DFRONTEND -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o timeline.o timeline.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' rm -f xlogreader.c && ln -s ../../../src/backend/access/transam/xlogreader.c . make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_backup_custom.o pg_backup_custom.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_backup_db.o pg_backup_db.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -DFRONTEND -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o xlogreader.o xlogreader.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_backup_directory.o pg_backup_directory.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' /usr/bin/make -C pg_upgrade all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' /usr/bin/msgfmt -c -o po/cs.mo po/cs.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' /usr/bin/msgfmt -c -o po/de.mo po/de.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' /usr/bin/msgfmt -c -o po/es.mo po/es.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/initdb' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection findtimezone.o initdb.o localtime.o -L../../../src/port -L../../../src/common -L../../../src/fe_utils -lpgfeutils -L../../../src/common -lpgcommon -L../../../src/port -lpgport -L../../../src/interfaces/libpq -lpq -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o initdb make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/initdb' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' /usr/bin/msgfmt -c -o po/fr.mo po/fr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' /usr/bin/msgfmt -c -o po/ja.mo po/ja.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' /usr/bin/msgfmt -c -o po/ko.mo po/ko.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' /usr/bin/msgfmt -c -o po/ru.mo po/ru.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' /usr/bin/msgfmt -c -o po/sv.mo po/sv.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection pg_recvlogical.o receivelog.o streamutil.o walmethods.o -L../../../src/port -L../../../src/common -L../../../src/fe_utils -lpgfeutils -L../../../src/common -lpgcommon -L../../../src/port -lpgport -L../../../src/interfaces/libpq -lpq -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o pg_recvlogical make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' /usr/bin/msgfmt -c -o po/tr.mo po/tr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' /usr/bin/make -C pg_verifybackup all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' /usr/bin/msgfmt -c -o po/uk.mo po/uk.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' /usr/bin/msgfmt -c -o po/zh_CN.mo po/zh_CN.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' /usr/bin/make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_verifybackup' /usr/bin/msgfmt -c -o po/de.mo po/de.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_verifybackup' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_verifybackup' /usr/bin/msgfmt -c -o po/el.mo po/el.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_verifybackup' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_verifybackup' /usr/bin/msgfmt -c -o po/es.mo po/es.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_verifybackup' /usr/bin/make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_verifybackup' /usr/bin/msgfmt -c -o po/fr.mo po/fr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_verifybackup' make[5]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_verifybackup' /usr/bin/msgfmt -c -o po/ja.mo po/ja.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_verifybackup' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_verifybackup' /usr/bin/msgfmt -c -o po/ko.mo po/ko.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_verifybackup' make[5]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_verifybackup' /usr/bin/msgfmt -c -o po/ru.mo po/ru.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_verifybackup' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_verifybackup' /usr/bin/msgfmt -c -o po/sv.mo po/sv.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_verifybackup' make[4]: Nothing to be done for 'all'. make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection pg_receivewal.o receivelog.o streamutil.o walmethods.o -L../../../src/port -L../../../src/common -L../../../src/fe_utils -lpgfeutils -L../../../src/common -lpgcommon -L../../../src/port -lpgport -L../../../src/interfaces/libpq -lpq -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o pg_receivewal make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' /usr/bin/make -C ../../../src/common all /usr/bin/make -C pg_waldump all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_verifybackup' /usr/bin/msgfmt -c -o po/uk.mo po/uk.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_verifybackup' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_verifybackup' /usr/bin/msgfmt -c -o po/zh_CN.mo po/zh_CN.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_verifybackup' /usr/bin/make -C ../../../src/interfaces/libpq all make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' /usr/bin/msgfmt -c -o po/cs.mo po/cs.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' /usr/bin/make -C ../../../src/port all make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' /usr/bin/msgfmt -c -o po/de.mo po/de.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' /usr/bin/msgfmt -c -o po/el.mo po/el.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[5]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/fe_utils all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' /usr/bin/msgfmt -c -o po/es.mo po/es.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[5]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/port all make[4]: Nothing to be done for 'all'. make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' /usr/bin/msgfmt -c -o po/fr.mo po/fr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' /usr/bin/msgfmt -c -o po/ja.mo po/ja.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_backup_null.o pg_backup_null.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' /usr/bin/msgfmt -c -o po/ko.mo po/ko.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' /usr/bin/make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' /usr/bin/msgfmt -c -o po/ru.mo po/ru.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[4]: Nothing to be done for 'all'. make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' /usr/bin/msgfmt -c -o po/sv.mo po/sv.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' /usr/bin/msgfmt -c -o po/tr.mo po/tr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_backup_archiver.o pg_backup_archiver.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' /usr/bin/msgfmt -c -o po/uk.mo po/uk.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' /usr/bin/msgfmt -c -o po/zh_CN.mo po/zh_CN.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' /usr/bin/make -C ../../../src/port all make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/fe_utils all make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[4]: Nothing to be done for 'all'. make[4]: Nothing to be done for 'all'. make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' rm -f brindesc.c && ln -s ../../../src/backend/access/rmgrdesc/brindesc.c . make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' rm -f clogdesc.c && ln -s ../../../src/backend/access/rmgrdesc/clogdesc.c . make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' rm -f committsdesc.c && ln -s ../../../src/backend/access/rmgrdesc/committsdesc.c . make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' rm -f dbasedesc.c && ln -s ../../../src/backend/access/rmgrdesc/dbasedesc.c . make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' rm -f genericdesc.c && ln -s ../../../src/backend/access/rmgrdesc/genericdesc.c . make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' rm -f gindesc.c && ln -s ../../../src/backend/access/rmgrdesc/gindesc.c . make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' rm -f gistdesc.c && ln -s ../../../src/backend/access/rmgrdesc/gistdesc.c . make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' rm -f hashdesc.c && ln -s ../../../src/backend/access/rmgrdesc/hashdesc.c . make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DDLSUFFIX=\".so\" -I. -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o dump.o dump.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' rm -f heapdesc.c && ln -s ../../../src/backend/access/rmgrdesc/heapdesc.c . make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' rm -f logicalmsgdesc.c && ln -s ../../../src/backend/access/rmgrdesc/logicalmsgdesc.c . make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' rm -f mxactdesc.c && ln -s ../../../src/backend/access/rmgrdesc/mxactdesc.c . make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' rm -f nbtdesc.c && ln -s ../../../src/backend/access/rmgrdesc/nbtdesc.c . make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' rm -f relmapdesc.c && ln -s ../../../src/backend/access/rmgrdesc/relmapdesc.c . make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' rm -f replorigindesc.c && ln -s ../../../src/backend/access/rmgrdesc/replorigindesc.c . make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' rm -f seqdesc.c && ln -s ../../../src/backend/access/rmgrdesc/seqdesc.c . make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' rm -f smgrdesc.c && ln -s ../../../src/backend/access/rmgrdesc/smgrdesc.c . make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' rm -f spgdesc.c && ln -s ../../../src/backend/access/rmgrdesc/spgdesc.c . make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' rm -f standbydesc.c && ln -s ../../../src/backend/access/rmgrdesc/standbydesc.c . make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' rm -f tblspcdesc.c && ln -s ../../../src/backend/access/rmgrdesc/tblspcdesc.c . make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' rm -f xactdesc.c && ln -s ../../../src/backend/access/rmgrdesc/xactdesc.c . make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' rm -f xlogdesc.c && ln -s ../../../src/backend/access/rmgrdesc/xlogdesc.c . make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_verifybackup' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o parse_manifest.o parse_manifest.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_verifybackup' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DDLSUFFIX=\".so\" -I. -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o check.o check.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DDLSUFFIX=\".so\" -I. -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o controldata.o controldata.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection pg_basebackup.o receivelog.o streamutil.o walmethods.o -L../../../src/port -L../../../src/common -L../../../src/fe_utils -lpgfeutils -L../../../src/common -lpgcommon -L../../../src/port -lpgport -L../../../src/interfaces/libpq -lpq -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o pg_basebackup make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_basebackup' /usr/bin/make -C pgbench all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o compat.o compat.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' /usr/bin/make -C ../../../src/interfaces/libpq all /usr/bin/make -C ../../../src/port all make[5]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[5]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/port all make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/port all make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/fe_utils all make[4]: Nothing to be done for 'all'. make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_backup_tar.o pg_backup_tar.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DDLSUFFIX=\".so\" -I. -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o exec.o exec.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DDLSUFFIX=\".so\" -I. -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o file.o file.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' /usr/bin/make -C psql all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' /usr/bin/msgfmt -c -o po/cs.mo po/cs.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_verifybackup' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_verifybackup.o pg_verifybackup.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_verifybackup' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' /usr/bin/msgfmt -c -o po/de.mo po/de.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' /usr/bin/msgfmt -c -o po/el.mo po/el.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' /usr/bin/msgfmt -c -o po/es.mo po/es.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DDLSUFFIX=\".so\" -I. -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o function.o function.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' /usr/bin/msgfmt -c -o po/fr.mo po/fr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' /usr/bin/msgfmt -c -o po/it.mo po/it.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_waldump.o pg_waldump.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' /usr/bin/msgfmt -c -o po/ja.mo po/ja.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' /usr/bin/msgfmt -c -o po/ko.mo po/ko.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' /usr/bin/msgfmt -c -o po/ru.mo po/ru.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' /usr/bin/msgfmt -c -o po/sv.mo po/sv.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' /usr/bin/msgfmt -c -o po/tr.mo po/tr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o rmgrdesc.o rmgrdesc.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' rm -f xlogreader.c && ln -s ../../../src/backend/access/transam/xlogreader.c . make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' /usr/bin/msgfmt -c -o po/uk.mo po/uk.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' /usr/bin/msgfmt -c -o po/zh_CN.mo po/zh_CN.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' /usr/bin/make -C ../../../src/interfaces/libpq all /usr/bin/make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DDLSUFFIX=\".so\" -I. -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o info.o info.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' make[5]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[5]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/port all make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o brindesc.o brindesc.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/fe_utils all make[4]: Nothing to be done for 'all'. make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o clogdesc.o clogdesc.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pgbench' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -pthread -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -I. -I. -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o exprparse.o exprparse.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pgbench' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DDLSUFFIX=\".so\" -I. -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o option.o option.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o committsdesc.o committsdesc.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o dbasedesc.o dbasedesc.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DDLSUFFIX=\".so\" -I. -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o parallel.o parallel.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o genericdesc.o genericdesc.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DDLSUFFIX=\".so\" -I. -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_upgrade.o pg_upgrade.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o gindesc.o gindesc.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_dump.o pg_dump.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o gistdesc.o gistdesc.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_backup_utils.o pg_backup_utils.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DDLSUFFIX=\".so\" -I. -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o relfilenode.o relfilenode.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o hashdesc.o hashdesc.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DDLSUFFIX=\".so\" -I. -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o server.o server.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_restore.o pg_restore.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection datapagemap.o file_ops.o filemap.o libpq_source.o local_source.o parsexlog.o pg_rewind.o timeline.o xlogreader.o -L../../../src/port -L../../../src/common -L../../../src/fe_utils -lpgfeutils -L../../../src/common -lpgcommon -L../../../src/port -lpgport -L../../../src/interfaces/libpq -lpq -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o pg_rewind make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_rewind' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o heapdesc.o heapdesc.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DDLSUFFIX=\".so\" -I. -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tablespace.o tablespace.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DDLSUFFIX=\".so\" -I. -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o util.o util.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o logicalmsgdesc.o logicalmsgdesc.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o common.o common.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o mxactdesc.o mxactdesc.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o copy.o copy.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DDLSUFFIX=\".so\" -I. -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o version.o version.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o nbtdesc.o nbtdesc.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o relmapdesc.o relmapdesc.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' /usr/bin/make -C scripts all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' /usr/bin/msgfmt -c -o po/cs.mo po/cs.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' /usr/bin/msgfmt -c -o po/de.mo po/de.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' /usr/bin/msgfmt -c -o po/el.mo po/el.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' /usr/bin/msgfmt -c -o po/es.mo po/es.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' /usr/bin/msgfmt -c -o po/fr.mo po/fr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o command.o command.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o replorigindesc.o replorigindesc.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' /usr/bin/msgfmt -c -o po/ja.mo po/ja.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_dumpall.o pg_dumpall.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' /usr/bin/msgfmt -c -o po/ko.mo po/ko.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' /usr/bin/msgfmt -c -o po/ru.mo po/ru.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o crosstabview.o crosstabview.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' /usr/bin/msgfmt -c -o po/sv.mo po/sv.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' /usr/bin/msgfmt -c -o po/tr.mo po/tr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' /usr/bin/msgfmt -c -o po/uk.mo po/uk.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pgbench' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -pthread -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -I. -I. -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pgbench.o pgbench.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pgbench' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' /usr/bin/msgfmt -c -o po/zh_CN.mo po/zh_CN.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' /usr/bin/make -C ../../../src/interfaces/libpq all /usr/bin/make -C ../../../src/port all make[5]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_verifybackup' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection parse_manifest.o pg_verifybackup.o -L../../../src/port -L../../../src/common -L../../../src/fe_utils -lpgfeutils -L../../../src/common -lpgcommon -L../../../src/port -lpgport -L../../../src/interfaces/libpq -lpq -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o pg_verifybackup make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_verifybackup' make[5]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/port all make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/port all make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/fe_utils all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o seqdesc.o seqdesc.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[4]: Nothing to be done for 'all'. make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o smgrdesc.o smgrdesc.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o createdb.o createdb.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o spgdesc.o spgdesc.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o help.o help.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o common.o common.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o standbydesc.o standbydesc.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tblspcdesc.o tblspcdesc.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o createuser.o createuser.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o dropdb.o dropdb.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o xactdesc.o xactdesc.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o dropuser.o dropuser.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o xlogdesc.o xlogdesc.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o clusterdb.o clusterdb.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o vacuumdb.o vacuumdb.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -DFRONTEND -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o xlogreader.o xlogreader.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o reindexdb.o reindexdb.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o describe.o describe.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_isready.o pg_isready.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o input.o input.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection pg_dumpall.o dumputils.o -L../../../src/port -L../../../src/common -L../../../src/fe_utils -lpgfeutils -L../../../src/common -lpgcommon -L../../../src/port -lpgport -L../../../src/interfaces/libpq -lpq -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o pg_dumpall make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection check.o controldata.o dump.o exec.o file.o function.o info.o option.o parallel.o pg_upgrade.o relfilenode.o server.o tablespace.o util.o version.o -L../../../src/port -L../../../src/common -L../../../src/fe_utils -lpgfeutils -L../../../src/common -lpgcommon -L../../../src/port -lpgport -L../../../src/interfaces/libpq -lpq -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o pg_upgrade make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_upgrade' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o large_obj.o large_obj.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection pg_restore.o compress_io.o dumputils.o parallel.o pg_backup_archiver.o pg_backup_custom.o pg_backup_db.o pg_backup_directory.o pg_backup_null.o pg_backup_tar.o pg_backup_utils.o -L../../../src/port -L../../../src/common -L../../../src/fe_utils -lpgfeutils -L../../../src/common -lpgcommon -L../../../src/port -lpgport -L../../../src/interfaces/libpq -lpq -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o pg_restore make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o mainloop.o mainloop.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection pg_dump.o common.o pg_dump_sort.o compress_io.o dumputils.o parallel.o pg_backup_archiver.o pg_backup_custom.o pg_backup_db.o pg_backup_directory.o pg_backup_null.o pg_backup_tar.o pg_backup_utils.o -L../../../src/port -L../../../src/common -L../../../src/fe_utils -lpgfeutils -L../../../src/common -lpgcommon -L../../../src/port -lpgport -L../../../src/interfaces/libpq -lpq -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o pg_dump make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_dump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o prompt.o prompt.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pgbench' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -pthread -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS exprparse.o pgbench.o -L../../../src/port -L../../../src/common -L../../../src/fe_utils -lpgfeutils -L../../../src/common -lpgcommon -L../../../src/port -lpgport -L../../../src/interfaces/libpq -lpq -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o pgbench make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pgbench' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection createdb.o common.o -L../../../src/port -L../../../src/common -L../../../src/fe_utils -lpgfeutils -L../../../src/common -lpgcommon -L../../../src/port -lpgport -L../../../src/interfaces/libpq -lpq -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o createdb make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection createuser.o common.o -L../../../src/port -L../../../src/common -L../../../src/fe_utils -lpgfeutils -L../../../src/common -lpgcommon -L../../../src/port -lpgport -L../../../src/interfaces/libpq -lpq -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o createuser make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o psqlscanslash.o psqlscanslash.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection dropdb.o common.o -L../../../src/port -L../../../src/common -L../../../src/fe_utils -lpgfeutils -L../../../src/common -lpgcommon -L../../../src/port -lpgport -L../../../src/interfaces/libpq -lpq -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o dropdb make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection dropuser.o common.o -L../../../src/port -L../../../src/common -L../../../src/fe_utils -lpgfeutils -L../../../src/common -lpgcommon -L../../../src/port -lpgport -L../../../src/interfaces/libpq -lpq -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o dropuser make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o stringutils.o stringutils.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection brindesc.o clogdesc.o committsdesc.o dbasedesc.o genericdesc.o gindesc.o gistdesc.o hashdesc.o heapdesc.o logicalmsgdesc.o mxactdesc.o nbtdesc.o relmapdesc.o replorigindesc.o seqdesc.o smgrdesc.o spgdesc.o standbydesc.o tblspcdesc.o xactdesc.o xlogdesc.o compat.o pg_waldump.o rmgrdesc.o xlogreader.o -L../../../src/port -L../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o pg_waldump make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/pg_waldump' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o startup.o startup.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection clusterdb.o common.o -L../../../src/port -L../../../src/common -L../../../src/fe_utils -lpgfeutils -L../../../src/common -lpgcommon -L../../../src/port -lpgport -L../../../src/interfaces/libpq -lpq -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o clusterdb make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o variables.o variables.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection pg_isready.o common.o -L../../../src/port -L../../../src/common -L../../../src/fe_utils -lpgfeutils -L../../../src/common -lpgcommon -L../../../src/port -lpgport -L../../../src/interfaces/libpq -lpq -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o pg_isready make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o sql_help.o sql_help.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection vacuumdb.o common.o -L../../../src/port -L../../../src/common -L../../../src/fe_utils -lpgfeutils -L../../../src/common -lpgcommon -L../../../src/port -lpgport -L../../../src/interfaces/libpq -lpq -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o vacuumdb make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection reindexdb.o common.o -L../../../src/port -L../../../src/common -L../../../src/fe_utils -lpgfeutils -L../../../src/common -lpgcommon -L../../../src/port -lpgport -L../../../src/interfaces/libpq -lpq -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o reindexdb make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/scripts' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/interfaces/libpq -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tab-complete.o tab-complete.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection command.o common.o copy.o crosstabview.o describe.o help.o input.o large_obj.o mainloop.o prompt.o psqlscanslash.o sql_help.o startup.o stringutils.o tab-complete.o variables.o -L../../../src/port -L../../../src/common -L../../../src/fe_utils -lpgfeutils -L../../../src/common -lpgcommon -L../../../src/port -lpgport -L../../../src/interfaces/libpq -lpq -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o psql make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/bin/psql' /usr/bin/make -C pl all /usr/bin/make -C plpgsql all /usr/bin/make -C plperl all /usr/bin/make -C plpython all /usr/bin/make -C tcl all /usr/bin/make -C src all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/tcl' /usr/bin/msgfmt -c -o po/cs.mo po/cs.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/tcl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/tcl' /usr/bin/msgfmt -c -o po/el.mo po/el.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/tcl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/tcl' /usr/bin/msgfmt -c -o po/de.mo po/de.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/tcl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/tcl' /usr/bin/msgfmt -c -o po/es.mo po/es.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/tcl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/tcl' /usr/bin/msgfmt -c -o po/fr.mo po/fr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/tcl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' /usr/bin/msgfmt -c -o po/cs.mo po/cs.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/tcl' /usr/bin/msgfmt -c -o po/it.mo po/it.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/tcl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' /usr/bin/msgfmt -c -o po/de.mo po/de.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' /usr/bin/msgfmt -c -o po/el.mo po/el.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' /usr/bin/msgfmt -c -o po/de.mo po/de.po make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' /usr/bin/msgfmt -c -o po/cs.mo po/cs.po make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' /usr/bin/msgfmt -c -o po/el.mo po/el.po make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' /usr/bin/msgfmt -c -o po/es.mo po/es.po make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/tcl' /usr/bin/msgfmt -c -o po/ja.mo po/ja.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/tcl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/tcl' /usr/bin/msgfmt -c -o po/ko.mo po/ko.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/tcl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' /usr/bin/msgfmt -c -o po/es.mo po/es.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' /usr/bin/msgfmt -c -o po/fr.mo po/fr.po make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' /usr/bin/msgfmt -c -o po/it.mo po/it.po make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' /usr/bin/msgfmt -c -o po/cs.mo po/cs.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/tcl' /usr/bin/msgfmt -c -o po/pl.mo po/pl.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/tcl' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' /usr/bin/msgfmt -c -o po/ja.mo po/ja.po make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' /usr/bin/msgfmt -c -o po/it.mo po/it.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/tcl' /usr/bin/msgfmt -c -o po/ru.mo po/ru.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/tcl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' /usr/bin/msgfmt -c -o po/fr.mo po/fr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' /usr/bin/msgfmt -c -o po/ko.mo po/ko.po make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/tcl' /usr/bin/msgfmt -c -o po/sv.mo po/sv.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/tcl' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' /usr/bin/msgfmt -c -o po/pl.mo po/pl.po make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' /usr/bin/msgfmt -c -o po/de.mo po/de.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/tcl' /usr/bin/msgfmt -c -o po/tr.mo po/tr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/tcl' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' /usr/bin/msgfmt -c -o po/pt_BR.mo po/pt_BR.po make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/tcl' /usr/bin/msgfmt -c -o po/uk.mo po/uk.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/tcl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' /usr/bin/msgfmt -c -o po/ja.mo po/ja.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' /usr/bin/msgfmt -c -o po/ru.mo po/ru.po make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/tcl' /usr/bin/msgfmt -c -o po/vi.mo po/vi.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/tcl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/tcl' /usr/bin/msgfmt -c -o po/zh_CN.mo po/zh_CN.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/tcl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' /usr/bin/msgfmt -c -o po/el.mo po/el.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' /usr/bin/msgfmt -c -o po/es.mo po/es.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' /usr/bin/msgfmt -c -o po/ko.mo po/ko.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' /usr/bin/msgfmt -c -o po/sv.mo po/sv.po make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' /usr/bin/msgfmt -c -o po/tr.mo po/tr.po make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' /usr/bin/msgfmt -c -o po/vi.mo po/vi.po make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' /usr/bin/msgfmt -c -o po/fr.mo po/fr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' /usr/bin/msgfmt -c -o po/uk.mo po/uk.po make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' /usr/bin/msgfmt -c -o po/zh_CN.mo po/zh_CN.po make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' /usr/bin/msgfmt -c -o po/it.mo po/it.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' /usr/bin/msgfmt -c -o po/pl.mo po/pl.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' /usr/bin/msgfmt -c -o po/ja.mo po/ja.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' /usr/bin/msgfmt -c -o po/ko.mo po/ko.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' /usr/bin/msgfmt -c -o po/pt_BR.mo po/pt_BR.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' /usr/bin/msgfmt -c -o po/pl.mo po/pl.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' /usr/bin/msgfmt -c -o po/ru.mo po/ru.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' /usr/bin/msgfmt -c -o po/pt_BR.mo po/pt_BR.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' /usr/bin/msgfmt -c -o po/ro.mo po/ro.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' /usr/bin/msgfmt -c -o po/sv.mo po/sv.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' /usr/bin/msgfmt -c -o po/ru.mo po/ru.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' /usr/bin/msgfmt -c -o po/tr.mo po/tr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' /usr/bin/msgfmt -c -o po/sv.mo po/sv.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' /usr/bin/msgfmt -c -o po/uk.mo po/uk.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' /usr/bin/msgfmt -c -o po/tr.mo po/tr.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' /usr/bin/msgfmt -c -o po/vi.mo po/vi.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' /usr/bin/msgfmt -c -o po/uk.mo po/uk.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' /usr/bin/msgfmt -c -o po/zh_CN.mo po/zh_CN.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' /usr/bin/msgfmt -c -o po/vi.mo po/vi.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' /usr/bin/msgfmt -c -o po/zh_CN.mo po/zh_CN.po make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' '/usr/bin/perl' ./text2macro.pl --strip='^(\#.*|\s*)$' plc_perlboot.pl plc_trusted.pl > perlchunks.h make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' '/usr/bin/perl' plperl_opmask.pl plperl_opmask.h make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' '/usr/bin/perl' /usr/share/perl5/vendor_perl/ExtUtils/xsubpp -typemap /usr/share/perl5/ExtUtils/typemap SPI.xs >SPI.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pl_handler.o pl_handler.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' '/usr/bin/perl' /usr/share/perl5/vendor_perl/ExtUtils/xsubpp -typemap /usr/share/perl5/ExtUtils/typemap Util.xs >Util.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I/usr/include/python3.11 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o plpy_cursorobject.o plpy_cursorobject.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pl_comp.o pl_comp.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pl_funcs.o pl_funcs.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pl_scanner.o pl_scanner.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I/usr/include/python3.11 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o plpy_elog.o plpy_elog.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/tcl' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I/usr/include -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pltcl.o pltcl.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/tcl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I/usr/include/python3.11 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o plpy_main.o plpy_main.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/lib64/perl5/CORE -c -o SPI.o SPI.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' In file included from /usr/lib64/perl5/CORE/perl.h:7242, from plperl.h:78, from SPI.xs:15: /usr/lib64/perl5/CORE/inline.h: In function 'Perl_cop_file_avn': /usr/lib64/perl5/CORE/inline.h:3489:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] 3489 | const char *file = CopFILE(cop); | ^~~~~ make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/lib64/perl5/CORE -c -o Util.o Util.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' In file included from /usr/lib64/perl5/CORE/perl.h:7242, from plperl.h:78, from Util.xs:22: /usr/lib64/perl5/CORE/inline.h: In function 'Perl_cop_file_avn': /usr/lib64/perl5/CORE/inline.h:3489:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] 3489 | const char *file = CopFILE(cop); | ^~~~~ make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pl_gram.o pl_gram.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I/usr/include/python3.11 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o plpy_exec.o plpy_exec.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I/usr/include/python3.11 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o plpy_planobject.o plpy_planobject.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I/usr/include/python3.11 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o plpy_resultobject.o plpy_resultobject.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/tcl' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o pltcl.so pltcl.o -L../../../src/port -L../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -L/usr/lib64 -ltcl8.6 -ldl -lz -lpthread -lm -lc make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/tcl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I/usr/include/python3.11 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o plpy_plpymodule.o plpy_plpymodule.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I/usr/include/python3.11 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o plpy_subxactobject.o plpy_subxactobject.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I/usr/include/python3.11 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o plpy_procedure.o plpy_procedure.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I/usr/include/python3.11 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o plpy_spi.o plpy_spi.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pl_exec.o pl_exec.c make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I/usr/include/python3.11 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o plpy_util.o plpy_util.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/lib64/perl5/CORE -c -o plperl.o plperl.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' In file included from /usr/lib64/perl5/CORE/perl.h:7242, from plperl.h:78, from plperl.c:49: /usr/lib64/perl5/CORE/inline.h: In function 'Perl_cop_file_avn': /usr/lib64/perl5/CORE/inline.h:3489:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] 3489 | const char *file = CopFILE(cop); | ^~~~~ make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I/usr/include/python3.11 -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o plpy_typeio.o plpy_typeio.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o plperl.so plperl.o SPI.o Util.o -L../../../src/port -L../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -fstack-protector-strong -L/usr/local/lib -L/usr/lib64/perl5/CORE -lperl -lpthread -lresolv -ldl -lm -lcrypt -lutil -lc make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o plpython3.so plpy_cursorobject.o plpy_elog.o plpy_exec.o plpy_main.o plpy_planobject.o plpy_plpymodule.o plpy_procedure.o plpy_resultobject.o plpy_spi.o plpy_subxactobject.o plpy_typeio.o plpy_util.o -L../../../src/port -L../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -L/usr/lib64 -lpython3.11 -ldl -lm make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o plpgsql.so pl_comp.o pl_exec.o pl_funcs.o pl_gram.o pl_handler.o pl_scanner.o -L../../../../src/port -L../../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' /usr/bin/make -C makefiles all make[2]: Nothing to be done for 'all'. /usr/bin/make -C test/regress all /usr/bin/make -C ../../../src/port all make[3]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[3]: Nothing to be done for 'all'. /usr/bin/make -C ../../../contrib/spi make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_regress_main.o pg_regress_main.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/spi' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DREFINT_VERBOSE -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o moddatetime.o moddatetime.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/spi' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/spi' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DREFINT_VERBOSE -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o insert_username.o insert_username.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/spi' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/spi' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DREFINT_VERBOSE -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o autoinc.o autoinc.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/spi' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/spi' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DREFINT_VERBOSE -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o refint.o refint.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/spi' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/spi' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC autoinc.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -shared -o autoinc.so make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/spi' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/spi' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -DREFINT_VERBOSE -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o autoinc.bc autoinc.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/spi' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/spi' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC insert_username.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -shared -o insert_username.so make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/spi' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/spi' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC moddatetime.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -shared -o moddatetime.so make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/spi' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/spi' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -DREFINT_VERBOSE -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o insert_username.bc insert_username.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/spi' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/spi' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -DREFINT_VERBOSE -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o moddatetime.bc moddatetime.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/spi' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/spi' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -DREFINT_VERBOSE -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o refint.bc refint.c make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/spi' make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/spi' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC refint.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -shared -o refint.so make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/spi' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' cp ../../../contrib/spi/refint.so refint.so make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' cp ../../../contrib/spi/autoinc.so autoinc.so make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o regress.o regress.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -I../../../src/port '-DHOST_TUPLE="riscv64-koji-linux-gnu"' '-DSHELLPROG="/bin/sh"' '-DDLSUFFIX=".so"' -c -o pg_regress.o pg_regress.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o regress.so regress.o -L../../../src/port -L../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC pg_regress.o pg_regress_main.o -L../../../src/port -L../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o pg_regress make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' /usr/bin/make -C test/isolation all /usr/bin/make -C ../../../src/interfaces/libpq all /usr/bin/make -C ../../../src/port all /usr/bin/make -C ../../../src/test/regress pg_regress.o make[3]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all /usr/bin/make -C ../../../src/port all /usr/bin/make -C ../../../src/port all make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[3]: Nothing to be done for 'all'. make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[4]: Nothing to be done for 'all'. make[4]: Nothing to be done for 'all'. make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' rm -f pg_regress.o && ln -s ../../../src/test/regress/pg_regress.o . make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/interfaces/libpq -I./../regress -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o isolation_main.o isolation_main.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/interfaces/libpq -I./../regress -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o isolationtester.o isolationtester.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I. -I. -I../../../src/interfaces/libpq -I./../regress -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o specparse.o specparse.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection isolation_main.o pg_regress.o -L../../../src/port -L../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o pg_isolation_regress make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection isolationtester.o specparse.o -L../../../src/common -lpgcommon -L../../../src/port -lpgport -L../../../src/interfaces/libpq -lpq -L../../../src/port -L../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o isolationtester make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' /usr/bin/make -C test/perl all make[2]: Nothing to be done for 'all'. /usr/bin/make -C backend/jit/llvm all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/jit/llvm' g++ -Wall -Wpointer-arith -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -std=c++14 -fPIC -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -D_GNU_SOURCE -I/usr/include -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o llvmjit_error.o llvmjit_error.cpp make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/jit/llvm' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/jit/llvm' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -D_GNU_SOURCE -I/usr/include -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o llvmjit_types.bc llvmjit_types.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/jit/llvm' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/jit/llvm' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -Wno-deprecated-declarations -fPIC -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -D_GNU_SOURCE -I/usr/include -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o llvmjit_deform.o llvmjit_deform.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/jit/llvm' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/jit/llvm' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -Wno-deprecated-declarations -fPIC -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -D_GNU_SOURCE -I/usr/include -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o llvmjit.o llvmjit.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/jit/llvm' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/jit/llvm' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -Wno-deprecated-declarations -fPIC -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -D_GNU_SOURCE -I/usr/include -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o llvmjit_expr.o llvmjit_expr.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/jit/llvm' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/jit/llvm' g++ -Wall -Wpointer-arith -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -std=c++14 -fPIC -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -D_GNU_SOURCE -I/usr/include -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o llvmjit_wrap.o llvmjit_wrap.cpp make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/jit/llvm' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/jit/llvm' g++ -Wall -Wpointer-arith -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -std=c++14 -fPIC -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -D_GNU_SOURCE -I/usr/include -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o llvmjit_inline.o llvmjit_inline.cpp make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/jit/llvm' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/jit/llvm' g++ -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -Wno-deprecated-declarations -fPIC -shared -o llvmjit.so llvmjit.o llvmjit_error.o llvmjit_inline.o llvmjit_wrap.o llvmjit_deform.o llvmjit_expr.o -L../../../../src/port -L../../../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lLLVM-15 make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/jit/llvm' /usr/bin/make -C contrib all /usr/bin/make -C adminpack all /usr/bin/make -C amcheck all /usr/bin/make -C auth_delay all /usr/bin/make -C auto_explain all /usr/bin/make -C bloom all /usr/bin/make -C btree_gin all /usr/bin/make -C btree_gist all /usr/bin/make -C citext all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/bloom' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o blcost.o blcost.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/bloom' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/auto_explain' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o auto_explain.o auto_explain.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/auto_explain' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o btree_bit.o btree_bit.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/auth_delay' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o auth_delay.o auth_delay.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/auth_delay' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/citext' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o citext.o citext.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/citext' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/adminpack' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o adminpack.o adminpack.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/adminpack' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/bloom' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o blinsert.o blinsert.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/bloom' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gin' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o btree_gin.o btree_gin.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gin' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o btree_bytea.o btree_bytea.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/auto_explain' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o auto_explain.bc auto_explain.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/auto_explain' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/auth_delay' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o auth_delay.bc auth_delay.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/auth_delay' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/citext' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o citext.bc citext.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/citext' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/bloom' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o blscan.o blscan.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/bloom' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/amcheck' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o verify_heapam.o verify_heapam.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/amcheck' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/adminpack' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o adminpack.bc adminpack.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/adminpack' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/auth_delay' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC auth_delay.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -shared -o auth_delay.so make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/auth_delay' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o btree_cash.o btree_cash.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/auto_explain' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o auto_explain.so auto_explain.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/auto_explain' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gin' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o btree_gin.bc btree_gin.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gin' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/citext' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC citext.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -shared -o citext.so make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/citext' /usr/bin/make -C cube all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/adminpack' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o adminpack.so adminpack.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/adminpack' /usr/bin/make -C dblink all /usr/bin/make -C ../../src/interfaces/libpq all /usr/bin/make -C ../../../src/port all make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[4]: Nothing to be done for 'all'. make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/bloom' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o blutils.o blutils.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/bloom' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o btree_date.o btree_date.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' /usr/bin/make -C dict_int all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o btree_enum.o btree_enum.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/dict_int' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o dict_int.o dict_int.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/dict_int' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/bloom' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o blvacuum.o blvacuum.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/bloom' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/amcheck' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o verify_heapam.bc verify_heapam.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/amcheck' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gin' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o btree_gin.so btree_gin.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gin' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o btree_float4.o btree_float4.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/bloom' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o blvalidate.o blvalidate.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/bloom' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/dict_int' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o dict_int.so dict_int.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/dict_int' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/dict_int' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o dict_int.bc dict_int.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/dict_int' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/amcheck' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o verify_nbtree.o verify_nbtree.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/amcheck' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o btree_float8.o btree_float8.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' /usr/bin/make -C dict_xsyn all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o btree_gist.o btree_gist.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' /usr/bin/make -C earthdistance all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/bloom' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o blcost.bc blcost.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/bloom' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/cube' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o cube.o cube.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/cube' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o btree_inet.o btree_inet.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/dict_xsyn' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o dict_xsyn.o dict_xsyn.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/dict_xsyn' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/earthdistance' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o earthdistance.o earthdistance.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/earthdistance' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/dblink' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../src/interfaces/libpq -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o dblink.o dblink.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/dblink' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/amcheck' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o verify_nbtree.bc verify_nbtree.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/amcheck' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/earthdistance' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o earthdistance.bc earthdistance.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/earthdistance' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/bloom' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o blinsert.bc blinsert.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/bloom' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o btree_int2.o btree_int2.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/dict_xsyn' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o dict_xsyn.bc dict_xsyn.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/dict_xsyn' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/dblink' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../src/interfaces/libpq -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o dblink.bc dblink.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/dblink' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/earthdistance' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC earthdistance.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lm -shared -o earthdistance.so make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/earthdistance' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o btree_int4.o btree_int4.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/dict_xsyn' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o dict_xsyn.so dict_xsyn.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/dict_xsyn' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/cube' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o cubeparse.o cubeparse.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/cube' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/bloom' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o blscan.bc blscan.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/bloom' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/bloom' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o blutils.bc blutils.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/bloom' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o btree_int8.o btree_int8.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' /usr/bin/make -C file_fdw all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/bloom' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o blvacuum.bc blvacuum.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/bloom' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o btree_interval.o btree_interval.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/cube' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o cubeparse.bc cubeparse.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/cube' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o btree_macaddr.o btree_macaddr.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/cube' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o cube.bc cube.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/cube' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/dblink' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o dblink.so dblink.o -L../../src/port -L../../src/common -L../../src/interfaces/libpq -lpq -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/dblink' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/bloom' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o blvalidate.bc blvalidate.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/bloom' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/file_fdw' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o file_fdw.o file_fdw.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/file_fdw' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o btree_macaddr8.o btree_macaddr8.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' /usr/bin/make -C fuzzystrmatch all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/amcheck' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o amcheck.so verify_heapam.o verify_nbtree.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/amcheck' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o btree_numeric.o btree_numeric.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' /usr/bin/make -C hstore all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o btree_text.o btree_text.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/file_fdw' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o file_fdw.bc file_fdw.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/file_fdw' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o btree_oid.o btree_oid.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' /usr/bin/make -C intagg all make[2]: Nothing to be done for 'all'. make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o hstore_compat.o hstore_compat.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/bloom' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o bloom.so blcost.o blinsert.o blscan.o blutils.o blvacuum.o blvalidate.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/bloom' /usr/bin/make -C intarray all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o btree_time.o btree_time.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/fuzzystrmatch' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o dmetaphone.o dmetaphone.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/fuzzystrmatch' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/file_fdw' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC file_fdw.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -shared -o file_fdw.so make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/file_fdw' /usr/bin/make -C isn all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o hstore_gin.o hstore_gin.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o btree_ts.o btree_ts.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' /usr/bin/make -C lo all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/fuzzystrmatch' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o fuzzystrmatch.o fuzzystrmatch.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/fuzzystrmatch' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o btree_utils_num.o btree_utils_num.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/intarray' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o _int_bool.o _int_bool.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/intarray' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/lo' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o lo.o lo.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/lo' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/intarray' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o _int_gin.o _int_gin.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/intarray' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o hstore_gist.o hstore_gist.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o btree_utils_var.o btree_utils_var.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/isn' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o isn.o isn.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/isn' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/cube' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o cube.so cube.o cubeparse.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lm make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/cube' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/fuzzystrmatch' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o dmetaphone.bc dmetaphone.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/fuzzystrmatch' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/lo' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o lo.bc lo.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/lo' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/fuzzystrmatch' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o fuzzystrmatch.bc fuzzystrmatch.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/fuzzystrmatch' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o btree_uuid.o btree_uuid.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/intarray' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o _int_gist.o _int_gist.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/intarray' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/lo' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC lo.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -shared -o lo.so make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/lo' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o btree_bit.bc btree_bit.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' /usr/bin/make -C ltree all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/isn' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o isn.bc isn.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/isn' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/intarray' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o _int_op.o _int_op.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/intarray' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o btree_cash.bc btree_cash.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o btree_bytea.bc btree_bytea.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o hstore_io.o hstore_io.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DLOWER_NODE -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o _ltree_gist.o _ltree_gist.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/intarray' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o _int_selfuncs.o _int_selfuncs.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/intarray' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/fuzzystrmatch' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o fuzzystrmatch.so dmetaphone.o fuzzystrmatch.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/fuzzystrmatch' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/isn' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC isn.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -shared -o isn.so make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/isn' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o hstore_op.o hstore_op.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/intarray' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o _int_tool.o _int_tool.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/intarray' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o btree_date.bc btree_date.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' /usr/bin/make -C oid2name all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o btree_enum.bc btree_enum.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DLOWER_NODE -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o _ltree_op.o _ltree_op.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DLOWER_NODE -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o crc32.o crc32.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o btree_float4.bc btree_float4.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o btree_float8.bc btree_float8.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o hstore_subs.o hstore_subs.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o btree_gist.bc btree_gist.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/oid2name' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/interfaces/libpq -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o oid2name.o oid2name.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/oid2name' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/intarray' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o _intbig_gist.o _intbig_gist.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/intarray' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o btree_inet.bc btree_inet.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DLOWER_NODE -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o lquery_op.o lquery_op.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/intarray' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o _int_gin.bc _int_gin.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/intarray' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/oid2name' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../src/interfaces/libpq -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o oid2name.bc oid2name.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/oid2name' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o hstore_compat.bc hstore_compat.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/intarray' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o _int_bool.bc _int_bool.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/intarray' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o btree_int2.bc btree_int2.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o btree_int4.bc btree_int4.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o btree_int8.bc btree_int8.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o hstore_gin.bc hstore_gin.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/intarray' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o _int_gist.bc _int_gist.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/intarray' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DLOWER_NODE -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o ltree_io.o ltree_io.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/intarray' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o _int_op.bc _int_op.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/intarray' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/intarray' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o _int_selfuncs.bc _int_selfuncs.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/intarray' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DLOWER_NODE -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o ltree_gist.o ltree_gist.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o btree_interval.bc btree_interval.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o hstore_gist.bc hstore_gist.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o btree_macaddr8.bc btree_macaddr8.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o btree_numeric.bc btree_numeric.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o btree_macaddr.bc btree_macaddr.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/intarray' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o _int_tool.bc _int_tool.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/intarray' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/oid2name' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection oid2name.o -L../../src/common -lpgcommon -L../../src/port -lpgport -L../../src/interfaces/libpq -lpq -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o oid2name make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/oid2name' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/intarray' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o _intbig_gist.bc _intbig_gist.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/intarray' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DLOWER_NODE -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o ltree_op.o ltree_op.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' /usr/bin/make -C old_snapshot all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o btree_oid.bc btree_oid.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' /usr/bin/make -C pageinspect all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o btree_text.bc btree_text.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o btree_time.bc btree_time.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DLOWER_NODE -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o ltxtquery_io.o ltxtquery_io.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/old_snapshot' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o time_mapping.o time_mapping.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/old_snapshot' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o hstore_io.bc hstore_io.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DLOWER_NODE -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o ltxtquery_op.o ltxtquery_op.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o btree_ts.bc btree_ts.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o fsmfuncs.o fsmfuncs.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/old_snapshot' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o time_mapping.bc time_mapping.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/old_snapshot' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o brinfuncs.o brinfuncs.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o btreefuncs.o btreefuncs.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/old_snapshot' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o old_snapshot.so time_mapping.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/old_snapshot' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -DLOWER_NODE -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o crc32.bc crc32.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -DLOWER_NODE -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o _ltree_op.bc _ltree_op.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o btree_utils_num.bc btree_utils_num.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o hstore_op.bc hstore_op.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -DLOWER_NODE -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o _ltree_gist.bc _ltree_gist.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o ginfuncs.o ginfuncs.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -DLOWER_NODE -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o lquery_op.bc lquery_op.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o hstore_subs.bc hstore_subs.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/intarray' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o _int.so _int_bool.o _int_gin.o _int_gist.o _int_op.o _int_selfuncs.o _int_tool.o _intbig_gist.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/intarray' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o btree_uuid.bc btree_uuid.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' /usr/bin/make -C passwordcheck all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o btree_utils_var.bc btree_utils_var.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' /usr/bin/make -C pg_buffercache all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -DLOWER_NODE -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o ltree_gist.bc ltree_gist.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o gistfuncs.o gistfuncs.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/passwordcheck' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o passwordcheck.o passwordcheck.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/passwordcheck' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o hashfuncs.o hashfuncs.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect' /usr/bin/make -C pg_freespacemap all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_buffercache' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_buffercache_pages.o pg_buffercache_pages.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_buffercache' /usr/bin/make -C pg_prewarm all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_freespacemap' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_freespacemap.o pg_freespacemap.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_freespacemap' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/passwordcheck' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o passwordcheck.bc passwordcheck.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/passwordcheck' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o heapfuncs.o heapfuncs.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_buffercache' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pg_buffercache_pages.bc pg_buffercache_pages.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_buffercache' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -DLOWER_NODE -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o ltree_io.bc ltree_io.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/passwordcheck' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o passwordcheck.so passwordcheck.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/passwordcheck' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_buffercache' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o pg_buffercache.so pg_buffercache_pages.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_buffercache' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_prewarm' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o autoprewarm.o autoprewarm.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_prewarm' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_freespacemap' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pg_freespacemap.bc pg_freespacemap.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_freespacemap' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o rawpage.o rawpage.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_freespacemap' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o pg_freespacemap.so pg_freespacemap.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_freespacemap' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_prewarm' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_prewarm.o pg_prewarm.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_prewarm' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o brinfuncs.bc brinfuncs.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -DLOWER_NODE -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o ltree_op.bc ltree_op.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o btreefuncs.bc btreefuncs.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect' /usr/bin/make -C pg_stat_statements all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -DLOWER_NODE -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o ltxtquery_op.bc ltxtquery_op.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_prewarm' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o autoprewarm.bc autoprewarm.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_prewarm' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -DLOWER_NODE -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o ltxtquery_io.bc ltxtquery_io.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o fsmfuncs.bc fsmfuncs.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o btree_gist.so btree_bit.o btree_bytea.o btree_cash.o btree_date.o btree_enum.o btree_float4.o btree_float8.o btree_gist.o btree_inet.o btree_int2.o btree_int4.o btree_int8.o btree_interval.o btree_macaddr.o btree_macaddr8.o btree_numeric.o btree_oid.o btree_text.o btree_time.o btree_ts.o btree_utils_num.o btree_utils_var.o btree_uuid.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lm make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_prewarm' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pg_prewarm.bc pg_prewarm.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_prewarm' /usr/bin/make -C pg_surgery all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o hstore.so hstore_compat.o hstore_gin.o hstore_gist.o hstore_io.o hstore_op.o hstore_subs.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o ginfuncs.bc ginfuncs.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o gistfuncs.bc gistfuncs.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect' /usr/bin/make -C pg_trgm all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_prewarm' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o pg_prewarm.so autoprewarm.o pg_prewarm.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_prewarm' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_stat_statements' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pg_stat_statements.bc pg_stat_statements.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_stat_statements' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_surgery' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o heap_surgery.o heap_surgery.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_surgery' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_surgery' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o heap_surgery.bc heap_surgery.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_surgery' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_trgm' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o trgm_gin.o trgm_gin.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_trgm' /usr/bin/make -C pgcrypto all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o hashfuncs.bc hashfuncs.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect' /usr/bin/make -C pgrowlocks all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_stat_statements' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_stat_statements.o pg_stat_statements.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_stat_statements' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o rawpage.bc rawpage.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_surgery' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o pg_surgery.so heap_surgery.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_surgery' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o heapfuncs.bc heapfuncs.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgrowlocks' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pgrowlocks.o pgrowlocks.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgrowlocks' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o openssl.o openssl.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_trgm' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o trgm_gist.o trgm_gist.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_trgm' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pgp-mpi-openssl.o pgp-mpi-openssl.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o ltree.so _ltree_gist.o _ltree_op.o crc32.o lquery_op.o ltree_gist.o ltree_io.o ltree_op.o ltxtquery_io.o ltxtquery_op.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgrowlocks' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o pgrowlocks.so pgrowlocks.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgrowlocks' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o crypt-gensalt.o crypt-gensalt.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgrowlocks' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pgrowlocks.bc pgrowlocks.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgrowlocks' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_stat_statements' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o pg_stat_statements.so pg_stat_statements.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lm make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_stat_statements' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o crypt-md5.o crypt-md5.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' /usr/bin/make -C pgstattuple all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o crypt-des.o crypt-des.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o mbuf.o mbuf.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pgp-armor.o pgp-armor.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pgcrypto.o pgcrypto.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pgp-cfb.o pgp-cfb.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgstattuple' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pgstatapprox.o pgstatapprox.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgstattuple' /usr/bin/make -C pg_visibility all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_trgm' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o trgm_op.o trgm_op.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_trgm' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pgp-compress.o pgp-compress.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pgp-info.o pgp-info.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' /usr/bin/make -C postgres_fdw all /usr/bin/make -C ../../src/interfaces/libpq all /usr/bin/make -C ../../../src/port all make[4]: Nothing to be done for 'all'. /usr/bin/make -C ../../../src/common all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pgp-encrypt.o pgp-encrypt.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgstattuple' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pgstatindex.o pgstatindex.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgstattuple' make[4]: Nothing to be done for 'all'. make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o crypt-blowfish.o crypt-blowfish.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pgp-decrypt.o pgp-decrypt.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o pageinspect.so brinfuncs.o btreefuncs.o fsmfuncs.o ginfuncs.o gistfuncs.o hashfuncs.o heapfuncs.o rawpage.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pgp-mpi.o pgp-mpi.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' /usr/bin/make -C seg all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pgp-pubdec.o pgp-pubdec.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_visibility' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_visibility.o pg_visibility.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_visibility' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_trgm' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o trgm_regexp.o trgm_regexp.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_trgm' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pgp-pubenc.o pgp-pubenc.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgstattuple' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pgstattuple.o pgstattuple.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgstattuple' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/seg' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o seg.o seg.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/seg' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/postgres_fdw' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../src/interfaces/libpq -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o connection.o connection.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/postgres_fdw' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pgp-pgsql.o pgp-pgsql.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pgp-pubkey.o pgp-pubkey.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_trgm' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o trgm_gin.bc trgm_gin.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_trgm' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_visibility' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pg_visibility.bc pg_visibility.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_visibility' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pgp-s2k.o pgp-s2k.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgstattuple' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pgstatapprox.bc pgstatapprox.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgstattuple' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/postgres_fdw' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../src/interfaces/libpq -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o option.o option.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/postgres_fdw' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/seg' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o seg.bc seg.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/seg' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/postgres_fdw' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../src/interfaces/libpq -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o deparse.o deparse.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/postgres_fdw' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pgp.o pgp.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/seg' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o segparse.o segparse.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/seg' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_visibility' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o pg_visibility.so pg_visibility.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_visibility' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_trgm' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o trgm_gist.bc trgm_gist.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_trgm' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o px-crypt.o px-crypt.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgstattuple' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pgstatindex.bc pgstatindex.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgstattuple' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o px-hmac.o px-hmac.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgstattuple' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pgstattuple.bc pgstattuple.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgstattuple' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgstattuple' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o pgstattuple.so pgstatapprox.o pgstatindex.o pgstattuple.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgstattuple' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/seg' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o segparse.bc segparse.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/seg' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o px.o px.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' /usr/bin/make -C spi all make[2]: Nothing to be done for 'all'. /usr/bin/make -C tablefunc all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_trgm' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o trgm_op.bc trgm_op.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_trgm' /usr/bin/make -C tcn all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o openssl.bc openssl.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' /usr/bin/make -C test_decoding all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pgp-mpi-openssl.bc pgp-mpi-openssl.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/seg' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o seg.so seg.o segparse.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/seg' /usr/bin/make -C tsm_system_rows all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_trgm' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o trgm_regexp.bc trgm_regexp.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_trgm' /usr/bin/make -C tsm_system_time all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/tcn' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tcn.o tcn.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/tcn' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/tsm_system_rows' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tsm_system_rows.o tsm_system_rows.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/tsm_system_rows' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/test_decoding' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o test_decoding.o test_decoding.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/test_decoding' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/tablefunc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tablefunc.o tablefunc.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/tablefunc' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/tsm_system_time' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tsm_system_time.o tsm_system_time.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/tsm_system_time' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/tcn' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o tcn.bc tcn.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/tcn' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o crypt-blowfish.bc crypt-blowfish.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/tsm_system_rows' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o tsm_system_rows.bc tsm_system_rows.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/tsm_system_rows' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/postgres_fdw' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../src/interfaces/libpq -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o postgres_fdw.o postgres_fdw.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/postgres_fdw' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/tcn' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC tcn.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -shared -o tcn.so make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/tcn' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/test_decoding' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o test_decoding.bc test_decoding.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/test_decoding' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/tsm_system_time' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o tsm_system_time.bc tsm_system_time.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/tsm_system_time' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/tsm_system_rows' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o tsm_system_rows.so tsm_system_rows.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/tsm_system_rows' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o crypt-des.bc crypt-des.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/tablefunc' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o tablefunc.bc tablefunc.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/tablefunc' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/postgres_fdw' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../src/interfaces/libpq -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o shippable.o shippable.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/postgres_fdw' /usr/bin/make -C unaccent all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/tsm_system_time' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o tsm_system_time.so tsm_system_time.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lm make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/tsm_system_time' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_trgm' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o pg_trgm.so trgm_gin.o trgm_gist.o trgm_op.o trgm_regexp.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_trgm' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/test_decoding' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC test_decoding.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -shared -o test_decoding.so make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/test_decoding' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o crypt-gensalt.bc crypt-gensalt.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/postgres_fdw' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../src/interfaces/libpq -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o connection.bc connection.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/postgres_fdw' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/tablefunc' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC tablefunc.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lm -shared -o tablefunc.so make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/tablefunc' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/unaccent' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o unaccent.o unaccent.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/unaccent' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/postgres_fdw' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../src/interfaces/libpq -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o option.bc option.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/postgres_fdw' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o crypt-md5.bc crypt-md5.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' /usr/bin/make -C vacuumlo all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/postgres_fdw' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../src/interfaces/libpq -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o shippable.bc shippable.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/postgres_fdw' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o mbuf.bc mbuf.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/postgres_fdw' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../src/interfaces/libpq -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o deparse.bc deparse.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/postgres_fdw' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pgcrypto.bc pgcrypto.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pgp-cfb.bc pgp-cfb.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' /usr/bin/make -C sslinfo all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/unaccent' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o unaccent.bc unaccent.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/unaccent' /usr/bin/make -C uuid-ossp all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pgp-armor.bc pgp-armor.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/vacuumlo' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -I../../src/interfaces/libpq -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o vacuumlo.o vacuumlo.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/vacuumlo' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/vacuumlo' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../src/interfaces/libpq -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o vacuumlo.bc vacuumlo.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/vacuumlo' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/unaccent' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o unaccent.so unaccent.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/unaccent' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/uuid-ossp' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../contrib/pgcrypto -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o uuid-ossp.o uuid-ossp.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/uuid-ossp' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/postgres_fdw' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../src/interfaces/libpq -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o postgres_fdw.bc postgres_fdw.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/postgres_fdw' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pgp-compress.bc pgp-compress.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' /usr/bin/make -C xml2 all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/uuid-ossp' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o uuid-ossp.so uuid-ossp.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lossp-uuid make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/uuid-ossp' /usr/bin/make -C sepgsql all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pgp-decrypt.bc pgp-decrypt.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/uuid-ossp' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../contrib/pgcrypto -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o uuid-ossp.bc uuid-ossp.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/uuid-ossp' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/sslinfo' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o sslinfo.o sslinfo.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/sslinfo' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o database.o database.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/sslinfo' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o sslinfo.bc sslinfo.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/sslinfo' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/xml2' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o xslt_proc.o xslt_proc.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/xml2' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pgp-encrypt.bc pgp-encrypt.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/xml2' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o xpath.o xpath.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/xml2' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/vacuumlo' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection vacuumlo.o -L../../src/common -lpgcommon -L../../src/port -lpgport -L../../src/interfaces/libpq -lpq -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o vacuumlo make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/vacuumlo' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o dml.o dml.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/sslinfo' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o sslinfo.so sslinfo.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lssl -lcrypto make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/sslinfo' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o hooks.o hooks.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o proc.o proc.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/xml2' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o xpath.bc xpath.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/xml2' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pgp-info.bc pgp-info.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pgp-mpi.bc pgp-mpi.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o schema.o schema.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pgp-pubdec.bc pgp-pubdec.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o relation.o relation.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o label.o label.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/xml2' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o xslt_proc.bc xslt_proc.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/xml2' /usr/bin/make -C bool_plperl all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pgp-pgsql.bc pgp-pgsql.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pgp-pubenc.bc pgp-pubenc.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pgp-pubkey.bc pgp-pubkey.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' /usr/bin/make -C hstore_plperl all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pgp-s2k.bc pgp-s2k.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/xml2' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o pgxml.so xpath.o xslt_proc.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lxslt -lxml2 make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/xml2' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o selinux.o selinux.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' /usr/bin/make -C jsonb_plperl all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o uavc.o uavc.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' sed 's,MODULE_PATHNAME,$libdir/sepgsql,g' sepgsql.sql.in >sepgsql.sql make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o px-crypt.bc px-crypt.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o pgp.bc pgp.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/bool_plperl' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../src/pl/plperl -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/lib64/perl5/CORE -c -o bool_plperl.o bool_plperl.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/bool_plperl' In file included from /usr/lib64/perl5/CORE/perl.h:7242, from ../../src/pl/plperl/plperl.h:78, from bool_plperl.c:4: /usr/lib64/perl5/CORE/inline.h: In function 'Perl_cop_file_avn': /usr/lib64/perl5/CORE/inline.h:3489:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] 3489 | const char *file = CopFILE(cop); | ^~~~~ make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/postgres_fdw' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o postgres_fdw.so connection.o deparse.o option.o postgres_fdw.o shippable.o -L../../src/port -L../../src/common -L../../src/interfaces/libpq -lpq -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/postgres_fdw' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/bool_plperl' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../src/pl/plperl -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/lib64/perl5/CORE -flto=thin -emit-llvm -c -o bool_plperl.bc bool_plperl.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/bool_plperl' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o px-hmac.bc px-hmac.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o database.bc database.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore_plperl' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../src/pl/plperl -I../../contrib -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/lib64/perl5/CORE -c -o hstore_plperl.o hstore_plperl.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore_plperl' In file included from /usr/lib64/perl5/CORE/perl.h:7242, from ../../src/pl/plperl/plperl.h:78, from hstore_plperl.c:5: /usr/lib64/perl5/CORE/inline.h: In function 'Perl_cop_file_avn': /usr/lib64/perl5/CORE/inline.h:3489:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] 3489 | const char *file = CopFILE(cop); | ^~~~~ make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o dml.bc dml.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/bool_plperl' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o bool_plperl.so bool_plperl.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -fstack-protector-strong -L/usr/local/lib -L/usr/lib64/perl5/CORE -lperl -lpthread -lresolv -ldl -lm -lcrypt -lutil -lc make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/bool_plperl' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/jsonb_plperl' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../src/pl/plperl -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/lib64/perl5/CORE -c -o jsonb_plperl.o jsonb_plperl.c In file included from /usr/lib64/perl5/CORE/perl.h:7242, from ../../src/pl/plperl/plperl.h:78, from jsonb_plperl.c:6: /usr/lib64/perl5/CORE/inline.h: In function 'Perl_cop_file_avn': /usr/lib64/perl5/CORE/inline.h:3489:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] 3489 | const char *file = CopFILE(cop); | ^~~~~ make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/jsonb_plperl' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o hooks.bc hooks.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o px.bc px.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o label.bc label.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o proc.bc proc.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' /usr/bin/make -C hstore_plpython all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore_plperl' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o hstore_plperl.so hstore_plperl.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -fstack-protector-strong -L/usr/local/lib -L/usr/lib64/perl5/CORE -lperl -lpthread -lresolv -ldl -lm -lcrypt -lutil -lc make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore_plperl' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore_plperl' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../src/pl/plperl -I../../contrib -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/lib64/perl5/CORE -flto=thin -emit-llvm -c -o hstore_plperl.bc hstore_plperl.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore_plperl' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/jsonb_plperl' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../src/pl/plperl -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/lib64/perl5/CORE -flto=thin -emit-llvm -c -o jsonb_plperl.bc jsonb_plperl.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/jsonb_plperl' /usr/bin/make -C jsonb_plpython all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o relation.bc relation.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o schema.bc schema.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/jsonb_plperl' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o jsonb_plperl.so jsonb_plperl.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lm -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -fstack-protector-strong -L/usr/local/lib -L/usr/lib64/perl5/CORE -lperl -lpthread -lresolv -ldl -lm -lcrypt -lutil -lc make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/jsonb_plperl' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore_plpython' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I/usr/include/python3.11 -DPLPYTHON_LIBNAME='"plpython3"' -I../../src/pl/plpython -I../../contrib -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o hstore_plpython.bc hstore_plpython.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore_plpython' /usr/bin/make -C ltree_plpython all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o selinux.bc selinux.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore_plpython' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I/usr/include/python3.11 -DPLPYTHON_LIBNAME='"plpython3"' -I../../src/pl/plpython -I../../contrib -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o hstore_plpython.o hstore_plpython.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore_plpython' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o uavc.bc uavc.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/jsonb_plpython' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I../../src/pl/plpython -I/usr/include/python3.11 -DPLPYTHON_LIBNAME='"plpython3"' -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o jsonb_plpython.o jsonb_plpython.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/jsonb_plpython' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore_plpython' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o hstore_plpython3.so hstore_plpython.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -L/usr/lib64 -lpython3.11 -ldl -lm make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore_plpython' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/jsonb_plpython' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I../../src/pl/plpython -I/usr/include/python3.11 -DPLPYTHON_LIBNAME='"plpython3"' -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o jsonb_plpython.bc jsonb_plpython.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/jsonb_plpython' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree_plpython' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I/usr/include/python3.11 -DPLPYTHON_LIBNAME='"plpython3"' -I../../src/pl/plpython -I../../contrib -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o ltree_plpython.o ltree_plpython.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree_plpython' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/jsonb_plpython' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o jsonb_plpython3.so jsonb_plpython.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -L/usr/lib64 -lpython3.11 -ldl -lm make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/jsonb_plpython' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree_plpython' /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I/usr/include/python3.11 -DPLPYTHON_LIBNAME='"plpython3"' -I../../src/pl/plpython -I../../contrib -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o ltree_plpython.bc ltree_plpython.c make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree_plpython' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree_plpython' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o ltree_plpython3.so ltree_plpython.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -L/usr/lib64 -lpython3.11 -ldl -lm make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree_plpython' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o sepgsql.so database.o dml.o hooks.o label.o proc.o relation.o schema.o selinux.o uavc.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lselinux make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -shared -o pgcrypto.so openssl.o pgp-mpi-openssl.o crypt-blowfish.o crypt-des.o crypt-gensalt.o crypt-md5.o mbuf.o pgcrypto.o pgp-armor.o pgp-cfb.o pgp-compress.o pgp-decrypt.o pgp-encrypt.o pgp-info.o pgp-mpi.o pgp-pgsql.o pgp-pubdec.o pgp-pubenc.o pgp-pubkey.o pgp-s2k.o pgp.o px-crypt.o px-hmac.o px.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -lcrypto -lz make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' + sed 's|C=`pwd`;|C=/usr/lib64/pgsql/tutorial;|' + make -j8 -C src/tutorial NO_PGXS=1 all make: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/tutorial' make -C ../../src/backend generated-headers rm -f advanced.sql; \ C=/usr/lib64/pgsql/tutorial; \ sed -e "s:_OBJWD_:$C:g" < advanced.source > advanced.sql rm -f basics.sql; \ C=/usr/lib64/pgsql/tutorial; \ sed -e "s:_OBJWD_:$C:g" < basics.source > basics.sql rm -f complex.sql; \ C=/usr/lib64/pgsql/tutorial; \ sed -e "s:_OBJWD_:$C:g" < complex.source > complex.sql rm -f funcs.sql; \ C=/usr/lib64/pgsql/tutorial; \ sed -e "s:_OBJWD_:$C:g" < funcs.source > funcs.sql rm -f syscat.sql; \ C=/usr/lib64/pgsql/tutorial; \ sed -e "s:_OBJWD_:$C:g" < syscat.source > syscat.sql gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o complex.o complex.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o funcs.o funcs.c make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend' make -C catalog distprep generated-header-symlinks make -C utils distprep generated-header-symlinks /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o complex.bc complex.c /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o funcs.bc funcs.c make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils' make[2]: Nothing to be done for 'distprep'. make[2]: Nothing to be done for 'generated-header-symlinks'. make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils' make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[2]: Nothing to be done for 'distprep'. make[2]: Nothing to be done for 'generated-header-symlinks'. make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC funcs.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -shared -o funcs.so gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC complex.o -L../../src/port -L../../src/common -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -Wl,--as-needed -shared -o complex.so make: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/tutorial' + rm -f src/tutorial/GNUmakefile + rm -f src/tutorial/complex.o src/tutorial/funcs.o + test_failure=0 + run_testsuite src/test/regress + make -k -C src/test/regress MAX_CONNECTIONS=5 check make: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/backend generated-headers make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend' make -C catalog distprep generated-header-symlinks make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[2]: Nothing to be done for 'distprep'. make[2]: Nothing to be done for 'generated-header-symlinks'. make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make -C utils distprep generated-header-symlinks make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils' make[2]: Nothing to be done for 'distprep'. make[2]: Nothing to be done for 'generated-header-symlinks'. make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils' make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend' make -C ../../../src/port all make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[1]: Nothing to be done for 'all'. make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[1]: Nothing to be done for 'all'. make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make -C ../../../contrib/spi make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/spi' make[1]: Nothing to be done for 'all'. make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/spi' rm -rf '/builddir/build/BUILD/postgresql-14.3'/tmp_install /usr/bin/mkdir -p '/builddir/build/BUILD/postgresql-14.3'/tmp_install/log make -C '../../..' DESTDIR='/builddir/build/BUILD/postgresql-14.3'/tmp_install install >'/builddir/build/BUILD/postgresql-14.3'/tmp_install/log/install.log 2>&1 make -j1 checkprep >>'/builddir/build/BUILD/postgresql-14.3'/tmp_install/log/install.log 2>&1 PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/src/test/regress:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dlpath=. --max-concurrent-tests=20 --make-testtablespace-dir --schedule=./parallel_schedule --max-connections=5 ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 286797 ============== creating database "regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test tablespace ... ok 6668 ms parallel group (20 tests, in groups of 5): name varchar char text boolean oid int2 int8 int4 float4 txid numeric uuid bit float8 pg_lsn regproc money enum rangetypes boolean ... FAILED (test process exited with exit code 2) 11722 ms char ... ok 658 ms name ... ok 622 ms varchar ... ok 650 ms text ... ok 801 ms int2 ... FAILED (test process exited with exit code 2) 647 ms int4 ... FAILED (test process exited with exit code 2) 651 ms int8 ... FAILED (test process exited with exit code 2) 636 ms oid ... FAILED (test process exited with exit code 2) 625 ms float4 ... FAILED (test process exited with exit code 2) 636 ms float8 ... ok 1664 ms bit ... FAILED (test process exited with exit code 2) 365 ms numeric ... FAILED (test process exited with exit code 2) 252 ms txid ... FAILED (test process exited with exit code 2) 248 ms uuid ... FAILED (test process exited with exit code 2) 259 ms enum ... ok 1431 ms money ... ok 801 ms rangetypes ... FAILED (test process exited with exit code 2) 21549 ms pg_lsn ... ok 643 ms regproc ... ok 641 ms parallel group (20 tests, in groups of 5): lseg line numerology strings point box path date polygon circle interval timetz timestamp time timestamptz inet macaddr8 multirangetypes macaddr create_function_0 strings ... ok 2435 ms numerology ... FAILED 699 ms point ... FAILED (test process exited with exit code 2) 14870 ms lseg ... ok 515 ms line ... ok 646 ms box ... FAILED (test process exited with exit code 2) 535 ms path ... FAILED (test process exited with exit code 2) 534 ms polygon ... FAILED (test process exited with exit code 2) 560 ms circle ... FAILED (test process exited with exit code 2) 559 ms date ... FAILED (test process exited with exit code 2) 551 ms time ... FAILED (test process exited with exit code 2) 451 ms timetz ... FAILED (test process exited with exit code 2) 439 ms timestamp ... FAILED (test process exited with exit code 2) 439 ms timestamptz ... FAILED (test process exited with exit code 2) 474 ms interval ... FAILED (test process exited with exit code 2) 314 ms inet ... FAILED (test process exited with exit code 2) 271 ms macaddr ... FAILED (test process exited with exit code 2) 292 ms macaddr8 ... FAILED (test process exited with exit code 2) 277 ms multirangetypes ... FAILED (test process exited with exit code 2) 277 ms create_function_0 ... FAILED (test process exited with exit code 2) 312 ms parallel group (12 tests, in groups of 5): tstypes geometry type_sanity horology regex unicode comments misc_sanity expressions opr_sanity xid mvcc geometry ... FAILED 1326 ms horology ... FAILED 2142 ms tstypes ... ok 1144 ms regex ... ok 5154 ms type_sanity ... ok 1744 ms opr_sanity ... FAILED 4892 ms misc_sanity ... ok 1669 ms comments ... ok 1112 ms expressions ... FAILED 1933 ms unicode ... ok 1079 ms xid ... ok 829 ms mvcc ... ok 1264 ms test create_function_1 ... ok 412 ms test create_type ... ok 875 ms test create_table ... ok 7301 ms test create_function_2 ... ok 622 ms parallel group (5 tests): copyselect copydml insert_conflict copy insert copy ... ok 4647 ms copyselect ... ok 764 ms copydml ... ok 842 ms insert ... ok 5660 ms insert_conflict ... ok 2941 ms parallel group (3 tests): create_operator create_procedure create_misc create_misc ... ok 1681 ms create_operator ... ok 811 ms create_procedure ... ok 1243 ms parallel group (5 tests): index_including create_view create_index index_including_gist create_index_spgist create_index ... FAILED (test process exited with exit code 2) 20500 ms create_index_spgist ... FAILED (test process exited with exit code 2) 21830 ms create_view ... FAILED 4866 ms index_including ... ok 3898 ms index_including_gist ... FAILED (test process exited with exit code 2) 20493 ms parallel group (16 tests, in groups of 5): create_cast triggers create_function_3 create_aggregate constraints typed_table select drop_if_exists inherit vacuum create_am roleattributes updatable_views hash_func errors infinite_recurse create_aggregate ... FAILED (test process exited with exit code 2) 327 ms create_function_3 ... FAILED (test process exited with exit code 2) 295 ms create_cast ... FAILED (test process exited with exit code 2) 240 ms constraints ... FAILED (test process exited with exit code 2) 424 ms triggers ... FAILED (test process exited with exit code 2) 250 ms select ... FAILED (test process exited with exit code 2) 258 ms inherit ... FAILED (test process exited with exit code 2) 324 ms typed_table ... FAILED (test process exited with exit code 2) 242 ms vacuum ... FAILED (test process exited with exit code 2) 386 ms drop_if_exists ... FAILED (test process exited with exit code 2) 252 ms updatable_views ... FAILED (test process exited with exit code 2) 267 ms roleattributes ... FAILED (test process exited with exit code 2) 252 ms create_am ... FAILED (test process exited with exit code 2) 238 ms hash_func ... FAILED (test process exited with exit code 2) 259 ms errors ... FAILED (test process exited with exit code 2) 364 ms infinite_recurse ... FAILED (test process exited with exit code 2) 309 ms test sanity_check ... FAILED 2459 ms parallel group (20 tests, in groups of 5): select_distinct_on select_having select_implicit select_into select_distinct union aggregates subselect join case arrays portals random transactions btree_index prepared_xacts delete update hash_index namespace select_into ... FAILED 1019 ms select_distinct ... FAILED (test process exited with exit code 2) 12965 ms select_distinct_on ... FAILED 449 ms select_implicit ... ok 790 ms select_having ... ok 700 ms subselect ... FAILED (test process exited with exit code 2) 634 ms union ... FAILED (test process exited with exit code 2) 612 ms case ... FAILED (test process exited with exit code 2) 645 ms join ... FAILED (test process exited with exit code 2) 633 ms aggregates ... FAILED (test process exited with exit code 2) 613 ms transactions ... FAILED (test process exited with exit code 2) 293 ms random ... failed (ignored) (test process exited with exit code 2) 275 ms portals ... FAILED (test process exited with exit code 2) 256 ms arrays ... FAILED (test process exited with exit code 2) 241 ms btree_index ... FAILED (test process exited with exit code 2) 295 ms hash_index ... FAILED (test process exited with exit code 2) 293 ms update ... FAILED (test process exited with exit code 2) 289 ms delete ... FAILED (test process exited with exit code 2) 278 ms namespace ... FAILED (test process exited with exit code 2) 286 ms prepared_xacts ... FAILED (test process exited with exit code 2) 264 ms parallel group (20 tests, in groups of 5): spgist gist gin privileges brin init_privs lock collate security_label matview replica_identity object_address tablesample rowsecurity groupingsets password generated identity join_hash drop_operator brin ... FAILED (test process exited with exit code 2) 25728 ms gin ... FAILED (test process exited with exit code 2) 25694 ms gist ... ok 15677 ms spgist ... ok 5979 ms privileges ... FAILED (test process exited with exit code 2) 25712 ms init_privs ... FAILED (test process exited with exit code 2) 730 ms security_label ... FAILED (test process exited with exit code 2) 750 ms collate ... FAILED (test process exited with exit code 2) 740 ms matview ... FAILED (test process exited with exit code 2) 745 ms lock ... FAILED (test process exited with exit code 2) 727 ms replica_identity ... FAILED (test process exited with exit code 2) 287 ms rowsecurity ... FAILED (test process exited with exit code 2) 410 ms object_address ... FAILED (test process exited with exit code 2) 280 ms tablesample ... FAILED (test process exited with exit code 2) 312 ms groupingsets ... FAILED (test process exited with exit code 2) 419 ms drop_operator ... FAILED (test process exited with exit code 2) 363 ms password ... FAILED (test process exited with exit code 2) 304 ms identity ... FAILED (test process exited with exit code 2) 329 ms generated ... FAILED (test process exited with exit code 2) 313 ms join_hash ... FAILED (test process exited with exit code 2) 326 ms parallel group (2 tests): brin_bloom brin_multi brin_bloom ... ok 1911 ms brin_multi ... ok 3882 ms parallel group (14 tests, in groups of 5): async alter_operator alter_generic create_table_like misc sysviews misc_functions tsrf dbsize tid tidscan tidrangescan collate.icu.utf8 incremental_sort create_table_like ... ok 5459 ms alter_generic ... FAILED 3250 ms alter_operator ... ok 1506 ms misc ... FAILED (test process exited with exit code 2) 20227 ms async ... ok 1218 ms dbsize ... FAILED (test process exited with exit code 2) 623 ms misc_functions ... FAILED (test process exited with exit code 2) 594 ms sysviews ... FAILED (test process exited with exit code 2) 576 ms tsrf ... FAILED (test process exited with exit code 2) 588 ms tid ... FAILED (test process exited with exit code 2) 609 ms tidscan ... FAILED (test process exited with exit code 2) 267 ms tidrangescan ... FAILED (test process exited with exit code 2) 292 ms collate.icu.utf8 ... FAILED (test process exited with exit code 2) 300 ms incremental_sort ... FAILED (test process exited with exit code 2) 373 ms parallel group (6 tests, in groups of 5): amutils psql_crosstab psql rules stats_ext collate.linux.utf8 rules ... FAILED 6885 ms psql ... FAILED 6580 ms psql_crosstab ... ok 883 ms amutils ... FAILED 695 ms stats_ext ... FAILED 18620 ms collate.linux.utf8 ... ok 472 ms test select_parallel ... FAILED (test process exited with exit code 2) 26295 ms test write_parallel ... FAILED (test process exited with exit code 2) 296 ms test vacuum_parallel ... FAILED (test process exited with exit code 2) 283 ms parallel group (2 tests): publication subscription publication ... FAILED (test process exited with exit code 2) 272 ms subscription ... FAILED (test process exited with exit code 2) 309 ms parallel group (17 tests, in groups of 5): portals_p2 select_views dependency cluster foreign_key guc tsdicts tsearch bitmapops combocid foreign_data window advisory_lock xmlmap functional_deps equivclass indirect_toast select_views ... FAILED (test process exited with exit code 2) 274 ms portals_p2 ... FAILED (test process exited with exit code 2) 266 ms foreign_key ... FAILED (test process exited with exit code 2) 331 ms cluster ... FAILED (test process exited with exit code 2) 324 ms dependency ... FAILED (test process exited with exit code 2) 298 ms guc ... FAILED (test process exited with exit code 2) 239 ms bitmapops ... FAILED (test process exited with exit code 2) 305 ms combocid ... FAILED (test process exited with exit code 2) 320 ms tsearch ... FAILED (test process exited with exit code 2) 282 ms tsdicts ... FAILED (test process exited with exit code 2) 260 ms foreign_data ... FAILED (test process exited with exit code 2) 265 ms window ... FAILED (test process exited with exit code 2) 263 ms xmlmap ... FAILED (test process exited with exit code 2) 329 ms functional_deps ... FAILED (test process exited with exit code 2) 396 ms advisory_lock ... FAILED (test process exited with exit code 2) 278 ms indirect_toast ... FAILED 2753 ms equivclass ... ok 1537 ms parallel group (6 tests, in groups of 5): jsonpath_encoding json_encoding jsonpath json jsonb jsonb_jsonpath json ... ok 2614 ms jsonb ... ok 5612 ms json_encoding ... ok 661 ms jsonpath ... ok 1145 ms jsonpath_encoding ... ok 562 ms jsonb_jsonpath ... ok 1768 ms parallel group (18 tests, in groups of 5): plancache limit temp copy2 plpgsql prepare conversion truncate domain rangefuncs returning polymorphism sequence rowtypes alter_table with xml largeobject plancache ... FAILED 1450 ms limit ... FAILED 1669 ms plpgsql ... FAILED 11068 ms copy2 ... ok 2526 ms temp ... ok 2103 ms domain ... ok 3909 ms rangefuncs ... FAILED (test process exited with exit code 2) 17572 ms prepare ... ok 708 ms conversion ... FAILED 1040 ms truncate ... ok 3271 ms alter_table ... FAILED (test process exited with exit code 2) 741 ms sequence ... FAILED (test process exited with exit code 2) 723 ms polymorphism ... FAILED (test process exited with exit code 2) 706 ms rowtypes ... FAILED (test process exited with exit code 2) 726 ms returning ... FAILED (test process exited with exit code 2) 681 ms largeobject ... FAILED (test process exited with exit code 2) 310 ms with ... FAILED (test process exited with exit code 2) 267 ms xml ... FAILED (test process exited with exit code 2) 270 ms parallel group (11 tests, in groups of 5): hash_part reloptions indexing partition_join partition_prune compression explain partition_info partition_aggregate tuplesort memoize partition_join ... FAILED 12692 ms partition_prune ... FAILED (test process exited with exit code 2) 21858 ms reloptions ... ok 1100 ms hash_part ... ok 840 ms indexing ... ok 10494 ms partition_aggregate ... FAILED (test process exited with exit code 2) 711 ms partition_info ... FAILED (test process exited with exit code 2) 706 ms tuplesort ... FAILED (test process exited with exit code 2) 720 ms explain ... FAILED (test process exited with exit code 2) 689 ms compression ... FAILED (test process exited with exit code 2) 684 ms memoize ... FAILED (test process exited with exit code 2) 302 ms parallel group (2 tests): event_trigger oidjoins event_trigger ... ok 3146 ms oidjoins ... ok 3638 ms test fast_default ... ok 3743 ms test stats ... ok 1717 ms ============== shutting down postmaster ============== ======================================================= 146 of 210 tests failed, 1 of these failures ignored. ======================================================= The differences that caused some tests to fail can be viewed in the file "/builddir/build/BUILD/postgresql-14.3/src/test/regress/regression.diffs". A copy of the test summary that you see above is saved in the file "/builddir/build/BUILD/postgresql-14.3/src/test/regress/regression.out". make: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make: *** [GNUmakefile:126: check] Error 1 + test_failure=1 + set +x === trying to find all regression.diffs files in build directory === === make failure: src/test/regress/regression.diffs === diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/boolean.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/boolean.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/boolean.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/boolean.out 2023-02-20 19:43:31.089205240 -0500 @@ -295,265 +295,7 @@ SELECT BOOLTBL1.*, BOOLTBL2.* FROM BOOLTBL1, BOOLTBL2 WHERE BOOLTBL2.f1 <> BOOLTBL1.f1; - f1 | f1 -----+---- - t | f - t | f - t | f - t | f - t | f - t | f - t | f - t | f - t | f - t | f - t | f - t | f -(12 rows) - -SELECT BOOLTBL1.*, BOOLTBL2.* - FROM BOOLTBL1, BOOLTBL2 - WHERE boolne(BOOLTBL2.f1,BOOLTBL1.f1); - f1 | f1 -----+---- - t | f - t | f - t | f - t | f - t | f - t | f - t | f - t | f - t | f - t | f - t | f - t | f -(12 rows) - -SELECT BOOLTBL1.*, BOOLTBL2.* - FROM BOOLTBL1, BOOLTBL2 - WHERE BOOLTBL2.f1 = BOOLTBL1.f1 and BOOLTBL1.f1 = bool 'false'; - f1 | f1 -----+---- - f | f - f | f - f | f - f | f -(4 rows) - -SELECT BOOLTBL1.*, BOOLTBL2.* - FROM BOOLTBL1, BOOLTBL2 - WHERE BOOLTBL2.f1 = BOOLTBL1.f1 or BOOLTBL1.f1 = bool 'true' - ORDER BY BOOLTBL1.f1, BOOLTBL2.f1; - f1 | f1 -----+---- - f | f - f | f - f | f - f | f - t | f - t | f - t | f - t | f - t | f - t | f - t | f - t | f - t | f - t | f - t | f - t | f -(16 rows) - --- --- SQL syntax --- Try all combinations to ensure that we get nothing when we expect nothing --- - thomas 2000-01-04 --- -SELECT f1 - FROM BOOLTBL1 - WHERE f1 IS TRUE; - f1 ----- - t - t - t -(3 rows) - -SELECT f1 - FROM BOOLTBL1 - WHERE f1 IS NOT FALSE; - f1 ----- - t - t - t -(3 rows) - -SELECT f1 - FROM BOOLTBL1 - WHERE f1 IS FALSE; - f1 ----- - f -(1 row) - -SELECT f1 - FROM BOOLTBL1 - WHERE f1 IS NOT TRUE; - f1 ----- - f -(1 row) - -SELECT f1 - FROM BOOLTBL2 - WHERE f1 IS TRUE; - f1 ----- -(0 rows) - -SELECT f1 - FROM BOOLTBL2 - WHERE f1 IS NOT FALSE; - f1 ----- -(0 rows) - -SELECT f1 - FROM BOOLTBL2 - WHERE f1 IS FALSE; - f1 ----- - f - f - f - f -(4 rows) - -SELECT f1 - FROM BOOLTBL2 - WHERE f1 IS NOT TRUE; - f1 ----- - f - f - f - f -(4 rows) - --- --- Tests for BooleanTest --- -CREATE TABLE BOOLTBL3 (d text, b bool, o int); -INSERT INTO BOOLTBL3 (d, b, o) VALUES ('true', true, 1); -INSERT INTO BOOLTBL3 (d, b, o) VALUES ('false', false, 2); -INSERT INTO BOOLTBL3 (d, b, o) VALUES ('null', null, 3); -SELECT - d, - b IS TRUE AS istrue, - b IS NOT TRUE AS isnottrue, - b IS FALSE AS isfalse, - b IS NOT FALSE AS isnotfalse, - b IS UNKNOWN AS isunknown, - b IS NOT UNKNOWN AS isnotunknown -FROM booltbl3 ORDER BY o; - d | istrue | isnottrue | isfalse | isnotfalse | isunknown | isnotunknown --------+--------+-----------+---------+------------+-----------+-------------- - true | t | f | f | t | f | t - false | f | t | t | f | f | t - null | f | t | f | t | t | f -(3 rows) - --- Test to make sure short-circuiting and NULL handling is --- correct. Use a table as source to prevent constant simplification --- to interfer. -CREATE TABLE booltbl4(isfalse bool, istrue bool, isnul bool); -INSERT INTO booltbl4 VALUES (false, true, null); -\pset null '(null)' --- AND expression need to return null if there's any nulls and not all --- of the value are true -SELECT istrue AND isnul AND istrue FROM booltbl4; - ?column? ----------- - (null) -(1 row) - -SELECT istrue AND istrue AND isnul FROM booltbl4; - ?column? ----------- - (null) -(1 row) - -SELECT isnul AND istrue AND istrue FROM booltbl4; - ?column? ----------- - (null) -(1 row) - -SELECT isfalse AND isnul AND istrue FROM booltbl4; - ?column? ----------- - f -(1 row) - -SELECT istrue AND isfalse AND isnul FROM booltbl4; - ?column? ----------- - f -(1 row) - -SELECT isnul AND istrue AND isfalse FROM booltbl4; - ?column? ----------- - f -(1 row) - --- OR expression need to return null if there's any nulls and none --- of the value is true -SELECT isfalse OR isnul OR isfalse FROM booltbl4; - ?column? ----------- - (null) -(1 row) - -SELECT isfalse OR isfalse OR isnul FROM booltbl4; - ?column? ----------- - (null) -(1 row) - -SELECT isnul OR isfalse OR isfalse FROM booltbl4; - ?column? ----------- - (null) -(1 row) - -SELECT isfalse OR isnul OR istrue FROM booltbl4; - ?column? ----------- - t -(1 row) - -SELECT istrue OR isfalse OR isnul FROM booltbl4; - ?column? ----------- - t -(1 row) - -SELECT isnul OR istrue OR isfalse FROM booltbl4; - ?column? ----------- - t -(1 row) - --- --- Clean up --- Many tables are retained by the regression test, but these do not seem --- particularly useful so just get rid of them for now. --- - thomas 1997-11-30 --- -DROP TABLE BOOLTBL1; -DROP TABLE BOOLTBL2; -DROP TABLE BOOLTBL3; -DROP TABLE BOOLTBL4; +server closed the connection unexpectedly + This probably means the server terminated abnormally + before or while processing the request. +connection to server was lost diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/int2.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/int2.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/int2.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/int2.out 2023-02-20 19:43:31.739205268 -0500 @@ -1,308 +1 @@ --- --- INT2 --- -CREATE TABLE INT2_TBL(f1 int2); -INSERT INTO INT2_TBL(f1) VALUES ('0 '); -INSERT INTO INT2_TBL(f1) VALUES (' 1234 '); -INSERT INTO INT2_TBL(f1) VALUES (' -1234'); -INSERT INTO INT2_TBL(f1) VALUES ('34.5'); -ERROR: invalid input syntax for type smallint: "34.5" -LINE 1: INSERT INTO INT2_TBL(f1) VALUES ('34.5'); - ^ --- largest and smallest values -INSERT INTO INT2_TBL(f1) VALUES ('32767'); -INSERT INTO INT2_TBL(f1) VALUES ('-32767'); --- bad input values -- should give errors -INSERT INTO INT2_TBL(f1) VALUES ('100000'); -ERROR: value "100000" is out of range for type smallint -LINE 1: INSERT INTO INT2_TBL(f1) VALUES ('100000'); - ^ -INSERT INTO INT2_TBL(f1) VALUES ('asdf'); -ERROR: invalid input syntax for type smallint: "asdf" -LINE 1: INSERT INTO INT2_TBL(f1) VALUES ('asdf'); - ^ -INSERT INTO INT2_TBL(f1) VALUES (' '); -ERROR: invalid input syntax for type smallint: " " -LINE 1: INSERT INTO INT2_TBL(f1) VALUES (' '); - ^ -INSERT INTO INT2_TBL(f1) VALUES ('- 1234'); -ERROR: invalid input syntax for type smallint: "- 1234" -LINE 1: INSERT INTO INT2_TBL(f1) VALUES ('- 1234'); - ^ -INSERT INTO INT2_TBL(f1) VALUES ('4 444'); -ERROR: invalid input syntax for type smallint: "4 444" -LINE 1: INSERT INTO INT2_TBL(f1) VALUES ('4 444'); - ^ -INSERT INTO INT2_TBL(f1) VALUES ('123 dt'); -ERROR: invalid input syntax for type smallint: "123 dt" -LINE 1: INSERT INTO INT2_TBL(f1) VALUES ('123 dt'); - ^ -INSERT INTO INT2_TBL(f1) VALUES (''); -ERROR: invalid input syntax for type smallint: "" -LINE 1: INSERT INTO INT2_TBL(f1) VALUES (''); - ^ -SELECT * FROM INT2_TBL; - f1 --------- - 0 - 1234 - -1234 - 32767 - -32767 -(5 rows) - -SELECT i.* FROM INT2_TBL i WHERE i.f1 <> int2 '0'; - f1 --------- - 1234 - -1234 - 32767 - -32767 -(4 rows) - -SELECT i.* FROM INT2_TBL i WHERE i.f1 <> int4 '0'; - f1 --------- - 1234 - -1234 - 32767 - -32767 -(4 rows) - -SELECT i.* FROM INT2_TBL i WHERE i.f1 = int2 '0'; - f1 ----- - 0 -(1 row) - -SELECT i.* FROM INT2_TBL i WHERE i.f1 = int4 '0'; - f1 ----- - 0 -(1 row) - -SELECT i.* FROM INT2_TBL i WHERE i.f1 < int2 '0'; - f1 --------- - -1234 - -32767 -(2 rows) - -SELECT i.* FROM INT2_TBL i WHERE i.f1 < int4 '0'; - f1 --------- - -1234 - -32767 -(2 rows) - -SELECT i.* FROM INT2_TBL i WHERE i.f1 <= int2 '0'; - f1 --------- - 0 - -1234 - -32767 -(3 rows) - -SELECT i.* FROM INT2_TBL i WHERE i.f1 <= int4 '0'; - f1 --------- - 0 - -1234 - -32767 -(3 rows) - -SELECT i.* FROM INT2_TBL i WHERE i.f1 > int2 '0'; - f1 -------- - 1234 - 32767 -(2 rows) - -SELECT i.* FROM INT2_TBL i WHERE i.f1 > int4 '0'; - f1 -------- - 1234 - 32767 -(2 rows) - -SELECT i.* FROM INT2_TBL i WHERE i.f1 >= int2 '0'; - f1 -------- - 0 - 1234 - 32767 -(3 rows) - -SELECT i.* FROM INT2_TBL i WHERE i.f1 >= int4 '0'; - f1 -------- - 0 - 1234 - 32767 -(3 rows) - --- positive odds -SELECT i.* FROM INT2_TBL i WHERE (i.f1 % int2 '2') = int2 '1'; - f1 -------- - 32767 -(1 row) - --- any evens -SELECT i.* FROM INT2_TBL i WHERE (i.f1 % int4 '2') = int2 '0'; - f1 -------- - 0 - 1234 - -1234 -(3 rows) - -SELECT i.f1, i.f1 * int2 '2' AS x FROM INT2_TBL i; -ERROR: smallint out of range -SELECT i.f1, i.f1 * int2 '2' AS x FROM INT2_TBL i -WHERE abs(f1) < 16384; - f1 | x --------+------- - 0 | 0 - 1234 | 2468 - -1234 | -2468 -(3 rows) - -SELECT i.f1, i.f1 * int4 '2' AS x FROM INT2_TBL i; - f1 | x ---------+-------- - 0 | 0 - 1234 | 2468 - -1234 | -2468 - 32767 | 65534 - -32767 | -65534 -(5 rows) - -SELECT i.f1, i.f1 + int2 '2' AS x FROM INT2_TBL i; -ERROR: smallint out of range -SELECT i.f1, i.f1 + int2 '2' AS x FROM INT2_TBL i -WHERE f1 < 32766; - f1 | x ---------+-------- - 0 | 2 - 1234 | 1236 - -1234 | -1232 - -32767 | -32765 -(4 rows) - -SELECT i.f1, i.f1 + int4 '2' AS x FROM INT2_TBL i; - f1 | x ---------+-------- - 0 | 2 - 1234 | 1236 - -1234 | -1232 - 32767 | 32769 - -32767 | -32765 -(5 rows) - -SELECT i.f1, i.f1 - int2 '2' AS x FROM INT2_TBL i; -ERROR: smallint out of range -SELECT i.f1, i.f1 - int2 '2' AS x FROM INT2_TBL i -WHERE f1 > -32767; - f1 | x --------+------- - 0 | -2 - 1234 | 1232 - -1234 | -1236 - 32767 | 32765 -(4 rows) - -SELECT i.f1, i.f1 - int4 '2' AS x FROM INT2_TBL i; - f1 | x ---------+-------- - 0 | -2 - 1234 | 1232 - -1234 | -1236 - 32767 | 32765 - -32767 | -32769 -(5 rows) - -SELECT i.f1, i.f1 / int2 '2' AS x FROM INT2_TBL i; - f1 | x ---------+-------- - 0 | 0 - 1234 | 617 - -1234 | -617 - 32767 | 16383 - -32767 | -16383 -(5 rows) - -SELECT i.f1, i.f1 / int4 '2' AS x FROM INT2_TBL i; - f1 | x ---------+-------- - 0 | 0 - 1234 | 617 - -1234 | -617 - 32767 | 16383 - -32767 | -16383 -(5 rows) - --- corner cases -SELECT (-1::int2<<15)::text; - text --------- - -32768 -(1 row) - -SELECT ((-1::int2<<15)+1::int2)::text; - text --------- - -32767 -(1 row) - --- check sane handling of INT16_MIN overflow cases -SELECT (-32768)::int2 * (-1)::int2; -ERROR: smallint out of range -SELECT (-32768)::int2 / (-1)::int2; -ERROR: smallint out of range -SELECT (-32768)::int2 % (-1)::int2; - ?column? ----------- - 0 -(1 row) - --- check rounding when casting from float -SELECT x, x::int2 AS int2_value -FROM (VALUES (-2.5::float8), - (-1.5::float8), - (-0.5::float8), - (0.0::float8), - (0.5::float8), - (1.5::float8), - (2.5::float8)) t(x); - x | int2_value -------+------------ - -2.5 | -2 - -1.5 | -2 - -0.5 | 0 - 0 | 0 - 0.5 | 0 - 1.5 | 2 - 2.5 | 2 -(7 rows) - --- check rounding when casting from numeric -SELECT x, x::int2 AS int2_value -FROM (VALUES (-2.5::numeric), - (-1.5::numeric), - (-0.5::numeric), - (0.0::numeric), - (0.5::numeric), - (1.5::numeric), - (2.5::numeric)) t(x); - x | int2_value -------+------------ - -2.5 | -3 - -1.5 | -2 - -0.5 | -1 - 0.0 | 0 - 0.5 | 1 - 1.5 | 2 - 2.5 | 3 -(7 rows) - +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/int4.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/int4.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/int4.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/int4.out 2023-02-20 19:43:31.749205268 -0500 @@ -1,439 +1 @@ --- --- INT4 --- -CREATE TABLE INT4_TBL(f1 int4); -INSERT INTO INT4_TBL(f1) VALUES (' 0 '); -INSERT INTO INT4_TBL(f1) VALUES ('123456 '); -INSERT INTO INT4_TBL(f1) VALUES (' -123456'); -INSERT INTO INT4_TBL(f1) VALUES ('34.5'); -ERROR: invalid input syntax for type integer: "34.5" -LINE 1: INSERT INTO INT4_TBL(f1) VALUES ('34.5'); - ^ --- largest and smallest values -INSERT INTO INT4_TBL(f1) VALUES ('2147483647'); -INSERT INTO INT4_TBL(f1) VALUES ('-2147483647'); --- bad input values -- should give errors -INSERT INTO INT4_TBL(f1) VALUES ('1000000000000'); -ERROR: value "1000000000000" is out of range for type integer -LINE 1: INSERT INTO INT4_TBL(f1) VALUES ('1000000000000'); - ^ -INSERT INTO INT4_TBL(f1) VALUES ('asdf'); -ERROR: invalid input syntax for type integer: "asdf" -LINE 1: INSERT INTO INT4_TBL(f1) VALUES ('asdf'); - ^ -INSERT INTO INT4_TBL(f1) VALUES (' '); -ERROR: invalid input syntax for type integer: " " -LINE 1: INSERT INTO INT4_TBL(f1) VALUES (' '); - ^ -INSERT INTO INT4_TBL(f1) VALUES (' asdf '); -ERROR: invalid input syntax for type integer: " asdf " -LINE 1: INSERT INTO INT4_TBL(f1) VALUES (' asdf '); - ^ -INSERT INTO INT4_TBL(f1) VALUES ('- 1234'); -ERROR: invalid input syntax for type integer: "- 1234" -LINE 1: INSERT INTO INT4_TBL(f1) VALUES ('- 1234'); - ^ -INSERT INTO INT4_TBL(f1) VALUES ('123 5'); -ERROR: invalid input syntax for type integer: "123 5" -LINE 1: INSERT INTO INT4_TBL(f1) VALUES ('123 5'); - ^ -INSERT INTO INT4_TBL(f1) VALUES (''); -ERROR: invalid input syntax for type integer: "" -LINE 1: INSERT INTO INT4_TBL(f1) VALUES (''); - ^ -SELECT * FROM INT4_TBL; - f1 -------------- - 0 - 123456 - -123456 - 2147483647 - -2147483647 -(5 rows) - -SELECT i.* FROM INT4_TBL i WHERE i.f1 <> int2 '0'; - f1 -------------- - 123456 - -123456 - 2147483647 - -2147483647 -(4 rows) - -SELECT i.* FROM INT4_TBL i WHERE i.f1 <> int4 '0'; - f1 -------------- - 123456 - -123456 - 2147483647 - -2147483647 -(4 rows) - -SELECT i.* FROM INT4_TBL i WHERE i.f1 = int2 '0'; - f1 ----- - 0 -(1 row) - -SELECT i.* FROM INT4_TBL i WHERE i.f1 = int4 '0'; - f1 ----- - 0 -(1 row) - -SELECT i.* FROM INT4_TBL i WHERE i.f1 < int2 '0'; - f1 -------------- - -123456 - -2147483647 -(2 rows) - -SELECT i.* FROM INT4_TBL i WHERE i.f1 < int4 '0'; - f1 -------------- - -123456 - -2147483647 -(2 rows) - -SELECT i.* FROM INT4_TBL i WHERE i.f1 <= int2 '0'; - f1 -------------- - 0 - -123456 - -2147483647 -(3 rows) - -SELECT i.* FROM INT4_TBL i WHERE i.f1 <= int4 '0'; - f1 -------------- - 0 - -123456 - -2147483647 -(3 rows) - -SELECT i.* FROM INT4_TBL i WHERE i.f1 > int2 '0'; - f1 ------------- - 123456 - 2147483647 -(2 rows) - -SELECT i.* FROM INT4_TBL i WHERE i.f1 > int4 '0'; - f1 ------------- - 123456 - 2147483647 -(2 rows) - -SELECT i.* FROM INT4_TBL i WHERE i.f1 >= int2 '0'; - f1 ------------- - 0 - 123456 - 2147483647 -(3 rows) - -SELECT i.* FROM INT4_TBL i WHERE i.f1 >= int4 '0'; - f1 ------------- - 0 - 123456 - 2147483647 -(3 rows) - --- positive odds -SELECT i.* FROM INT4_TBL i WHERE (i.f1 % int2 '2') = int2 '1'; - f1 ------------- - 2147483647 -(1 row) - --- any evens -SELECT i.* FROM INT4_TBL i WHERE (i.f1 % int4 '2') = int2 '0'; - f1 ---------- - 0 - 123456 - -123456 -(3 rows) - -SELECT i.f1, i.f1 * int2 '2' AS x FROM INT4_TBL i; -ERROR: integer out of range -SELECT i.f1, i.f1 * int2 '2' AS x FROM INT4_TBL i -WHERE abs(f1) < 1073741824; - f1 | x ----------+--------- - 0 | 0 - 123456 | 246912 - -123456 | -246912 -(3 rows) - -SELECT i.f1, i.f1 * int4 '2' AS x FROM INT4_TBL i; -ERROR: integer out of range -SELECT i.f1, i.f1 * int4 '2' AS x FROM INT4_TBL i -WHERE abs(f1) < 1073741824; - f1 | x ----------+--------- - 0 | 0 - 123456 | 246912 - -123456 | -246912 -(3 rows) - -SELECT i.f1, i.f1 + int2 '2' AS x FROM INT4_TBL i; -ERROR: integer out of range -SELECT i.f1, i.f1 + int2 '2' AS x FROM INT4_TBL i -WHERE f1 < 2147483646; - f1 | x --------------+------------- - 0 | 2 - 123456 | 123458 - -123456 | -123454 - -2147483647 | -2147483645 -(4 rows) - -SELECT i.f1, i.f1 + int4 '2' AS x FROM INT4_TBL i; -ERROR: integer out of range -SELECT i.f1, i.f1 + int4 '2' AS x FROM INT4_TBL i -WHERE f1 < 2147483646; - f1 | x --------------+------------- - 0 | 2 - 123456 | 123458 - -123456 | -123454 - -2147483647 | -2147483645 -(4 rows) - -SELECT i.f1, i.f1 - int2 '2' AS x FROM INT4_TBL i; -ERROR: integer out of range -SELECT i.f1, i.f1 - int2 '2' AS x FROM INT4_TBL i -WHERE f1 > -2147483647; - f1 | x -------------+------------ - 0 | -2 - 123456 | 123454 - -123456 | -123458 - 2147483647 | 2147483645 -(4 rows) - -SELECT i.f1, i.f1 - int4 '2' AS x FROM INT4_TBL i; -ERROR: integer out of range -SELECT i.f1, i.f1 - int4 '2' AS x FROM INT4_TBL i -WHERE f1 > -2147483647; - f1 | x -------------+------------ - 0 | -2 - 123456 | 123454 - -123456 | -123458 - 2147483647 | 2147483645 -(4 rows) - -SELECT i.f1, i.f1 / int2 '2' AS x FROM INT4_TBL i; - f1 | x --------------+------------- - 0 | 0 - 123456 | 61728 - -123456 | -61728 - 2147483647 | 1073741823 - -2147483647 | -1073741823 -(5 rows) - -SELECT i.f1, i.f1 / int4 '2' AS x FROM INT4_TBL i; - f1 | x --------------+------------- - 0 | 0 - 123456 | 61728 - -123456 | -61728 - 2147483647 | 1073741823 - -2147483647 | -1073741823 -(5 rows) - --- --- more complex expressions --- --- variations on unary minus parsing -SELECT -2+3 AS one; - one ------ - 1 -(1 row) - -SELECT 4-2 AS two; - two ------ - 2 -(1 row) - -SELECT 2- -1 AS three; - three -------- - 3 -(1 row) - -SELECT 2 - -2 AS four; - four ------- - 4 -(1 row) - -SELECT int2 '2' * int2 '2' = int2 '16' / int2 '4' AS true; - true ------- - t -(1 row) - -SELECT int4 '2' * int2 '2' = int2 '16' / int4 '4' AS true; - true ------- - t -(1 row) - -SELECT int2 '2' * int4 '2' = int4 '16' / int2 '4' AS true; - true ------- - t -(1 row) - -SELECT int4 '1000' < int4 '999' AS false; - false -------- - f -(1 row) - -SELECT 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 AS ten; - ten ------ - 10 -(1 row) - -SELECT 2 + 2 / 2 AS three; - three -------- - 3 -(1 row) - -SELECT (2 + 2) / 2 AS two; - two ------ - 2 -(1 row) - --- corner case -SELECT (-1::int4<<31)::text; - text -------------- - -2147483648 -(1 row) - -SELECT ((-1::int4<<31)+1)::text; - text -------------- - -2147483647 -(1 row) - --- check sane handling of INT_MIN overflow cases -SELECT (-2147483648)::int4 * (-1)::int4; -ERROR: integer out of range -SELECT (-2147483648)::int4 / (-1)::int4; -ERROR: integer out of range -SELECT (-2147483648)::int4 % (-1)::int4; - ?column? ----------- - 0 -(1 row) - -SELECT (-2147483648)::int4 * (-1)::int2; -ERROR: integer out of range -SELECT (-2147483648)::int4 / (-1)::int2; -ERROR: integer out of range -SELECT (-2147483648)::int4 % (-1)::int2; - ?column? ----------- - 0 -(1 row) - --- check rounding when casting from float -SELECT x, x::int4 AS int4_value -FROM (VALUES (-2.5::float8), - (-1.5::float8), - (-0.5::float8), - (0.0::float8), - (0.5::float8), - (1.5::float8), - (2.5::float8)) t(x); - x | int4_value -------+------------ - -2.5 | -2 - -1.5 | -2 - -0.5 | 0 - 0 | 0 - 0.5 | 0 - 1.5 | 2 - 2.5 | 2 -(7 rows) - --- check rounding when casting from numeric -SELECT x, x::int4 AS int4_value -FROM (VALUES (-2.5::numeric), - (-1.5::numeric), - (-0.5::numeric), - (0.0::numeric), - (0.5::numeric), - (1.5::numeric), - (2.5::numeric)) t(x); - x | int4_value -------+------------ - -2.5 | -3 - -1.5 | -2 - -0.5 | -1 - 0.0 | 0 - 0.5 | 1 - 1.5 | 2 - 2.5 | 3 -(7 rows) - --- test gcd() -SELECT a, b, gcd(a, b), gcd(a, -b), gcd(b, a), gcd(-b, a) -FROM (VALUES (0::int4, 0::int4), - (0::int4, 6410818::int4), - (61866666::int4, 6410818::int4), - (-61866666::int4, 6410818::int4), - ((-2147483648)::int4, 1::int4), - ((-2147483648)::int4, 2147483647::int4), - ((-2147483648)::int4, 1073741824::int4)) AS v(a, b); - a | b | gcd | gcd | gcd | gcd --------------+------------+------------+------------+------------+------------ - 0 | 0 | 0 | 0 | 0 | 0 - 0 | 6410818 | 6410818 | 6410818 | 6410818 | 6410818 - 61866666 | 6410818 | 1466 | 1466 | 1466 | 1466 - -61866666 | 6410818 | 1466 | 1466 | 1466 | 1466 - -2147483648 | 1 | 1 | 1 | 1 | 1 - -2147483648 | 2147483647 | 1 | 1 | 1 | 1 - -2147483648 | 1073741824 | 1073741824 | 1073741824 | 1073741824 | 1073741824 -(7 rows) - -SELECT gcd((-2147483648)::int4, 0::int4); -- overflow -ERROR: integer out of range -SELECT gcd((-2147483648)::int4, (-2147483648)::int4); -- overflow -ERROR: integer out of range --- test lcm() -SELECT a, b, lcm(a, b), lcm(a, -b), lcm(b, a), lcm(-b, a) -FROM (VALUES (0::int4, 0::int4), - (0::int4, 42::int4), - (42::int4, 42::int4), - (330::int4, 462::int4), - (-330::int4, 462::int4), - ((-2147483648)::int4, 0::int4)) AS v(a, b); - a | b | lcm | lcm | lcm | lcm --------------+-----+------+------+------+------ - 0 | 0 | 0 | 0 | 0 | 0 - 0 | 42 | 0 | 0 | 0 | 0 - 42 | 42 | 42 | 42 | 42 | 42 - 330 | 462 | 2310 | 2310 | 2310 | 2310 - -330 | 462 | 2310 | 2310 | 2310 | 2310 - -2147483648 | 0 | 0 | 0 | 0 | 0 -(6 rows) - -SELECT lcm((-2147483648)::int4, 1::int4); -- overflow -ERROR: integer out of range -SELECT lcm(2147483647::int4, 2147483646::int4); -- overflow -ERROR: integer out of range +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/int8.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/int8.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/int8.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/int8.out 2023-02-20 19:43:31.729205267 -0500 @@ -1,934 +1 @@ --- --- INT8 --- Test int8 64-bit integers. --- -CREATE TABLE INT8_TBL(q1 int8, q2 int8); -INSERT INTO INT8_TBL VALUES(' 123 ',' 456'); -INSERT INTO INT8_TBL VALUES('123 ','4567890123456789'); -INSERT INTO INT8_TBL VALUES('4567890123456789','123'); -INSERT INTO INT8_TBL VALUES(+4567890123456789,'4567890123456789'); -INSERT INTO INT8_TBL VALUES('+4567890123456789','-4567890123456789'); --- bad inputs -INSERT INTO INT8_TBL(q1) VALUES (' '); -ERROR: invalid input syntax for type bigint: " " -LINE 1: INSERT INTO INT8_TBL(q1) VALUES (' '); - ^ -INSERT INTO INT8_TBL(q1) VALUES ('xxx'); -ERROR: invalid input syntax for type bigint: "xxx" -LINE 1: INSERT INTO INT8_TBL(q1) VALUES ('xxx'); - ^ -INSERT INTO INT8_TBL(q1) VALUES ('3908203590239580293850293850329485'); -ERROR: value "3908203590239580293850293850329485" is out of range for type bigint -LINE 1: INSERT INTO INT8_TBL(q1) VALUES ('39082035902395802938502938... - ^ -INSERT INTO INT8_TBL(q1) VALUES ('-1204982019841029840928340329840934'); -ERROR: value "-1204982019841029840928340329840934" is out of range for type bigint -LINE 1: INSERT INTO INT8_TBL(q1) VALUES ('-1204982019841029840928340... - ^ -INSERT INTO INT8_TBL(q1) VALUES ('- 123'); -ERROR: invalid input syntax for type bigint: "- 123" -LINE 1: INSERT INTO INT8_TBL(q1) VALUES ('- 123'); - ^ -INSERT INTO INT8_TBL(q1) VALUES (' 345 5'); -ERROR: invalid input syntax for type bigint: " 345 5" -LINE 1: INSERT INTO INT8_TBL(q1) VALUES (' 345 5'); - ^ -INSERT INTO INT8_TBL(q1) VALUES (''); -ERROR: invalid input syntax for type bigint: "" -LINE 1: INSERT INTO INT8_TBL(q1) VALUES (''); - ^ -SELECT * FROM INT8_TBL; - q1 | q2 -------------------+------------------- - 123 | 456 - 123 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(5 rows) - --- int8/int8 cmp -SELECT * FROM INT8_TBL WHERE q2 = 4567890123456789; - q1 | q2 -------------------+------------------ - 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 -(2 rows) - -SELECT * FROM INT8_TBL WHERE q2 <> 4567890123456789; - q1 | q2 -------------------+------------------- - 123 | 456 - 4567890123456789 | 123 - 4567890123456789 | -4567890123456789 -(3 rows) - -SELECT * FROM INT8_TBL WHERE q2 < 4567890123456789; - q1 | q2 -------------------+------------------- - 123 | 456 - 4567890123456789 | 123 - 4567890123456789 | -4567890123456789 -(3 rows) - -SELECT * FROM INT8_TBL WHERE q2 > 4567890123456789; - q1 | q2 -----+---- -(0 rows) - -SELECT * FROM INT8_TBL WHERE q2 <= 4567890123456789; - q1 | q2 -------------------+------------------- - 123 | 456 - 123 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(5 rows) - -SELECT * FROM INT8_TBL WHERE q2 >= 4567890123456789; - q1 | q2 -------------------+------------------ - 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 -(2 rows) - --- int8/int4 cmp -SELECT * FROM INT8_TBL WHERE q2 = 456; - q1 | q2 ------+----- - 123 | 456 -(1 row) - -SELECT * FROM INT8_TBL WHERE q2 <> 456; - q1 | q2 -------------------+------------------- - 123 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(4 rows) - -SELECT * FROM INT8_TBL WHERE q2 < 456; - q1 | q2 -------------------+------------------- - 4567890123456789 | 123 - 4567890123456789 | -4567890123456789 -(2 rows) - -SELECT * FROM INT8_TBL WHERE q2 > 456; - q1 | q2 -------------------+------------------ - 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 -(2 rows) - -SELECT * FROM INT8_TBL WHERE q2 <= 456; - q1 | q2 -------------------+------------------- - 123 | 456 - 4567890123456789 | 123 - 4567890123456789 | -4567890123456789 -(3 rows) - -SELECT * FROM INT8_TBL WHERE q2 >= 456; - q1 | q2 -------------------+------------------ - 123 | 456 - 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 -(3 rows) - --- int4/int8 cmp -SELECT * FROM INT8_TBL WHERE 123 = q1; - q1 | q2 ------+------------------ - 123 | 456 - 123 | 4567890123456789 -(2 rows) - -SELECT * FROM INT8_TBL WHERE 123 <> q1; - q1 | q2 -------------------+------------------- - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(3 rows) - -SELECT * FROM INT8_TBL WHERE 123 < q1; - q1 | q2 -------------------+------------------- - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(3 rows) - -SELECT * FROM INT8_TBL WHERE 123 > q1; - q1 | q2 -----+---- -(0 rows) - -SELECT * FROM INT8_TBL WHERE 123 <= q1; - q1 | q2 -------------------+------------------- - 123 | 456 - 123 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(5 rows) - -SELECT * FROM INT8_TBL WHERE 123 >= q1; - q1 | q2 ------+------------------ - 123 | 456 - 123 | 4567890123456789 -(2 rows) - --- int8/int2 cmp -SELECT * FROM INT8_TBL WHERE q2 = '456'::int2; - q1 | q2 ------+----- - 123 | 456 -(1 row) - -SELECT * FROM INT8_TBL WHERE q2 <> '456'::int2; - q1 | q2 -------------------+------------------- - 123 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(4 rows) - -SELECT * FROM INT8_TBL WHERE q2 < '456'::int2; - q1 | q2 -------------------+------------------- - 4567890123456789 | 123 - 4567890123456789 | -4567890123456789 -(2 rows) - -SELECT * FROM INT8_TBL WHERE q2 > '456'::int2; - q1 | q2 -------------------+------------------ - 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 -(2 rows) - -SELECT * FROM INT8_TBL WHERE q2 <= '456'::int2; - q1 | q2 -------------------+------------------- - 123 | 456 - 4567890123456789 | 123 - 4567890123456789 | -4567890123456789 -(3 rows) - -SELECT * FROM INT8_TBL WHERE q2 >= '456'::int2; - q1 | q2 -------------------+------------------ - 123 | 456 - 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 -(3 rows) - --- int2/int8 cmp -SELECT * FROM INT8_TBL WHERE '123'::int2 = q1; - q1 | q2 ------+------------------ - 123 | 456 - 123 | 4567890123456789 -(2 rows) - -SELECT * FROM INT8_TBL WHERE '123'::int2 <> q1; - q1 | q2 -------------------+------------------- - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(3 rows) - -SELECT * FROM INT8_TBL WHERE '123'::int2 < q1; - q1 | q2 -------------------+------------------- - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(3 rows) - -SELECT * FROM INT8_TBL WHERE '123'::int2 > q1; - q1 | q2 -----+---- -(0 rows) - -SELECT * FROM INT8_TBL WHERE '123'::int2 <= q1; - q1 | q2 -------------------+------------------- - 123 | 456 - 123 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(5 rows) - -SELECT * FROM INT8_TBL WHERE '123'::int2 >= q1; - q1 | q2 ------+------------------ - 123 | 456 - 123 | 4567890123456789 -(2 rows) - -SELECT q1 AS plus, -q1 AS minus FROM INT8_TBL; - plus | minus -------------------+------------------- - 123 | -123 - 123 | -123 - 4567890123456789 | -4567890123456789 - 4567890123456789 | -4567890123456789 - 4567890123456789 | -4567890123456789 -(5 rows) - -SELECT q1, q2, q1 + q2 AS plus FROM INT8_TBL; - q1 | q2 | plus -------------------+-------------------+------------------ - 123 | 456 | 579 - 123 | 4567890123456789 | 4567890123456912 - 4567890123456789 | 123 | 4567890123456912 - 4567890123456789 | 4567890123456789 | 9135780246913578 - 4567890123456789 | -4567890123456789 | 0 -(5 rows) - -SELECT q1, q2, q1 - q2 AS minus FROM INT8_TBL; - q1 | q2 | minus -------------------+-------------------+------------------- - 123 | 456 | -333 - 123 | 4567890123456789 | -4567890123456666 - 4567890123456789 | 123 | 4567890123456666 - 4567890123456789 | 4567890123456789 | 0 - 4567890123456789 | -4567890123456789 | 9135780246913578 -(5 rows) - -SELECT q1, q2, q1 * q2 AS multiply FROM INT8_TBL; -ERROR: bigint out of range -SELECT q1, q2, q1 * q2 AS multiply FROM INT8_TBL - WHERE q1 < 1000 or (q2 > 0 and q2 < 1000); - q1 | q2 | multiply -------------------+------------------+-------------------- - 123 | 456 | 56088 - 123 | 4567890123456789 | 561850485185185047 - 4567890123456789 | 123 | 561850485185185047 -(3 rows) - -SELECT q1, q2, q1 / q2 AS divide, q1 % q2 AS mod FROM INT8_TBL; - q1 | q2 | divide | mod -------------------+-------------------+----------------+----- - 123 | 456 | 0 | 123 - 123 | 4567890123456789 | 0 | 123 - 4567890123456789 | 123 | 37137318076884 | 57 - 4567890123456789 | 4567890123456789 | 1 | 0 - 4567890123456789 | -4567890123456789 | -1 | 0 -(5 rows) - -SELECT q1, float8(q1) FROM INT8_TBL; - q1 | float8 -------------------+----------------------- - 123 | 123 - 123 | 123 - 4567890123456789 | 4.567890123456789e+15 - 4567890123456789 | 4.567890123456789e+15 - 4567890123456789 | 4.567890123456789e+15 -(5 rows) - -SELECT q2, float8(q2) FROM INT8_TBL; - q2 | float8 --------------------+------------------------ - 456 | 456 - 4567890123456789 | 4.567890123456789e+15 - 123 | 123 - 4567890123456789 | 4.567890123456789e+15 - -4567890123456789 | -4.567890123456789e+15 -(5 rows) - -SELECT 37 + q1 AS plus4 FROM INT8_TBL; - plus4 ------------------- - 160 - 160 - 4567890123456826 - 4567890123456826 - 4567890123456826 -(5 rows) - -SELECT 37 - q1 AS minus4 FROM INT8_TBL; - minus4 -------------------- - -86 - -86 - -4567890123456752 - -4567890123456752 - -4567890123456752 -(5 rows) - -SELECT 2 * q1 AS "twice int4" FROM INT8_TBL; - twice int4 ------------------- - 246 - 246 - 9135780246913578 - 9135780246913578 - 9135780246913578 -(5 rows) - -SELECT q1 * 2 AS "twice int4" FROM INT8_TBL; - twice int4 ------------------- - 246 - 246 - 9135780246913578 - 9135780246913578 - 9135780246913578 -(5 rows) - --- int8 op int4 -SELECT q1 + 42::int4 AS "8plus4", q1 - 42::int4 AS "8minus4", q1 * 42::int4 AS "8mul4", q1 / 42::int4 AS "8div4" FROM INT8_TBL; - 8plus4 | 8minus4 | 8mul4 | 8div4 -------------------+------------------+--------------------+----------------- - 165 | 81 | 5166 | 2 - 165 | 81 | 5166 | 2 - 4567890123456831 | 4567890123456747 | 191851385185185138 | 108759288653733 - 4567890123456831 | 4567890123456747 | 191851385185185138 | 108759288653733 - 4567890123456831 | 4567890123456747 | 191851385185185138 | 108759288653733 -(5 rows) - --- int4 op int8 -SELECT 246::int4 + q1 AS "4plus8", 246::int4 - q1 AS "4minus8", 246::int4 * q1 AS "4mul8", 246::int4 / q1 AS "4div8" FROM INT8_TBL; - 4plus8 | 4minus8 | 4mul8 | 4div8 -------------------+-------------------+---------------------+------- - 369 | 123 | 30258 | 2 - 369 | 123 | 30258 | 2 - 4567890123457035 | -4567890123456543 | 1123700970370370094 | 0 - 4567890123457035 | -4567890123456543 | 1123700970370370094 | 0 - 4567890123457035 | -4567890123456543 | 1123700970370370094 | 0 -(5 rows) - --- int8 op int2 -SELECT q1 + 42::int2 AS "8plus2", q1 - 42::int2 AS "8minus2", q1 * 42::int2 AS "8mul2", q1 / 42::int2 AS "8div2" FROM INT8_TBL; - 8plus2 | 8minus2 | 8mul2 | 8div2 -------------------+------------------+--------------------+----------------- - 165 | 81 | 5166 | 2 - 165 | 81 | 5166 | 2 - 4567890123456831 | 4567890123456747 | 191851385185185138 | 108759288653733 - 4567890123456831 | 4567890123456747 | 191851385185185138 | 108759288653733 - 4567890123456831 | 4567890123456747 | 191851385185185138 | 108759288653733 -(5 rows) - --- int2 op int8 -SELECT 246::int2 + q1 AS "2plus8", 246::int2 - q1 AS "2minus8", 246::int2 * q1 AS "2mul8", 246::int2 / q1 AS "2div8" FROM INT8_TBL; - 2plus8 | 2minus8 | 2mul8 | 2div8 -------------------+-------------------+---------------------+------- - 369 | 123 | 30258 | 2 - 369 | 123 | 30258 | 2 - 4567890123457035 | -4567890123456543 | 1123700970370370094 | 0 - 4567890123457035 | -4567890123456543 | 1123700970370370094 | 0 - 4567890123457035 | -4567890123456543 | 1123700970370370094 | 0 -(5 rows) - -SELECT q2, abs(q2) FROM INT8_TBL; - q2 | abs --------------------+------------------ - 456 | 456 - 4567890123456789 | 4567890123456789 - 123 | 123 - 4567890123456789 | 4567890123456789 - -4567890123456789 | 4567890123456789 -(5 rows) - -SELECT min(q1), min(q2) FROM INT8_TBL; - min | min ------+------------------- - 123 | -4567890123456789 -(1 row) - -SELECT max(q1), max(q2) FROM INT8_TBL; - max | max -------------------+------------------ - 4567890123456789 | 4567890123456789 -(1 row) - --- TO_CHAR() --- -SELECT to_char(q1, '9G999G999G999G999G999'), to_char(q2, '9,999,999,999,999,999') - FROM INT8_TBL; - to_char | to_char -------------------------+------------------------ - 123 | 456 - 123 | 4,567,890,123,456,789 - 4,567,890,123,456,789 | 123 - 4,567,890,123,456,789 | 4,567,890,123,456,789 - 4,567,890,123,456,789 | -4,567,890,123,456,789 -(5 rows) - -SELECT to_char(q1, '9G999G999G999G999G999D999G999'), to_char(q2, '9,999,999,999,999,999.999,999') - FROM INT8_TBL; - to_char | to_char ---------------------------------+-------------------------------- - 123.000,000 | 456.000,000 - 123.000,000 | 4,567,890,123,456,789.000,000 - 4,567,890,123,456,789.000,000 | 123.000,000 - 4,567,890,123,456,789.000,000 | 4,567,890,123,456,789.000,000 - 4,567,890,123,456,789.000,000 | -4,567,890,123,456,789.000,000 -(5 rows) - -SELECT to_char( (q1 * -1), '9999999999999999PR'), to_char( (q2 * -1), '9999999999999999.999PR') - FROM INT8_TBL; - to_char | to_char ---------------------+------------------------ - <123> | <456.000> - <123> | <4567890123456789.000> - <4567890123456789> | <123.000> - <4567890123456789> | <4567890123456789.000> - <4567890123456789> | 4567890123456789.000 -(5 rows) - -SELECT to_char( (q1 * -1), '9999999999999999S'), to_char( (q2 * -1), 'S9999999999999999') - FROM INT8_TBL; - to_char | to_char --------------------+------------------- - 123- | -456 - 123- | -4567890123456789 - 4567890123456789- | -123 - 4567890123456789- | -4567890123456789 - 4567890123456789- | +4567890123456789 -(5 rows) - -SELECT to_char(q2, 'MI9999999999999999') FROM INT8_TBL; - to_char -------------------- - 456 - 4567890123456789 - 123 - 4567890123456789 - -4567890123456789 -(5 rows) - -SELECT to_char(q2, 'FMS9999999999999999') FROM INT8_TBL; - to_char -------------------- - +456 - +4567890123456789 - +123 - +4567890123456789 - -4567890123456789 -(5 rows) - -SELECT to_char(q2, 'FM9999999999999999THPR') FROM INT8_TBL; - to_char --------------------- - 456TH - 4567890123456789TH - 123RD - 4567890123456789TH - <4567890123456789> -(5 rows) - -SELECT to_char(q2, 'SG9999999999999999th') FROM INT8_TBL; - to_char ---------------------- - + 456th - +4567890123456789th - + 123rd - +4567890123456789th - -4567890123456789 -(5 rows) - -SELECT to_char(q2, '0999999999999999') FROM INT8_TBL; - to_char -------------------- - 0000000000000456 - 4567890123456789 - 0000000000000123 - 4567890123456789 - -4567890123456789 -(5 rows) - -SELECT to_char(q2, 'S0999999999999999') FROM INT8_TBL; - to_char -------------------- - +0000000000000456 - +4567890123456789 - +0000000000000123 - +4567890123456789 - -4567890123456789 -(5 rows) - -SELECT to_char(q2, 'FM0999999999999999') FROM INT8_TBL; - to_char -------------------- - 0000000000000456 - 4567890123456789 - 0000000000000123 - 4567890123456789 - -4567890123456789 -(5 rows) - -SELECT to_char(q2, 'FM9999999999999999.000') FROM INT8_TBL; - to_char ------------------------ - 456.000 - 4567890123456789.000 - 123.000 - 4567890123456789.000 - -4567890123456789.000 -(5 rows) - -SELECT to_char(q2, 'L9999999999999999.000') FROM INT8_TBL; - to_char ------------------------- - 456.000 - 4567890123456789.000 - 123.000 - 4567890123456789.000 - -4567890123456789.000 -(5 rows) - -SELECT to_char(q2, 'FM9999999999999999.999') FROM INT8_TBL; - to_char --------------------- - 456. - 4567890123456789. - 123. - 4567890123456789. - -4567890123456789. -(5 rows) - -SELECT to_char(q2, 'S 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 . 9 9 9') FROM INT8_TBL; - to_char -------------------------------------------- - +4 5 6 . 0 0 0 - +4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 . 0 0 0 - +1 2 3 . 0 0 0 - +4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 . 0 0 0 - -4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 . 0 0 0 -(5 rows) - -SELECT to_char(q2, E'99999 "text" 9999 "9999" 999 "\\"text between quote marks\\"" 9999') FROM INT8_TBL; - to_char ------------------------------------------------------------ - text 9999 "text between quote marks" 456 - 45678 text 9012 9999 345 "text between quote marks" 6789 - text 9999 "text between quote marks" 123 - 45678 text 9012 9999 345 "text between quote marks" 6789 - -45678 text 9012 9999 345 "text between quote marks" 6789 -(5 rows) - -SELECT to_char(q2, '999999SG9999999999') FROM INT8_TBL; - to_char -------------------- - + 456 - 456789+0123456789 - + 123 - 456789+0123456789 - 456789-0123456789 -(5 rows) - --- check min/max values and overflow behavior -select '-9223372036854775808'::int8; - int8 ----------------------- - -9223372036854775808 -(1 row) - -select '-9223372036854775809'::int8; -ERROR: value "-9223372036854775809" is out of range for type bigint -LINE 1: select '-9223372036854775809'::int8; - ^ -select '9223372036854775807'::int8; - int8 ---------------------- - 9223372036854775807 -(1 row) - -select '9223372036854775808'::int8; -ERROR: value "9223372036854775808" is out of range for type bigint -LINE 1: select '9223372036854775808'::int8; - ^ -select -('-9223372036854775807'::int8); - ?column? ---------------------- - 9223372036854775807 -(1 row) - -select -('-9223372036854775808'::int8); -ERROR: bigint out of range -select '9223372036854775800'::int8 + '9223372036854775800'::int8; -ERROR: bigint out of range -select '-9223372036854775800'::int8 + '-9223372036854775800'::int8; -ERROR: bigint out of range -select '9223372036854775800'::int8 - '-9223372036854775800'::int8; -ERROR: bigint out of range -select '-9223372036854775800'::int8 - '9223372036854775800'::int8; -ERROR: bigint out of range -select '9223372036854775800'::int8 * '9223372036854775800'::int8; -ERROR: bigint out of range -select '9223372036854775800'::int8 / '0'::int8; -ERROR: division by zero -select '9223372036854775800'::int8 % '0'::int8; -ERROR: division by zero -select abs('-9223372036854775808'::int8); -ERROR: bigint out of range -select '9223372036854775800'::int8 + '100'::int4; -ERROR: bigint out of range -select '-9223372036854775800'::int8 - '100'::int4; -ERROR: bigint out of range -select '9223372036854775800'::int8 * '100'::int4; -ERROR: bigint out of range -select '100'::int4 + '9223372036854775800'::int8; -ERROR: bigint out of range -select '-100'::int4 - '9223372036854775800'::int8; -ERROR: bigint out of range -select '100'::int4 * '9223372036854775800'::int8; -ERROR: bigint out of range -select '9223372036854775800'::int8 + '100'::int2; -ERROR: bigint out of range -select '-9223372036854775800'::int8 - '100'::int2; -ERROR: bigint out of range -select '9223372036854775800'::int8 * '100'::int2; -ERROR: bigint out of range -select '-9223372036854775808'::int8 / '0'::int2; -ERROR: division by zero -select '100'::int2 + '9223372036854775800'::int8; -ERROR: bigint out of range -select '-100'::int2 - '9223372036854775800'::int8; -ERROR: bigint out of range -select '100'::int2 * '9223372036854775800'::int8; -ERROR: bigint out of range -select '100'::int2 / '0'::int8; -ERROR: division by zero -SELECT CAST(q1 AS int4) FROM int8_tbl WHERE q2 = 456; - q1 ------ - 123 -(1 row) - -SELECT CAST(q1 AS int4) FROM int8_tbl WHERE q2 <> 456; -ERROR: integer out of range -SELECT CAST(q1 AS int2) FROM int8_tbl WHERE q2 = 456; - q1 ------ - 123 -(1 row) - -SELECT CAST(q1 AS int2) FROM int8_tbl WHERE q2 <> 456; -ERROR: smallint out of range -SELECT CAST('42'::int2 AS int8), CAST('-37'::int2 AS int8); - int8 | int8 -------+------ - 42 | -37 -(1 row) - -SELECT CAST(q1 AS float4), CAST(q2 AS float8) FROM INT8_TBL; - q1 | q2 --------------+------------------------ - 123 | 456 - 123 | 4.567890123456789e+15 - 4.56789e+15 | 123 - 4.56789e+15 | 4.567890123456789e+15 - 4.56789e+15 | -4.567890123456789e+15 -(5 rows) - -SELECT CAST('36854775807.0'::float4 AS int8); - int8 -------------- - 36854775808 -(1 row) - -SELECT CAST('922337203685477580700.0'::float8 AS int8); -ERROR: bigint out of range -SELECT CAST(q1 AS oid) FROM INT8_TBL; -ERROR: OID out of range -SELECT oid::int8 FROM pg_class WHERE relname = 'pg_class'; - oid ------- - 1259 -(1 row) - --- bit operations -SELECT q1, q2, q1 & q2 AS "and", q1 | q2 AS "or", q1 # q2 AS "xor", ~q1 AS "not" FROM INT8_TBL; - q1 | q2 | and | or | xor | not -------------------+-------------------+------------------+------------------+------------------+------------------- - 123 | 456 | 72 | 507 | 435 | -124 - 123 | 4567890123456789 | 17 | 4567890123456895 | 4567890123456878 | -124 - 4567890123456789 | 123 | 17 | 4567890123456895 | 4567890123456878 | -4567890123456790 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 0 | -4567890123456790 - 4567890123456789 | -4567890123456789 | 1 | -1 | -2 | -4567890123456790 -(5 rows) - -SELECT q1, q1 << 2 AS "shl", q1 >> 3 AS "shr" FROM INT8_TBL; - q1 | shl | shr -------------------+-------------------+----------------- - 123 | 492 | 15 - 123 | 492 | 15 - 4567890123456789 | 18271560493827156 | 570986265432098 - 4567890123456789 | 18271560493827156 | 570986265432098 - 4567890123456789 | 18271560493827156 | 570986265432098 -(5 rows) - --- generate_series -SELECT * FROM generate_series('+4567890123456789'::int8, '+4567890123456799'::int8); - generate_series ------------------- - 4567890123456789 - 4567890123456790 - 4567890123456791 - 4567890123456792 - 4567890123456793 - 4567890123456794 - 4567890123456795 - 4567890123456796 - 4567890123456797 - 4567890123456798 - 4567890123456799 -(11 rows) - -SELECT * FROM generate_series('+4567890123456789'::int8, '+4567890123456799'::int8, 0); -ERROR: step size cannot equal zero -SELECT * FROM generate_series('+4567890123456789'::int8, '+4567890123456799'::int8, 2); - generate_series ------------------- - 4567890123456789 - 4567890123456791 - 4567890123456793 - 4567890123456795 - 4567890123456797 - 4567890123456799 -(6 rows) - --- corner case -SELECT (-1::int8<<63)::text; - text ----------------------- - -9223372036854775808 -(1 row) - -SELECT ((-1::int8<<63)+1)::text; - text ----------------------- - -9223372036854775807 -(1 row) - --- check sane handling of INT64_MIN overflow cases -SELECT (-9223372036854775808)::int8 * (-1)::int8; -ERROR: bigint out of range -SELECT (-9223372036854775808)::int8 / (-1)::int8; -ERROR: bigint out of range -SELECT (-9223372036854775808)::int8 % (-1)::int8; - ?column? ----------- - 0 -(1 row) - -SELECT (-9223372036854775808)::int8 * (-1)::int4; -ERROR: bigint out of range -SELECT (-9223372036854775808)::int8 / (-1)::int4; -ERROR: bigint out of range -SELECT (-9223372036854775808)::int8 % (-1)::int4; - ?column? ----------- - 0 -(1 row) - -SELECT (-9223372036854775808)::int8 * (-1)::int2; -ERROR: bigint out of range -SELECT (-9223372036854775808)::int8 / (-1)::int2; -ERROR: bigint out of range -SELECT (-9223372036854775808)::int8 % (-1)::int2; - ?column? ----------- - 0 -(1 row) - --- check rounding when casting from float -SELECT x, x::int8 AS int8_value -FROM (VALUES (-2.5::float8), - (-1.5::float8), - (-0.5::float8), - (0.0::float8), - (0.5::float8), - (1.5::float8), - (2.5::float8)) t(x); - x | int8_value -------+------------ - -2.5 | -2 - -1.5 | -2 - -0.5 | 0 - 0 | 0 - 0.5 | 0 - 1.5 | 2 - 2.5 | 2 -(7 rows) - --- check rounding when casting from numeric -SELECT x, x::int8 AS int8_value -FROM (VALUES (-2.5::numeric), - (-1.5::numeric), - (-0.5::numeric), - (0.0::numeric), - (0.5::numeric), - (1.5::numeric), - (2.5::numeric)) t(x); - x | int8_value -------+------------ - -2.5 | -3 - -1.5 | -2 - -0.5 | -1 - 0.0 | 0 - 0.5 | 1 - 1.5 | 2 - 2.5 | 3 -(7 rows) - --- test gcd() -SELECT a, b, gcd(a, b), gcd(a, -b), gcd(b, a), gcd(-b, a) -FROM (VALUES (0::int8, 0::int8), - (0::int8, 29893644334::int8), - (288484263558::int8, 29893644334::int8), - (-288484263558::int8, 29893644334::int8), - ((-9223372036854775808)::int8, 1::int8), - ((-9223372036854775808)::int8, 9223372036854775807::int8), - ((-9223372036854775808)::int8, 4611686018427387904::int8)) AS v(a, b); - a | b | gcd | gcd | gcd | gcd -----------------------+---------------------+---------------------+---------------------+---------------------+--------------------- - 0 | 0 | 0 | 0 | 0 | 0 - 0 | 29893644334 | 29893644334 | 29893644334 | 29893644334 | 29893644334 - 288484263558 | 29893644334 | 6835958 | 6835958 | 6835958 | 6835958 - -288484263558 | 29893644334 | 6835958 | 6835958 | 6835958 | 6835958 - -9223372036854775808 | 1 | 1 | 1 | 1 | 1 - -9223372036854775808 | 9223372036854775807 | 1 | 1 | 1 | 1 - -9223372036854775808 | 4611686018427387904 | 4611686018427387904 | 4611686018427387904 | 4611686018427387904 | 4611686018427387904 -(7 rows) - -SELECT gcd((-9223372036854775808)::int8, 0::int8); -- overflow -ERROR: bigint out of range -SELECT gcd((-9223372036854775808)::int8, (-9223372036854775808)::int8); -- overflow -ERROR: bigint out of range --- test lcm() -SELECT a, b, lcm(a, b), lcm(a, -b), lcm(b, a), lcm(-b, a) -FROM (VALUES (0::int8, 0::int8), - (0::int8, 29893644334::int8), - (29893644334::int8, 29893644334::int8), - (288484263558::int8, 29893644334::int8), - (-288484263558::int8, 29893644334::int8), - ((-9223372036854775808)::int8, 0::int8)) AS v(a, b); - a | b | lcm | lcm | lcm | lcm -----------------------+-------------+------------------+------------------+------------------+------------------ - 0 | 0 | 0 | 0 | 0 | 0 - 0 | 29893644334 | 0 | 0 | 0 | 0 - 29893644334 | 29893644334 | 29893644334 | 29893644334 | 29893644334 | 29893644334 - 288484263558 | 29893644334 | 1261541684539134 | 1261541684539134 | 1261541684539134 | 1261541684539134 - -288484263558 | 29893644334 | 1261541684539134 | 1261541684539134 | 1261541684539134 | 1261541684539134 - -9223372036854775808 | 0 | 0 | 0 | 0 | 0 -(6 rows) - -SELECT lcm((-9223372036854775808)::int8, 1::int8); -- overflow -ERROR: bigint out of range -SELECT lcm(9223372036854775807::int8, 9223372036854775806::int8); -- overflow -ERROR: bigint out of range +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/oid.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/oid.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/oid.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/oid.out 2023-02-20 19:43:31.739205268 -0500 @@ -1,122 +1 @@ --- --- OID --- -CREATE TABLE OID_TBL(f1 oid); -INSERT INTO OID_TBL(f1) VALUES ('1234'); -INSERT INTO OID_TBL(f1) VALUES ('1235'); -INSERT INTO OID_TBL(f1) VALUES ('987'); -INSERT INTO OID_TBL(f1) VALUES ('-1040'); -INSERT INTO OID_TBL(f1) VALUES ('99999999'); -INSERT INTO OID_TBL(f1) VALUES ('5 '); -INSERT INTO OID_TBL(f1) VALUES (' 10 '); --- leading/trailing hard tab is also allowed -INSERT INTO OID_TBL(f1) VALUES (' 15 '); --- bad inputs -INSERT INTO OID_TBL(f1) VALUES (''); -ERROR: invalid input syntax for type oid: "" -LINE 1: INSERT INTO OID_TBL(f1) VALUES (''); - ^ -INSERT INTO OID_TBL(f1) VALUES (' '); -ERROR: invalid input syntax for type oid: " " -LINE 1: INSERT INTO OID_TBL(f1) VALUES (' '); - ^ -INSERT INTO OID_TBL(f1) VALUES ('asdfasd'); -ERROR: invalid input syntax for type oid: "asdfasd" -LINE 1: INSERT INTO OID_TBL(f1) VALUES ('asdfasd'); - ^ -INSERT INTO OID_TBL(f1) VALUES ('99asdfasd'); -ERROR: invalid input syntax for type oid: "99asdfasd" -LINE 1: INSERT INTO OID_TBL(f1) VALUES ('99asdfasd'); - ^ -INSERT INTO OID_TBL(f1) VALUES ('5 d'); -ERROR: invalid input syntax for type oid: "5 d" -LINE 1: INSERT INTO OID_TBL(f1) VALUES ('5 d'); - ^ -INSERT INTO OID_TBL(f1) VALUES (' 5d'); -ERROR: invalid input syntax for type oid: " 5d" -LINE 1: INSERT INTO OID_TBL(f1) VALUES (' 5d'); - ^ -INSERT INTO OID_TBL(f1) VALUES ('5 5'); -ERROR: invalid input syntax for type oid: "5 5" -LINE 1: INSERT INTO OID_TBL(f1) VALUES ('5 5'); - ^ -INSERT INTO OID_TBL(f1) VALUES (' - 500'); -ERROR: invalid input syntax for type oid: " - 500" -LINE 1: INSERT INTO OID_TBL(f1) VALUES (' - 500'); - ^ -INSERT INTO OID_TBL(f1) VALUES ('32958209582039852935'); -ERROR: value "32958209582039852935" is out of range for type oid -LINE 1: INSERT INTO OID_TBL(f1) VALUES ('32958209582039852935'); - ^ -INSERT INTO OID_TBL(f1) VALUES ('-23582358720398502385'); -ERROR: value "-23582358720398502385" is out of range for type oid -LINE 1: INSERT INTO OID_TBL(f1) VALUES ('-23582358720398502385'); - ^ -SELECT * FROM OID_TBL; - f1 ------------- - 1234 - 1235 - 987 - 4294966256 - 99999999 - 5 - 10 - 15 -(8 rows) - -SELECT o.* FROM OID_TBL o WHERE o.f1 = 1234; - f1 ------- - 1234 -(1 row) - -SELECT o.* FROM OID_TBL o WHERE o.f1 <> '1234'; - f1 ------------- - 1235 - 987 - 4294966256 - 99999999 - 5 - 10 - 15 -(7 rows) - -SELECT o.* FROM OID_TBL o WHERE o.f1 <= '1234'; - f1 ------- - 1234 - 987 - 5 - 10 - 15 -(5 rows) - -SELECT o.* FROM OID_TBL o WHERE o.f1 < '1234'; - f1 ------ - 987 - 5 - 10 - 15 -(4 rows) - -SELECT o.* FROM OID_TBL o WHERE o.f1 >= '1234'; - f1 ------------- - 1234 - 1235 - 4294966256 - 99999999 -(4 rows) - -SELECT o.* FROM OID_TBL o WHERE o.f1 > '1234'; - f1 ------------- - 1235 - 4294966256 - 99999999 -(3 rows) - -DROP TABLE OID_TBL; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/float4.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/float4.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/float4.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/float4.out 2023-02-20 19:43:31.759205269 -0500 @@ -1,961 +1 @@ --- --- FLOAT4 --- -CREATE TABLE FLOAT4_TBL (f1 float4); -INSERT INTO FLOAT4_TBL(f1) VALUES (' 0.0'); -INSERT INTO FLOAT4_TBL(f1) VALUES ('1004.30 '); -INSERT INTO FLOAT4_TBL(f1) VALUES (' -34.84 '); -INSERT INTO FLOAT4_TBL(f1) VALUES ('1.2345678901234e+20'); -INSERT INTO FLOAT4_TBL(f1) VALUES ('1.2345678901234e-20'); --- test for over and under flow -INSERT INTO FLOAT4_TBL(f1) VALUES ('10e70'); -ERROR: "10e70" is out of range for type real -LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('10e70'); - ^ -INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e70'); -ERROR: "-10e70" is out of range for type real -LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e70'); - ^ -INSERT INTO FLOAT4_TBL(f1) VALUES ('10e-70'); -ERROR: "10e-70" is out of range for type real -LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('10e-70'); - ^ -INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e-70'); -ERROR: "-10e-70" is out of range for type real -LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e-70'); - ^ -INSERT INTO FLOAT4_TBL(f1) VALUES ('10e70'::float8); -ERROR: value out of range: overflow -INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e70'::float8); -ERROR: value out of range: overflow -INSERT INTO FLOAT4_TBL(f1) VALUES ('10e-70'::float8); -ERROR: value out of range: underflow -INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e-70'::float8); -ERROR: value out of range: underflow -INSERT INTO FLOAT4_TBL(f1) VALUES ('10e400'); -ERROR: "10e400" is out of range for type real -LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('10e400'); - ^ -INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e400'); -ERROR: "-10e400" is out of range for type real -LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e400'); - ^ -INSERT INTO FLOAT4_TBL(f1) VALUES ('10e-400'); -ERROR: "10e-400" is out of range for type real -LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('10e-400'); - ^ -INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e-400'); -ERROR: "-10e-400" is out of range for type real -LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e-400'); - ^ --- bad input -INSERT INTO FLOAT4_TBL(f1) VALUES (''); -ERROR: invalid input syntax for type real: "" -LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES (''); - ^ -INSERT INTO FLOAT4_TBL(f1) VALUES (' '); -ERROR: invalid input syntax for type real: " " -LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES (' '); - ^ -INSERT INTO FLOAT4_TBL(f1) VALUES ('xyz'); -ERROR: invalid input syntax for type real: "xyz" -LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('xyz'); - ^ -INSERT INTO FLOAT4_TBL(f1) VALUES ('5.0.0'); -ERROR: invalid input syntax for type real: "5.0.0" -LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('5.0.0'); - ^ -INSERT INTO FLOAT4_TBL(f1) VALUES ('5 . 0'); -ERROR: invalid input syntax for type real: "5 . 0" -LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('5 . 0'); - ^ -INSERT INTO FLOAT4_TBL(f1) VALUES ('5. 0'); -ERROR: invalid input syntax for type real: "5. 0" -LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('5. 0'); - ^ -INSERT INTO FLOAT4_TBL(f1) VALUES (' - 3.0'); -ERROR: invalid input syntax for type real: " - 3.0" -LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES (' - 3.0'); - ^ -INSERT INTO FLOAT4_TBL(f1) VALUES ('123 5'); -ERROR: invalid input syntax for type real: "123 5" -LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('123 5'); - ^ --- special inputs -SELECT 'NaN'::float4; - float4 --------- - NaN -(1 row) - -SELECT 'nan'::float4; - float4 --------- - NaN -(1 row) - -SELECT ' NAN '::float4; - float4 --------- - NaN -(1 row) - -SELECT 'infinity'::float4; - float4 ----------- - Infinity -(1 row) - -SELECT ' -INFINiTY '::float4; - float4 ------------ - -Infinity -(1 row) - --- bad special inputs -SELECT 'N A N'::float4; -ERROR: invalid input syntax for type real: "N A N" -LINE 1: SELECT 'N A N'::float4; - ^ -SELECT 'NaN x'::float4; -ERROR: invalid input syntax for type real: "NaN x" -LINE 1: SELECT 'NaN x'::float4; - ^ -SELECT ' INFINITY x'::float4; -ERROR: invalid input syntax for type real: " INFINITY x" -LINE 1: SELECT ' INFINITY x'::float4; - ^ -SELECT 'Infinity'::float4 + 100.0; - ?column? ----------- - Infinity -(1 row) - -SELECT 'Infinity'::float4 / 'Infinity'::float4; - ?column? ----------- - NaN -(1 row) - -SELECT '42'::float4 / 'Infinity'::float4; - ?column? ----------- - 0 -(1 row) - -SELECT 'nan'::float4 / 'nan'::float4; - ?column? ----------- - NaN -(1 row) - -SELECT 'nan'::float4 / '0'::float4; - ?column? ----------- - NaN -(1 row) - -SELECT 'nan'::numeric::float4; - float4 --------- - NaN -(1 row) - -SELECT * FROM FLOAT4_TBL; - f1 ---------------- - 0 - 1004.3 - -34.84 - 1.2345679e+20 - 1.2345679e-20 -(5 rows) - -SELECT f.* FROM FLOAT4_TBL f WHERE f.f1 <> '1004.3'; - f1 ---------------- - 0 - -34.84 - 1.2345679e+20 - 1.2345679e-20 -(4 rows) - -SELECT f.* FROM FLOAT4_TBL f WHERE f.f1 = '1004.3'; - f1 --------- - 1004.3 -(1 row) - -SELECT f.* FROM FLOAT4_TBL f WHERE '1004.3' > f.f1; - f1 ---------------- - 0 - -34.84 - 1.2345679e-20 -(3 rows) - -SELECT f.* FROM FLOAT4_TBL f WHERE f.f1 < '1004.3'; - f1 ---------------- - 0 - -34.84 - 1.2345679e-20 -(3 rows) - -SELECT f.* FROM FLOAT4_TBL f WHERE '1004.3' >= f.f1; - f1 ---------------- - 0 - 1004.3 - -34.84 - 1.2345679e-20 -(4 rows) - -SELECT f.* FROM FLOAT4_TBL f WHERE f.f1 <= '1004.3'; - f1 ---------------- - 0 - 1004.3 - -34.84 - 1.2345679e-20 -(4 rows) - -SELECT f.f1, f.f1 * '-10' AS x FROM FLOAT4_TBL f - WHERE f.f1 > '0.0'; - f1 | x ----------------+---------------- - 1004.3 | -10043 - 1.2345679e+20 | -1.2345678e+21 - 1.2345679e-20 | -1.2345678e-19 -(3 rows) - -SELECT f.f1, f.f1 + '-10' AS x FROM FLOAT4_TBL f - WHERE f.f1 > '0.0'; - f1 | x ----------------+--------------- - 1004.3 | 994.3 - 1.2345679e+20 | 1.2345679e+20 - 1.2345679e-20 | -10 -(3 rows) - -SELECT f.f1, f.f1 / '-10' AS x FROM FLOAT4_TBL f - WHERE f.f1 > '0.0'; - f1 | x ----------------+---------------- - 1004.3 | -100.43 - 1.2345679e+20 | -1.2345679e+19 - 1.2345679e-20 | -1.2345679e-21 -(3 rows) - -SELECT f.f1, f.f1 - '-10' AS x FROM FLOAT4_TBL f - WHERE f.f1 > '0.0'; - f1 | x ----------------+--------------- - 1004.3 | 1014.3 - 1.2345679e+20 | 1.2345679e+20 - 1.2345679e-20 | 10 -(3 rows) - --- test divide by zero -SELECT f.f1 / '0.0' from FLOAT4_TBL f; -ERROR: division by zero -SELECT * FROM FLOAT4_TBL; - f1 ---------------- - 0 - 1004.3 - -34.84 - 1.2345679e+20 - 1.2345679e-20 -(5 rows) - --- test the unary float4abs operator -SELECT f.f1, @f.f1 AS abs_f1 FROM FLOAT4_TBL f; - f1 | abs_f1 ----------------+--------------- - 0 | 0 - 1004.3 | 1004.3 - -34.84 | 34.84 - 1.2345679e+20 | 1.2345679e+20 - 1.2345679e-20 | 1.2345679e-20 -(5 rows) - -UPDATE FLOAT4_TBL - SET f1 = FLOAT4_TBL.f1 * '-1' - WHERE FLOAT4_TBL.f1 > '0.0'; -SELECT * FROM FLOAT4_TBL; - f1 ----------------- - 0 - -34.84 - -1004.3 - -1.2345679e+20 - -1.2345679e-20 -(5 rows) - --- test edge-case coercions to integer -SELECT '32767.4'::float4::int2; - int2 -------- - 32767 -(1 row) - -SELECT '32767.6'::float4::int2; -ERROR: smallint out of range -SELECT '-32768.4'::float4::int2; - int2 --------- - -32768 -(1 row) - -SELECT '-32768.6'::float4::int2; -ERROR: smallint out of range -SELECT '2147483520'::float4::int4; - int4 ------------- - 2147483520 -(1 row) - -SELECT '2147483647'::float4::int4; -ERROR: integer out of range -SELECT '-2147483648.5'::float4::int4; - int4 -------------- - -2147483648 -(1 row) - -SELECT '-2147483900'::float4::int4; -ERROR: integer out of range -SELECT '9223369837831520256'::float4::int8; - int8 ---------------------- - 9223369837831520256 -(1 row) - -SELECT '9223372036854775807'::float4::int8; -ERROR: bigint out of range -SELECT '-9223372036854775808.5'::float4::int8; - int8 ----------------------- - -9223372036854775808 -(1 row) - -SELECT '-9223380000000000000'::float4::int8; -ERROR: bigint out of range --- Test for correct input rounding in edge cases. --- These lists are from Paxson 1991, excluding subnormals and --- inputs of over 9 sig. digits. -SELECT float4send('5e-20'::float4); - float4send ------------- - \x1f6c1e4a -(1 row) - -SELECT float4send('67e14'::float4); - float4send ------------- - \x59be6cea -(1 row) - -SELECT float4send('985e15'::float4); - float4send ------------- - \x5d5ab6c4 -(1 row) - -SELECT float4send('55895e-16'::float4); - float4send ------------- - \x2cc4a9bd -(1 row) - -SELECT float4send('7038531e-32'::float4); - float4send ------------- - \x15ae43fd -(1 row) - -SELECT float4send('702990899e-20'::float4); - float4send ------------- - \x2cf757ca -(1 row) - -SELECT float4send('3e-23'::float4); - float4send ------------- - \x1a111234 -(1 row) - -SELECT float4send('57e18'::float4); - float4send ------------- - \x6045c22c -(1 row) - -SELECT float4send('789e-35'::float4); - float4send ------------- - \x0a23de70 -(1 row) - -SELECT float4send('2539e-18'::float4); - float4send ------------- - \x2736f449 -(1 row) - -SELECT float4send('76173e28'::float4); - float4send ------------- - \x7616398a -(1 row) - -SELECT float4send('887745e-11'::float4); - float4send ------------- - \x3714f05c -(1 row) - -SELECT float4send('5382571e-37'::float4); - float4send ------------- - \x0d2eaca7 -(1 row) - -SELECT float4send('82381273e-35'::float4); - float4send ------------- - \x128289d1 -(1 row) - -SELECT float4send('750486563e-38'::float4); - float4send ------------- - \x0f18377e -(1 row) - --- Test that the smallest possible normalized input value inputs --- correctly, either in 9-significant-digit or shortest-decimal --- format. --- --- exact val is 1.1754943508... --- shortest val is 1.1754944000 --- midpoint to next val is 1.1754944208... -SELECT float4send('1.17549435e-38'::float4); - float4send ------------- - \x00800000 -(1 row) - -SELECT float4send('1.1754944e-38'::float4); - float4send ------------- - \x00800000 -(1 row) - --- test output (and round-trip safety) of various values. --- To ensure we're testing what we think we're testing, start with --- float values specified by bit patterns (as a useful side effect, --- this means we'll fail on non-IEEE platforms). -create type xfloat4; -create function xfloat4in(cstring) returns xfloat4 immutable strict - language internal as 'int4in'; -NOTICE: return type xfloat4 is only a shell -create function xfloat4out(xfloat4) returns cstring immutable strict - language internal as 'int4out'; -NOTICE: argument type xfloat4 is only a shell -create type xfloat4 (input = xfloat4in, output = xfloat4out, like = float4); -create cast (xfloat4 as float4) without function; -create cast (float4 as xfloat4) without function; -create cast (xfloat4 as integer) without function; -create cast (integer as xfloat4) without function; --- float4: seeeeeee emmmmmmm mmmmmmmm mmmmmmmm --- we don't care to assume the platform's strtod() handles subnormals --- correctly; those are "use at your own risk". However we do test --- subnormal outputs, since those are under our control. -with testdata(bits) as (values - -- small subnormals - (x'00000001'), - (x'00000002'), (x'00000003'), - (x'00000010'), (x'00000011'), (x'00000100'), (x'00000101'), - (x'00004000'), (x'00004001'), (x'00080000'), (x'00080001'), - -- stress values - (x'0053c4f4'), -- 7693e-42 - (x'006c85c4'), -- 996622e-44 - (x'0041ca76'), -- 60419369e-46 - (x'004b7678'), -- 6930161142e-48 - -- taken from upstream testsuite - (x'00000007'), - (x'00424fe2'), - -- borderline between subnormal and normal - (x'007ffff0'), (x'007ffff1'), (x'007ffffe'), (x'007fffff')) -select float4send(flt) as ibits, - flt - from (select bits::integer::xfloat4::float4 as flt - from testdata - offset 0) s; - ibits | flt -------------+--------------- - \x00000001 | 1e-45 - \x00000002 | 3e-45 - \x00000003 | 4e-45 - \x00000010 | 2.2e-44 - \x00000011 | 2.4e-44 - \x00000100 | 3.59e-43 - \x00000101 | 3.6e-43 - \x00004000 | 2.2959e-41 - \x00004001 | 2.296e-41 - \x00080000 | 7.34684e-40 - \x00080001 | 7.34685e-40 - \x0053c4f4 | 7.693e-39 - \x006c85c4 | 9.96622e-39 - \x0041ca76 | 6.041937e-39 - \x004b7678 | 6.930161e-39 - \x00000007 | 1e-44 - \x00424fe2 | 6.0898e-39 - \x007ffff0 | 1.1754921e-38 - \x007ffff1 | 1.1754922e-38 - \x007ffffe | 1.1754941e-38 - \x007fffff | 1.1754942e-38 -(21 rows) - -with testdata(bits) as (values - (x'00000000'), - -- smallest normal values - (x'00800000'), (x'00800001'), (x'00800004'), (x'00800005'), - (x'00800006'), - -- small normal values chosen for short vs. long output - (x'008002f1'), (x'008002f2'), (x'008002f3'), - (x'00800e17'), (x'00800e18'), (x'00800e19'), - -- assorted values (random mantissae) - (x'01000001'), (x'01102843'), (x'01a52c98'), - (x'0219c229'), (x'02e4464d'), (x'037343c1'), (x'03a91b36'), - (x'047ada65'), (x'0496fe87'), (x'0550844f'), (x'05999da3'), - (x'060ea5e2'), (x'06e63c45'), (x'07f1e548'), (x'0fc5282b'), - (x'1f850283'), (x'2874a9d6'), - -- values around 5e-08 - (x'3356bf94'), (x'3356bf95'), (x'3356bf96'), - -- around 1e-07 - (x'33d6bf94'), (x'33d6bf95'), (x'33d6bf96'), - -- around 3e-07 .. 1e-04 - (x'34a10faf'), (x'34a10fb0'), (x'34a10fb1'), - (x'350637bc'), (x'350637bd'), (x'350637be'), - (x'35719786'), (x'35719787'), (x'35719788'), - (x'358637bc'), (x'358637bd'), (x'358637be'), - (x'36a7c5ab'), (x'36a7c5ac'), (x'36a7c5ad'), - (x'3727c5ab'), (x'3727c5ac'), (x'3727c5ad'), - -- format crossover at 1e-04 - (x'38d1b714'), (x'38d1b715'), (x'38d1b716'), - (x'38d1b717'), (x'38d1b718'), (x'38d1b719'), - (x'38d1b71a'), (x'38d1b71b'), (x'38d1b71c'), - (x'38d1b71d'), - -- - (x'38dffffe'), (x'38dfffff'), (x'38e00000'), - (x'38efffff'), (x'38f00000'), (x'38f00001'), - (x'3a83126e'), (x'3a83126f'), (x'3a831270'), - (x'3c23d709'), (x'3c23d70a'), (x'3c23d70b'), - (x'3dcccccc'), (x'3dcccccd'), (x'3dccccce'), - -- chosen to need 9 digits for 3dcccd70 - (x'3dcccd6f'), (x'3dcccd70'), (x'3dcccd71'), - -- - (x'3effffff'), (x'3f000000'), (x'3f000001'), - (x'3f333332'), (x'3f333333'), (x'3f333334'), - -- approach 1.0 with increasing numbers of 9s - (x'3f666665'), (x'3f666666'), (x'3f666667'), - (x'3f7d70a3'), (x'3f7d70a4'), (x'3f7d70a5'), - (x'3f7fbe76'), (x'3f7fbe77'), (x'3f7fbe78'), - (x'3f7ff971'), (x'3f7ff972'), (x'3f7ff973'), - (x'3f7fff57'), (x'3f7fff58'), (x'3f7fff59'), - (x'3f7fffee'), (x'3f7fffef'), - -- values very close to 1 - (x'3f7ffff0'), (x'3f7ffff1'), (x'3f7ffff2'), - (x'3f7ffff3'), (x'3f7ffff4'), (x'3f7ffff5'), - (x'3f7ffff6'), (x'3f7ffff7'), (x'3f7ffff8'), - (x'3f7ffff9'), (x'3f7ffffa'), (x'3f7ffffb'), - (x'3f7ffffc'), (x'3f7ffffd'), (x'3f7ffffe'), - (x'3f7fffff'), - (x'3f800000'), - (x'3f800001'), (x'3f800002'), (x'3f800003'), - (x'3f800004'), (x'3f800005'), (x'3f800006'), - (x'3f800007'), (x'3f800008'), (x'3f800009'), - -- values 1 to 1.1 - (x'3f80000f'), (x'3f800010'), (x'3f800011'), - (x'3f800012'), (x'3f800013'), (x'3f800014'), - (x'3f800017'), (x'3f800018'), (x'3f800019'), - (x'3f80001a'), (x'3f80001b'), (x'3f80001c'), - (x'3f800029'), (x'3f80002a'), (x'3f80002b'), - (x'3f800053'), (x'3f800054'), (x'3f800055'), - (x'3f800346'), (x'3f800347'), (x'3f800348'), - (x'3f8020c4'), (x'3f8020c5'), (x'3f8020c6'), - (x'3f8147ad'), (x'3f8147ae'), (x'3f8147af'), - (x'3f8ccccc'), (x'3f8ccccd'), (x'3f8cccce'), - -- - (x'3fc90fdb'), -- pi/2 - (x'402df854'), -- e - (x'40490fdb'), -- pi - -- - (x'409fffff'), (x'40a00000'), (x'40a00001'), - (x'40afffff'), (x'40b00000'), (x'40b00001'), - (x'411fffff'), (x'41200000'), (x'41200001'), - (x'42c7ffff'), (x'42c80000'), (x'42c80001'), - (x'4479ffff'), (x'447a0000'), (x'447a0001'), - (x'461c3fff'), (x'461c4000'), (x'461c4001'), - (x'47c34fff'), (x'47c35000'), (x'47c35001'), - (x'497423ff'), (x'49742400'), (x'49742401'), - (x'4b18967f'), (x'4b189680'), (x'4b189681'), - (x'4cbebc1f'), (x'4cbebc20'), (x'4cbebc21'), - (x'4e6e6b27'), (x'4e6e6b28'), (x'4e6e6b29'), - (x'501502f8'), (x'501502f9'), (x'501502fa'), - (x'51ba43b6'), (x'51ba43b7'), (x'51ba43b8'), - -- stress values - (x'1f6c1e4a'), -- 5e-20 - (x'59be6cea'), -- 67e14 - (x'5d5ab6c4'), -- 985e15 - (x'2cc4a9bd'), -- 55895e-16 - (x'15ae43fd'), -- 7038531e-32 - (x'2cf757ca'), -- 702990899e-20 - (x'665ba998'), -- 25933168707e13 - (x'743c3324'), -- 596428896559e20 - -- exercise fixed-point memmoves - (x'47f1205a'), - (x'4640e6ae'), - (x'449a5225'), - (x'42f6e9d5'), - (x'414587dd'), - (x'3f9e064b'), - -- these cases come from the upstream's testsuite - -- BoundaryRoundEven - (x'4c000004'), - (x'50061c46'), - (x'510006a8'), - -- ExactValueRoundEven - (x'48951f84'), - (x'45fd1840'), - -- LotsOfTrailingZeros - (x'39800000'), - (x'3b200000'), - (x'3b900000'), - (x'3bd00000'), - -- Regression - (x'63800000'), - (x'4b000000'), - (x'4b800000'), - (x'4c000001'), - (x'4c800b0d'), - (x'00d24584'), - (x'00d90b88'), - (x'45803f34'), - (x'4f9f24f7'), - (x'3a8722c3'), - (x'5c800041'), - (x'15ae43fd'), - (x'5d4cccfb'), - (x'4c800001'), - (x'57800ed8'), - (x'5f000000'), - (x'700000f0'), - (x'5f23e9ac'), - (x'5e9502f9'), - (x'5e8012b1'), - (x'3c000028'), - (x'60cde861'), - (x'03aa2a50'), - (x'43480000'), - (x'4c000000'), - -- LooksLikePow5 - (x'5D1502F9'), - (x'5D9502F9'), - (x'5E1502F9'), - -- OutputLength - (x'3f99999a'), - (x'3f9d70a4'), - (x'3f9df3b6'), - (x'3f9e0419'), - (x'3f9e0610'), - (x'3f9e064b'), - (x'3f9e0651'), - (x'03d20cfe') -) -select float4send(flt) as ibits, - flt, - flt::text::float4 as r_flt, - float4send(flt::text::float4) as obits, - float4send(flt::text::float4) = float4send(flt) as correct - from (select bits::integer::xfloat4::float4 as flt - from testdata - offset 0) s; - ibits | flt | r_flt | obits | correct -------------+----------------+----------------+------------+--------- - \x00000000 | 0 | 0 | \x00000000 | t - \x00800000 | 1.1754944e-38 | 1.1754944e-38 | \x00800000 | t - \x00800001 | 1.1754945e-38 | 1.1754945e-38 | \x00800001 | t - \x00800004 | 1.1754949e-38 | 1.1754949e-38 | \x00800004 | t - \x00800005 | 1.175495e-38 | 1.175495e-38 | \x00800005 | t - \x00800006 | 1.1754952e-38 | 1.1754952e-38 | \x00800006 | t - \x008002f1 | 1.1755999e-38 | 1.1755999e-38 | \x008002f1 | t - \x008002f2 | 1.1756e-38 | 1.1756e-38 | \x008002f2 | t - \x008002f3 | 1.1756001e-38 | 1.1756001e-38 | \x008002f3 | t - \x00800e17 | 1.1759998e-38 | 1.1759998e-38 | \x00800e17 | t - \x00800e18 | 1.176e-38 | 1.176e-38 | \x00800e18 | t - \x00800e19 | 1.1760001e-38 | 1.1760001e-38 | \x00800e19 | t - \x01000001 | 2.350989e-38 | 2.350989e-38 | \x01000001 | t - \x01102843 | 2.647751e-38 | 2.647751e-38 | \x01102843 | t - \x01a52c98 | 6.0675416e-38 | 6.0675416e-38 | \x01a52c98 | t - \x0219c229 | 1.1296386e-37 | 1.1296386e-37 | \x0219c229 | t - \x02e4464d | 3.354194e-37 | 3.354194e-37 | \x02e4464d | t - \x037343c1 | 7.148906e-37 | 7.148906e-37 | \x037343c1 | t - \x03a91b36 | 9.939175e-37 | 9.939175e-37 | \x03a91b36 | t - \x047ada65 | 2.948764e-36 | 2.948764e-36 | \x047ada65 | t - \x0496fe87 | 3.5498577e-36 | 3.5498577e-36 | \x0496fe87 | t - \x0550844f | 9.804414e-36 | 9.804414e-36 | \x0550844f | t - \x05999da3 | 1.4445957e-35 | 1.4445957e-35 | \x05999da3 | t - \x060ea5e2 | 2.6829103e-35 | 2.6829103e-35 | \x060ea5e2 | t - \x06e63c45 | 8.660494e-35 | 8.660494e-35 | \x06e63c45 | t - \x07f1e548 | 3.639641e-34 | 3.639641e-34 | \x07f1e548 | t - \x0fc5282b | 1.9441172e-29 | 1.9441172e-29 | \x0fc5282b | t - \x1f850283 | 5.6331846e-20 | 5.6331846e-20 | \x1f850283 | t - \x2874a9d6 | 1.3581548e-14 | 1.3581548e-14 | \x2874a9d6 | t - \x3356bf94 | 4.9999997e-08 | 4.9999997e-08 | \x3356bf94 | t - \x3356bf95 | 5e-08 | 5e-08 | \x3356bf95 | t - \x3356bf96 | 5.0000004e-08 | 5.0000004e-08 | \x3356bf96 | t - \x33d6bf94 | 9.9999994e-08 | 9.9999994e-08 | \x33d6bf94 | t - \x33d6bf95 | 1e-07 | 1e-07 | \x33d6bf95 | t - \x33d6bf96 | 1.0000001e-07 | 1.0000001e-07 | \x33d6bf96 | t - \x34a10faf | 2.9999998e-07 | 2.9999998e-07 | \x34a10faf | t - \x34a10fb0 | 3e-07 | 3e-07 | \x34a10fb0 | t - \x34a10fb1 | 3.0000004e-07 | 3.0000004e-07 | \x34a10fb1 | t - \x350637bc | 4.9999994e-07 | 4.9999994e-07 | \x350637bc | t - \x350637bd | 5e-07 | 5e-07 | \x350637bd | t - \x350637be | 5.0000006e-07 | 5.0000006e-07 | \x350637be | t - \x35719786 | 8.999999e-07 | 8.999999e-07 | \x35719786 | t - \x35719787 | 9e-07 | 9e-07 | \x35719787 | t - \x35719788 | 9.0000003e-07 | 9.0000003e-07 | \x35719788 | t - \x358637bc | 9.999999e-07 | 9.999999e-07 | \x358637bc | t - \x358637bd | 1e-06 | 1e-06 | \x358637bd | t - \x358637be | 1.0000001e-06 | 1.0000001e-06 | \x358637be | t - \x36a7c5ab | 4.9999994e-06 | 4.9999994e-06 | \x36a7c5ab | t - \x36a7c5ac | 5e-06 | 5e-06 | \x36a7c5ac | t - \x36a7c5ad | 5.0000003e-06 | 5.0000003e-06 | \x36a7c5ad | t - \x3727c5ab | 9.999999e-06 | 9.999999e-06 | \x3727c5ab | t - \x3727c5ac | 1e-05 | 1e-05 | \x3727c5ac | t - \x3727c5ad | 1.0000001e-05 | 1.0000001e-05 | \x3727c5ad | t - \x38d1b714 | 9.9999976e-05 | 9.9999976e-05 | \x38d1b714 | t - \x38d1b715 | 9.999998e-05 | 9.999998e-05 | \x38d1b715 | t - \x38d1b716 | 9.999999e-05 | 9.999999e-05 | \x38d1b716 | t - \x38d1b717 | 0.0001 | 0.0001 | \x38d1b717 | t - \x38d1b718 | 0.000100000005 | 0.000100000005 | \x38d1b718 | t - \x38d1b719 | 0.00010000001 | 0.00010000001 | \x38d1b719 | t - \x38d1b71a | 0.00010000002 | 0.00010000002 | \x38d1b71a | t - \x38d1b71b | 0.00010000003 | 0.00010000003 | \x38d1b71b | t - \x38d1b71c | 0.000100000034 | 0.000100000034 | \x38d1b71c | t - \x38d1b71d | 0.00010000004 | 0.00010000004 | \x38d1b71d | t - \x38dffffe | 0.00010681151 | 0.00010681151 | \x38dffffe | t - \x38dfffff | 0.000106811516 | 0.000106811516 | \x38dfffff | t - \x38e00000 | 0.00010681152 | 0.00010681152 | \x38e00000 | t - \x38efffff | 0.00011444091 | 0.00011444091 | \x38efffff | t - \x38f00000 | 0.00011444092 | 0.00011444092 | \x38f00000 | t - \x38f00001 | 0.000114440925 | 0.000114440925 | \x38f00001 | t - \x3a83126e | 0.0009999999 | 0.0009999999 | \x3a83126e | t - \x3a83126f | 0.001 | 0.001 | \x3a83126f | t - \x3a831270 | 0.0010000002 | 0.0010000002 | \x3a831270 | t - \x3c23d709 | 0.009999999 | 0.009999999 | \x3c23d709 | t - \x3c23d70a | 0.01 | 0.01 | \x3c23d70a | t - \x3c23d70b | 0.010000001 | 0.010000001 | \x3c23d70b | t - \x3dcccccc | 0.099999994 | 0.099999994 | \x3dcccccc | t - \x3dcccccd | 0.1 | 0.1 | \x3dcccccd | t - \x3dccccce | 0.10000001 | 0.10000001 | \x3dccccce | t - \x3dcccd6f | 0.10000121 | 0.10000121 | \x3dcccd6f | t - \x3dcccd70 | 0.100001216 | 0.100001216 | \x3dcccd70 | t - \x3dcccd71 | 0.10000122 | 0.10000122 | \x3dcccd71 | t - \x3effffff | 0.49999997 | 0.49999997 | \x3effffff | t - \x3f000000 | 0.5 | 0.5 | \x3f000000 | t - \x3f000001 | 0.50000006 | 0.50000006 | \x3f000001 | t - \x3f333332 | 0.6999999 | 0.6999999 | \x3f333332 | t - \x3f333333 | 0.7 | 0.7 | \x3f333333 | t - \x3f333334 | 0.70000005 | 0.70000005 | \x3f333334 | t - \x3f666665 | 0.8999999 | 0.8999999 | \x3f666665 | t - \x3f666666 | 0.9 | 0.9 | \x3f666666 | t - \x3f666667 | 0.90000004 | 0.90000004 | \x3f666667 | t - \x3f7d70a3 | 0.98999995 | 0.98999995 | \x3f7d70a3 | t - \x3f7d70a4 | 0.99 | 0.99 | \x3f7d70a4 | t - \x3f7d70a5 | 0.99000007 | 0.99000007 | \x3f7d70a5 | t - \x3f7fbe76 | 0.99899995 | 0.99899995 | \x3f7fbe76 | t - \x3f7fbe77 | 0.999 | 0.999 | \x3f7fbe77 | t - \x3f7fbe78 | 0.9990001 | 0.9990001 | \x3f7fbe78 | t - \x3f7ff971 | 0.9998999 | 0.9998999 | \x3f7ff971 | t - \x3f7ff972 | 0.9999 | 0.9999 | \x3f7ff972 | t - \x3f7ff973 | 0.99990004 | 0.99990004 | \x3f7ff973 | t - \x3f7fff57 | 0.9999899 | 0.9999899 | \x3f7fff57 | t - \x3f7fff58 | 0.99999 | 0.99999 | \x3f7fff58 | t - \x3f7fff59 | 0.99999005 | 0.99999005 | \x3f7fff59 | t - \x3f7fffee | 0.9999989 | 0.9999989 | \x3f7fffee | t - \x3f7fffef | 0.999999 | 0.999999 | \x3f7fffef | t - \x3f7ffff0 | 0.99999905 | 0.99999905 | \x3f7ffff0 | t - \x3f7ffff1 | 0.9999991 | 0.9999991 | \x3f7ffff1 | t - \x3f7ffff2 | 0.99999917 | 0.99999917 | \x3f7ffff2 | t - \x3f7ffff3 | 0.9999992 | 0.9999992 | \x3f7ffff3 | t - \x3f7ffff4 | 0.9999993 | 0.9999993 | \x3f7ffff4 | t - \x3f7ffff5 | 0.99999934 | 0.99999934 | \x3f7ffff5 | t - \x3f7ffff6 | 0.9999994 | 0.9999994 | \x3f7ffff6 | t - \x3f7ffff7 | 0.99999946 | 0.99999946 | \x3f7ffff7 | t - \x3f7ffff8 | 0.9999995 | 0.9999995 | \x3f7ffff8 | t - \x3f7ffff9 | 0.9999996 | 0.9999996 | \x3f7ffff9 | t - \x3f7ffffa | 0.99999964 | 0.99999964 | \x3f7ffffa | t - \x3f7ffffb | 0.9999997 | 0.9999997 | \x3f7ffffb | t - \x3f7ffffc | 0.99999976 | 0.99999976 | \x3f7ffffc | t - \x3f7ffffd | 0.9999998 | 0.9999998 | \x3f7ffffd | t - \x3f7ffffe | 0.9999999 | 0.9999999 | \x3f7ffffe | t - \x3f7fffff | 0.99999994 | 0.99999994 | \x3f7fffff | t - \x3f800000 | 1 | 1 | \x3f800000 | t - \x3f800001 | 1.0000001 | 1.0000001 | \x3f800001 | t - \x3f800002 | 1.0000002 | 1.0000002 | \x3f800002 | t - \x3f800003 | 1.0000004 | 1.0000004 | \x3f800003 | t - \x3f800004 | 1.0000005 | 1.0000005 | \x3f800004 | t - \x3f800005 | 1.0000006 | 1.0000006 | \x3f800005 | t - \x3f800006 | 1.0000007 | 1.0000007 | \x3f800006 | t - \x3f800007 | 1.0000008 | 1.0000008 | \x3f800007 | t - \x3f800008 | 1.000001 | 1.000001 | \x3f800008 | t - \x3f800009 | 1.0000011 | 1.0000011 | \x3f800009 | t - \x3f80000f | 1.0000018 | 1.0000018 | \x3f80000f | t - \x3f800010 | 1.0000019 | 1.0000019 | \x3f800010 | t - \x3f800011 | 1.000002 | 1.000002 | \x3f800011 | t - \x3f800012 | 1.0000021 | 1.0000021 | \x3f800012 | t - \x3f800013 | 1.0000023 | 1.0000023 | \x3f800013 | t - \x3f800014 | 1.0000024 | 1.0000024 | \x3f800014 | t - \x3f800017 | 1.0000027 | 1.0000027 | \x3f800017 | t - \x3f800018 | 1.0000029 | 1.0000029 | \x3f800018 | t - \x3f800019 | 1.000003 | 1.000003 | \x3f800019 | t - \x3f80001a | 1.0000031 | 1.0000031 | \x3f80001a | t - \x3f80001b | 1.0000032 | 1.0000032 | \x3f80001b | t - \x3f80001c | 1.0000033 | 1.0000033 | \x3f80001c | t - \x3f800029 | 1.0000049 | 1.0000049 | \x3f800029 | t - \x3f80002a | 1.000005 | 1.000005 | \x3f80002a | t - \x3f80002b | 1.0000051 | 1.0000051 | \x3f80002b | t - \x3f800053 | 1.0000099 | 1.0000099 | \x3f800053 | t - \x3f800054 | 1.00001 | 1.00001 | \x3f800054 | t - \x3f800055 | 1.0000101 | 1.0000101 | \x3f800055 | t - \x3f800346 | 1.0000999 | 1.0000999 | \x3f800346 | t - \x3f800347 | 1.0001 | 1.0001 | \x3f800347 | t - \x3f800348 | 1.0001001 | 1.0001001 | \x3f800348 | t - \x3f8020c4 | 1.0009999 | 1.0009999 | \x3f8020c4 | t - \x3f8020c5 | 1.001 | 1.001 | \x3f8020c5 | t - \x3f8020c6 | 1.0010002 | 1.0010002 | \x3f8020c6 | t - \x3f8147ad | 1.0099999 | 1.0099999 | \x3f8147ad | t - \x3f8147ae | 1.01 | 1.01 | \x3f8147ae | t - \x3f8147af | 1.0100001 | 1.0100001 | \x3f8147af | t - \x3f8ccccc | 1.0999999 | 1.0999999 | \x3f8ccccc | t - \x3f8ccccd | 1.1 | 1.1 | \x3f8ccccd | t - \x3f8cccce | 1.1000001 | 1.1000001 | \x3f8cccce | t - \x3fc90fdb | 1.5707964 | 1.5707964 | \x3fc90fdb | t - \x402df854 | 2.7182817 | 2.7182817 | \x402df854 | t - \x40490fdb | 3.1415927 | 3.1415927 | \x40490fdb | t - \x409fffff | 4.9999995 | 4.9999995 | \x409fffff | t - \x40a00000 | 5 | 5 | \x40a00000 | t - \x40a00001 | 5.0000005 | 5.0000005 | \x40a00001 | t - \x40afffff | 5.4999995 | 5.4999995 | \x40afffff | t - \x40b00000 | 5.5 | 5.5 | \x40b00000 | t - \x40b00001 | 5.5000005 | 5.5000005 | \x40b00001 | t - \x411fffff | 9.999999 | 9.999999 | \x411fffff | t - \x41200000 | 10 | 10 | \x41200000 | t - \x41200001 | 10.000001 | 10.000001 | \x41200001 | t - \x42c7ffff | 99.99999 | 99.99999 | \x42c7ffff | t - \x42c80000 | 100 | 100 | \x42c80000 | t - \x42c80001 | 100.00001 | 100.00001 | \x42c80001 | t - \x4479ffff | 999.99994 | 999.99994 | \x4479ffff | t - \x447a0000 | 1000 | 1000 | \x447a0000 | t - \x447a0001 | 1000.00006 | 1000.00006 | \x447a0001 | t - \x461c3fff | 9999.999 | 9999.999 | \x461c3fff | t - \x461c4000 | 10000 | 10000 | \x461c4000 | t - \x461c4001 | 10000.001 | 10000.001 | \x461c4001 | t - \x47c34fff | 99999.99 | 99999.99 | \x47c34fff | t - \x47c35000 | 100000 | 100000 | \x47c35000 | t - \x47c35001 | 100000.01 | 100000.01 | \x47c35001 | t - \x497423ff | 999999.94 | 999999.94 | \x497423ff | t - \x49742400 | 1e+06 | 1e+06 | \x49742400 | t - \x49742401 | 1.00000006e+06 | 1.00000006e+06 | \x49742401 | t - \x4b18967f | 9.999999e+06 | 9.999999e+06 | \x4b18967f | t - \x4b189680 | 1e+07 | 1e+07 | \x4b189680 | t - \x4b189681 | 1.0000001e+07 | 1.0000001e+07 | \x4b189681 | t - \x4cbebc1f | 9.999999e+07 | 9.999999e+07 | \x4cbebc1f | t - \x4cbebc20 | 1e+08 | 1e+08 | \x4cbebc20 | t - \x4cbebc21 | 1.0000001e+08 | 1.0000001e+08 | \x4cbebc21 | t - \x4e6e6b27 | 9.9999994e+08 | 9.9999994e+08 | \x4e6e6b27 | t - \x4e6e6b28 | 1e+09 | 1e+09 | \x4e6e6b28 | t - \x4e6e6b29 | 1.00000006e+09 | 1.00000006e+09 | \x4e6e6b29 | t - \x501502f8 | 9.999999e+09 | 9.999999e+09 | \x501502f8 | t - \x501502f9 | 1e+10 | 1e+10 | \x501502f9 | t - \x501502fa | 1.0000001e+10 | 1.0000001e+10 | \x501502fa | t - \x51ba43b6 | 9.999999e+10 | 9.999999e+10 | \x51ba43b6 | t - \x51ba43b7 | 1e+11 | 1e+11 | \x51ba43b7 | t - \x51ba43b8 | 1.0000001e+11 | 1.0000001e+11 | \x51ba43b8 | t - \x1f6c1e4a | 5e-20 | 5e-20 | \x1f6c1e4a | t - \x59be6cea | 6.7e+15 | 6.7e+15 | \x59be6cea | t - \x5d5ab6c4 | 9.85e+17 | 9.85e+17 | \x5d5ab6c4 | t - \x2cc4a9bd | 5.5895e-12 | 5.5895e-12 | \x2cc4a9bd | t - \x15ae43fd | 7.038531e-26 | 7.038531e-26 | \x15ae43fd | t - \x2cf757ca | 7.0299088e-12 | 7.0299088e-12 | \x2cf757ca | t - \x665ba998 | 2.5933168e+23 | 2.5933168e+23 | \x665ba998 | t - \x743c3324 | 5.9642887e+31 | 5.9642887e+31 | \x743c3324 | t - \x47f1205a | 123456.7 | 123456.7 | \x47f1205a | t - \x4640e6ae | 12345.67 | 12345.67 | \x4640e6ae | t - \x449a5225 | 1234.567 | 1234.567 | \x449a5225 | t - \x42f6e9d5 | 123.4567 | 123.4567 | \x42f6e9d5 | t - \x414587dd | 12.34567 | 12.34567 | \x414587dd | t - \x3f9e064b | 1.234567 | 1.234567 | \x3f9e064b | t - \x4c000004 | 3.3554448e+07 | 3.3554448e+07 | \x4c000004 | t - \x50061c46 | 8.999999e+09 | 8.999999e+09 | \x50061c46 | t - \x510006a8 | 3.4366718e+10 | 3.4366718e+10 | \x510006a8 | t - \x48951f84 | 305404.12 | 305404.12 | \x48951f84 | t - \x45fd1840 | 8099.0312 | 8099.0312 | \x45fd1840 | t - \x39800000 | 0.00024414062 | 0.00024414062 | \x39800000 | t - \x3b200000 | 0.0024414062 | 0.0024414062 | \x3b200000 | t - \x3b900000 | 0.0043945312 | 0.0043945312 | \x3b900000 | t - \x3bd00000 | 0.0063476562 | 0.0063476562 | \x3bd00000 | t - \x63800000 | 4.7223665e+21 | 4.7223665e+21 | \x63800000 | t - \x4b000000 | 8.388608e+06 | 8.388608e+06 | \x4b000000 | t - \x4b800000 | 1.6777216e+07 | 1.6777216e+07 | \x4b800000 | t - \x4c000001 | 3.3554436e+07 | 3.3554436e+07 | \x4c000001 | t - \x4c800b0d | 6.7131496e+07 | 6.7131496e+07 | \x4c800b0d | t - \x00d24584 | 1.9310392e-38 | 1.9310392e-38 | \x00d24584 | t - \x00d90b88 | 1.993244e-38 | 1.993244e-38 | \x00d90b88 | t - \x45803f34 | 4103.9004 | 4103.9004 | \x45803f34 | t - \x4f9f24f7 | 5.3399997e+09 | 5.3399997e+09 | \x4f9f24f7 | t - \x3a8722c3 | 0.0010310042 | 0.0010310042 | \x3a8722c3 | t - \x5c800041 | 2.882326e+17 | 2.882326e+17 | \x5c800041 | t - \x15ae43fd | 7.038531e-26 | 7.038531e-26 | \x15ae43fd | t - \x5d4cccfb | 9.223404e+17 | 9.223404e+17 | \x5d4cccfb | t - \x4c800001 | 6.710887e+07 | 6.710887e+07 | \x4c800001 | t - \x57800ed8 | 2.816025e+14 | 2.816025e+14 | \x57800ed8 | t - \x5f000000 | 9.223372e+18 | 9.223372e+18 | \x5f000000 | t - \x700000f0 | 1.5846086e+29 | 1.5846086e+29 | \x700000f0 | t - \x5f23e9ac | 1.1811161e+19 | 1.1811161e+19 | \x5f23e9ac | t - \x5e9502f9 | 5.368709e+18 | 5.368709e+18 | \x5e9502f9 | t - \x5e8012b1 | 4.6143166e+18 | 4.6143166e+18 | \x5e8012b1 | t - \x3c000028 | 0.007812537 | 0.007812537 | \x3c000028 | t - \x60cde861 | 1.18697725e+20 | 1.18697725e+20 | \x60cde861 | t - \x03aa2a50 | 1.00014165e-36 | 1.00014165e-36 | \x03aa2a50 | t - \x43480000 | 200 | 200 | \x43480000 | t - \x4c000000 | 3.3554432e+07 | 3.3554432e+07 | \x4c000000 | t - \x5d1502f9 | 6.7108864e+17 | 6.7108864e+17 | \x5d1502f9 | t - \x5d9502f9 | 1.3421773e+18 | 1.3421773e+18 | \x5d9502f9 | t - \x5e1502f9 | 2.6843546e+18 | 2.6843546e+18 | \x5e1502f9 | t - \x3f99999a | 1.2 | 1.2 | \x3f99999a | t - \x3f9d70a4 | 1.23 | 1.23 | \x3f9d70a4 | t - \x3f9df3b6 | 1.234 | 1.234 | \x3f9df3b6 | t - \x3f9e0419 | 1.2345 | 1.2345 | \x3f9e0419 | t - \x3f9e0610 | 1.23456 | 1.23456 | \x3f9e0610 | t - \x3f9e064b | 1.234567 | 1.234567 | \x3f9e064b | t - \x3f9e0651 | 1.2345678 | 1.2345678 | \x3f9e0651 | t - \x03d20cfe | 1.23456735e-36 | 1.23456735e-36 | \x03d20cfe | t -(261 rows) - --- clean up, lest opr_sanity complain -drop type xfloat4 cascade; -NOTICE: drop cascades to 6 other objects -DETAIL: drop cascades to function xfloat4in(cstring) -drop cascades to function xfloat4out(xfloat4) -drop cascades to cast from xfloat4 to real -drop cascades to cast from real to xfloat4 -drop cascades to cast from xfloat4 to integer -drop cascades to cast from integer to xfloat4 +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/bit.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/bit.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/bit.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/bit.out 2023-02-20 19:43:32.129205284 -0500 @@ -1,748 +1 @@ --- --- BIT types --- --- --- Build tables for testing --- -CREATE TABLE BIT_TABLE(b BIT(11)); -INSERT INTO BIT_TABLE VALUES (B'10'); -- too short -ERROR: bit string length 2 does not match type bit(11) -INSERT INTO BIT_TABLE VALUES (B'00000000000'); -INSERT INTO BIT_TABLE VALUES (B'11011000000'); -INSERT INTO BIT_TABLE VALUES (B'01010101010'); -INSERT INTO BIT_TABLE VALUES (B'101011111010'); -- too long -ERROR: bit string length 12 does not match type bit(11) ---INSERT INTO BIT_TABLE VALUES ('X554'); ---INSERT INTO BIT_TABLE VALUES ('X555'); -SELECT * FROM BIT_TABLE; - b -------------- - 00000000000 - 11011000000 - 01010101010 -(3 rows) - -CREATE TABLE VARBIT_TABLE(v BIT VARYING(11)); -INSERT INTO VARBIT_TABLE VALUES (B''); -INSERT INTO VARBIT_TABLE VALUES (B'0'); -INSERT INTO VARBIT_TABLE VALUES (B'010101'); -INSERT INTO VARBIT_TABLE VALUES (B'01010101010'); -INSERT INTO VARBIT_TABLE VALUES (B'101011111010'); -- too long -ERROR: bit string too long for type bit varying(11) ---INSERT INTO VARBIT_TABLE VALUES ('X554'); ---INSERT INTO VARBIT_TABLE VALUES ('X555'); -SELECT * FROM VARBIT_TABLE; - v -------------- - - 0 - 010101 - 01010101010 -(4 rows) - --- Concatenation -SELECT v, b, (v || b) AS concat - FROM BIT_TABLE, VARBIT_TABLE - ORDER BY 3; - v | b | concat --------------+-------------+------------------------ - | 00000000000 | 00000000000 - 0 | 00000000000 | 000000000000 - 0 | 01010101010 | 001010101010 - 010101 | 00000000000 | 01010100000000000 - | 01010101010 | 01010101010 - 01010101010 | 00000000000 | 0101010101000000000000 - 01010101010 | 01010101010 | 0101010101001010101010 - 010101 | 01010101010 | 01010101010101010 - 01010101010 | 11011000000 | 0101010101011011000000 - 010101 | 11011000000 | 01010111011000000 - 0 | 11011000000 | 011011000000 - | 11011000000 | 11011000000 -(12 rows) - --- Length -SELECT b, length(b) AS lb - FROM BIT_TABLE; - b | lb --------------+---- - 00000000000 | 11 - 11011000000 | 11 - 01010101010 | 11 -(3 rows) - -SELECT v, length(v) AS lv - FROM VARBIT_TABLE; - v | lv --------------+---- - | 0 - 0 | 1 - 010101 | 6 - 01010101010 | 11 -(4 rows) - --- Substring -SELECT b, - SUBSTRING(b FROM 2 FOR 4) AS sub_2_4, - SUBSTRING(b FROM 7 FOR 13) AS sub_7_13, - SUBSTRING(b FROM 6) AS sub_6 - FROM BIT_TABLE; - b | sub_2_4 | sub_7_13 | sub_6 --------------+---------+----------+-------- - 00000000000 | 0000 | 00000 | 000000 - 11011000000 | 1011 | 00000 | 000000 - 01010101010 | 1010 | 01010 | 101010 -(3 rows) - -SELECT v, - SUBSTRING(v FROM 2 FOR 4) AS sub_2_4, - SUBSTRING(v FROM 7 FOR 13) AS sub_7_13, - SUBSTRING(v FROM 6) AS sub_6 - FROM VARBIT_TABLE; - v | sub_2_4 | sub_7_13 | sub_6 --------------+---------+----------+-------- - | | | - 0 | | | - 010101 | 1010 | | 1 - 01010101010 | 1010 | 01010 | 101010 -(4 rows) - --- test overflow cases -SELECT SUBSTRING('01010101'::bit(8) FROM 2 FOR 2147483646) AS "1010101"; - 1010101 ---------- - 1010101 -(1 row) - -SELECT SUBSTRING('01010101'::bit(8) FROM -10 FOR 2147483646) AS "01010101"; - 01010101 ----------- - 01010101 -(1 row) - -SELECT SUBSTRING('01010101'::bit(8) FROM -10 FOR -2147483646) AS "error"; -ERROR: negative substring length not allowed -SELECT SUBSTRING('01010101'::varbit FROM 2 FOR 2147483646) AS "1010101"; - 1010101 ---------- - 1010101 -(1 row) - -SELECT SUBSTRING('01010101'::varbit FROM -10 FOR 2147483646) AS "01010101"; - 01010101 ----------- - 01010101 -(1 row) - -SELECT SUBSTRING('01010101'::varbit FROM -10 FOR -2147483646) AS "error"; -ERROR: negative substring length not allowed ---- Bit operations -DROP TABLE varbit_table; -CREATE TABLE varbit_table (a BIT VARYING(16), b BIT VARYING(16)); -COPY varbit_table FROM stdin; -SELECT a, b, ~a AS "~ a", a & b AS "a & b", - a | b AS "a | b", a # b AS "a # b" FROM varbit_table; - a | b | ~ a | a & b | a | b | a # b -------------------+------------------+------------------+------------------+------------------+------------------ - 00001111 | 00010000 | 11110000 | 00000000 | 00011111 | 00011111 - 00011111 | 00010001 | 11100000 | 00010001 | 00011111 | 00001110 - 00101111 | 00010010 | 11010000 | 00000010 | 00111111 | 00111101 - 00111111 | 00010011 | 11000000 | 00010011 | 00111111 | 00101100 - 10001111 | 00000100 | 01110000 | 00000100 | 10001111 | 10001011 - 0000000000001111 | 0000000000010000 | 1111111111110000 | 0000000000000000 | 0000000000011111 | 0000000000011111 - 0000000100100011 | 1111111111111111 | 1111111011011100 | 0000000100100011 | 1111111111111111 | 1111111011011100 - 0010010001101000 | 0010010001101000 | 1101101110010111 | 0010010001101000 | 0010010001101000 | 0000000000000000 - 1111101001010000 | 0000010110101111 | 0000010110101111 | 0000000000000000 | 1111111111111111 | 1111111111111111 - 0001001000110100 | 1111111111110101 | 1110110111001011 | 0001001000110100 | 1111111111110101 | 1110110111000001 -(10 rows) - -SELECT a,b,a=b AS "a>=b",a>b AS "a>b",a<>b AS "a<>b" FROM varbit_table; - a | b | a=b | a>b | a<>b -------------------+------------------+-----+------+-----+------+-----+------ - 00001111 | 00010000 | t | t | f | f | f | t - 00011111 | 00010001 | f | f | f | t | t | t - 00101111 | 00010010 | f | f | f | t | t | t - 00111111 | 00010011 | f | f | f | t | t | t - 10001111 | 00000100 | f | f | f | t | t | t - 0000000000001111 | 0000000000010000 | t | t | f | f | f | t - 0000000100100011 | 1111111111111111 | t | t | f | f | f | t - 0010010001101000 | 0010010001101000 | f | t | t | t | f | f - 1111101001010000 | 0000010110101111 | f | f | f | t | t | t - 0001001000110100 | 1111111111110101 | t | t | f | f | f | t -(10 rows) - -SELECT a,a<<4 AS "a<<4",b,b>>2 AS "b>>2" FROM varbit_table; - a | a<<4 | b | b>>2 -------------------+------------------+------------------+------------------ - 00001111 | 11110000 | 00010000 | 00000100 - 00011111 | 11110000 | 00010001 | 00000100 - 00101111 | 11110000 | 00010010 | 00000100 - 00111111 | 11110000 | 00010011 | 00000100 - 10001111 | 11110000 | 00000100 | 00000001 - 0000000000001111 | 0000000011110000 | 0000000000010000 | 0000000000000100 - 0000000100100011 | 0001001000110000 | 1111111111111111 | 0011111111111111 - 0010010001101000 | 0100011010000000 | 0010010001101000 | 0000100100011010 - 1111101001010000 | 1010010100000000 | 0000010110101111 | 0000000101101011 - 0001001000110100 | 0010001101000000 | 1111111111110101 | 0011111111111101 -(10 rows) - -DROP TABLE varbit_table; ---- Bit operations -DROP TABLE bit_table; -CREATE TABLE bit_table (a BIT(16), b BIT(16)); -COPY bit_table FROM stdin; -SELECT a,b,~a AS "~ a",a & b AS "a & b", - a|b AS "a | b", a # b AS "a # b" FROM bit_table; - a | b | ~ a | a & b | a | b | a # b -------------------+------------------+------------------+------------------+------------------+------------------ - 0000111100000000 | 0001000000000000 | 1111000011111111 | 0000000000000000 | 0001111100000000 | 0001111100000000 - 0001111100000000 | 0001000100000000 | 1110000011111111 | 0001000100000000 | 0001111100000000 | 0000111000000000 - 0010111100000000 | 0001001000000000 | 1101000011111111 | 0000001000000000 | 0011111100000000 | 0011110100000000 - 0011111100000000 | 0001001100000000 | 1100000011111111 | 0001001100000000 | 0011111100000000 | 0010110000000000 - 1000111100000000 | 0000010000000000 | 0111000011111111 | 0000010000000000 | 1000111100000000 | 1000101100000000 - 0000000000001111 | 0000000000010000 | 1111111111110000 | 0000000000000000 | 0000000000011111 | 0000000000011111 - 0000000100100011 | 1111111111111111 | 1111111011011100 | 0000000100100011 | 1111111111111111 | 1111111011011100 - 0010010001101000 | 0010010001101000 | 1101101110010111 | 0010010001101000 | 0010010001101000 | 0000000000000000 - 1111101001010000 | 0000010110101111 | 0000010110101111 | 0000000000000000 | 1111111111111111 | 1111111111111111 - 0001001000110100 | 1111111111110101 | 1110110111001011 | 0001001000110100 | 1111111111110101 | 1110110111000001 -(10 rows) - -SELECT a,b,a=b AS "a>=b",a>b AS "a>b",a<>b AS "a<>b" FROM bit_table; - a | b | a=b | a>b | a<>b -------------------+------------------+-----+------+-----+------+-----+------ - 0000111100000000 | 0001000000000000 | t | t | f | f | f | t - 0001111100000000 | 0001000100000000 | f | f | f | t | t | t - 0010111100000000 | 0001001000000000 | f | f | f | t | t | t - 0011111100000000 | 0001001100000000 | f | f | f | t | t | t - 1000111100000000 | 0000010000000000 | f | f | f | t | t | t - 0000000000001111 | 0000000000010000 | t | t | f | f | f | t - 0000000100100011 | 1111111111111111 | t | t | f | f | f | t - 0010010001101000 | 0010010001101000 | f | t | t | t | f | f - 1111101001010000 | 0000010110101111 | f | f | f | t | t | t - 0001001000110100 | 1111111111110101 | t | t | f | f | f | t -(10 rows) - -SELECT a,a<<4 AS "a<<4",b,b>>2 AS "b>>2" FROM bit_table; - a | a<<4 | b | b>>2 -------------------+------------------+------------------+------------------ - 0000111100000000 | 1111000000000000 | 0001000000000000 | 0000010000000000 - 0001111100000000 | 1111000000000000 | 0001000100000000 | 0000010001000000 - 0010111100000000 | 1111000000000000 | 0001001000000000 | 0000010010000000 - 0011111100000000 | 1111000000000000 | 0001001100000000 | 0000010011000000 - 1000111100000000 | 1111000000000000 | 0000010000000000 | 0000000100000000 - 0000000000001111 | 0000000011110000 | 0000000000010000 | 0000000000000100 - 0000000100100011 | 0001001000110000 | 1111111111111111 | 0011111111111111 - 0010010001101000 | 0100011010000000 | 0010010001101000 | 0000100100011010 - 1111101001010000 | 1010010100000000 | 0000010110101111 | 0000000101101011 - 0001001000110100 | 0010001101000000 | 1111111111110101 | 0011111111111101 -(10 rows) - -DROP TABLE bit_table; --- The following should fail -select B'001' & B'10'; -ERROR: cannot AND bit strings of different sizes -select B'0111' | B'011'; -ERROR: cannot OR bit strings of different sizes -select B'0010' # B'011101'; -ERROR: cannot XOR bit strings of different sizes --- More position tests, checking all the boundary cases -SELECT POSITION(B'1010' IN B'0000101'); -- 0 - position ----------- - 0 -(1 row) - -SELECT POSITION(B'1010' IN B'00001010'); -- 5 - position ----------- - 5 -(1 row) - -SELECT POSITION(B'1010' IN B'00000101'); -- 0 - position ----------- - 0 -(1 row) - -SELECT POSITION(B'1010' IN B'000001010'); -- 6 - position ----------- - 6 -(1 row) - -SELECT POSITION(B'' IN B'00001010'); -- 1 - position ----------- - 1 -(1 row) - -SELECT POSITION(B'0' IN B''); -- 0 - position ----------- - 0 -(1 row) - -SELECT POSITION(B'' IN B''); -- 0 - position ----------- - 0 -(1 row) - -SELECT POSITION(B'101101' IN B'001011011011011000'); -- 3 - position ----------- - 3 -(1 row) - -SELECT POSITION(B'10110110' IN B'001011011011010'); -- 3 - position ----------- - 3 -(1 row) - -SELECT POSITION(B'1011011011011' IN B'001011011011011'); -- 3 - position ----------- - 3 -(1 row) - -SELECT POSITION(B'1011011011011' IN B'00001011011011011'); -- 5 - position ----------- - 5 -(1 row) - -SELECT POSITION(B'11101011' IN B'11101011'); -- 1 - position ----------- - 1 -(1 row) - -SELECT POSITION(B'11101011' IN B'011101011'); -- 2 - position ----------- - 2 -(1 row) - -SELECT POSITION(B'11101011' IN B'00011101011'); -- 4 - position ----------- - 4 -(1 row) - -SELECT POSITION(B'11101011' IN B'0000011101011'); -- 6 - position ----------- - 6 -(1 row) - -SELECT POSITION(B'111010110' IN B'111010110'); -- 1 - position ----------- - 1 -(1 row) - -SELECT POSITION(B'111010110' IN B'0111010110'); -- 2 - position ----------- - 2 -(1 row) - -SELECT POSITION(B'111010110' IN B'000111010110'); -- 4 - position ----------- - 4 -(1 row) - -SELECT POSITION(B'111010110' IN B'00000111010110'); -- 6 - position ----------- - 6 -(1 row) - -SELECT POSITION(B'111010110' IN B'11101011'); -- 0 - position ----------- - 0 -(1 row) - -SELECT POSITION(B'111010110' IN B'011101011'); -- 0 - position ----------- - 0 -(1 row) - -SELECT POSITION(B'111010110' IN B'00011101011'); -- 0 - position ----------- - 0 -(1 row) - -SELECT POSITION(B'111010110' IN B'0000011101011'); -- 0 - position ----------- - 0 -(1 row) - -SELECT POSITION(B'111010110' IN B'111010110'); -- 1 - position ----------- - 1 -(1 row) - -SELECT POSITION(B'111010110' IN B'0111010110'); -- 2 - position ----------- - 2 -(1 row) - -SELECT POSITION(B'111010110' IN B'000111010110'); -- 4 - position ----------- - 4 -(1 row) - -SELECT POSITION(B'111010110' IN B'00000111010110'); -- 6 - position ----------- - 6 -(1 row) - -SELECT POSITION(B'111010110' IN B'000001110101111101011'); -- 0 - position ----------- - 0 -(1 row) - -SELECT POSITION(B'111010110' IN B'0000001110101111101011'); -- 0 - position ----------- - 0 -(1 row) - -SELECT POSITION(B'111010110' IN B'000000001110101111101011'); -- 0 - position ----------- - 0 -(1 row) - -SELECT POSITION(B'111010110' IN B'00000000001110101111101011'); -- 0 - position ----------- - 0 -(1 row) - -SELECT POSITION(B'111010110' IN B'0000011101011111010110'); -- 14 - position ----------- - 14 -(1 row) - -SELECT POSITION(B'111010110' IN B'00000011101011111010110'); -- 15 - position ----------- - 15 -(1 row) - -SELECT POSITION(B'111010110' IN B'0000000011101011111010110'); -- 17 - position ----------- - 17 -(1 row) - -SELECT POSITION(B'111010110' IN B'000000000011101011111010110'); -- 19 - position ----------- - 19 -(1 row) - -SELECT POSITION(B'000000000011101011111010110' IN B'000000000011101011111010110'); -- 1 - position ----------- - 1 -(1 row) - -SELECT POSITION(B'00000000011101011111010110' IN B'000000000011101011111010110'); -- 2 - position ----------- - 2 -(1 row) - -SELECT POSITION(B'0000000000011101011111010110' IN B'000000000011101011111010110'); -- 0 - position ----------- - 0 -(1 row) - --- Shifting -CREATE TABLE BIT_SHIFT_TABLE(b BIT(16)); -INSERT INTO BIT_SHIFT_TABLE VALUES (B'1101100000000000'); -INSERT INTO BIT_SHIFT_TABLE SELECT b>>1 FROM BIT_SHIFT_TABLE; -INSERT INTO BIT_SHIFT_TABLE SELECT b>>2 FROM BIT_SHIFT_TABLE; -INSERT INTO BIT_SHIFT_TABLE SELECT b>>4 FROM BIT_SHIFT_TABLE; -INSERT INTO BIT_SHIFT_TABLE SELECT b>>8 FROM BIT_SHIFT_TABLE; -SELECT POSITION(B'1101' IN b), - POSITION(B'11011' IN b), - b - FROM BIT_SHIFT_TABLE ; - position | position | b -----------+----------+------------------ - 1 | 1 | 1101100000000000 - 2 | 2 | 0110110000000000 - 3 | 3 | 0011011000000000 - 4 | 4 | 0001101100000000 - 5 | 5 | 0000110110000000 - 6 | 6 | 0000011011000000 - 7 | 7 | 0000001101100000 - 8 | 8 | 0000000110110000 - 9 | 9 | 0000000011011000 - 10 | 10 | 0000000001101100 - 11 | 11 | 0000000000110110 - 12 | 12 | 0000000000011011 - 13 | 0 | 0000000000001101 - 0 | 0 | 0000000000000110 - 0 | 0 | 0000000000000011 - 0 | 0 | 0000000000000001 -(16 rows) - -SELECT b, b >> 1 AS bsr, b << 1 AS bsl - FROM BIT_SHIFT_TABLE ; - b | bsr | bsl -------------------+------------------+------------------ - 1101100000000000 | 0110110000000000 | 1011000000000000 - 0110110000000000 | 0011011000000000 | 1101100000000000 - 0011011000000000 | 0001101100000000 | 0110110000000000 - 0001101100000000 | 0000110110000000 | 0011011000000000 - 0000110110000000 | 0000011011000000 | 0001101100000000 - 0000011011000000 | 0000001101100000 | 0000110110000000 - 0000001101100000 | 0000000110110000 | 0000011011000000 - 0000000110110000 | 0000000011011000 | 0000001101100000 - 0000000011011000 | 0000000001101100 | 0000000110110000 - 0000000001101100 | 0000000000110110 | 0000000011011000 - 0000000000110110 | 0000000000011011 | 0000000001101100 - 0000000000011011 | 0000000000001101 | 0000000000110110 - 0000000000001101 | 0000000000000110 | 0000000000011010 - 0000000000000110 | 0000000000000011 | 0000000000001100 - 0000000000000011 | 0000000000000001 | 0000000000000110 - 0000000000000001 | 0000000000000000 | 0000000000000010 -(16 rows) - -SELECT b, b >> 8 AS bsr8, b << 8 AS bsl8 - FROM BIT_SHIFT_TABLE ; - b | bsr8 | bsl8 -------------------+------------------+------------------ - 1101100000000000 | 0000000011011000 | 0000000000000000 - 0110110000000000 | 0000000001101100 | 0000000000000000 - 0011011000000000 | 0000000000110110 | 0000000000000000 - 0001101100000000 | 0000000000011011 | 0000000000000000 - 0000110110000000 | 0000000000001101 | 1000000000000000 - 0000011011000000 | 0000000000000110 | 1100000000000000 - 0000001101100000 | 0000000000000011 | 0110000000000000 - 0000000110110000 | 0000000000000001 | 1011000000000000 - 0000000011011000 | 0000000000000000 | 1101100000000000 - 0000000001101100 | 0000000000000000 | 0110110000000000 - 0000000000110110 | 0000000000000000 | 0011011000000000 - 0000000000011011 | 0000000000000000 | 0001101100000000 - 0000000000001101 | 0000000000000000 | 0000110100000000 - 0000000000000110 | 0000000000000000 | 0000011000000000 - 0000000000000011 | 0000000000000000 | 0000001100000000 - 0000000000000001 | 0000000000000000 | 0000000100000000 -(16 rows) - -SELECT b::bit(15), b::bit(15) >> 1 AS bsr, b::bit(15) << 1 AS bsl - FROM BIT_SHIFT_TABLE ; - b | bsr | bsl ------------------+-----------------+----------------- - 110110000000000 | 011011000000000 | 101100000000000 - 011011000000000 | 001101100000000 | 110110000000000 - 001101100000000 | 000110110000000 | 011011000000000 - 000110110000000 | 000011011000000 | 001101100000000 - 000011011000000 | 000001101100000 | 000110110000000 - 000001101100000 | 000000110110000 | 000011011000000 - 000000110110000 | 000000011011000 | 000001101100000 - 000000011011000 | 000000001101100 | 000000110110000 - 000000001101100 | 000000000110110 | 000000011011000 - 000000000110110 | 000000000011011 | 000000001101100 - 000000000011011 | 000000000001101 | 000000000110110 - 000000000001101 | 000000000000110 | 000000000011010 - 000000000000110 | 000000000000011 | 000000000001100 - 000000000000011 | 000000000000001 | 000000000000110 - 000000000000001 | 000000000000000 | 000000000000010 - 000000000000000 | 000000000000000 | 000000000000000 -(16 rows) - -SELECT b::bit(15), b::bit(15) >> 8 AS bsr8, b::bit(15) << 8 AS bsl8 - FROM BIT_SHIFT_TABLE ; - b | bsr8 | bsl8 ------------------+-----------------+----------------- - 110110000000000 | 000000001101100 | 000000000000000 - 011011000000000 | 000000000110110 | 000000000000000 - 001101100000000 | 000000000011011 | 000000000000000 - 000110110000000 | 000000000001101 | 000000000000000 - 000011011000000 | 000000000000110 | 100000000000000 - 000001101100000 | 000000000000011 | 110000000000000 - 000000110110000 | 000000000000001 | 011000000000000 - 000000011011000 | 000000000000000 | 101100000000000 - 000000001101100 | 000000000000000 | 110110000000000 - 000000000110110 | 000000000000000 | 011011000000000 - 000000000011011 | 000000000000000 | 001101100000000 - 000000000001101 | 000000000000000 | 000110100000000 - 000000000000110 | 000000000000000 | 000011000000000 - 000000000000011 | 000000000000000 | 000001100000000 - 000000000000001 | 000000000000000 | 000000100000000 - 000000000000000 | 000000000000000 | 000000000000000 -(16 rows) - -CREATE TABLE VARBIT_SHIFT_TABLE(v BIT VARYING(20)); -INSERT INTO VARBIT_SHIFT_TABLE VALUES (B'11011'); -INSERT INTO VARBIT_SHIFT_TABLE SELECT CAST(v || B'0' AS BIT VARYING(6)) >>1 FROM VARBIT_SHIFT_TABLE; -INSERT INTO VARBIT_SHIFT_TABLE SELECT CAST(v || B'00' AS BIT VARYING(8)) >>2 FROM VARBIT_SHIFT_TABLE; -INSERT INTO VARBIT_SHIFT_TABLE SELECT CAST(v || B'0000' AS BIT VARYING(12)) >>4 FROM VARBIT_SHIFT_TABLE; -INSERT INTO VARBIT_SHIFT_TABLE SELECT CAST(v || B'00000000' AS BIT VARYING(20)) >>8 FROM VARBIT_SHIFT_TABLE; -SELECT POSITION(B'1101' IN v), - POSITION(B'11011' IN v), - v - FROM VARBIT_SHIFT_TABLE ; - position | position | v -----------+----------+---------------------- - 1 | 1 | 11011 - 2 | 2 | 011011 - 3 | 3 | 0011011 - 4 | 4 | 00011011 - 5 | 5 | 000011011 - 6 | 6 | 0000011011 - 7 | 7 | 00000011011 - 8 | 8 | 000000011011 - 9 | 9 | 0000000011011 - 10 | 10 | 00000000011011 - 11 | 11 | 000000000011011 - 12 | 12 | 0000000000011011 - 13 | 13 | 00000000000011011 - 14 | 14 | 000000000000011011 - 15 | 15 | 0000000000000011011 - 16 | 16 | 00000000000000011011 -(16 rows) - -SELECT v, v >> 1 AS vsr, v << 1 AS vsl - FROM VARBIT_SHIFT_TABLE ; - v | vsr | vsl -----------------------+----------------------+---------------------- - 11011 | 01101 | 10110 - 011011 | 001101 | 110110 - 0011011 | 0001101 | 0110110 - 00011011 | 00001101 | 00110110 - 000011011 | 000001101 | 000110110 - 0000011011 | 0000001101 | 0000110110 - 00000011011 | 00000001101 | 00000110110 - 000000011011 | 000000001101 | 000000110110 - 0000000011011 | 0000000001101 | 0000000110110 - 00000000011011 | 00000000001101 | 00000000110110 - 000000000011011 | 000000000001101 | 000000000110110 - 0000000000011011 | 0000000000001101 | 0000000000110110 - 00000000000011011 | 00000000000001101 | 00000000000110110 - 000000000000011011 | 000000000000001101 | 000000000000110110 - 0000000000000011011 | 0000000000000001101 | 0000000000000110110 - 00000000000000011011 | 00000000000000001101 | 00000000000000110110 -(16 rows) - -SELECT v, v >> 8 AS vsr8, v << 8 AS vsl8 - FROM VARBIT_SHIFT_TABLE ; - v | vsr8 | vsl8 -----------------------+----------------------+---------------------- - 11011 | 00000 | 00000 - 011011 | 000000 | 000000 - 0011011 | 0000000 | 0000000 - 00011011 | 00000000 | 00000000 - 000011011 | 000000000 | 100000000 - 0000011011 | 0000000000 | 1100000000 - 00000011011 | 00000000000 | 01100000000 - 000000011011 | 000000000000 | 101100000000 - 0000000011011 | 0000000000000 | 1101100000000 - 00000000011011 | 00000000000000 | 01101100000000 - 000000000011011 | 000000000000000 | 001101100000000 - 0000000000011011 | 0000000000000000 | 0001101100000000 - 00000000000011011 | 00000000000000000 | 00001101100000000 - 000000000000011011 | 000000000000000000 | 000001101100000000 - 0000000000000011011 | 0000000000000000000 | 0000001101100000000 - 00000000000000011011 | 00000000000000000000 | 00000001101100000000 -(16 rows) - -DROP TABLE BIT_SHIFT_TABLE; -DROP TABLE VARBIT_SHIFT_TABLE; --- Get/Set bit -SELECT get_bit(B'0101011000100', 10); - get_bit ---------- - 1 -(1 row) - -SELECT set_bit(B'0101011000100100', 15, 1); - set_bit ------------------- - 0101011000100101 -(1 row) - -SELECT set_bit(B'0101011000100100', 16, 1); -- fail -ERROR: bit index 16 out of valid range (0..15) --- Overlay -SELECT overlay(B'0101011100' placing '001' from 2 for 3); - overlay ------------- - 0001011100 -(1 row) - -SELECT overlay(B'0101011100' placing '101' from 6); - overlay ------------- - 0101010100 -(1 row) - -SELECT overlay(B'0101011100' placing '001' from 11); - overlay ---------------- - 0101011100001 -(1 row) - -SELECT overlay(B'0101011100' placing '001' from 20); - overlay ---------------- - 0101011100001 -(1 row) - --- bit_count -SELECT bit_count(B'0101011100'::bit(10)); - bit_count ------------ - 5 -(1 row) - -SELECT bit_count(B'1111111111'::bit(10)); - bit_count ------------ - 10 -(1 row) - --- This table is intentionally left around to exercise pg_dump/pg_upgrade -CREATE TABLE bit_defaults( - b1 bit(4) DEFAULT '1001', - b2 bit(4) DEFAULT B'0101', - b3 bit varying(5) DEFAULT '1001', - b4 bit varying(5) DEFAULT B'0101' -); -\d bit_defaults - Table "public.bit_defaults" - Column | Type | Collation | Nullable | Default ---------+----------------+-----------+----------+--------------------- - b1 | bit(4) | | | '1001'::"bit" - b2 | bit(4) | | | '0101'::"bit" - b3 | bit varying(5) | | | '1001'::bit varying - b4 | bit varying(5) | | | '0101'::"bit" - -INSERT INTO bit_defaults DEFAULT VALUES; -TABLE bit_defaults; - b1 | b2 | b3 | b4 -------+------+------+------ - 1001 | 0101 | 1001 | 0101 -(1 row) - +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/numeric.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/numeric.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/numeric.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/numeric.out 2023-02-20 19:43:32.019205280 -0500 @@ -1,3226 +1 @@ --- --- NUMERIC --- -CREATE TABLE num_data (id int4, val numeric(210,10)); -CREATE TABLE num_exp_add (id1 int4, id2 int4, expected numeric(210,10)); -CREATE TABLE num_exp_sub (id1 int4, id2 int4, expected numeric(210,10)); -CREATE TABLE num_exp_div (id1 int4, id2 int4, expected numeric(210,10)); -CREATE TABLE num_exp_mul (id1 int4, id2 int4, expected numeric(210,10)); -CREATE TABLE num_exp_sqrt (id int4, expected numeric(210,10)); -CREATE TABLE num_exp_ln (id int4, expected numeric(210,10)); -CREATE TABLE num_exp_log10 (id int4, expected numeric(210,10)); -CREATE TABLE num_exp_power_10_ln (id int4, expected numeric(210,10)); -CREATE TABLE num_result (id1 int4, id2 int4, result numeric(210,10)); --- ****************************** --- * The following EXPECTED results are computed by bc(1) --- * with a scale of 200 --- ****************************** -BEGIN TRANSACTION; -INSERT INTO num_exp_add VALUES (0,0,'0'); -INSERT INTO num_exp_sub VALUES (0,0,'0'); -INSERT INTO num_exp_mul VALUES (0,0,'0'); -INSERT INTO num_exp_div VALUES (0,0,'NaN'); -INSERT INTO num_exp_add VALUES (0,1,'0'); -INSERT INTO num_exp_sub VALUES (0,1,'0'); -INSERT INTO num_exp_mul VALUES (0,1,'0'); -INSERT INTO num_exp_div VALUES (0,1,'NaN'); -INSERT INTO num_exp_add VALUES (0,2,'-34338492.215397047'); -INSERT INTO num_exp_sub VALUES (0,2,'34338492.215397047'); -INSERT INTO num_exp_mul VALUES (0,2,'0'); -INSERT INTO num_exp_div VALUES (0,2,'0'); -INSERT INTO num_exp_add VALUES (0,3,'4.31'); -INSERT INTO num_exp_sub VALUES (0,3,'-4.31'); -INSERT INTO num_exp_mul VALUES (0,3,'0'); -INSERT INTO num_exp_div VALUES (0,3,'0'); -INSERT INTO num_exp_add VALUES (0,4,'7799461.4119'); -INSERT INTO num_exp_sub VALUES (0,4,'-7799461.4119'); -INSERT INTO num_exp_mul VALUES (0,4,'0'); -INSERT INTO num_exp_div VALUES (0,4,'0'); -INSERT INTO num_exp_add VALUES (0,5,'16397.038491'); -INSERT INTO num_exp_sub VALUES (0,5,'-16397.038491'); -INSERT INTO num_exp_mul VALUES (0,5,'0'); -INSERT INTO num_exp_div VALUES (0,5,'0'); -INSERT INTO num_exp_add VALUES (0,6,'93901.57763026'); -INSERT INTO num_exp_sub VALUES (0,6,'-93901.57763026'); -INSERT INTO num_exp_mul VALUES (0,6,'0'); -INSERT INTO num_exp_div VALUES (0,6,'0'); -INSERT INTO num_exp_add VALUES (0,7,'-83028485'); -INSERT INTO num_exp_sub VALUES (0,7,'83028485'); -INSERT INTO num_exp_mul VALUES (0,7,'0'); -INSERT INTO num_exp_div VALUES (0,7,'0'); -INSERT INTO num_exp_add VALUES (0,8,'74881'); -INSERT INTO num_exp_sub VALUES (0,8,'-74881'); -INSERT INTO num_exp_mul VALUES (0,8,'0'); -INSERT INTO num_exp_div VALUES (0,8,'0'); -INSERT INTO num_exp_add VALUES (0,9,'-24926804.045047420'); -INSERT INTO num_exp_sub VALUES (0,9,'24926804.045047420'); -INSERT INTO num_exp_mul VALUES (0,9,'0'); -INSERT INTO num_exp_div VALUES (0,9,'0'); -INSERT INTO num_exp_add VALUES (1,0,'0'); -INSERT INTO num_exp_sub VALUES (1,0,'0'); -INSERT INTO num_exp_mul VALUES (1,0,'0'); -INSERT INTO num_exp_div VALUES (1,0,'NaN'); -INSERT INTO num_exp_add VALUES (1,1,'0'); -INSERT INTO num_exp_sub VALUES (1,1,'0'); -INSERT INTO num_exp_mul VALUES (1,1,'0'); -INSERT INTO num_exp_div VALUES (1,1,'NaN'); -INSERT INTO num_exp_add VALUES (1,2,'-34338492.215397047'); -INSERT INTO num_exp_sub VALUES (1,2,'34338492.215397047'); -INSERT INTO num_exp_mul VALUES (1,2,'0'); -INSERT INTO num_exp_div VALUES (1,2,'0'); -INSERT INTO num_exp_add VALUES (1,3,'4.31'); -INSERT INTO num_exp_sub VALUES (1,3,'-4.31'); -INSERT INTO num_exp_mul VALUES (1,3,'0'); -INSERT INTO num_exp_div VALUES (1,3,'0'); -INSERT INTO num_exp_add VALUES (1,4,'7799461.4119'); -INSERT INTO num_exp_sub VALUES (1,4,'-7799461.4119'); -INSERT INTO num_exp_mul VALUES (1,4,'0'); -INSERT INTO num_exp_div VALUES (1,4,'0'); -INSERT INTO num_exp_add VALUES (1,5,'16397.038491'); -INSERT INTO num_exp_sub VALUES (1,5,'-16397.038491'); -INSERT INTO num_exp_mul VALUES (1,5,'0'); -INSERT INTO num_exp_div VALUES (1,5,'0'); -INSERT INTO num_exp_add VALUES (1,6,'93901.57763026'); -INSERT INTO num_exp_sub VALUES (1,6,'-93901.57763026'); -INSERT INTO num_exp_mul VALUES (1,6,'0'); -INSERT INTO num_exp_div VALUES (1,6,'0'); -INSERT INTO num_exp_add VALUES (1,7,'-83028485'); -INSERT INTO num_exp_sub VALUES (1,7,'83028485'); -INSERT INTO num_exp_mul VALUES (1,7,'0'); -INSERT INTO num_exp_div VALUES (1,7,'0'); -INSERT INTO num_exp_add VALUES (1,8,'74881'); -INSERT INTO num_exp_sub VALUES (1,8,'-74881'); -INSERT INTO num_exp_mul VALUES (1,8,'0'); -INSERT INTO num_exp_div VALUES (1,8,'0'); -INSERT INTO num_exp_add VALUES (1,9,'-24926804.045047420'); -INSERT INTO num_exp_sub VALUES (1,9,'24926804.045047420'); -INSERT INTO num_exp_mul VALUES (1,9,'0'); -INSERT INTO num_exp_div VALUES (1,9,'0'); -INSERT INTO num_exp_add VALUES (2,0,'-34338492.215397047'); -INSERT INTO num_exp_sub VALUES (2,0,'-34338492.215397047'); -INSERT INTO num_exp_mul VALUES (2,0,'0'); -INSERT INTO num_exp_div VALUES (2,0,'NaN'); -INSERT INTO num_exp_add VALUES (2,1,'-34338492.215397047'); -INSERT INTO num_exp_sub VALUES (2,1,'-34338492.215397047'); -INSERT INTO num_exp_mul VALUES (2,1,'0'); -INSERT INTO num_exp_div VALUES (2,1,'NaN'); -INSERT INTO num_exp_add VALUES (2,2,'-68676984.430794094'); -INSERT INTO num_exp_sub VALUES (2,2,'0'); -INSERT INTO num_exp_mul VALUES (2,2,'1179132047626883.596862135856320209'); -INSERT INTO num_exp_div VALUES (2,2,'1.00000000000000000000'); -INSERT INTO num_exp_add VALUES (2,3,'-34338487.905397047'); -INSERT INTO num_exp_sub VALUES (2,3,'-34338496.525397047'); -INSERT INTO num_exp_mul VALUES (2,3,'-147998901.44836127257'); -INSERT INTO num_exp_div VALUES (2,3,'-7967167.56737750510440835266'); -INSERT INTO num_exp_add VALUES (2,4,'-26539030.803497047'); -INSERT INTO num_exp_sub VALUES (2,4,'-42137953.627297047'); -INSERT INTO num_exp_mul VALUES (2,4,'-267821744976817.8111137106593'); -INSERT INTO num_exp_div VALUES (2,4,'-4.40267480046830116685'); -INSERT INTO num_exp_add VALUES (2,5,'-34322095.176906047'); -INSERT INTO num_exp_sub VALUES (2,5,'-34354889.253888047'); -INSERT INTO num_exp_mul VALUES (2,5,'-563049578578.769242506736077'); -INSERT INTO num_exp_div VALUES (2,5,'-2094.18866914563535496429'); -INSERT INTO num_exp_add VALUES (2,6,'-34244590.637766787'); -INSERT INTO num_exp_sub VALUES (2,6,'-34432393.793027307'); -INSERT INTO num_exp_mul VALUES (2,6,'-3224438592470.18449811926184222'); -INSERT INTO num_exp_div VALUES (2,6,'-365.68599891479766440940'); -INSERT INTO num_exp_add VALUES (2,7,'-117366977.215397047'); -INSERT INTO num_exp_sub VALUES (2,7,'48689992.784602953'); -INSERT INTO num_exp_mul VALUES (2,7,'2851072985828710.485883795'); -INSERT INTO num_exp_div VALUES (2,7,'.41357483778485235518'); -INSERT INTO num_exp_add VALUES (2,8,'-34263611.215397047'); -INSERT INTO num_exp_sub VALUES (2,8,'-34413373.215397047'); -INSERT INTO num_exp_mul VALUES (2,8,'-2571300635581.146276407'); -INSERT INTO num_exp_div VALUES (2,8,'-458.57416721727870888476'); -INSERT INTO num_exp_add VALUES (2,9,'-59265296.260444467'); -INSERT INTO num_exp_sub VALUES (2,9,'-9411688.170349627'); -INSERT INTO num_exp_mul VALUES (2,9,'855948866655588.453741509242968740'); -INSERT INTO num_exp_div VALUES (2,9,'1.37757299946438931811'); -INSERT INTO num_exp_add VALUES (3,0,'4.31'); -INSERT INTO num_exp_sub VALUES (3,0,'4.31'); -INSERT INTO num_exp_mul VALUES (3,0,'0'); -INSERT INTO num_exp_div VALUES (3,0,'NaN'); -INSERT INTO num_exp_add VALUES (3,1,'4.31'); -INSERT INTO num_exp_sub VALUES (3,1,'4.31'); -INSERT INTO num_exp_mul VALUES (3,1,'0'); -INSERT INTO num_exp_div VALUES (3,1,'NaN'); -INSERT INTO num_exp_add VALUES (3,2,'-34338487.905397047'); -INSERT INTO num_exp_sub VALUES (3,2,'34338496.525397047'); -INSERT INTO num_exp_mul VALUES (3,2,'-147998901.44836127257'); -INSERT INTO num_exp_div VALUES (3,2,'-.00000012551512084352'); -INSERT INTO num_exp_add VALUES (3,3,'8.62'); -INSERT INTO num_exp_sub VALUES (3,3,'0'); -INSERT INTO num_exp_mul VALUES (3,3,'18.5761'); -INSERT INTO num_exp_div VALUES (3,3,'1.00000000000000000000'); -INSERT INTO num_exp_add VALUES (3,4,'7799465.7219'); -INSERT INTO num_exp_sub VALUES (3,4,'-7799457.1019'); -INSERT INTO num_exp_mul VALUES (3,4,'33615678.685289'); -INSERT INTO num_exp_div VALUES (3,4,'.00000055260225961552'); -INSERT INTO num_exp_add VALUES (3,5,'16401.348491'); -INSERT INTO num_exp_sub VALUES (3,5,'-16392.728491'); -INSERT INTO num_exp_mul VALUES (3,5,'70671.23589621'); -INSERT INTO num_exp_div VALUES (3,5,'.00026285234387695504'); -INSERT INTO num_exp_add VALUES (3,6,'93905.88763026'); -INSERT INTO num_exp_sub VALUES (3,6,'-93897.26763026'); -INSERT INTO num_exp_mul VALUES (3,6,'404715.7995864206'); -INSERT INTO num_exp_div VALUES (3,6,'.00004589912234457595'); -INSERT INTO num_exp_add VALUES (3,7,'-83028480.69'); -INSERT INTO num_exp_sub VALUES (3,7,'83028489.31'); -INSERT INTO num_exp_mul VALUES (3,7,'-357852770.35'); -INSERT INTO num_exp_div VALUES (3,7,'-.00000005190989574240'); -INSERT INTO num_exp_add VALUES (3,8,'74885.31'); -INSERT INTO num_exp_sub VALUES (3,8,'-74876.69'); -INSERT INTO num_exp_mul VALUES (3,8,'322737.11'); -INSERT INTO num_exp_div VALUES (3,8,'.00005755799201399553'); -INSERT INTO num_exp_add VALUES (3,9,'-24926799.735047420'); -INSERT INTO num_exp_sub VALUES (3,9,'24926808.355047420'); -INSERT INTO num_exp_mul VALUES (3,9,'-107434525.43415438020'); -INSERT INTO num_exp_div VALUES (3,9,'-.00000017290624149854'); -INSERT INTO num_exp_add VALUES (4,0,'7799461.4119'); -INSERT INTO num_exp_sub VALUES (4,0,'7799461.4119'); -INSERT INTO num_exp_mul VALUES (4,0,'0'); -INSERT INTO num_exp_div VALUES (4,0,'NaN'); -INSERT INTO num_exp_add VALUES (4,1,'7799461.4119'); -INSERT INTO num_exp_sub VALUES (4,1,'7799461.4119'); -INSERT INTO num_exp_mul VALUES (4,1,'0'); -INSERT INTO num_exp_div VALUES (4,1,'NaN'); -INSERT INTO num_exp_add VALUES (4,2,'-26539030.803497047'); -INSERT INTO num_exp_sub VALUES (4,2,'42137953.627297047'); -INSERT INTO num_exp_mul VALUES (4,2,'-267821744976817.8111137106593'); -INSERT INTO num_exp_div VALUES (4,2,'-.22713465002993920385'); -INSERT INTO num_exp_add VALUES (4,3,'7799465.7219'); -INSERT INTO num_exp_sub VALUES (4,3,'7799457.1019'); -INSERT INTO num_exp_mul VALUES (4,3,'33615678.685289'); -INSERT INTO num_exp_div VALUES (4,3,'1809619.81714617169373549883'); -INSERT INTO num_exp_add VALUES (4,4,'15598922.8238'); -INSERT INTO num_exp_sub VALUES (4,4,'0'); -INSERT INTO num_exp_mul VALUES (4,4,'60831598315717.14146161'); -INSERT INTO num_exp_div VALUES (4,4,'1.00000000000000000000'); -INSERT INTO num_exp_add VALUES (4,5,'7815858.450391'); -INSERT INTO num_exp_sub VALUES (4,5,'7783064.373409'); -INSERT INTO num_exp_mul VALUES (4,5,'127888068979.9935054429'); -INSERT INTO num_exp_div VALUES (4,5,'475.66281046305802686061'); -INSERT INTO num_exp_add VALUES (4,6,'7893362.98953026'); -INSERT INTO num_exp_sub VALUES (4,6,'7705559.83426974'); -INSERT INTO num_exp_mul VALUES (4,6,'732381731243.745115764094'); -INSERT INTO num_exp_div VALUES (4,6,'83.05996138436129499606'); -INSERT INTO num_exp_add VALUES (4,7,'-75229023.5881'); -INSERT INTO num_exp_sub VALUES (4,7,'90827946.4119'); -INSERT INTO num_exp_mul VALUES (4,7,'-647577464846017.9715'); -INSERT INTO num_exp_div VALUES (4,7,'-.09393717604145131637'); -INSERT INTO num_exp_add VALUES (4,8,'7874342.4119'); -INSERT INTO num_exp_sub VALUES (4,8,'7724580.4119'); -INSERT INTO num_exp_mul VALUES (4,8,'584031469984.4839'); -INSERT INTO num_exp_div VALUES (4,8,'104.15808298366741897143'); -INSERT INTO num_exp_add VALUES (4,9,'-17127342.633147420'); -INSERT INTO num_exp_sub VALUES (4,9,'32726265.456947420'); -INSERT INTO num_exp_mul VALUES (4,9,'-194415646271340.1815956522980'); -INSERT INTO num_exp_div VALUES (4,9,'-.31289456112403769409'); -INSERT INTO num_exp_add VALUES (5,0,'16397.038491'); -INSERT INTO num_exp_sub VALUES (5,0,'16397.038491'); -INSERT INTO num_exp_mul VALUES (5,0,'0'); -INSERT INTO num_exp_div VALUES (5,0,'NaN'); -INSERT INTO num_exp_add VALUES (5,1,'16397.038491'); -INSERT INTO num_exp_sub VALUES (5,1,'16397.038491'); -INSERT INTO num_exp_mul VALUES (5,1,'0'); -INSERT INTO num_exp_div VALUES (5,1,'NaN'); -INSERT INTO num_exp_add VALUES (5,2,'-34322095.176906047'); -INSERT INTO num_exp_sub VALUES (5,2,'34354889.253888047'); -INSERT INTO num_exp_mul VALUES (5,2,'-563049578578.769242506736077'); -INSERT INTO num_exp_div VALUES (5,2,'-.00047751189505192446'); -INSERT INTO num_exp_add VALUES (5,3,'16401.348491'); -INSERT INTO num_exp_sub VALUES (5,3,'16392.728491'); -INSERT INTO num_exp_mul VALUES (5,3,'70671.23589621'); -INSERT INTO num_exp_div VALUES (5,3,'3804.41728329466357308584'); -INSERT INTO num_exp_add VALUES (5,4,'7815858.450391'); -INSERT INTO num_exp_sub VALUES (5,4,'-7783064.373409'); -INSERT INTO num_exp_mul VALUES (5,4,'127888068979.9935054429'); -INSERT INTO num_exp_div VALUES (5,4,'.00210232958726897192'); -INSERT INTO num_exp_add VALUES (5,5,'32794.076982'); -INSERT INTO num_exp_sub VALUES (5,5,'0'); -INSERT INTO num_exp_mul VALUES (5,5,'268862871.275335557081'); -INSERT INTO num_exp_div VALUES (5,5,'1.00000000000000000000'); -INSERT INTO num_exp_add VALUES (5,6,'110298.61612126'); -INSERT INTO num_exp_sub VALUES (5,6,'-77504.53913926'); -INSERT INTO num_exp_mul VALUES (5,6,'1539707782.76899778633766'); -INSERT INTO num_exp_div VALUES (5,6,'.17461941433576102689'); -INSERT INTO num_exp_add VALUES (5,7,'-83012087.961509'); -INSERT INTO num_exp_sub VALUES (5,7,'83044882.038491'); -INSERT INTO num_exp_mul VALUES (5,7,'-1361421264394.416135'); -INSERT INTO num_exp_div VALUES (5,7,'-.00019748690453643710'); -INSERT INTO num_exp_add VALUES (5,8,'91278.038491'); -INSERT INTO num_exp_sub VALUES (5,8,'-58483.961509'); -INSERT INTO num_exp_mul VALUES (5,8,'1227826639.244571'); -INSERT INTO num_exp_div VALUES (5,8,'.21897461960978085228'); -INSERT INTO num_exp_add VALUES (5,9,'-24910407.006556420'); -INSERT INTO num_exp_sub VALUES (5,9,'24943201.083538420'); -INSERT INTO num_exp_mul VALUES (5,9,'-408725765384.257043660243220'); -INSERT INTO num_exp_div VALUES (5,9,'-.00065780749354660427'); -INSERT INTO num_exp_add VALUES (6,0,'93901.57763026'); -INSERT INTO num_exp_sub VALUES (6,0,'93901.57763026'); -INSERT INTO num_exp_mul VALUES (6,0,'0'); -INSERT INTO num_exp_div VALUES (6,0,'NaN'); -INSERT INTO num_exp_add VALUES (6,1,'93901.57763026'); -INSERT INTO num_exp_sub VALUES (6,1,'93901.57763026'); -INSERT INTO num_exp_mul VALUES (6,1,'0'); -INSERT INTO num_exp_div VALUES (6,1,'NaN'); -INSERT INTO num_exp_add VALUES (6,2,'-34244590.637766787'); -INSERT INTO num_exp_sub VALUES (6,2,'34432393.793027307'); -INSERT INTO num_exp_mul VALUES (6,2,'-3224438592470.18449811926184222'); -INSERT INTO num_exp_div VALUES (6,2,'-.00273458651128995823'); -INSERT INTO num_exp_add VALUES (6,3,'93905.88763026'); -INSERT INTO num_exp_sub VALUES (6,3,'93897.26763026'); -INSERT INTO num_exp_mul VALUES (6,3,'404715.7995864206'); -INSERT INTO num_exp_div VALUES (6,3,'21786.90896293735498839907'); -INSERT INTO num_exp_add VALUES (6,4,'7893362.98953026'); -INSERT INTO num_exp_sub VALUES (6,4,'-7705559.83426974'); -INSERT INTO num_exp_mul VALUES (6,4,'732381731243.745115764094'); -INSERT INTO num_exp_div VALUES (6,4,'.01203949512295682469'); -INSERT INTO num_exp_add VALUES (6,5,'110298.61612126'); -INSERT INTO num_exp_sub VALUES (6,5,'77504.53913926'); -INSERT INTO num_exp_mul VALUES (6,5,'1539707782.76899778633766'); -INSERT INTO num_exp_div VALUES (6,5,'5.72674008674192359679'); -INSERT INTO num_exp_add VALUES (6,6,'187803.15526052'); -INSERT INTO num_exp_sub VALUES (6,6,'0'); -INSERT INTO num_exp_mul VALUES (6,6,'8817506281.4517452372676676'); -INSERT INTO num_exp_div VALUES (6,6,'1.00000000000000000000'); -INSERT INTO num_exp_add VALUES (6,7,'-82934583.42236974'); -INSERT INTO num_exp_sub VALUES (6,7,'83122386.57763026'); -INSERT INTO num_exp_mul VALUES (6,7,'-7796505729750.37795610'); -INSERT INTO num_exp_div VALUES (6,7,'-.00113095617281538980'); -INSERT INTO num_exp_add VALUES (6,8,'168782.57763026'); -INSERT INTO num_exp_sub VALUES (6,8,'19020.57763026'); -INSERT INTO num_exp_mul VALUES (6,8,'7031444034.53149906'); -INSERT INTO num_exp_div VALUES (6,8,'1.25401073209839612184'); -INSERT INTO num_exp_add VALUES (6,9,'-24832902.467417160'); -INSERT INTO num_exp_sub VALUES (6,9,'25020705.622677680'); -INSERT INTO num_exp_mul VALUES (6,9,'-2340666225110.29929521292692920'); -INSERT INTO num_exp_div VALUES (6,9,'-.00376709254265256789'); -INSERT INTO num_exp_add VALUES (7,0,'-83028485'); -INSERT INTO num_exp_sub VALUES (7,0,'-83028485'); -INSERT INTO num_exp_mul VALUES (7,0,'0'); -INSERT INTO num_exp_div VALUES (7,0,'NaN'); -INSERT INTO num_exp_add VALUES (7,1,'-83028485'); -INSERT INTO num_exp_sub VALUES (7,1,'-83028485'); -INSERT INTO num_exp_mul VALUES (7,1,'0'); -INSERT INTO num_exp_div VALUES (7,1,'NaN'); -INSERT INTO num_exp_add VALUES (7,2,'-117366977.215397047'); -INSERT INTO num_exp_sub VALUES (7,2,'-48689992.784602953'); -INSERT INTO num_exp_mul VALUES (7,2,'2851072985828710.485883795'); -INSERT INTO num_exp_div VALUES (7,2,'2.41794207151503385700'); -INSERT INTO num_exp_add VALUES (7,3,'-83028480.69'); -INSERT INTO num_exp_sub VALUES (7,3,'-83028489.31'); -INSERT INTO num_exp_mul VALUES (7,3,'-357852770.35'); -INSERT INTO num_exp_div VALUES (7,3,'-19264149.65197215777262180974'); -INSERT INTO num_exp_add VALUES (7,4,'-75229023.5881'); -INSERT INTO num_exp_sub VALUES (7,4,'-90827946.4119'); -INSERT INTO num_exp_mul VALUES (7,4,'-647577464846017.9715'); -INSERT INTO num_exp_div VALUES (7,4,'-10.64541262725136247686'); -INSERT INTO num_exp_add VALUES (7,5,'-83012087.961509'); -INSERT INTO num_exp_sub VALUES (7,5,'-83044882.038491'); -INSERT INTO num_exp_mul VALUES (7,5,'-1361421264394.416135'); -INSERT INTO num_exp_div VALUES (7,5,'-5063.62688881730941836574'); -INSERT INTO num_exp_add VALUES (7,6,'-82934583.42236974'); -INSERT INTO num_exp_sub VALUES (7,6,'-83122386.57763026'); -INSERT INTO num_exp_mul VALUES (7,6,'-7796505729750.37795610'); -INSERT INTO num_exp_div VALUES (7,6,'-884.20756174009028770294'); -INSERT INTO num_exp_add VALUES (7,7,'-166056970'); -INSERT INTO num_exp_sub VALUES (7,7,'0'); -INSERT INTO num_exp_mul VALUES (7,7,'6893729321395225'); -INSERT INTO num_exp_div VALUES (7,7,'1.00000000000000000000'); -INSERT INTO num_exp_add VALUES (7,8,'-82953604'); -INSERT INTO num_exp_sub VALUES (7,8,'-83103366'); -INSERT INTO num_exp_mul VALUES (7,8,'-6217255985285'); -INSERT INTO num_exp_div VALUES (7,8,'-1108.80577182462841041118'); -INSERT INTO num_exp_add VALUES (7,9,'-107955289.045047420'); -INSERT INTO num_exp_sub VALUES (7,9,'-58101680.954952580'); -INSERT INTO num_exp_mul VALUES (7,9,'2069634775752159.035758700'); -INSERT INTO num_exp_div VALUES (7,9,'3.33089171198810413382'); -INSERT INTO num_exp_add VALUES (8,0,'74881'); -INSERT INTO num_exp_sub VALUES (8,0,'74881'); -INSERT INTO num_exp_mul VALUES (8,0,'0'); -INSERT INTO num_exp_div VALUES (8,0,'NaN'); -INSERT INTO num_exp_add VALUES (8,1,'74881'); -INSERT INTO num_exp_sub VALUES (8,1,'74881'); -INSERT INTO num_exp_mul VALUES (8,1,'0'); -INSERT INTO num_exp_div VALUES (8,1,'NaN'); -INSERT INTO num_exp_add VALUES (8,2,'-34263611.215397047'); -INSERT INTO num_exp_sub VALUES (8,2,'34413373.215397047'); -INSERT INTO num_exp_mul VALUES (8,2,'-2571300635581.146276407'); -INSERT INTO num_exp_div VALUES (8,2,'-.00218067233500788615'); -INSERT INTO num_exp_add VALUES (8,3,'74885.31'); -INSERT INTO num_exp_sub VALUES (8,3,'74876.69'); -INSERT INTO num_exp_mul VALUES (8,3,'322737.11'); -INSERT INTO num_exp_div VALUES (8,3,'17373.78190255220417633410'); -INSERT INTO num_exp_add VALUES (8,4,'7874342.4119'); -INSERT INTO num_exp_sub VALUES (8,4,'-7724580.4119'); -INSERT INTO num_exp_mul VALUES (8,4,'584031469984.4839'); -INSERT INTO num_exp_div VALUES (8,4,'.00960079113741758956'); -INSERT INTO num_exp_add VALUES (8,5,'91278.038491'); -INSERT INTO num_exp_sub VALUES (8,5,'58483.961509'); -INSERT INTO num_exp_mul VALUES (8,5,'1227826639.244571'); -INSERT INTO num_exp_div VALUES (8,5,'4.56673929509287019456'); -INSERT INTO num_exp_add VALUES (8,6,'168782.57763026'); -INSERT INTO num_exp_sub VALUES (8,6,'-19020.57763026'); -INSERT INTO num_exp_mul VALUES (8,6,'7031444034.53149906'); -INSERT INTO num_exp_div VALUES (8,6,'.79744134113322314424'); -INSERT INTO num_exp_add VALUES (8,7,'-82953604'); -INSERT INTO num_exp_sub VALUES (8,7,'83103366'); -INSERT INTO num_exp_mul VALUES (8,7,'-6217255985285'); -INSERT INTO num_exp_div VALUES (8,7,'-.00090187120721280172'); -INSERT INTO num_exp_add VALUES (8,8,'149762'); -INSERT INTO num_exp_sub VALUES (8,8,'0'); -INSERT INTO num_exp_mul VALUES (8,8,'5607164161'); -INSERT INTO num_exp_div VALUES (8,8,'1.00000000000000000000'); -INSERT INTO num_exp_add VALUES (8,9,'-24851923.045047420'); -INSERT INTO num_exp_sub VALUES (8,9,'25001685.045047420'); -INSERT INTO num_exp_mul VALUES (8,9,'-1866544013697.195857020'); -INSERT INTO num_exp_div VALUES (8,9,'-.00300403532938582735'); -INSERT INTO num_exp_add VALUES (9,0,'-24926804.045047420'); -INSERT INTO num_exp_sub VALUES (9,0,'-24926804.045047420'); -INSERT INTO num_exp_mul VALUES (9,0,'0'); -INSERT INTO num_exp_div VALUES (9,0,'NaN'); -INSERT INTO num_exp_add VALUES (9,1,'-24926804.045047420'); -INSERT INTO num_exp_sub VALUES (9,1,'-24926804.045047420'); -INSERT INTO num_exp_mul VALUES (9,1,'0'); -INSERT INTO num_exp_div VALUES (9,1,'NaN'); -INSERT INTO num_exp_add VALUES (9,2,'-59265296.260444467'); -INSERT INTO num_exp_sub VALUES (9,2,'9411688.170349627'); -INSERT INTO num_exp_mul VALUES (9,2,'855948866655588.453741509242968740'); -INSERT INTO num_exp_div VALUES (9,2,'.72591434384152961526'); -INSERT INTO num_exp_add VALUES (9,3,'-24926799.735047420'); -INSERT INTO num_exp_sub VALUES (9,3,'-24926808.355047420'); -INSERT INTO num_exp_mul VALUES (9,3,'-107434525.43415438020'); -INSERT INTO num_exp_div VALUES (9,3,'-5783481.21694835730858468677'); -INSERT INTO num_exp_add VALUES (9,4,'-17127342.633147420'); -INSERT INTO num_exp_sub VALUES (9,4,'-32726265.456947420'); -INSERT INTO num_exp_mul VALUES (9,4,'-194415646271340.1815956522980'); -INSERT INTO num_exp_div VALUES (9,4,'-3.19596478892958416484'); -INSERT INTO num_exp_add VALUES (9,5,'-24910407.006556420'); -INSERT INTO num_exp_sub VALUES (9,5,'-24943201.083538420'); -INSERT INTO num_exp_mul VALUES (9,5,'-408725765384.257043660243220'); -INSERT INTO num_exp_div VALUES (9,5,'-1520.20159364322004505807'); -INSERT INTO num_exp_add VALUES (9,6,'-24832902.467417160'); -INSERT INTO num_exp_sub VALUES (9,6,'-25020705.622677680'); -INSERT INTO num_exp_mul VALUES (9,6,'-2340666225110.29929521292692920'); -INSERT INTO num_exp_div VALUES (9,6,'-265.45671195426965751280'); -INSERT INTO num_exp_add VALUES (9,7,'-107955289.045047420'); -INSERT INTO num_exp_sub VALUES (9,7,'58101680.954952580'); -INSERT INTO num_exp_mul VALUES (9,7,'2069634775752159.035758700'); -INSERT INTO num_exp_div VALUES (9,7,'.30021990699995814689'); -INSERT INTO num_exp_add VALUES (9,8,'-24851923.045047420'); -INSERT INTO num_exp_sub VALUES (9,8,'-25001685.045047420'); -INSERT INTO num_exp_mul VALUES (9,8,'-1866544013697.195857020'); -INSERT INTO num_exp_div VALUES (9,8,'-332.88556569820675471748'); -INSERT INTO num_exp_add VALUES (9,9,'-49853608.090094840'); -INSERT INTO num_exp_sub VALUES (9,9,'0'); -INSERT INTO num_exp_mul VALUES (9,9,'621345559900192.420120630048656400'); -INSERT INTO num_exp_div VALUES (9,9,'1.00000000000000000000'); -COMMIT TRANSACTION; -BEGIN TRANSACTION; -INSERT INTO num_exp_sqrt VALUES (0,'0'); -INSERT INTO num_exp_sqrt VALUES (1,'0'); -INSERT INTO num_exp_sqrt VALUES (2,'5859.90547836712524903505'); -INSERT INTO num_exp_sqrt VALUES (3,'2.07605394920266944396'); -INSERT INTO num_exp_sqrt VALUES (4,'2792.75158435189147418923'); -INSERT INTO num_exp_sqrt VALUES (5,'128.05092147657509145473'); -INSERT INTO num_exp_sqrt VALUES (6,'306.43364311096782703406'); -INSERT INTO num_exp_sqrt VALUES (7,'9111.99676251039939975230'); -INSERT INTO num_exp_sqrt VALUES (8,'273.64392922189960397542'); -INSERT INTO num_exp_sqrt VALUES (9,'4992.67503899937593364766'); -COMMIT TRANSACTION; -BEGIN TRANSACTION; -INSERT INTO num_exp_ln VALUES (0,'NaN'); -INSERT INTO num_exp_ln VALUES (1,'NaN'); -INSERT INTO num_exp_ln VALUES (2,'17.35177750493897715514'); -INSERT INTO num_exp_ln VALUES (3,'1.46093790411565641971'); -INSERT INTO num_exp_ln VALUES (4,'15.86956523951936572464'); -INSERT INTO num_exp_ln VALUES (5,'9.70485601768871834038'); -INSERT INTO num_exp_ln VALUES (6,'11.45000246622944403127'); -INSERT INTO num_exp_ln VALUES (7,'18.23469429965478772991'); -INSERT INTO num_exp_ln VALUES (8,'11.22365546576315513668'); -INSERT INTO num_exp_ln VALUES (9,'17.03145425013166006962'); -COMMIT TRANSACTION; -BEGIN TRANSACTION; -INSERT INTO num_exp_log10 VALUES (0,'NaN'); -INSERT INTO num_exp_log10 VALUES (1,'NaN'); -INSERT INTO num_exp_log10 VALUES (2,'7.53578122160797276459'); -INSERT INTO num_exp_log10 VALUES (3,'.63447727016073160075'); -INSERT INTO num_exp_log10 VALUES (4,'6.89206461372691743345'); -INSERT INTO num_exp_log10 VALUES (5,'4.21476541614777768626'); -INSERT INTO num_exp_log10 VALUES (6,'4.97267288886207207671'); -INSERT INTO num_exp_log10 VALUES (7,'7.91922711353275546914'); -INSERT INTO num_exp_log10 VALUES (8,'4.87437163556421004138'); -INSERT INTO num_exp_log10 VALUES (9,'7.39666659961986567059'); -COMMIT TRANSACTION; -BEGIN TRANSACTION; -INSERT INTO num_exp_power_10_ln VALUES (0,'NaN'); -INSERT INTO num_exp_power_10_ln VALUES (1,'NaN'); -INSERT INTO num_exp_power_10_ln VALUES (2,'224790267919917955.13261618583642653184'); -INSERT INTO num_exp_power_10_ln VALUES (3,'28.90266599445155957393'); -INSERT INTO num_exp_power_10_ln VALUES (4,'7405685069594999.07733999469386277636'); -INSERT INTO num_exp_power_10_ln VALUES (5,'5068226527.32127265408584640098'); -INSERT INTO num_exp_power_10_ln VALUES (6,'281839893606.99372343357047819067'); -INSERT INTO num_exp_power_10_ln VALUES (7,'1716699575118597095.42330819910640247627'); -INSERT INTO num_exp_power_10_ln VALUES (8,'167361463828.07491320069016125952'); -INSERT INTO num_exp_power_10_ln VALUES (9,'107511333880052007.04141124673540337457'); -COMMIT TRANSACTION; -BEGIN TRANSACTION; -INSERT INTO num_data VALUES (0, '0'); -INSERT INTO num_data VALUES (1, '0'); -INSERT INTO num_data VALUES (2, '-34338492.215397047'); -INSERT INTO num_data VALUES (3, '4.31'); -INSERT INTO num_data VALUES (4, '7799461.4119'); -INSERT INTO num_data VALUES (5, '16397.038491'); -INSERT INTO num_data VALUES (6, '93901.57763026'); -INSERT INTO num_data VALUES (7, '-83028485'); -INSERT INTO num_data VALUES (8, '74881'); -INSERT INTO num_data VALUES (9, '-24926804.045047420'); -COMMIT TRANSACTION; --- ****************************** --- * Create indices for faster checks --- ****************************** -CREATE UNIQUE INDEX num_exp_add_idx ON num_exp_add (id1, id2); -CREATE UNIQUE INDEX num_exp_sub_idx ON num_exp_sub (id1, id2); -CREATE UNIQUE INDEX num_exp_div_idx ON num_exp_div (id1, id2); -CREATE UNIQUE INDEX num_exp_mul_idx ON num_exp_mul (id1, id2); -CREATE UNIQUE INDEX num_exp_sqrt_idx ON num_exp_sqrt (id); -CREATE UNIQUE INDEX num_exp_ln_idx ON num_exp_ln (id); -CREATE UNIQUE INDEX num_exp_log10_idx ON num_exp_log10 (id); -CREATE UNIQUE INDEX num_exp_power_10_ln_idx ON num_exp_power_10_ln (id); -VACUUM ANALYZE num_exp_add; -VACUUM ANALYZE num_exp_sub; -VACUUM ANALYZE num_exp_div; -VACUUM ANALYZE num_exp_mul; -VACUUM ANALYZE num_exp_sqrt; -VACUUM ANALYZE num_exp_ln; -VACUUM ANALYZE num_exp_log10; -VACUUM ANALYZE num_exp_power_10_ln; --- ****************************** --- * Now check the behaviour of the NUMERIC type --- ****************************** --- ****************************** --- * Addition check --- ****************************** -DELETE FROM num_result; -INSERT INTO num_result SELECT t1.id, t2.id, t1.val + t2.val - FROM num_data t1, num_data t2; -SELECT t1.id1, t1.id2, t1.result, t2.expected - FROM num_result t1, num_exp_add t2 - WHERE t1.id1 = t2.id1 AND t1.id2 = t2.id2 - AND t1.result != t2.expected; - id1 | id2 | result | expected ------+-----+--------+---------- -(0 rows) - -DELETE FROM num_result; -INSERT INTO num_result SELECT t1.id, t2.id, round(t1.val + t2.val, 10) - FROM num_data t1, num_data t2; -SELECT t1.id1, t1.id2, t1.result, round(t2.expected, 10) as expected - FROM num_result t1, num_exp_add t2 - WHERE t1.id1 = t2.id1 AND t1.id2 = t2.id2 - AND t1.result != round(t2.expected, 10); - id1 | id2 | result | expected ------+-----+--------+---------- -(0 rows) - --- ****************************** --- * Subtraction check --- ****************************** -DELETE FROM num_result; -INSERT INTO num_result SELECT t1.id, t2.id, t1.val - t2.val - FROM num_data t1, num_data t2; -SELECT t1.id1, t1.id2, t1.result, t2.expected - FROM num_result t1, num_exp_sub t2 - WHERE t1.id1 = t2.id1 AND t1.id2 = t2.id2 - AND t1.result != t2.expected; - id1 | id2 | result | expected ------+-----+--------+---------- -(0 rows) - -DELETE FROM num_result; -INSERT INTO num_result SELECT t1.id, t2.id, round(t1.val - t2.val, 40) - FROM num_data t1, num_data t2; -SELECT t1.id1, t1.id2, t1.result, round(t2.expected, 40) - FROM num_result t1, num_exp_sub t2 - WHERE t1.id1 = t2.id1 AND t1.id2 = t2.id2 - AND t1.result != round(t2.expected, 40); - id1 | id2 | result | round ------+-----+--------+------- -(0 rows) - --- ****************************** --- * Multiply check --- ****************************** -DELETE FROM num_result; -INSERT INTO num_result SELECT t1.id, t2.id, t1.val * t2.val - FROM num_data t1, num_data t2; -SELECT t1.id1, t1.id2, t1.result, t2.expected - FROM num_result t1, num_exp_mul t2 - WHERE t1.id1 = t2.id1 AND t1.id2 = t2.id2 - AND t1.result != t2.expected; - id1 | id2 | result | expected ------+-----+--------+---------- -(0 rows) - -DELETE FROM num_result; -INSERT INTO num_result SELECT t1.id, t2.id, round(t1.val * t2.val, 30) - FROM num_data t1, num_data t2; -SELECT t1.id1, t1.id2, t1.result, round(t2.expected, 30) as expected - FROM num_result t1, num_exp_mul t2 - WHERE t1.id1 = t2.id1 AND t1.id2 = t2.id2 - AND t1.result != round(t2.expected, 30); - id1 | id2 | result | expected ------+-----+--------+---------- -(0 rows) - --- ****************************** --- * Division check --- ****************************** -DELETE FROM num_result; -INSERT INTO num_result SELECT t1.id, t2.id, t1.val / t2.val - FROM num_data t1, num_data t2 - WHERE t2.val != '0.0'; -SELECT t1.id1, t1.id2, t1.result, t2.expected - FROM num_result t1, num_exp_div t2 - WHERE t1.id1 = t2.id1 AND t1.id2 = t2.id2 - AND t1.result != t2.expected; - id1 | id2 | result | expected ------+-----+--------+---------- -(0 rows) - -DELETE FROM num_result; -INSERT INTO num_result SELECT t1.id, t2.id, round(t1.val / t2.val, 80) - FROM num_data t1, num_data t2 - WHERE t2.val != '0.0'; -SELECT t1.id1, t1.id2, t1.result, round(t2.expected, 80) as expected - FROM num_result t1, num_exp_div t2 - WHERE t1.id1 = t2.id1 AND t1.id2 = t2.id2 - AND t1.result != round(t2.expected, 80); - id1 | id2 | result | expected ------+-----+--------+---------- -(0 rows) - --- ****************************** --- * Square root check --- ****************************** -DELETE FROM num_result; -INSERT INTO num_result SELECT id, 0, SQRT(ABS(val)) - FROM num_data; -SELECT t1.id1, t1.result, t2.expected - FROM num_result t1, num_exp_sqrt t2 - WHERE t1.id1 = t2.id - AND t1.result != t2.expected; - id1 | result | expected ------+--------+---------- -(0 rows) - --- ****************************** --- * Natural logarithm check --- ****************************** -DELETE FROM num_result; -INSERT INTO num_result SELECT id, 0, LN(ABS(val)) - FROM num_data - WHERE val != '0.0'; -SELECT t1.id1, t1.result, t2.expected - FROM num_result t1, num_exp_ln t2 - WHERE t1.id1 = t2.id - AND t1.result != t2.expected; - id1 | result | expected ------+--------+---------- -(0 rows) - --- ****************************** --- * Logarithm base 10 check --- ****************************** -DELETE FROM num_result; -INSERT INTO num_result SELECT id, 0, LOG(numeric '10', ABS(val)) - FROM num_data - WHERE val != '0.0'; -SELECT t1.id1, t1.result, t2.expected - FROM num_result t1, num_exp_log10 t2 - WHERE t1.id1 = t2.id - AND t1.result != t2.expected; - id1 | result | expected ------+--------+---------- -(0 rows) - --- ****************************** --- * POWER(10, LN(value)) check --- ****************************** -DELETE FROM num_result; -INSERT INTO num_result SELECT id, 0, POWER(numeric '10', LN(ABS(round(val,200)))) - FROM num_data - WHERE val != '0.0'; -SELECT t1.id1, t1.result, t2.expected - FROM num_result t1, num_exp_power_10_ln t2 - WHERE t1.id1 = t2.id - AND t1.result != t2.expected; - id1 | result | expected ------+--------+---------- -(0 rows) - --- ****************************** --- * Check behavior with Inf and NaN inputs. It's easiest to handle these --- * separately from the num_data framework used above, because some input --- * combinations will throw errors. --- ****************************** -WITH v(x) AS - (VALUES('0'::numeric),('1'),('-1'),('4.2'),('inf'),('-inf'),('nan')) -SELECT x1, x2, - x1 + x2 AS sum, - x1 - x2 AS diff, - x1 * x2 AS prod -FROM v AS v1(x1), v AS v2(x2); - x1 | x2 | sum | diff | prod ------------+-----------+-----------+-----------+----------- - 0 | 0 | 0 | 0 | 0 - 0 | 1 | 1 | -1 | 0 - 0 | -1 | -1 | 1 | 0 - 0 | 4.2 | 4.2 | -4.2 | 0.0 - 0 | Infinity | Infinity | -Infinity | NaN - 0 | -Infinity | -Infinity | Infinity | NaN - 0 | NaN | NaN | NaN | NaN - 1 | 0 | 1 | 1 | 0 - 1 | 1 | 2 | 0 | 1 - 1 | -1 | 0 | 2 | -1 - 1 | 4.2 | 5.2 | -3.2 | 4.2 - 1 | Infinity | Infinity | -Infinity | Infinity - 1 | -Infinity | -Infinity | Infinity | -Infinity - 1 | NaN | NaN | NaN | NaN - -1 | 0 | -1 | -1 | 0 - -1 | 1 | 0 | -2 | -1 - -1 | -1 | -2 | 0 | 1 - -1 | 4.2 | 3.2 | -5.2 | -4.2 - -1 | Infinity | Infinity | -Infinity | -Infinity - -1 | -Infinity | -Infinity | Infinity | Infinity - -1 | NaN | NaN | NaN | NaN - 4.2 | 0 | 4.2 | 4.2 | 0.0 - 4.2 | 1 | 5.2 | 3.2 | 4.2 - 4.2 | -1 | 3.2 | 5.2 | -4.2 - 4.2 | 4.2 | 8.4 | 0.0 | 17.64 - 4.2 | Infinity | Infinity | -Infinity | Infinity - 4.2 | -Infinity | -Infinity | Infinity | -Infinity - 4.2 | NaN | NaN | NaN | NaN - Infinity | 0 | Infinity | Infinity | NaN - Infinity | 1 | Infinity | Infinity | Infinity - Infinity | -1 | Infinity | Infinity | -Infinity - Infinity | 4.2 | Infinity | Infinity | Infinity - Infinity | Infinity | Infinity | NaN | Infinity - Infinity | -Infinity | NaN | Infinity | -Infinity - Infinity | NaN | NaN | NaN | NaN - -Infinity | 0 | -Infinity | -Infinity | NaN - -Infinity | 1 | -Infinity | -Infinity | -Infinity - -Infinity | -1 | -Infinity | -Infinity | Infinity - -Infinity | 4.2 | -Infinity | -Infinity | -Infinity - -Infinity | Infinity | NaN | -Infinity | -Infinity - -Infinity | -Infinity | -Infinity | NaN | Infinity - -Infinity | NaN | NaN | NaN | NaN - NaN | 0 | NaN | NaN | NaN - NaN | 1 | NaN | NaN | NaN - NaN | -1 | NaN | NaN | NaN - NaN | 4.2 | NaN | NaN | NaN - NaN | Infinity | NaN | NaN | NaN - NaN | -Infinity | NaN | NaN | NaN - NaN | NaN | NaN | NaN | NaN -(49 rows) - -WITH v(x) AS - (VALUES('0'::numeric),('1'),('-1'),('4.2'),('inf'),('-inf'),('nan')) -SELECT x1, x2, - x1 / x2 AS quot, - x1 % x2 AS mod, - div(x1, x2) AS div -FROM v AS v1(x1), v AS v2(x2) WHERE x2 != 0; - x1 | x2 | quot | mod | div ------------+-----------+-------------------------+------+----------- - 0 | 1 | 0.00000000000000000000 | 0 | 0 - 1 | 1 | 1.00000000000000000000 | 0 | 1 - -1 | 1 | -1.00000000000000000000 | 0 | -1 - 4.2 | 1 | 4.2000000000000000 | 0.2 | 4 - Infinity | 1 | Infinity | NaN | Infinity - -Infinity | 1 | -Infinity | NaN | -Infinity - NaN | 1 | NaN | NaN | NaN - 0 | -1 | 0.00000000000000000000 | 0 | 0 - 1 | -1 | -1.00000000000000000000 | 0 | -1 - -1 | -1 | 1.00000000000000000000 | 0 | 1 - 4.2 | -1 | -4.2000000000000000 | 0.2 | -4 - Infinity | -1 | -Infinity | NaN | -Infinity - -Infinity | -1 | Infinity | NaN | Infinity - NaN | -1 | NaN | NaN | NaN - 0 | 4.2 | 0.00000000000000000000 | 0.0 | 0 - 1 | 4.2 | 0.23809523809523809524 | 1.0 | 0 - -1 | 4.2 | -0.23809523809523809524 | -1.0 | 0 - 4.2 | 4.2 | 1.00000000000000000000 | 0.0 | 1 - Infinity | 4.2 | Infinity | NaN | Infinity - -Infinity | 4.2 | -Infinity | NaN | -Infinity - NaN | 4.2 | NaN | NaN | NaN - 0 | Infinity | 0 | 0 | 0 - 1 | Infinity | 0 | 1 | 0 - -1 | Infinity | 0 | -1 | 0 - 4.2 | Infinity | 0 | 4.2 | 0 - Infinity | Infinity | NaN | NaN | NaN - -Infinity | Infinity | NaN | NaN | NaN - NaN | Infinity | NaN | NaN | NaN - 0 | -Infinity | 0 | 0 | 0 - 1 | -Infinity | 0 | 1 | 0 - -1 | -Infinity | 0 | -1 | 0 - 4.2 | -Infinity | 0 | 4.2 | 0 - Infinity | -Infinity | NaN | NaN | NaN - -Infinity | -Infinity | NaN | NaN | NaN - NaN | -Infinity | NaN | NaN | NaN - 0 | NaN | NaN | NaN | NaN - 1 | NaN | NaN | NaN | NaN - -1 | NaN | NaN | NaN | NaN - 4.2 | NaN | NaN | NaN | NaN - Infinity | NaN | NaN | NaN | NaN - -Infinity | NaN | NaN | NaN | NaN - NaN | NaN | NaN | NaN | NaN -(42 rows) - -SELECT 'inf'::numeric / '0'; -ERROR: division by zero -SELECT '-inf'::numeric / '0'; -ERROR: division by zero -SELECT 'nan'::numeric / '0'; - ?column? ----------- - NaN -(1 row) - -SELECT '0'::numeric / '0'; -ERROR: division by zero -SELECT 'inf'::numeric % '0'; -ERROR: division by zero -SELECT '-inf'::numeric % '0'; -ERROR: division by zero -SELECT 'nan'::numeric % '0'; - ?column? ----------- - NaN -(1 row) - -SELECT '0'::numeric % '0'; -ERROR: division by zero -SELECT div('inf'::numeric, '0'); -ERROR: division by zero -SELECT div('-inf'::numeric, '0'); -ERROR: division by zero -SELECT div('nan'::numeric, '0'); - div ------ - NaN -(1 row) - -SELECT div('0'::numeric, '0'); -ERROR: division by zero -WITH v(x) AS - (VALUES('0'::numeric),('1'),('-1'),('4.2'),('-7.777'),('inf'),('-inf'),('nan')) -SELECT x, -x as minusx, abs(x), floor(x), ceil(x), sign(x), numeric_inc(x) as inc -FROM v; - x | minusx | abs | floor | ceil | sign | inc ------------+-----------+----------+-----------+-----------+------+----------- - 0 | 0 | 0 | 0 | 0 | 0 | 1 - 1 | -1 | 1 | 1 | 1 | 1 | 2 - -1 | 1 | 1 | -1 | -1 | -1 | 0 - 4.2 | -4.2 | 4.2 | 4 | 5 | 1 | 5.2 - -7.777 | 7.777 | 7.777 | -8 | -7 | -1 | -6.777 - Infinity | -Infinity | Infinity | Infinity | Infinity | 1 | Infinity - -Infinity | Infinity | Infinity | -Infinity | -Infinity | -1 | -Infinity - NaN | NaN | NaN | NaN | NaN | NaN | NaN -(8 rows) - -WITH v(x) AS - (VALUES('0'::numeric),('1'),('-1'),('4.2'),('-7.777'),('inf'),('-inf'),('nan')) -SELECT x, round(x), round(x,1) as round1, trunc(x), trunc(x,1) as trunc1 -FROM v; - x | round | round1 | trunc | trunc1 ------------+-----------+-----------+-----------+----------- - 0 | 0 | 0.0 | 0 | 0.0 - 1 | 1 | 1.0 | 1 | 1.0 - -1 | -1 | -1.0 | -1 | -1.0 - 4.2 | 4 | 4.2 | 4 | 4.2 - -7.777 | -8 | -7.8 | -7 | -7.7 - Infinity | Infinity | Infinity | Infinity | Infinity - -Infinity | -Infinity | -Infinity | -Infinity | -Infinity - NaN | NaN | NaN | NaN | NaN -(8 rows) - --- the large values fall into the numeric abbreviation code's maximal classes -WITH v(x) AS - (VALUES('0'::numeric),('1'),('-1'),('4.2'),('-7.777'),('1e340'),('-1e340'), - ('inf'),('-inf'),('nan'), - ('inf'),('-inf'),('nan')) -SELECT substring(x::text, 1, 32) -FROM v ORDER BY x; - substring ----------------------------------- - -Infinity - -Infinity - -1000000000000000000000000000000 - -7.777 - -1 - 0 - 1 - 4.2 - 10000000000000000000000000000000 - Infinity - Infinity - NaN - NaN -(13 rows) - -WITH v(x) AS - (VALUES('0'::numeric),('1'),('4.2'),('inf'),('nan')) -SELECT x, sqrt(x) -FROM v; - x | sqrt -----------+------------------- - 0 | 0.000000000000000 - 1 | 1.000000000000000 - 4.2 | 2.049390153191920 - Infinity | Infinity - NaN | NaN -(5 rows) - -SELECT sqrt('-1'::numeric); -ERROR: cannot take square root of a negative number -SELECT sqrt('-inf'::numeric); -ERROR: cannot take square root of a negative number -WITH v(x) AS - (VALUES('1'::numeric),('4.2'),('inf'),('nan')) -SELECT x, - log(x), - log10(x), - ln(x) -FROM v; - x | log | log10 | ln -----------+--------------------+--------------------+-------------------- - 1 | 0.0000000000000000 | 0.0000000000000000 | 0.0000000000000000 - 4.2 | 0.6232492903979005 | 0.6232492903979005 | 1.4350845252893226 - Infinity | Infinity | Infinity | Infinity - NaN | NaN | NaN | NaN -(4 rows) - -SELECT ln('0'::numeric); -ERROR: cannot take logarithm of zero -SELECT ln('-1'::numeric); -ERROR: cannot take logarithm of a negative number -SELECT ln('-inf'::numeric); -ERROR: cannot take logarithm of a negative number -WITH v(x) AS - (VALUES('2'::numeric),('4.2'),('inf'),('nan')) -SELECT x1, x2, - log(x1, x2) -FROM v AS v1(x1), v AS v2(x2); - x1 | x2 | log -----------+----------+-------------------- - 2 | 2 | 1.0000000000000000 - 2 | 4.2 | 2.0703893278913979 - 2 | Infinity | Infinity - 2 | NaN | NaN - 4.2 | 2 | 0.4830009440873890 - 4.2 | 4.2 | 1.0000000000000000 - 4.2 | Infinity | Infinity - 4.2 | NaN | NaN - Infinity | 2 | 0 - Infinity | 4.2 | 0 - Infinity | Infinity | NaN - Infinity | NaN | NaN - NaN | 2 | NaN - NaN | 4.2 | NaN - NaN | Infinity | NaN - NaN | NaN | NaN -(16 rows) - -SELECT log('0'::numeric, '10'); -ERROR: cannot take logarithm of zero -SELECT log('10'::numeric, '0'); -ERROR: cannot take logarithm of zero -SELECT log('-inf'::numeric, '10'); -ERROR: cannot take logarithm of a negative number -SELECT log('10'::numeric, '-inf'); -ERROR: cannot take logarithm of a negative number -SELECT log('inf'::numeric, '0'); -ERROR: cannot take logarithm of zero -SELECT log('inf'::numeric, '-inf'); -ERROR: cannot take logarithm of a negative number -SELECT log('-inf'::numeric, 'inf'); -ERROR: cannot take logarithm of a negative number -WITH v(x) AS - (VALUES('0'::numeric),('1'),('2'),('4.2'),('inf'),('nan')) -SELECT x1, x2, - power(x1, x2) -FROM v AS v1(x1), v AS v2(x2) WHERE x1 != 0 OR x2 >= 0; - x1 | x2 | power -----------+----------+--------------------- - 0 | 0 | 1.0000000000000000 - 0 | 1 | 0.0000000000000000 - 0 | 2 | 0.0000000000000000 - 0 | 4.2 | 0.0000000000000000 - 0 | Infinity | 0 - 0 | NaN | NaN - 1 | 0 | 1.0000000000000000 - 1 | 1 | 1.0000000000000000 - 1 | 2 | 1.0000000000000000 - 1 | 4.2 | 1.0000000000000000 - 1 | Infinity | 1 - 1 | NaN | 1 - 2 | 0 | 1.0000000000000000 - 2 | 1 | 2.0000000000000000 - 2 | 2 | 4.0000000000000000 - 2 | 4.2 | 18.379173679952560 - 2 | Infinity | Infinity - 2 | NaN | NaN - 4.2 | 0 | 1.0000000000000000 - 4.2 | 1 | 4.2000000000000000 - 4.2 | 2 | 17.6400000000000000 - 4.2 | 4.2 | 414.61691860129675 - 4.2 | Infinity | Infinity - 4.2 | NaN | NaN - Infinity | 0 | 1 - Infinity | 1 | Infinity - Infinity | 2 | Infinity - Infinity | 4.2 | Infinity - Infinity | Infinity | Infinity - Infinity | NaN | NaN - NaN | 0 | 1 - NaN | 1 | NaN - NaN | 2 | NaN - NaN | 4.2 | NaN - NaN | Infinity | NaN - NaN | NaN | NaN -(36 rows) - -SELECT power('0'::numeric, '-1'); -ERROR: zero raised to a negative power is undefined -SELECT power('0'::numeric, '-inf'); -ERROR: zero raised to a negative power is undefined -SELECT power('-1'::numeric, 'inf'); - power -------- - 1 -(1 row) - -SELECT power('-2'::numeric, '3'); - power ---------------------- - -8.0000000000000000 -(1 row) - -SELECT power('-2'::numeric, '3.3'); -ERROR: a negative number raised to a non-integer power yields a complex result -SELECT power('-2'::numeric, '-1'); - power ---------------------- - -0.5000000000000000 -(1 row) - -SELECT power('-2'::numeric, '-1.5'); -ERROR: a negative number raised to a non-integer power yields a complex result -SELECT power('-2'::numeric, 'inf'); - power ----------- - Infinity -(1 row) - -SELECT power('-2'::numeric, '-inf'); - power -------- - 0 -(1 row) - -SELECT power('inf'::numeric, '-2'); - power -------- - 0 -(1 row) - -SELECT power('inf'::numeric, '-inf'); - power -------- - 0 -(1 row) - -SELECT power('-inf'::numeric, '2'); - power ----------- - Infinity -(1 row) - -SELECT power('-inf'::numeric, '3'); - power ------------ - -Infinity -(1 row) - -SELECT power('-inf'::numeric, '4.5'); -ERROR: a negative number raised to a non-integer power yields a complex result -SELECT power('-inf'::numeric, '-2'); - power -------- - 0 -(1 row) - -SELECT power('-inf'::numeric, '-3'); - power -------- - 0 -(1 row) - -SELECT power('-inf'::numeric, '0'); - power -------- - 1 -(1 row) - -SELECT power('-inf'::numeric, 'inf'); - power ----------- - Infinity -(1 row) - -SELECT power('-inf'::numeric, '-inf'); - power -------- - 0 -(1 row) - --- ****************************** --- * miscellaneous checks for things that have been broken in the past... --- ****************************** --- numeric AVG used to fail on some platforms -SELECT AVG(val) FROM num_data; - avg ------------------------- - -13430913.592242320700 -(1 row) - -SELECT MAX(val) FROM num_data; - max --------------------- - 7799461.4119000000 -(1 row) - -SELECT MIN(val) FROM num_data; - min ----------------------- - -83028485.0000000000 -(1 row) - -SELECT STDDEV(val) FROM num_data; - stddev -------------------------------- - 27791203.28758835329805617386 -(1 row) - -SELECT VARIANCE(val) FROM num_data; - variance --------------------------------------- - 772350980172061.69659105821915863601 -(1 row) - --- Check for appropriate rounding and overflow -CREATE TABLE fract_only (id int, val numeric(4,4)); -INSERT INTO fract_only VALUES (1, '0.0'); -INSERT INTO fract_only VALUES (2, '0.1'); -INSERT INTO fract_only VALUES (3, '1.0'); -- should fail -ERROR: numeric field overflow -DETAIL: A field with precision 4, scale 4 must round to an absolute value less than 1. -INSERT INTO fract_only VALUES (4, '-0.9999'); -INSERT INTO fract_only VALUES (5, '0.99994'); -INSERT INTO fract_only VALUES (6, '0.99995'); -- should fail -ERROR: numeric field overflow -DETAIL: A field with precision 4, scale 4 must round to an absolute value less than 1. -INSERT INTO fract_only VALUES (7, '0.00001'); -INSERT INTO fract_only VALUES (8, '0.00017'); -INSERT INTO fract_only VALUES (9, 'NaN'); -INSERT INTO fract_only VALUES (10, 'Inf'); -- should fail -ERROR: numeric field overflow -DETAIL: A field with precision 4, scale 4 cannot hold an infinite value. -INSERT INTO fract_only VALUES (11, '-Inf'); -- should fail -ERROR: numeric field overflow -DETAIL: A field with precision 4, scale 4 cannot hold an infinite value. -SELECT * FROM fract_only; - id | val -----+--------- - 1 | 0.0000 - 2 | 0.1000 - 4 | -0.9999 - 5 | 0.9999 - 7 | 0.0000 - 8 | 0.0002 - 9 | NaN -(7 rows) - -DROP TABLE fract_only; --- Check conversion to integers -SELECT (-9223372036854775808.5)::int8; -- should fail -ERROR: bigint out of range -SELECT (-9223372036854775808.4)::int8; -- ok - int8 ----------------------- - -9223372036854775808 -(1 row) - -SELECT 9223372036854775807.4::int8; -- ok - int8 ---------------------- - 9223372036854775807 -(1 row) - -SELECT 9223372036854775807.5::int8; -- should fail -ERROR: bigint out of range -SELECT (-2147483648.5)::int4; -- should fail -ERROR: integer out of range -SELECT (-2147483648.4)::int4; -- ok - int4 -------------- - -2147483648 -(1 row) - -SELECT 2147483647.4::int4; -- ok - int4 ------------- - 2147483647 -(1 row) - -SELECT 2147483647.5::int4; -- should fail -ERROR: integer out of range -SELECT (-32768.5)::int2; -- should fail -ERROR: smallint out of range -SELECT (-32768.4)::int2; -- ok - int2 --------- - -32768 -(1 row) - -SELECT 32767.4::int2; -- ok - int2 -------- - 32767 -(1 row) - -SELECT 32767.5::int2; -- should fail -ERROR: smallint out of range --- Check inf/nan conversion behavior -SELECT 'NaN'::float8::numeric; - numeric ---------- - NaN -(1 row) - -SELECT 'Infinity'::float8::numeric; - numeric ----------- - Infinity -(1 row) - -SELECT '-Infinity'::float8::numeric; - numeric ------------ - -Infinity -(1 row) - -SELECT 'NaN'::numeric::float8; - float8 --------- - NaN -(1 row) - -SELECT 'Infinity'::numeric::float8; - float8 ----------- - Infinity -(1 row) - -SELECT '-Infinity'::numeric::float8; - float8 ------------ - -Infinity -(1 row) - -SELECT 'NaN'::float4::numeric; - numeric ---------- - NaN -(1 row) - -SELECT 'Infinity'::float4::numeric; - numeric ----------- - Infinity -(1 row) - -SELECT '-Infinity'::float4::numeric; - numeric ------------ - -Infinity -(1 row) - -SELECT 'NaN'::numeric::float4; - float4 --------- - NaN -(1 row) - -SELECT 'Infinity'::numeric::float4; - float4 ----------- - Infinity -(1 row) - -SELECT '-Infinity'::numeric::float4; - float4 ------------ - -Infinity -(1 row) - -SELECT '42'::int2::numeric; - numeric ---------- - 42 -(1 row) - -SELECT 'NaN'::numeric::int2; -ERROR: cannot convert NaN to smallint -SELECT 'Infinity'::numeric::int2; -ERROR: cannot convert infinity to smallint -SELECT '-Infinity'::numeric::int2; -ERROR: cannot convert infinity to smallint -SELECT 'NaN'::numeric::int4; -ERROR: cannot convert NaN to integer -SELECT 'Infinity'::numeric::int4; -ERROR: cannot convert infinity to integer -SELECT '-Infinity'::numeric::int4; -ERROR: cannot convert infinity to integer -SELECT 'NaN'::numeric::int8; -ERROR: cannot convert NaN to bigint -SELECT 'Infinity'::numeric::int8; -ERROR: cannot convert infinity to bigint -SELECT '-Infinity'::numeric::int8; -ERROR: cannot convert infinity to bigint --- Simple check that ceil(), floor(), and round() work correctly -CREATE TABLE ceil_floor_round (a numeric); -INSERT INTO ceil_floor_round VALUES ('-5.5'); -INSERT INTO ceil_floor_round VALUES ('-5.499999'); -INSERT INTO ceil_floor_round VALUES ('9.5'); -INSERT INTO ceil_floor_round VALUES ('9.4999999'); -INSERT INTO ceil_floor_round VALUES ('0.0'); -INSERT INTO ceil_floor_round VALUES ('0.0000001'); -INSERT INTO ceil_floor_round VALUES ('-0.000001'); -SELECT a, ceil(a), ceiling(a), floor(a), round(a) FROM ceil_floor_round; - a | ceil | ceiling | floor | round ------------+------+---------+-------+------- - -5.5 | -5 | -5 | -6 | -6 - -5.499999 | -5 | -5 | -6 | -5 - 9.5 | 10 | 10 | 9 | 10 - 9.4999999 | 10 | 10 | 9 | 9 - 0.0 | 0 | 0 | 0 | 0 - 0.0000001 | 1 | 1 | 0 | 0 - -0.000001 | 0 | 0 | -1 | 0 -(7 rows) - -DROP TABLE ceil_floor_round; --- Check rounding, it should round ties away from zero. -SELECT i as pow, - round((-2.5 * 10 ^ i)::numeric, -i), - round((-1.5 * 10 ^ i)::numeric, -i), - round((-0.5 * 10 ^ i)::numeric, -i), - round((0.5 * 10 ^ i)::numeric, -i), - round((1.5 * 10 ^ i)::numeric, -i), - round((2.5 * 10 ^ i)::numeric, -i) -FROM generate_series(-5,5) AS t(i); - pow | round | round | round | round | round | round ------+----------+----------+----------+---------+---------+--------- - -5 | -0.00003 | -0.00002 | -0.00001 | 0.00001 | 0.00002 | 0.00003 - -4 | -0.0003 | -0.0002 | -0.0001 | 0.0001 | 0.0002 | 0.0003 - -3 | -0.003 | -0.002 | -0.001 | 0.001 | 0.002 | 0.003 - -2 | -0.03 | -0.02 | -0.01 | 0.01 | 0.02 | 0.03 - -1 | -0.3 | -0.2 | -0.1 | 0.1 | 0.2 | 0.3 - 0 | -3 | -2 | -1 | 1 | 2 | 3 - 1 | -30 | -20 | -10 | 10 | 20 | 30 - 2 | -300 | -200 | -100 | 100 | 200 | 300 - 3 | -3000 | -2000 | -1000 | 1000 | 2000 | 3000 - 4 | -30000 | -20000 | -10000 | 10000 | 20000 | 30000 - 5 | -300000 | -200000 | -100000 | 100000 | 200000 | 300000 -(11 rows) - --- Testing for width_bucket(). For convenience, we test both the --- numeric and float8 versions of the function in this file. --- errors -SELECT width_bucket(5.0, 3.0, 4.0, 0); -ERROR: count must be greater than zero -SELECT width_bucket(5.0, 3.0, 4.0, -5); -ERROR: count must be greater than zero -SELECT width_bucket(3.5, 3.0, 3.0, 888); -ERROR: lower bound cannot equal upper bound -SELECT width_bucket(5.0::float8, 3.0::float8, 4.0::float8, 0); -ERROR: count must be greater than zero -SELECT width_bucket(5.0::float8, 3.0::float8, 4.0::float8, -5); -ERROR: count must be greater than zero -SELECT width_bucket(3.5::float8, 3.0::float8, 3.0::float8, 888); -ERROR: lower bound cannot equal upper bound -SELECT width_bucket('NaN', 3.0, 4.0, 888); -ERROR: operand, lower bound, and upper bound cannot be NaN -SELECT width_bucket(0::float8, 'NaN', 4.0::float8, 888); -ERROR: operand, lower bound, and upper bound cannot be NaN -SELECT width_bucket(2.0, 3.0, '-inf', 888); -ERROR: lower and upper bounds must be finite -SELECT width_bucket(0::float8, '-inf', 4.0::float8, 888); -ERROR: lower and upper bounds must be finite --- normal operation -CREATE TABLE width_bucket_test (operand_num numeric, operand_f8 float8); -COPY width_bucket_test (operand_num) FROM stdin; -UPDATE width_bucket_test SET operand_f8 = operand_num::float8; -SELECT - operand_num, - width_bucket(operand_num, 0, 10, 5) AS wb_1, - width_bucket(operand_f8, 0, 10, 5) AS wb_1f, - width_bucket(operand_num, 10, 0, 5) AS wb_2, - width_bucket(operand_f8, 10, 0, 5) AS wb_2f, - width_bucket(operand_num, 2, 8, 4) AS wb_3, - width_bucket(operand_f8, 2, 8, 4) AS wb_3f, - width_bucket(operand_num, 5.0, 5.5, 20) AS wb_4, - width_bucket(operand_f8, 5.0, 5.5, 20) AS wb_4f, - width_bucket(operand_num, -25, 25, 10) AS wb_5, - width_bucket(operand_f8, -25, 25, 10) AS wb_5f - FROM width_bucket_test; - operand_num | wb_1 | wb_1f | wb_2 | wb_2f | wb_3 | wb_3f | wb_4 | wb_4f | wb_5 | wb_5f -------------------+------+-------+------+-------+------+-------+------+-------+------+------- - -5.2 | 0 | 0 | 6 | 6 | 0 | 0 | 0 | 0 | 4 | 4 - -0.0000000001 | 0 | 0 | 6 | 6 | 0 | 0 | 0 | 0 | 5 | 5 - 0.000000000001 | 1 | 1 | 5 | 5 | 0 | 0 | 0 | 0 | 6 | 6 - 1 | 1 | 1 | 5 | 5 | 0 | 0 | 0 | 0 | 6 | 6 - 1.99999999999999 | 1 | 1 | 5 | 5 | 0 | 0 | 0 | 0 | 6 | 6 - 2 | 2 | 2 | 5 | 5 | 1 | 1 | 0 | 0 | 6 | 6 - 2.00000000000001 | 2 | 2 | 4 | 4 | 1 | 1 | 0 | 0 | 6 | 6 - 3 | 2 | 2 | 4 | 4 | 1 | 1 | 0 | 0 | 6 | 6 - 4 | 3 | 3 | 4 | 4 | 2 | 2 | 0 | 0 | 6 | 6 - 4.5 | 3 | 3 | 3 | 3 | 2 | 2 | 0 | 0 | 6 | 6 - 5 | 3 | 3 | 3 | 3 | 3 | 3 | 1 | 1 | 7 | 7 - 5.5 | 3 | 3 | 3 | 3 | 3 | 3 | 21 | 21 | 7 | 7 - 6 | 4 | 4 | 3 | 3 | 3 | 3 | 21 | 21 | 7 | 7 - 7 | 4 | 4 | 2 | 2 | 4 | 4 | 21 | 21 | 7 | 7 - 8 | 5 | 5 | 2 | 2 | 5 | 5 | 21 | 21 | 7 | 7 - 9 | 5 | 5 | 1 | 1 | 5 | 5 | 21 | 21 | 7 | 7 - 9.99999999999999 | 5 | 5 | 1 | 1 | 5 | 5 | 21 | 21 | 7 | 7 - 10 | 6 | 6 | 1 | 1 | 5 | 5 | 21 | 21 | 8 | 8 - 10.0000000000001 | 6 | 6 | 0 | 0 | 5 | 5 | 21 | 21 | 8 | 8 -(19 rows) - --- Check positive and negative infinity: we require --- finite bucket bounds, but allow an infinite operand -SELECT width_bucket(0.0::numeric, 'Infinity'::numeric, 5, 10); -- error -ERROR: lower and upper bounds must be finite -SELECT width_bucket(0.0::numeric, 5, '-Infinity'::numeric, 20); -- error -ERROR: lower and upper bounds must be finite -SELECT width_bucket('Infinity'::numeric, 1, 10, 10), - width_bucket('-Infinity'::numeric, 1, 10, 10); - width_bucket | width_bucket ---------------+-------------- - 11 | 0 -(1 row) - -SELECT width_bucket(0.0::float8, 'Infinity'::float8, 5, 10); -- error -ERROR: lower and upper bounds must be finite -SELECT width_bucket(0.0::float8, 5, '-Infinity'::float8, 20); -- error -ERROR: lower and upper bounds must be finite -SELECT width_bucket('Infinity'::float8, 1, 10, 10), - width_bucket('-Infinity'::float8, 1, 10, 10); - width_bucket | width_bucket ---------------+-------------- - 11 | 0 -(1 row) - -DROP TABLE width_bucket_test; --- Simple test for roundoff error when results should be exact -SELECT x, width_bucket(x::float8, 10, 100, 9) as flt, - width_bucket(x::numeric, 10, 100, 9) as num -FROM generate_series(0, 110, 10) x; - x | flt | num ------+-----+----- - 0 | 0 | 0 - 10 | 1 | 1 - 20 | 2 | 2 - 30 | 3 | 3 - 40 | 4 | 4 - 50 | 5 | 5 - 60 | 6 | 6 - 70 | 7 | 7 - 80 | 8 | 8 - 90 | 9 | 9 - 100 | 10 | 10 - 110 | 10 | 10 -(12 rows) - -SELECT x, width_bucket(x::float8, 100, 10, 9) as flt, - width_bucket(x::numeric, 100, 10, 9) as num -FROM generate_series(0, 110, 10) x; - x | flt | num ------+-----+----- - 0 | 10 | 10 - 10 | 10 | 10 - 20 | 9 | 9 - 30 | 8 | 8 - 40 | 7 | 7 - 50 | 6 | 6 - 60 | 5 | 5 - 70 | 4 | 4 - 80 | 3 | 3 - 90 | 2 | 2 - 100 | 1 | 1 - 110 | 0 | 0 -(12 rows) - --- --- TO_CHAR() --- -SELECT to_char(val, '9G999G999G999G999G999') - FROM num_data; - to_char ------------------------- - 0 - 0 - -34,338,492 - 4 - 7,799,461 - 16,397 - 93,902 - -83,028,485 - 74,881 - -24,926,804 -(10 rows) - -SELECT to_char(val, '9G999G999G999G999G999D999G999G999G999G999') - FROM num_data; - to_char --------------------------------------------- - .000,000,000,000,000 - .000,000,000,000,000 - -34,338,492.215,397,047,000,000 - 4.310,000,000,000,000 - 7,799,461.411,900,000,000,000 - 16,397.038,491,000,000,000 - 93,901.577,630,260,000,000 - -83,028,485.000,000,000,000,000 - 74,881.000,000,000,000,000 - -24,926,804.045,047,420,000,000 -(10 rows) - -SELECT to_char(val, '9999999999999999.999999999999999PR') - FROM num_data; - to_char ------------------------------------- - .000000000000000 - .000000000000000 - <34338492.215397047000000> - 4.310000000000000 - 7799461.411900000000000 - 16397.038491000000000 - 93901.577630260000000 - <83028485.000000000000000> - 74881.000000000000000 - <24926804.045047420000000> -(10 rows) - -SELECT to_char(val, '9999999999999999.999999999999999S') - FROM num_data; - to_char ------------------------------------ - .000000000000000+ - .000000000000000+ - 34338492.215397047000000- - 4.310000000000000+ - 7799461.411900000000000+ - 16397.038491000000000+ - 93901.577630260000000+ - 83028485.000000000000000- - 74881.000000000000000+ - 24926804.045047420000000- -(10 rows) - -SELECT to_char(val, 'MI9999999999999999.999999999999999') FROM num_data; - to_char ------------------------------------ - .000000000000000 - .000000000000000 - - 34338492.215397047000000 - 4.310000000000000 - 7799461.411900000000000 - 16397.038491000000000 - 93901.577630260000000 - - 83028485.000000000000000 - 74881.000000000000000 - - 24926804.045047420000000 -(10 rows) - -SELECT to_char(val, 'FMS9999999999999999.999999999999999') FROM num_data; - to_char ---------------------- - +0. - +0. - -34338492.215397047 - +4.31 - +7799461.4119 - +16397.038491 - +93901.57763026 - -83028485. - +74881. - -24926804.04504742 -(10 rows) - -SELECT to_char(val, 'FM9999999999999999.999999999999999THPR') FROM num_data; - to_char ----------------------- - 0. - 0. - <34338492.215397047> - 4.31 - 7799461.4119 - 16397.038491 - 93901.57763026 - <83028485.> - 74881. - <24926804.04504742> -(10 rows) - -SELECT to_char(val, 'SG9999999999999999.999999999999999th') FROM num_data; - to_char ------------------------------------ - + .000000000000000 - + .000000000000000 - - 34338492.215397047000000 - + 4.310000000000000 - + 7799461.411900000000000 - + 16397.038491000000000 - + 93901.577630260000000 - - 83028485.000000000000000 - + 74881.000000000000000 - - 24926804.045047420000000 -(10 rows) - -SELECT to_char(val, '0999999999999999.999999999999999') FROM num_data; - to_char ------------------------------------ - 0000000000000000.000000000000000 - 0000000000000000.000000000000000 - -0000000034338492.215397047000000 - 0000000000000004.310000000000000 - 0000000007799461.411900000000000 - 0000000000016397.038491000000000 - 0000000000093901.577630260000000 - -0000000083028485.000000000000000 - 0000000000074881.000000000000000 - -0000000024926804.045047420000000 -(10 rows) - -SELECT to_char(val, 'S0999999999999999.999999999999999') FROM num_data; - to_char ------------------------------------ - +0000000000000000.000000000000000 - +0000000000000000.000000000000000 - -0000000034338492.215397047000000 - +0000000000000004.310000000000000 - +0000000007799461.411900000000000 - +0000000000016397.038491000000000 - +0000000000093901.577630260000000 - -0000000083028485.000000000000000 - +0000000000074881.000000000000000 - -0000000024926804.045047420000000 -(10 rows) - -SELECT to_char(val, 'FM0999999999999999.999999999999999') FROM num_data; - to_char ------------------------------ - 0000000000000000. - 0000000000000000. - -0000000034338492.215397047 - 0000000000000004.31 - 0000000007799461.4119 - 0000000000016397.038491 - 0000000000093901.57763026 - -0000000083028485. - 0000000000074881. - -0000000024926804.04504742 -(10 rows) - -SELECT to_char(val, 'FM9999999999999999.099999999999999') FROM num_data; - to_char ---------------------- - .0 - .0 - -34338492.215397047 - 4.31 - 7799461.4119 - 16397.038491 - 93901.57763026 - -83028485.0 - 74881.0 - -24926804.04504742 -(10 rows) - -SELECT to_char(val, 'FM9999999999990999.990999999999999') FROM num_data; - to_char ---------------------- - 0000.000 - 0000.000 - -34338492.215397047 - 0004.310 - 7799461.4119 - 16397.038491 - 93901.57763026 - -83028485.000 - 74881.000 - -24926804.04504742 -(10 rows) - -SELECT to_char(val, 'FM0999999999999999.999909999999999') FROM num_data; - to_char ------------------------------ - 0000000000000000.00000 - 0000000000000000.00000 - -0000000034338492.215397047 - 0000000000000004.31000 - 0000000007799461.41190 - 0000000000016397.038491 - 0000000000093901.57763026 - -0000000083028485.00000 - 0000000000074881.00000 - -0000000024926804.04504742 -(10 rows) - -SELECT to_char(val, 'FM9999999990999999.099999999999999') FROM num_data; - to_char ---------------------- - 0000000.0 - 0000000.0 - -34338492.215397047 - 0000004.31 - 7799461.4119 - 0016397.038491 - 0093901.57763026 - -83028485.0 - 0074881.0 - -24926804.04504742 -(10 rows) - -SELECT to_char(val, 'L9999999999999999.099999999999999') FROM num_data; - to_char ------------------------------------- - .000000000000000 - .000000000000000 - -34338492.215397047000000 - 4.310000000000000 - 7799461.411900000000000 - 16397.038491000000000 - 93901.577630260000000 - -83028485.000000000000000 - 74881.000000000000000 - -24926804.045047420000000 -(10 rows) - -SELECT to_char(val, 'FM9999999999999999.99999999999999') FROM num_data; - to_char ---------------------- - 0. - 0. - -34338492.215397047 - 4.31 - 7799461.4119 - 16397.038491 - 93901.57763026 - -83028485. - 74881. - -24926804.04504742 -(10 rows) - -SELECT to_char(val, 'S 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 . 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9') FROM num_data; - to_char ------------------------------------------------------------------------ - +. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - +. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - -3 4 3 3 8 4 9 2 . 2 1 5 3 9 7 0 4 7 0 0 0 0 0 0 0 0 - +4 . 3 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - +7 7 9 9 4 6 1 . 4 1 1 9 0 0 0 0 0 0 0 0 0 0 0 0 0 - +1 6 3 9 7 . 0 3 8 4 9 1 0 0 0 0 0 0 0 0 0 0 0 - +9 3 9 0 1 . 5 7 7 6 3 0 2 6 0 0 0 0 0 0 0 0 0 - -8 3 0 2 8 4 8 5 . 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - +7 4 8 8 1 . 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - -2 4 9 2 6 8 0 4 . 0 4 5 0 4 7 4 2 0 0 0 0 0 0 0 0 0 -(10 rows) - -SELECT to_char(val, 'FMS 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 . 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9') FROM num_data; - to_char -------------------------------------------------------- - +0 . - +0 . - -3 4 3 3 8 4 9 2 . 2 1 5 3 9 7 0 4 7 - +4 . 3 1 - +7 7 9 9 4 6 1 . 4 1 1 9 - +1 6 3 9 7 . 0 3 8 4 9 1 - +9 3 9 0 1 . 5 7 7 6 3 0 2 6 - -8 3 0 2 8 4 8 5 . - +7 4 8 8 1 . - -2 4 9 2 6 8 0 4 . 0 4 5 0 4 7 4 2 -(10 rows) - -SELECT to_char(val, E'99999 "text" 9999 "9999" 999 "\\"text between quote marks\\"" 9999') FROM num_data; - to_char ------------------------------------------------------------ - text 9999 "text between quote marks" 0 - text 9999 "text between quote marks" 0 - text -3 9999 433 "text between quote marks" 8492 - text 9999 "text between quote marks" 4 - text 9999 779 "text between quote marks" 9461 - text 9999 1 "text between quote marks" 6397 - text 9999 9 "text between quote marks" 3902 - text -8 9999 302 "text between quote marks" 8485 - text 9999 7 "text between quote marks" 4881 - text -2 9999 492 "text between quote marks" 6804 -(10 rows) - -SELECT to_char(val, '999999SG9999999999') FROM num_data; - to_char -------------------- - + 0 - + 0 - - 34338492 - + 4 - + 7799461 - + 16397 - + 93902 - - 83028485 - + 74881 - - 24926804 -(10 rows) - -SELECT to_char(val, 'FM9999999999999999.999999999999999') FROM num_data; - to_char ---------------------- - 0. - 0. - -34338492.215397047 - 4.31 - 7799461.4119 - 16397.038491 - 93901.57763026 - -83028485. - 74881. - -24926804.04504742 -(10 rows) - -SELECT to_char(val, '9.999EEEE') FROM num_data; - to_char ------------- - 0.000e+00 - 0.000e+00 - -3.434e+07 - 4.310e+00 - 7.799e+06 - 1.640e+04 - 9.390e+04 - -8.303e+07 - 7.488e+04 - -2.493e+07 -(10 rows) - -WITH v(val) AS - (VALUES('0'::numeric),('-4.2'),('4.2e9'),('1.2e-5'),('inf'),('-inf'),('nan')) -SELECT val, - to_char(val, '9.999EEEE') as numeric, - to_char(val::float8, '9.999EEEE') as float8, - to_char(val::float4, '9.999EEEE') as float4 -FROM v; - val | numeric | float8 | float4 -------------+------------+------------+------------ - 0 | 0.000e+00 | 0.000e+00 | 0.000e+00 - -4.2 | -4.200e+00 | -4.200e+00 | -4.200e+00 - 4200000000 | 4.200e+09 | 4.200e+09 | 4.200e+09 - 0.000012 | 1.200e-05 | 1.200e-05 | 1.200e-05 - Infinity | #.####### | #.####### | #.####### - -Infinity | #.####### | #.####### | #.####### - NaN | #.####### | #.####### | #.####### -(7 rows) - -WITH v(exp) AS - (VALUES(-16379),(-16378),(-1234),(-789),(-45),(-5),(-4),(-3),(-2),(-1),(0), - (1),(2),(3),(4),(5),(38),(275),(2345),(45678),(131070),(131071)) -SELECT exp, - to_char(('1.2345e'||exp)::numeric, '9.999EEEE') as numeric -FROM v; - exp | numeric ---------+---------------- - -16379 | 1.235e-16379 - -16378 | 1.235e-16378 - -1234 | 1.235e-1234 - -789 | 1.235e-789 - -45 | 1.235e-45 - -5 | 1.235e-05 - -4 | 1.235e-04 - -3 | 1.235e-03 - -2 | 1.235e-02 - -1 | 1.235e-01 - 0 | 1.235e+00 - 1 | 1.235e+01 - 2 | 1.235e+02 - 3 | 1.235e+03 - 4 | 1.235e+04 - 5 | 1.235e+05 - 38 | 1.235e+38 - 275 | 1.235e+275 - 2345 | 1.235e+2345 - 45678 | 1.235e+45678 - 131070 | 1.235e+131070 - 131071 | 1.235e+131071 -(22 rows) - -WITH v(val) AS - (VALUES('0'::numeric),('-4.2'),('4.2e9'),('1.2e-5'),('inf'),('-inf'),('nan')) -SELECT val, - to_char(val, 'MI9999999999.99') as numeric, - to_char(val::float8, 'MI9999999999.99') as float8, - to_char(val::float4, 'MI9999999999.99') as float4 -FROM v; - val | numeric | float8 | float4 -------------+----------------+----------------+---------------- - 0 | .00 | .00 | .00 - -4.2 | - 4.20 | - 4.20 | - 4.20 - 4200000000 | 4200000000.00 | 4200000000.00 | 4200000000 - 0.000012 | .00 | .00 | .00 - Infinity | Infinity | Infinity | Infinity - -Infinity | - Infinity | - Infinity | - Infinity - NaN | NaN | NaN | NaN -(7 rows) - -WITH v(val) AS - (VALUES('0'::numeric),('-4.2'),('4.2e9'),('1.2e-5'),('inf'),('-inf'),('nan')) -SELECT val, - to_char(val, 'MI99.99') as numeric, - to_char(val::float8, 'MI99.99') as float8, - to_char(val::float4, 'MI99.99') as float4 -FROM v; - val | numeric | float8 | float4 -------------+---------+--------+-------- - 0 | .00 | .00 | .00 - -4.2 | - 4.20 | - 4.20 | - 4.20 - 4200000000 | ##.## | ##.## | ##. - 0.000012 | .00 | .00 | .00 - Infinity | ##.## | ##.## | ##. - -Infinity | -##.## | -##.## | -##. - NaN | ##.## | ##.## | ##.## -(7 rows) - -SELECT to_char('100'::numeric, 'FM999.9'); - to_char ---------- - 100. -(1 row) - -SELECT to_char('100'::numeric, 'FM999.'); - to_char ---------- - 100 -(1 row) - -SELECT to_char('100'::numeric, 'FM999'); - to_char ---------- - 100 -(1 row) - --- Check parsing of literal text in a format string -SELECT to_char('100'::numeric, 'foo999'); - to_char ---------- - foo 100 -(1 row) - -SELECT to_char('100'::numeric, 'f\oo999'); - to_char ----------- - f\oo 100 -(1 row) - -SELECT to_char('100'::numeric, 'f\\oo999'); - to_char ------------ - f\\oo 100 -(1 row) - -SELECT to_char('100'::numeric, 'f\"oo999'); - to_char ----------- - f"oo 100 -(1 row) - -SELECT to_char('100'::numeric, 'f\\"oo999'); - to_char ------------ - f\"oo 100 -(1 row) - -SELECT to_char('100'::numeric, 'f"ool"999'); - to_char ----------- - fool 100 -(1 row) - -SELECT to_char('100'::numeric, 'f"\ool"999'); - to_char ----------- - fool 100 -(1 row) - -SELECT to_char('100'::numeric, 'f"\\ool"999'); - to_char ------------ - f\ool 100 -(1 row) - -SELECT to_char('100'::numeric, 'f"ool\"999'); - to_char ----------- - fool"999 -(1 row) - -SELECT to_char('100'::numeric, 'f"ool\\"999'); - to_char ------------ - fool\ 100 -(1 row) - --- TO_NUMBER() --- -SET lc_numeric = 'C'; -SELECT to_number('-34,338,492', '99G999G999'); - to_number ------------ - -34338492 -(1 row) - -SELECT to_number('-34,338,492.654,878', '99G999G999D999G999'); - to_number ------------------- - -34338492.654878 -(1 row) - -SELECT to_number('<564646.654564>', '999999.999999PR'); - to_number ----------------- - -564646.654564 -(1 row) - -SELECT to_number('0.00001-', '9.999999S'); - to_number ------------ - -0.00001 -(1 row) - -SELECT to_number('5.01-', 'FM9.999999S'); - to_number ------------ - -5.01 -(1 row) - -SELECT to_number('5.01-', 'FM9.999999MI'); - to_number ------------ - -5.01 -(1 row) - -SELECT to_number('5 4 4 4 4 8 . 7 8', '9 9 9 9 9 9 . 9 9'); - to_number ------------ - 544448.78 -(1 row) - -SELECT to_number('.01', 'FM9.99'); - to_number ------------ - 0.01 -(1 row) - -SELECT to_number('.0', '99999999.99999999'); - to_number ------------ - 0.0 -(1 row) - -SELECT to_number('0', '99.99'); - to_number ------------ - 0 -(1 row) - -SELECT to_number('.-01', 'S99.99'); - to_number ------------ - -0.01 -(1 row) - -SELECT to_number('.01-', '99.99S'); - to_number ------------ - -0.01 -(1 row) - -SELECT to_number(' . 0 1-', ' 9 9 . 9 9 S'); - to_number ------------ - -0.01 -(1 row) - -SELECT to_number('34,50','999,99'); - to_number ------------ - 3450 -(1 row) - -SELECT to_number('123,000','999G'); - to_number ------------ - 123 -(1 row) - -SELECT to_number('123456','999G999'); - to_number ------------ - 123456 -(1 row) - -SELECT to_number('$1234.56','L9,999.99'); - to_number ------------ - 1234.56 -(1 row) - -SELECT to_number('$1234.56','L99,999.99'); - to_number ------------ - 1234.56 -(1 row) - -SELECT to_number('$1,234.56','L99,999.99'); - to_number ------------ - 1234.56 -(1 row) - -SELECT to_number('1234.56','L99,999.99'); - to_number ------------ - 1234.56 -(1 row) - -SELECT to_number('1,234.56','L99,999.99'); - to_number ------------ - 1234.56 -(1 row) - -SELECT to_number('42nd', '99th'); - to_number ------------ - 42 -(1 row) - -RESET lc_numeric; --- --- Input syntax --- -CREATE TABLE num_input_test (n1 numeric); --- good inputs -INSERT INTO num_input_test(n1) VALUES (' 123'); -INSERT INTO num_input_test(n1) VALUES (' 3245874 '); -INSERT INTO num_input_test(n1) VALUES (' -93853'); -INSERT INTO num_input_test(n1) VALUES ('555.50'); -INSERT INTO num_input_test(n1) VALUES ('-555.50'); -INSERT INTO num_input_test(n1) VALUES ('NaN '); -INSERT INTO num_input_test(n1) VALUES (' nan'); -INSERT INTO num_input_test(n1) VALUES (' inf '); -INSERT INTO num_input_test(n1) VALUES (' +inf '); -INSERT INTO num_input_test(n1) VALUES (' -inf '); -INSERT INTO num_input_test(n1) VALUES (' Infinity '); -INSERT INTO num_input_test(n1) VALUES (' +inFinity '); -INSERT INTO num_input_test(n1) VALUES (' -INFINITY '); --- bad inputs -INSERT INTO num_input_test(n1) VALUES (' '); -ERROR: invalid input syntax for type numeric: " " -LINE 1: INSERT INTO num_input_test(n1) VALUES (' '); - ^ -INSERT INTO num_input_test(n1) VALUES (' 1234 %'); -ERROR: invalid input syntax for type numeric: " 1234 %" -LINE 1: INSERT INTO num_input_test(n1) VALUES (' 1234 %'); - ^ -INSERT INTO num_input_test(n1) VALUES ('xyz'); -ERROR: invalid input syntax for type numeric: "xyz" -LINE 1: INSERT INTO num_input_test(n1) VALUES ('xyz'); - ^ -INSERT INTO num_input_test(n1) VALUES ('- 1234'); -ERROR: invalid input syntax for type numeric: "- 1234" -LINE 1: INSERT INTO num_input_test(n1) VALUES ('- 1234'); - ^ -INSERT INTO num_input_test(n1) VALUES ('5 . 0'); -ERROR: invalid input syntax for type numeric: "5 . 0" -LINE 1: INSERT INTO num_input_test(n1) VALUES ('5 . 0'); - ^ -INSERT INTO num_input_test(n1) VALUES ('5. 0 '); -ERROR: invalid input syntax for type numeric: "5. 0 " -LINE 1: INSERT INTO num_input_test(n1) VALUES ('5. 0 '); - ^ -INSERT INTO num_input_test(n1) VALUES (''); -ERROR: invalid input syntax for type numeric: "" -LINE 1: INSERT INTO num_input_test(n1) VALUES (''); - ^ -INSERT INTO num_input_test(n1) VALUES (' N aN '); -ERROR: invalid input syntax for type numeric: " N aN " -LINE 1: INSERT INTO num_input_test(n1) VALUES (' N aN '); - ^ -INSERT INTO num_input_test(n1) VALUES ('+ infinity'); -ERROR: invalid input syntax for type numeric: "+ infinity" -LINE 1: INSERT INTO num_input_test(n1) VALUES ('+ infinity'); - ^ -SELECT * FROM num_input_test; - n1 ------------ - 123 - 3245874 - -93853 - 555.50 - -555.50 - NaN - NaN - Infinity - Infinity - -Infinity - Infinity - Infinity - -Infinity -(13 rows) - --- --- Test some corner cases for multiplication --- -select 4790999999999999999999999999999999999999999999999999999999999999999999999999999999999999 * 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999; - ?column? ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - 47909999999999999999999999999999999999999999999999999999999999999999999999999999999999985209000000000000000000000000000000000000000000000000000000000000000000000000000000000001 -(1 row) - -select 4789999999999999999999999999999999999999999999999999999999999999999999999999999999999999 * 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999; - ?column? ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - 47899999999999999999999999999999999999999999999999999999999999999999999999999999999999985210000000000000000000000000000000000000000000000000000000000000000000000000000000000001 -(1 row) - -select 4770999999999999999999999999999999999999999999999999999999999999999999999999999999999999 * 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999; - ?column? ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - 47709999999999999999999999999999999999999999999999999999999999999999999999999999999999985229000000000000000000000000000000000000000000000000000000000000000000000000000000000001 -(1 row) - -select 4769999999999999999999999999999999999999999999999999999999999999999999999999999999999999 * 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999; - ?column? ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - 47699999999999999999999999999999999999999999999999999999999999999999999999999999999999985230000000000000000000000000000000000000000000000000000000000000000000000000000000000001 -(1 row) - -select trim_scale((0.1 - 2e-16383) * (0.1 - 3e-16383)); - trim_scale ------------- - 0.01 -(1 row) - --- --- Test some corner cases for division --- -select 999999999999999999999::numeric/1000000000000000000000; - ?column? ------------------------- - 1.00000000000000000000 -(1 row) - -select div(999999999999999999999::numeric,1000000000000000000000); - div ------ - 0 -(1 row) - -select mod(999999999999999999999::numeric,1000000000000000000000); - mod ------------------------ - 999999999999999999999 -(1 row) - -select div(-9999999999999999999999::numeric,1000000000000000000000); - div ------ - -9 -(1 row) - -select mod(-9999999999999999999999::numeric,1000000000000000000000); - mod ------------------------- - -999999999999999999999 -(1 row) - -select div(-9999999999999999999999::numeric,1000000000000000000000)*1000000000000000000000 + mod(-9999999999999999999999::numeric,1000000000000000000000); - ?column? -------------------------- - -9999999999999999999999 -(1 row) - -select mod (70.0,70) ; - mod ------ - 0.0 -(1 row) - -select div (70.0,70) ; - div ------ - 1 -(1 row) - -select 70.0 / 70 ; - ?column? ------------------------- - 1.00000000000000000000 -(1 row) - -select 12345678901234567890 % 123; - ?column? ----------- - 78 -(1 row) - -select 12345678901234567890 / 123; - ?column? --------------------- - 100371373180768845 -(1 row) - -select div(12345678901234567890, 123); - div --------------------- - 100371373180768844 -(1 row) - -select div(12345678901234567890, 123) * 123 + 12345678901234567890 % 123; - ?column? ----------------------- - 12345678901234567890 -(1 row) - --- --- Test some corner cases for square root --- -select sqrt(1.000000000000003::numeric); - sqrt -------------------- - 1.000000000000001 -(1 row) - -select sqrt(1.000000000000004::numeric); - sqrt -------------------- - 1.000000000000002 -(1 row) - -select sqrt(96627521408608.56340355805::numeric); - sqrt ---------------------- - 9829929.87811248648 -(1 row) - -select sqrt(96627521408608.56340355806::numeric); - sqrt ---------------------- - 9829929.87811248649 -(1 row) - -select sqrt(515549506212297735.073688290367::numeric); - sqrt ------------------------- - 718017761.766585921184 -(1 row) - -select sqrt(515549506212297735.073688290368::numeric); - sqrt ------------------------- - 718017761.766585921185 -(1 row) - -select sqrt(8015491789940783531003294973900306::numeric); - sqrt -------------------- - 89529278953540017 -(1 row) - -select sqrt(8015491789940783531003294973900307::numeric); - sqrt -------------------- - 89529278953540018 -(1 row) - --- --- Test code path for raising to integer powers --- -select 10.0 ^ -2147483648 as rounds_to_zero; - rounds_to_zero --------------------- - 0.0000000000000000 -(1 row) - -select 10.0 ^ -2147483647 as rounds_to_zero; - rounds_to_zero --------------------- - 0.0000000000000000 -(1 row) - -select 10.0 ^ 2147483647 as overflows; -ERROR: value overflows numeric format -select 117743296169.0 ^ 1000000000 as overflows; -ERROR: value overflows numeric format --- cases that used to return inaccurate results -select 3.789 ^ 21; - ?column? --------------------------------- - 1409343026052.8716016316022141 -(1 row) - -select 3.789 ^ 35; - ?column? ----------------------------------------- - 177158169650516670809.3820586142670135 -(1 row) - -select 1.2 ^ 345; - ?column? ------------------------------------------------ - 2077446682327378559843444695.5827049735727869 -(1 row) - -select 0.12 ^ (-20); - ?column? --------------------------------------- - 2608405330458882702.5529619561355838 -(1 row) - -select 1.000000000123 ^ (-2147483648); - ?column? --------------------- - 0.7678656556403084 -(1 row) - -select coalesce(nullif(0.9999999999 ^ 23300000000000, 0), 0) as rounds_to_zero; - rounds_to_zero ----------------- - 0 -(1 row) - -select round(((1 - 1.500012345678e-1000) ^ 1.45e1003) * 1e1000); - round ----------------------------------------------------------- - 25218976308958387188077465658068501556514992509509282366 -(1 row) - --- cases that used to error out -select 0.12 ^ (-25); - ?column? -------------------------------------------- - 104825960103961013959336.4983657883169110 -(1 row) - -select 0.5678 ^ (-85); - ?column? ----------------------------------------- - 782333637740774446257.7719390061997396 -(1 row) - -select coalesce(nullif(0.9999999999 ^ 70000000000000, 0), 0) as underflows; - underflows ------------- - 0 -(1 row) - --- negative base to integer powers -select (-1.0) ^ 2147483646; - ?column? --------------------- - 1.0000000000000000 -(1 row) - -select (-1.0) ^ 2147483647; - ?column? ---------------------- - -1.0000000000000000 -(1 row) - -select (-1.0) ^ 2147483648; - ?column? --------------------- - 1.0000000000000000 -(1 row) - -select (-1.0) ^ 1000000000000000; - ?column? --------------------- - 1.0000000000000000 -(1 row) - -select (-1.0) ^ 1000000000000001; - ?column? ---------------------- - -1.0000000000000000 -(1 row) - --- --- Tests for raising to non-integer powers --- --- special cases -select 0.0 ^ 0.0; - ?column? --------------------- - 1.0000000000000000 -(1 row) - -select (-12.34) ^ 0.0; - ?column? --------------------- - 1.0000000000000000 -(1 row) - -select 12.34 ^ 0.0; - ?column? --------------------- - 1.0000000000000000 -(1 row) - -select 0.0 ^ 12.34; - ?column? --------------------- - 0.0000000000000000 -(1 row) - --- NaNs -select 'NaN'::numeric ^ 'NaN'::numeric; - ?column? ----------- - NaN -(1 row) - -select 'NaN'::numeric ^ 0; - ?column? ----------- - 1 -(1 row) - -select 'NaN'::numeric ^ 1; - ?column? ----------- - NaN -(1 row) - -select 0 ^ 'NaN'::numeric; - ?column? ----------- - NaN -(1 row) - -select 1 ^ 'NaN'::numeric; - ?column? ----------- - 1 -(1 row) - --- invalid inputs -select 0.0 ^ (-12.34); -ERROR: zero raised to a negative power is undefined -select (-12.34) ^ 1.2; -ERROR: a negative number raised to a non-integer power yields a complex result --- cases that used to generate inaccurate results -select 32.1 ^ 9.8; - ?column? --------------------- - 580429286790711.10 -(1 row) - -select 32.1 ^ (-9.8); - ?column? ----------------------------------- - 0.000000000000001722862754788209 -(1 row) - -select 12.3 ^ 45.6; - ?column? ------------------------------------------------------- - 50081010321492803393171165777624533697036806969694.9 -(1 row) - -select 12.3 ^ (-45.6); - ?column? ---------------------------------------------------------------------- - 0.00000000000000000000000000000000000000000000000001996764828785491 -(1 row) - --- big test -select 1.234 ^ 5678; - ?column? ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - 307239295662090741644584872593956173493568238595074141254349565406661439636598896798876823220904084953233015553994854875890890858118656468658643918169805277399402542281777901029346337707622181574346585989613344285010764501017625366742865066948856161360224801370482171458030533346309750557140549621313515752078638620714732831815297168231790779296290266207315344008883935010274044001522606235576584215999260117523114297033944018699691024106823438431754073086813382242140602291215149759520833200152654884259619588924545324.5973362312547382 -(1 row) - --- --- Tests for EXP() --- --- special cases -select exp(0.0); - exp --------------------- - 1.0000000000000000 -(1 row) - -select exp(1.0); - exp --------------------- - 2.7182818284590452 -(1 row) - -select exp(1.0::numeric(71,70)); - exp --------------------------------------------------------------------------- - 2.7182818284590452353602874713526624977572470936999595749669676277240766 -(1 row) - -select exp('nan'::numeric); - exp ------ - NaN -(1 row) - -select exp('inf'::numeric); - exp ----------- - Infinity -(1 row) - -select exp('-inf'::numeric); - exp ------ - 0 -(1 row) - -select coalesce(nullif(exp(-5000::numeric), 0), 0) as rounds_to_zero; - rounds_to_zero ----------------- - 0 -(1 row) - -select coalesce(nullif(exp(-10000::numeric), 0), 0) as underflows; - underflows ------------- - 0 -(1 row) - --- cases that used to generate inaccurate results -select exp(32.999); - exp ---------------------- - 214429043492155.053 -(1 row) - -select exp(-32.999); - exp ----------------------------------- - 0.000000000000004663547361468248 -(1 row) - -select exp(123.456); - exp ------------------------------------------------------------- - 413294435277809344957685441227343146614594393746575438.725 -(1 row) - -select exp(-123.456); - exp -------------------------------------------------------------------------- - 0.000000000000000000000000000000000000000000000000000002419582541264601 -(1 row) - --- big test -select exp(1234.5678); - exp ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - 146549072930959479983482138503979804217622199675223653966270157446954995433819741094410764947112047906012815540251009949604426069672532417736057033099274204598385314594846509975629046864798765888104789074984927709616261452461385220475510438783429612447831614003668421849727379202555580791042606170523016207262965336641214601082882495255771621327088265411334088968112458492660609809762865582162764292604697957813514621259353683899630997077707406305730694385703091201347848855199354307506425820147289848677003277208302716466011827836279231.9667 -(1 row) - --- --- Tests for generate_series --- -select * from generate_series(0.0::numeric, 4.0::numeric); - generate_series ------------------ - 0.0 - 1.0 - 2.0 - 3.0 - 4.0 -(5 rows) - -select * from generate_series(0.1::numeric, 4.0::numeric, 1.3::numeric); - generate_series ------------------ - 0.1 - 1.4 - 2.7 - 4.0 -(4 rows) - -select * from generate_series(4.0::numeric, -1.5::numeric, -2.2::numeric); - generate_series ------------------ - 4.0 - 1.8 - -0.4 -(3 rows) - --- Trigger errors -select * from generate_series(-100::numeric, 100::numeric, 0::numeric); -ERROR: step size cannot equal zero -select * from generate_series(-100::numeric, 100::numeric, 'nan'::numeric); -ERROR: step size cannot be NaN -select * from generate_series('nan'::numeric, 100::numeric, 10::numeric); -ERROR: start value cannot be NaN -select * from generate_series(0::numeric, 'nan'::numeric, 10::numeric); -ERROR: stop value cannot be NaN -select * from generate_series('inf'::numeric, 'inf'::numeric, 10::numeric); -ERROR: start value cannot be infinity -select * from generate_series(0::numeric, 'inf'::numeric, 10::numeric); -ERROR: stop value cannot be infinity -select * from generate_series(0::numeric, '42'::numeric, '-inf'::numeric); -ERROR: step size cannot be infinity --- Checks maximum, output is truncated -select (i / (10::numeric ^ 131071))::numeric(1,0) - from generate_series(6 * (10::numeric ^ 131071), - 9 * (10::numeric ^ 131071), - 10::numeric ^ 131071) as a(i); - numeric ---------- - 6 - 7 - 8 - 9 -(4 rows) - --- Check usage with variables -select * from generate_series(1::numeric, 3::numeric) i, generate_series(i,3) j; - i | j ----+--- - 1 | 1 - 1 | 2 - 1 | 3 - 2 | 2 - 2 | 3 - 3 | 3 -(6 rows) - -select * from generate_series(1::numeric, 3::numeric) i, generate_series(1,i) j; - i | j ----+--- - 1 | 1 - 2 | 1 - 2 | 2 - 3 | 1 - 3 | 2 - 3 | 3 -(6 rows) - -select * from generate_series(1::numeric, 3::numeric) i, generate_series(1,5,i) j; - i | j ----+--- - 1 | 1 - 1 | 2 - 1 | 3 - 1 | 4 - 1 | 5 - 2 | 1 - 2 | 3 - 2 | 5 - 3 | 1 - 3 | 4 -(10 rows) - --- --- Tests for LN() --- --- Invalid inputs -select ln(-12.34); -ERROR: cannot take logarithm of a negative number -select ln(0.0); -ERROR: cannot take logarithm of zero --- Some random tests -select ln(1.2345678e-28); - ln ------------------------------------------ - -64.26166165451762991204894255882820859 -(1 row) - -select ln(0.0456789); - ln ---------------------- - -3.0861187944847439 -(1 row) - -select ln(0.349873948359354029493948309745709580730482050975); - ln ------------------------------------------------------ - -1.050182336912082775693991697979750253056317885460 -(1 row) - -select ln(0.99949452); - ln -------------------------- - -0.00050560779808326467 -(1 row) - -select ln(1.00049687395); - ln ------------------------- - 0.00049675054901370394 -(1 row) - -select ln(1234.567890123456789); - ln --------------------- - 7.1184763012977896 -(1 row) - -select ln(5.80397490724e5); - ln --------------------- - 13.271468476626518 -(1 row) - -select ln(9.342536355e34); - ln --------------------- - 80.522470935524187 -(1 row) - --- --- Tests for LOG() (base 10) --- --- invalid inputs -select log(-12.34); -ERROR: cannot take logarithm of a negative number -CONTEXT: SQL function "log" statement 1 -select log(0.0); -ERROR: cannot take logarithm of zero -CONTEXT: SQL function "log" statement 1 --- some random tests -select log(1.234567e-89); - log ------------------------------------------------------------------------------------------------------ - -88.90848533591373725637496492944925187293052336306443143312825869985819779294142441287021741054275 -(1 row) - -select log(3.4634998359873254962349856073435545); - log --------------------------------------- - 0.5395151714070134409152404011959981 -(1 row) - -select log(9.999999999999999999); - log ----------------------- - 1.000000000000000000 -(1 row) - -select log(10.00000000000000000); - log ---------------------- - 1.00000000000000000 -(1 row) - -select log(10.00000000000000001); - log ---------------------- - 1.00000000000000000 -(1 row) - -select log(590489.45235237); - log -------------------- - 5.771212144411727 -(1 row) - --- --- Tests for LOG() (arbitrary base) --- --- invalid inputs -select log(-12.34, 56.78); -ERROR: cannot take logarithm of a negative number -select log(-12.34, -56.78); -ERROR: cannot take logarithm of a negative number -select log(12.34, -56.78); -ERROR: cannot take logarithm of a negative number -select log(0.0, 12.34); -ERROR: cannot take logarithm of zero -select log(12.34, 0.0); -ERROR: cannot take logarithm of zero -select log(1.0, 12.34); -ERROR: division by zero --- some random tests -select log(1.23e-89, 6.4689e45); - log ------------------------------------------------------------------------------------------------- - -0.5152489207781856983977054971756484879653568168479201885425588841094788842469115325262329756 -(1 row) - -select log(0.99923, 4.58934e34); - log ---------------------- - -103611.55579544132 -(1 row) - -select log(1.000016, 8.452010e18); - log --------------------- - 2723830.2877097365 -(1 row) - -select log(3.1954752e47, 9.4792021e-73); - log -------------------------------------------------------------------------------------- - -1.51613372350688302142917386143459361608600157692779164475351842333265418126982165 -(1 row) - --- --- Tests for scale() --- -select scale(numeric 'NaN'); - scale -------- - -(1 row) - -select scale(numeric 'inf'); - scale -------- - -(1 row) - -select scale(NULL::numeric); - scale -------- - -(1 row) - -select scale(1.12); - scale -------- - 2 -(1 row) - -select scale(0); - scale -------- - 0 -(1 row) - -select scale(0.00); - scale -------- - 2 -(1 row) - -select scale(1.12345); - scale -------- - 5 -(1 row) - -select scale(110123.12475871856128); - scale -------- - 14 -(1 row) - -select scale(-1123.12471856128); - scale -------- - 11 -(1 row) - -select scale(-13.000000000000000); - scale -------- - 15 -(1 row) - --- --- Tests for min_scale() --- -select min_scale(numeric 'NaN') is NULL; -- should be true - ?column? ----------- - t -(1 row) - -select min_scale(numeric 'inf') is NULL; -- should be true - ?column? ----------- - t -(1 row) - -select min_scale(0); -- no digits - min_scale ------------ - 0 -(1 row) - -select min_scale(0.00); -- no digits again - min_scale ------------ - 0 -(1 row) - -select min_scale(1.0); -- no scale - min_scale ------------ - 0 -(1 row) - -select min_scale(1.1); -- scale 1 - min_scale ------------ - 1 -(1 row) - -select min_scale(1.12); -- scale 2 - min_scale ------------ - 2 -(1 row) - -select min_scale(1.123); -- scale 3 - min_scale ------------ - 3 -(1 row) - -select min_scale(1.1234); -- scale 4, filled digit - min_scale ------------ - 4 -(1 row) - -select min_scale(1.12345); -- scale 5, 2 NDIGITS - min_scale ------------ - 5 -(1 row) - -select min_scale(1.1000); -- 1 pos in NDIGITS - min_scale ------------ - 1 -(1 row) - -select min_scale(1e100); -- very big number - min_scale ------------ - 0 -(1 row) - --- --- Tests for trim_scale() --- -select trim_scale(numeric 'NaN'); - trim_scale ------------- - NaN -(1 row) - -select trim_scale(numeric 'inf'); - trim_scale ------------- - Infinity -(1 row) - -select trim_scale(1.120); - trim_scale ------------- - 1.12 -(1 row) - -select trim_scale(0); - trim_scale ------------- - 0 -(1 row) - -select trim_scale(0.00); - trim_scale ------------- - 0 -(1 row) - -select trim_scale(1.1234500); - trim_scale ------------- - 1.12345 -(1 row) - -select trim_scale(110123.12475871856128000); - trim_scale ------------------------ - 110123.12475871856128 -(1 row) - -select trim_scale(-1123.124718561280000000); - trim_scale -------------------- - -1123.12471856128 -(1 row) - -select trim_scale(-13.00000000000000000000); - trim_scale ------------- - -13 -(1 row) - -select trim_scale(1e100); - trim_scale -------------------------------------------------------------------------------------------------------- - 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -(1 row) - --- --- Tests for SUM() --- --- cases that need carry propagation -SELECT SUM(9999::numeric) FROM generate_series(1, 100000); - sum ------------ - 999900000 -(1 row) - -SELECT SUM((-9999)::numeric) FROM generate_series(1, 100000); - sum ------------- - -999900000 -(1 row) - --- --- Tests for GCD() --- -SELECT a, b, gcd(a, b), gcd(a, -b), gcd(-b, a), gcd(-b, -a) -FROM (VALUES (0::numeric, 0::numeric), - (0::numeric, numeric 'NaN'), - (0::numeric, 46375::numeric), - (433125::numeric, 46375::numeric), - (43312.5::numeric, 4637.5::numeric), - (4331.250::numeric, 463.75000::numeric), - ('inf', '0'), - ('inf', '42'), - ('inf', 'inf') - ) AS v(a, b); - a | b | gcd | gcd | gcd | gcd -----------+-----------+---------+---------+---------+--------- - 0 | 0 | 0 | 0 | 0 | 0 - 0 | NaN | NaN | NaN | NaN | NaN - 0 | 46375 | 46375 | 46375 | 46375 | 46375 - 433125 | 46375 | 875 | 875 | 875 | 875 - 43312.5 | 4637.5 | 87.5 | 87.5 | 87.5 | 87.5 - 4331.250 | 463.75000 | 8.75000 | 8.75000 | 8.75000 | 8.75000 - Infinity | 0 | NaN | NaN | NaN | NaN - Infinity | 42 | NaN | NaN | NaN | NaN - Infinity | Infinity | NaN | NaN | NaN | NaN -(9 rows) - --- --- Tests for LCM() --- -SELECT a,b, lcm(a, b), lcm(a, -b), lcm(-b, a), lcm(-b, -a) -FROM (VALUES (0::numeric, 0::numeric), - (0::numeric, numeric 'NaN'), - (0::numeric, 13272::numeric), - (13272::numeric, 13272::numeric), - (423282::numeric, 13272::numeric), - (42328.2::numeric, 1327.2::numeric), - (4232.820::numeric, 132.72000::numeric), - ('inf', '0'), - ('inf', '42'), - ('inf', 'inf') - ) AS v(a, b); - a | b | lcm | lcm | lcm | lcm -----------+-----------+--------------+--------------+--------------+-------------- - 0 | 0 | 0 | 0 | 0 | 0 - 0 | NaN | NaN | NaN | NaN | NaN - 0 | 13272 | 0 | 0 | 0 | 0 - 13272 | 13272 | 13272 | 13272 | 13272 | 13272 - 423282 | 13272 | 11851896 | 11851896 | 11851896 | 11851896 - 42328.2 | 1327.2 | 1185189.6 | 1185189.6 | 1185189.6 | 1185189.6 - 4232.820 | 132.72000 | 118518.96000 | 118518.96000 | 118518.96000 | 118518.96000 - Infinity | 0 | NaN | NaN | NaN | NaN - Infinity | 42 | NaN | NaN | NaN | NaN - Infinity | Infinity | NaN | NaN | NaN | NaN -(10 rows) - -SELECT lcm(9999 * (10::numeric)^131068 + (10::numeric^131068 - 1), 2); -- overflow -ERROR: value overflows numeric format --- --- Tests for factorial --- -SELECT factorial(4); - factorial ------------ - 24 -(1 row) - -SELECT factorial(15); - factorial ---------------- - 1307674368000 -(1 row) - -SELECT factorial(100000); -ERROR: value overflows numeric format -SELECT factorial(0); - factorial ------------ - 1 -(1 row) - -SELECT factorial(-4); -ERROR: factorial of a negative number is undefined --- --- Tests for pg_lsn() --- -SELECT pg_lsn(23783416::numeric); - pg_lsn ------------ - 0/16AE7F8 -(1 row) - -SELECT pg_lsn(0::numeric); - pg_lsn --------- - 0/0 -(1 row) - -SELECT pg_lsn(18446744073709551615::numeric); - pg_lsn -------------------- - FFFFFFFF/FFFFFFFF -(1 row) - -SELECT pg_lsn(-1::numeric); -ERROR: pg_lsn out of range -SELECT pg_lsn(18446744073709551616::numeric); -ERROR: pg_lsn out of range -SELECT pg_lsn('NaN'::numeric); -ERROR: cannot convert NaN to pg_lsn +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/txid.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/txid.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/txid.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/txid.out 2023-02-20 19:43:32.019205280 -0500 @@ -1,327 +1 @@ --- txid_snapshot data type and related functions --- Note: these are backward-compatibility functions and types, and have been --- replaced by new xid8-based variants. See xid.sql. The txid variants will --- be removed in a future release. --- i/o -select '12:13:'::txid_snapshot; - txid_snapshot ---------------- - 12:13: -(1 row) - -select '12:18:14,16'::txid_snapshot; - txid_snapshot ---------------- - 12:18:14,16 -(1 row) - -select '12:16:14,14'::txid_snapshot; - txid_snapshot ---------------- - 12:16:14 -(1 row) - --- errors -select '31:12:'::txid_snapshot; -ERROR: invalid input syntax for type pg_snapshot: "31:12:" -LINE 1: select '31:12:'::txid_snapshot; - ^ -select '0:1:'::txid_snapshot; -ERROR: invalid input syntax for type pg_snapshot: "0:1:" -LINE 1: select '0:1:'::txid_snapshot; - ^ -select '12:13:0'::txid_snapshot; -ERROR: invalid input syntax for type pg_snapshot: "12:13:0" -LINE 1: select '12:13:0'::txid_snapshot; - ^ -select '12:16:14,13'::txid_snapshot; -ERROR: invalid input syntax for type pg_snapshot: "12:16:14,13" -LINE 1: select '12:16:14,13'::txid_snapshot; - ^ -create temp table snapshot_test ( - nr integer, - snap txid_snapshot -); -insert into snapshot_test values (1, '12:13:'); -insert into snapshot_test values (2, '12:20:13,15,18'); -insert into snapshot_test values (3, '100001:100009:100005,100007,100008'); -insert into snapshot_test values (4, '100:150:101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131'); -select snap from snapshot_test order by nr; - snap -------------------------------------------------------------------------------------------------------------------------------------- - 12:13: - 12:20:13,15,18 - 100001:100009:100005,100007,100008 - 100:150:101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131 -(4 rows) - -select txid_snapshot_xmin(snap), - txid_snapshot_xmax(snap), - txid_snapshot_xip(snap) -from snapshot_test order by nr; - txid_snapshot_xmin | txid_snapshot_xmax | txid_snapshot_xip ---------------------+--------------------+------------------- - 12 | 20 | 13 - 12 | 20 | 15 - 12 | 20 | 18 - 100001 | 100009 | 100005 - 100001 | 100009 | 100007 - 100001 | 100009 | 100008 - 100 | 150 | 101 - 100 | 150 | 102 - 100 | 150 | 103 - 100 | 150 | 104 - 100 | 150 | 105 - 100 | 150 | 106 - 100 | 150 | 107 - 100 | 150 | 108 - 100 | 150 | 109 - 100 | 150 | 110 - 100 | 150 | 111 - 100 | 150 | 112 - 100 | 150 | 113 - 100 | 150 | 114 - 100 | 150 | 115 - 100 | 150 | 116 - 100 | 150 | 117 - 100 | 150 | 118 - 100 | 150 | 119 - 100 | 150 | 120 - 100 | 150 | 121 - 100 | 150 | 122 - 100 | 150 | 123 - 100 | 150 | 124 - 100 | 150 | 125 - 100 | 150 | 126 - 100 | 150 | 127 - 100 | 150 | 128 - 100 | 150 | 129 - 100 | 150 | 130 - 100 | 150 | 131 -(37 rows) - -select id, txid_visible_in_snapshot(id, snap) -from snapshot_test, generate_series(11, 21) id -where nr = 2; - id | txid_visible_in_snapshot -----+-------------------------- - 11 | t - 12 | t - 13 | f - 14 | t - 15 | f - 16 | t - 17 | t - 18 | f - 19 | t - 20 | f - 21 | f -(11 rows) - --- test bsearch -select id, txid_visible_in_snapshot(id, snap) -from snapshot_test, generate_series(90, 160) id -where nr = 4; - id | txid_visible_in_snapshot ------+-------------------------- - 90 | t - 91 | t - 92 | t - 93 | t - 94 | t - 95 | t - 96 | t - 97 | t - 98 | t - 99 | t - 100 | t - 101 | f - 102 | f - 103 | f - 104 | f - 105 | f - 106 | f - 107 | f - 108 | f - 109 | f - 110 | f - 111 | f - 112 | f - 113 | f - 114 | f - 115 | f - 116 | f - 117 | f - 118 | f - 119 | f - 120 | f - 121 | f - 122 | f - 123 | f - 124 | f - 125 | f - 126 | f - 127 | f - 128 | f - 129 | f - 130 | f - 131 | f - 132 | t - 133 | t - 134 | t - 135 | t - 136 | t - 137 | t - 138 | t - 139 | t - 140 | t - 141 | t - 142 | t - 143 | t - 144 | t - 145 | t - 146 | t - 147 | t - 148 | t - 149 | t - 150 | f - 151 | f - 152 | f - 153 | f - 154 | f - 155 | f - 156 | f - 157 | f - 158 | f - 159 | f - 160 | f -(71 rows) - --- test current values also -select txid_current() >= txid_snapshot_xmin(txid_current_snapshot()); - ?column? ----------- - t -(1 row) - --- we can't assume current is always less than xmax, however -select txid_visible_in_snapshot(txid_current(), txid_current_snapshot()); - txid_visible_in_snapshot --------------------------- - f -(1 row) - --- test 64bitness -select txid_snapshot '1000100010001000:1000100010001100:1000100010001012,1000100010001013'; - txid_snapshot ---------------------------------------------------------------------- - 1000100010001000:1000100010001100:1000100010001012,1000100010001013 -(1 row) - -select txid_visible_in_snapshot('1000100010001012', '1000100010001000:1000100010001100:1000100010001012,1000100010001013'); - txid_visible_in_snapshot --------------------------- - f -(1 row) - -select txid_visible_in_snapshot('1000100010001015', '1000100010001000:1000100010001100:1000100010001012,1000100010001013'); - txid_visible_in_snapshot --------------------------- - t -(1 row) - --- test 64bit overflow -SELECT txid_snapshot '1:9223372036854775807:3'; - txid_snapshot -------------------------- - 1:9223372036854775807:3 -(1 row) - -SELECT txid_snapshot '1:9223372036854775808:3'; -ERROR: invalid input syntax for type pg_snapshot: "1:9223372036854775808:3" -LINE 1: SELECT txid_snapshot '1:9223372036854775808:3'; - ^ --- test txid_current_if_assigned -BEGIN; -SELECT txid_current_if_assigned() IS NULL; - ?column? ----------- - t -(1 row) - -SELECT txid_current() \gset -SELECT txid_current_if_assigned() IS NOT DISTINCT FROM BIGINT :'txid_current'; - ?column? ----------- - t -(1 row) - -COMMIT; --- test xid status functions -BEGIN; -SELECT txid_current() AS committed \gset -COMMIT; -BEGIN; -SELECT txid_current() AS rolledback \gset -ROLLBACK; -BEGIN; -SELECT txid_current() AS inprogress \gset -SELECT txid_status(:committed) AS committed; - committed ------------ - committed -(1 row) - -SELECT txid_status(:rolledback) AS rolledback; - rolledback ------------- - aborted -(1 row) - -SELECT txid_status(:inprogress) AS inprogress; - inprogress -------------- - in progress -(1 row) - -SELECT txid_status(1); -- BootstrapTransactionId is always committed - txid_status -------------- - committed -(1 row) - -SELECT txid_status(2); -- FrozenTransactionId is always committed - txid_status -------------- - committed -(1 row) - -SELECT txid_status(3); -- in regress testing FirstNormalTransactionId will always be behind oldestXmin - txid_status -------------- - -(1 row) - -COMMIT; -BEGIN; -CREATE FUNCTION test_future_xid_status(bigint) -RETURNS void -LANGUAGE plpgsql -AS -$$ -BEGIN - PERFORM txid_status($1); - RAISE EXCEPTION 'didn''t ERROR at xid in the future as expected'; -EXCEPTION - WHEN invalid_parameter_value THEN - RAISE NOTICE 'Got expected error for xid in the future'; -END; -$$; -SELECT test_future_xid_status(:inprogress + 10000); -NOTICE: Got expected error for xid in the future - test_future_xid_status ------------------------- - -(1 row) - -ROLLBACK; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/uuid.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/uuid.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/uuid.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/uuid.out 2023-02-20 19:43:32.029205280 -0500 @@ -1,159 +1 @@ --- regression test for the uuid datatype --- creating test tables -CREATE TABLE guid1 -( - guid_field UUID, - text_field TEXT DEFAULT(now()) -); -CREATE TABLE guid2 -( - guid_field UUID, - text_field TEXT DEFAULT(now()) -); --- inserting invalid data tests --- too long -INSERT INTO guid1(guid_field) VALUES('11111111-1111-1111-1111-111111111111F'); -ERROR: invalid input syntax for type uuid: "11111111-1111-1111-1111-111111111111F" -LINE 1: INSERT INTO guid1(guid_field) VALUES('11111111-1111-1111-111... - ^ --- too short -INSERT INTO guid1(guid_field) VALUES('{11111111-1111-1111-1111-11111111111}'); -ERROR: invalid input syntax for type uuid: "{11111111-1111-1111-1111-11111111111}" -LINE 1: INSERT INTO guid1(guid_field) VALUES('{11111111-1111-1111-11... - ^ --- valid data but invalid format -INSERT INTO guid1(guid_field) VALUES('111-11111-1111-1111-1111-111111111111'); -ERROR: invalid input syntax for type uuid: "111-11111-1111-1111-1111-111111111111" -LINE 1: INSERT INTO guid1(guid_field) VALUES('111-11111-1111-1111-11... - ^ -INSERT INTO guid1(guid_field) VALUES('{22222222-2222-2222-2222-222222222222 '); -ERROR: invalid input syntax for type uuid: "{22222222-2222-2222-2222-222222222222 " -LINE 1: INSERT INTO guid1(guid_field) VALUES('{22222222-2222-2222-22... - ^ --- invalid data -INSERT INTO guid1(guid_field) VALUES('11111111-1111-1111-G111-111111111111'); -ERROR: invalid input syntax for type uuid: "11111111-1111-1111-G111-111111111111" -LINE 1: INSERT INTO guid1(guid_field) VALUES('11111111-1111-1111-G11... - ^ -INSERT INTO guid1(guid_field) VALUES('11+11111-1111-1111-1111-111111111111'); -ERROR: invalid input syntax for type uuid: "11+11111-1111-1111-1111-111111111111" -LINE 1: INSERT INTO guid1(guid_field) VALUES('11+11111-1111-1111-111... - ^ ---inserting three input formats -INSERT INTO guid1(guid_field) VALUES('11111111-1111-1111-1111-111111111111'); -INSERT INTO guid1(guid_field) VALUES('{22222222-2222-2222-2222-222222222222}'); -INSERT INTO guid1(guid_field) VALUES('3f3e3c3b3a3039383736353433a2313e'); --- retrieving the inserted data -SELECT guid_field FROM guid1; - guid_field --------------------------------------- - 11111111-1111-1111-1111-111111111111 - 22222222-2222-2222-2222-222222222222 - 3f3e3c3b-3a30-3938-3736-353433a2313e -(3 rows) - --- ordering test -SELECT guid_field FROM guid1 ORDER BY guid_field ASC; - guid_field --------------------------------------- - 11111111-1111-1111-1111-111111111111 - 22222222-2222-2222-2222-222222222222 - 3f3e3c3b-3a30-3938-3736-353433a2313e -(3 rows) - -SELECT guid_field FROM guid1 ORDER BY guid_field DESC; - guid_field --------------------------------------- - 3f3e3c3b-3a30-3938-3736-353433a2313e - 22222222-2222-2222-2222-222222222222 - 11111111-1111-1111-1111-111111111111 -(3 rows) - --- = operator test -SELECT COUNT(*) FROM guid1 WHERE guid_field = '3f3e3c3b-3a30-3938-3736-353433a2313e'; - count -------- - 1 -(1 row) - --- <> operator test -SELECT COUNT(*) FROM guid1 WHERE guid_field <> '11111111111111111111111111111111'; - count -------- - 2 -(1 row) - --- < operator test -SELECT COUNT(*) FROM guid1 WHERE guid_field < '22222222-2222-2222-2222-222222222222'; - count -------- - 1 -(1 row) - --- <= operator test -SELECT COUNT(*) FROM guid1 WHERE guid_field <= '22222222-2222-2222-2222-222222222222'; - count -------- - 2 -(1 row) - --- > operator test -SELECT COUNT(*) FROM guid1 WHERE guid_field > '22222222-2222-2222-2222-222222222222'; - count -------- - 1 -(1 row) - --- >= operator test -SELECT COUNT(*) FROM guid1 WHERE guid_field >= '22222222-2222-2222-2222-222222222222'; - count -------- - 2 -(1 row) - --- btree and hash index creation test -CREATE INDEX guid1_btree ON guid1 USING BTREE (guid_field); -CREATE INDEX guid1_hash ON guid1 USING HASH (guid_field); --- unique index test -CREATE UNIQUE INDEX guid1_unique_BTREE ON guid1 USING BTREE (guid_field); --- should fail -INSERT INTO guid1(guid_field) VALUES('11111111-1111-1111-1111-111111111111'); -ERROR: duplicate key value violates unique constraint "guid1_unique_btree" -DETAIL: Key (guid_field)=(11111111-1111-1111-1111-111111111111) already exists. --- check to see whether the new indexes are actually there -SELECT count(*) FROM pg_class WHERE relkind='i' AND relname LIKE 'guid%'; - count -------- - 3 -(1 row) - --- populating the test tables with additional records -INSERT INTO guid1(guid_field) VALUES('44444444-4444-4444-4444-444444444444'); -INSERT INTO guid2(guid_field) VALUES('11111111-1111-1111-1111-111111111111'); -INSERT INTO guid2(guid_field) VALUES('{22222222-2222-2222-2222-222222222222}'); -INSERT INTO guid2(guid_field) VALUES('3f3e3c3b3a3039383736353433a2313e'); --- join test -SELECT COUNT(*) FROM guid1 g1 INNER JOIN guid2 g2 ON g1.guid_field = g2.guid_field; - count -------- - 3 -(1 row) - -SELECT COUNT(*) FROM guid1 g1 LEFT JOIN guid2 g2 ON g1.guid_field = g2.guid_field WHERE g2.guid_field IS NULL; - count -------- - 1 -(1 row) - --- generation test -TRUNCATE guid1; -INSERT INTO guid1 (guid_field) VALUES (gen_random_uuid()); -INSERT INTO guid1 (guid_field) VALUES (gen_random_uuid()); -SELECT count(DISTINCT guid_field) FROM guid1; - count -------- - 2 -(1 row) - --- clean up -DROP TABLE guid1, guid2 CASCADE; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/rangetypes.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/rangetypes.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/rangetypes.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/rangetypes.out 2023-02-20 19:43:54.999206266 -0500 @@ -1698,73 +1698,7 @@ create type cashrange as range (subtype = money); set enable_sort = off; -- try to make it pick a hash setop implementation select '(2,5)'::cashrange except select '(5,6)'::cashrange; - cashrange ---------------- - ($2.00,$5.00) -(1 row) - -reset enable_sort; --- --- OUT/INOUT/TABLE functions --- --- infer anyrange from anyrange -create function outparam_succeed(i anyrange, out r anyrange, out t text) - as $$ select $1, 'foo'::text $$ language sql; -select * from outparam_succeed(int4range(1,2)); - r | t --------+----- - [1,2) | foo -(1 row) - -create function outparam2_succeed(r anyrange, out lu anyarray, out ul anyarray) - as $$ select array[lower($1), upper($1)], array[upper($1), lower($1)] $$ - language sql; -select * from outparam2_succeed(int4range(1,11)); - lu | ul ---------+-------- - {1,11} | {11,1} -(1 row) - --- infer anyarray from anyrange -create function outparam_succeed2(i anyrange, out r anyarray, out t text) - as $$ select ARRAY[upper($1)], 'foo'::text $$ language sql; -select * from outparam_succeed2(int4range(int4range(1,2))); - r | t ------+----- - {2} | foo -(1 row) - --- infer anyelement from anyrange -create function inoutparam_succeed(out i anyelement, inout r anyrange) - as $$ select upper($1), $1 $$ language sql; -select * from inoutparam_succeed(int4range(1,2)); - i | r ----+------- - 2 | [1,2) -(1 row) - -create function table_succeed(r anyrange) - returns table(l anyelement, u anyelement) - as $$ select lower($1), upper($1) $$ - language sql; -select * from table_succeed(int4range(1,11)); - l | u ----+---- - 1 | 11 -(1 row) - --- should fail -create function outparam_fail(i anyelement, out r anyrange, out t text) - as $$ select '[1,10]', 'foo' $$ language sql; -ERROR: cannot determine result data type -DETAIL: A result of type anyrange requires at least one input of type anyrange or anymultirange. ---should fail -create function inoutparam_fail(inout i anyelement, out r anyrange) - as $$ select $1, '[1,10]' $$ language sql; -ERROR: cannot determine result data type -DETAIL: A result of type anyrange requires at least one input of type anyrange or anymultirange. ---should fail -create function table_fail(i anyelement) returns table(i anyelement, r anyrange) - as $$ select $1, '[1,10]' $$ language sql; -ERROR: cannot determine result data type -DETAIL: A result of type anyrange requires at least one input of type anyrange or anymultirange. +server closed the connection unexpectedly + This probably means the server terminated abnormally + before or while processing the request. +connection to server was lost diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/numerology.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/numerology.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/numerology.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/numerology.out 2023-02-20 19:44:01.659206552 -0500 @@ -10,23 +10,19 @@ CREATE TABLE TEMP_FLOAT (f1 FLOAT8); INSERT INTO TEMP_FLOAT (f1) SELECT float8(f1) FROM INT4_TBL; +ERROR: relation "int4_tbl" does not exist +LINE 2: SELECT float8(f1) FROM INT4_TBL; + ^ INSERT INTO TEMP_FLOAT (f1) SELECT float8(f1) FROM INT2_TBL; +ERROR: relation "int2_tbl" does not exist +LINE 2: SELECT float8(f1) FROM INT2_TBL; + ^ SELECT f1 FROM TEMP_FLOAT ORDER BY f1; - f1 -------------- - -2147483647 - -123456 - -32767 - -1234 - 0 - 0 - 1234 - 32767 - 123456 - 2147483647 -(10 rows) + f1 +---- +(0 rows) -- int4 CREATE TABLE TEMP_INT4 (f1 INT4); @@ -35,20 +31,18 @@ WHERE (f1 > -2147483647) AND (f1 < 2147483647); INSERT INTO TEMP_INT4 (f1) SELECT int4(f1) FROM INT2_TBL; +ERROR: relation "int2_tbl" does not exist +LINE 2: SELECT int4(f1) FROM INT2_TBL; + ^ SELECT f1 FROM TEMP_INT4 ORDER BY f1; - f1 --------- - -32767 - -1234 - -1004 - -35 - 0 - 0 - 0 - 1234 - 32767 -(9 rows) + f1 +------- + -1004 + -35 + 0 + 0 +(4 rows) -- int2 CREATE TABLE TEMP_INT2 (f1 INT2); @@ -58,6 +52,9 @@ INSERT INTO TEMP_INT2 (f1) SELECT int2(f1) FROM INT4_TBL WHERE (f1 >= -32767) AND (f1 <= 32767); +ERROR: relation "int4_tbl" does not exist +LINE 2: SELECT int2(f1) FROM INT4_TBL + ^ SELECT f1 FROM TEMP_INT2 ORDER BY f1; f1 @@ -66,8 +63,7 @@ -35 0 0 - 0 -(5 rows) +(4 rows) -- -- Group-by combinations @@ -76,25 +72,27 @@ INSERT INTO TEMP_GROUP SELECT 1, (- i.f1), (- f.f1) FROM INT4_TBL i, FLOAT8_TBL f; +ERROR: relation "int4_tbl" does not exist +LINE 3: FROM INT4_TBL i, FLOAT8_TBL f; + ^ INSERT INTO TEMP_GROUP SELECT 2, i.f1, f.f1 FROM INT4_TBL i, FLOAT8_TBL f; +ERROR: relation "int4_tbl" does not exist +LINE 3: FROM INT4_TBL i, FLOAT8_TBL f; + ^ SELECT DISTINCT f1 AS two FROM TEMP_GROUP ORDER BY 1; two ----- - 1 - 2 -(2 rows) +(0 rows) SELECT f1 AS two, max(f3) AS max_float, min(f3) as min_float FROM TEMP_GROUP GROUP BY f1 ORDER BY two, max_float, min_float; - two | max_float | min_float ------+----------------------+----------------------- - 1 | 1.2345678901234e+200 | -0 - 2 | 0 | -1.2345678901234e+200 -(2 rows) + two | max_float | min_float +-----+-----------+----------- +(0 rows) -- GROUP BY a result column name is not legal per SQL92, but we accept it -- anyway (if the name is not the name of any column exposed by FROM). @@ -102,21 +100,17 @@ FROM TEMP_GROUP GROUP BY two ORDER BY two, max_float, min_float; - two | max_float | min_float ------+----------------------+----------------------- - 1 | 1.2345678901234e+200 | -0 - 2 | 0 | -1.2345678901234e+200 -(2 rows) + two | max_float | min_float +-----+-----------+----------- +(0 rows) SELECT f1 AS two, (max(f3) + 1) AS max_plus_1, (min(f3) - 1) AS min_minus_1 FROM TEMP_GROUP GROUP BY f1 ORDER BY two, min_minus_1; - two | max_plus_1 | min_minus_1 ------+----------------------+----------------------- - 1 | 1.2345678901234e+200 | -1 - 2 | 1 | -1.2345678901234e+200 -(2 rows) + two | max_plus_1 | min_minus_1 +-----+------------+------------- +(0 rows) SELECT f1 AS two, max(f2) + min(f2) AS max_plus_min, @@ -124,11 +118,9 @@ FROM TEMP_GROUP GROUP BY f1 ORDER BY two, min_minus_1; - two | max_plus_min | min_minus_1 ------+--------------+----------------------- - 1 | 0 | -1 - 2 | 0 | -1.2345678901234e+200 -(2 rows) + two | max_plus_min | min_minus_1 +-----+--------------+------------- +(0 rows) DROP TABLE TEMP_INT2; DROP TABLE TEMP_INT4; diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/point.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/point.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/point.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/point.out 2023-02-20 19:44:15.849207160 -0500 @@ -163,313 +163,7 @@ SELECT p1.f1 AS point1, p2.f1 AS point2, p1.f1 <-> p2.f1 AS dist FROM POINT_TBL p1, POINT_TBL p2 ORDER BY dist, p1.f1[0], p2.f1[0]; - point1 | point2 | dist --------------------+-------------------+---------------------- - (-10,0) | (-10,0) | 0 - (-5,-12) | (-5,-12) | 0 - (-3,4) | (-3,4) | 0 - (0,0) | (0,0) | 0 - (1e-300,-1e-300) | (1e-300,-1e-300) | 0 - (5.1,34.5) | (5.1,34.5) | 0 - (10,10) | (10,10) | 0 - (0,0) | (1e-300,-1e-300) | 1.4142135623731e-300 - (1e-300,-1e-300) | (0,0) | 1.4142135623731e-300 - (-3,4) | (0,0) | 5 - (-3,4) | (1e-300,-1e-300) | 5 - (0,0) | (-3,4) | 5 - (1e-300,-1e-300) | (-3,4) | 5 - (-10,0) | (-3,4) | 8.06225774829855 - (-3,4) | (-10,0) | 8.06225774829855 - (-10,0) | (0,0) | 10 - (-10,0) | (1e-300,-1e-300) | 10 - (0,0) | (-10,0) | 10 - (1e-300,-1e-300) | (-10,0) | 10 - (-10,0) | (-5,-12) | 13 - (-5,-12) | (-10,0) | 13 - (-5,-12) | (0,0) | 13 - (-5,-12) | (1e-300,-1e-300) | 13 - (0,0) | (-5,-12) | 13 - (1e-300,-1e-300) | (-5,-12) | 13 - (0,0) | (10,10) | 14.142135623731 - (1e-300,-1e-300) | (10,10) | 14.142135623731 - (10,10) | (0,0) | 14.142135623731 - (10,10) | (1e-300,-1e-300) | 14.142135623731 - (-3,4) | (10,10) | 14.3178210632764 - (10,10) | (-3,4) | 14.3178210632764 - (-5,-12) | (-3,4) | 16.1245154965971 - (-3,4) | (-5,-12) | 16.1245154965971 - (-10,0) | (10,10) | 22.3606797749979 - (10,10) | (-10,0) | 22.3606797749979 - (5.1,34.5) | (10,10) | 24.9851956166046 - (10,10) | (5.1,34.5) | 24.9851956166046 - (-5,-12) | (10,10) | 26.6270539113887 - (10,10) | (-5,-12) | 26.6270539113887 - (-3,4) | (5.1,34.5) | 31.5572495632937 - (5.1,34.5) | (-3,4) | 31.5572495632937 - (0,0) | (5.1,34.5) | 34.8749193547455 - (1e-300,-1e-300) | (5.1,34.5) | 34.8749193547455 - (5.1,34.5) | (0,0) | 34.8749193547455 - (5.1,34.5) | (1e-300,-1e-300) | 34.8749193547455 - (-10,0) | (5.1,34.5) | 37.6597928831267 - (5.1,34.5) | (-10,0) | 37.6597928831267 - (-5,-12) | (5.1,34.5) | 47.5842410888311 - (5.1,34.5) | (-5,-12) | 47.5842410888311 - (-10,0) | (1e+300,Infinity) | Infinity - (-10,0) | (Infinity,1e+300) | Infinity - (-5,-12) | (1e+300,Infinity) | Infinity - (-5,-12) | (Infinity,1e+300) | Infinity - (-3,4) | (1e+300,Infinity) | Infinity - (-3,4) | (Infinity,1e+300) | Infinity - (0,0) | (1e+300,Infinity) | Infinity - (0,0) | (Infinity,1e+300) | Infinity - (1e-300,-1e-300) | (1e+300,Infinity) | Infinity - (1e-300,-1e-300) | (Infinity,1e+300) | Infinity - (5.1,34.5) | (1e+300,Infinity) | Infinity - (5.1,34.5) | (Infinity,1e+300) | Infinity - (10,10) | (1e+300,Infinity) | Infinity - (10,10) | (Infinity,1e+300) | Infinity - (1e+300,Infinity) | (-10,0) | Infinity - (1e+300,Infinity) | (-5,-12) | Infinity - (1e+300,Infinity) | (-3,4) | Infinity - (1e+300,Infinity) | (0,0) | Infinity - (1e+300,Infinity) | (1e-300,-1e-300) | Infinity - (1e+300,Infinity) | (5.1,34.5) | Infinity - (1e+300,Infinity) | (10,10) | Infinity - (1e+300,Infinity) | (Infinity,1e+300) | Infinity - (Infinity,1e+300) | (-10,0) | Infinity - (Infinity,1e+300) | (-5,-12) | Infinity - (Infinity,1e+300) | (-3,4) | Infinity - (Infinity,1e+300) | (0,0) | Infinity - (Infinity,1e+300) | (1e-300,-1e-300) | Infinity - (Infinity,1e+300) | (5.1,34.5) | Infinity - (Infinity,1e+300) | (10,10) | Infinity - (Infinity,1e+300) | (1e+300,Infinity) | Infinity - (-10,0) | (NaN,NaN) | NaN - (-5,-12) | (NaN,NaN) | NaN - (-3,4) | (NaN,NaN) | NaN - (0,0) | (NaN,NaN) | NaN - (1e-300,-1e-300) | (NaN,NaN) | NaN - (5.1,34.5) | (NaN,NaN) | NaN - (10,10) | (NaN,NaN) | NaN - (1e+300,Infinity) | (1e+300,Infinity) | NaN - (1e+300,Infinity) | (NaN,NaN) | NaN - (Infinity,1e+300) | (Infinity,1e+300) | NaN - (Infinity,1e+300) | (NaN,NaN) | NaN - (NaN,NaN) | (-10,0) | NaN - (NaN,NaN) | (-5,-12) | NaN - (NaN,NaN) | (-3,4) | NaN - (NaN,NaN) | (0,0) | NaN - (NaN,NaN) | (1e-300,-1e-300) | NaN - (NaN,NaN) | (5.1,34.5) | NaN - (NaN,NaN) | (10,10) | NaN - (NaN,NaN) | (1e+300,Infinity) | NaN - (NaN,NaN) | (Infinity,1e+300) | NaN - (NaN,NaN) | (NaN,NaN) | NaN -(100 rows) - -SELECT p1.f1 AS point1, p2.f1 AS point2 - FROM POINT_TBL p1, POINT_TBL p2 - WHERE (p1.f1 <-> p2.f1) > 3; - point1 | point2 --------------------+------------------- - (0,0) | (-10,0) - (0,0) | (-3,4) - (0,0) | (5.1,34.5) - (0,0) | (-5,-12) - (0,0) | (1e+300,Infinity) - (0,0) | (Infinity,1e+300) - (0,0) | (NaN,NaN) - (0,0) | (10,10) - (-10,0) | (0,0) - (-10,0) | (-3,4) - (-10,0) | (5.1,34.5) - (-10,0) | (-5,-12) - (-10,0) | (1e-300,-1e-300) - (-10,0) | (1e+300,Infinity) - (-10,0) | (Infinity,1e+300) - (-10,0) | (NaN,NaN) - (-10,0) | (10,10) - (-3,4) | (0,0) - (-3,4) | (-10,0) - (-3,4) | (5.1,34.5) - (-3,4) | (-5,-12) - (-3,4) | (1e-300,-1e-300) - (-3,4) | (1e+300,Infinity) - (-3,4) | (Infinity,1e+300) - (-3,4) | (NaN,NaN) - (-3,4) | (10,10) - (5.1,34.5) | (0,0) - (5.1,34.5) | (-10,0) - (5.1,34.5) | (-3,4) - (5.1,34.5) | (-5,-12) - (5.1,34.5) | (1e-300,-1e-300) - (5.1,34.5) | (1e+300,Infinity) - (5.1,34.5) | (Infinity,1e+300) - (5.1,34.5) | (NaN,NaN) - (5.1,34.5) | (10,10) - (-5,-12) | (0,0) - (-5,-12) | (-10,0) - (-5,-12) | (-3,4) - (-5,-12) | (5.1,34.5) - (-5,-12) | (1e-300,-1e-300) - (-5,-12) | (1e+300,Infinity) - (-5,-12) | (Infinity,1e+300) - (-5,-12) | (NaN,NaN) - (-5,-12) | (10,10) - (1e-300,-1e-300) | (-10,0) - (1e-300,-1e-300) | (-3,4) - (1e-300,-1e-300) | (5.1,34.5) - (1e-300,-1e-300) | (-5,-12) - (1e-300,-1e-300) | (1e+300,Infinity) - (1e-300,-1e-300) | (Infinity,1e+300) - (1e-300,-1e-300) | (NaN,NaN) - (1e-300,-1e-300) | (10,10) - (1e+300,Infinity) | (0,0) - (1e+300,Infinity) | (-10,0) - (1e+300,Infinity) | (-3,4) - (1e+300,Infinity) | (5.1,34.5) - (1e+300,Infinity) | (-5,-12) - (1e+300,Infinity) | (1e-300,-1e-300) - (1e+300,Infinity) | (1e+300,Infinity) - (1e+300,Infinity) | (Infinity,1e+300) - (1e+300,Infinity) | (NaN,NaN) - (1e+300,Infinity) | (10,10) - (Infinity,1e+300) | (0,0) - (Infinity,1e+300) | (-10,0) - (Infinity,1e+300) | (-3,4) - (Infinity,1e+300) | (5.1,34.5) - (Infinity,1e+300) | (-5,-12) - (Infinity,1e+300) | (1e-300,-1e-300) - (Infinity,1e+300) | (1e+300,Infinity) - (Infinity,1e+300) | (Infinity,1e+300) - (Infinity,1e+300) | (NaN,NaN) - (Infinity,1e+300) | (10,10) - (NaN,NaN) | (0,0) - (NaN,NaN) | (-10,0) - (NaN,NaN) | (-3,4) - (NaN,NaN) | (5.1,34.5) - (NaN,NaN) | (-5,-12) - (NaN,NaN) | (1e-300,-1e-300) - (NaN,NaN) | (1e+300,Infinity) - (NaN,NaN) | (Infinity,1e+300) - (NaN,NaN) | (NaN,NaN) - (NaN,NaN) | (10,10) - (10,10) | (0,0) - (10,10) | (-10,0) - (10,10) | (-3,4) - (10,10) | (5.1,34.5) - (10,10) | (-5,-12) - (10,10) | (1e-300,-1e-300) - (10,10) | (1e+300,Infinity) - (10,10) | (Infinity,1e+300) - (10,10) | (NaN,NaN) -(91 rows) - --- put distance result into output to allow sorting with GEQ optimizer - tgl 97/05/10 -SELECT p1.f1 AS point1, p2.f1 AS point2, (p1.f1 <-> p2.f1) AS distance - FROM POINT_TBL p1, POINT_TBL p2 - WHERE (p1.f1 <-> p2.f1) > 3 and p1.f1 << p2.f1 - ORDER BY distance, p1.f1[0], p2.f1[0]; - point1 | point2 | distance --------------------+-------------------+------------------ - (-3,4) | (0,0) | 5 - (-3,4) | (1e-300,-1e-300) | 5 - (-10,0) | (-3,4) | 8.06225774829855 - (-10,0) | (0,0) | 10 - (-10,0) | (1e-300,-1e-300) | 10 - (-10,0) | (-5,-12) | 13 - (-5,-12) | (0,0) | 13 - (-5,-12) | (1e-300,-1e-300) | 13 - (0,0) | (10,10) | 14.142135623731 - (1e-300,-1e-300) | (10,10) | 14.142135623731 - (-3,4) | (10,10) | 14.3178210632764 - (-5,-12) | (-3,4) | 16.1245154965971 - (-10,0) | (10,10) | 22.3606797749979 - (5.1,34.5) | (10,10) | 24.9851956166046 - (-5,-12) | (10,10) | 26.6270539113887 - (-3,4) | (5.1,34.5) | 31.5572495632937 - (0,0) | (5.1,34.5) | 34.8749193547455 - (1e-300,-1e-300) | (5.1,34.5) | 34.8749193547455 - (-10,0) | (5.1,34.5) | 37.6597928831267 - (-5,-12) | (5.1,34.5) | 47.5842410888311 - (-10,0) | (1e+300,Infinity) | Infinity - (-10,0) | (Infinity,1e+300) | Infinity - (-5,-12) | (1e+300,Infinity) | Infinity - (-5,-12) | (Infinity,1e+300) | Infinity - (-3,4) | (1e+300,Infinity) | Infinity - (-3,4) | (Infinity,1e+300) | Infinity - (0,0) | (1e+300,Infinity) | Infinity - (0,0) | (Infinity,1e+300) | Infinity - (1e-300,-1e-300) | (1e+300,Infinity) | Infinity - (1e-300,-1e-300) | (Infinity,1e+300) | Infinity - (5.1,34.5) | (1e+300,Infinity) | Infinity - (5.1,34.5) | (Infinity,1e+300) | Infinity - (10,10) | (1e+300,Infinity) | Infinity - (10,10) | (Infinity,1e+300) | Infinity - (1e+300,Infinity) | (Infinity,1e+300) | Infinity -(35 rows) - --- put distance result into output to allow sorting with GEQ optimizer - tgl 97/05/10 -SELECT p1.f1 AS point1, p2.f1 AS point2, (p1.f1 <-> p2.f1) AS distance - FROM POINT_TBL p1, POINT_TBL p2 - WHERE (p1.f1 <-> p2.f1) > 3 and p1.f1 << p2.f1 and p1.f1 |>> p2.f1 - ORDER BY distance; - point1 | point2 | distance --------------------+-------------------+------------------ - (-3,4) | (0,0) | 5 - (-3,4) | (1e-300,-1e-300) | 5 - (-10,0) | (-5,-12) | 13 - (5.1,34.5) | (10,10) | 24.9851956166046 - (1e+300,Infinity) | (Infinity,1e+300) | Infinity -(5 rows) - --- Test that GiST indexes provide same behavior as sequential scan -CREATE TEMP TABLE point_gist_tbl(f1 point); -INSERT INTO point_gist_tbl SELECT '(0,0)' FROM generate_series(0,1000); -CREATE INDEX point_gist_tbl_index ON point_gist_tbl USING gist (f1); -INSERT INTO point_gist_tbl VALUES ('(0.0000009,0.0000009)'); -SET enable_seqscan TO true; -SET enable_indexscan TO false; -SET enable_bitmapscan TO false; -SELECT COUNT(*) FROM point_gist_tbl WHERE f1 ~= '(0.0000009,0.0000009)'::point; - count -------- - 1002 -(1 row) - -SELECT COUNT(*) FROM point_gist_tbl WHERE f1 <@ '(0.0000009,0.0000009),(0.0000009,0.0000009)'::box; - count -------- - 1 -(1 row) - -SELECT COUNT(*) FROM point_gist_tbl WHERE f1 ~= '(0.0000018,0.0000018)'::point; - count -------- - 1 -(1 row) - -SET enable_seqscan TO false; -SET enable_indexscan TO true; -SET enable_bitmapscan TO true; -SELECT COUNT(*) FROM point_gist_tbl WHERE f1 ~= '(0.0000009,0.0000009)'::point; - count -------- - 1002 -(1 row) - -SELECT COUNT(*) FROM point_gist_tbl WHERE f1 <@ '(0.0000009,0.0000009),(0.0000009,0.0000009)'::box; - count -------- - 1 -(1 row) - -SELECT COUNT(*) FROM point_gist_tbl WHERE f1 ~= '(0.0000018,0.0000018)'::point; - count -------- - 1 -(1 row) - -RESET enable_seqscan; -RESET enable_indexscan; -RESET enable_bitmapscan; +server closed the connection unexpectedly + This probably means the server terminated abnormally + before or while processing the request. +connection to server was lost diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/box.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/box.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/box.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/box.out 2023-02-20 19:44:16.399207184 -0500 @@ -1,641 +1 @@ --- --- BOX --- --- --- box logic --- o --- 3 o--|X --- | o| --- 2 +-+-+ | --- | | | | --- 1 | o-+-o --- | | --- 0 +---+ --- --- 0 1 2 3 --- --- boxes are specified by two points, given by four floats x1,y1,x2,y2 -CREATE TABLE BOX_TBL (f1 box); -INSERT INTO BOX_TBL (f1) VALUES ('(2.0,2.0,0.0,0.0)'); -INSERT INTO BOX_TBL (f1) VALUES ('(1.0,1.0,3.0,3.0)'); -INSERT INTO BOX_TBL (f1) VALUES ('((-8, 2), (-2, -10))'); --- degenerate cases where the box is a line or a point --- note that lines and points boxes all have zero area -INSERT INTO BOX_TBL (f1) VALUES ('(2.5, 2.5, 2.5,3.5)'); -INSERT INTO BOX_TBL (f1) VALUES ('(3.0, 3.0,3.0,3.0)'); --- badly formatted box inputs -INSERT INTO BOX_TBL (f1) VALUES ('(2.3, 4.5)'); -ERROR: invalid input syntax for type box: "(2.3, 4.5)" -LINE 1: INSERT INTO BOX_TBL (f1) VALUES ('(2.3, 4.5)'); - ^ -INSERT INTO BOX_TBL (f1) VALUES ('[1, 2, 3, 4)'); -ERROR: invalid input syntax for type box: "[1, 2, 3, 4)" -LINE 1: INSERT INTO BOX_TBL (f1) VALUES ('[1, 2, 3, 4)'); - ^ -INSERT INTO BOX_TBL (f1) VALUES ('(1, 2, 3, 4]'); -ERROR: invalid input syntax for type box: "(1, 2, 3, 4]" -LINE 1: INSERT INTO BOX_TBL (f1) VALUES ('(1, 2, 3, 4]'); - ^ -INSERT INTO BOX_TBL (f1) VALUES ('(1, 2, 3, 4) x'); -ERROR: invalid input syntax for type box: "(1, 2, 3, 4) x" -LINE 1: INSERT INTO BOX_TBL (f1) VALUES ('(1, 2, 3, 4) x'); - ^ -INSERT INTO BOX_TBL (f1) VALUES ('asdfasdf(ad'); -ERROR: invalid input syntax for type box: "asdfasdf(ad" -LINE 1: INSERT INTO BOX_TBL (f1) VALUES ('asdfasdf(ad'); - ^ -SELECT * FROM BOX_TBL; - f1 ---------------------- - (2,2),(0,0) - (3,3),(1,1) - (-2,2),(-8,-10) - (2.5,3.5),(2.5,2.5) - (3,3),(3,3) -(5 rows) - -SELECT b.*, area(b.f1) as barea - FROM BOX_TBL b; - f1 | barea ----------------------+------- - (2,2),(0,0) | 4 - (3,3),(1,1) | 4 - (-2,2),(-8,-10) | 72 - (2.5,3.5),(2.5,2.5) | 0 - (3,3),(3,3) | 0 -(5 rows) - --- overlap -SELECT b.f1 - FROM BOX_TBL b - WHERE b.f1 && box '(2.5,2.5,1.0,1.0)'; - f1 ---------------------- - (2,2),(0,0) - (3,3),(1,1) - (2.5,3.5),(2.5,2.5) -(3 rows) - --- left-or-overlap (x only) -SELECT b1.* - FROM BOX_TBL b1 - WHERE b1.f1 &< box '(2.0,2.0,2.5,2.5)'; - f1 ---------------------- - (2,2),(0,0) - (-2,2),(-8,-10) - (2.5,3.5),(2.5,2.5) -(3 rows) - --- right-or-overlap (x only) -SELECT b1.* - FROM BOX_TBL b1 - WHERE b1.f1 &> box '(2.0,2.0,2.5,2.5)'; - f1 ---------------------- - (2.5,3.5),(2.5,2.5) - (3,3),(3,3) -(2 rows) - --- left of -SELECT b.f1 - FROM BOX_TBL b - WHERE b.f1 << box '(3.0,3.0,5.0,5.0)'; - f1 ---------------------- - (2,2),(0,0) - (-2,2),(-8,-10) - (2.5,3.5),(2.5,2.5) -(3 rows) - --- area <= -SELECT b.f1 - FROM BOX_TBL b - WHERE b.f1 <= box '(3.0,3.0,5.0,5.0)'; - f1 ---------------------- - (2,2),(0,0) - (3,3),(1,1) - (2.5,3.5),(2.5,2.5) - (3,3),(3,3) -(4 rows) - --- area < -SELECT b.f1 - FROM BOX_TBL b - WHERE b.f1 < box '(3.0,3.0,5.0,5.0)'; - f1 ---------------------- - (2.5,3.5),(2.5,2.5) - (3,3),(3,3) -(2 rows) - --- area = -SELECT b.f1 - FROM BOX_TBL b - WHERE b.f1 = box '(3.0,3.0,5.0,5.0)'; - f1 -------------- - (2,2),(0,0) - (3,3),(1,1) -(2 rows) - --- area > -SELECT b.f1 - FROM BOX_TBL b -- zero area - WHERE b.f1 > box '(3.5,3.0,4.5,3.0)'; - f1 ------------------ - (2,2),(0,0) - (3,3),(1,1) - (-2,2),(-8,-10) -(3 rows) - --- area >= -SELECT b.f1 - FROM BOX_TBL b -- zero area - WHERE b.f1 >= box '(3.5,3.0,4.5,3.0)'; - f1 ---------------------- - (2,2),(0,0) - (3,3),(1,1) - (-2,2),(-8,-10) - (2.5,3.5),(2.5,2.5) - (3,3),(3,3) -(5 rows) - --- right of -SELECT b.f1 - FROM BOX_TBL b - WHERE box '(3.0,3.0,5.0,5.0)' >> b.f1; - f1 ---------------------- - (2,2),(0,0) - (-2,2),(-8,-10) - (2.5,3.5),(2.5,2.5) -(3 rows) - --- contained in -SELECT b.f1 - FROM BOX_TBL b - WHERE b.f1 <@ box '(0,0,3,3)'; - f1 -------------- - (2,2),(0,0) - (3,3),(1,1) - (3,3),(3,3) -(3 rows) - --- contains -SELECT b.f1 - FROM BOX_TBL b - WHERE box '(0,0,3,3)' @> b.f1; - f1 -------------- - (2,2),(0,0) - (3,3),(1,1) - (3,3),(3,3) -(3 rows) - --- box equality -SELECT b.f1 - FROM BOX_TBL b - WHERE box '(1,1,3,3)' ~= b.f1; - f1 -------------- - (3,3),(1,1) -(1 row) - --- center of box, left unary operator -SELECT @@(b1.f1) AS p - FROM BOX_TBL b1; - p ---------- - (1,1) - (2,2) - (-5,-4) - (2.5,3) - (3,3) -(5 rows) - --- wholly-contained -SELECT b1.*, b2.* - FROM BOX_TBL b1, BOX_TBL b2 - WHERE b1.f1 @> b2.f1 and not b1.f1 ~= b2.f1; - f1 | f1 --------------+------------- - (3,3),(1,1) | (3,3),(3,3) -(1 row) - -SELECT height(f1), width(f1) FROM BOX_TBL; - height | width ---------+------- - 2 | 2 - 2 | 2 - 12 | 6 - 1 | 0 - 0 | 0 -(5 rows) - --- --- Test the SP-GiST index --- -CREATE TEMPORARY TABLE box_temp (f1 box); -INSERT INTO box_temp - SELECT box(point(i, i), point(i * 2, i * 2)) - FROM generate_series(1, 50) AS i; -CREATE INDEX box_spgist ON box_temp USING spgist (f1); -INSERT INTO box_temp - VALUES (NULL), - ('(0,0)(0,100)'), - ('(-3,4.3333333333)(40,1)'), - ('(0,100)(0,infinity)'), - ('(-infinity,0)(0,infinity)'), - ('(-infinity,-infinity)(infinity,infinity)'); -SET enable_seqscan = false; -SELECT * FROM box_temp WHERE f1 << '(10,20),(30,40)'; - f1 ----------------------------- - (2,2),(1,1) - (4,4),(2,2) - (6,6),(3,3) - (8,8),(4,4) - (0,100),(0,0) - (0,Infinity),(0,100) - (0,Infinity),(-Infinity,0) -(7 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM box_temp WHERE f1 << '(10,20),(30,40)'; - QUERY PLAN ----------------------------------------------- - Index Only Scan using box_spgist on box_temp - Index Cond: (f1 << '(30,40),(10,20)'::box) -(2 rows) - -SELECT * FROM box_temp WHERE f1 &< '(10,4.333334),(5,100)'; - f1 ----------------------------- - (2,2),(1,1) - (4,4),(2,2) - (6,6),(3,3) - (8,8),(4,4) - (10,10),(5,5) - (0,100),(0,0) - (0,Infinity),(0,100) - (0,Infinity),(-Infinity,0) -(8 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM box_temp WHERE f1 &< '(10,4.333334),(5,100)'; - QUERY PLAN ----------------------------------------------------- - Index Only Scan using box_spgist on box_temp - Index Cond: (f1 &< '(10,100),(5,4.333334)'::box) -(2 rows) - -SELECT * FROM box_temp WHERE f1 && '(15,20),(25,30)'; - f1 -------------------------------------------- - (20,20),(10,10) - (22,22),(11,11) - (24,24),(12,12) - (26,26),(13,13) - (28,28),(14,14) - (30,30),(15,15) - (32,32),(16,16) - (34,34),(17,17) - (36,36),(18,18) - (38,38),(19,19) - (40,40),(20,20) - (42,42),(21,21) - (44,44),(22,22) - (46,46),(23,23) - (48,48),(24,24) - (50,50),(25,25) - (Infinity,Infinity),(-Infinity,-Infinity) -(17 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM box_temp WHERE f1 && '(15,20),(25,30)'; - QUERY PLAN ----------------------------------------------- - Index Only Scan using box_spgist on box_temp - Index Cond: (f1 && '(25,30),(15,20)'::box) -(2 rows) - -SELECT * FROM box_temp WHERE f1 &> '(40,30),(45,50)'; - f1 -------------------- - (80,80),(40,40) - (82,82),(41,41) - (84,84),(42,42) - (86,86),(43,43) - (88,88),(44,44) - (90,90),(45,45) - (92,92),(46,46) - (94,94),(47,47) - (96,96),(48,48) - (98,98),(49,49) - (100,100),(50,50) -(11 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM box_temp WHERE f1 &> '(40,30),(45,50)'; - QUERY PLAN ----------------------------------------------- - Index Only Scan using box_spgist on box_temp - Index Cond: (f1 &> '(45,50),(40,30)'::box) -(2 rows) - -SELECT * FROM box_temp WHERE f1 >> '(30,40),(40,30)'; - f1 -------------------- - (82,82),(41,41) - (84,84),(42,42) - (86,86),(43,43) - (88,88),(44,44) - (90,90),(45,45) - (92,92),(46,46) - (94,94),(47,47) - (96,96),(48,48) - (98,98),(49,49) - (100,100),(50,50) -(10 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM box_temp WHERE f1 >> '(30,40),(40,30)'; - QUERY PLAN ----------------------------------------------- - Index Only Scan using box_spgist on box_temp - Index Cond: (f1 >> '(40,40),(30,30)'::box) -(2 rows) - -SELECT * FROM box_temp WHERE f1 <<| '(10,4.33334),(5,100)'; - f1 --------------------------- - (2,2),(1,1) - (4,4),(2,2) - (40,4.3333333333),(-3,1) -(3 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM box_temp WHERE f1 <<| '(10,4.33334),(5,100)'; - QUERY PLAN ----------------------------------------------------- - Index Only Scan using box_spgist on box_temp - Index Cond: (f1 <<| '(10,100),(5,4.33334)'::box) -(2 rows) - -SELECT * FROM box_temp WHERE f1 &<| '(10,4.3333334),(5,1)'; - f1 --------------------------- - (2,2),(1,1) - (4,4),(2,2) - (40,4.3333333333),(-3,1) -(3 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM box_temp WHERE f1 &<| '(10,4.3333334),(5,1)'; - QUERY PLAN ----------------------------------------------------- - Index Only Scan using box_spgist on box_temp - Index Cond: (f1 &<| '(10,4.3333334),(5,1)'::box) -(2 rows) - -SELECT * FROM box_temp WHERE f1 |&> '(49.99,49.99),(49.99,49.99)'; - f1 ----------------------- - (100,100),(50,50) - (0,Infinity),(0,100) -(2 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM box_temp WHERE f1 |&> '(49.99,49.99),(49.99,49.99)'; - QUERY PLAN ------------------------------------------------------------ - Index Only Scan using box_spgist on box_temp - Index Cond: (f1 |&> '(49.99,49.99),(49.99,49.99)'::box) -(2 rows) - -SELECT * FROM box_temp WHERE f1 |>> '(37,38),(39,40)'; - f1 ----------------------- - (82,82),(41,41) - (84,84),(42,42) - (86,86),(43,43) - (88,88),(44,44) - (90,90),(45,45) - (92,92),(46,46) - (94,94),(47,47) - (96,96),(48,48) - (98,98),(49,49) - (100,100),(50,50) - (0,Infinity),(0,100) -(11 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM box_temp WHERE f1 |>> '(37,38),(39,40)'; - QUERY PLAN ------------------------------------------------ - Index Only Scan using box_spgist on box_temp - Index Cond: (f1 |>> '(39,40),(37,38)'::box) -(2 rows) - -SELECT * FROM box_temp WHERE f1 @> '(10,11),(15,16)'; - f1 -------------------------------------------- - (16,16),(8,8) - (18,18),(9,9) - (20,20),(10,10) - (Infinity,Infinity),(-Infinity,-Infinity) -(4 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM box_temp WHERE f1 @> '(10,11),(15,15)'; - QUERY PLAN ----------------------------------------------- - Index Only Scan using box_spgist on box_temp - Index Cond: (f1 @> '(15,15),(10,11)'::box) -(2 rows) - -SELECT * FROM box_temp WHERE f1 <@ '(10,15),(30,35)'; - f1 ------------------ - (30,30),(15,15) -(1 row) - -EXPLAIN (COSTS OFF) SELECT * FROM box_temp WHERE f1 <@ '(10,15),(30,35)'; - QUERY PLAN ----------------------------------------------- - Index Only Scan using box_spgist on box_temp - Index Cond: (f1 <@ '(30,35),(10,15)'::box) -(2 rows) - -SELECT * FROM box_temp WHERE f1 ~= '(20,20),(40,40)'; - f1 ------------------ - (40,40),(20,20) -(1 row) - -EXPLAIN (COSTS OFF) SELECT * FROM box_temp WHERE f1 ~= '(20,20),(40,40)'; - QUERY PLAN ----------------------------------------------- - Index Only Scan using box_spgist on box_temp - Index Cond: (f1 ~= '(40,40),(20,20)'::box) -(2 rows) - -RESET enable_seqscan; -DROP INDEX box_spgist; --- --- Test the SP-GiST index on the larger volume of data --- -CREATE TABLE quad_box_tbl (id int, b box); -INSERT INTO quad_box_tbl - SELECT (x - 1) * 100 + y, box(point(x * 10, y * 10), point(x * 10 + 5, y * 10 + 5)) - FROM generate_series(1, 100) x, - generate_series(1, 100) y; --- insert repeating data to test allTheSame -INSERT INTO quad_box_tbl - SELECT i, '((200, 300),(210, 310))' - FROM generate_series(10001, 11000) AS i; -INSERT INTO quad_box_tbl -VALUES - (11001, NULL), - (11002, NULL), - (11003, '((-infinity,-infinity),(infinity,infinity))'), - (11004, '((-infinity,100),(-infinity,500))'), - (11005, '((-infinity,-infinity),(700,infinity))'); -CREATE INDEX quad_box_tbl_idx ON quad_box_tbl USING spgist(b); --- get reference results for ORDER BY distance from seq scan -SET enable_seqscan = ON; -SET enable_indexscan = OFF; -SET enable_bitmapscan = OFF; -CREATE TABLE quad_box_tbl_ord_seq1 AS -SELECT rank() OVER (ORDER BY b <-> point '123,456') n, b <-> point '123,456' dist, id -FROM quad_box_tbl; -CREATE TABLE quad_box_tbl_ord_seq2 AS -SELECT rank() OVER (ORDER BY b <-> point '123,456') n, b <-> point '123,456' dist, id -FROM quad_box_tbl WHERE b <@ box '((200,300),(500,600))'; -SET enable_seqscan = OFF; -SET enable_indexscan = ON; -SET enable_bitmapscan = ON; -SELECT count(*) FROM quad_box_tbl WHERE b << box '((100,200),(300,500))'; - count -------- - 901 -(1 row) - -SELECT count(*) FROM quad_box_tbl WHERE b &< box '((100,200),(300,500))'; - count -------- - 3901 -(1 row) - -SELECT count(*) FROM quad_box_tbl WHERE b && box '((100,200),(300,500))'; - count -------- - 1653 -(1 row) - -SELECT count(*) FROM quad_box_tbl WHERE b &> box '((100,200),(300,500))'; - count -------- - 10100 -(1 row) - -SELECT count(*) FROM quad_box_tbl WHERE b >> box '((100,200),(300,500))'; - count -------- - 7000 -(1 row) - -SELECT count(*) FROM quad_box_tbl WHERE b >> box '((100,200),(300,500))'; - count -------- - 7000 -(1 row) - -SELECT count(*) FROM quad_box_tbl WHERE b <<| box '((100,200),(300,500))'; - count -------- - 1900 -(1 row) - -SELECT count(*) FROM quad_box_tbl WHERE b &<| box '((100,200),(300,500))'; - count -------- - 5901 -(1 row) - -SELECT count(*) FROM quad_box_tbl WHERE b |&> box '((100,200),(300,500))'; - count -------- - 9100 -(1 row) - -SELECT count(*) FROM quad_box_tbl WHERE b |>> box '((100,200),(300,500))'; - count -------- - 5000 -(1 row) - -SELECT count(*) FROM quad_box_tbl WHERE b @> box '((201,301),(202,303))'; - count -------- - 1003 -(1 row) - -SELECT count(*) FROM quad_box_tbl WHERE b <@ box '((100,200),(300,500))'; - count -------- - 1600 -(1 row) - -SELECT count(*) FROM quad_box_tbl WHERE b ~= box '((200,300),(205,305))'; - count -------- - 1 -(1 row) - --- test ORDER BY distance -SET enable_indexscan = ON; -SET enable_bitmapscan = OFF; -EXPLAIN (COSTS OFF) -SELECT rank() OVER (ORDER BY b <-> point '123,456') n, b <-> point '123,456' dist, id -FROM quad_box_tbl; - QUERY PLAN ---------------------------------------------------------- - WindowAgg - -> Index Scan using quad_box_tbl_idx on quad_box_tbl - Order By: (b <-> '(123,456)'::point) -(3 rows) - -CREATE TEMP TABLE quad_box_tbl_ord_idx1 AS -SELECT rank() OVER (ORDER BY b <-> point '123,456') n, b <-> point '123,456' dist, id -FROM quad_box_tbl; -SELECT * -FROM quad_box_tbl_ord_seq1 seq FULL JOIN quad_box_tbl_ord_idx1 idx - ON seq.n = idx.n AND seq.id = idx.id AND - (seq.dist = idx.dist OR seq.dist IS NULL AND idx.dist IS NULL) -WHERE seq.id IS NULL OR idx.id IS NULL; - n | dist | id | n | dist | id ----+------+----+---+------+---- -(0 rows) - -EXPLAIN (COSTS OFF) -SELECT rank() OVER (ORDER BY b <-> point '123,456') n, b <-> point '123,456' dist, id -FROM quad_box_tbl WHERE b <@ box '((200,300),(500,600))'; - QUERY PLAN ---------------------------------------------------------- - WindowAgg - -> Index Scan using quad_box_tbl_idx on quad_box_tbl - Index Cond: (b <@ '(500,600),(200,300)'::box) - Order By: (b <-> '(123,456)'::point) -(4 rows) - -CREATE TEMP TABLE quad_box_tbl_ord_idx2 AS -SELECT rank() OVER (ORDER BY b <-> point '123,456') n, b <-> point '123,456' dist, id -FROM quad_box_tbl WHERE b <@ box '((200,300),(500,600))'; -SELECT * -FROM quad_box_tbl_ord_seq2 seq FULL JOIN quad_box_tbl_ord_idx2 idx - ON seq.n = idx.n AND seq.id = idx.id AND - (seq.dist = idx.dist OR seq.dist IS NULL AND idx.dist IS NULL) -WHERE seq.id IS NULL OR idx.id IS NULL; - n | dist | id | n | dist | id ----+------+----+---+------+---- -(0 rows) - -RESET enable_seqscan; -RESET enable_indexscan; -RESET enable_bitmapscan; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/path.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/path.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/path.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/path.out 2023-02-20 19:44:16.389207184 -0500 @@ -1,82 +1 @@ --- --- PATH --- ---DROP TABLE PATH_TBL; -CREATE TABLE PATH_TBL (f1 path); -INSERT INTO PATH_TBL VALUES ('[(1,2),(3,4)]'); -INSERT INTO PATH_TBL VALUES (' ( ( 1 , 2 ) , ( 3 , 4 ) ) '); -INSERT INTO PATH_TBL VALUES ('[ (0,0),(3,0),(4,5),(1,6) ]'); -INSERT INTO PATH_TBL VALUES ('((1,2) ,(3,4 ))'); -INSERT INTO PATH_TBL VALUES ('1,2 ,3,4 '); -INSERT INTO PATH_TBL VALUES (' [1,2,3, 4] '); -INSERT INTO PATH_TBL VALUES ('((10,20))'); -- Only one point -INSERT INTO PATH_TBL VALUES ('[ 11,12,13,14 ]'); -INSERT INTO PATH_TBL VALUES ('( 11,12,13,14) '); --- bad values for parser testing -INSERT INTO PATH_TBL VALUES ('[]'); -ERROR: invalid input syntax for type path: "[]" -LINE 1: INSERT INTO PATH_TBL VALUES ('[]'); - ^ -INSERT INTO PATH_TBL VALUES ('[(,2),(3,4)]'); -ERROR: invalid input syntax for type path: "[(,2),(3,4)]" -LINE 1: INSERT INTO PATH_TBL VALUES ('[(,2),(3,4)]'); - ^ -INSERT INTO PATH_TBL VALUES ('[(1,2),(3,4)'); -ERROR: invalid input syntax for type path: "[(1,2),(3,4)" -LINE 1: INSERT INTO PATH_TBL VALUES ('[(1,2),(3,4)'); - ^ -INSERT INTO PATH_TBL VALUES ('(1,2,3,4'); -ERROR: invalid input syntax for type path: "(1,2,3,4" -LINE 1: INSERT INTO PATH_TBL VALUES ('(1,2,3,4'); - ^ -INSERT INTO PATH_TBL VALUES ('(1,2),(3,4)]'); -ERROR: invalid input syntax for type path: "(1,2),(3,4)]" -LINE 1: INSERT INTO PATH_TBL VALUES ('(1,2),(3,4)]'); - ^ -SELECT f1 AS open_path FROM PATH_TBL WHERE isopen(f1); - open_path ---------------------------- - [(1,2),(3,4)] - [(0,0),(3,0),(4,5),(1,6)] - [(1,2),(3,4)] - [(11,12),(13,14)] -(4 rows) - -SELECT f1 AS closed_path FROM PATH_TBL WHERE isclosed(f1); - closed_path -------------------- - ((1,2),(3,4)) - ((1,2),(3,4)) - ((1,2),(3,4)) - ((10,20)) - ((11,12),(13,14)) -(5 rows) - -SELECT pclose(f1) AS closed_path FROM PATH_TBL; - closed_path ---------------------------- - ((1,2),(3,4)) - ((1,2),(3,4)) - ((0,0),(3,0),(4,5),(1,6)) - ((1,2),(3,4)) - ((1,2),(3,4)) - ((1,2),(3,4)) - ((10,20)) - ((11,12),(13,14)) - ((11,12),(13,14)) -(9 rows) - -SELECT popen(f1) AS open_path FROM PATH_TBL; - open_path ---------------------------- - [(1,2),(3,4)] - [(1,2),(3,4)] - [(0,0),(3,0),(4,5),(1,6)] - [(1,2),(3,4)] - [(1,2),(3,4)] - [(1,2),(3,4)] - [(10,20)] - [(11,12),(13,14)] - [(11,12),(13,14)] -(9 rows) - +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/polygon.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/polygon.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/polygon.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/polygon.out 2023-02-20 19:44:16.429207185 -0500 @@ -1,308 +1 @@ --- --- POLYGON --- --- polygon logic --- -CREATE TABLE POLYGON_TBL(f1 polygon); -INSERT INTO POLYGON_TBL(f1) VALUES ('(2.0,0.0),(2.0,4.0),(0.0,0.0)'); -INSERT INTO POLYGON_TBL(f1) VALUES ('(3.0,1.0),(3.0,3.0),(1.0,0.0)'); -INSERT INTO POLYGON_TBL(f1) VALUES ('(1,2),(3,4),(5,6),(7,8)'); -INSERT INTO POLYGON_TBL(f1) VALUES ('(7,8),(5,6),(3,4),(1,2)'); -- Reverse -INSERT INTO POLYGON_TBL(f1) VALUES ('(1,2),(7,8),(5,6),(3,-4)'); --- degenerate polygons -INSERT INTO POLYGON_TBL(f1) VALUES ('(0.0,0.0)'); -INSERT INTO POLYGON_TBL(f1) VALUES ('(0.0,1.0),(0.0,1.0)'); --- bad polygon input strings -INSERT INTO POLYGON_TBL(f1) VALUES ('0.0'); -ERROR: invalid input syntax for type polygon: "0.0" -LINE 1: INSERT INTO POLYGON_TBL(f1) VALUES ('0.0'); - ^ -INSERT INTO POLYGON_TBL(f1) VALUES ('(0.0 0.0'); -ERROR: invalid input syntax for type polygon: "(0.0 0.0" -LINE 1: INSERT INTO POLYGON_TBL(f1) VALUES ('(0.0 0.0'); - ^ -INSERT INTO POLYGON_TBL(f1) VALUES ('(0,1,2)'); -ERROR: invalid input syntax for type polygon: "(0,1,2)" -LINE 1: INSERT INTO POLYGON_TBL(f1) VALUES ('(0,1,2)'); - ^ -INSERT INTO POLYGON_TBL(f1) VALUES ('(0,1,2,3'); -ERROR: invalid input syntax for type polygon: "(0,1,2,3" -LINE 1: INSERT INTO POLYGON_TBL(f1) VALUES ('(0,1,2,3'); - ^ -INSERT INTO POLYGON_TBL(f1) VALUES ('asdf'); -ERROR: invalid input syntax for type polygon: "asdf" -LINE 1: INSERT INTO POLYGON_TBL(f1) VALUES ('asdf'); - ^ -SELECT * FROM POLYGON_TBL; - f1 ----------------------------- - ((2,0),(2,4),(0,0)) - ((3,1),(3,3),(1,0)) - ((1,2),(3,4),(5,6),(7,8)) - ((7,8),(5,6),(3,4),(1,2)) - ((1,2),(7,8),(5,6),(3,-4)) - ((0,0)) - ((0,1),(0,1)) -(7 rows) - --- --- Test the SP-GiST index --- -CREATE TABLE quad_poly_tbl (id int, p polygon); -INSERT INTO quad_poly_tbl - SELECT (x - 1) * 100 + y, polygon(circle(point(x * 10, y * 10), 1 + (x + y) % 10)) - FROM generate_series(1, 100) x, - generate_series(1, 100) y; -INSERT INTO quad_poly_tbl - SELECT i, polygon '((200, 300),(210, 310),(230, 290))' - FROM generate_series(10001, 11000) AS i; -INSERT INTO quad_poly_tbl - VALUES - (11001, NULL), - (11002, NULL), - (11003, NULL); -CREATE INDEX quad_poly_tbl_idx ON quad_poly_tbl USING spgist(p); --- get reference results for ORDER BY distance from seq scan -SET enable_seqscan = ON; -SET enable_indexscan = OFF; -SET enable_bitmapscan = OFF; -CREATE TEMP TABLE quad_poly_tbl_ord_seq2 AS -SELECT rank() OVER (ORDER BY p <-> point '123,456') n, p <-> point '123,456' dist, id -FROM quad_poly_tbl WHERE p <@ polygon '((300,300),(400,600),(600,500),(700,200))'; --- check results from index scan -SET enable_seqscan = OFF; -SET enable_indexscan = OFF; -SET enable_bitmapscan = ON; -EXPLAIN (COSTS OFF) -SELECT count(*) FROM quad_poly_tbl WHERE p << polygon '((300,300),(400,600),(600,500),(700,200))'; - QUERY PLAN ---------------------------------------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on quad_poly_tbl - Recheck Cond: (p << '((300,300),(400,600),(600,500),(700,200))'::polygon) - -> Bitmap Index Scan on quad_poly_tbl_idx - Index Cond: (p << '((300,300),(400,600),(600,500),(700,200))'::polygon) -(5 rows) - -SELECT count(*) FROM quad_poly_tbl WHERE p << polygon '((300,300),(400,600),(600,500),(700,200))'; - count -------- - 3890 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM quad_poly_tbl WHERE p &< polygon '((300,300),(400,600),(600,500),(700,200))'; - QUERY PLAN ---------------------------------------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on quad_poly_tbl - Recheck Cond: (p &< '((300,300),(400,600),(600,500),(700,200))'::polygon) - -> Bitmap Index Scan on quad_poly_tbl_idx - Index Cond: (p &< '((300,300),(400,600),(600,500),(700,200))'::polygon) -(5 rows) - -SELECT count(*) FROM quad_poly_tbl WHERE p &< polygon '((300,300),(400,600),(600,500),(700,200))'; - count -------- - 7900 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM quad_poly_tbl WHERE p && polygon '((300,300),(400,600),(600,500),(700,200))'; - QUERY PLAN ---------------------------------------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on quad_poly_tbl - Recheck Cond: (p && '((300,300),(400,600),(600,500),(700,200))'::polygon) - -> Bitmap Index Scan on quad_poly_tbl_idx - Index Cond: (p && '((300,300),(400,600),(600,500),(700,200))'::polygon) -(5 rows) - -SELECT count(*) FROM quad_poly_tbl WHERE p && polygon '((300,300),(400,600),(600,500),(700,200))'; - count -------- - 977 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM quad_poly_tbl WHERE p &> polygon '((300,300),(400,600),(600,500),(700,200))'; - QUERY PLAN ---------------------------------------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on quad_poly_tbl - Recheck Cond: (p &> '((300,300),(400,600),(600,500),(700,200))'::polygon) - -> Bitmap Index Scan on quad_poly_tbl_idx - Index Cond: (p &> '((300,300),(400,600),(600,500),(700,200))'::polygon) -(5 rows) - -SELECT count(*) FROM quad_poly_tbl WHERE p &> polygon '((300,300),(400,600),(600,500),(700,200))'; - count -------- - 7000 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM quad_poly_tbl WHERE p >> polygon '((300,300),(400,600),(600,500),(700,200))'; - QUERY PLAN ---------------------------------------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on quad_poly_tbl - Recheck Cond: (p >> '((300,300),(400,600),(600,500),(700,200))'::polygon) - -> Bitmap Index Scan on quad_poly_tbl_idx - Index Cond: (p >> '((300,300),(400,600),(600,500),(700,200))'::polygon) -(5 rows) - -SELECT count(*) FROM quad_poly_tbl WHERE p >> polygon '((300,300),(400,600),(600,500),(700,200))'; - count -------- - 2990 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM quad_poly_tbl WHERE p <<| polygon '((300,300),(400,600),(600,500),(700,200))'; - QUERY PLAN ----------------------------------------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on quad_poly_tbl - Recheck Cond: (p <<| '((300,300),(400,600),(600,500),(700,200))'::polygon) - -> Bitmap Index Scan on quad_poly_tbl_idx - Index Cond: (p <<| '((300,300),(400,600),(600,500),(700,200))'::polygon) -(5 rows) - -SELECT count(*) FROM quad_poly_tbl WHERE p <<| polygon '((300,300),(400,600),(600,500),(700,200))'; - count -------- - 1890 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM quad_poly_tbl WHERE p &<| polygon '((300,300),(400,600),(600,500),(700,200))'; - QUERY PLAN ----------------------------------------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on quad_poly_tbl - Recheck Cond: (p &<| '((300,300),(400,600),(600,500),(700,200))'::polygon) - -> Bitmap Index Scan on quad_poly_tbl_idx - Index Cond: (p &<| '((300,300),(400,600),(600,500),(700,200))'::polygon) -(5 rows) - -SELECT count(*) FROM quad_poly_tbl WHERE p &<| polygon '((300,300),(400,600),(600,500),(700,200))'; - count -------- - 6900 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM quad_poly_tbl WHERE p |&> polygon '((300,300),(400,600),(600,500),(700,200))'; - QUERY PLAN ----------------------------------------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on quad_poly_tbl - Recheck Cond: (p |&> '((300,300),(400,600),(600,500),(700,200))'::polygon) - -> Bitmap Index Scan on quad_poly_tbl_idx - Index Cond: (p |&> '((300,300),(400,600),(600,500),(700,200))'::polygon) -(5 rows) - -SELECT count(*) FROM quad_poly_tbl WHERE p |&> polygon '((300,300),(400,600),(600,500),(700,200))'; - count -------- - 9000 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM quad_poly_tbl WHERE p |>> polygon '((300,300),(400,600),(600,500),(700,200))'; - QUERY PLAN ----------------------------------------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on quad_poly_tbl - Recheck Cond: (p |>> '((300,300),(400,600),(600,500),(700,200))'::polygon) - -> Bitmap Index Scan on quad_poly_tbl_idx - Index Cond: (p |>> '((300,300),(400,600),(600,500),(700,200))'::polygon) -(5 rows) - -SELECT count(*) FROM quad_poly_tbl WHERE p |>> polygon '((300,300),(400,600),(600,500),(700,200))'; - count -------- - 3990 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM quad_poly_tbl WHERE p <@ polygon '((300,300),(400,600),(600,500),(700,200))'; - QUERY PLAN ---------------------------------------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on quad_poly_tbl - Recheck Cond: (p <@ '((300,300),(400,600),(600,500),(700,200))'::polygon) - -> Bitmap Index Scan on quad_poly_tbl_idx - Index Cond: (p <@ '((300,300),(400,600),(600,500),(700,200))'::polygon) -(5 rows) - -SELECT count(*) FROM quad_poly_tbl WHERE p <@ polygon '((300,300),(400,600),(600,500),(700,200))'; - count -------- - 831 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM quad_poly_tbl WHERE p @> polygon '((340,550),(343,552),(341,553))'; - QUERY PLAN ------------------------------------------------------------------------------ - Aggregate - -> Bitmap Heap Scan on quad_poly_tbl - Recheck Cond: (p @> '((340,550),(343,552),(341,553))'::polygon) - -> Bitmap Index Scan on quad_poly_tbl_idx - Index Cond: (p @> '((340,550),(343,552),(341,553))'::polygon) -(5 rows) - -SELECT count(*) FROM quad_poly_tbl WHERE p @> polygon '((340,550),(343,552),(341,553))'; - count -------- - 1 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM quad_poly_tbl WHERE p ~= polygon '((200, 300),(210, 310),(230, 290))'; - QUERY PLAN ------------------------------------------------------------------------------ - Aggregate - -> Bitmap Heap Scan on quad_poly_tbl - Recheck Cond: (p ~= '((200,300),(210,310),(230,290))'::polygon) - -> Bitmap Index Scan on quad_poly_tbl_idx - Index Cond: (p ~= '((200,300),(210,310),(230,290))'::polygon) -(5 rows) - -SELECT count(*) FROM quad_poly_tbl WHERE p ~= polygon '((200, 300),(210, 310),(230, 290))'; - count -------- - 1000 -(1 row) - --- test ORDER BY distance -SET enable_indexscan = ON; -SET enable_bitmapscan = OFF; -EXPLAIN (COSTS OFF) -SELECT rank() OVER (ORDER BY p <-> point '123,456') n, p <-> point '123,456' dist, id -FROM quad_poly_tbl WHERE p <@ polygon '((300,300),(400,600),(600,500),(700,200))'; - QUERY PLAN ---------------------------------------------------------------------------------- - WindowAgg - -> Index Scan using quad_poly_tbl_idx on quad_poly_tbl - Index Cond: (p <@ '((300,300),(400,600),(600,500),(700,200))'::polygon) - Order By: (p <-> '(123,456)'::point) -(4 rows) - -CREATE TEMP TABLE quad_poly_tbl_ord_idx2 AS -SELECT rank() OVER (ORDER BY p <-> point '123,456') n, p <-> point '123,456' dist, id -FROM quad_poly_tbl WHERE p <@ polygon '((300,300),(400,600),(600,500),(700,200))'; -SELECT * -FROM quad_poly_tbl_ord_seq2 seq FULL JOIN quad_poly_tbl_ord_idx2 idx - ON seq.n = idx.n AND seq.id = idx.id AND - (seq.dist = idx.dist OR seq.dist IS NULL AND idx.dist IS NULL) -WHERE seq.id IS NULL OR idx.id IS NULL; - n | dist | id | n | dist | id ----+------+----+---+------+---- -(0 rows) - -RESET enable_seqscan; -RESET enable_indexscan; -RESET enable_bitmapscan; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/circle.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/circle.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/circle.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/circle.out 2023-02-20 19:44:16.419207185 -0500 @@ -1,125 +1 @@ --- --- CIRCLE --- --- Back off displayed precision a little bit to reduce platform-to-platform --- variation in results. -SET extra_float_digits = -1; -CREATE TABLE CIRCLE_TBL (f1 circle); -INSERT INTO CIRCLE_TBL VALUES ('<(5,1),3>'); -INSERT INTO CIRCLE_TBL VALUES ('((1,2),100)'); -INSERT INTO CIRCLE_TBL VALUES (' 1 , 3 , 5 '); -INSERT INTO CIRCLE_TBL VALUES (' ( ( 1 , 2 ) , 3 ) '); -INSERT INTO CIRCLE_TBL VALUES (' ( 100 , 200 ) , 10 '); -INSERT INTO CIRCLE_TBL VALUES (' < ( 100 , 1 ) , 115 > '); -INSERT INTO CIRCLE_TBL VALUES ('<(3,5),0>'); -- Zero radius -INSERT INTO CIRCLE_TBL VALUES ('<(3,5),NaN>'); -- NaN radius --- bad values -INSERT INTO CIRCLE_TBL VALUES ('<(-100,0),-100>'); -ERROR: invalid input syntax for type circle: "<(-100,0),-100>" -LINE 1: INSERT INTO CIRCLE_TBL VALUES ('<(-100,0),-100>'); - ^ -INSERT INTO CIRCLE_TBL VALUES ('<(100,200),10'); -ERROR: invalid input syntax for type circle: "<(100,200),10" -LINE 1: INSERT INTO CIRCLE_TBL VALUES ('<(100,200),10'); - ^ -INSERT INTO CIRCLE_TBL VALUES ('<(100,200),10> x'); -ERROR: invalid input syntax for type circle: "<(100,200),10> x" -LINE 1: INSERT INTO CIRCLE_TBL VALUES ('<(100,200),10> x'); - ^ -INSERT INTO CIRCLE_TBL VALUES ('1abc,3,5'); -ERROR: invalid input syntax for type circle: "1abc,3,5" -LINE 1: INSERT INTO CIRCLE_TBL VALUES ('1abc,3,5'); - ^ -INSERT INTO CIRCLE_TBL VALUES ('(3,(1,2),3)'); -ERROR: invalid input syntax for type circle: "(3,(1,2),3)" -LINE 1: INSERT INTO CIRCLE_TBL VALUES ('(3,(1,2),3)'); - ^ -SELECT * FROM CIRCLE_TBL; - f1 ----------------- - <(5,1),3> - <(1,2),100> - <(1,3),5> - <(1,2),3> - <(100,200),10> - <(100,1),115> - <(3,5),0> - <(3,5),NaN> -(8 rows) - -SELECT center(f1) AS center - FROM CIRCLE_TBL; - center ------------ - (5,1) - (1,2) - (1,3) - (1,2) - (100,200) - (100,1) - (3,5) - (3,5) -(8 rows) - -SELECT radius(f1) AS radius - FROM CIRCLE_TBL; - radius --------- - 3 - 100 - 5 - 3 - 10 - 115 - 0 - NaN -(8 rows) - -SELECT diameter(f1) AS diameter - FROM CIRCLE_TBL; - diameter ----------- - 6 - 200 - 10 - 6 - 20 - 230 - 0 - NaN -(8 rows) - -SELECT f1 FROM CIRCLE_TBL WHERE radius(f1) < 5; - f1 ------------ - <(5,1),3> - <(1,2),3> - <(3,5),0> -(3 rows) - -SELECT f1 FROM CIRCLE_TBL WHERE diameter(f1) >= 10; - f1 ----------------- - <(1,2),100> - <(1,3),5> - <(100,200),10> - <(100,1),115> - <(3,5),NaN> -(5 rows) - -SELECT c1.f1 AS one, c2.f1 AS two, (c1.f1 <-> c2.f1) AS distance - FROM CIRCLE_TBL c1, CIRCLE_TBL c2 - WHERE (c1.f1 < c2.f1) AND ((c1.f1 <-> c2.f1) > 0) - ORDER BY distance, area(c1.f1), area(c2.f1); - one | two | distance -----------------+----------------+------------------ - <(3,5),0> | <(1,2),3> | 0.60555127546399 - <(3,5),0> | <(5,1),3> | 1.4721359549996 - <(100,200),10> | <(100,1),115> | 74 - <(100,200),10> | <(1,2),100> | 111.37072977248 - <(1,3),5> | <(100,200),10> | 205.4767561445 - <(5,1),3> | <(100,200),10> | 207.51303816328 - <(3,5),0> | <(100,200),10> | 207.79348015953 - <(1,2),3> | <(100,200),10> | 208.37072977248 -(8 rows) - +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/date.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/date.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/date.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/date.out 2023-02-20 19:44:16.429207185 -0500 @@ -1,1497 +1 @@ --- --- DATE --- -CREATE TABLE DATE_TBL (f1 date); -INSERT INTO DATE_TBL VALUES ('1957-04-09'); -INSERT INTO DATE_TBL VALUES ('1957-06-13'); -INSERT INTO DATE_TBL VALUES ('1996-02-28'); -INSERT INTO DATE_TBL VALUES ('1996-02-29'); -INSERT INTO DATE_TBL VALUES ('1996-03-01'); -INSERT INTO DATE_TBL VALUES ('1996-03-02'); -INSERT INTO DATE_TBL VALUES ('1997-02-28'); -INSERT INTO DATE_TBL VALUES ('1997-02-29'); -ERROR: date/time field value out of range: "1997-02-29" -LINE 1: INSERT INTO DATE_TBL VALUES ('1997-02-29'); - ^ -INSERT INTO DATE_TBL VALUES ('1997-03-01'); -INSERT INTO DATE_TBL VALUES ('1997-03-02'); -INSERT INTO DATE_TBL VALUES ('2000-04-01'); -INSERT INTO DATE_TBL VALUES ('2000-04-02'); -INSERT INTO DATE_TBL VALUES ('2000-04-03'); -INSERT INTO DATE_TBL VALUES ('2038-04-08'); -INSERT INTO DATE_TBL VALUES ('2039-04-09'); -INSERT INTO DATE_TBL VALUES ('2040-04-10'); -INSERT INTO DATE_TBL VALUES ('2040-04-10 BC'); -SELECT f1 FROM DATE_TBL; - f1 ---------------- - 04-09-1957 - 06-13-1957 - 02-28-1996 - 02-29-1996 - 03-01-1996 - 03-02-1996 - 02-28-1997 - 03-01-1997 - 03-02-1997 - 04-01-2000 - 04-02-2000 - 04-03-2000 - 04-08-2038 - 04-09-2039 - 04-10-2040 - 04-10-2040 BC -(16 rows) - -SELECT f1 FROM DATE_TBL WHERE f1 < '2000-01-01'; - f1 ---------------- - 04-09-1957 - 06-13-1957 - 02-28-1996 - 02-29-1996 - 03-01-1996 - 03-02-1996 - 02-28-1997 - 03-01-1997 - 03-02-1997 - 04-10-2040 BC -(10 rows) - -SELECT f1 FROM DATE_TBL - WHERE f1 BETWEEN '2000-01-01' AND '2001-01-01'; - f1 ------------- - 04-01-2000 - 04-02-2000 - 04-03-2000 -(3 rows) - --- --- Check all the documented input formats --- -SET datestyle TO iso; -- display results in ISO -SET datestyle TO ymd; -SELECT date 'January 8, 1999'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '1999-01-08'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '1999-01-18'; - date ------------- - 1999-01-18 -(1 row) - -SELECT date '1/8/1999'; -ERROR: date/time field value out of range: "1/8/1999" -LINE 1: SELECT date '1/8/1999'; - ^ -HINT: Perhaps you need a different "datestyle" setting. -SELECT date '1/18/1999'; -ERROR: date/time field value out of range: "1/18/1999" -LINE 1: SELECT date '1/18/1999'; - ^ -HINT: Perhaps you need a different "datestyle" setting. -SELECT date '18/1/1999'; -ERROR: date/time field value out of range: "18/1/1999" -LINE 1: SELECT date '18/1/1999'; - ^ -HINT: Perhaps you need a different "datestyle" setting. -SELECT date '01/02/03'; - date ------------- - 2001-02-03 -(1 row) - -SELECT date '19990108'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '990108'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '1999.008'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date 'J2451187'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date 'January 8, 99 BC'; -ERROR: date/time field value out of range: "January 8, 99 BC" -LINE 1: SELECT date 'January 8, 99 BC'; - ^ -HINT: Perhaps you need a different "datestyle" setting. -SELECT date '99-Jan-08'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '1999-Jan-08'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '08-Jan-99'; -ERROR: date/time field value out of range: "08-Jan-99" -LINE 1: SELECT date '08-Jan-99'; - ^ -HINT: Perhaps you need a different "datestyle" setting. -SELECT date '08-Jan-1999'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date 'Jan-08-99'; -ERROR: date/time field value out of range: "Jan-08-99" -LINE 1: SELECT date 'Jan-08-99'; - ^ -HINT: Perhaps you need a different "datestyle" setting. -SELECT date 'Jan-08-1999'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '99-08-Jan'; -ERROR: invalid input syntax for type date: "99-08-Jan" -LINE 1: SELECT date '99-08-Jan'; - ^ -SELECT date '1999-08-Jan'; -ERROR: invalid input syntax for type date: "1999-08-Jan" -LINE 1: SELECT date '1999-08-Jan'; - ^ -SELECT date '99 Jan 08'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '1999 Jan 08'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '08 Jan 99'; -ERROR: date/time field value out of range: "08 Jan 99" -LINE 1: SELECT date '08 Jan 99'; - ^ -HINT: Perhaps you need a different "datestyle" setting. -SELECT date '08 Jan 1999'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date 'Jan 08 99'; -ERROR: date/time field value out of range: "Jan 08 99" -LINE 1: SELECT date 'Jan 08 99'; - ^ -HINT: Perhaps you need a different "datestyle" setting. -SELECT date 'Jan 08 1999'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '99 08 Jan'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '1999 08 Jan'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '99-01-08'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '1999-01-08'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '08-01-99'; -ERROR: date/time field value out of range: "08-01-99" -LINE 1: SELECT date '08-01-99'; - ^ -HINT: Perhaps you need a different "datestyle" setting. -SELECT date '08-01-1999'; -ERROR: date/time field value out of range: "08-01-1999" -LINE 1: SELECT date '08-01-1999'; - ^ -HINT: Perhaps you need a different "datestyle" setting. -SELECT date '01-08-99'; -ERROR: date/time field value out of range: "01-08-99" -LINE 1: SELECT date '01-08-99'; - ^ -HINT: Perhaps you need a different "datestyle" setting. -SELECT date '01-08-1999'; -ERROR: date/time field value out of range: "01-08-1999" -LINE 1: SELECT date '01-08-1999'; - ^ -HINT: Perhaps you need a different "datestyle" setting. -SELECT date '99-08-01'; - date ------------- - 1999-08-01 -(1 row) - -SELECT date '1999-08-01'; - date ------------- - 1999-08-01 -(1 row) - -SELECT date '99 01 08'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '1999 01 08'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '08 01 99'; -ERROR: date/time field value out of range: "08 01 99" -LINE 1: SELECT date '08 01 99'; - ^ -HINT: Perhaps you need a different "datestyle" setting. -SELECT date '08 01 1999'; -ERROR: date/time field value out of range: "08 01 1999" -LINE 1: SELECT date '08 01 1999'; - ^ -HINT: Perhaps you need a different "datestyle" setting. -SELECT date '01 08 99'; -ERROR: date/time field value out of range: "01 08 99" -LINE 1: SELECT date '01 08 99'; - ^ -HINT: Perhaps you need a different "datestyle" setting. -SELECT date '01 08 1999'; -ERROR: date/time field value out of range: "01 08 1999" -LINE 1: SELECT date '01 08 1999'; - ^ -HINT: Perhaps you need a different "datestyle" setting. -SELECT date '99 08 01'; - date ------------- - 1999-08-01 -(1 row) - -SELECT date '1999 08 01'; - date ------------- - 1999-08-01 -(1 row) - -SET datestyle TO dmy; -SELECT date 'January 8, 1999'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '1999-01-08'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '1999-01-18'; - date ------------- - 1999-01-18 -(1 row) - -SELECT date '1/8/1999'; - date ------------- - 1999-08-01 -(1 row) - -SELECT date '1/18/1999'; -ERROR: date/time field value out of range: "1/18/1999" -LINE 1: SELECT date '1/18/1999'; - ^ -HINT: Perhaps you need a different "datestyle" setting. -SELECT date '18/1/1999'; - date ------------- - 1999-01-18 -(1 row) - -SELECT date '01/02/03'; - date ------------- - 2003-02-01 -(1 row) - -SELECT date '19990108'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '990108'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '1999.008'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date 'J2451187'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date 'January 8, 99 BC'; - date ---------------- - 0099-01-08 BC -(1 row) - -SELECT date '99-Jan-08'; -ERROR: date/time field value out of range: "99-Jan-08" -LINE 1: SELECT date '99-Jan-08'; - ^ -HINT: Perhaps you need a different "datestyle" setting. -SELECT date '1999-Jan-08'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '08-Jan-99'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '08-Jan-1999'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date 'Jan-08-99'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date 'Jan-08-1999'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '99-08-Jan'; -ERROR: invalid input syntax for type date: "99-08-Jan" -LINE 1: SELECT date '99-08-Jan'; - ^ -SELECT date '1999-08-Jan'; -ERROR: invalid input syntax for type date: "1999-08-Jan" -LINE 1: SELECT date '1999-08-Jan'; - ^ -SELECT date '99 Jan 08'; -ERROR: date/time field value out of range: "99 Jan 08" -LINE 1: SELECT date '99 Jan 08'; - ^ -HINT: Perhaps you need a different "datestyle" setting. -SELECT date '1999 Jan 08'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '08 Jan 99'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '08 Jan 1999'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date 'Jan 08 99'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date 'Jan 08 1999'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '99 08 Jan'; -ERROR: invalid input syntax for type date: "99 08 Jan" -LINE 1: SELECT date '99 08 Jan'; - ^ -SELECT date '1999 08 Jan'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '99-01-08'; -ERROR: date/time field value out of range: "99-01-08" -LINE 1: SELECT date '99-01-08'; - ^ -HINT: Perhaps you need a different "datestyle" setting. -SELECT date '1999-01-08'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '08-01-99'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '08-01-1999'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '01-08-99'; - date ------------- - 1999-08-01 -(1 row) - -SELECT date '01-08-1999'; - date ------------- - 1999-08-01 -(1 row) - -SELECT date '99-08-01'; -ERROR: date/time field value out of range: "99-08-01" -LINE 1: SELECT date '99-08-01'; - ^ -HINT: Perhaps you need a different "datestyle" setting. -SELECT date '1999-08-01'; - date ------------- - 1999-08-01 -(1 row) - -SELECT date '99 01 08'; -ERROR: date/time field value out of range: "99 01 08" -LINE 1: SELECT date '99 01 08'; - ^ -HINT: Perhaps you need a different "datestyle" setting. -SELECT date '1999 01 08'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '08 01 99'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '08 01 1999'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '01 08 99'; - date ------------- - 1999-08-01 -(1 row) - -SELECT date '01 08 1999'; - date ------------- - 1999-08-01 -(1 row) - -SELECT date '99 08 01'; -ERROR: date/time field value out of range: "99 08 01" -LINE 1: SELECT date '99 08 01'; - ^ -HINT: Perhaps you need a different "datestyle" setting. -SELECT date '1999 08 01'; - date ------------- - 1999-08-01 -(1 row) - -SET datestyle TO mdy; -SELECT date 'January 8, 1999'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '1999-01-08'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '1999-01-18'; - date ------------- - 1999-01-18 -(1 row) - -SELECT date '1/8/1999'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '1/18/1999'; - date ------------- - 1999-01-18 -(1 row) - -SELECT date '18/1/1999'; -ERROR: date/time field value out of range: "18/1/1999" -LINE 1: SELECT date '18/1/1999'; - ^ -HINT: Perhaps you need a different "datestyle" setting. -SELECT date '01/02/03'; - date ------------- - 2003-01-02 -(1 row) - -SELECT date '19990108'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '990108'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '1999.008'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date 'J2451187'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date 'January 8, 99 BC'; - date ---------------- - 0099-01-08 BC -(1 row) - -SELECT date '99-Jan-08'; -ERROR: date/time field value out of range: "99-Jan-08" -LINE 1: SELECT date '99-Jan-08'; - ^ -HINT: Perhaps you need a different "datestyle" setting. -SELECT date '1999-Jan-08'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '08-Jan-99'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '08-Jan-1999'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date 'Jan-08-99'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date 'Jan-08-1999'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '99-08-Jan'; -ERROR: invalid input syntax for type date: "99-08-Jan" -LINE 1: SELECT date '99-08-Jan'; - ^ -SELECT date '1999-08-Jan'; -ERROR: invalid input syntax for type date: "1999-08-Jan" -LINE 1: SELECT date '1999-08-Jan'; - ^ -SELECT date '99 Jan 08'; -ERROR: invalid input syntax for type date: "99 Jan 08" -LINE 1: SELECT date '99 Jan 08'; - ^ -SELECT date '1999 Jan 08'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '08 Jan 99'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '08 Jan 1999'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date 'Jan 08 99'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date 'Jan 08 1999'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '99 08 Jan'; -ERROR: invalid input syntax for type date: "99 08 Jan" -LINE 1: SELECT date '99 08 Jan'; - ^ -SELECT date '1999 08 Jan'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '99-01-08'; -ERROR: date/time field value out of range: "99-01-08" -LINE 1: SELECT date '99-01-08'; - ^ -HINT: Perhaps you need a different "datestyle" setting. -SELECT date '1999-01-08'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '08-01-99'; - date ------------- - 1999-08-01 -(1 row) - -SELECT date '08-01-1999'; - date ------------- - 1999-08-01 -(1 row) - -SELECT date '01-08-99'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '01-08-1999'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '99-08-01'; -ERROR: date/time field value out of range: "99-08-01" -LINE 1: SELECT date '99-08-01'; - ^ -HINT: Perhaps you need a different "datestyle" setting. -SELECT date '1999-08-01'; - date ------------- - 1999-08-01 -(1 row) - -SELECT date '99 01 08'; -ERROR: date/time field value out of range: "99 01 08" -LINE 1: SELECT date '99 01 08'; - ^ -HINT: Perhaps you need a different "datestyle" setting. -SELECT date '1999 01 08'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '08 01 99'; - date ------------- - 1999-08-01 -(1 row) - -SELECT date '08 01 1999'; - date ------------- - 1999-08-01 -(1 row) - -SELECT date '01 08 99'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '01 08 1999'; - date ------------- - 1999-01-08 -(1 row) - -SELECT date '99 08 01'; -ERROR: date/time field value out of range: "99 08 01" -LINE 1: SELECT date '99 08 01'; - ^ -HINT: Perhaps you need a different "datestyle" setting. -SELECT date '1999 08 01'; - date ------------- - 1999-08-01 -(1 row) - --- Check upper and lower limits of date range -SELECT date '4714-11-24 BC'; - date ---------------- - 4714-11-24 BC -(1 row) - -SELECT date '4714-11-23 BC'; -- out of range -ERROR: date out of range: "4714-11-23 BC" -LINE 1: SELECT date '4714-11-23 BC'; - ^ -SELECT date '5874897-12-31'; - date ---------------- - 5874897-12-31 -(1 row) - -SELECT date '5874898-01-01'; -- out of range -ERROR: date out of range: "5874898-01-01" -LINE 1: SELECT date '5874898-01-01'; - ^ -RESET datestyle; --- --- Simple math --- Leave most of it for the horology tests --- -SELECT f1 - date '2000-01-01' AS "Days From 2K" FROM DATE_TBL; - Days From 2K --------------- - -15607 - -15542 - -1403 - -1402 - -1401 - -1400 - -1037 - -1036 - -1035 - 91 - 92 - 93 - 13977 - 14343 - 14710 - -1475115 -(16 rows) - -SELECT f1 - date 'epoch' AS "Days From Epoch" FROM DATE_TBL; - Days From Epoch ------------------ - -4650 - -4585 - 9554 - 9555 - 9556 - 9557 - 9920 - 9921 - 9922 - 11048 - 11049 - 11050 - 24934 - 25300 - 25667 - -1464158 -(16 rows) - -SELECT date 'yesterday' - date 'today' AS "One day"; - One day ---------- - -1 -(1 row) - -SELECT date 'today' - date 'tomorrow' AS "One day"; - One day ---------- - -1 -(1 row) - -SELECT date 'yesterday' - date 'tomorrow' AS "Two days"; - Two days ----------- - -2 -(1 row) - -SELECT date 'tomorrow' - date 'today' AS "One day"; - One day ---------- - 1 -(1 row) - -SELECT date 'today' - date 'yesterday' AS "One day"; - One day ---------- - 1 -(1 row) - -SELECT date 'tomorrow' - date 'yesterday' AS "Two days"; - Two days ----------- - 2 -(1 row) - --- --- test extract! --- -SELECT f1 as "date", - date_part('year', f1) AS year, - date_part('month', f1) AS month, - date_part('day', f1) AS day, - date_part('quarter', f1) AS quarter, - date_part('decade', f1) AS decade, - date_part('century', f1) AS century, - date_part('millennium', f1) AS millennium, - date_part('isoyear', f1) AS isoyear, - date_part('week', f1) AS week, - date_part('dow', f1) AS dow, - date_part('isodow', f1) AS isodow, - date_part('doy', f1) AS doy, - date_part('julian', f1) AS julian, - date_part('epoch', f1) AS epoch - FROM date_tbl; - date | year | month | day | quarter | decade | century | millennium | isoyear | week | dow | isodow | doy | julian | epoch ----------------+-------+-------+-----+---------+--------+---------+------------+---------+------+-----+--------+-----+---------+--------------- - 04-09-1957 | 1957 | 4 | 9 | 2 | 195 | 20 | 2 | 1957 | 15 | 2 | 2 | 99 | 2435938 | -401760000 - 06-13-1957 | 1957 | 6 | 13 | 2 | 195 | 20 | 2 | 1957 | 24 | 4 | 4 | 164 | 2436003 | -396144000 - 02-28-1996 | 1996 | 2 | 28 | 1 | 199 | 20 | 2 | 1996 | 9 | 3 | 3 | 59 | 2450142 | 825465600 - 02-29-1996 | 1996 | 2 | 29 | 1 | 199 | 20 | 2 | 1996 | 9 | 4 | 4 | 60 | 2450143 | 825552000 - 03-01-1996 | 1996 | 3 | 1 | 1 | 199 | 20 | 2 | 1996 | 9 | 5 | 5 | 61 | 2450144 | 825638400 - 03-02-1996 | 1996 | 3 | 2 | 1 | 199 | 20 | 2 | 1996 | 9 | 6 | 6 | 62 | 2450145 | 825724800 - 02-28-1997 | 1997 | 2 | 28 | 1 | 199 | 20 | 2 | 1997 | 9 | 5 | 5 | 59 | 2450508 | 857088000 - 03-01-1997 | 1997 | 3 | 1 | 1 | 199 | 20 | 2 | 1997 | 9 | 6 | 6 | 60 | 2450509 | 857174400 - 03-02-1997 | 1997 | 3 | 2 | 1 | 199 | 20 | 2 | 1997 | 9 | 0 | 7 | 61 | 2450510 | 857260800 - 04-01-2000 | 2000 | 4 | 1 | 2 | 200 | 20 | 2 | 2000 | 13 | 6 | 6 | 92 | 2451636 | 954547200 - 04-02-2000 | 2000 | 4 | 2 | 2 | 200 | 20 | 2 | 2000 | 13 | 0 | 7 | 93 | 2451637 | 954633600 - 04-03-2000 | 2000 | 4 | 3 | 2 | 200 | 20 | 2 | 2000 | 14 | 1 | 1 | 94 | 2451638 | 954720000 - 04-08-2038 | 2038 | 4 | 8 | 2 | 203 | 21 | 3 | 2038 | 14 | 4 | 4 | 98 | 2465522 | 2154297600 - 04-09-2039 | 2039 | 4 | 9 | 2 | 203 | 21 | 3 | 2039 | 14 | 6 | 6 | 99 | 2465888 | 2185920000 - 04-10-2040 | 2040 | 4 | 10 | 2 | 204 | 21 | 3 | 2040 | 15 | 2 | 2 | 101 | 2466255 | 2217628800 - 04-10-2040 BC | -2040 | 4 | 10 | 2 | -204 | -21 | -3 | -2040 | 15 | 1 | 1 | 100 | 976430 | -126503251200 -(16 rows) - --- --- epoch --- -SELECT EXTRACT(EPOCH FROM DATE '1970-01-01'); -- 0 - extract ---------- - 0 -(1 row) - --- --- century --- -SELECT EXTRACT(CENTURY FROM DATE '0101-12-31 BC'); -- -2 - extract ---------- - -2 -(1 row) - -SELECT EXTRACT(CENTURY FROM DATE '0100-12-31 BC'); -- -1 - extract ---------- - -1 -(1 row) - -SELECT EXTRACT(CENTURY FROM DATE '0001-12-31 BC'); -- -1 - extract ---------- - -1 -(1 row) - -SELECT EXTRACT(CENTURY FROM DATE '0001-01-01'); -- 1 - extract ---------- - 1 -(1 row) - -SELECT EXTRACT(CENTURY FROM DATE '0001-01-01 AD'); -- 1 - extract ---------- - 1 -(1 row) - -SELECT EXTRACT(CENTURY FROM DATE '1900-12-31'); -- 19 - extract ---------- - 19 -(1 row) - -SELECT EXTRACT(CENTURY FROM DATE '1901-01-01'); -- 20 - extract ---------- - 20 -(1 row) - -SELECT EXTRACT(CENTURY FROM DATE '2000-12-31'); -- 20 - extract ---------- - 20 -(1 row) - -SELECT EXTRACT(CENTURY FROM DATE '2001-01-01'); -- 21 - extract ---------- - 21 -(1 row) - -SELECT EXTRACT(CENTURY FROM CURRENT_DATE)>=21 AS True; -- true - true ------- - t -(1 row) - --- --- millennium --- -SELECT EXTRACT(MILLENNIUM FROM DATE '0001-12-31 BC'); -- -1 - extract ---------- - -1 -(1 row) - -SELECT EXTRACT(MILLENNIUM FROM DATE '0001-01-01 AD'); -- 1 - extract ---------- - 1 -(1 row) - -SELECT EXTRACT(MILLENNIUM FROM DATE '1000-12-31'); -- 1 - extract ---------- - 1 -(1 row) - -SELECT EXTRACT(MILLENNIUM FROM DATE '1001-01-01'); -- 2 - extract ---------- - 2 -(1 row) - -SELECT EXTRACT(MILLENNIUM FROM DATE '2000-12-31'); -- 2 - extract ---------- - 2 -(1 row) - -SELECT EXTRACT(MILLENNIUM FROM DATE '2001-01-01'); -- 3 - extract ---------- - 3 -(1 row) - --- next test to be fixed on the turn of the next millennium;-) -SELECT EXTRACT(MILLENNIUM FROM CURRENT_DATE); -- 3 - extract ---------- - 3 -(1 row) - --- --- decade --- -SELECT EXTRACT(DECADE FROM DATE '1994-12-25'); -- 199 - extract ---------- - 199 -(1 row) - -SELECT EXTRACT(DECADE FROM DATE '0010-01-01'); -- 1 - extract ---------- - 1 -(1 row) - -SELECT EXTRACT(DECADE FROM DATE '0009-12-31'); -- 0 - extract ---------- - 0 -(1 row) - -SELECT EXTRACT(DECADE FROM DATE '0001-01-01 BC'); -- 0 - extract ---------- - 0 -(1 row) - -SELECT EXTRACT(DECADE FROM DATE '0002-12-31 BC'); -- -1 - extract ---------- - -1 -(1 row) - -SELECT EXTRACT(DECADE FROM DATE '0011-01-01 BC'); -- -1 - extract ---------- - -1 -(1 row) - -SELECT EXTRACT(DECADE FROM DATE '0012-12-31 BC'); -- -2 - extract ---------- - -2 -(1 row) - --- --- all possible fields --- -SELECT EXTRACT(MICROSECONDS FROM DATE '2020-08-11'); -ERROR: date units "microseconds" not supported -SELECT EXTRACT(MILLISECONDS FROM DATE '2020-08-11'); -ERROR: date units "milliseconds" not supported -SELECT EXTRACT(SECOND FROM DATE '2020-08-11'); -ERROR: date units "second" not supported -SELECT EXTRACT(MINUTE FROM DATE '2020-08-11'); -ERROR: date units "minute" not supported -SELECT EXTRACT(HOUR FROM DATE '2020-08-11'); -ERROR: date units "hour" not supported -SELECT EXTRACT(DAY FROM DATE '2020-08-11'); - extract ---------- - 11 -(1 row) - -SELECT EXTRACT(MONTH FROM DATE '2020-08-11'); - extract ---------- - 8 -(1 row) - -SELECT EXTRACT(YEAR FROM DATE '2020-08-11'); - extract ---------- - 2020 -(1 row) - -SELECT EXTRACT(YEAR FROM DATE '2020-08-11 BC'); - extract ---------- - -2020 -(1 row) - -SELECT EXTRACT(DECADE FROM DATE '2020-08-11'); - extract ---------- - 202 -(1 row) - -SELECT EXTRACT(CENTURY FROM DATE '2020-08-11'); - extract ---------- - 21 -(1 row) - -SELECT EXTRACT(MILLENNIUM FROM DATE '2020-08-11'); - extract ---------- - 3 -(1 row) - -SELECT EXTRACT(ISOYEAR FROM DATE '2020-08-11'); - extract ---------- - 2020 -(1 row) - -SELECT EXTRACT(ISOYEAR FROM DATE '2020-08-11 BC'); - extract ---------- - -2020 -(1 row) - -SELECT EXTRACT(QUARTER FROM DATE '2020-08-11'); - extract ---------- - 3 -(1 row) - -SELECT EXTRACT(WEEK FROM DATE '2020-08-11'); - extract ---------- - 33 -(1 row) - -SELECT EXTRACT(DOW FROM DATE '2020-08-11'); - extract ---------- - 2 -(1 row) - -SELECT EXTRACT(DOW FROM DATE '2020-08-16'); - extract ---------- - 0 -(1 row) - -SELECT EXTRACT(ISODOW FROM DATE '2020-08-11'); - extract ---------- - 2 -(1 row) - -SELECT EXTRACT(ISODOW FROM DATE '2020-08-16'); - extract ---------- - 7 -(1 row) - -SELECT EXTRACT(DOY FROM DATE '2020-08-11'); - extract ---------- - 224 -(1 row) - -SELECT EXTRACT(TIMEZONE FROM DATE '2020-08-11'); -ERROR: date units "timezone" not supported -SELECT EXTRACT(TIMEZONE_M FROM DATE '2020-08-11'); -ERROR: date units "timezone_m" not supported -SELECT EXTRACT(TIMEZONE_H FROM DATE '2020-08-11'); -ERROR: date units "timezone_h" not supported -SELECT EXTRACT(EPOCH FROM DATE '2020-08-11'); - extract ------------- - 1597104000 -(1 row) - -SELECT EXTRACT(JULIAN FROM DATE '2020-08-11'); - extract ---------- - 2459073 -(1 row) - --- --- test trunc function! --- -SELECT DATE_TRUNC('MILLENNIUM', TIMESTAMP '1970-03-20 04:30:00.00000'); -- 1001 - date_trunc --------------------------- - Thu Jan 01 00:00:00 1001 -(1 row) - -SELECT DATE_TRUNC('MILLENNIUM', DATE '1970-03-20'); -- 1001-01-01 - date_trunc ------------------------------- - Thu Jan 01 00:00:00 1001 PST -(1 row) - -SELECT DATE_TRUNC('CENTURY', TIMESTAMP '1970-03-20 04:30:00.00000'); -- 1901 - date_trunc --------------------------- - Tue Jan 01 00:00:00 1901 -(1 row) - -SELECT DATE_TRUNC('CENTURY', DATE '1970-03-20'); -- 1901 - date_trunc ------------------------------- - Tue Jan 01 00:00:00 1901 PST -(1 row) - -SELECT DATE_TRUNC('CENTURY', DATE '2004-08-10'); -- 2001-01-01 - date_trunc ------------------------------- - Mon Jan 01 00:00:00 2001 PST -(1 row) - -SELECT DATE_TRUNC('CENTURY', DATE '0002-02-04'); -- 0001-01-01 - date_trunc ------------------------------- - Mon Jan 01 00:00:00 0001 PST -(1 row) - -SELECT DATE_TRUNC('CENTURY', DATE '0055-08-10 BC'); -- 0100-01-01 BC - date_trunc ---------------------------------- - Tue Jan 01 00:00:00 0100 PST BC -(1 row) - -SELECT DATE_TRUNC('DECADE', DATE '1993-12-25'); -- 1990-01-01 - date_trunc ------------------------------- - Mon Jan 01 00:00:00 1990 PST -(1 row) - -SELECT DATE_TRUNC('DECADE', DATE '0004-12-25'); -- 0001-01-01 BC - date_trunc ---------------------------------- - Sat Jan 01 00:00:00 0001 PST BC -(1 row) - -SELECT DATE_TRUNC('DECADE', DATE '0002-12-31 BC'); -- 0011-01-01 BC - date_trunc ---------------------------------- - Mon Jan 01 00:00:00 0011 PST BC -(1 row) - --- --- test infinity --- -select 'infinity'::date, '-infinity'::date; - date | date -----------+----------- - infinity | -infinity -(1 row) - -select 'infinity'::date > 'today'::date as t; - t ---- - t -(1 row) - -select '-infinity'::date < 'today'::date as t; - t ---- - t -(1 row) - -select isfinite('infinity'::date), isfinite('-infinity'::date), isfinite('today'::date); - isfinite | isfinite | isfinite -----------+----------+---------- - f | f | t -(1 row) - --- --- oscillating fields from non-finite date: --- -SELECT EXTRACT(DAY FROM DATE 'infinity'); -- NULL - extract ---------- - -(1 row) - -SELECT EXTRACT(DAY FROM DATE '-infinity'); -- NULL - extract ---------- - -(1 row) - --- all supported fields -SELECT EXTRACT(DAY FROM DATE 'infinity'); -- NULL - extract ---------- - -(1 row) - -SELECT EXTRACT(MONTH FROM DATE 'infinity'); -- NULL - extract ---------- - -(1 row) - -SELECT EXTRACT(QUARTER FROM DATE 'infinity'); -- NULL - extract ---------- - -(1 row) - -SELECT EXTRACT(WEEK FROM DATE 'infinity'); -- NULL - extract ---------- - -(1 row) - -SELECT EXTRACT(DOW FROM DATE 'infinity'); -- NULL - extract ---------- - -(1 row) - -SELECT EXTRACT(ISODOW FROM DATE 'infinity'); -- NULL - extract ---------- - -(1 row) - -SELECT EXTRACT(DOY FROM DATE 'infinity'); -- NULL - extract ---------- - -(1 row) - --- --- monotonic fields from non-finite date: --- -SELECT EXTRACT(EPOCH FROM DATE 'infinity'); -- Infinity - extract ----------- - Infinity -(1 row) - -SELECT EXTRACT(EPOCH FROM DATE '-infinity'); -- -Infinity - extract ------------ - -Infinity -(1 row) - --- all supported fields -SELECT EXTRACT(YEAR FROM DATE 'infinity'); -- Infinity - extract ----------- - Infinity -(1 row) - -SELECT EXTRACT(DECADE FROM DATE 'infinity'); -- Infinity - extract ----------- - Infinity -(1 row) - -SELECT EXTRACT(CENTURY FROM DATE 'infinity'); -- Infinity - extract ----------- - Infinity -(1 row) - -SELECT EXTRACT(MILLENNIUM FROM DATE 'infinity'); -- Infinity - extract ----------- - Infinity -(1 row) - -SELECT EXTRACT(JULIAN FROM DATE 'infinity'); -- Infinity - extract ----------- - Infinity -(1 row) - -SELECT EXTRACT(ISOYEAR FROM DATE 'infinity'); -- Infinity - extract ----------- - Infinity -(1 row) - -SELECT EXTRACT(EPOCH FROM DATE 'infinity'); -- Infinity - extract ----------- - Infinity -(1 row) - --- --- wrong fields from non-finite date: --- -SELECT EXTRACT(MICROSEC FROM DATE 'infinity'); -- error -ERROR: date units "microsec" not recognized --- test constructors -select make_date(2013, 7, 15); - make_date ------------- - 07-15-2013 -(1 row) - -select make_date(-44, 3, 15); - make_date ---------------- - 03-15-0044 BC -(1 row) - -select make_time(8, 20, 0.0); - make_time ------------ - 08:20:00 -(1 row) - --- should fail -select make_date(0, 7, 15); -ERROR: date field value out of range: 0-07-15 -select make_date(2013, 2, 30); -ERROR: date field value out of range: 2013-02-30 -select make_date(2013, 13, 1); -ERROR: date field value out of range: 2013-13-01 -select make_date(2013, 11, -1); -ERROR: date field value out of range: 2013-11--1 -select make_time(10, 55, 100.1); -ERROR: time field value out of range: 10:55:100.1 -select make_time(24, 0, 2.1); -ERROR: time field value out of range: 24:00:2.1 +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/time.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/time.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/time.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/time.out 2023-02-20 19:44:16.889207205 -0500 @@ -1,200 +1 @@ --- --- TIME --- -CREATE TABLE TIME_TBL (f1 time(2)); -INSERT INTO TIME_TBL VALUES ('00:00'); -INSERT INTO TIME_TBL VALUES ('01:00'); --- as of 7.4, timezone spec should be accepted and ignored -INSERT INTO TIME_TBL VALUES ('02:03 PST'); -INSERT INTO TIME_TBL VALUES ('11:59 EDT'); -INSERT INTO TIME_TBL VALUES ('12:00'); -INSERT INTO TIME_TBL VALUES ('12:01'); -INSERT INTO TIME_TBL VALUES ('23:59'); -INSERT INTO TIME_TBL VALUES ('11:59:59.99 PM'); -INSERT INTO TIME_TBL VALUES ('2003-03-07 15:36:39 America/New_York'); -INSERT INTO TIME_TBL VALUES ('2003-07-07 15:36:39 America/New_York'); --- this should fail (the timezone offset is not known) -INSERT INTO TIME_TBL VALUES ('15:36:39 America/New_York'); -ERROR: invalid input syntax for type time: "15:36:39 America/New_York" -LINE 1: INSERT INTO TIME_TBL VALUES ('15:36:39 America/New_York'); - ^ -SELECT f1 AS "Time" FROM TIME_TBL; - Time -------------- - 00:00:00 - 01:00:00 - 02:03:00 - 11:59:00 - 12:00:00 - 12:01:00 - 23:59:00 - 23:59:59.99 - 15:36:39 - 15:36:39 -(10 rows) - -SELECT f1 AS "Three" FROM TIME_TBL WHERE f1 < '05:06:07'; - Three ----------- - 00:00:00 - 01:00:00 - 02:03:00 -(3 rows) - -SELECT f1 AS "Five" FROM TIME_TBL WHERE f1 > '05:06:07'; - Five -------------- - 11:59:00 - 12:00:00 - 12:01:00 - 23:59:00 - 23:59:59.99 - 15:36:39 - 15:36:39 -(7 rows) - -SELECT f1 AS "None" FROM TIME_TBL WHERE f1 < '00:00'; - None ------- -(0 rows) - -SELECT f1 AS "Eight" FROM TIME_TBL WHERE f1 >= '00:00'; - Eight -------------- - 00:00:00 - 01:00:00 - 02:03:00 - 11:59:00 - 12:00:00 - 12:01:00 - 23:59:00 - 23:59:59.99 - 15:36:39 - 15:36:39 -(10 rows) - --- Check edge cases -SELECT '23:59:59.999999'::time; - time ------------------ - 23:59:59.999999 -(1 row) - -SELECT '23:59:59.9999999'::time; -- rounds up - time ----------- - 24:00:00 -(1 row) - -SELECT '23:59:60'::time; -- rounds up - time ----------- - 24:00:00 -(1 row) - -SELECT '24:00:00'::time; -- allowed - time ----------- - 24:00:00 -(1 row) - -SELECT '24:00:00.01'::time; -- not allowed -ERROR: date/time field value out of range: "24:00:00.01" -LINE 1: SELECT '24:00:00.01'::time; - ^ -SELECT '23:59:60.01'::time; -- not allowed -ERROR: date/time field value out of range: "23:59:60.01" -LINE 1: SELECT '23:59:60.01'::time; - ^ -SELECT '24:01:00'::time; -- not allowed -ERROR: date/time field value out of range: "24:01:00" -LINE 1: SELECT '24:01:00'::time; - ^ -SELECT '25:00:00'::time; -- not allowed -ERROR: date/time field value out of range: "25:00:00" -LINE 1: SELECT '25:00:00'::time; - ^ --- --- TIME simple math --- --- We now make a distinction between time and intervals, --- and adding two times together makes no sense at all. --- Leave in one query to show that it is rejected, --- and do the rest of the testing in horology.sql --- where we do mixed-type arithmetic. - thomas 2000-12-02 -SELECT f1 + time '00:01' AS "Illegal" FROM TIME_TBL; -ERROR: operator is not unique: time without time zone + time without time zone -LINE 1: SELECT f1 + time '00:01' AS "Illegal" FROM TIME_TBL; - ^ -HINT: Could not choose a best candidate operator. You might need to add explicit type casts. --- --- test EXTRACT --- -SELECT EXTRACT(MICROSECOND FROM TIME '2020-05-26 13:30:25.575401'); - extract ----------- - 25575401 -(1 row) - -SELECT EXTRACT(MILLISECOND FROM TIME '2020-05-26 13:30:25.575401'); - extract ------------ - 25575.401 -(1 row) - -SELECT EXTRACT(SECOND FROM TIME '2020-05-26 13:30:25.575401'); - extract ------------ - 25.575401 -(1 row) - -SELECT EXTRACT(MINUTE FROM TIME '2020-05-26 13:30:25.575401'); - extract ---------- - 30 -(1 row) - -SELECT EXTRACT(HOUR FROM TIME '2020-05-26 13:30:25.575401'); - extract ---------- - 13 -(1 row) - -SELECT EXTRACT(DAY FROM TIME '2020-05-26 13:30:25.575401'); -- error -ERROR: "time" units "day" not recognized -SELECT EXTRACT(FORTNIGHT FROM TIME '2020-05-26 13:30:25.575401'); -- error -ERROR: "time" units "fortnight" not recognized -SELECT EXTRACT(TIMEZONE FROM TIME '2020-05-26 13:30:25.575401'); -- error -ERROR: "time" units "timezone" not recognized -SELECT EXTRACT(EPOCH FROM TIME '2020-05-26 13:30:25.575401'); - extract --------------- - 48625.575401 -(1 row) - --- date_part implementation is mostly the same as extract, so only --- test a few cases for additional coverage. -SELECT date_part('microsecond', TIME '2020-05-26 13:30:25.575401'); - date_part ------------ - 25575401 -(1 row) - -SELECT date_part('millisecond', TIME '2020-05-26 13:30:25.575401'); - date_part ------------ - 25575.401 -(1 row) - -SELECT date_part('second', TIME '2020-05-26 13:30:25.575401'); - date_part ------------ - 25.575401 -(1 row) - -SELECT date_part('epoch', TIME '2020-05-26 13:30:25.575401'); - date_part --------------- - 48625.575401 -(1 row) - +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/timetz.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/timetz.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/timetz.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/timetz.out 2023-02-20 19:44:16.879207205 -0500 @@ -1,233 +1 @@ --- --- TIMETZ --- -CREATE TABLE TIMETZ_TBL (f1 time(2) with time zone); -INSERT INTO TIMETZ_TBL VALUES ('00:01 PDT'); -INSERT INTO TIMETZ_TBL VALUES ('01:00 PDT'); -INSERT INTO TIMETZ_TBL VALUES ('02:03 PDT'); -INSERT INTO TIMETZ_TBL VALUES ('07:07 PST'); -INSERT INTO TIMETZ_TBL VALUES ('08:08 EDT'); -INSERT INTO TIMETZ_TBL VALUES ('11:59 PDT'); -INSERT INTO TIMETZ_TBL VALUES ('12:00 PDT'); -INSERT INTO TIMETZ_TBL VALUES ('12:01 PDT'); -INSERT INTO TIMETZ_TBL VALUES ('23:59 PDT'); -INSERT INTO TIMETZ_TBL VALUES ('11:59:59.99 PM PDT'); -INSERT INTO TIMETZ_TBL VALUES ('2003-03-07 15:36:39 America/New_York'); -INSERT INTO TIMETZ_TBL VALUES ('2003-07-07 15:36:39 America/New_York'); --- this should fail (the timezone offset is not known) -INSERT INTO TIMETZ_TBL VALUES ('15:36:39 America/New_York'); -ERROR: invalid input syntax for type time with time zone: "15:36:39 America/New_York" -LINE 1: INSERT INTO TIMETZ_TBL VALUES ('15:36:39 America/New_York'); - ^ --- this should fail (timezone not specified without a date) -INSERT INTO TIMETZ_TBL VALUES ('15:36:39 m2'); -ERROR: invalid input syntax for type time with time zone: "15:36:39 m2" -LINE 1: INSERT INTO TIMETZ_TBL VALUES ('15:36:39 m2'); - ^ --- this should fail (dynamic timezone abbreviation without a date) -INSERT INTO TIMETZ_TBL VALUES ('15:36:39 MSK m2'); -ERROR: invalid input syntax for type time with time zone: "15:36:39 MSK m2" -LINE 1: INSERT INTO TIMETZ_TBL VALUES ('15:36:39 MSK m2'); - ^ -SELECT f1 AS "Time TZ" FROM TIMETZ_TBL; - Time TZ ----------------- - 00:01:00-07 - 01:00:00-07 - 02:03:00-07 - 07:07:00-08 - 08:08:00-04 - 11:59:00-07 - 12:00:00-07 - 12:01:00-07 - 23:59:00-07 - 23:59:59.99-07 - 15:36:39-05 - 15:36:39-04 -(12 rows) - -SELECT f1 AS "Three" FROM TIMETZ_TBL WHERE f1 < '05:06:07-07'; - Three -------------- - 00:01:00-07 - 01:00:00-07 - 02:03:00-07 -(3 rows) - -SELECT f1 AS "Seven" FROM TIMETZ_TBL WHERE f1 > '05:06:07-07'; - Seven ----------------- - 07:07:00-08 - 08:08:00-04 - 11:59:00-07 - 12:00:00-07 - 12:01:00-07 - 23:59:00-07 - 23:59:59.99-07 - 15:36:39-05 - 15:36:39-04 -(9 rows) - -SELECT f1 AS "None" FROM TIMETZ_TBL WHERE f1 < '00:00-07'; - None ------- -(0 rows) - -SELECT f1 AS "Ten" FROM TIMETZ_TBL WHERE f1 >= '00:00-07'; - Ten ----------------- - 00:01:00-07 - 01:00:00-07 - 02:03:00-07 - 07:07:00-08 - 08:08:00-04 - 11:59:00-07 - 12:00:00-07 - 12:01:00-07 - 23:59:00-07 - 23:59:59.99-07 - 15:36:39-05 - 15:36:39-04 -(12 rows) - --- Check edge cases -SELECT '23:59:59.999999 PDT'::timetz; - timetz --------------------- - 23:59:59.999999-07 -(1 row) - -SELECT '23:59:59.9999999 PDT'::timetz; -- rounds up - timetz -------------- - 24:00:00-07 -(1 row) - -SELECT '23:59:60 PDT'::timetz; -- rounds up - timetz -------------- - 24:00:00-07 -(1 row) - -SELECT '24:00:00 PDT'::timetz; -- allowed - timetz -------------- - 24:00:00-07 -(1 row) - -SELECT '24:00:00.01 PDT'::timetz; -- not allowed -ERROR: date/time field value out of range: "24:00:00.01 PDT" -LINE 1: SELECT '24:00:00.01 PDT'::timetz; - ^ -SELECT '23:59:60.01 PDT'::timetz; -- not allowed -ERROR: date/time field value out of range: "23:59:60.01 PDT" -LINE 1: SELECT '23:59:60.01 PDT'::timetz; - ^ -SELECT '24:01:00 PDT'::timetz; -- not allowed -ERROR: date/time field value out of range: "24:01:00 PDT" -LINE 1: SELECT '24:01:00 PDT'::timetz; - ^ -SELECT '25:00:00 PDT'::timetz; -- not allowed -ERROR: date/time field value out of range: "25:00:00 PDT" -LINE 1: SELECT '25:00:00 PDT'::timetz; - ^ --- --- TIME simple math --- --- We now make a distinction between time and intervals, --- and adding two times together makes no sense at all. --- Leave in one query to show that it is rejected, --- and do the rest of the testing in horology.sql --- where we do mixed-type arithmetic. - thomas 2000-12-02 -SELECT f1 + time with time zone '00:01' AS "Illegal" FROM TIMETZ_TBL; -ERROR: operator does not exist: time with time zone + time with time zone -LINE 1: SELECT f1 + time with time zone '00:01' AS "Illegal" FROM TI... - ^ -HINT: No operator matches the given name and argument types. You might need to add explicit type casts. --- --- test EXTRACT --- -SELECT EXTRACT(MICROSECOND FROM TIME WITH TIME ZONE '2020-05-26 13:30:25.575401-04'); - extract ----------- - 25575401 -(1 row) - -SELECT EXTRACT(MILLISECOND FROM TIME WITH TIME ZONE '2020-05-26 13:30:25.575401-04'); - extract ------------ - 25575.401 -(1 row) - -SELECT EXTRACT(SECOND FROM TIME WITH TIME ZONE '2020-05-26 13:30:25.575401-04'); - extract ------------ - 25.575401 -(1 row) - -SELECT EXTRACT(MINUTE FROM TIME WITH TIME ZONE '2020-05-26 13:30:25.575401-04'); - extract ---------- - 30 -(1 row) - -SELECT EXTRACT(HOUR FROM TIME WITH TIME ZONE '2020-05-26 13:30:25.575401-04'); - extract ---------- - 13 -(1 row) - -SELECT EXTRACT(DAY FROM TIME WITH TIME ZONE '2020-05-26 13:30:25.575401-04'); -- error -ERROR: "time with time zone" units "day" not recognized -SELECT EXTRACT(FORTNIGHT FROM TIME WITH TIME ZONE '2020-05-26 13:30:25.575401-04'); -- error -ERROR: "time with time zone" units "fortnight" not recognized -SELECT EXTRACT(TIMEZONE FROM TIME WITH TIME ZONE '2020-05-26 13:30:25.575401-04:30'); - extract ---------- - -16200 -(1 row) - -SELECT EXTRACT(TIMEZONE_HOUR FROM TIME WITH TIME ZONE '2020-05-26 13:30:25.575401-04:30'); - extract ---------- - -4 -(1 row) - -SELECT EXTRACT(TIMEZONE_MINUTE FROM TIME WITH TIME ZONE '2020-05-26 13:30:25.575401-04:30'); - extract ---------- - -30 -(1 row) - -SELECT EXTRACT(EPOCH FROM TIME WITH TIME ZONE '2020-05-26 13:30:25.575401-04'); - extract --------------- - 63025.575401 -(1 row) - --- date_part implementation is mostly the same as extract, so only --- test a few cases for additional coverage. -SELECT date_part('microsecond', TIME WITH TIME ZONE '2020-05-26 13:30:25.575401-04'); - date_part ------------ - 25575401 -(1 row) - -SELECT date_part('millisecond', TIME WITH TIME ZONE '2020-05-26 13:30:25.575401-04'); - date_part ------------ - 25575.401 -(1 row) - -SELECT date_part('second', TIME WITH TIME ZONE '2020-05-26 13:30:25.575401-04'); - date_part ------------ - 25.575401 -(1 row) - -SELECT date_part('epoch', TIME WITH TIME ZONE '2020-05-26 13:30:25.575401-04'); - date_part --------------- - 63025.575401 -(1 row) - +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/timestamp.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/timestamp.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/timestamp.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/timestamp.out 2023-02-20 19:44:16.879207205 -0500 @@ -1,2081 +1 @@ --- --- TIMESTAMP --- -CREATE TABLE TIMESTAMP_TBL (d1 timestamp(2) without time zone); --- Test shorthand input values --- We can't just "select" the results since they aren't constants; test for --- equality instead. We can do that by running the test inside a transaction --- block, within which the value of 'now' shouldn't change, and so these --- related values shouldn't either. -BEGIN; -INSERT INTO TIMESTAMP_TBL VALUES ('today'); -INSERT INTO TIMESTAMP_TBL VALUES ('yesterday'); -INSERT INTO TIMESTAMP_TBL VALUES ('tomorrow'); --- time zone should be ignored by this data type -INSERT INTO TIMESTAMP_TBL VALUES ('tomorrow EST'); -INSERT INTO TIMESTAMP_TBL VALUES ('tomorrow zulu'); -SELECT count(*) AS One FROM TIMESTAMP_TBL WHERE d1 = timestamp without time zone 'today'; - one ------ - 1 -(1 row) - -SELECT count(*) AS Three FROM TIMESTAMP_TBL WHERE d1 = timestamp without time zone 'tomorrow'; - three -------- - 3 -(1 row) - -SELECT count(*) AS One FROM TIMESTAMP_TBL WHERE d1 = timestamp without time zone 'yesterday'; - one ------ - 1 -(1 row) - -COMMIT; -DELETE FROM TIMESTAMP_TBL; --- Verify that 'now' *does* change over a reasonable interval such as 100 msec, --- and that it doesn't change over the same interval within a transaction block -INSERT INTO TIMESTAMP_TBL VALUES ('now'); -SELECT pg_sleep(0.1); - pg_sleep ----------- - -(1 row) - -BEGIN; -INSERT INTO TIMESTAMP_TBL VALUES ('now'); -SELECT pg_sleep(0.1); - pg_sleep ----------- - -(1 row) - -INSERT INTO TIMESTAMP_TBL VALUES ('now'); -SELECT pg_sleep(0.1); - pg_sleep ----------- - -(1 row) - -SELECT count(*) AS two FROM TIMESTAMP_TBL WHERE d1 = timestamp(2) without time zone 'now'; - two ------ - 2 -(1 row) - -SELECT count(d1) AS three, count(DISTINCT d1) AS two FROM TIMESTAMP_TBL; - three | two --------+----- - 3 | 2 -(1 row) - -COMMIT; -TRUNCATE TIMESTAMP_TBL; --- Special values -INSERT INTO TIMESTAMP_TBL VALUES ('-infinity'); -INSERT INTO TIMESTAMP_TBL VALUES ('infinity'); -INSERT INTO TIMESTAMP_TBL VALUES ('epoch'); --- Postgres v6.0 standard output format -INSERT INTO TIMESTAMP_TBL VALUES ('Mon Feb 10 17:32:01 1997 PST'); --- Variations on Postgres v6.1 standard output format -INSERT INTO TIMESTAMP_TBL VALUES ('Mon Feb 10 17:32:01.000001 1997 PST'); -INSERT INTO TIMESTAMP_TBL VALUES ('Mon Feb 10 17:32:01.999999 1997 PST'); -INSERT INTO TIMESTAMP_TBL VALUES ('Mon Feb 10 17:32:01.4 1997 PST'); -INSERT INTO TIMESTAMP_TBL VALUES ('Mon Feb 10 17:32:01.5 1997 PST'); -INSERT INTO TIMESTAMP_TBL VALUES ('Mon Feb 10 17:32:01.6 1997 PST'); --- ISO 8601 format -INSERT INTO TIMESTAMP_TBL VALUES ('1997-01-02'); -INSERT INTO TIMESTAMP_TBL VALUES ('1997-01-02 03:04:05'); -INSERT INTO TIMESTAMP_TBL VALUES ('1997-02-10 17:32:01-08'); -INSERT INTO TIMESTAMP_TBL VALUES ('1997-02-10 17:32:01-0800'); -INSERT INTO TIMESTAMP_TBL VALUES ('1997-02-10 17:32:01 -08:00'); -INSERT INTO TIMESTAMP_TBL VALUES ('19970210 173201 -0800'); -INSERT INTO TIMESTAMP_TBL VALUES ('1997-06-10 17:32:01 -07:00'); -INSERT INTO TIMESTAMP_TBL VALUES ('2001-09-22T18:19:20'); --- POSIX format (note that the timezone abbrev is just decoration here) -INSERT INTO TIMESTAMP_TBL VALUES ('2000-03-15 08:14:01 GMT+8'); -INSERT INTO TIMESTAMP_TBL VALUES ('2000-03-15 13:14:02 GMT-1'); -INSERT INTO TIMESTAMP_TBL VALUES ('2000-03-15 12:14:03 GMT-2'); -INSERT INTO TIMESTAMP_TBL VALUES ('2000-03-15 03:14:04 PST+8'); -INSERT INTO TIMESTAMP_TBL VALUES ('2000-03-15 02:14:05 MST+7:00'); --- Variations for acceptable input formats -INSERT INTO TIMESTAMP_TBL VALUES ('Feb 10 17:32:01 1997 -0800'); -INSERT INTO TIMESTAMP_TBL VALUES ('Feb 10 17:32:01 1997'); -INSERT INTO TIMESTAMP_TBL VALUES ('Feb 10 5:32PM 1997'); -INSERT INTO TIMESTAMP_TBL VALUES ('1997/02/10 17:32:01-0800'); -INSERT INTO TIMESTAMP_TBL VALUES ('1997-02-10 17:32:01 PST'); -INSERT INTO TIMESTAMP_TBL VALUES ('Feb-10-1997 17:32:01 PST'); -INSERT INTO TIMESTAMP_TBL VALUES ('02-10-1997 17:32:01 PST'); -INSERT INTO TIMESTAMP_TBL VALUES ('19970210 173201 PST'); -set datestyle to ymd; -INSERT INTO TIMESTAMP_TBL VALUES ('97FEB10 5:32:01PM UTC'); -INSERT INTO TIMESTAMP_TBL VALUES ('97/02/10 17:32:01 UTC'); -reset datestyle; -INSERT INTO TIMESTAMP_TBL VALUES ('1997.041 17:32:01 UTC'); -INSERT INTO TIMESTAMP_TBL VALUES ('19970210 173201 America/New_York'); --- this fails (even though TZ is a no-op, we still look it up) -INSERT INTO TIMESTAMP_TBL VALUES ('19970710 173201 America/Does_not_exist'); -ERROR: time zone "america/does_not_exist" not recognized -LINE 1: INSERT INTO TIMESTAMP_TBL VALUES ('19970710 173201 America/D... - ^ --- Check date conversion and date arithmetic -INSERT INTO TIMESTAMP_TBL VALUES ('1997-06-10 18:32:01 PDT'); -INSERT INTO TIMESTAMP_TBL VALUES ('Feb 10 17:32:01 1997'); -INSERT INTO TIMESTAMP_TBL VALUES ('Feb 11 17:32:01 1997'); -INSERT INTO TIMESTAMP_TBL VALUES ('Feb 12 17:32:01 1997'); -INSERT INTO TIMESTAMP_TBL VALUES ('Feb 13 17:32:01 1997'); -INSERT INTO TIMESTAMP_TBL VALUES ('Feb 14 17:32:01 1997'); -INSERT INTO TIMESTAMP_TBL VALUES ('Feb 15 17:32:01 1997'); -INSERT INTO TIMESTAMP_TBL VALUES ('Feb 16 17:32:01 1997'); -INSERT INTO TIMESTAMP_TBL VALUES ('Feb 16 17:32:01 0097 BC'); -INSERT INTO TIMESTAMP_TBL VALUES ('Feb 16 17:32:01 0097'); -INSERT INTO TIMESTAMP_TBL VALUES ('Feb 16 17:32:01 0597'); -INSERT INTO TIMESTAMP_TBL VALUES ('Feb 16 17:32:01 1097'); -INSERT INTO TIMESTAMP_TBL VALUES ('Feb 16 17:32:01 1697'); -INSERT INTO TIMESTAMP_TBL VALUES ('Feb 16 17:32:01 1797'); -INSERT INTO TIMESTAMP_TBL VALUES ('Feb 16 17:32:01 1897'); -INSERT INTO TIMESTAMP_TBL VALUES ('Feb 16 17:32:01 1997'); -INSERT INTO TIMESTAMP_TBL VALUES ('Feb 16 17:32:01 2097'); -INSERT INTO TIMESTAMP_TBL VALUES ('Feb 28 17:32:01 1996'); -INSERT INTO TIMESTAMP_TBL VALUES ('Feb 29 17:32:01 1996'); -INSERT INTO TIMESTAMP_TBL VALUES ('Mar 01 17:32:01 1996'); -INSERT INTO TIMESTAMP_TBL VALUES ('Dec 30 17:32:01 1996'); -INSERT INTO TIMESTAMP_TBL VALUES ('Dec 31 17:32:01 1996'); -INSERT INTO TIMESTAMP_TBL VALUES ('Jan 01 17:32:01 1997'); -INSERT INTO TIMESTAMP_TBL VALUES ('Feb 28 17:32:01 1997'); -INSERT INTO TIMESTAMP_TBL VALUES ('Feb 29 17:32:01 1997'); -ERROR: date/time field value out of range: "Feb 29 17:32:01 1997" -LINE 1: INSERT INTO TIMESTAMP_TBL VALUES ('Feb 29 17:32:01 1997'); - ^ -INSERT INTO TIMESTAMP_TBL VALUES ('Mar 01 17:32:01 1997'); -INSERT INTO TIMESTAMP_TBL VALUES ('Dec 30 17:32:01 1997'); -INSERT INTO TIMESTAMP_TBL VALUES ('Dec 31 17:32:01 1997'); -INSERT INTO TIMESTAMP_TBL VALUES ('Dec 31 17:32:01 1999'); -INSERT INTO TIMESTAMP_TBL VALUES ('Jan 01 17:32:01 2000'); -INSERT INTO TIMESTAMP_TBL VALUES ('Dec 31 17:32:01 2000'); -INSERT INTO TIMESTAMP_TBL VALUES ('Jan 01 17:32:01 2001'); --- Currently unsupported syntax and ranges -INSERT INTO TIMESTAMP_TBL VALUES ('Feb 16 17:32:01 -0097'); -ERROR: time zone displacement out of range: "Feb 16 17:32:01 -0097" -LINE 1: INSERT INTO TIMESTAMP_TBL VALUES ('Feb 16 17:32:01 -0097'); - ^ -INSERT INTO TIMESTAMP_TBL VALUES ('Feb 16 17:32:01 5097 BC'); -ERROR: timestamp out of range: "Feb 16 17:32:01 5097 BC" -LINE 1: INSERT INTO TIMESTAMP_TBL VALUES ('Feb 16 17:32:01 5097 BC')... - ^ -SELECT d1 FROM TIMESTAMP_TBL; - d1 ------------------------------ - -infinity - infinity - Thu Jan 01 00:00:00 1970 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:02 1997 - Mon Feb 10 17:32:01.4 1997 - Mon Feb 10 17:32:01.5 1997 - Mon Feb 10 17:32:01.6 1997 - Thu Jan 02 00:00:00 1997 - Thu Jan 02 03:04:05 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Tue Jun 10 17:32:01 1997 - Sat Sep 22 18:19:20 2001 - Wed Mar 15 08:14:01 2000 - Wed Mar 15 13:14:02 2000 - Wed Mar 15 12:14:03 2000 - Wed Mar 15 03:14:04 2000 - Wed Mar 15 02:14:05 2000 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:00 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Tue Jun 10 18:32:01 1997 - Mon Feb 10 17:32:01 1997 - Tue Feb 11 17:32:01 1997 - Wed Feb 12 17:32:01 1997 - Thu Feb 13 17:32:01 1997 - Fri Feb 14 17:32:01 1997 - Sat Feb 15 17:32:01 1997 - Sun Feb 16 17:32:01 1997 - Tue Feb 16 17:32:01 0097 BC - Sat Feb 16 17:32:01 0097 - Thu Feb 16 17:32:01 0597 - Tue Feb 16 17:32:01 1097 - Sat Feb 16 17:32:01 1697 - Thu Feb 16 17:32:01 1797 - Tue Feb 16 17:32:01 1897 - Sun Feb 16 17:32:01 1997 - Sat Feb 16 17:32:01 2097 - Wed Feb 28 17:32:01 1996 - Thu Feb 29 17:32:01 1996 - Fri Mar 01 17:32:01 1996 - Mon Dec 30 17:32:01 1996 - Tue Dec 31 17:32:01 1996 - Wed Jan 01 17:32:01 1997 - Fri Feb 28 17:32:01 1997 - Sat Mar 01 17:32:01 1997 - Tue Dec 30 17:32:01 1997 - Wed Dec 31 17:32:01 1997 - Fri Dec 31 17:32:01 1999 - Sat Jan 01 17:32:01 2000 - Sun Dec 31 17:32:01 2000 - Mon Jan 01 17:32:01 2001 -(65 rows) - --- Check behavior at the boundaries of the timestamp range -SELECT '4714-11-24 00:00:00 BC'::timestamp; - timestamp ------------------------------ - Mon Nov 24 00:00:00 4714 BC -(1 row) - -SELECT '4714-11-23 23:59:59 BC'::timestamp; -- out of range -ERROR: timestamp out of range: "4714-11-23 23:59:59 BC" -LINE 1: SELECT '4714-11-23 23:59:59 BC'::timestamp; - ^ -SELECT '294276-12-31 23:59:59'::timestamp; - timestamp ----------------------------- - Sun Dec 31 23:59:59 294276 -(1 row) - -SELECT '294277-01-01 00:00:00'::timestamp; -- out of range -ERROR: timestamp out of range: "294277-01-01 00:00:00" -LINE 1: SELECT '294277-01-01 00:00:00'::timestamp; - ^ --- Demonstrate functions and operators -SELECT d1 FROM TIMESTAMP_TBL - WHERE d1 > timestamp without time zone '1997-01-02'; - d1 ----------------------------- - infinity - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:02 1997 - Mon Feb 10 17:32:01.4 1997 - Mon Feb 10 17:32:01.5 1997 - Mon Feb 10 17:32:01.6 1997 - Thu Jan 02 03:04:05 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Tue Jun 10 17:32:01 1997 - Sat Sep 22 18:19:20 2001 - Wed Mar 15 08:14:01 2000 - Wed Mar 15 13:14:02 2000 - Wed Mar 15 12:14:03 2000 - Wed Mar 15 03:14:04 2000 - Wed Mar 15 02:14:05 2000 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:00 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Tue Jun 10 18:32:01 1997 - Mon Feb 10 17:32:01 1997 - Tue Feb 11 17:32:01 1997 - Wed Feb 12 17:32:01 1997 - Thu Feb 13 17:32:01 1997 - Fri Feb 14 17:32:01 1997 - Sat Feb 15 17:32:01 1997 - Sun Feb 16 17:32:01 1997 - Sun Feb 16 17:32:01 1997 - Sat Feb 16 17:32:01 2097 - Fri Feb 28 17:32:01 1997 - Sat Mar 01 17:32:01 1997 - Tue Dec 30 17:32:01 1997 - Wed Dec 31 17:32:01 1997 - Fri Dec 31 17:32:01 1999 - Sat Jan 01 17:32:01 2000 - Sun Dec 31 17:32:01 2000 - Mon Jan 01 17:32:01 2001 -(49 rows) - -SELECT d1 FROM TIMESTAMP_TBL - WHERE d1 < timestamp without time zone '1997-01-02'; - d1 ------------------------------ - -infinity - Thu Jan 01 00:00:00 1970 - Tue Feb 16 17:32:01 0097 BC - Sat Feb 16 17:32:01 0097 - Thu Feb 16 17:32:01 0597 - Tue Feb 16 17:32:01 1097 - Sat Feb 16 17:32:01 1697 - Thu Feb 16 17:32:01 1797 - Tue Feb 16 17:32:01 1897 - Wed Feb 28 17:32:01 1996 - Thu Feb 29 17:32:01 1996 - Fri Mar 01 17:32:01 1996 - Mon Dec 30 17:32:01 1996 - Tue Dec 31 17:32:01 1996 - Wed Jan 01 17:32:01 1997 -(15 rows) - -SELECT d1 FROM TIMESTAMP_TBL - WHERE d1 = timestamp without time zone '1997-01-02'; - d1 --------------------------- - Thu Jan 02 00:00:00 1997 -(1 row) - -SELECT d1 FROM TIMESTAMP_TBL - WHERE d1 != timestamp without time zone '1997-01-02'; - d1 ------------------------------ - -infinity - infinity - Thu Jan 01 00:00:00 1970 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:02 1997 - Mon Feb 10 17:32:01.4 1997 - Mon Feb 10 17:32:01.5 1997 - Mon Feb 10 17:32:01.6 1997 - Thu Jan 02 03:04:05 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Tue Jun 10 17:32:01 1997 - Sat Sep 22 18:19:20 2001 - Wed Mar 15 08:14:01 2000 - Wed Mar 15 13:14:02 2000 - Wed Mar 15 12:14:03 2000 - Wed Mar 15 03:14:04 2000 - Wed Mar 15 02:14:05 2000 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:00 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Tue Jun 10 18:32:01 1997 - Mon Feb 10 17:32:01 1997 - Tue Feb 11 17:32:01 1997 - Wed Feb 12 17:32:01 1997 - Thu Feb 13 17:32:01 1997 - Fri Feb 14 17:32:01 1997 - Sat Feb 15 17:32:01 1997 - Sun Feb 16 17:32:01 1997 - Tue Feb 16 17:32:01 0097 BC - Sat Feb 16 17:32:01 0097 - Thu Feb 16 17:32:01 0597 - Tue Feb 16 17:32:01 1097 - Sat Feb 16 17:32:01 1697 - Thu Feb 16 17:32:01 1797 - Tue Feb 16 17:32:01 1897 - Sun Feb 16 17:32:01 1997 - Sat Feb 16 17:32:01 2097 - Wed Feb 28 17:32:01 1996 - Thu Feb 29 17:32:01 1996 - Fri Mar 01 17:32:01 1996 - Mon Dec 30 17:32:01 1996 - Tue Dec 31 17:32:01 1996 - Wed Jan 01 17:32:01 1997 - Fri Feb 28 17:32:01 1997 - Sat Mar 01 17:32:01 1997 - Tue Dec 30 17:32:01 1997 - Wed Dec 31 17:32:01 1997 - Fri Dec 31 17:32:01 1999 - Sat Jan 01 17:32:01 2000 - Sun Dec 31 17:32:01 2000 - Mon Jan 01 17:32:01 2001 -(64 rows) - -SELECT d1 FROM TIMESTAMP_TBL - WHERE d1 <= timestamp without time zone '1997-01-02'; - d1 ------------------------------ - -infinity - Thu Jan 01 00:00:00 1970 - Thu Jan 02 00:00:00 1997 - Tue Feb 16 17:32:01 0097 BC - Sat Feb 16 17:32:01 0097 - Thu Feb 16 17:32:01 0597 - Tue Feb 16 17:32:01 1097 - Sat Feb 16 17:32:01 1697 - Thu Feb 16 17:32:01 1797 - Tue Feb 16 17:32:01 1897 - Wed Feb 28 17:32:01 1996 - Thu Feb 29 17:32:01 1996 - Fri Mar 01 17:32:01 1996 - Mon Dec 30 17:32:01 1996 - Tue Dec 31 17:32:01 1996 - Wed Jan 01 17:32:01 1997 -(16 rows) - -SELECT d1 FROM TIMESTAMP_TBL - WHERE d1 >= timestamp without time zone '1997-01-02'; - d1 ----------------------------- - infinity - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:02 1997 - Mon Feb 10 17:32:01.4 1997 - Mon Feb 10 17:32:01.5 1997 - Mon Feb 10 17:32:01.6 1997 - Thu Jan 02 00:00:00 1997 - Thu Jan 02 03:04:05 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Tue Jun 10 17:32:01 1997 - Sat Sep 22 18:19:20 2001 - Wed Mar 15 08:14:01 2000 - Wed Mar 15 13:14:02 2000 - Wed Mar 15 12:14:03 2000 - Wed Mar 15 03:14:04 2000 - Wed Mar 15 02:14:05 2000 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:00 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Tue Jun 10 18:32:01 1997 - Mon Feb 10 17:32:01 1997 - Tue Feb 11 17:32:01 1997 - Wed Feb 12 17:32:01 1997 - Thu Feb 13 17:32:01 1997 - Fri Feb 14 17:32:01 1997 - Sat Feb 15 17:32:01 1997 - Sun Feb 16 17:32:01 1997 - Sun Feb 16 17:32:01 1997 - Sat Feb 16 17:32:01 2097 - Fri Feb 28 17:32:01 1997 - Sat Mar 01 17:32:01 1997 - Tue Dec 30 17:32:01 1997 - Wed Dec 31 17:32:01 1997 - Fri Dec 31 17:32:01 1999 - Sat Jan 01 17:32:01 2000 - Sun Dec 31 17:32:01 2000 - Mon Jan 01 17:32:01 2001 -(50 rows) - -SELECT d1 - timestamp without time zone '1997-01-02' AS diff - FROM TIMESTAMP_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01'; - diff ----------------------------------------- - @ 9863 days ago - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 2 secs - @ 39 days 17 hours 32 mins 1.4 secs - @ 39 days 17 hours 32 mins 1.5 secs - @ 39 days 17 hours 32 mins 1.6 secs - @ 0 - @ 3 hours 4 mins 5 secs - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 159 days 17 hours 32 mins 1 sec - @ 1724 days 18 hours 19 mins 20 secs - @ 1168 days 8 hours 14 mins 1 sec - @ 1168 days 13 hours 14 mins 2 secs - @ 1168 days 12 hours 14 mins 3 secs - @ 1168 days 3 hours 14 mins 4 secs - @ 1168 days 2 hours 14 mins 5 secs - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 159 days 18 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 40 days 17 hours 32 mins 1 sec - @ 41 days 17 hours 32 mins 1 sec - @ 42 days 17 hours 32 mins 1 sec - @ 43 days 17 hours 32 mins 1 sec - @ 44 days 17 hours 32 mins 1 sec - @ 45 days 17 hours 32 mins 1 sec - @ 45 days 17 hours 32 mins 1 sec - @ 308 days 6 hours 27 mins 59 secs ago - @ 307 days 6 hours 27 mins 59 secs ago - @ 306 days 6 hours 27 mins 59 secs ago - @ 2 days 6 hours 27 mins 59 secs ago - @ 1 day 6 hours 27 mins 59 secs ago - @ 6 hours 27 mins 59 secs ago - @ 57 days 17 hours 32 mins 1 sec - @ 58 days 17 hours 32 mins 1 sec - @ 362 days 17 hours 32 mins 1 sec - @ 363 days 17 hours 32 mins 1 sec - @ 1093 days 17 hours 32 mins 1 sec - @ 1094 days 17 hours 32 mins 1 sec - @ 1459 days 17 hours 32 mins 1 sec - @ 1460 days 17 hours 32 mins 1 sec -(55 rows) - -SELECT date_trunc( 'week', timestamp '2004-02-29 15:44:17.71393' ) AS week_trunc; - week_trunc --------------------------- - Mon Feb 23 00:00:00 2004 -(1 row) - --- verify date_bin behaves the same as date_trunc for relevant intervals --- case 1: AD dates, origin < input -SELECT - str, - interval, - date_trunc(str, ts) = date_bin(interval::interval, ts, timestamp '2001-01-01') AS equal -FROM ( - VALUES - ('week', '7 d'), - ('day', '1 d'), - ('hour', '1 h'), - ('minute', '1 m'), - ('second', '1 s'), - ('millisecond', '1 ms'), - ('microsecond', '1 us') -) intervals (str, interval), -(VALUES (timestamp '2020-02-29 15:44:17.71393')) ts (ts); - str | interval | equal --------------+----------+------- - week | 7 d | t - day | 1 d | t - hour | 1 h | t - minute | 1 m | t - second | 1 s | t - millisecond | 1 ms | t - microsecond | 1 us | t -(7 rows) - --- case 2: BC dates, origin < input -SELECT - str, - interval, - date_trunc(str, ts) = date_bin(interval::interval, ts, timestamp '2000-01-01 BC') AS equal -FROM ( - VALUES - ('week', '7 d'), - ('day', '1 d'), - ('hour', '1 h'), - ('minute', '1 m'), - ('second', '1 s'), - ('millisecond', '1 ms'), - ('microsecond', '1 us') -) intervals (str, interval), -(VALUES (timestamp '0055-6-10 15:44:17.71393 BC')) ts (ts); - str | interval | equal --------------+----------+------- - week | 7 d | t - day | 1 d | t - hour | 1 h | t - minute | 1 m | t - second | 1 s | t - millisecond | 1 ms | t - microsecond | 1 us | t -(7 rows) - --- case 3: AD dates, origin > input -SELECT - str, - interval, - date_trunc(str, ts) = date_bin(interval::interval, ts, timestamp '2020-03-02') AS equal -FROM ( - VALUES - ('week', '7 d'), - ('day', '1 d'), - ('hour', '1 h'), - ('minute', '1 m'), - ('second', '1 s'), - ('millisecond', '1 ms'), - ('microsecond', '1 us') -) intervals (str, interval), -(VALUES (timestamp '2020-02-29 15:44:17.71393')) ts (ts); - str | interval | equal --------------+----------+------- - week | 7 d | t - day | 1 d | t - hour | 1 h | t - minute | 1 m | t - second | 1 s | t - millisecond | 1 ms | t - microsecond | 1 us | t -(7 rows) - --- case 4: BC dates, origin > input -SELECT - str, - interval, - date_trunc(str, ts) = date_bin(interval::interval, ts, timestamp '0055-06-17 BC') AS equal -FROM ( - VALUES - ('week', '7 d'), - ('day', '1 d'), - ('hour', '1 h'), - ('minute', '1 m'), - ('second', '1 s'), - ('millisecond', '1 ms'), - ('microsecond', '1 us') -) intervals (str, interval), -(VALUES (timestamp '0055-6-10 15:44:17.71393 BC')) ts (ts); - str | interval | equal --------------+----------+------- - week | 7 d | t - day | 1 d | t - hour | 1 h | t - minute | 1 m | t - second | 1 s | t - millisecond | 1 ms | t - microsecond | 1 us | t -(7 rows) - --- bin timestamps into arbitrary intervals -SELECT - interval, - ts, - origin, - date_bin(interval::interval, ts, origin) -FROM ( - VALUES - ('15 days'), - ('2 hours'), - ('1 hour 30 minutes'), - ('15 minutes'), - ('10 seconds'), - ('100 milliseconds'), - ('250 microseconds') -) intervals (interval), -(VALUES (timestamp '2020-02-11 15:44:17.71393')) ts (ts), -(VALUES (timestamp '2001-01-01')) origin (origin); - interval | ts | origin | date_bin --------------------+--------------------------------+--------------------------+-------------------------------- - 15 days | Tue Feb 11 15:44:17.71393 2020 | Mon Jan 01 00:00:00 2001 | Thu Feb 06 00:00:00 2020 - 2 hours | Tue Feb 11 15:44:17.71393 2020 | Mon Jan 01 00:00:00 2001 | Tue Feb 11 14:00:00 2020 - 1 hour 30 minutes | Tue Feb 11 15:44:17.71393 2020 | Mon Jan 01 00:00:00 2001 | Tue Feb 11 15:00:00 2020 - 15 minutes | Tue Feb 11 15:44:17.71393 2020 | Mon Jan 01 00:00:00 2001 | Tue Feb 11 15:30:00 2020 - 10 seconds | Tue Feb 11 15:44:17.71393 2020 | Mon Jan 01 00:00:00 2001 | Tue Feb 11 15:44:10 2020 - 100 milliseconds | Tue Feb 11 15:44:17.71393 2020 | Mon Jan 01 00:00:00 2001 | Tue Feb 11 15:44:17.7 2020 - 250 microseconds | Tue Feb 11 15:44:17.71393 2020 | Mon Jan 01 00:00:00 2001 | Tue Feb 11 15:44:17.71375 2020 -(7 rows) - --- shift bins using the origin parameter: -SELECT date_bin('5 min'::interval, timestamp '2020-02-01 01:01:01', timestamp '2020-02-01 00:02:30'); - date_bin --------------------------- - Sat Feb 01 00:57:30 2020 -(1 row) - --- disallow intervals with months or years -SELECT date_bin('5 months'::interval, timestamp '2020-02-01 01:01:01', timestamp '2001-01-01'); -ERROR: timestamps cannot be binned into intervals containing months or years -SELECT date_bin('5 years'::interval, timestamp '2020-02-01 01:01:01', timestamp '2001-01-01'); -ERROR: timestamps cannot be binned into intervals containing months or years --- disallow zero intervals -SELECT date_bin('0 days'::interval, timestamp '1970-01-01 01:00:00' , timestamp '1970-01-01 00:00:00'); -ERROR: stride must be greater than zero --- disallow negative intervals -SELECT date_bin('-2 days'::interval, timestamp '1970-01-01 01:00:00' , timestamp '1970-01-01 00:00:00'); -ERROR: stride must be greater than zero --- Test casting within a BETWEEN qualifier -SELECT d1 - timestamp without time zone '1997-01-02' AS diff - FROM TIMESTAMP_TBL - WHERE d1 BETWEEN timestamp without time zone '1902-01-01' - AND timestamp without time zone '2038-01-01'; - diff ----------------------------------------- - @ 9863 days ago - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 2 secs - @ 39 days 17 hours 32 mins 1.4 secs - @ 39 days 17 hours 32 mins 1.5 secs - @ 39 days 17 hours 32 mins 1.6 secs - @ 0 - @ 3 hours 4 mins 5 secs - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 159 days 17 hours 32 mins 1 sec - @ 1724 days 18 hours 19 mins 20 secs - @ 1168 days 8 hours 14 mins 1 sec - @ 1168 days 13 hours 14 mins 2 secs - @ 1168 days 12 hours 14 mins 3 secs - @ 1168 days 3 hours 14 mins 4 secs - @ 1168 days 2 hours 14 mins 5 secs - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 159 days 18 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 40 days 17 hours 32 mins 1 sec - @ 41 days 17 hours 32 mins 1 sec - @ 42 days 17 hours 32 mins 1 sec - @ 43 days 17 hours 32 mins 1 sec - @ 44 days 17 hours 32 mins 1 sec - @ 45 days 17 hours 32 mins 1 sec - @ 45 days 17 hours 32 mins 1 sec - @ 308 days 6 hours 27 mins 59 secs ago - @ 307 days 6 hours 27 mins 59 secs ago - @ 306 days 6 hours 27 mins 59 secs ago - @ 2 days 6 hours 27 mins 59 secs ago - @ 1 day 6 hours 27 mins 59 secs ago - @ 6 hours 27 mins 59 secs ago - @ 57 days 17 hours 32 mins 1 sec - @ 58 days 17 hours 32 mins 1 sec - @ 362 days 17 hours 32 mins 1 sec - @ 363 days 17 hours 32 mins 1 sec - @ 1093 days 17 hours 32 mins 1 sec - @ 1094 days 17 hours 32 mins 1 sec - @ 1459 days 17 hours 32 mins 1 sec - @ 1460 days 17 hours 32 mins 1 sec -(55 rows) - --- DATE_PART (timestamp_part) -SELECT d1 as "timestamp", - date_part( 'year', d1) AS year, date_part( 'month', d1) AS month, - date_part( 'day', d1) AS day, date_part( 'hour', d1) AS hour, - date_part( 'minute', d1) AS minute, date_part( 'second', d1) AS second - FROM TIMESTAMP_TBL; - timestamp | year | month | day | hour | minute | second ------------------------------+-----------+-------+-----+------+--------+-------- - -infinity | -Infinity | | | | | - infinity | Infinity | | | | | - Thu Jan 01 00:00:00 1970 | 1970 | 1 | 1 | 0 | 0 | 0 - Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 17 | 32 | 1 - Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 17 | 32 | 1 - Mon Feb 10 17:32:02 1997 | 1997 | 2 | 10 | 17 | 32 | 2 - Mon Feb 10 17:32:01.4 1997 | 1997 | 2 | 10 | 17 | 32 | 1.4 - Mon Feb 10 17:32:01.5 1997 | 1997 | 2 | 10 | 17 | 32 | 1.5 - Mon Feb 10 17:32:01.6 1997 | 1997 | 2 | 10 | 17 | 32 | 1.6 - Thu Jan 02 00:00:00 1997 | 1997 | 1 | 2 | 0 | 0 | 0 - Thu Jan 02 03:04:05 1997 | 1997 | 1 | 2 | 3 | 4 | 5 - Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 17 | 32 | 1 - Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 17 | 32 | 1 - Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 17 | 32 | 1 - Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 17 | 32 | 1 - Tue Jun 10 17:32:01 1997 | 1997 | 6 | 10 | 17 | 32 | 1 - Sat Sep 22 18:19:20 2001 | 2001 | 9 | 22 | 18 | 19 | 20 - Wed Mar 15 08:14:01 2000 | 2000 | 3 | 15 | 8 | 14 | 1 - Wed Mar 15 13:14:02 2000 | 2000 | 3 | 15 | 13 | 14 | 2 - Wed Mar 15 12:14:03 2000 | 2000 | 3 | 15 | 12 | 14 | 3 - Wed Mar 15 03:14:04 2000 | 2000 | 3 | 15 | 3 | 14 | 4 - Wed Mar 15 02:14:05 2000 | 2000 | 3 | 15 | 2 | 14 | 5 - Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 17 | 32 | 1 - Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 17 | 32 | 1 - Mon Feb 10 17:32:00 1997 | 1997 | 2 | 10 | 17 | 32 | 0 - Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 17 | 32 | 1 - Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 17 | 32 | 1 - Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 17 | 32 | 1 - Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 17 | 32 | 1 - Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 17 | 32 | 1 - Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 17 | 32 | 1 - Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 17 | 32 | 1 - Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 17 | 32 | 1 - Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 17 | 32 | 1 - Tue Jun 10 18:32:01 1997 | 1997 | 6 | 10 | 18 | 32 | 1 - Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 17 | 32 | 1 - Tue Feb 11 17:32:01 1997 | 1997 | 2 | 11 | 17 | 32 | 1 - Wed Feb 12 17:32:01 1997 | 1997 | 2 | 12 | 17 | 32 | 1 - Thu Feb 13 17:32:01 1997 | 1997 | 2 | 13 | 17 | 32 | 1 - Fri Feb 14 17:32:01 1997 | 1997 | 2 | 14 | 17 | 32 | 1 - Sat Feb 15 17:32:01 1997 | 1997 | 2 | 15 | 17 | 32 | 1 - Sun Feb 16 17:32:01 1997 | 1997 | 2 | 16 | 17 | 32 | 1 - Tue Feb 16 17:32:01 0097 BC | -97 | 2 | 16 | 17 | 32 | 1 - Sat Feb 16 17:32:01 0097 | 97 | 2 | 16 | 17 | 32 | 1 - Thu Feb 16 17:32:01 0597 | 597 | 2 | 16 | 17 | 32 | 1 - Tue Feb 16 17:32:01 1097 | 1097 | 2 | 16 | 17 | 32 | 1 - Sat Feb 16 17:32:01 1697 | 1697 | 2 | 16 | 17 | 32 | 1 - Thu Feb 16 17:32:01 1797 | 1797 | 2 | 16 | 17 | 32 | 1 - Tue Feb 16 17:32:01 1897 | 1897 | 2 | 16 | 17 | 32 | 1 - Sun Feb 16 17:32:01 1997 | 1997 | 2 | 16 | 17 | 32 | 1 - Sat Feb 16 17:32:01 2097 | 2097 | 2 | 16 | 17 | 32 | 1 - Wed Feb 28 17:32:01 1996 | 1996 | 2 | 28 | 17 | 32 | 1 - Thu Feb 29 17:32:01 1996 | 1996 | 2 | 29 | 17 | 32 | 1 - Fri Mar 01 17:32:01 1996 | 1996 | 3 | 1 | 17 | 32 | 1 - Mon Dec 30 17:32:01 1996 | 1996 | 12 | 30 | 17 | 32 | 1 - Tue Dec 31 17:32:01 1996 | 1996 | 12 | 31 | 17 | 32 | 1 - Wed Jan 01 17:32:01 1997 | 1997 | 1 | 1 | 17 | 32 | 1 - Fri Feb 28 17:32:01 1997 | 1997 | 2 | 28 | 17 | 32 | 1 - Sat Mar 01 17:32:01 1997 | 1997 | 3 | 1 | 17 | 32 | 1 - Tue Dec 30 17:32:01 1997 | 1997 | 12 | 30 | 17 | 32 | 1 - Wed Dec 31 17:32:01 1997 | 1997 | 12 | 31 | 17 | 32 | 1 - Fri Dec 31 17:32:01 1999 | 1999 | 12 | 31 | 17 | 32 | 1 - Sat Jan 01 17:32:01 2000 | 2000 | 1 | 1 | 17 | 32 | 1 - Sun Dec 31 17:32:01 2000 | 2000 | 12 | 31 | 17 | 32 | 1 - Mon Jan 01 17:32:01 2001 | 2001 | 1 | 1 | 17 | 32 | 1 -(65 rows) - -SELECT d1 as "timestamp", - date_part( 'quarter', d1) AS quarter, date_part( 'msec', d1) AS msec, - date_part( 'usec', d1) AS usec - FROM TIMESTAMP_TBL; - timestamp | quarter | msec | usec ------------------------------+---------+-------+---------- - -infinity | | | - infinity | | | - Thu Jan 01 00:00:00 1970 | 1 | 0 | 0 - Mon Feb 10 17:32:01 1997 | 1 | 1000 | 1000000 - Mon Feb 10 17:32:01 1997 | 1 | 1000 | 1000000 - Mon Feb 10 17:32:02 1997 | 1 | 2000 | 2000000 - Mon Feb 10 17:32:01.4 1997 | 1 | 1400 | 1400000 - Mon Feb 10 17:32:01.5 1997 | 1 | 1500 | 1500000 - Mon Feb 10 17:32:01.6 1997 | 1 | 1600 | 1600000 - Thu Jan 02 00:00:00 1997 | 1 | 0 | 0 - Thu Jan 02 03:04:05 1997 | 1 | 5000 | 5000000 - Mon Feb 10 17:32:01 1997 | 1 | 1000 | 1000000 - Mon Feb 10 17:32:01 1997 | 1 | 1000 | 1000000 - Mon Feb 10 17:32:01 1997 | 1 | 1000 | 1000000 - Mon Feb 10 17:32:01 1997 | 1 | 1000 | 1000000 - Tue Jun 10 17:32:01 1997 | 2 | 1000 | 1000000 - Sat Sep 22 18:19:20 2001 | 3 | 20000 | 20000000 - Wed Mar 15 08:14:01 2000 | 1 | 1000 | 1000000 - Wed Mar 15 13:14:02 2000 | 1 | 2000 | 2000000 - Wed Mar 15 12:14:03 2000 | 1 | 3000 | 3000000 - Wed Mar 15 03:14:04 2000 | 1 | 4000 | 4000000 - Wed Mar 15 02:14:05 2000 | 1 | 5000 | 5000000 - Mon Feb 10 17:32:01 1997 | 1 | 1000 | 1000000 - Mon Feb 10 17:32:01 1997 | 1 | 1000 | 1000000 - Mon Feb 10 17:32:00 1997 | 1 | 0 | 0 - Mon Feb 10 17:32:01 1997 | 1 | 1000 | 1000000 - Mon Feb 10 17:32:01 1997 | 1 | 1000 | 1000000 - Mon Feb 10 17:32:01 1997 | 1 | 1000 | 1000000 - Mon Feb 10 17:32:01 1997 | 1 | 1000 | 1000000 - Mon Feb 10 17:32:01 1997 | 1 | 1000 | 1000000 - Mon Feb 10 17:32:01 1997 | 1 | 1000 | 1000000 - Mon Feb 10 17:32:01 1997 | 1 | 1000 | 1000000 - Mon Feb 10 17:32:01 1997 | 1 | 1000 | 1000000 - Mon Feb 10 17:32:01 1997 | 1 | 1000 | 1000000 - Tue Jun 10 18:32:01 1997 | 2 | 1000 | 1000000 - Mon Feb 10 17:32:01 1997 | 1 | 1000 | 1000000 - Tue Feb 11 17:32:01 1997 | 1 | 1000 | 1000000 - Wed Feb 12 17:32:01 1997 | 1 | 1000 | 1000000 - Thu Feb 13 17:32:01 1997 | 1 | 1000 | 1000000 - Fri Feb 14 17:32:01 1997 | 1 | 1000 | 1000000 - Sat Feb 15 17:32:01 1997 | 1 | 1000 | 1000000 - Sun Feb 16 17:32:01 1997 | 1 | 1000 | 1000000 - Tue Feb 16 17:32:01 0097 BC | 1 | 1000 | 1000000 - Sat Feb 16 17:32:01 0097 | 1 | 1000 | 1000000 - Thu Feb 16 17:32:01 0597 | 1 | 1000 | 1000000 - Tue Feb 16 17:32:01 1097 | 1 | 1000 | 1000000 - Sat Feb 16 17:32:01 1697 | 1 | 1000 | 1000000 - Thu Feb 16 17:32:01 1797 | 1 | 1000 | 1000000 - Tue Feb 16 17:32:01 1897 | 1 | 1000 | 1000000 - Sun Feb 16 17:32:01 1997 | 1 | 1000 | 1000000 - Sat Feb 16 17:32:01 2097 | 1 | 1000 | 1000000 - Wed Feb 28 17:32:01 1996 | 1 | 1000 | 1000000 - Thu Feb 29 17:32:01 1996 | 1 | 1000 | 1000000 - Fri Mar 01 17:32:01 1996 | 1 | 1000 | 1000000 - Mon Dec 30 17:32:01 1996 | 4 | 1000 | 1000000 - Tue Dec 31 17:32:01 1996 | 4 | 1000 | 1000000 - Wed Jan 01 17:32:01 1997 | 1 | 1000 | 1000000 - Fri Feb 28 17:32:01 1997 | 1 | 1000 | 1000000 - Sat Mar 01 17:32:01 1997 | 1 | 1000 | 1000000 - Tue Dec 30 17:32:01 1997 | 4 | 1000 | 1000000 - Wed Dec 31 17:32:01 1997 | 4 | 1000 | 1000000 - Fri Dec 31 17:32:01 1999 | 4 | 1000 | 1000000 - Sat Jan 01 17:32:01 2000 | 1 | 1000 | 1000000 - Sun Dec 31 17:32:01 2000 | 4 | 1000 | 1000000 - Mon Jan 01 17:32:01 2001 | 1 | 1000 | 1000000 -(65 rows) - -SELECT d1 as "timestamp", - date_part( 'isoyear', d1) AS isoyear, date_part( 'week', d1) AS week, - date_part( 'isodow', d1) AS isodow, date_part( 'dow', d1) AS dow, - date_part( 'doy', d1) AS doy - FROM TIMESTAMP_TBL; - timestamp | isoyear | week | isodow | dow | doy ------------------------------+-----------+------+--------+-----+----- - -infinity | -Infinity | | | | - infinity | Infinity | | | | - Thu Jan 01 00:00:00 1970 | 1970 | 1 | 4 | 4 | 1 - Mon Feb 10 17:32:01 1997 | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 17:32:01 1997 | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 17:32:02 1997 | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 17:32:01.4 1997 | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 17:32:01.5 1997 | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 17:32:01.6 1997 | 1997 | 7 | 1 | 1 | 41 - Thu Jan 02 00:00:00 1997 | 1997 | 1 | 4 | 4 | 2 - Thu Jan 02 03:04:05 1997 | 1997 | 1 | 4 | 4 | 2 - Mon Feb 10 17:32:01 1997 | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 17:32:01 1997 | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 17:32:01 1997 | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 17:32:01 1997 | 1997 | 7 | 1 | 1 | 41 - Tue Jun 10 17:32:01 1997 | 1997 | 24 | 2 | 2 | 161 - Sat Sep 22 18:19:20 2001 | 2001 | 38 | 6 | 6 | 265 - Wed Mar 15 08:14:01 2000 | 2000 | 11 | 3 | 3 | 75 - Wed Mar 15 13:14:02 2000 | 2000 | 11 | 3 | 3 | 75 - Wed Mar 15 12:14:03 2000 | 2000 | 11 | 3 | 3 | 75 - Wed Mar 15 03:14:04 2000 | 2000 | 11 | 3 | 3 | 75 - Wed Mar 15 02:14:05 2000 | 2000 | 11 | 3 | 3 | 75 - Mon Feb 10 17:32:01 1997 | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 17:32:01 1997 | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 17:32:00 1997 | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 17:32:01 1997 | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 17:32:01 1997 | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 17:32:01 1997 | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 17:32:01 1997 | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 17:32:01 1997 | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 17:32:01 1997 | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 17:32:01 1997 | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 17:32:01 1997 | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 17:32:01 1997 | 1997 | 7 | 1 | 1 | 41 - Tue Jun 10 18:32:01 1997 | 1997 | 24 | 2 | 2 | 161 - Mon Feb 10 17:32:01 1997 | 1997 | 7 | 1 | 1 | 41 - Tue Feb 11 17:32:01 1997 | 1997 | 7 | 2 | 2 | 42 - Wed Feb 12 17:32:01 1997 | 1997 | 7 | 3 | 3 | 43 - Thu Feb 13 17:32:01 1997 | 1997 | 7 | 4 | 4 | 44 - Fri Feb 14 17:32:01 1997 | 1997 | 7 | 5 | 5 | 45 - Sat Feb 15 17:32:01 1997 | 1997 | 7 | 6 | 6 | 46 - Sun Feb 16 17:32:01 1997 | 1997 | 7 | 7 | 0 | 47 - Tue Feb 16 17:32:01 0097 BC | -97 | 7 | 2 | 2 | 47 - Sat Feb 16 17:32:01 0097 | 97 | 7 | 6 | 6 | 47 - Thu Feb 16 17:32:01 0597 | 597 | 7 | 4 | 4 | 47 - Tue Feb 16 17:32:01 1097 | 1097 | 7 | 2 | 2 | 47 - Sat Feb 16 17:32:01 1697 | 1697 | 7 | 6 | 6 | 47 - Thu Feb 16 17:32:01 1797 | 1797 | 7 | 4 | 4 | 47 - Tue Feb 16 17:32:01 1897 | 1897 | 7 | 2 | 2 | 47 - Sun Feb 16 17:32:01 1997 | 1997 | 7 | 7 | 0 | 47 - Sat Feb 16 17:32:01 2097 | 2097 | 7 | 6 | 6 | 47 - Wed Feb 28 17:32:01 1996 | 1996 | 9 | 3 | 3 | 59 - Thu Feb 29 17:32:01 1996 | 1996 | 9 | 4 | 4 | 60 - Fri Mar 01 17:32:01 1996 | 1996 | 9 | 5 | 5 | 61 - Mon Dec 30 17:32:01 1996 | 1997 | 1 | 1 | 1 | 365 - Tue Dec 31 17:32:01 1996 | 1997 | 1 | 2 | 2 | 366 - Wed Jan 01 17:32:01 1997 | 1997 | 1 | 3 | 3 | 1 - Fri Feb 28 17:32:01 1997 | 1997 | 9 | 5 | 5 | 59 - Sat Mar 01 17:32:01 1997 | 1997 | 9 | 6 | 6 | 60 - Tue Dec 30 17:32:01 1997 | 1998 | 1 | 2 | 2 | 364 - Wed Dec 31 17:32:01 1997 | 1998 | 1 | 3 | 3 | 365 - Fri Dec 31 17:32:01 1999 | 1999 | 52 | 5 | 5 | 365 - Sat Jan 01 17:32:01 2000 | 1999 | 52 | 6 | 6 | 1 - Sun Dec 31 17:32:01 2000 | 2000 | 52 | 7 | 0 | 366 - Mon Jan 01 17:32:01 2001 | 2001 | 1 | 1 | 1 | 1 -(65 rows) - -SELECT d1 as "timestamp", - date_part( 'decade', d1) AS decade, - date_part( 'century', d1) AS century, - date_part( 'millennium', d1) AS millennium, - round(date_part( 'julian', d1)) AS julian, - date_part( 'epoch', d1) AS epoch - FROM TIMESTAMP_TBL; - timestamp | decade | century | millennium | julian | epoch ------------------------------+-----------+-----------+------------+-----------+-------------- - -infinity | -Infinity | -Infinity | -Infinity | -Infinity | -Infinity - infinity | Infinity | Infinity | Infinity | Infinity | Infinity - Thu Jan 01 00:00:00 1970 | 197 | 20 | 2 | 2440588 | 0 - Mon Feb 10 17:32:01 1997 | 199 | 20 | 2 | 2450491 | 855595921 - Mon Feb 10 17:32:01 1997 | 199 | 20 | 2 | 2450491 | 855595921 - Mon Feb 10 17:32:02 1997 | 199 | 20 | 2 | 2450491 | 855595922 - Mon Feb 10 17:32:01.4 1997 | 199 | 20 | 2 | 2450491 | 855595921.4 - Mon Feb 10 17:32:01.5 1997 | 199 | 20 | 2 | 2450491 | 855595921.5 - Mon Feb 10 17:32:01.6 1997 | 199 | 20 | 2 | 2450491 | 855595921.6 - Thu Jan 02 00:00:00 1997 | 199 | 20 | 2 | 2450451 | 852163200 - Thu Jan 02 03:04:05 1997 | 199 | 20 | 2 | 2450451 | 852174245 - Mon Feb 10 17:32:01 1997 | 199 | 20 | 2 | 2450491 | 855595921 - Mon Feb 10 17:32:01 1997 | 199 | 20 | 2 | 2450491 | 855595921 - Mon Feb 10 17:32:01 1997 | 199 | 20 | 2 | 2450491 | 855595921 - Mon Feb 10 17:32:01 1997 | 199 | 20 | 2 | 2450491 | 855595921 - Tue Jun 10 17:32:01 1997 | 199 | 20 | 2 | 2450611 | 865963921 - Sat Sep 22 18:19:20 2001 | 200 | 21 | 3 | 2452176 | 1001182760 - Wed Mar 15 08:14:01 2000 | 200 | 20 | 2 | 2451619 | 953108041 - Wed Mar 15 13:14:02 2000 | 200 | 20 | 2 | 2451620 | 953126042 - Wed Mar 15 12:14:03 2000 | 200 | 20 | 2 | 2451620 | 953122443 - Wed Mar 15 03:14:04 2000 | 200 | 20 | 2 | 2451619 | 953090044 - Wed Mar 15 02:14:05 2000 | 200 | 20 | 2 | 2451619 | 953086445 - Mon Feb 10 17:32:01 1997 | 199 | 20 | 2 | 2450491 | 855595921 - Mon Feb 10 17:32:01 1997 | 199 | 20 | 2 | 2450491 | 855595921 - Mon Feb 10 17:32:00 1997 | 199 | 20 | 2 | 2450491 | 855595920 - Mon Feb 10 17:32:01 1997 | 199 | 20 | 2 | 2450491 | 855595921 - Mon Feb 10 17:32:01 1997 | 199 | 20 | 2 | 2450491 | 855595921 - Mon Feb 10 17:32:01 1997 | 199 | 20 | 2 | 2450491 | 855595921 - Mon Feb 10 17:32:01 1997 | 199 | 20 | 2 | 2450491 | 855595921 - Mon Feb 10 17:32:01 1997 | 199 | 20 | 2 | 2450491 | 855595921 - Mon Feb 10 17:32:01 1997 | 199 | 20 | 2 | 2450491 | 855595921 - Mon Feb 10 17:32:01 1997 | 199 | 20 | 2 | 2450491 | 855595921 - Mon Feb 10 17:32:01 1997 | 199 | 20 | 2 | 2450491 | 855595921 - Mon Feb 10 17:32:01 1997 | 199 | 20 | 2 | 2450491 | 855595921 - Tue Jun 10 18:32:01 1997 | 199 | 20 | 2 | 2450611 | 865967521 - Mon Feb 10 17:32:01 1997 | 199 | 20 | 2 | 2450491 | 855595921 - Tue Feb 11 17:32:01 1997 | 199 | 20 | 2 | 2450492 | 855682321 - Wed Feb 12 17:32:01 1997 | 199 | 20 | 2 | 2450493 | 855768721 - Thu Feb 13 17:32:01 1997 | 199 | 20 | 2 | 2450494 | 855855121 - Fri Feb 14 17:32:01 1997 | 199 | 20 | 2 | 2450495 | 855941521 - Sat Feb 15 17:32:01 1997 | 199 | 20 | 2 | 2450496 | 856027921 - Sun Feb 16 17:32:01 1997 | 199 | 20 | 2 | 2450497 | 856114321 - Tue Feb 16 17:32:01 0097 BC | -10 | -1 | -1 | 1686043 | -65192711279 - Sat Feb 16 17:32:01 0097 | 9 | 1 | 1 | 1756537 | -59102029679 - Thu Feb 16 17:32:01 0597 | 59 | 6 | 1 | 1939158 | -43323575279 - Tue Feb 16 17:32:01 1097 | 109 | 11 | 2 | 2121779 | -27545120879 - Sat Feb 16 17:32:01 1697 | 169 | 17 | 2 | 2340925 | -8610906479 - Thu Feb 16 17:32:01 1797 | 179 | 18 | 2 | 2377449 | -5455232879 - Tue Feb 16 17:32:01 1897 | 189 | 19 | 2 | 2413973 | -2299559279 - Sun Feb 16 17:32:01 1997 | 199 | 20 | 2 | 2450497 | 856114321 - Sat Feb 16 17:32:01 2097 | 209 | 21 | 3 | 2487022 | 4011874321 - Wed Feb 28 17:32:01 1996 | 199 | 20 | 2 | 2450143 | 825528721 - Thu Feb 29 17:32:01 1996 | 199 | 20 | 2 | 2450144 | 825615121 - Fri Mar 01 17:32:01 1996 | 199 | 20 | 2 | 2450145 | 825701521 - Mon Dec 30 17:32:01 1996 | 199 | 20 | 2 | 2450449 | 851967121 - Tue Dec 31 17:32:01 1996 | 199 | 20 | 2 | 2450450 | 852053521 - Wed Jan 01 17:32:01 1997 | 199 | 20 | 2 | 2450451 | 852139921 - Fri Feb 28 17:32:01 1997 | 199 | 20 | 2 | 2450509 | 857151121 - Sat Mar 01 17:32:01 1997 | 199 | 20 | 2 | 2450510 | 857237521 - Tue Dec 30 17:32:01 1997 | 199 | 20 | 2 | 2450814 | 883503121 - Wed Dec 31 17:32:01 1997 | 199 | 20 | 2 | 2450815 | 883589521 - Fri Dec 31 17:32:01 1999 | 199 | 20 | 2 | 2451545 | 946661521 - Sat Jan 01 17:32:01 2000 | 200 | 20 | 2 | 2451546 | 946747921 - Sun Dec 31 17:32:01 2000 | 200 | 20 | 2 | 2451911 | 978283921 - Mon Jan 01 17:32:01 2001 | 200 | 21 | 3 | 2451912 | 978370321 -(65 rows) - --- extract implementation is mostly the same as date_part, so only --- test a few cases for additional coverage. -SELECT d1 as "timestamp", - extract(microseconds from d1) AS microseconds, - extract(milliseconds from d1) AS milliseconds, - extract(seconds from d1) AS seconds, - round(extract(julian from d1)) AS julian, - extract(epoch from d1) AS epoch - FROM TIMESTAMP_TBL; - timestamp | microseconds | milliseconds | seconds | julian | epoch ------------------------------+--------------+--------------+-----------+-----------+--------------------- - -infinity | | | | -Infinity | -Infinity - infinity | | | | Infinity | Infinity - Thu Jan 01 00:00:00 1970 | 0 | 0.000 | 0.000000 | 2440588 | 0.000000 - Mon Feb 10 17:32:01 1997 | 1000000 | 1000.000 | 1.000000 | 2450491 | 855595921.000000 - Mon Feb 10 17:32:01 1997 | 1000000 | 1000.000 | 1.000000 | 2450491 | 855595921.000000 - Mon Feb 10 17:32:02 1997 | 2000000 | 2000.000 | 2.000000 | 2450491 | 855595922.000000 - Mon Feb 10 17:32:01.4 1997 | 1400000 | 1400.000 | 1.400000 | 2450491 | 855595921.400000 - Mon Feb 10 17:32:01.5 1997 | 1500000 | 1500.000 | 1.500000 | 2450491 | 855595921.500000 - Mon Feb 10 17:32:01.6 1997 | 1600000 | 1600.000 | 1.600000 | 2450491 | 855595921.600000 - Thu Jan 02 00:00:00 1997 | 0 | 0.000 | 0.000000 | 2450451 | 852163200.000000 - Thu Jan 02 03:04:05 1997 | 5000000 | 5000.000 | 5.000000 | 2450451 | 852174245.000000 - Mon Feb 10 17:32:01 1997 | 1000000 | 1000.000 | 1.000000 | 2450491 | 855595921.000000 - Mon Feb 10 17:32:01 1997 | 1000000 | 1000.000 | 1.000000 | 2450491 | 855595921.000000 - Mon Feb 10 17:32:01 1997 | 1000000 | 1000.000 | 1.000000 | 2450491 | 855595921.000000 - Mon Feb 10 17:32:01 1997 | 1000000 | 1000.000 | 1.000000 | 2450491 | 855595921.000000 - Tue Jun 10 17:32:01 1997 | 1000000 | 1000.000 | 1.000000 | 2450611 | 865963921.000000 - Sat Sep 22 18:19:20 2001 | 20000000 | 20000.000 | 20.000000 | 2452176 | 1001182760.000000 - Wed Mar 15 08:14:01 2000 | 1000000 | 1000.000 | 1.000000 | 2451619 | 953108041.000000 - Wed Mar 15 13:14:02 2000 | 2000000 | 2000.000 | 2.000000 | 2451620 | 953126042.000000 - Wed Mar 15 12:14:03 2000 | 3000000 | 3000.000 | 3.000000 | 2451620 | 953122443.000000 - Wed Mar 15 03:14:04 2000 | 4000000 | 4000.000 | 4.000000 | 2451619 | 953090044.000000 - Wed Mar 15 02:14:05 2000 | 5000000 | 5000.000 | 5.000000 | 2451619 | 953086445.000000 - Mon Feb 10 17:32:01 1997 | 1000000 | 1000.000 | 1.000000 | 2450491 | 855595921.000000 - Mon Feb 10 17:32:01 1997 | 1000000 | 1000.000 | 1.000000 | 2450491 | 855595921.000000 - Mon Feb 10 17:32:00 1997 | 0 | 0.000 | 0.000000 | 2450491 | 855595920.000000 - Mon Feb 10 17:32:01 1997 | 1000000 | 1000.000 | 1.000000 | 2450491 | 855595921.000000 - Mon Feb 10 17:32:01 1997 | 1000000 | 1000.000 | 1.000000 | 2450491 | 855595921.000000 - Mon Feb 10 17:32:01 1997 | 1000000 | 1000.000 | 1.000000 | 2450491 | 855595921.000000 - Mon Feb 10 17:32:01 1997 | 1000000 | 1000.000 | 1.000000 | 2450491 | 855595921.000000 - Mon Feb 10 17:32:01 1997 | 1000000 | 1000.000 | 1.000000 | 2450491 | 855595921.000000 - Mon Feb 10 17:32:01 1997 | 1000000 | 1000.000 | 1.000000 | 2450491 | 855595921.000000 - Mon Feb 10 17:32:01 1997 | 1000000 | 1000.000 | 1.000000 | 2450491 | 855595921.000000 - Mon Feb 10 17:32:01 1997 | 1000000 | 1000.000 | 1.000000 | 2450491 | 855595921.000000 - Mon Feb 10 17:32:01 1997 | 1000000 | 1000.000 | 1.000000 | 2450491 | 855595921.000000 - Tue Jun 10 18:32:01 1997 | 1000000 | 1000.000 | 1.000000 | 2450611 | 865967521.000000 - Mon Feb 10 17:32:01 1997 | 1000000 | 1000.000 | 1.000000 | 2450491 | 855595921.000000 - Tue Feb 11 17:32:01 1997 | 1000000 | 1000.000 | 1.000000 | 2450492 | 855682321.000000 - Wed Feb 12 17:32:01 1997 | 1000000 | 1000.000 | 1.000000 | 2450493 | 855768721.000000 - Thu Feb 13 17:32:01 1997 | 1000000 | 1000.000 | 1.000000 | 2450494 | 855855121.000000 - Fri Feb 14 17:32:01 1997 | 1000000 | 1000.000 | 1.000000 | 2450495 | 855941521.000000 - Sat Feb 15 17:32:01 1997 | 1000000 | 1000.000 | 1.000000 | 2450496 | 856027921.000000 - Sun Feb 16 17:32:01 1997 | 1000000 | 1000.000 | 1.000000 | 2450497 | 856114321.000000 - Tue Feb 16 17:32:01 0097 BC | 1000000 | 1000.000 | 1.000000 | 1686043 | -65192711279.000000 - Sat Feb 16 17:32:01 0097 | 1000000 | 1000.000 | 1.000000 | 1756537 | -59102029679.000000 - Thu Feb 16 17:32:01 0597 | 1000000 | 1000.000 | 1.000000 | 1939158 | -43323575279.000000 - Tue Feb 16 17:32:01 1097 | 1000000 | 1000.000 | 1.000000 | 2121779 | -27545120879.000000 - Sat Feb 16 17:32:01 1697 | 1000000 | 1000.000 | 1.000000 | 2340925 | -8610906479.000000 - Thu Feb 16 17:32:01 1797 | 1000000 | 1000.000 | 1.000000 | 2377449 | -5455232879.000000 - Tue Feb 16 17:32:01 1897 | 1000000 | 1000.000 | 1.000000 | 2413973 | -2299559279.000000 - Sun Feb 16 17:32:01 1997 | 1000000 | 1000.000 | 1.000000 | 2450497 | 856114321.000000 - Sat Feb 16 17:32:01 2097 | 1000000 | 1000.000 | 1.000000 | 2487022 | 4011874321.000000 - Wed Feb 28 17:32:01 1996 | 1000000 | 1000.000 | 1.000000 | 2450143 | 825528721.000000 - Thu Feb 29 17:32:01 1996 | 1000000 | 1000.000 | 1.000000 | 2450144 | 825615121.000000 - Fri Mar 01 17:32:01 1996 | 1000000 | 1000.000 | 1.000000 | 2450145 | 825701521.000000 - Mon Dec 30 17:32:01 1996 | 1000000 | 1000.000 | 1.000000 | 2450449 | 851967121.000000 - Tue Dec 31 17:32:01 1996 | 1000000 | 1000.000 | 1.000000 | 2450450 | 852053521.000000 - Wed Jan 01 17:32:01 1997 | 1000000 | 1000.000 | 1.000000 | 2450451 | 852139921.000000 - Fri Feb 28 17:32:01 1997 | 1000000 | 1000.000 | 1.000000 | 2450509 | 857151121.000000 - Sat Mar 01 17:32:01 1997 | 1000000 | 1000.000 | 1.000000 | 2450510 | 857237521.000000 - Tue Dec 30 17:32:01 1997 | 1000000 | 1000.000 | 1.000000 | 2450814 | 883503121.000000 - Wed Dec 31 17:32:01 1997 | 1000000 | 1000.000 | 1.000000 | 2450815 | 883589521.000000 - Fri Dec 31 17:32:01 1999 | 1000000 | 1000.000 | 1.000000 | 2451545 | 946661521.000000 - Sat Jan 01 17:32:01 2000 | 1000000 | 1000.000 | 1.000000 | 2451546 | 946747921.000000 - Sun Dec 31 17:32:01 2000 | 1000000 | 1000.000 | 1.000000 | 2451911 | 978283921.000000 - Mon Jan 01 17:32:01 2001 | 1000000 | 1000.000 | 1.000000 | 2451912 | 978370321.000000 -(65 rows) - --- value near upper bound uses special case in code -SELECT date_part('epoch', '294270-01-01 00:00:00'::timestamp); - date_part ---------------- - 9224097091200 -(1 row) - -SELECT extract(epoch from '294270-01-01 00:00:00'::timestamp); - extract ----------------------- - 9224097091200.000000 -(1 row) - --- another internal overflow test case -SELECT extract(epoch from '5000-01-01 00:00:00'::timestamp); - extract --------------------- - 95617584000.000000 -(1 row) - --- TO_CHAR() -SELECT to_char(d1, 'DAY Day day DY Dy dy MONTH Month month RM MON Mon mon') - FROM TIMESTAMP_TBL; - to_char ------------------------------------------------------------------------------------------- - - - THURSDAY Thursday thursday THU Thu thu JANUARY January january I JAN Jan jan - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - THURSDAY Thursday thursday THU Thu thu JANUARY January january I JAN Jan jan - THURSDAY Thursday thursday THU Thu thu JANUARY January january I JAN Jan jan - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - TUESDAY Tuesday tuesday TUE Tue tue JUNE June june VI JUN Jun jun - SATURDAY Saturday saturday SAT Sat sat SEPTEMBER September september IX SEP Sep sep - WEDNESDAY Wednesday wednesday WED Wed wed MARCH March march III MAR Mar mar - WEDNESDAY Wednesday wednesday WED Wed wed MARCH March march III MAR Mar mar - WEDNESDAY Wednesday wednesday WED Wed wed MARCH March march III MAR Mar mar - WEDNESDAY Wednesday wednesday WED Wed wed MARCH March march III MAR Mar mar - WEDNESDAY Wednesday wednesday WED Wed wed MARCH March march III MAR Mar mar - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - TUESDAY Tuesday tuesday TUE Tue tue JUNE June june VI JUN Jun jun - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - TUESDAY Tuesday tuesday TUE Tue tue FEBRUARY February february II FEB Feb feb - WEDNESDAY Wednesday wednesday WED Wed wed FEBRUARY February february II FEB Feb feb - THURSDAY Thursday thursday THU Thu thu FEBRUARY February february II FEB Feb feb - FRIDAY Friday friday FRI Fri fri FEBRUARY February february II FEB Feb feb - SATURDAY Saturday saturday SAT Sat sat FEBRUARY February february II FEB Feb feb - SUNDAY Sunday sunday SUN Sun sun FEBRUARY February february II FEB Feb feb - TUESDAY Tuesday tuesday TUE Tue tue FEBRUARY February february II FEB Feb feb - SATURDAY Saturday saturday SAT Sat sat FEBRUARY February february II FEB Feb feb - THURSDAY Thursday thursday THU Thu thu FEBRUARY February february II FEB Feb feb - TUESDAY Tuesday tuesday TUE Tue tue FEBRUARY February february II FEB Feb feb - SATURDAY Saturday saturday SAT Sat sat FEBRUARY February february II FEB Feb feb - THURSDAY Thursday thursday THU Thu thu FEBRUARY February february II FEB Feb feb - TUESDAY Tuesday tuesday TUE Tue tue FEBRUARY February february II FEB Feb feb - SUNDAY Sunday sunday SUN Sun sun FEBRUARY February february II FEB Feb feb - SATURDAY Saturday saturday SAT Sat sat FEBRUARY February february II FEB Feb feb - WEDNESDAY Wednesday wednesday WED Wed wed FEBRUARY February february II FEB Feb feb - THURSDAY Thursday thursday THU Thu thu FEBRUARY February february II FEB Feb feb - FRIDAY Friday friday FRI Fri fri MARCH March march III MAR Mar mar - MONDAY Monday monday MON Mon mon DECEMBER December december XII DEC Dec dec - TUESDAY Tuesday tuesday TUE Tue tue DECEMBER December december XII DEC Dec dec - WEDNESDAY Wednesday wednesday WED Wed wed JANUARY January january I JAN Jan jan - FRIDAY Friday friday FRI Fri fri FEBRUARY February february II FEB Feb feb - SATURDAY Saturday saturday SAT Sat sat MARCH March march III MAR Mar mar - TUESDAY Tuesday tuesday TUE Tue tue DECEMBER December december XII DEC Dec dec - WEDNESDAY Wednesday wednesday WED Wed wed DECEMBER December december XII DEC Dec dec - FRIDAY Friday friday FRI Fri fri DECEMBER December december XII DEC Dec dec - SATURDAY Saturday saturday SAT Sat sat JANUARY January january I JAN Jan jan - SUNDAY Sunday sunday SUN Sun sun DECEMBER December december XII DEC Dec dec - MONDAY Monday monday MON Mon mon JANUARY January january I JAN Jan jan -(65 rows) - -SELECT to_char(d1, 'FMDAY FMDay FMday FMMONTH FMMonth FMmonth FMRM') - FROM TIMESTAMP_TBL; - to_char --------------------------------------------------------------- - - - THURSDAY Thursday thursday JANUARY January january I - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - THURSDAY Thursday thursday JANUARY January january I - THURSDAY Thursday thursday JANUARY January january I - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - TUESDAY Tuesday tuesday JUNE June june VI - SATURDAY Saturday saturday SEPTEMBER September september IX - WEDNESDAY Wednesday wednesday MARCH March march III - WEDNESDAY Wednesday wednesday MARCH March march III - WEDNESDAY Wednesday wednesday MARCH March march III - WEDNESDAY Wednesday wednesday MARCH March march III - WEDNESDAY Wednesday wednesday MARCH March march III - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - TUESDAY Tuesday tuesday JUNE June june VI - MONDAY Monday monday FEBRUARY February february II - TUESDAY Tuesday tuesday FEBRUARY February february II - WEDNESDAY Wednesday wednesday FEBRUARY February february II - THURSDAY Thursday thursday FEBRUARY February february II - FRIDAY Friday friday FEBRUARY February february II - SATURDAY Saturday saturday FEBRUARY February february II - SUNDAY Sunday sunday FEBRUARY February february II - TUESDAY Tuesday tuesday FEBRUARY February february II - SATURDAY Saturday saturday FEBRUARY February february II - THURSDAY Thursday thursday FEBRUARY February february II - TUESDAY Tuesday tuesday FEBRUARY February february II - SATURDAY Saturday saturday FEBRUARY February february II - THURSDAY Thursday thursday FEBRUARY February february II - TUESDAY Tuesday tuesday FEBRUARY February february II - SUNDAY Sunday sunday FEBRUARY February february II - SATURDAY Saturday saturday FEBRUARY February february II - WEDNESDAY Wednesday wednesday FEBRUARY February february II - THURSDAY Thursday thursday FEBRUARY February february II - FRIDAY Friday friday MARCH March march III - MONDAY Monday monday DECEMBER December december XII - TUESDAY Tuesday tuesday DECEMBER December december XII - WEDNESDAY Wednesday wednesday JANUARY January january I - FRIDAY Friday friday FEBRUARY February february II - SATURDAY Saturday saturday MARCH March march III - TUESDAY Tuesday tuesday DECEMBER December december XII - WEDNESDAY Wednesday wednesday DECEMBER December december XII - FRIDAY Friday friday DECEMBER December december XII - SATURDAY Saturday saturday JANUARY January january I - SUNDAY Sunday sunday DECEMBER December december XII - MONDAY Monday monday JANUARY January january I -(65 rows) - -SELECT to_char(d1, 'Y,YYY YYYY YYY YY Y CC Q MM WW DDD DD D J') - FROM TIMESTAMP_TBL; - to_char --------------------------------------------------- - - - 1,970 1970 970 70 0 20 1 01 01 001 01 5 2440588 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 01 01 002 02 5 2450451 - 1,997 1997 997 97 7 20 1 01 01 002 02 5 2450451 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 2 06 23 161 10 3 2450610 - 2,001 2001 001 01 1 21 3 09 38 265 22 7 2452175 - 2,000 2000 000 00 0 20 1 03 11 075 15 4 2451619 - 2,000 2000 000 00 0 20 1 03 11 075 15 4 2451619 - 2,000 2000 000 00 0 20 1 03 11 075 15 4 2451619 - 2,000 2000 000 00 0 20 1 03 11 075 15 4 2451619 - 2,000 2000 000 00 0 20 1 03 11 075 15 4 2451619 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 2 06 23 161 10 3 2450610 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 042 11 3 2450491 - 1,997 1997 997 97 7 20 1 02 07 043 12 4 2450492 - 1,997 1997 997 97 7 20 1 02 07 044 13 5 2450493 - 1,997 1997 997 97 7 20 1 02 07 045 14 6 2450494 - 1,997 1997 997 97 7 20 1 02 07 046 15 7 2450495 - 1,997 1997 997 97 7 20 1 02 07 047 16 1 2450496 - 0,097 0097 097 97 7 -01 1 02 07 047 16 3 1686042 - 0,097 0097 097 97 7 01 1 02 07 047 16 7 1756536 - 0,597 0597 597 97 7 06 1 02 07 047 16 5 1939157 - 1,097 1097 097 97 7 11 1 02 07 047 16 3 2121778 - 1,697 1697 697 97 7 17 1 02 07 047 16 7 2340924 - 1,797 1797 797 97 7 18 1 02 07 047 16 5 2377448 - 1,897 1897 897 97 7 19 1 02 07 047 16 3 2413972 - 1,997 1997 997 97 7 20 1 02 07 047 16 1 2450496 - 2,097 2097 097 97 7 21 1 02 07 047 16 7 2487021 - 1,996 1996 996 96 6 20 1 02 09 059 28 4 2450142 - 1,996 1996 996 96 6 20 1 02 09 060 29 5 2450143 - 1,996 1996 996 96 6 20 1 03 09 061 01 6 2450144 - 1,996 1996 996 96 6 20 4 12 53 365 30 2 2450448 - 1,996 1996 996 96 6 20 4 12 53 366 31 3 2450449 - 1,997 1997 997 97 7 20 1 01 01 001 01 4 2450450 - 1,997 1997 997 97 7 20 1 02 09 059 28 6 2450508 - 1,997 1997 997 97 7 20 1 03 09 060 01 7 2450509 - 1,997 1997 997 97 7 20 4 12 52 364 30 3 2450813 - 1,997 1997 997 97 7 20 4 12 53 365 31 4 2450814 - 1,999 1999 999 99 9 20 4 12 53 365 31 6 2451544 - 2,000 2000 000 00 0 20 1 01 01 001 01 7 2451545 - 2,000 2000 000 00 0 20 4 12 53 366 31 1 2451910 - 2,001 2001 001 01 1 21 1 01 01 001 01 2 2451911 -(65 rows) - -SELECT to_char(d1, 'FMY,YYY FMYYYY FMYYY FMYY FMY FMCC FMQ FMMM FMWW FMDDD FMDD FMD FMJ') - FROM TIMESTAMP_TBL; - to_char -------------------------------------------------- - - - 1,970 1970 970 70 0 20 1 1 1 1 1 5 2440588 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 1 1 2 2 5 2450451 - 1,997 1997 997 97 7 20 1 1 1 2 2 5 2450451 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 2 6 23 161 10 3 2450610 - 2,001 2001 1 1 1 21 3 9 38 265 22 7 2452175 - 2,000 2000 0 0 0 20 1 3 11 75 15 4 2451619 - 2,000 2000 0 0 0 20 1 3 11 75 15 4 2451619 - 2,000 2000 0 0 0 20 1 3 11 75 15 4 2451619 - 2,000 2000 0 0 0 20 1 3 11 75 15 4 2451619 - 2,000 2000 0 0 0 20 1 3 11 75 15 4 2451619 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 2 6 23 161 10 3 2450610 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 42 11 3 2450491 - 1,997 1997 997 97 7 20 1 2 7 43 12 4 2450492 - 1,997 1997 997 97 7 20 1 2 7 44 13 5 2450493 - 1,997 1997 997 97 7 20 1 2 7 45 14 6 2450494 - 1,997 1997 997 97 7 20 1 2 7 46 15 7 2450495 - 1,997 1997 997 97 7 20 1 2 7 47 16 1 2450496 - 0,097 97 97 97 7 -1 1 2 7 47 16 3 1686042 - 0,097 97 97 97 7 1 1 2 7 47 16 7 1756536 - 0,597 597 597 97 7 6 1 2 7 47 16 5 1939157 - 1,097 1097 97 97 7 11 1 2 7 47 16 3 2121778 - 1,697 1697 697 97 7 17 1 2 7 47 16 7 2340924 - 1,797 1797 797 97 7 18 1 2 7 47 16 5 2377448 - 1,897 1897 897 97 7 19 1 2 7 47 16 3 2413972 - 1,997 1997 997 97 7 20 1 2 7 47 16 1 2450496 - 2,097 2097 97 97 7 21 1 2 7 47 16 7 2487021 - 1,996 1996 996 96 6 20 1 2 9 59 28 4 2450142 - 1,996 1996 996 96 6 20 1 2 9 60 29 5 2450143 - 1,996 1996 996 96 6 20 1 3 9 61 1 6 2450144 - 1,996 1996 996 96 6 20 4 12 53 365 30 2 2450448 - 1,996 1996 996 96 6 20 4 12 53 366 31 3 2450449 - 1,997 1997 997 97 7 20 1 1 1 1 1 4 2450450 - 1,997 1997 997 97 7 20 1 2 9 59 28 6 2450508 - 1,997 1997 997 97 7 20 1 3 9 60 1 7 2450509 - 1,997 1997 997 97 7 20 4 12 52 364 30 3 2450813 - 1,997 1997 997 97 7 20 4 12 53 365 31 4 2450814 - 1,999 1999 999 99 9 20 4 12 53 365 31 6 2451544 - 2,000 2000 0 0 0 20 1 1 1 1 1 7 2451545 - 2,000 2000 0 0 0 20 4 12 53 366 31 1 2451910 - 2,001 2001 1 1 1 21 1 1 1 1 1 2 2451911 -(65 rows) - -SELECT to_char(d1, 'HH HH12 HH24 MI SS SSSS') - FROM TIMESTAMP_TBL; - to_char ----------------------- - - - 12 12 00 00 00 0 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 02 63122 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 12 12 00 00 00 0 - 03 03 03 04 05 11045 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 06 06 18 19 20 65960 - 08 08 08 14 01 29641 - 01 01 13 14 02 47642 - 12 12 12 14 03 44043 - 03 03 03 14 04 11644 - 02 02 02 14 05 8045 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 00 63120 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 06 06 18 32 01 66721 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 -(65 rows) - -SELECT to_char(d1, E'"HH:MI:SS is" HH:MI:SS "\\"text between quote marks\\""') - FROM TIMESTAMP_TBL; - to_char -------------------------------------------------- - - - HH:MI:SS is 12:00:00 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:02 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 12:00:00 "text between quote marks" - HH:MI:SS is 03:04:05 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 06:19:20 "text between quote marks" - HH:MI:SS is 08:14:01 "text between quote marks" - HH:MI:SS is 01:14:02 "text between quote marks" - HH:MI:SS is 12:14:03 "text between quote marks" - HH:MI:SS is 03:14:04 "text between quote marks" - HH:MI:SS is 02:14:05 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:00 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 06:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" -(65 rows) - -SELECT to_char(d1, 'HH24--text--MI--text--SS') - FROM TIMESTAMP_TBL; - to_char ------------------------- - - - 00--text--00--text--00 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--02 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 00--text--00--text--00 - 03--text--04--text--05 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 18--text--19--text--20 - 08--text--14--text--01 - 13--text--14--text--02 - 12--text--14--text--03 - 03--text--14--text--04 - 02--text--14--text--05 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--00 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 18--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 -(65 rows) - -SELECT to_char(d1, 'YYYYTH YYYYth Jth') - FROM TIMESTAMP_TBL; - to_char -------------------------- - - - 1970TH 1970th 2440588th - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450451st - 1997TH 1997th 2450451st - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450610th - 2001ST 2001st 2452175th - 2000TH 2000th 2451619th - 2000TH 2000th 2451619th - 2000TH 2000th 2451619th - 2000TH 2000th 2451619th - 2000TH 2000th 2451619th - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450610th - 1997TH 1997th 2450490th - 1997TH 1997th 2450491st - 1997TH 1997th 2450492nd - 1997TH 1997th 2450493rd - 1997TH 1997th 2450494th - 1997TH 1997th 2450495th - 1997TH 1997th 2450496th - 0097TH 0097th 1686042nd - 0097TH 0097th 1756536th - 0597TH 0597th 1939157th - 1097TH 1097th 2121778th - 1697TH 1697th 2340924th - 1797TH 1797th 2377448th - 1897TH 1897th 2413972nd - 1997TH 1997th 2450496th - 2097TH 2097th 2487021st - 1996TH 1996th 2450142nd - 1996TH 1996th 2450143rd - 1996TH 1996th 2450144th - 1996TH 1996th 2450448th - 1996TH 1996th 2450449th - 1997TH 1997th 2450450th - 1997TH 1997th 2450508th - 1997TH 1997th 2450509th - 1997TH 1997th 2450813th - 1997TH 1997th 2450814th - 1999TH 1999th 2451544th - 2000TH 2000th 2451545th - 2000TH 2000th 2451910th - 2001ST 2001st 2451911th -(65 rows) - -SELECT to_char(d1, 'YYYY A.D. YYYY a.d. YYYY bc HH:MI:SS P.M. HH:MI:SS p.m. HH:MI:SS pm') - FROM TIMESTAMP_TBL; - to_char ---------------------------------------------------------------------- - - - 1970 A.D. 1970 a.d. 1970 ad 12:00:00 A.M. 12:00:00 a.m. 12:00:00 am - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:02 P.M. 05:32:02 p.m. 05:32:02 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 12:00:00 A.M. 12:00:00 a.m. 12:00:00 am - 1997 A.D. 1997 a.d. 1997 ad 03:04:05 A.M. 03:04:05 a.m. 03:04:05 am - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 2001 A.D. 2001 a.d. 2001 ad 06:19:20 P.M. 06:19:20 p.m. 06:19:20 pm - 2000 A.D. 2000 a.d. 2000 ad 08:14:01 A.M. 08:14:01 a.m. 08:14:01 am - 2000 A.D. 2000 a.d. 2000 ad 01:14:02 P.M. 01:14:02 p.m. 01:14:02 pm - 2000 A.D. 2000 a.d. 2000 ad 12:14:03 P.M. 12:14:03 p.m. 12:14:03 pm - 2000 A.D. 2000 a.d. 2000 ad 03:14:04 A.M. 03:14:04 a.m. 03:14:04 am - 2000 A.D. 2000 a.d. 2000 ad 02:14:05 A.M. 02:14:05 a.m. 02:14:05 am - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:00 P.M. 05:32:00 p.m. 05:32:00 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 06:32:01 P.M. 06:32:01 p.m. 06:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 0097 B.C. 0097 b.c. 0097 bc 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 0097 A.D. 0097 a.d. 0097 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 0597 A.D. 0597 a.d. 0597 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1097 A.D. 1097 a.d. 1097 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1697 A.D. 1697 a.d. 1697 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1797 A.D. 1797 a.d. 1797 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1897 A.D. 1897 a.d. 1897 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 2097 A.D. 2097 a.d. 2097 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1996 A.D. 1996 a.d. 1996 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1996 A.D. 1996 a.d. 1996 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1996 A.D. 1996 a.d. 1996 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1996 A.D. 1996 a.d. 1996 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1996 A.D. 1996 a.d. 1996 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1999 A.D. 1999 a.d. 1999 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 2000 A.D. 2000 a.d. 2000 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 2000 A.D. 2000 a.d. 2000 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 2001 A.D. 2001 a.d. 2001 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm -(65 rows) - -SELECT to_char(d1, 'IYYY IYY IY I IW IDDD ID') - FROM TIMESTAMP_TBL; - to_char ------------------------- - - - 1970 970 70 0 01 004 4 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 01 004 4 - 1997 997 97 7 01 004 4 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 24 163 2 - 2001 001 01 1 38 265 6 - 2000 000 00 0 11 073 3 - 2000 000 00 0 11 073 3 - 2000 000 00 0 11 073 3 - 2000 000 00 0 11 073 3 - 2000 000 00 0 11 073 3 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 24 163 2 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 044 2 - 1997 997 97 7 07 045 3 - 1997 997 97 7 07 046 4 - 1997 997 97 7 07 047 5 - 1997 997 97 7 07 048 6 - 1997 997 97 7 07 049 7 - 0097 097 97 7 07 044 2 - 0097 097 97 7 07 048 6 - 0597 597 97 7 07 046 4 - 1097 097 97 7 07 044 2 - 1697 697 97 7 07 048 6 - 1797 797 97 7 07 046 4 - 1897 897 97 7 07 044 2 - 1997 997 97 7 07 049 7 - 2097 097 97 7 07 048 6 - 1996 996 96 6 09 059 3 - 1996 996 96 6 09 060 4 - 1996 996 96 6 09 061 5 - 1997 997 97 7 01 001 1 - 1997 997 97 7 01 002 2 - 1997 997 97 7 01 003 3 - 1997 997 97 7 09 061 5 - 1997 997 97 7 09 062 6 - 1998 998 98 8 01 002 2 - 1998 998 98 8 01 003 3 - 1999 999 99 9 52 362 5 - 1999 999 99 9 52 363 6 - 2000 000 00 0 52 364 7 - 2001 001 01 1 01 001 1 -(65 rows) - -SELECT to_char(d1, 'FMIYYY FMIYY FMIY FMI FMIW FMIDDD FMID') - FROM TIMESTAMP_TBL; - to_char ------------------------- - - - 1970 970 70 0 1 4 4 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 1 4 4 - 1997 997 97 7 1 4 4 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 24 163 2 - 2001 1 1 1 38 265 6 - 2000 0 0 0 11 73 3 - 2000 0 0 0 11 73 3 - 2000 0 0 0 11 73 3 - 2000 0 0 0 11 73 3 - 2000 0 0 0 11 73 3 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 24 163 2 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 44 2 - 1997 997 97 7 7 45 3 - 1997 997 97 7 7 46 4 - 1997 997 97 7 7 47 5 - 1997 997 97 7 7 48 6 - 1997 997 97 7 7 49 7 - 97 97 97 7 7 44 2 - 97 97 97 7 7 48 6 - 597 597 97 7 7 46 4 - 1097 97 97 7 7 44 2 - 1697 697 97 7 7 48 6 - 1797 797 97 7 7 46 4 - 1897 897 97 7 7 44 2 - 1997 997 97 7 7 49 7 - 2097 97 97 7 7 48 6 - 1996 996 96 6 9 59 3 - 1996 996 96 6 9 60 4 - 1996 996 96 6 9 61 5 - 1997 997 97 7 1 1 1 - 1997 997 97 7 1 2 2 - 1997 997 97 7 1 3 3 - 1997 997 97 7 9 61 5 - 1997 997 97 7 9 62 6 - 1998 998 98 8 1 2 2 - 1998 998 98 8 1 3 3 - 1999 999 99 9 52 362 5 - 1999 999 99 9 52 363 6 - 2000 0 0 0 52 364 7 - 2001 1 1 1 1 1 1 -(65 rows) - -SELECT to_char(d, 'FF1 FF2 FF3 FF4 FF5 FF6 ff1 ff2 ff3 ff4 ff5 ff6 MS US') - FROM (VALUES - ('2018-11-02 12:34:56'::timestamp), - ('2018-11-02 12:34:56.78'), - ('2018-11-02 12:34:56.78901'), - ('2018-11-02 12:34:56.78901234') - ) d(d); - to_char --------------------------------------------------------------------- - 0 00 000 0000 00000 000000 0 00 000 0000 00000 000000 000 000000 - 7 78 780 7800 78000 780000 7 78 780 7800 78000 780000 780 780000 - 7 78 789 7890 78901 789010 7 78 789 7890 78901 789010 789 789010 - 7 78 789 7890 78901 789012 7 78 789 7890 78901 789012 789 789012 -(4 rows) - --- Roman months, with upper and lower case. -SELECT i, - to_char(i * interval '1mon', 'rm'), - to_char(i * interval '1mon', 'RM') - FROM generate_series(-13, 13) i; - i | to_char | to_char ------+---------+--------- - -13 | xii | XII - -12 | i | I - -11 | ii | II - -10 | iii | III - -9 | iv | IV - -8 | v | V - -7 | vi | VI - -6 | vii | VII - -5 | viii | VIII - -4 | ix | IX - -3 | x | X - -2 | xi | XI - -1 | xii | XII - 0 | | - 1 | i | I - 2 | ii | II - 3 | iii | III - 4 | iv | IV - 5 | v | V - 6 | vi | VI - 7 | vii | VII - 8 | viii | VIII - 9 | ix | IX - 10 | x | X - 11 | xi | XI - 12 | xii | XII - 13 | i | I -(27 rows) - --- timestamp numeric fields constructor -SELECT make_timestamp(2014, 12, 28, 6, 30, 45.887); - make_timestamp ------------------------------- - Sun Dec 28 06:30:45.887 2014 -(1 row) - -SELECT make_timestamp(-44, 3, 15, 12, 30, 15); - make_timestamp ------------------------------ - Fri Mar 15 12:30:15 0044 BC -(1 row) - --- should fail -select make_timestamp(0, 7, 15, 12, 30, 15); -ERROR: date field value out of range: 0-07-15 --- generate_series for timestamp -select * from generate_series('2020-01-01 00:00'::timestamp, - '2020-01-02 03:00'::timestamp, - '1 hour'::interval); - generate_series --------------------------- - Wed Jan 01 00:00:00 2020 - Wed Jan 01 01:00:00 2020 - Wed Jan 01 02:00:00 2020 - Wed Jan 01 03:00:00 2020 - Wed Jan 01 04:00:00 2020 - Wed Jan 01 05:00:00 2020 - Wed Jan 01 06:00:00 2020 - Wed Jan 01 07:00:00 2020 - Wed Jan 01 08:00:00 2020 - Wed Jan 01 09:00:00 2020 - Wed Jan 01 10:00:00 2020 - Wed Jan 01 11:00:00 2020 - Wed Jan 01 12:00:00 2020 - Wed Jan 01 13:00:00 2020 - Wed Jan 01 14:00:00 2020 - Wed Jan 01 15:00:00 2020 - Wed Jan 01 16:00:00 2020 - Wed Jan 01 17:00:00 2020 - Wed Jan 01 18:00:00 2020 - Wed Jan 01 19:00:00 2020 - Wed Jan 01 20:00:00 2020 - Wed Jan 01 21:00:00 2020 - Wed Jan 01 22:00:00 2020 - Wed Jan 01 23:00:00 2020 - Thu Jan 02 00:00:00 2020 - Thu Jan 02 01:00:00 2020 - Thu Jan 02 02:00:00 2020 - Thu Jan 02 03:00:00 2020 -(28 rows) - --- the LIMIT should allow this to terminate in a reasonable amount of time --- (but that unfortunately doesn't work yet for SELECT * FROM ...) -select generate_series('2022-01-01 00:00'::timestamp, - 'infinity'::timestamp, - '1 month'::interval) limit 10; - generate_series --------------------------- - Sat Jan 01 00:00:00 2022 - Tue Feb 01 00:00:00 2022 - Tue Mar 01 00:00:00 2022 - Fri Apr 01 00:00:00 2022 - Sun May 01 00:00:00 2022 - Wed Jun 01 00:00:00 2022 - Fri Jul 01 00:00:00 2022 - Mon Aug 01 00:00:00 2022 - Thu Sep 01 00:00:00 2022 - Sat Oct 01 00:00:00 2022 -(10 rows) - --- errors -select * from generate_series('2020-01-01 00:00'::timestamp, - '2020-01-02 03:00'::timestamp, - '0 hour'::interval); -ERROR: step size cannot equal zero +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/timestamptz.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/timestamptz.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/timestamptz.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/timestamptz.out 2023-02-20 19:44:16.919207206 -0500 @@ -1,2991 +1 @@ --- --- TIMESTAMPTZ --- -CREATE TABLE TIMESTAMPTZ_TBL (d1 timestamp(2) with time zone); --- Test shorthand input values --- We can't just "select" the results since they aren't constants; test for --- equality instead. We can do that by running the test inside a transaction --- block, within which the value of 'now' shouldn't change, and so these --- related values shouldn't either. -BEGIN; -INSERT INTO TIMESTAMPTZ_TBL VALUES ('today'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('yesterday'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('tomorrow'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('tomorrow EST'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('tomorrow zulu'); -SELECT count(*) AS One FROM TIMESTAMPTZ_TBL WHERE d1 = timestamp with time zone 'today'; - one ------ - 1 -(1 row) - -SELECT count(*) AS One FROM TIMESTAMPTZ_TBL WHERE d1 = timestamp with time zone 'tomorrow'; - one ------ - 1 -(1 row) - -SELECT count(*) AS One FROM TIMESTAMPTZ_TBL WHERE d1 = timestamp with time zone 'yesterday'; - one ------ - 1 -(1 row) - -SELECT count(*) AS One FROM TIMESTAMPTZ_TBL WHERE d1 = timestamp with time zone 'tomorrow EST'; - one ------ - 1 -(1 row) - -SELECT count(*) AS One FROM TIMESTAMPTZ_TBL WHERE d1 = timestamp with time zone 'tomorrow zulu'; - one ------ - 1 -(1 row) - -COMMIT; -DELETE FROM TIMESTAMPTZ_TBL; --- Verify that 'now' *does* change over a reasonable interval such as 100 msec, --- and that it doesn't change over the same interval within a transaction block -INSERT INTO TIMESTAMPTZ_TBL VALUES ('now'); -SELECT pg_sleep(0.1); - pg_sleep ----------- - -(1 row) - -BEGIN; -INSERT INTO TIMESTAMPTZ_TBL VALUES ('now'); -SELECT pg_sleep(0.1); - pg_sleep ----------- - -(1 row) - -INSERT INTO TIMESTAMPTZ_TBL VALUES ('now'); -SELECT pg_sleep(0.1); - pg_sleep ----------- - -(1 row) - -SELECT count(*) AS two FROM TIMESTAMPTZ_TBL WHERE d1 = timestamp(2) with time zone 'now'; - two ------ - 2 -(1 row) - -SELECT count(d1) AS three, count(DISTINCT d1) AS two FROM TIMESTAMPTZ_TBL; - three | two --------+----- - 3 | 2 -(1 row) - -COMMIT; -TRUNCATE TIMESTAMPTZ_TBL; --- Special values -INSERT INTO TIMESTAMPTZ_TBL VALUES ('-infinity'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('infinity'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('epoch'); --- Postgres v6.0 standard output format -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01 1997 PST'); --- Variations on Postgres v6.1 standard output format -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01.000001 1997 PST'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01.999999 1997 PST'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01.4 1997 PST'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01.5 1997 PST'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01.6 1997 PST'); --- ISO 8601 format -INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-01-02'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-01-02 03:04:05'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-02-10 17:32:01-08'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-02-10 17:32:01-0800'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-02-10 17:32:01 -08:00'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('19970210 173201 -0800'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-06-10 17:32:01 -07:00'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('2001-09-22T18:19:20'); --- POSIX format (note that the timezone abbrev is just decoration here) -INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 08:14:01 GMT+8'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 13:14:02 GMT-1'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 12:14:03 GMT-2'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 03:14:04 PST+8'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 02:14:05 MST+7:00'); --- Variations for acceptable input formats -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 10 17:32:01 1997 -0800'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 10 17:32:01 1997'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 10 5:32PM 1997'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997/02/10 17:32:01-0800'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-02-10 17:32:01 PST'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb-10-1997 17:32:01 PST'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('02-10-1997 17:32:01 PST'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('19970210 173201 PST'); -set datestyle to ymd; -INSERT INTO TIMESTAMPTZ_TBL VALUES ('97FEB10 5:32:01PM UTC'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('97/02/10 17:32:01 UTC'); -reset datestyle; -INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997.041 17:32:01 UTC'); --- timestamps at different timezones -INSERT INTO TIMESTAMPTZ_TBL VALUES ('19970210 173201 America/New_York'); -SELECT '19970210 173201' AT TIME ZONE 'America/New_York'; - timezone --------------------------- - Mon Feb 10 20:32:01 1997 -(1 row) - -INSERT INTO TIMESTAMPTZ_TBL VALUES ('19970710 173201 America/New_York'); -SELECT '19970710 173201' AT TIME ZONE 'America/New_York'; - timezone --------------------------- - Thu Jul 10 20:32:01 1997 -(1 row) - -INSERT INTO TIMESTAMPTZ_TBL VALUES ('19970710 173201 America/Does_not_exist'); -ERROR: time zone "america/does_not_exist" not recognized -LINE 1: INSERT INTO TIMESTAMPTZ_TBL VALUES ('19970710 173201 America... - ^ -SELECT '19970710 173201' AT TIME ZONE 'America/Does_not_exist'; -ERROR: time zone "America/Does_not_exist" not recognized --- Daylight saving time for timestamps beyond 32-bit time_t range. -SELECT '20500710 173201 Europe/Helsinki'::timestamptz; -- DST - timestamptz ------------------------------- - Sun Jul 10 07:32:01 2050 PDT -(1 row) - -SELECT '20500110 173201 Europe/Helsinki'::timestamptz; -- non-DST - timestamptz ------------------------------- - Mon Jan 10 07:32:01 2050 PST -(1 row) - -SELECT '205000-07-10 17:32:01 Europe/Helsinki'::timestamptz; -- DST - timestamptz --------------------------------- - Thu Jul 10 07:32:01 205000 PDT -(1 row) - -SELECT '205000-01-10 17:32:01 Europe/Helsinki'::timestamptz; -- non-DST - timestamptz --------------------------------- - Fri Jan 10 07:32:01 205000 PST -(1 row) - --- Check date conversion and date arithmetic -INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-06-10 18:32:01 PDT'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 10 17:32:01 1997'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 11 17:32:01 1997'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 12 17:32:01 1997'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 13 17:32:01 1997'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 14 17:32:01 1997'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 15 17:32:01 1997'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 1997'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 0097 BC'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 0097'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 0597'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 1097'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 1697'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 1797'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 1897'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 1997'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 2097'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 28 17:32:01 1996'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 29 17:32:01 1996'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mar 01 17:32:01 1996'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 30 17:32:01 1996'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 31 17:32:01 1996'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Jan 01 17:32:01 1997'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 28 17:32:01 1997'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 29 17:32:01 1997'); -ERROR: date/time field value out of range: "Feb 29 17:32:01 1997" -LINE 1: INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 29 17:32:01 1997'); - ^ -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mar 01 17:32:01 1997'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 30 17:32:01 1997'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 31 17:32:01 1997'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 31 17:32:01 1999'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Jan 01 17:32:01 2000'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 31 17:32:01 2000'); -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Jan 01 17:32:01 2001'); --- Currently unsupported syntax and ranges -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 -0097'); -ERROR: time zone displacement out of range: "Feb 16 17:32:01 -0097" -LINE 1: INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 -0097')... - ^ -INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 5097 BC'); -ERROR: timestamp out of range: "Feb 16 17:32:01 5097 BC" -LINE 1: INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 5097 BC... - ^ --- Alternative field order that we've historically supported (sort of) --- with regular and POSIXy timezone specs -SELECT 'Wed Jul 11 10:51:14 America/New_York 2001'::timestamptz; - timestamptz ------------------------------- - Wed Jul 11 07:51:14 2001 PDT -(1 row) - -SELECT 'Wed Jul 11 10:51:14 GMT-4 2001'::timestamptz; - timestamptz ------------------------------- - Tue Jul 10 23:51:14 2001 PDT -(1 row) - -SELECT 'Wed Jul 11 10:51:14 GMT+4 2001'::timestamptz; - timestamptz ------------------------------- - Wed Jul 11 07:51:14 2001 PDT -(1 row) - -SELECT 'Wed Jul 11 10:51:14 PST-03:00 2001'::timestamptz; - timestamptz ------------------------------- - Wed Jul 11 00:51:14 2001 PDT -(1 row) - -SELECT 'Wed Jul 11 10:51:14 PST+03:00 2001'::timestamptz; - timestamptz ------------------------------- - Wed Jul 11 06:51:14 2001 PDT -(1 row) - -SELECT d1 FROM TIMESTAMPTZ_TBL; - d1 ---------------------------------- - -infinity - infinity - Wed Dec 31 16:00:00 1969 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:02 1997 PST - Mon Feb 10 17:32:01.4 1997 PST - Mon Feb 10 17:32:01.5 1997 PST - Mon Feb 10 17:32:01.6 1997 PST - Thu Jan 02 00:00:00 1997 PST - Thu Jan 02 03:04:05 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:01 1997 PST - Tue Jun 10 17:32:01 1997 PDT - Sat Sep 22 18:19:20 2001 PDT - Wed Mar 15 08:14:01 2000 PST - Wed Mar 15 04:14:02 2000 PST - Wed Mar 15 02:14:03 2000 PST - Wed Mar 15 03:14:04 2000 PST - Wed Mar 15 01:14:05 2000 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:00 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 09:32:01 1997 PST - Mon Feb 10 09:32:01 1997 PST - Mon Feb 10 09:32:01 1997 PST - Mon Feb 10 14:32:01 1997 PST - Thu Jul 10 14:32:01 1997 PDT - Tue Jun 10 18:32:01 1997 PDT - Mon Feb 10 17:32:01 1997 PST - Tue Feb 11 17:32:01 1997 PST - Wed Feb 12 17:32:01 1997 PST - Thu Feb 13 17:32:01 1997 PST - Fri Feb 14 17:32:01 1997 PST - Sat Feb 15 17:32:01 1997 PST - Sun Feb 16 17:32:01 1997 PST - Tue Feb 16 17:32:01 0097 PST BC - Sat Feb 16 17:32:01 0097 PST - Thu Feb 16 17:32:01 0597 PST - Tue Feb 16 17:32:01 1097 PST - Sat Feb 16 17:32:01 1697 PST - Thu Feb 16 17:32:01 1797 PST - Tue Feb 16 17:32:01 1897 PST - Sun Feb 16 17:32:01 1997 PST - Sat Feb 16 17:32:01 2097 PST - Wed Feb 28 17:32:01 1996 PST - Thu Feb 29 17:32:01 1996 PST - Fri Mar 01 17:32:01 1996 PST - Mon Dec 30 17:32:01 1996 PST - Tue Dec 31 17:32:01 1996 PST - Wed Jan 01 17:32:01 1997 PST - Fri Feb 28 17:32:01 1997 PST - Sat Mar 01 17:32:01 1997 PST - Tue Dec 30 17:32:01 1997 PST - Wed Dec 31 17:32:01 1997 PST - Fri Dec 31 17:32:01 1999 PST - Sat Jan 01 17:32:01 2000 PST - Sun Dec 31 17:32:01 2000 PST - Mon Jan 01 17:32:01 2001 PST -(66 rows) - --- Check behavior at the boundaries of the timestamp range -SELECT '4714-11-24 00:00:00+00 BC'::timestamptz; - timestamptz ---------------------------------- - Sun Nov 23 16:00:00 4714 PST BC -(1 row) - -SELECT '4714-11-23 16:00:00-08 BC'::timestamptz; - timestamptz ---------------------------------- - Sun Nov 23 16:00:00 4714 PST BC -(1 row) - -SELECT 'Sun Nov 23 16:00:00 4714 PST BC'::timestamptz; - timestamptz ---------------------------------- - Sun Nov 23 16:00:00 4714 PST BC -(1 row) - -SELECT '4714-11-23 23:59:59+00 BC'::timestamptz; -- out of range -ERROR: timestamp out of range: "4714-11-23 23:59:59+00 BC" -LINE 1: SELECT '4714-11-23 23:59:59+00 BC'::timestamptz; - ^ -SELECT '294276-12-31 23:59:59+00'::timestamptz; - timestamptz --------------------------------- - Sun Dec 31 15:59:59 294276 PST -(1 row) - -SELECT '294276-12-31 15:59:59-08'::timestamptz; - timestamptz --------------------------------- - Sun Dec 31 15:59:59 294276 PST -(1 row) - -SELECT '294277-01-01 00:00:00+00'::timestamptz; -- out of range -ERROR: timestamp out of range: "294277-01-01 00:00:00+00" -LINE 1: SELECT '294277-01-01 00:00:00+00'::timestamptz; - ^ -SELECT '294277-12-31 16:00:00-08'::timestamptz; -- out of range -ERROR: timestamp out of range: "294277-12-31 16:00:00-08" -LINE 1: SELECT '294277-12-31 16:00:00-08'::timestamptz; - ^ --- Demonstrate functions and operators -SELECT d1 FROM TIMESTAMPTZ_TBL - WHERE d1 > timestamp with time zone '1997-01-02'; - d1 --------------------------------- - infinity - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:02 1997 PST - Mon Feb 10 17:32:01.4 1997 PST - Mon Feb 10 17:32:01.5 1997 PST - Mon Feb 10 17:32:01.6 1997 PST - Thu Jan 02 03:04:05 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:01 1997 PST - Tue Jun 10 17:32:01 1997 PDT - Sat Sep 22 18:19:20 2001 PDT - Wed Mar 15 08:14:01 2000 PST - Wed Mar 15 04:14:02 2000 PST - Wed Mar 15 02:14:03 2000 PST - Wed Mar 15 03:14:04 2000 PST - Wed Mar 15 01:14:05 2000 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:00 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 09:32:01 1997 PST - Mon Feb 10 09:32:01 1997 PST - Mon Feb 10 09:32:01 1997 PST - Mon Feb 10 14:32:01 1997 PST - Thu Jul 10 14:32:01 1997 PDT - Tue Jun 10 18:32:01 1997 PDT - Mon Feb 10 17:32:01 1997 PST - Tue Feb 11 17:32:01 1997 PST - Wed Feb 12 17:32:01 1997 PST - Thu Feb 13 17:32:01 1997 PST - Fri Feb 14 17:32:01 1997 PST - Sat Feb 15 17:32:01 1997 PST - Sun Feb 16 17:32:01 1997 PST - Sun Feb 16 17:32:01 1997 PST - Sat Feb 16 17:32:01 2097 PST - Fri Feb 28 17:32:01 1997 PST - Sat Mar 01 17:32:01 1997 PST - Tue Dec 30 17:32:01 1997 PST - Wed Dec 31 17:32:01 1997 PST - Fri Dec 31 17:32:01 1999 PST - Sat Jan 01 17:32:01 2000 PST - Sun Dec 31 17:32:01 2000 PST - Mon Jan 01 17:32:01 2001 PST -(50 rows) - -SELECT d1 FROM TIMESTAMPTZ_TBL - WHERE d1 < timestamp with time zone '1997-01-02'; - d1 ---------------------------------- - -infinity - Wed Dec 31 16:00:00 1969 PST - Tue Feb 16 17:32:01 0097 PST BC - Sat Feb 16 17:32:01 0097 PST - Thu Feb 16 17:32:01 0597 PST - Tue Feb 16 17:32:01 1097 PST - Sat Feb 16 17:32:01 1697 PST - Thu Feb 16 17:32:01 1797 PST - Tue Feb 16 17:32:01 1897 PST - Wed Feb 28 17:32:01 1996 PST - Thu Feb 29 17:32:01 1996 PST - Fri Mar 01 17:32:01 1996 PST - Mon Dec 30 17:32:01 1996 PST - Tue Dec 31 17:32:01 1996 PST - Wed Jan 01 17:32:01 1997 PST -(15 rows) - -SELECT d1 FROM TIMESTAMPTZ_TBL - WHERE d1 = timestamp with time zone '1997-01-02'; - d1 ------------------------------- - Thu Jan 02 00:00:00 1997 PST -(1 row) - -SELECT d1 FROM TIMESTAMPTZ_TBL - WHERE d1 != timestamp with time zone '1997-01-02'; - d1 ---------------------------------- - -infinity - infinity - Wed Dec 31 16:00:00 1969 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:02 1997 PST - Mon Feb 10 17:32:01.4 1997 PST - Mon Feb 10 17:32:01.5 1997 PST - Mon Feb 10 17:32:01.6 1997 PST - Thu Jan 02 03:04:05 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:01 1997 PST - Tue Jun 10 17:32:01 1997 PDT - Sat Sep 22 18:19:20 2001 PDT - Wed Mar 15 08:14:01 2000 PST - Wed Mar 15 04:14:02 2000 PST - Wed Mar 15 02:14:03 2000 PST - Wed Mar 15 03:14:04 2000 PST - Wed Mar 15 01:14:05 2000 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:00 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 09:32:01 1997 PST - Mon Feb 10 09:32:01 1997 PST - Mon Feb 10 09:32:01 1997 PST - Mon Feb 10 14:32:01 1997 PST - Thu Jul 10 14:32:01 1997 PDT - Tue Jun 10 18:32:01 1997 PDT - Mon Feb 10 17:32:01 1997 PST - Tue Feb 11 17:32:01 1997 PST - Wed Feb 12 17:32:01 1997 PST - Thu Feb 13 17:32:01 1997 PST - Fri Feb 14 17:32:01 1997 PST - Sat Feb 15 17:32:01 1997 PST - Sun Feb 16 17:32:01 1997 PST - Tue Feb 16 17:32:01 0097 PST BC - Sat Feb 16 17:32:01 0097 PST - Thu Feb 16 17:32:01 0597 PST - Tue Feb 16 17:32:01 1097 PST - Sat Feb 16 17:32:01 1697 PST - Thu Feb 16 17:32:01 1797 PST - Tue Feb 16 17:32:01 1897 PST - Sun Feb 16 17:32:01 1997 PST - Sat Feb 16 17:32:01 2097 PST - Wed Feb 28 17:32:01 1996 PST - Thu Feb 29 17:32:01 1996 PST - Fri Mar 01 17:32:01 1996 PST - Mon Dec 30 17:32:01 1996 PST - Tue Dec 31 17:32:01 1996 PST - Wed Jan 01 17:32:01 1997 PST - Fri Feb 28 17:32:01 1997 PST - Sat Mar 01 17:32:01 1997 PST - Tue Dec 30 17:32:01 1997 PST - Wed Dec 31 17:32:01 1997 PST - Fri Dec 31 17:32:01 1999 PST - Sat Jan 01 17:32:01 2000 PST - Sun Dec 31 17:32:01 2000 PST - Mon Jan 01 17:32:01 2001 PST -(65 rows) - -SELECT d1 FROM TIMESTAMPTZ_TBL - WHERE d1 <= timestamp with time zone '1997-01-02'; - d1 ---------------------------------- - -infinity - Wed Dec 31 16:00:00 1969 PST - Thu Jan 02 00:00:00 1997 PST - Tue Feb 16 17:32:01 0097 PST BC - Sat Feb 16 17:32:01 0097 PST - Thu Feb 16 17:32:01 0597 PST - Tue Feb 16 17:32:01 1097 PST - Sat Feb 16 17:32:01 1697 PST - Thu Feb 16 17:32:01 1797 PST - Tue Feb 16 17:32:01 1897 PST - Wed Feb 28 17:32:01 1996 PST - Thu Feb 29 17:32:01 1996 PST - Fri Mar 01 17:32:01 1996 PST - Mon Dec 30 17:32:01 1996 PST - Tue Dec 31 17:32:01 1996 PST - Wed Jan 01 17:32:01 1997 PST -(16 rows) - -SELECT d1 FROM TIMESTAMPTZ_TBL - WHERE d1 >= timestamp with time zone '1997-01-02'; - d1 --------------------------------- - infinity - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:02 1997 PST - Mon Feb 10 17:32:01.4 1997 PST - Mon Feb 10 17:32:01.5 1997 PST - Mon Feb 10 17:32:01.6 1997 PST - Thu Jan 02 00:00:00 1997 PST - Thu Jan 02 03:04:05 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:01 1997 PST - Tue Jun 10 17:32:01 1997 PDT - Sat Sep 22 18:19:20 2001 PDT - Wed Mar 15 08:14:01 2000 PST - Wed Mar 15 04:14:02 2000 PST - Wed Mar 15 02:14:03 2000 PST - Wed Mar 15 03:14:04 2000 PST - Wed Mar 15 01:14:05 2000 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:00 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 17:32:01 1997 PST - Mon Feb 10 09:32:01 1997 PST - Mon Feb 10 09:32:01 1997 PST - Mon Feb 10 09:32:01 1997 PST - Mon Feb 10 14:32:01 1997 PST - Thu Jul 10 14:32:01 1997 PDT - Tue Jun 10 18:32:01 1997 PDT - Mon Feb 10 17:32:01 1997 PST - Tue Feb 11 17:32:01 1997 PST - Wed Feb 12 17:32:01 1997 PST - Thu Feb 13 17:32:01 1997 PST - Fri Feb 14 17:32:01 1997 PST - Sat Feb 15 17:32:01 1997 PST - Sun Feb 16 17:32:01 1997 PST - Sun Feb 16 17:32:01 1997 PST - Sat Feb 16 17:32:01 2097 PST - Fri Feb 28 17:32:01 1997 PST - Sat Mar 01 17:32:01 1997 PST - Tue Dec 30 17:32:01 1997 PST - Wed Dec 31 17:32:01 1997 PST - Fri Dec 31 17:32:01 1999 PST - Sat Jan 01 17:32:01 2000 PST - Sun Dec 31 17:32:01 2000 PST - Mon Jan 01 17:32:01 2001 PST -(51 rows) - -SELECT d1 - timestamp with time zone '1997-01-02' AS diff - FROM TIMESTAMPTZ_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01'; - diff ----------------------------------------- - @ 9863 days 8 hours ago - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 2 secs - @ 39 days 17 hours 32 mins 1.4 secs - @ 39 days 17 hours 32 mins 1.5 secs - @ 39 days 17 hours 32 mins 1.6 secs - @ 0 - @ 3 hours 4 mins 5 secs - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 159 days 16 hours 32 mins 1 sec - @ 1724 days 17 hours 19 mins 20 secs - @ 1168 days 8 hours 14 mins 1 sec - @ 1168 days 4 hours 14 mins 2 secs - @ 1168 days 2 hours 14 mins 3 secs - @ 1168 days 3 hours 14 mins 4 secs - @ 1168 days 1 hour 14 mins 5 secs - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 9 hours 32 mins 1 sec - @ 39 days 9 hours 32 mins 1 sec - @ 39 days 9 hours 32 mins 1 sec - @ 39 days 14 hours 32 mins 1 sec - @ 189 days 13 hours 32 mins 1 sec - @ 159 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 40 days 17 hours 32 mins 1 sec - @ 41 days 17 hours 32 mins 1 sec - @ 42 days 17 hours 32 mins 1 sec - @ 43 days 17 hours 32 mins 1 sec - @ 44 days 17 hours 32 mins 1 sec - @ 45 days 17 hours 32 mins 1 sec - @ 45 days 17 hours 32 mins 1 sec - @ 308 days 6 hours 27 mins 59 secs ago - @ 307 days 6 hours 27 mins 59 secs ago - @ 306 days 6 hours 27 mins 59 secs ago - @ 2 days 6 hours 27 mins 59 secs ago - @ 1 day 6 hours 27 mins 59 secs ago - @ 6 hours 27 mins 59 secs ago - @ 57 days 17 hours 32 mins 1 sec - @ 58 days 17 hours 32 mins 1 sec - @ 362 days 17 hours 32 mins 1 sec - @ 363 days 17 hours 32 mins 1 sec - @ 1093 days 17 hours 32 mins 1 sec - @ 1094 days 17 hours 32 mins 1 sec - @ 1459 days 17 hours 32 mins 1 sec - @ 1460 days 17 hours 32 mins 1 sec -(56 rows) - -SELECT date_trunc( 'week', timestamp with time zone '2004-02-29 15:44:17.71393' ) AS week_trunc; - week_trunc ------------------------------- - Mon Feb 23 00:00:00 2004 PST -(1 row) - -SELECT date_trunc('day', timestamp with time zone '2001-02-16 20:38:40+00', 'Australia/Sydney') as sydney_trunc; -- zone name - sydney_trunc ------------------------------- - Fri Feb 16 05:00:00 2001 PST -(1 row) - -SELECT date_trunc('day', timestamp with time zone '2001-02-16 20:38:40+00', 'GMT') as gmt_trunc; -- fixed-offset abbreviation - gmt_trunc ------------------------------- - Thu Feb 15 16:00:00 2001 PST -(1 row) - -SELECT date_trunc('day', timestamp with time zone '2001-02-16 20:38:40+00', 'VET') as vet_trunc; -- variable-offset abbreviation - vet_trunc ------------------------------- - Thu Feb 15 20:00:00 2001 PST -(1 row) - --- verify date_bin behaves the same as date_trunc for relevant intervals -SELECT - str, - interval, - date_trunc(str, ts, 'Australia/Sydney') = date_bin(interval::interval, ts, timestamp with time zone '2001-01-01+11') AS equal -FROM ( - VALUES - ('day', '1 d'), - ('hour', '1 h'), - ('minute', '1 m'), - ('second', '1 s'), - ('millisecond', '1 ms'), - ('microsecond', '1 us') -) intervals (str, interval), -(VALUES (timestamptz '2020-02-29 15:44:17.71393+00')) ts (ts); - str | interval | equal --------------+----------+------- - day | 1 d | t - hour | 1 h | t - minute | 1 m | t - second | 1 s | t - millisecond | 1 ms | t - microsecond | 1 us | t -(6 rows) - --- bin timestamps into arbitrary intervals -SELECT - interval, - ts, - origin, - date_bin(interval::interval, ts, origin) -FROM ( - VALUES - ('15 days'), - ('2 hours'), - ('1 hour 30 minutes'), - ('15 minutes'), - ('10 seconds'), - ('100 milliseconds'), - ('250 microseconds') -) intervals (interval), -(VALUES (timestamptz '2020-02-11 15:44:17.71393')) ts (ts), -(VALUES (timestamptz '2001-01-01')) origin (origin); - interval | ts | origin | date_bin --------------------+------------------------------------+------------------------------+------------------------------------ - 15 days | Tue Feb 11 15:44:17.71393 2020 PST | Mon Jan 01 00:00:00 2001 PST | Thu Feb 06 00:00:00 2020 PST - 2 hours | Tue Feb 11 15:44:17.71393 2020 PST | Mon Jan 01 00:00:00 2001 PST | Tue Feb 11 14:00:00 2020 PST - 1 hour 30 minutes | Tue Feb 11 15:44:17.71393 2020 PST | Mon Jan 01 00:00:00 2001 PST | Tue Feb 11 15:00:00 2020 PST - 15 minutes | Tue Feb 11 15:44:17.71393 2020 PST | Mon Jan 01 00:00:00 2001 PST | Tue Feb 11 15:30:00 2020 PST - 10 seconds | Tue Feb 11 15:44:17.71393 2020 PST | Mon Jan 01 00:00:00 2001 PST | Tue Feb 11 15:44:10 2020 PST - 100 milliseconds | Tue Feb 11 15:44:17.71393 2020 PST | Mon Jan 01 00:00:00 2001 PST | Tue Feb 11 15:44:17.7 2020 PST - 250 microseconds | Tue Feb 11 15:44:17.71393 2020 PST | Mon Jan 01 00:00:00 2001 PST | Tue Feb 11 15:44:17.71375 2020 PST -(7 rows) - --- shift bins using the origin parameter: -SELECT date_bin('5 min'::interval, timestamptz '2020-02-01 01:01:01+00', timestamptz '2020-02-01 00:02:30+00'); - date_bin ------------------------------- - Fri Jan 31 16:57:30 2020 PST -(1 row) - --- disallow intervals with months or years -SELECT date_bin('5 months'::interval, timestamp with time zone '2020-02-01 01:01:01+00', timestamp with time zone '2001-01-01+00'); -ERROR: timestamps cannot be binned into intervals containing months or years -SELECT date_bin('5 years'::interval, timestamp with time zone '2020-02-01 01:01:01+00', timestamp with time zone '2001-01-01+00'); -ERROR: timestamps cannot be binned into intervals containing months or years --- disallow zero intervals -SELECT date_bin('0 days'::interval, timestamp with time zone '1970-01-01 01:00:00+00' , timestamp with time zone '1970-01-01 00:00:00+00'); -ERROR: stride must be greater than zero --- disallow negative intervals -SELECT date_bin('-2 days'::interval, timestamp with time zone '1970-01-01 01:00:00+00' , timestamp with time zone '1970-01-01 00:00:00+00'); -ERROR: stride must be greater than zero --- Test casting within a BETWEEN qualifier -SELECT d1 - timestamp with time zone '1997-01-02' AS diff - FROM TIMESTAMPTZ_TBL - WHERE d1 BETWEEN timestamp with time zone '1902-01-01' AND timestamp with time zone '2038-01-01'; - diff ----------------------------------------- - @ 9863 days 8 hours ago - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 2 secs - @ 39 days 17 hours 32 mins 1.4 secs - @ 39 days 17 hours 32 mins 1.5 secs - @ 39 days 17 hours 32 mins 1.6 secs - @ 0 - @ 3 hours 4 mins 5 secs - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 159 days 16 hours 32 mins 1 sec - @ 1724 days 17 hours 19 mins 20 secs - @ 1168 days 8 hours 14 mins 1 sec - @ 1168 days 4 hours 14 mins 2 secs - @ 1168 days 2 hours 14 mins 3 secs - @ 1168 days 3 hours 14 mins 4 secs - @ 1168 days 1 hour 14 mins 5 secs - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 39 days 9 hours 32 mins 1 sec - @ 39 days 9 hours 32 mins 1 sec - @ 39 days 9 hours 32 mins 1 sec - @ 39 days 14 hours 32 mins 1 sec - @ 189 days 13 hours 32 mins 1 sec - @ 159 days 17 hours 32 mins 1 sec - @ 39 days 17 hours 32 mins 1 sec - @ 40 days 17 hours 32 mins 1 sec - @ 41 days 17 hours 32 mins 1 sec - @ 42 days 17 hours 32 mins 1 sec - @ 43 days 17 hours 32 mins 1 sec - @ 44 days 17 hours 32 mins 1 sec - @ 45 days 17 hours 32 mins 1 sec - @ 45 days 17 hours 32 mins 1 sec - @ 308 days 6 hours 27 mins 59 secs ago - @ 307 days 6 hours 27 mins 59 secs ago - @ 306 days 6 hours 27 mins 59 secs ago - @ 2 days 6 hours 27 mins 59 secs ago - @ 1 day 6 hours 27 mins 59 secs ago - @ 6 hours 27 mins 59 secs ago - @ 57 days 17 hours 32 mins 1 sec - @ 58 days 17 hours 32 mins 1 sec - @ 362 days 17 hours 32 mins 1 sec - @ 363 days 17 hours 32 mins 1 sec - @ 1093 days 17 hours 32 mins 1 sec - @ 1094 days 17 hours 32 mins 1 sec - @ 1459 days 17 hours 32 mins 1 sec - @ 1460 days 17 hours 32 mins 1 sec -(56 rows) - --- DATE_PART (timestamptz_part) -SELECT d1 as timestamptz, - date_part( 'year', d1) AS year, date_part( 'month', d1) AS month, - date_part( 'day', d1) AS day, date_part( 'hour', d1) AS hour, - date_part( 'minute', d1) AS minute, date_part( 'second', d1) AS second - FROM TIMESTAMPTZ_TBL; - timestamptz | year | month | day | hour | minute | second ----------------------------------+-----------+-------+-----+------+--------+-------- - -infinity | -Infinity | | | | | - infinity | Infinity | | | | | - Wed Dec 31 16:00:00 1969 PST | 1969 | 12 | 31 | 16 | 0 | 0 - Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1 - Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1 - Mon Feb 10 17:32:02 1997 PST | 1997 | 2 | 10 | 17 | 32 | 2 - Mon Feb 10 17:32:01.4 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1.4 - Mon Feb 10 17:32:01.5 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1.5 - Mon Feb 10 17:32:01.6 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1.6 - Thu Jan 02 00:00:00 1997 PST | 1997 | 1 | 2 | 0 | 0 | 0 - Thu Jan 02 03:04:05 1997 PST | 1997 | 1 | 2 | 3 | 4 | 5 - Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1 - Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1 - Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1 - Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1 - Tue Jun 10 17:32:01 1997 PDT | 1997 | 6 | 10 | 17 | 32 | 1 - Sat Sep 22 18:19:20 2001 PDT | 2001 | 9 | 22 | 18 | 19 | 20 - Wed Mar 15 08:14:01 2000 PST | 2000 | 3 | 15 | 8 | 14 | 1 - Wed Mar 15 04:14:02 2000 PST | 2000 | 3 | 15 | 4 | 14 | 2 - Wed Mar 15 02:14:03 2000 PST | 2000 | 3 | 15 | 2 | 14 | 3 - Wed Mar 15 03:14:04 2000 PST | 2000 | 3 | 15 | 3 | 14 | 4 - Wed Mar 15 01:14:05 2000 PST | 2000 | 3 | 15 | 1 | 14 | 5 - Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1 - Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1 - Mon Feb 10 17:32:00 1997 PST | 1997 | 2 | 10 | 17 | 32 | 0 - Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1 - Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1 - Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1 - Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1 - Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1 - Mon Feb 10 09:32:01 1997 PST | 1997 | 2 | 10 | 9 | 32 | 1 - Mon Feb 10 09:32:01 1997 PST | 1997 | 2 | 10 | 9 | 32 | 1 - Mon Feb 10 09:32:01 1997 PST | 1997 | 2 | 10 | 9 | 32 | 1 - Mon Feb 10 14:32:01 1997 PST | 1997 | 2 | 10 | 14 | 32 | 1 - Thu Jul 10 14:32:01 1997 PDT | 1997 | 7 | 10 | 14 | 32 | 1 - Tue Jun 10 18:32:01 1997 PDT | 1997 | 6 | 10 | 18 | 32 | 1 - Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1 - Tue Feb 11 17:32:01 1997 PST | 1997 | 2 | 11 | 17 | 32 | 1 - Wed Feb 12 17:32:01 1997 PST | 1997 | 2 | 12 | 17 | 32 | 1 - Thu Feb 13 17:32:01 1997 PST | 1997 | 2 | 13 | 17 | 32 | 1 - Fri Feb 14 17:32:01 1997 PST | 1997 | 2 | 14 | 17 | 32 | 1 - Sat Feb 15 17:32:01 1997 PST | 1997 | 2 | 15 | 17 | 32 | 1 - Sun Feb 16 17:32:01 1997 PST | 1997 | 2 | 16 | 17 | 32 | 1 - Tue Feb 16 17:32:01 0097 PST BC | -97 | 2 | 16 | 17 | 32 | 1 - Sat Feb 16 17:32:01 0097 PST | 97 | 2 | 16 | 17 | 32 | 1 - Thu Feb 16 17:32:01 0597 PST | 597 | 2 | 16 | 17 | 32 | 1 - Tue Feb 16 17:32:01 1097 PST | 1097 | 2 | 16 | 17 | 32 | 1 - Sat Feb 16 17:32:01 1697 PST | 1697 | 2 | 16 | 17 | 32 | 1 - Thu Feb 16 17:32:01 1797 PST | 1797 | 2 | 16 | 17 | 32 | 1 - Tue Feb 16 17:32:01 1897 PST | 1897 | 2 | 16 | 17 | 32 | 1 - Sun Feb 16 17:32:01 1997 PST | 1997 | 2 | 16 | 17 | 32 | 1 - Sat Feb 16 17:32:01 2097 PST | 2097 | 2 | 16 | 17 | 32 | 1 - Wed Feb 28 17:32:01 1996 PST | 1996 | 2 | 28 | 17 | 32 | 1 - Thu Feb 29 17:32:01 1996 PST | 1996 | 2 | 29 | 17 | 32 | 1 - Fri Mar 01 17:32:01 1996 PST | 1996 | 3 | 1 | 17 | 32 | 1 - Mon Dec 30 17:32:01 1996 PST | 1996 | 12 | 30 | 17 | 32 | 1 - Tue Dec 31 17:32:01 1996 PST | 1996 | 12 | 31 | 17 | 32 | 1 - Wed Jan 01 17:32:01 1997 PST | 1997 | 1 | 1 | 17 | 32 | 1 - Fri Feb 28 17:32:01 1997 PST | 1997 | 2 | 28 | 17 | 32 | 1 - Sat Mar 01 17:32:01 1997 PST | 1997 | 3 | 1 | 17 | 32 | 1 - Tue Dec 30 17:32:01 1997 PST | 1997 | 12 | 30 | 17 | 32 | 1 - Wed Dec 31 17:32:01 1997 PST | 1997 | 12 | 31 | 17 | 32 | 1 - Fri Dec 31 17:32:01 1999 PST | 1999 | 12 | 31 | 17 | 32 | 1 - Sat Jan 01 17:32:01 2000 PST | 2000 | 1 | 1 | 17 | 32 | 1 - Sun Dec 31 17:32:01 2000 PST | 2000 | 12 | 31 | 17 | 32 | 1 - Mon Jan 01 17:32:01 2001 PST | 2001 | 1 | 1 | 17 | 32 | 1 -(66 rows) - -SELECT d1 as timestamptz, - date_part( 'quarter', d1) AS quarter, date_part( 'msec', d1) AS msec, - date_part( 'usec', d1) AS usec - FROM TIMESTAMPTZ_TBL; - timestamptz | quarter | msec | usec ----------------------------------+---------+-------+---------- - -infinity | | | - infinity | | | - Wed Dec 31 16:00:00 1969 PST | 4 | 0 | 0 - Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000 - Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000 - Mon Feb 10 17:32:02 1997 PST | 1 | 2000 | 2000000 - Mon Feb 10 17:32:01.4 1997 PST | 1 | 1400 | 1400000 - Mon Feb 10 17:32:01.5 1997 PST | 1 | 1500 | 1500000 - Mon Feb 10 17:32:01.6 1997 PST | 1 | 1600 | 1600000 - Thu Jan 02 00:00:00 1997 PST | 1 | 0 | 0 - Thu Jan 02 03:04:05 1997 PST | 1 | 5000 | 5000000 - Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000 - Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000 - Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000 - Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000 - Tue Jun 10 17:32:01 1997 PDT | 2 | 1000 | 1000000 - Sat Sep 22 18:19:20 2001 PDT | 3 | 20000 | 20000000 - Wed Mar 15 08:14:01 2000 PST | 1 | 1000 | 1000000 - Wed Mar 15 04:14:02 2000 PST | 1 | 2000 | 2000000 - Wed Mar 15 02:14:03 2000 PST | 1 | 3000 | 3000000 - Wed Mar 15 03:14:04 2000 PST | 1 | 4000 | 4000000 - Wed Mar 15 01:14:05 2000 PST | 1 | 5000 | 5000000 - Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000 - Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000 - Mon Feb 10 17:32:00 1997 PST | 1 | 0 | 0 - Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000 - Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000 - Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000 - Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000 - Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000 - Mon Feb 10 09:32:01 1997 PST | 1 | 1000 | 1000000 - Mon Feb 10 09:32:01 1997 PST | 1 | 1000 | 1000000 - Mon Feb 10 09:32:01 1997 PST | 1 | 1000 | 1000000 - Mon Feb 10 14:32:01 1997 PST | 1 | 1000 | 1000000 - Thu Jul 10 14:32:01 1997 PDT | 3 | 1000 | 1000000 - Tue Jun 10 18:32:01 1997 PDT | 2 | 1000 | 1000000 - Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000 - Tue Feb 11 17:32:01 1997 PST | 1 | 1000 | 1000000 - Wed Feb 12 17:32:01 1997 PST | 1 | 1000 | 1000000 - Thu Feb 13 17:32:01 1997 PST | 1 | 1000 | 1000000 - Fri Feb 14 17:32:01 1997 PST | 1 | 1000 | 1000000 - Sat Feb 15 17:32:01 1997 PST | 1 | 1000 | 1000000 - Sun Feb 16 17:32:01 1997 PST | 1 | 1000 | 1000000 - Tue Feb 16 17:32:01 0097 PST BC | 1 | 1000 | 1000000 - Sat Feb 16 17:32:01 0097 PST | 1 | 1000 | 1000000 - Thu Feb 16 17:32:01 0597 PST | 1 | 1000 | 1000000 - Tue Feb 16 17:32:01 1097 PST | 1 | 1000 | 1000000 - Sat Feb 16 17:32:01 1697 PST | 1 | 1000 | 1000000 - Thu Feb 16 17:32:01 1797 PST | 1 | 1000 | 1000000 - Tue Feb 16 17:32:01 1897 PST | 1 | 1000 | 1000000 - Sun Feb 16 17:32:01 1997 PST | 1 | 1000 | 1000000 - Sat Feb 16 17:32:01 2097 PST | 1 | 1000 | 1000000 - Wed Feb 28 17:32:01 1996 PST | 1 | 1000 | 1000000 - Thu Feb 29 17:32:01 1996 PST | 1 | 1000 | 1000000 - Fri Mar 01 17:32:01 1996 PST | 1 | 1000 | 1000000 - Mon Dec 30 17:32:01 1996 PST | 4 | 1000 | 1000000 - Tue Dec 31 17:32:01 1996 PST | 4 | 1000 | 1000000 - Wed Jan 01 17:32:01 1997 PST | 1 | 1000 | 1000000 - Fri Feb 28 17:32:01 1997 PST | 1 | 1000 | 1000000 - Sat Mar 01 17:32:01 1997 PST | 1 | 1000 | 1000000 - Tue Dec 30 17:32:01 1997 PST | 4 | 1000 | 1000000 - Wed Dec 31 17:32:01 1997 PST | 4 | 1000 | 1000000 - Fri Dec 31 17:32:01 1999 PST | 4 | 1000 | 1000000 - Sat Jan 01 17:32:01 2000 PST | 1 | 1000 | 1000000 - Sun Dec 31 17:32:01 2000 PST | 4 | 1000 | 1000000 - Mon Jan 01 17:32:01 2001 PST | 1 | 1000 | 1000000 -(66 rows) - -SELECT d1 as timestamptz, - date_part( 'isoyear', d1) AS isoyear, date_part( 'week', d1) AS week, - date_part( 'isodow', d1) AS isodow, date_part( 'dow', d1) AS dow, - date_part( 'doy', d1) AS doy - FROM TIMESTAMPTZ_TBL; - timestamptz | isoyear | week | isodow | dow | doy ----------------------------------+-----------+------+--------+-----+----- - -infinity | -Infinity | | | | - infinity | Infinity | | | | - Wed Dec 31 16:00:00 1969 PST | 1970 | 1 | 3 | 3 | 365 - Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 17:32:02 1997 PST | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 17:32:01.4 1997 PST | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 17:32:01.5 1997 PST | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 17:32:01.6 1997 PST | 1997 | 7 | 1 | 1 | 41 - Thu Jan 02 00:00:00 1997 PST | 1997 | 1 | 4 | 4 | 2 - Thu Jan 02 03:04:05 1997 PST | 1997 | 1 | 4 | 4 | 2 - Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1 | 1 | 41 - Tue Jun 10 17:32:01 1997 PDT | 1997 | 24 | 2 | 2 | 161 - Sat Sep 22 18:19:20 2001 PDT | 2001 | 38 | 6 | 6 | 265 - Wed Mar 15 08:14:01 2000 PST | 2000 | 11 | 3 | 3 | 75 - Wed Mar 15 04:14:02 2000 PST | 2000 | 11 | 3 | 3 | 75 - Wed Mar 15 02:14:03 2000 PST | 2000 | 11 | 3 | 3 | 75 - Wed Mar 15 03:14:04 2000 PST | 2000 | 11 | 3 | 3 | 75 - Wed Mar 15 01:14:05 2000 PST | 2000 | 11 | 3 | 3 | 75 - Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 17:32:00 1997 PST | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 09:32:01 1997 PST | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 09:32:01 1997 PST | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 09:32:01 1997 PST | 1997 | 7 | 1 | 1 | 41 - Mon Feb 10 14:32:01 1997 PST | 1997 | 7 | 1 | 1 | 41 - Thu Jul 10 14:32:01 1997 PDT | 1997 | 28 | 4 | 4 | 191 - Tue Jun 10 18:32:01 1997 PDT | 1997 | 24 | 2 | 2 | 161 - Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1 | 1 | 41 - Tue Feb 11 17:32:01 1997 PST | 1997 | 7 | 2 | 2 | 42 - Wed Feb 12 17:32:01 1997 PST | 1997 | 7 | 3 | 3 | 43 - Thu Feb 13 17:32:01 1997 PST | 1997 | 7 | 4 | 4 | 44 - Fri Feb 14 17:32:01 1997 PST | 1997 | 7 | 5 | 5 | 45 - Sat Feb 15 17:32:01 1997 PST | 1997 | 7 | 6 | 6 | 46 - Sun Feb 16 17:32:01 1997 PST | 1997 | 7 | 7 | 0 | 47 - Tue Feb 16 17:32:01 0097 PST BC | -97 | 7 | 2 | 2 | 47 - Sat Feb 16 17:32:01 0097 PST | 97 | 7 | 6 | 6 | 47 - Thu Feb 16 17:32:01 0597 PST | 597 | 7 | 4 | 4 | 47 - Tue Feb 16 17:32:01 1097 PST | 1097 | 7 | 2 | 2 | 47 - Sat Feb 16 17:32:01 1697 PST | 1697 | 7 | 6 | 6 | 47 - Thu Feb 16 17:32:01 1797 PST | 1797 | 7 | 4 | 4 | 47 - Tue Feb 16 17:32:01 1897 PST | 1897 | 7 | 2 | 2 | 47 - Sun Feb 16 17:32:01 1997 PST | 1997 | 7 | 7 | 0 | 47 - Sat Feb 16 17:32:01 2097 PST | 2097 | 7 | 6 | 6 | 47 - Wed Feb 28 17:32:01 1996 PST | 1996 | 9 | 3 | 3 | 59 - Thu Feb 29 17:32:01 1996 PST | 1996 | 9 | 4 | 4 | 60 - Fri Mar 01 17:32:01 1996 PST | 1996 | 9 | 5 | 5 | 61 - Mon Dec 30 17:32:01 1996 PST | 1997 | 1 | 1 | 1 | 365 - Tue Dec 31 17:32:01 1996 PST | 1997 | 1 | 2 | 2 | 366 - Wed Jan 01 17:32:01 1997 PST | 1997 | 1 | 3 | 3 | 1 - Fri Feb 28 17:32:01 1997 PST | 1997 | 9 | 5 | 5 | 59 - Sat Mar 01 17:32:01 1997 PST | 1997 | 9 | 6 | 6 | 60 - Tue Dec 30 17:32:01 1997 PST | 1998 | 1 | 2 | 2 | 364 - Wed Dec 31 17:32:01 1997 PST | 1998 | 1 | 3 | 3 | 365 - Fri Dec 31 17:32:01 1999 PST | 1999 | 52 | 5 | 5 | 365 - Sat Jan 01 17:32:01 2000 PST | 1999 | 52 | 6 | 6 | 1 - Sun Dec 31 17:32:01 2000 PST | 2000 | 52 | 7 | 0 | 366 - Mon Jan 01 17:32:01 2001 PST | 2001 | 1 | 1 | 1 | 1 -(66 rows) - -SELECT d1 as timestamptz, - date_part( 'decade', d1) AS decade, - date_part( 'century', d1) AS century, - date_part( 'millennium', d1) AS millennium, - round(date_part( 'julian', d1)) AS julian, - date_part( 'epoch', d1) AS epoch - FROM TIMESTAMPTZ_TBL; - timestamptz | decade | century | millennium | julian | epoch ----------------------------------+-----------+-----------+------------+-----------+-------------- - -infinity | -Infinity | -Infinity | -Infinity | -Infinity | -Infinity - infinity | Infinity | Infinity | Infinity | Infinity | Infinity - Wed Dec 31 16:00:00 1969 PST | 196 | 20 | 2 | 2440588 | 0 - Mon Feb 10 17:32:01 1997 PST | 199 | 20 | 2 | 2450491 | 855624721 - Mon Feb 10 17:32:01 1997 PST | 199 | 20 | 2 | 2450491 | 855624721 - Mon Feb 10 17:32:02 1997 PST | 199 | 20 | 2 | 2450491 | 855624722 - Mon Feb 10 17:32:01.4 1997 PST | 199 | 20 | 2 | 2450491 | 855624721.4 - Mon Feb 10 17:32:01.5 1997 PST | 199 | 20 | 2 | 2450491 | 855624721.5 - Mon Feb 10 17:32:01.6 1997 PST | 199 | 20 | 2 | 2450491 | 855624721.6 - Thu Jan 02 00:00:00 1997 PST | 199 | 20 | 2 | 2450451 | 852192000 - Thu Jan 02 03:04:05 1997 PST | 199 | 20 | 2 | 2450451 | 852203045 - Mon Feb 10 17:32:01 1997 PST | 199 | 20 | 2 | 2450491 | 855624721 - Mon Feb 10 17:32:01 1997 PST | 199 | 20 | 2 | 2450491 | 855624721 - Mon Feb 10 17:32:01 1997 PST | 199 | 20 | 2 | 2450491 | 855624721 - Mon Feb 10 17:32:01 1997 PST | 199 | 20 | 2 | 2450491 | 855624721 - Tue Jun 10 17:32:01 1997 PDT | 199 | 20 | 2 | 2450611 | 865989121 - Sat Sep 22 18:19:20 2001 PDT | 200 | 21 | 3 | 2452176 | 1001207960 - Wed Mar 15 08:14:01 2000 PST | 200 | 20 | 2 | 2451619 | 953136841 - Wed Mar 15 04:14:02 2000 PST | 200 | 20 | 2 | 2451619 | 953122442 - Wed Mar 15 02:14:03 2000 PST | 200 | 20 | 2 | 2451619 | 953115243 - Wed Mar 15 03:14:04 2000 PST | 200 | 20 | 2 | 2451619 | 953118844 - Wed Mar 15 01:14:05 2000 PST | 200 | 20 | 2 | 2451619 | 953111645 - Mon Feb 10 17:32:01 1997 PST | 199 | 20 | 2 | 2450491 | 855624721 - Mon Feb 10 17:32:01 1997 PST | 199 | 20 | 2 | 2450491 | 855624721 - Mon Feb 10 17:32:00 1997 PST | 199 | 20 | 2 | 2450491 | 855624720 - Mon Feb 10 17:32:01 1997 PST | 199 | 20 | 2 | 2450491 | 855624721 - Mon Feb 10 17:32:01 1997 PST | 199 | 20 | 2 | 2450491 | 855624721 - Mon Feb 10 17:32:01 1997 PST | 199 | 20 | 2 | 2450491 | 855624721 - Mon Feb 10 17:32:01 1997 PST | 199 | 20 | 2 | 2450491 | 855624721 - Mon Feb 10 17:32:01 1997 PST | 199 | 20 | 2 | 2450491 | 855624721 - Mon Feb 10 09:32:01 1997 PST | 199 | 20 | 2 | 2450490 | 855595921 - Mon Feb 10 09:32:01 1997 PST | 199 | 20 | 2 | 2450490 | 855595921 - Mon Feb 10 09:32:01 1997 PST | 199 | 20 | 2 | 2450490 | 855595921 - Mon Feb 10 14:32:01 1997 PST | 199 | 20 | 2 | 2450491 | 855613921 - Thu Jul 10 14:32:01 1997 PDT | 199 | 20 | 2 | 2450641 | 868570321 - Tue Jun 10 18:32:01 1997 PDT | 199 | 20 | 2 | 2450611 | 865992721 - Mon Feb 10 17:32:01 1997 PST | 199 | 20 | 2 | 2450491 | 855624721 - Tue Feb 11 17:32:01 1997 PST | 199 | 20 | 2 | 2450492 | 855711121 - Wed Feb 12 17:32:01 1997 PST | 199 | 20 | 2 | 2450493 | 855797521 - Thu Feb 13 17:32:01 1997 PST | 199 | 20 | 2 | 2450494 | 855883921 - Fri Feb 14 17:32:01 1997 PST | 199 | 20 | 2 | 2450495 | 855970321 - Sat Feb 15 17:32:01 1997 PST | 199 | 20 | 2 | 2450496 | 856056721 - Sun Feb 16 17:32:01 1997 PST | 199 | 20 | 2 | 2450497 | 856143121 - Tue Feb 16 17:32:01 0097 PST BC | -10 | -1 | -1 | 1686043 | -65192682479 - Sat Feb 16 17:32:01 0097 PST | 9 | 1 | 1 | 1756537 | -59102000879 - Thu Feb 16 17:32:01 0597 PST | 59 | 6 | 1 | 1939158 | -43323546479 - Tue Feb 16 17:32:01 1097 PST | 109 | 11 | 2 | 2121779 | -27545092079 - Sat Feb 16 17:32:01 1697 PST | 169 | 17 | 2 | 2340925 | -8610877679 - Thu Feb 16 17:32:01 1797 PST | 179 | 18 | 2 | 2377449 | -5455204079 - Tue Feb 16 17:32:01 1897 PST | 189 | 19 | 2 | 2413973 | -2299530479 - Sun Feb 16 17:32:01 1997 PST | 199 | 20 | 2 | 2450497 | 856143121 - Sat Feb 16 17:32:01 2097 PST | 209 | 21 | 3 | 2487022 | 4011903121 - Wed Feb 28 17:32:01 1996 PST | 199 | 20 | 2 | 2450143 | 825557521 - Thu Feb 29 17:32:01 1996 PST | 199 | 20 | 2 | 2450144 | 825643921 - Fri Mar 01 17:32:01 1996 PST | 199 | 20 | 2 | 2450145 | 825730321 - Mon Dec 30 17:32:01 1996 PST | 199 | 20 | 2 | 2450449 | 851995921 - Tue Dec 31 17:32:01 1996 PST | 199 | 20 | 2 | 2450450 | 852082321 - Wed Jan 01 17:32:01 1997 PST | 199 | 20 | 2 | 2450451 | 852168721 - Fri Feb 28 17:32:01 1997 PST | 199 | 20 | 2 | 2450509 | 857179921 - Sat Mar 01 17:32:01 1997 PST | 199 | 20 | 2 | 2450510 | 857266321 - Tue Dec 30 17:32:01 1997 PST | 199 | 20 | 2 | 2450814 | 883531921 - Wed Dec 31 17:32:01 1997 PST | 199 | 20 | 2 | 2450815 | 883618321 - Fri Dec 31 17:32:01 1999 PST | 199 | 20 | 2 | 2451545 | 946690321 - Sat Jan 01 17:32:01 2000 PST | 200 | 20 | 2 | 2451546 | 946776721 - Sun Dec 31 17:32:01 2000 PST | 200 | 20 | 2 | 2451911 | 978312721 - Mon Jan 01 17:32:01 2001 PST | 200 | 21 | 3 | 2451912 | 978399121 -(66 rows) - -SELECT d1 as timestamptz, - date_part( 'timezone', d1) AS timezone, - date_part( 'timezone_hour', d1) AS timezone_hour, - date_part( 'timezone_minute', d1) AS timezone_minute - FROM TIMESTAMPTZ_TBL; - timestamptz | timezone | timezone_hour | timezone_minute ----------------------------------+----------+---------------+----------------- - -infinity | | | - infinity | | | - Wed Dec 31 16:00:00 1969 PST | -28800 | -8 | 0 - Mon Feb 10 17:32:01 1997 PST | -28800 | -8 | 0 - Mon Feb 10 17:32:01 1997 PST | -28800 | -8 | 0 - Mon Feb 10 17:32:02 1997 PST | -28800 | -8 | 0 - Mon Feb 10 17:32:01.4 1997 PST | -28800 | -8 | 0 - Mon Feb 10 17:32:01.5 1997 PST | -28800 | -8 | 0 - Mon Feb 10 17:32:01.6 1997 PST | -28800 | -8 | 0 - Thu Jan 02 00:00:00 1997 PST | -28800 | -8 | 0 - Thu Jan 02 03:04:05 1997 PST | -28800 | -8 | 0 - Mon Feb 10 17:32:01 1997 PST | -28800 | -8 | 0 - Mon Feb 10 17:32:01 1997 PST | -28800 | -8 | 0 - Mon Feb 10 17:32:01 1997 PST | -28800 | -8 | 0 - Mon Feb 10 17:32:01 1997 PST | -28800 | -8 | 0 - Tue Jun 10 17:32:01 1997 PDT | -25200 | -7 | 0 - Sat Sep 22 18:19:20 2001 PDT | -25200 | -7 | 0 - Wed Mar 15 08:14:01 2000 PST | -28800 | -8 | 0 - Wed Mar 15 04:14:02 2000 PST | -28800 | -8 | 0 - Wed Mar 15 02:14:03 2000 PST | -28800 | -8 | 0 - Wed Mar 15 03:14:04 2000 PST | -28800 | -8 | 0 - Wed Mar 15 01:14:05 2000 PST | -28800 | -8 | 0 - Mon Feb 10 17:32:01 1997 PST | -28800 | -8 | 0 - Mon Feb 10 17:32:01 1997 PST | -28800 | -8 | 0 - Mon Feb 10 17:32:00 1997 PST | -28800 | -8 | 0 - Mon Feb 10 17:32:01 1997 PST | -28800 | -8 | 0 - Mon Feb 10 17:32:01 1997 PST | -28800 | -8 | 0 - Mon Feb 10 17:32:01 1997 PST | -28800 | -8 | 0 - Mon Feb 10 17:32:01 1997 PST | -28800 | -8 | 0 - Mon Feb 10 17:32:01 1997 PST | -28800 | -8 | 0 - Mon Feb 10 09:32:01 1997 PST | -28800 | -8 | 0 - Mon Feb 10 09:32:01 1997 PST | -28800 | -8 | 0 - Mon Feb 10 09:32:01 1997 PST | -28800 | -8 | 0 - Mon Feb 10 14:32:01 1997 PST | -28800 | -8 | 0 - Thu Jul 10 14:32:01 1997 PDT | -25200 | -7 | 0 - Tue Jun 10 18:32:01 1997 PDT | -25200 | -7 | 0 - Mon Feb 10 17:32:01 1997 PST | -28800 | -8 | 0 - Tue Feb 11 17:32:01 1997 PST | -28800 | -8 | 0 - Wed Feb 12 17:32:01 1997 PST | -28800 | -8 | 0 - Thu Feb 13 17:32:01 1997 PST | -28800 | -8 | 0 - Fri Feb 14 17:32:01 1997 PST | -28800 | -8 | 0 - Sat Feb 15 17:32:01 1997 PST | -28800 | -8 | 0 - Sun Feb 16 17:32:01 1997 PST | -28800 | -8 | 0 - Tue Feb 16 17:32:01 0097 PST BC | -28800 | -8 | 0 - Sat Feb 16 17:32:01 0097 PST | -28800 | -8 | 0 - Thu Feb 16 17:32:01 0597 PST | -28800 | -8 | 0 - Tue Feb 16 17:32:01 1097 PST | -28800 | -8 | 0 - Sat Feb 16 17:32:01 1697 PST | -28800 | -8 | 0 - Thu Feb 16 17:32:01 1797 PST | -28800 | -8 | 0 - Tue Feb 16 17:32:01 1897 PST | -28800 | -8 | 0 - Sun Feb 16 17:32:01 1997 PST | -28800 | -8 | 0 - Sat Feb 16 17:32:01 2097 PST | -28800 | -8 | 0 - Wed Feb 28 17:32:01 1996 PST | -28800 | -8 | 0 - Thu Feb 29 17:32:01 1996 PST | -28800 | -8 | 0 - Fri Mar 01 17:32:01 1996 PST | -28800 | -8 | 0 - Mon Dec 30 17:32:01 1996 PST | -28800 | -8 | 0 - Tue Dec 31 17:32:01 1996 PST | -28800 | -8 | 0 - Wed Jan 01 17:32:01 1997 PST | -28800 | -8 | 0 - Fri Feb 28 17:32:01 1997 PST | -28800 | -8 | 0 - Sat Mar 01 17:32:01 1997 PST | -28800 | -8 | 0 - Tue Dec 30 17:32:01 1997 PST | -28800 | -8 | 0 - Wed Dec 31 17:32:01 1997 PST | -28800 | -8 | 0 - Fri Dec 31 17:32:01 1999 PST | -28800 | -8 | 0 - Sat Jan 01 17:32:01 2000 PST | -28800 | -8 | 0 - Sun Dec 31 17:32:01 2000 PST | -28800 | -8 | 0 - Mon Jan 01 17:32:01 2001 PST | -28800 | -8 | 0 -(66 rows) - --- extract implementation is mostly the same as date_part, so only --- test a few cases for additional coverage. -SELECT d1 as "timestamp", - extract(microseconds from d1) AS microseconds, - extract(milliseconds from d1) AS milliseconds, - extract(seconds from d1) AS seconds, - round(extract(julian from d1)) AS julian, - extract(epoch from d1) AS epoch - FROM TIMESTAMPTZ_TBL; - timestamp | microseconds | milliseconds | seconds | julian | epoch ----------------------------------+--------------+--------------+-----------+-----------+--------------------- - -infinity | | | | -Infinity | -Infinity - infinity | | | | Infinity | Infinity - Wed Dec 31 16:00:00 1969 PST | 0 | 0.000 | 0.000000 | 2440588 | 0.000000 - Mon Feb 10 17:32:01 1997 PST | 1000000 | 1000.000 | 1.000000 | 2450491 | 855624721.000000 - Mon Feb 10 17:32:01 1997 PST | 1000000 | 1000.000 | 1.000000 | 2450491 | 855624721.000000 - Mon Feb 10 17:32:02 1997 PST | 2000000 | 2000.000 | 2.000000 | 2450491 | 855624722.000000 - Mon Feb 10 17:32:01.4 1997 PST | 1400000 | 1400.000 | 1.400000 | 2450491 | 855624721.400000 - Mon Feb 10 17:32:01.5 1997 PST | 1500000 | 1500.000 | 1.500000 | 2450491 | 855624721.500000 - Mon Feb 10 17:32:01.6 1997 PST | 1600000 | 1600.000 | 1.600000 | 2450491 | 855624721.600000 - Thu Jan 02 00:00:00 1997 PST | 0 | 0.000 | 0.000000 | 2450451 | 852192000.000000 - Thu Jan 02 03:04:05 1997 PST | 5000000 | 5000.000 | 5.000000 | 2450451 | 852203045.000000 - Mon Feb 10 17:32:01 1997 PST | 1000000 | 1000.000 | 1.000000 | 2450491 | 855624721.000000 - Mon Feb 10 17:32:01 1997 PST | 1000000 | 1000.000 | 1.000000 | 2450491 | 855624721.000000 - Mon Feb 10 17:32:01 1997 PST | 1000000 | 1000.000 | 1.000000 | 2450491 | 855624721.000000 - Mon Feb 10 17:32:01 1997 PST | 1000000 | 1000.000 | 1.000000 | 2450491 | 855624721.000000 - Tue Jun 10 17:32:01 1997 PDT | 1000000 | 1000.000 | 1.000000 | 2450611 | 865989121.000000 - Sat Sep 22 18:19:20 2001 PDT | 20000000 | 20000.000 | 20.000000 | 2452176 | 1001207960.000000 - Wed Mar 15 08:14:01 2000 PST | 1000000 | 1000.000 | 1.000000 | 2451619 | 953136841.000000 - Wed Mar 15 04:14:02 2000 PST | 2000000 | 2000.000 | 2.000000 | 2451619 | 953122442.000000 - Wed Mar 15 02:14:03 2000 PST | 3000000 | 3000.000 | 3.000000 | 2451619 | 953115243.000000 - Wed Mar 15 03:14:04 2000 PST | 4000000 | 4000.000 | 4.000000 | 2451619 | 953118844.000000 - Wed Mar 15 01:14:05 2000 PST | 5000000 | 5000.000 | 5.000000 | 2451619 | 953111645.000000 - Mon Feb 10 17:32:01 1997 PST | 1000000 | 1000.000 | 1.000000 | 2450491 | 855624721.000000 - Mon Feb 10 17:32:01 1997 PST | 1000000 | 1000.000 | 1.000000 | 2450491 | 855624721.000000 - Mon Feb 10 17:32:00 1997 PST | 0 | 0.000 | 0.000000 | 2450491 | 855624720.000000 - Mon Feb 10 17:32:01 1997 PST | 1000000 | 1000.000 | 1.000000 | 2450491 | 855624721.000000 - Mon Feb 10 17:32:01 1997 PST | 1000000 | 1000.000 | 1.000000 | 2450491 | 855624721.000000 - Mon Feb 10 17:32:01 1997 PST | 1000000 | 1000.000 | 1.000000 | 2450491 | 855624721.000000 - Mon Feb 10 17:32:01 1997 PST | 1000000 | 1000.000 | 1.000000 | 2450491 | 855624721.000000 - Mon Feb 10 17:32:01 1997 PST | 1000000 | 1000.000 | 1.000000 | 2450491 | 855624721.000000 - Mon Feb 10 09:32:01 1997 PST | 1000000 | 1000.000 | 1.000000 | 2450490 | 855595921.000000 - Mon Feb 10 09:32:01 1997 PST | 1000000 | 1000.000 | 1.000000 | 2450490 | 855595921.000000 - Mon Feb 10 09:32:01 1997 PST | 1000000 | 1000.000 | 1.000000 | 2450490 | 855595921.000000 - Mon Feb 10 14:32:01 1997 PST | 1000000 | 1000.000 | 1.000000 | 2450491 | 855613921.000000 - Thu Jul 10 14:32:01 1997 PDT | 1000000 | 1000.000 | 1.000000 | 2450641 | 868570321.000000 - Tue Jun 10 18:32:01 1997 PDT | 1000000 | 1000.000 | 1.000000 | 2450611 | 865992721.000000 - Mon Feb 10 17:32:01 1997 PST | 1000000 | 1000.000 | 1.000000 | 2450491 | 855624721.000000 - Tue Feb 11 17:32:01 1997 PST | 1000000 | 1000.000 | 1.000000 | 2450492 | 855711121.000000 - Wed Feb 12 17:32:01 1997 PST | 1000000 | 1000.000 | 1.000000 | 2450493 | 855797521.000000 - Thu Feb 13 17:32:01 1997 PST | 1000000 | 1000.000 | 1.000000 | 2450494 | 855883921.000000 - Fri Feb 14 17:32:01 1997 PST | 1000000 | 1000.000 | 1.000000 | 2450495 | 855970321.000000 - Sat Feb 15 17:32:01 1997 PST | 1000000 | 1000.000 | 1.000000 | 2450496 | 856056721.000000 - Sun Feb 16 17:32:01 1997 PST | 1000000 | 1000.000 | 1.000000 | 2450497 | 856143121.000000 - Tue Feb 16 17:32:01 0097 PST BC | 1000000 | 1000.000 | 1.000000 | 1686043 | -65192682479.000000 - Sat Feb 16 17:32:01 0097 PST | 1000000 | 1000.000 | 1.000000 | 1756537 | -59102000879.000000 - Thu Feb 16 17:32:01 0597 PST | 1000000 | 1000.000 | 1.000000 | 1939158 | -43323546479.000000 - Tue Feb 16 17:32:01 1097 PST | 1000000 | 1000.000 | 1.000000 | 2121779 | -27545092079.000000 - Sat Feb 16 17:32:01 1697 PST | 1000000 | 1000.000 | 1.000000 | 2340925 | -8610877679.000000 - Thu Feb 16 17:32:01 1797 PST | 1000000 | 1000.000 | 1.000000 | 2377449 | -5455204079.000000 - Tue Feb 16 17:32:01 1897 PST | 1000000 | 1000.000 | 1.000000 | 2413973 | -2299530479.000000 - Sun Feb 16 17:32:01 1997 PST | 1000000 | 1000.000 | 1.000000 | 2450497 | 856143121.000000 - Sat Feb 16 17:32:01 2097 PST | 1000000 | 1000.000 | 1.000000 | 2487022 | 4011903121.000000 - Wed Feb 28 17:32:01 1996 PST | 1000000 | 1000.000 | 1.000000 | 2450143 | 825557521.000000 - Thu Feb 29 17:32:01 1996 PST | 1000000 | 1000.000 | 1.000000 | 2450144 | 825643921.000000 - Fri Mar 01 17:32:01 1996 PST | 1000000 | 1000.000 | 1.000000 | 2450145 | 825730321.000000 - Mon Dec 30 17:32:01 1996 PST | 1000000 | 1000.000 | 1.000000 | 2450449 | 851995921.000000 - Tue Dec 31 17:32:01 1996 PST | 1000000 | 1000.000 | 1.000000 | 2450450 | 852082321.000000 - Wed Jan 01 17:32:01 1997 PST | 1000000 | 1000.000 | 1.000000 | 2450451 | 852168721.000000 - Fri Feb 28 17:32:01 1997 PST | 1000000 | 1000.000 | 1.000000 | 2450509 | 857179921.000000 - Sat Mar 01 17:32:01 1997 PST | 1000000 | 1000.000 | 1.000000 | 2450510 | 857266321.000000 - Tue Dec 30 17:32:01 1997 PST | 1000000 | 1000.000 | 1.000000 | 2450814 | 883531921.000000 - Wed Dec 31 17:32:01 1997 PST | 1000000 | 1000.000 | 1.000000 | 2450815 | 883618321.000000 - Fri Dec 31 17:32:01 1999 PST | 1000000 | 1000.000 | 1.000000 | 2451545 | 946690321.000000 - Sat Jan 01 17:32:01 2000 PST | 1000000 | 1000.000 | 1.000000 | 2451546 | 946776721.000000 - Sun Dec 31 17:32:01 2000 PST | 1000000 | 1000.000 | 1.000000 | 2451911 | 978312721.000000 - Mon Jan 01 17:32:01 2001 PST | 1000000 | 1000.000 | 1.000000 | 2451912 | 978399121.000000 -(66 rows) - --- value near upper bound uses special case in code -SELECT date_part('epoch', '294270-01-01 00:00:00+00'::timestamptz); - date_part ---------------- - 9224097091200 -(1 row) - -SELECT extract(epoch from '294270-01-01 00:00:00+00'::timestamptz); - extract ----------------------- - 9224097091200.000000 -(1 row) - --- another internal overflow test case -SELECT extract(epoch from '5000-01-01 00:00:00+00'::timestamptz); - extract --------------------- - 95617584000.000000 -(1 row) - --- TO_CHAR() -SELECT to_char(d1, 'DAY Day day DY Dy dy MONTH Month month RM MON Mon mon') - FROM TIMESTAMPTZ_TBL; - to_char ------------------------------------------------------------------------------------------- - - - WEDNESDAY Wednesday wednesday WED Wed wed DECEMBER December december XII DEC Dec dec - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - THURSDAY Thursday thursday THU Thu thu JANUARY January january I JAN Jan jan - THURSDAY Thursday thursday THU Thu thu JANUARY January january I JAN Jan jan - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - TUESDAY Tuesday tuesday TUE Tue tue JUNE June june VI JUN Jun jun - SATURDAY Saturday saturday SAT Sat sat SEPTEMBER September september IX SEP Sep sep - WEDNESDAY Wednesday wednesday WED Wed wed MARCH March march III MAR Mar mar - WEDNESDAY Wednesday wednesday WED Wed wed MARCH March march III MAR Mar mar - WEDNESDAY Wednesday wednesday WED Wed wed MARCH March march III MAR Mar mar - WEDNESDAY Wednesday wednesday WED Wed wed MARCH March march III MAR Mar mar - WEDNESDAY Wednesday wednesday WED Wed wed MARCH March march III MAR Mar mar - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - THURSDAY Thursday thursday THU Thu thu JULY July july VII JUL Jul jul - TUESDAY Tuesday tuesday TUE Tue tue JUNE June june VI JUN Jun jun - MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb - TUESDAY Tuesday tuesday TUE Tue tue FEBRUARY February february II FEB Feb feb - WEDNESDAY Wednesday wednesday WED Wed wed FEBRUARY February february II FEB Feb feb - THURSDAY Thursday thursday THU Thu thu FEBRUARY February february II FEB Feb feb - FRIDAY Friday friday FRI Fri fri FEBRUARY February february II FEB Feb feb - SATURDAY Saturday saturday SAT Sat sat FEBRUARY February february II FEB Feb feb - SUNDAY Sunday sunday SUN Sun sun FEBRUARY February february II FEB Feb feb - TUESDAY Tuesday tuesday TUE Tue tue FEBRUARY February february II FEB Feb feb - SATURDAY Saturday saturday SAT Sat sat FEBRUARY February february II FEB Feb feb - THURSDAY Thursday thursday THU Thu thu FEBRUARY February february II FEB Feb feb - TUESDAY Tuesday tuesday TUE Tue tue FEBRUARY February february II FEB Feb feb - SATURDAY Saturday saturday SAT Sat sat FEBRUARY February february II FEB Feb feb - THURSDAY Thursday thursday THU Thu thu FEBRUARY February february II FEB Feb feb - TUESDAY Tuesday tuesday TUE Tue tue FEBRUARY February february II FEB Feb feb - SUNDAY Sunday sunday SUN Sun sun FEBRUARY February february II FEB Feb feb - SATURDAY Saturday saturday SAT Sat sat FEBRUARY February february II FEB Feb feb - WEDNESDAY Wednesday wednesday WED Wed wed FEBRUARY February february II FEB Feb feb - THURSDAY Thursday thursday THU Thu thu FEBRUARY February february II FEB Feb feb - FRIDAY Friday friday FRI Fri fri MARCH March march III MAR Mar mar - MONDAY Monday monday MON Mon mon DECEMBER December december XII DEC Dec dec - TUESDAY Tuesday tuesday TUE Tue tue DECEMBER December december XII DEC Dec dec - WEDNESDAY Wednesday wednesday WED Wed wed JANUARY January january I JAN Jan jan - FRIDAY Friday friday FRI Fri fri FEBRUARY February february II FEB Feb feb - SATURDAY Saturday saturday SAT Sat sat MARCH March march III MAR Mar mar - TUESDAY Tuesday tuesday TUE Tue tue DECEMBER December december XII DEC Dec dec - WEDNESDAY Wednesday wednesday WED Wed wed DECEMBER December december XII DEC Dec dec - FRIDAY Friday friday FRI Fri fri DECEMBER December december XII DEC Dec dec - SATURDAY Saturday saturday SAT Sat sat JANUARY January january I JAN Jan jan - SUNDAY Sunday sunday SUN Sun sun DECEMBER December december XII DEC Dec dec - MONDAY Monday monday MON Mon mon JANUARY January january I JAN Jan jan -(66 rows) - -SELECT to_char(d1, 'FMDAY FMDay FMday FMMONTH FMMonth FMmonth FMRM') - FROM TIMESTAMPTZ_TBL; - to_char --------------------------------------------------------------- - - - WEDNESDAY Wednesday wednesday DECEMBER December december XII - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - THURSDAY Thursday thursday JANUARY January january I - THURSDAY Thursday thursday JANUARY January january I - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - TUESDAY Tuesday tuesday JUNE June june VI - SATURDAY Saturday saturday SEPTEMBER September september IX - WEDNESDAY Wednesday wednesday MARCH March march III - WEDNESDAY Wednesday wednesday MARCH March march III - WEDNESDAY Wednesday wednesday MARCH March march III - WEDNESDAY Wednesday wednesday MARCH March march III - WEDNESDAY Wednesday wednesday MARCH March march III - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - MONDAY Monday monday FEBRUARY February february II - THURSDAY Thursday thursday JULY July july VII - TUESDAY Tuesday tuesday JUNE June june VI - MONDAY Monday monday FEBRUARY February february II - TUESDAY Tuesday tuesday FEBRUARY February february II - WEDNESDAY Wednesday wednesday FEBRUARY February february II - THURSDAY Thursday thursday FEBRUARY February february II - FRIDAY Friday friday FEBRUARY February february II - SATURDAY Saturday saturday FEBRUARY February february II - SUNDAY Sunday sunday FEBRUARY February february II - TUESDAY Tuesday tuesday FEBRUARY February february II - SATURDAY Saturday saturday FEBRUARY February february II - THURSDAY Thursday thursday FEBRUARY February february II - TUESDAY Tuesday tuesday FEBRUARY February february II - SATURDAY Saturday saturday FEBRUARY February february II - THURSDAY Thursday thursday FEBRUARY February february II - TUESDAY Tuesday tuesday FEBRUARY February february II - SUNDAY Sunday sunday FEBRUARY February february II - SATURDAY Saturday saturday FEBRUARY February february II - WEDNESDAY Wednesday wednesday FEBRUARY February february II - THURSDAY Thursday thursday FEBRUARY February february II - FRIDAY Friday friday MARCH March march III - MONDAY Monday monday DECEMBER December december XII - TUESDAY Tuesday tuesday DECEMBER December december XII - WEDNESDAY Wednesday wednesday JANUARY January january I - FRIDAY Friday friday FEBRUARY February february II - SATURDAY Saturday saturday MARCH March march III - TUESDAY Tuesday tuesday DECEMBER December december XII - WEDNESDAY Wednesday wednesday DECEMBER December december XII - FRIDAY Friday friday DECEMBER December december XII - SATURDAY Saturday saturday JANUARY January january I - SUNDAY Sunday sunday DECEMBER December december XII - MONDAY Monday monday JANUARY January january I -(66 rows) - -SELECT to_char(d1, 'Y,YYY YYYY YYY YY Y CC Q MM WW DDD DD D J') - FROM TIMESTAMPTZ_TBL; - to_char --------------------------------------------------- - - - 1,969 1969 969 69 9 20 4 12 53 365 31 4 2440587 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 01 01 002 02 5 2450451 - 1,997 1997 997 97 7 20 1 01 01 002 02 5 2450451 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 2 06 23 161 10 3 2450610 - 2,001 2001 001 01 1 21 3 09 38 265 22 7 2452175 - 2,000 2000 000 00 0 20 1 03 11 075 15 4 2451619 - 2,000 2000 000 00 0 20 1 03 11 075 15 4 2451619 - 2,000 2000 000 00 0 20 1 03 11 075 15 4 2451619 - 2,000 2000 000 00 0 20 1 03 11 075 15 4 2451619 - 2,000 2000 000 00 0 20 1 03 11 075 15 4 2451619 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 3 07 28 191 10 5 2450640 - 1,997 1997 997 97 7 20 2 06 23 161 10 3 2450610 - 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490 - 1,997 1997 997 97 7 20 1 02 06 042 11 3 2450491 - 1,997 1997 997 97 7 20 1 02 07 043 12 4 2450492 - 1,997 1997 997 97 7 20 1 02 07 044 13 5 2450493 - 1,997 1997 997 97 7 20 1 02 07 045 14 6 2450494 - 1,997 1997 997 97 7 20 1 02 07 046 15 7 2450495 - 1,997 1997 997 97 7 20 1 02 07 047 16 1 2450496 - 0,097 0097 097 97 7 -01 1 02 07 047 16 3 1686042 - 0,097 0097 097 97 7 01 1 02 07 047 16 7 1756536 - 0,597 0597 597 97 7 06 1 02 07 047 16 5 1939157 - 1,097 1097 097 97 7 11 1 02 07 047 16 3 2121778 - 1,697 1697 697 97 7 17 1 02 07 047 16 7 2340924 - 1,797 1797 797 97 7 18 1 02 07 047 16 5 2377448 - 1,897 1897 897 97 7 19 1 02 07 047 16 3 2413972 - 1,997 1997 997 97 7 20 1 02 07 047 16 1 2450496 - 2,097 2097 097 97 7 21 1 02 07 047 16 7 2487021 - 1,996 1996 996 96 6 20 1 02 09 059 28 4 2450142 - 1,996 1996 996 96 6 20 1 02 09 060 29 5 2450143 - 1,996 1996 996 96 6 20 1 03 09 061 01 6 2450144 - 1,996 1996 996 96 6 20 4 12 53 365 30 2 2450448 - 1,996 1996 996 96 6 20 4 12 53 366 31 3 2450449 - 1,997 1997 997 97 7 20 1 01 01 001 01 4 2450450 - 1,997 1997 997 97 7 20 1 02 09 059 28 6 2450508 - 1,997 1997 997 97 7 20 1 03 09 060 01 7 2450509 - 1,997 1997 997 97 7 20 4 12 52 364 30 3 2450813 - 1,997 1997 997 97 7 20 4 12 53 365 31 4 2450814 - 1,999 1999 999 99 9 20 4 12 53 365 31 6 2451544 - 2,000 2000 000 00 0 20 1 01 01 001 01 7 2451545 - 2,000 2000 000 00 0 20 4 12 53 366 31 1 2451910 - 2,001 2001 001 01 1 21 1 01 01 001 01 2 2451911 -(66 rows) - -SELECT to_char(d1, 'FMY,YYY FMYYYY FMYYY FMYY FMY FMCC FMQ FMMM FMWW FMDDD FMDD FMD FMJ') - FROM TIMESTAMPTZ_TBL; - to_char -------------------------------------------------- - - - 1,969 1969 969 69 9 20 4 12 53 365 31 4 2440587 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 1 1 2 2 5 2450451 - 1,997 1997 997 97 7 20 1 1 1 2 2 5 2450451 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 2 6 23 161 10 3 2450610 - 2,001 2001 1 1 1 21 3 9 38 265 22 7 2452175 - 2,000 2000 0 0 0 20 1 3 11 75 15 4 2451619 - 2,000 2000 0 0 0 20 1 3 11 75 15 4 2451619 - 2,000 2000 0 0 0 20 1 3 11 75 15 4 2451619 - 2,000 2000 0 0 0 20 1 3 11 75 15 4 2451619 - 2,000 2000 0 0 0 20 1 3 11 75 15 4 2451619 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 3 7 28 191 10 5 2450640 - 1,997 1997 997 97 7 20 2 6 23 161 10 3 2450610 - 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490 - 1,997 1997 997 97 7 20 1 2 6 42 11 3 2450491 - 1,997 1997 997 97 7 20 1 2 7 43 12 4 2450492 - 1,997 1997 997 97 7 20 1 2 7 44 13 5 2450493 - 1,997 1997 997 97 7 20 1 2 7 45 14 6 2450494 - 1,997 1997 997 97 7 20 1 2 7 46 15 7 2450495 - 1,997 1997 997 97 7 20 1 2 7 47 16 1 2450496 - 0,097 97 97 97 7 -1 1 2 7 47 16 3 1686042 - 0,097 97 97 97 7 1 1 2 7 47 16 7 1756536 - 0,597 597 597 97 7 6 1 2 7 47 16 5 1939157 - 1,097 1097 97 97 7 11 1 2 7 47 16 3 2121778 - 1,697 1697 697 97 7 17 1 2 7 47 16 7 2340924 - 1,797 1797 797 97 7 18 1 2 7 47 16 5 2377448 - 1,897 1897 897 97 7 19 1 2 7 47 16 3 2413972 - 1,997 1997 997 97 7 20 1 2 7 47 16 1 2450496 - 2,097 2097 97 97 7 21 1 2 7 47 16 7 2487021 - 1,996 1996 996 96 6 20 1 2 9 59 28 4 2450142 - 1,996 1996 996 96 6 20 1 2 9 60 29 5 2450143 - 1,996 1996 996 96 6 20 1 3 9 61 1 6 2450144 - 1,996 1996 996 96 6 20 4 12 53 365 30 2 2450448 - 1,996 1996 996 96 6 20 4 12 53 366 31 3 2450449 - 1,997 1997 997 97 7 20 1 1 1 1 1 4 2450450 - 1,997 1997 997 97 7 20 1 2 9 59 28 6 2450508 - 1,997 1997 997 97 7 20 1 3 9 60 1 7 2450509 - 1,997 1997 997 97 7 20 4 12 52 364 30 3 2450813 - 1,997 1997 997 97 7 20 4 12 53 365 31 4 2450814 - 1,999 1999 999 99 9 20 4 12 53 365 31 6 2451544 - 2,000 2000 0 0 0 20 1 1 1 1 1 7 2451545 - 2,000 2000 0 0 0 20 4 12 53 366 31 1 2451910 - 2,001 2001 1 1 1 21 1 1 1 1 1 2 2451911 -(66 rows) - -SELECT to_char(d1, 'HH HH12 HH24 MI SS SSSS') - FROM TIMESTAMPTZ_TBL; - to_char ----------------------- - - - 04 04 16 00 00 57600 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 02 63122 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 12 12 00 00 00 0 - 03 03 03 04 05 11045 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 06 06 18 19 20 65960 - 08 08 08 14 01 29641 - 04 04 04 14 02 15242 - 02 02 02 14 03 8043 - 03 03 03 14 04 11644 - 01 01 01 14 05 4445 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 00 63120 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 09 09 09 32 01 34321 - 09 09 09 32 01 34321 - 09 09 09 32 01 34321 - 02 02 14 32 01 52321 - 02 02 14 32 01 52321 - 06 06 18 32 01 66721 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 - 05 05 17 32 01 63121 -(66 rows) - -SELECT to_char(d1, E'"HH:MI:SS is" HH:MI:SS "\\"text between quote marks\\""') - FROM TIMESTAMPTZ_TBL; - to_char -------------------------------------------------- - - - HH:MI:SS is 04:00:00 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:02 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 12:00:00 "text between quote marks" - HH:MI:SS is 03:04:05 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 06:19:20 "text between quote marks" - HH:MI:SS is 08:14:01 "text between quote marks" - HH:MI:SS is 04:14:02 "text between quote marks" - HH:MI:SS is 02:14:03 "text between quote marks" - HH:MI:SS is 03:14:04 "text between quote marks" - HH:MI:SS is 01:14:05 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:00 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 09:32:01 "text between quote marks" - HH:MI:SS is 09:32:01 "text between quote marks" - HH:MI:SS is 09:32:01 "text between quote marks" - HH:MI:SS is 02:32:01 "text between quote marks" - HH:MI:SS is 02:32:01 "text between quote marks" - HH:MI:SS is 06:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" - HH:MI:SS is 05:32:01 "text between quote marks" -(66 rows) - -SELECT to_char(d1, 'HH24--text--MI--text--SS') - FROM TIMESTAMPTZ_TBL; - to_char ------------------------- - - - 16--text--00--text--00 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--02 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 00--text--00--text--00 - 03--text--04--text--05 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 18--text--19--text--20 - 08--text--14--text--01 - 04--text--14--text--02 - 02--text--14--text--03 - 03--text--14--text--04 - 01--text--14--text--05 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--00 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 09--text--32--text--01 - 09--text--32--text--01 - 09--text--32--text--01 - 14--text--32--text--01 - 14--text--32--text--01 - 18--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 - 17--text--32--text--01 -(66 rows) - -SELECT to_char(d1, 'YYYYTH YYYYth Jth') - FROM TIMESTAMPTZ_TBL; - to_char -------------------------- - - - 1969TH 1969th 2440587th - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450451st - 1997TH 1997th 2450451st - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450610th - 2001ST 2001st 2452175th - 2000TH 2000th 2451619th - 2000TH 2000th 2451619th - 2000TH 2000th 2451619th - 2000TH 2000th 2451619th - 2000TH 2000th 2451619th - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450490th - 1997TH 1997th 2450640th - 1997TH 1997th 2450610th - 1997TH 1997th 2450490th - 1997TH 1997th 2450491st - 1997TH 1997th 2450492nd - 1997TH 1997th 2450493rd - 1997TH 1997th 2450494th - 1997TH 1997th 2450495th - 1997TH 1997th 2450496th - 0097TH 0097th 1686042nd - 0097TH 0097th 1756536th - 0597TH 0597th 1939157th - 1097TH 1097th 2121778th - 1697TH 1697th 2340924th - 1797TH 1797th 2377448th - 1897TH 1897th 2413972nd - 1997TH 1997th 2450496th - 2097TH 2097th 2487021st - 1996TH 1996th 2450142nd - 1996TH 1996th 2450143rd - 1996TH 1996th 2450144th - 1996TH 1996th 2450448th - 1996TH 1996th 2450449th - 1997TH 1997th 2450450th - 1997TH 1997th 2450508th - 1997TH 1997th 2450509th - 1997TH 1997th 2450813th - 1997TH 1997th 2450814th - 1999TH 1999th 2451544th - 2000TH 2000th 2451545th - 2000TH 2000th 2451910th - 2001ST 2001st 2451911th -(66 rows) - -SELECT to_char(d1, 'YYYY A.D. YYYY a.d. YYYY bc HH:MI:SS P.M. HH:MI:SS p.m. HH:MI:SS pm') - FROM TIMESTAMPTZ_TBL; - to_char ---------------------------------------------------------------------- - - - 1969 A.D. 1969 a.d. 1969 ad 04:00:00 P.M. 04:00:00 p.m. 04:00:00 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:02 P.M. 05:32:02 p.m. 05:32:02 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 12:00:00 A.M. 12:00:00 a.m. 12:00:00 am - 1997 A.D. 1997 a.d. 1997 ad 03:04:05 A.M. 03:04:05 a.m. 03:04:05 am - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 2001 A.D. 2001 a.d. 2001 ad 06:19:20 P.M. 06:19:20 p.m. 06:19:20 pm - 2000 A.D. 2000 a.d. 2000 ad 08:14:01 A.M. 08:14:01 a.m. 08:14:01 am - 2000 A.D. 2000 a.d. 2000 ad 04:14:02 A.M. 04:14:02 a.m. 04:14:02 am - 2000 A.D. 2000 a.d. 2000 ad 02:14:03 A.M. 02:14:03 a.m. 02:14:03 am - 2000 A.D. 2000 a.d. 2000 ad 03:14:04 A.M. 03:14:04 a.m. 03:14:04 am - 2000 A.D. 2000 a.d. 2000 ad 01:14:05 A.M. 01:14:05 a.m. 01:14:05 am - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:00 P.M. 05:32:00 p.m. 05:32:00 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 09:32:01 A.M. 09:32:01 a.m. 09:32:01 am - 1997 A.D. 1997 a.d. 1997 ad 09:32:01 A.M. 09:32:01 a.m. 09:32:01 am - 1997 A.D. 1997 a.d. 1997 ad 09:32:01 A.M. 09:32:01 a.m. 09:32:01 am - 1997 A.D. 1997 a.d. 1997 ad 02:32:01 P.M. 02:32:01 p.m. 02:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 02:32:01 P.M. 02:32:01 p.m. 02:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 06:32:01 P.M. 06:32:01 p.m. 06:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 0097 B.C. 0097 b.c. 0097 bc 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 0097 A.D. 0097 a.d. 0097 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 0597 A.D. 0597 a.d. 0597 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1097 A.D. 1097 a.d. 1097 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1697 A.D. 1697 a.d. 1697 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1797 A.D. 1797 a.d. 1797 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1897 A.D. 1897 a.d. 1897 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 2097 A.D. 2097 a.d. 2097 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1996 A.D. 1996 a.d. 1996 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1996 A.D. 1996 a.d. 1996 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1996 A.D. 1996 a.d. 1996 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1996 A.D. 1996 a.d. 1996 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1996 A.D. 1996 a.d. 1996 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 1999 A.D. 1999 a.d. 1999 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 2000 A.D. 2000 a.d. 2000 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 2000 A.D. 2000 a.d. 2000 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm - 2001 A.D. 2001 a.d. 2001 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm -(66 rows) - -SELECT to_char(d1, 'IYYY IYY IY I IW IDDD ID') - FROM TIMESTAMPTZ_TBL; - to_char ------------------------- - - - 1970 970 70 0 01 003 3 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 01 004 4 - 1997 997 97 7 01 004 4 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 24 163 2 - 2001 001 01 1 38 265 6 - 2000 000 00 0 11 073 3 - 2000 000 00 0 11 073 3 - 2000 000 00 0 11 073 3 - 2000 000 00 0 11 073 3 - 2000 000 00 0 11 073 3 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 043 1 - 1997 997 97 7 28 193 4 - 1997 997 97 7 24 163 2 - 1997 997 97 7 07 043 1 - 1997 997 97 7 07 044 2 - 1997 997 97 7 07 045 3 - 1997 997 97 7 07 046 4 - 1997 997 97 7 07 047 5 - 1997 997 97 7 07 048 6 - 1997 997 97 7 07 049 7 - 0097 097 97 7 07 044 2 - 0097 097 97 7 07 048 6 - 0597 597 97 7 07 046 4 - 1097 097 97 7 07 044 2 - 1697 697 97 7 07 048 6 - 1797 797 97 7 07 046 4 - 1897 897 97 7 07 044 2 - 1997 997 97 7 07 049 7 - 2097 097 97 7 07 048 6 - 1996 996 96 6 09 059 3 - 1996 996 96 6 09 060 4 - 1996 996 96 6 09 061 5 - 1997 997 97 7 01 001 1 - 1997 997 97 7 01 002 2 - 1997 997 97 7 01 003 3 - 1997 997 97 7 09 061 5 - 1997 997 97 7 09 062 6 - 1998 998 98 8 01 002 2 - 1998 998 98 8 01 003 3 - 1999 999 99 9 52 362 5 - 1999 999 99 9 52 363 6 - 2000 000 00 0 52 364 7 - 2001 001 01 1 01 001 1 -(66 rows) - -SELECT to_char(d1, 'FMIYYY FMIYY FMIY FMI FMIW FMIDDD FMID') - FROM TIMESTAMPTZ_TBL; - to_char ------------------------- - - - 1970 970 70 0 1 3 3 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 1 4 4 - 1997 997 97 7 1 4 4 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 24 163 2 - 2001 1 1 1 38 265 6 - 2000 0 0 0 11 73 3 - 2000 0 0 0 11 73 3 - 2000 0 0 0 11 73 3 - 2000 0 0 0 11 73 3 - 2000 0 0 0 11 73 3 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 43 1 - 1997 997 97 7 28 193 4 - 1997 997 97 7 24 163 2 - 1997 997 97 7 7 43 1 - 1997 997 97 7 7 44 2 - 1997 997 97 7 7 45 3 - 1997 997 97 7 7 46 4 - 1997 997 97 7 7 47 5 - 1997 997 97 7 7 48 6 - 1997 997 97 7 7 49 7 - 97 97 97 7 7 44 2 - 97 97 97 7 7 48 6 - 597 597 97 7 7 46 4 - 1097 97 97 7 7 44 2 - 1697 697 97 7 7 48 6 - 1797 797 97 7 7 46 4 - 1897 897 97 7 7 44 2 - 1997 997 97 7 7 49 7 - 2097 97 97 7 7 48 6 - 1996 996 96 6 9 59 3 - 1996 996 96 6 9 60 4 - 1996 996 96 6 9 61 5 - 1997 997 97 7 1 1 1 - 1997 997 97 7 1 2 2 - 1997 997 97 7 1 3 3 - 1997 997 97 7 9 61 5 - 1997 997 97 7 9 62 6 - 1998 998 98 8 1 2 2 - 1998 998 98 8 1 3 3 - 1999 999 99 9 52 362 5 - 1999 999 99 9 52 363 6 - 2000 0 0 0 52 364 7 - 2001 1 1 1 1 1 1 -(66 rows) - -SELECT to_char(d, 'FF1 FF2 FF3 FF4 FF5 FF6 ff1 ff2 ff3 ff4 ff5 ff6 MS US') - FROM (VALUES - ('2018-11-02 12:34:56'::timestamptz), - ('2018-11-02 12:34:56.78'), - ('2018-11-02 12:34:56.78901'), - ('2018-11-02 12:34:56.78901234') - ) d(d); - to_char --------------------------------------------------------------------- - 0 00 000 0000 00000 000000 0 00 000 0000 00000 000000 000 000000 - 7 78 780 7800 78000 780000 7 78 780 7800 78000 780000 780 780000 - 7 78 789 7890 78901 789010 7 78 789 7890 78901 789010 789 789010 - 7 78 789 7890 78901 789012 7 78 789 7890 78901 789012 789 789012 -(4 rows) - --- Check OF, TZH, TZM with various zone offsets, particularly fractional hours -SET timezone = '00:00'; -SELECT to_char(now(), 'OF') as "OF", to_char(now(), 'TZH:TZM') as "TZH:TZM"; - OF | TZH:TZM ------+--------- - +00 | +00:00 -(1 row) - -SET timezone = '+02:00'; -SELECT to_char(now(), 'OF') as "OF", to_char(now(), 'TZH:TZM') as "TZH:TZM"; - OF | TZH:TZM ------+--------- - -02 | -02:00 -(1 row) - -SET timezone = '-13:00'; -SELECT to_char(now(), 'OF') as "OF", to_char(now(), 'TZH:TZM') as "TZH:TZM"; - OF | TZH:TZM ------+--------- - +13 | +13:00 -(1 row) - -SET timezone = '-00:30'; -SELECT to_char(now(), 'OF') as "OF", to_char(now(), 'TZH:TZM') as "TZH:TZM"; - OF | TZH:TZM ---------+--------- - +00:30 | +00:30 -(1 row) - -SET timezone = '00:30'; -SELECT to_char(now(), 'OF') as "OF", to_char(now(), 'TZH:TZM') as "TZH:TZM"; - OF | TZH:TZM ---------+--------- - -00:30 | -00:30 -(1 row) - -SET timezone = '-04:30'; -SELECT to_char(now(), 'OF') as "OF", to_char(now(), 'TZH:TZM') as "TZH:TZM"; - OF | TZH:TZM ---------+--------- - +04:30 | +04:30 -(1 row) - -SET timezone = '04:30'; -SELECT to_char(now(), 'OF') as "OF", to_char(now(), 'TZH:TZM') as "TZH:TZM"; - OF | TZH:TZM ---------+--------- - -04:30 | -04:30 -(1 row) - -SET timezone = '-04:15'; -SELECT to_char(now(), 'OF') as "OF", to_char(now(), 'TZH:TZM') as "TZH:TZM"; - OF | TZH:TZM ---------+--------- - +04:15 | +04:15 -(1 row) - -SET timezone = '04:15'; -SELECT to_char(now(), 'OF') as "OF", to_char(now(), 'TZH:TZM') as "TZH:TZM"; - OF | TZH:TZM ---------+--------- - -04:15 | -04:15 -(1 row) - -RESET timezone; -CREATE TABLE TIMESTAMPTZ_TST (a int , b timestamptz); --- Test year field value with len > 4 -INSERT INTO TIMESTAMPTZ_TST VALUES(1, 'Sat Mar 12 23:58:48 1000 IST'); -INSERT INTO TIMESTAMPTZ_TST VALUES(2, 'Sat Mar 12 23:58:48 10000 IST'); -INSERT INTO TIMESTAMPTZ_TST VALUES(3, 'Sat Mar 12 23:58:48 100000 IST'); -INSERT INTO TIMESTAMPTZ_TST VALUES(3, '10000 Mar 12 23:58:48 IST'); -INSERT INTO TIMESTAMPTZ_TST VALUES(4, '100000312 23:58:48 IST'); -INSERT INTO TIMESTAMPTZ_TST VALUES(4, '1000000312 23:58:48 IST'); ---Verify data -SELECT * FROM TIMESTAMPTZ_TST ORDER BY a; - a | b ----+-------------------------------- - 1 | Wed Mar 12 13:58:48 1000 PST - 2 | Sun Mar 12 14:58:48 10000 PDT - 3 | Sun Mar 12 14:58:48 100000 PDT - 3 | Sun Mar 12 14:58:48 10000 PDT - 4 | Sun Mar 12 14:58:48 10000 PDT - 4 | Sun Mar 12 14:58:48 100000 PDT -(6 rows) - ---Cleanup -DROP TABLE TIMESTAMPTZ_TST; --- test timestamptz constructors -set TimeZone to 'America/New_York'; --- numeric timezone -SELECT make_timestamptz(1973, 07, 15, 08, 15, 55.33); - make_timestamptz ---------------------------------- - Sun Jul 15 08:15:55.33 1973 EDT -(1 row) - -SELECT make_timestamptz(1973, 07, 15, 08, 15, 55.33, '+2'); - make_timestamptz ---------------------------------- - Sun Jul 15 02:15:55.33 1973 EDT -(1 row) - -SELECT make_timestamptz(1973, 07, 15, 08, 15, 55.33, '-2'); - make_timestamptz ---------------------------------- - Sun Jul 15 06:15:55.33 1973 EDT -(1 row) - -WITH tzs (tz) AS (VALUES - ('+1'), ('+1:'), ('+1:0'), ('+100'), ('+1:00'), ('+01:00'), - ('+10'), ('+1000'), ('+10:'), ('+10:0'), ('+10:00'), ('+10:00:'), - ('+10:00:1'), ('+10:00:01'), - ('+10:00:10')) - SELECT make_timestamptz(2010, 2, 27, 3, 45, 00, tz), tz FROM tzs; - make_timestamptz | tz -------------------------------+----------- - Fri Feb 26 21:45:00 2010 EST | +1 - Fri Feb 26 21:45:00 2010 EST | +1: - Fri Feb 26 21:45:00 2010 EST | +1:0 - Fri Feb 26 21:45:00 2010 EST | +100 - Fri Feb 26 21:45:00 2010 EST | +1:00 - Fri Feb 26 21:45:00 2010 EST | +01:00 - Fri Feb 26 12:45:00 2010 EST | +10 - Fri Feb 26 12:45:00 2010 EST | +1000 - Fri Feb 26 12:45:00 2010 EST | +10: - Fri Feb 26 12:45:00 2010 EST | +10:0 - Fri Feb 26 12:45:00 2010 EST | +10:00 - Fri Feb 26 12:45:00 2010 EST | +10:00: - Fri Feb 26 12:44:59 2010 EST | +10:00:1 - Fri Feb 26 12:44:59 2010 EST | +10:00:01 - Fri Feb 26 12:44:50 2010 EST | +10:00:10 -(15 rows) - --- these should fail -SELECT make_timestamptz(1973, 07, 15, 08, 15, 55.33, '2'); -ERROR: invalid input syntax for type numeric time zone: "2" -HINT: Numeric time zones must have "-" or "+" as first character. -SELECT make_timestamptz(2014, 12, 10, 10, 10, 10, '+16'); -ERROR: numeric time zone "+16" out of range -SELECT make_timestamptz(2014, 12, 10, 10, 10, 10, '-16'); -ERROR: numeric time zone "-16" out of range --- should be true -SELECT make_timestamptz(1973, 07, 15, 08, 15, 55.33, '+2') = '1973-07-15 08:15:55.33+02'::timestamptz; - ?column? ----------- - t -(1 row) - --- full timezone names -SELECT make_timestamptz(2014, 12, 10, 0, 0, 0, 'Europe/Prague') = timestamptz '2014-12-10 00:00:00 Europe/Prague'; - ?column? ----------- - t -(1 row) - -SELECT make_timestamptz(2014, 12, 10, 0, 0, 0, 'Europe/Prague') AT TIME ZONE 'UTC'; - timezone --------------------------- - Tue Dec 09 23:00:00 2014 -(1 row) - -SELECT make_timestamptz(1846, 12, 10, 0, 0, 0, 'Asia/Manila') AT TIME ZONE 'UTC'; - timezone --------------------------- - Wed Dec 09 15:56:00 1846 -(1 row) - -SELECT make_timestamptz(1881, 12, 10, 0, 0, 0, 'Europe/Paris') AT TIME ZONE 'UTC'; - timezone --------------------------- - Fri Dec 09 23:50:39 1881 -(1 row) - -SELECT make_timestamptz(1910, 12, 24, 0, 0, 0, 'Nehwon/Lankhmar'); -ERROR: time zone "Nehwon/Lankhmar" not recognized --- abbreviations -SELECT make_timestamptz(2008, 12, 10, 10, 10, 10, 'EST'); - make_timestamptz ------------------------------- - Wed Dec 10 10:10:10 2008 EST -(1 row) - -SELECT make_timestamptz(2008, 12, 10, 10, 10, 10, 'EDT'); - make_timestamptz ------------------------------- - Wed Dec 10 09:10:10 2008 EST -(1 row) - -SELECT make_timestamptz(2014, 12, 10, 10, 10, 10, 'PST8PDT'); - make_timestamptz ------------------------------- - Wed Dec 10 13:10:10 2014 EST -(1 row) - -RESET TimeZone; --- generate_series for timestamptz -select * from generate_series('2020-01-01 00:00'::timestamptz, - '2020-01-02 03:00'::timestamptz, - '1 hour'::interval); - generate_series ------------------------------- - Wed Jan 01 00:00:00 2020 PST - Wed Jan 01 01:00:00 2020 PST - Wed Jan 01 02:00:00 2020 PST - Wed Jan 01 03:00:00 2020 PST - Wed Jan 01 04:00:00 2020 PST - Wed Jan 01 05:00:00 2020 PST - Wed Jan 01 06:00:00 2020 PST - Wed Jan 01 07:00:00 2020 PST - Wed Jan 01 08:00:00 2020 PST - Wed Jan 01 09:00:00 2020 PST - Wed Jan 01 10:00:00 2020 PST - Wed Jan 01 11:00:00 2020 PST - Wed Jan 01 12:00:00 2020 PST - Wed Jan 01 13:00:00 2020 PST - Wed Jan 01 14:00:00 2020 PST - Wed Jan 01 15:00:00 2020 PST - Wed Jan 01 16:00:00 2020 PST - Wed Jan 01 17:00:00 2020 PST - Wed Jan 01 18:00:00 2020 PST - Wed Jan 01 19:00:00 2020 PST - Wed Jan 01 20:00:00 2020 PST - Wed Jan 01 21:00:00 2020 PST - Wed Jan 01 22:00:00 2020 PST - Wed Jan 01 23:00:00 2020 PST - Thu Jan 02 00:00:00 2020 PST - Thu Jan 02 01:00:00 2020 PST - Thu Jan 02 02:00:00 2020 PST - Thu Jan 02 03:00:00 2020 PST -(28 rows) - --- the LIMIT should allow this to terminate in a reasonable amount of time --- (but that unfortunately doesn't work yet for SELECT * FROM ...) -select generate_series('2022-01-01 00:00'::timestamptz, - 'infinity'::timestamptz, - '1 month'::interval) limit 10; - generate_series ------------------------------- - Sat Jan 01 00:00:00 2022 PST - Tue Feb 01 00:00:00 2022 PST - Tue Mar 01 00:00:00 2022 PST - Fri Apr 01 00:00:00 2022 PDT - Sun May 01 00:00:00 2022 PDT - Wed Jun 01 00:00:00 2022 PDT - Fri Jul 01 00:00:00 2022 PDT - Mon Aug 01 00:00:00 2022 PDT - Thu Sep 01 00:00:00 2022 PDT - Sat Oct 01 00:00:00 2022 PDT -(10 rows) - --- errors -select * from generate_series('2020-01-01 00:00'::timestamptz, - '2020-01-02 03:00'::timestamptz, - '0 hour'::interval); -ERROR: step size cannot equal zero --- --- Test behavior with a dynamic (time-varying) timezone abbreviation. --- These tests rely on the knowledge that MSK (Europe/Moscow standard time) --- moved forwards in Mar 2011 and backwards again in Oct 2014. --- -SET TimeZone to 'UTC'; -SELECT '2011-03-27 00:00:00 Europe/Moscow'::timestamptz; - timestamptz ------------------------------- - Sat Mar 26 21:00:00 2011 UTC -(1 row) - -SELECT '2011-03-27 01:00:00 Europe/Moscow'::timestamptz; - timestamptz ------------------------------- - Sat Mar 26 22:00:00 2011 UTC -(1 row) - -SELECT '2011-03-27 01:59:59 Europe/Moscow'::timestamptz; - timestamptz ------------------------------- - Sat Mar 26 22:59:59 2011 UTC -(1 row) - -SELECT '2011-03-27 02:00:00 Europe/Moscow'::timestamptz; - timestamptz ------------------------------- - Sat Mar 26 23:00:00 2011 UTC -(1 row) - -SELECT '2011-03-27 02:00:01 Europe/Moscow'::timestamptz; - timestamptz ------------------------------- - Sat Mar 26 23:00:01 2011 UTC -(1 row) - -SELECT '2011-03-27 02:59:59 Europe/Moscow'::timestamptz; - timestamptz ------------------------------- - Sat Mar 26 23:59:59 2011 UTC -(1 row) - -SELECT '2011-03-27 03:00:00 Europe/Moscow'::timestamptz; - timestamptz ------------------------------- - Sat Mar 26 23:00:00 2011 UTC -(1 row) - -SELECT '2011-03-27 03:00:01 Europe/Moscow'::timestamptz; - timestamptz ------------------------------- - Sat Mar 26 23:00:01 2011 UTC -(1 row) - -SELECT '2011-03-27 04:00:00 Europe/Moscow'::timestamptz; - timestamptz ------------------------------- - Sun Mar 27 00:00:00 2011 UTC -(1 row) - -SELECT '2011-03-27 00:00:00 MSK'::timestamptz; - timestamptz ------------------------------- - Sat Mar 26 21:00:00 2011 UTC -(1 row) - -SELECT '2011-03-27 01:00:00 MSK'::timestamptz; - timestamptz ------------------------------- - Sat Mar 26 22:00:00 2011 UTC -(1 row) - -SELECT '2011-03-27 01:59:59 MSK'::timestamptz; - timestamptz ------------------------------- - Sat Mar 26 22:59:59 2011 UTC -(1 row) - -SELECT '2011-03-27 02:00:00 MSK'::timestamptz; - timestamptz ------------------------------- - Sat Mar 26 22:00:00 2011 UTC -(1 row) - -SELECT '2011-03-27 02:00:01 MSK'::timestamptz; - timestamptz ------------------------------- - Sat Mar 26 22:00:01 2011 UTC -(1 row) - -SELECT '2011-03-27 02:59:59 MSK'::timestamptz; - timestamptz ------------------------------- - Sat Mar 26 22:59:59 2011 UTC -(1 row) - -SELECT '2011-03-27 03:00:00 MSK'::timestamptz; - timestamptz ------------------------------- - Sat Mar 26 23:00:00 2011 UTC -(1 row) - -SELECT '2011-03-27 03:00:01 MSK'::timestamptz; - timestamptz ------------------------------- - Sat Mar 26 23:00:01 2011 UTC -(1 row) - -SELECT '2011-03-27 04:00:00 MSK'::timestamptz; - timestamptz ------------------------------- - Sun Mar 27 00:00:00 2011 UTC -(1 row) - -SELECT '2014-10-26 00:00:00 Europe/Moscow'::timestamptz; - timestamptz ------------------------------- - Sat Oct 25 20:00:00 2014 UTC -(1 row) - -SELECT '2014-10-26 00:59:59 Europe/Moscow'::timestamptz; - timestamptz ------------------------------- - Sat Oct 25 20:59:59 2014 UTC -(1 row) - -SELECT '2014-10-26 01:00:00 Europe/Moscow'::timestamptz; - timestamptz ------------------------------- - Sat Oct 25 22:00:00 2014 UTC -(1 row) - -SELECT '2014-10-26 01:00:01 Europe/Moscow'::timestamptz; - timestamptz ------------------------------- - Sat Oct 25 22:00:01 2014 UTC -(1 row) - -SELECT '2014-10-26 02:00:00 Europe/Moscow'::timestamptz; - timestamptz ------------------------------- - Sat Oct 25 23:00:00 2014 UTC -(1 row) - -SELECT '2014-10-26 00:00:00 MSK'::timestamptz; - timestamptz ------------------------------- - Sat Oct 25 20:00:00 2014 UTC -(1 row) - -SELECT '2014-10-26 00:59:59 MSK'::timestamptz; - timestamptz ------------------------------- - Sat Oct 25 20:59:59 2014 UTC -(1 row) - -SELECT '2014-10-26 01:00:00 MSK'::timestamptz; - timestamptz ------------------------------- - Sat Oct 25 22:00:00 2014 UTC -(1 row) - -SELECT '2014-10-26 01:00:01 MSK'::timestamptz; - timestamptz ------------------------------- - Sat Oct 25 22:00:01 2014 UTC -(1 row) - -SELECT '2014-10-26 02:00:00 MSK'::timestamptz; - timestamptz ------------------------------- - Sat Oct 25 23:00:00 2014 UTC -(1 row) - -SELECT '2011-03-27 00:00:00'::timestamp AT TIME ZONE 'Europe/Moscow'; - timezone ------------------------------- - Sat Mar 26 21:00:00 2011 UTC -(1 row) - -SELECT '2011-03-27 01:00:00'::timestamp AT TIME ZONE 'Europe/Moscow'; - timezone ------------------------------- - Sat Mar 26 22:00:00 2011 UTC -(1 row) - -SELECT '2011-03-27 01:59:59'::timestamp AT TIME ZONE 'Europe/Moscow'; - timezone ------------------------------- - Sat Mar 26 22:59:59 2011 UTC -(1 row) - -SELECT '2011-03-27 02:00:00'::timestamp AT TIME ZONE 'Europe/Moscow'; - timezone ------------------------------- - Sat Mar 26 23:00:00 2011 UTC -(1 row) - -SELECT '2011-03-27 02:00:01'::timestamp AT TIME ZONE 'Europe/Moscow'; - timezone ------------------------------- - Sat Mar 26 23:00:01 2011 UTC -(1 row) - -SELECT '2011-03-27 02:59:59'::timestamp AT TIME ZONE 'Europe/Moscow'; - timezone ------------------------------- - Sat Mar 26 23:59:59 2011 UTC -(1 row) - -SELECT '2011-03-27 03:00:00'::timestamp AT TIME ZONE 'Europe/Moscow'; - timezone ------------------------------- - Sat Mar 26 23:00:00 2011 UTC -(1 row) - -SELECT '2011-03-27 03:00:01'::timestamp AT TIME ZONE 'Europe/Moscow'; - timezone ------------------------------- - Sat Mar 26 23:00:01 2011 UTC -(1 row) - -SELECT '2011-03-27 04:00:00'::timestamp AT TIME ZONE 'Europe/Moscow'; - timezone ------------------------------- - Sun Mar 27 00:00:00 2011 UTC -(1 row) - -SELECT '2011-03-27 00:00:00'::timestamp AT TIME ZONE 'MSK'; - timezone ------------------------------- - Sat Mar 26 21:00:00 2011 UTC -(1 row) - -SELECT '2011-03-27 01:00:00'::timestamp AT TIME ZONE 'MSK'; - timezone ------------------------------- - Sat Mar 26 22:00:00 2011 UTC -(1 row) - -SELECT '2011-03-27 01:59:59'::timestamp AT TIME ZONE 'MSK'; - timezone ------------------------------- - Sat Mar 26 22:59:59 2011 UTC -(1 row) - -SELECT '2011-03-27 02:00:00'::timestamp AT TIME ZONE 'MSK'; - timezone ------------------------------- - Sat Mar 26 22:00:00 2011 UTC -(1 row) - -SELECT '2011-03-27 02:00:01'::timestamp AT TIME ZONE 'MSK'; - timezone ------------------------------- - Sat Mar 26 22:00:01 2011 UTC -(1 row) - -SELECT '2011-03-27 02:59:59'::timestamp AT TIME ZONE 'MSK'; - timezone ------------------------------- - Sat Mar 26 22:59:59 2011 UTC -(1 row) - -SELECT '2011-03-27 03:00:00'::timestamp AT TIME ZONE 'MSK'; - timezone ------------------------------- - Sat Mar 26 23:00:00 2011 UTC -(1 row) - -SELECT '2011-03-27 03:00:01'::timestamp AT TIME ZONE 'MSK'; - timezone ------------------------------- - Sat Mar 26 23:00:01 2011 UTC -(1 row) - -SELECT '2011-03-27 04:00:00'::timestamp AT TIME ZONE 'MSK'; - timezone ------------------------------- - Sun Mar 27 00:00:00 2011 UTC -(1 row) - -SELECT '2014-10-26 00:00:00'::timestamp AT TIME ZONE 'Europe/Moscow'; - timezone ------------------------------- - Sat Oct 25 20:00:00 2014 UTC -(1 row) - -SELECT '2014-10-26 00:59:59'::timestamp AT TIME ZONE 'Europe/Moscow'; - timezone ------------------------------- - Sat Oct 25 20:59:59 2014 UTC -(1 row) - -SELECT '2014-10-26 01:00:00'::timestamp AT TIME ZONE 'Europe/Moscow'; - timezone ------------------------------- - Sat Oct 25 22:00:00 2014 UTC -(1 row) - -SELECT '2014-10-26 01:00:01'::timestamp AT TIME ZONE 'Europe/Moscow'; - timezone ------------------------------- - Sat Oct 25 22:00:01 2014 UTC -(1 row) - -SELECT '2014-10-26 02:00:00'::timestamp AT TIME ZONE 'Europe/Moscow'; - timezone ------------------------------- - Sat Oct 25 23:00:00 2014 UTC -(1 row) - -SELECT '2014-10-26 00:00:00'::timestamp AT TIME ZONE 'MSK'; - timezone ------------------------------- - Sat Oct 25 20:00:00 2014 UTC -(1 row) - -SELECT '2014-10-26 00:59:59'::timestamp AT TIME ZONE 'MSK'; - timezone ------------------------------- - Sat Oct 25 20:59:59 2014 UTC -(1 row) - -SELECT '2014-10-26 01:00:00'::timestamp AT TIME ZONE 'MSK'; - timezone ------------------------------- - Sat Oct 25 22:00:00 2014 UTC -(1 row) - -SELECT '2014-10-26 01:00:01'::timestamp AT TIME ZONE 'MSK'; - timezone ------------------------------- - Sat Oct 25 22:00:01 2014 UTC -(1 row) - -SELECT '2014-10-26 02:00:00'::timestamp AT TIME ZONE 'MSK'; - timezone ------------------------------- - Sat Oct 25 23:00:00 2014 UTC -(1 row) - -SELECT make_timestamptz(2014, 10, 26, 0, 0, 0, 'MSK'); - make_timestamptz ------------------------------- - Sat Oct 25 20:00:00 2014 UTC -(1 row) - -SELECT make_timestamptz(2014, 10, 26, 1, 0, 0, 'MSK'); - make_timestamptz ------------------------------- - Sat Oct 25 22:00:00 2014 UTC -(1 row) - -SELECT to_timestamp( 0); -- 1970-01-01 00:00:00+00 - to_timestamp ------------------------------- - Thu Jan 01 00:00:00 1970 UTC -(1 row) - -SELECT to_timestamp( 946684800); -- 2000-01-01 00:00:00+00 - to_timestamp ------------------------------- - Sat Jan 01 00:00:00 2000 UTC -(1 row) - -SELECT to_timestamp(1262349296.7890123); -- 2010-01-01 12:34:56.789012+00 - to_timestamp -------------------------------------- - Fri Jan 01 12:34:56.789012 2010 UTC -(1 row) - --- edge cases -SELECT to_timestamp(-210866803200); -- 4714-11-24 00:00:00+00 BC - to_timestamp ---------------------------------- - Mon Nov 24 00:00:00 4714 UTC BC -(1 row) - --- upper limit varies between integer and float timestamps, so hard to test --- nonfinite values -SELECT to_timestamp(' Infinity'::float); - to_timestamp --------------- - infinity -(1 row) - -SELECT to_timestamp('-Infinity'::float); - to_timestamp --------------- - -infinity -(1 row) - -SELECT to_timestamp('NaN'::float); -ERROR: timestamp cannot be NaN -SET TimeZone to 'Europe/Moscow'; -SELECT '2011-03-26 21:00:00 UTC'::timestamptz; - timestamptz ------------------------------- - Sun Mar 27 00:00:00 2011 MSK -(1 row) - -SELECT '2011-03-26 22:00:00 UTC'::timestamptz; - timestamptz ------------------------------- - Sun Mar 27 01:00:00 2011 MSK -(1 row) - -SELECT '2011-03-26 22:59:59 UTC'::timestamptz; - timestamptz ------------------------------- - Sun Mar 27 01:59:59 2011 MSK -(1 row) - -SELECT '2011-03-26 23:00:00 UTC'::timestamptz; - timestamptz ------------------------------- - Sun Mar 27 03:00:00 2011 MSK -(1 row) - -SELECT '2011-03-26 23:00:01 UTC'::timestamptz; - timestamptz ------------------------------- - Sun Mar 27 03:00:01 2011 MSK -(1 row) - -SELECT '2011-03-26 23:59:59 UTC'::timestamptz; - timestamptz ------------------------------- - Sun Mar 27 03:59:59 2011 MSK -(1 row) - -SELECT '2011-03-27 00:00:00 UTC'::timestamptz; - timestamptz ------------------------------- - Sun Mar 27 04:00:00 2011 MSK -(1 row) - -SELECT '2014-10-25 21:00:00 UTC'::timestamptz; - timestamptz ------------------------------- - Sun Oct 26 01:00:00 2014 MSK -(1 row) - -SELECT '2014-10-25 21:59:59 UTC'::timestamptz; - timestamptz ------------------------------- - Sun Oct 26 01:59:59 2014 MSK -(1 row) - -SELECT '2014-10-25 22:00:00 UTC'::timestamptz; - timestamptz ------------------------------- - Sun Oct 26 01:00:00 2014 MSK -(1 row) - -SELECT '2014-10-25 22:00:01 UTC'::timestamptz; - timestamptz ------------------------------- - Sun Oct 26 01:00:01 2014 MSK -(1 row) - -SELECT '2014-10-25 23:00:00 UTC'::timestamptz; - timestamptz ------------------------------- - Sun Oct 26 02:00:00 2014 MSK -(1 row) - -RESET TimeZone; -SELECT '2011-03-26 21:00:00 UTC'::timestamptz AT TIME ZONE 'Europe/Moscow'; - timezone --------------------------- - Sun Mar 27 00:00:00 2011 -(1 row) - -SELECT '2011-03-26 22:00:00 UTC'::timestamptz AT TIME ZONE 'Europe/Moscow'; - timezone --------------------------- - Sun Mar 27 01:00:00 2011 -(1 row) - -SELECT '2011-03-26 22:59:59 UTC'::timestamptz AT TIME ZONE 'Europe/Moscow'; - timezone --------------------------- - Sun Mar 27 01:59:59 2011 -(1 row) - -SELECT '2011-03-26 23:00:00 UTC'::timestamptz AT TIME ZONE 'Europe/Moscow'; - timezone --------------------------- - Sun Mar 27 03:00:00 2011 -(1 row) - -SELECT '2011-03-26 23:00:01 UTC'::timestamptz AT TIME ZONE 'Europe/Moscow'; - timezone --------------------------- - Sun Mar 27 03:00:01 2011 -(1 row) - -SELECT '2011-03-26 23:59:59 UTC'::timestamptz AT TIME ZONE 'Europe/Moscow'; - timezone --------------------------- - Sun Mar 27 03:59:59 2011 -(1 row) - -SELECT '2011-03-27 00:00:00 UTC'::timestamptz AT TIME ZONE 'Europe/Moscow'; - timezone --------------------------- - Sun Mar 27 04:00:00 2011 -(1 row) - -SELECT '2014-10-25 21:00:00 UTC'::timestamptz AT TIME ZONE 'Europe/Moscow'; - timezone --------------------------- - Sun Oct 26 01:00:00 2014 -(1 row) - -SELECT '2014-10-25 21:59:59 UTC'::timestamptz AT TIME ZONE 'Europe/Moscow'; - timezone --------------------------- - Sun Oct 26 01:59:59 2014 -(1 row) - -SELECT '2014-10-25 22:00:00 UTC'::timestamptz AT TIME ZONE 'Europe/Moscow'; - timezone --------------------------- - Sun Oct 26 01:00:00 2014 -(1 row) - -SELECT '2014-10-25 22:00:01 UTC'::timestamptz AT TIME ZONE 'Europe/Moscow'; - timezone --------------------------- - Sun Oct 26 01:00:01 2014 -(1 row) - -SELECT '2014-10-25 23:00:00 UTC'::timestamptz AT TIME ZONE 'Europe/Moscow'; - timezone --------------------------- - Sun Oct 26 02:00:00 2014 -(1 row) - -SELECT '2011-03-26 21:00:00 UTC'::timestamptz AT TIME ZONE 'MSK'; - timezone --------------------------- - Sun Mar 27 00:00:00 2011 -(1 row) - -SELECT '2011-03-26 22:00:00 UTC'::timestamptz AT TIME ZONE 'MSK'; - timezone --------------------------- - Sun Mar 27 01:00:00 2011 -(1 row) - -SELECT '2011-03-26 22:59:59 UTC'::timestamptz AT TIME ZONE 'MSK'; - timezone --------------------------- - Sun Mar 27 01:59:59 2011 -(1 row) - -SELECT '2011-03-26 23:00:00 UTC'::timestamptz AT TIME ZONE 'MSK'; - timezone --------------------------- - Sun Mar 27 03:00:00 2011 -(1 row) - -SELECT '2011-03-26 23:00:01 UTC'::timestamptz AT TIME ZONE 'MSK'; - timezone --------------------------- - Sun Mar 27 03:00:01 2011 -(1 row) - -SELECT '2011-03-26 23:59:59 UTC'::timestamptz AT TIME ZONE 'MSK'; - timezone --------------------------- - Sun Mar 27 03:59:59 2011 -(1 row) - -SELECT '2011-03-27 00:00:00 UTC'::timestamptz AT TIME ZONE 'MSK'; - timezone --------------------------- - Sun Mar 27 04:00:00 2011 -(1 row) - -SELECT '2014-10-25 21:00:00 UTC'::timestamptz AT TIME ZONE 'MSK'; - timezone --------------------------- - Sun Oct 26 01:00:00 2014 -(1 row) - -SELECT '2014-10-25 21:59:59 UTC'::timestamptz AT TIME ZONE 'MSK'; - timezone --------------------------- - Sun Oct 26 01:59:59 2014 -(1 row) - -SELECT '2014-10-25 22:00:00 UTC'::timestamptz AT TIME ZONE 'MSK'; - timezone --------------------------- - Sun Oct 26 01:00:00 2014 -(1 row) - -SELECT '2014-10-25 22:00:01 UTC'::timestamptz AT TIME ZONE 'MSK'; - timezone --------------------------- - Sun Oct 26 01:00:01 2014 -(1 row) - -SELECT '2014-10-25 23:00:00 UTC'::timestamptz AT TIME ZONE 'MSK'; - timezone --------------------------- - Sun Oct 26 02:00:00 2014 -(1 row) - --- --- Test that AT TIME ZONE isn't misoptimized when using an index (bug #14504) --- -create temp table tmptz (f1 timestamptz primary key); -insert into tmptz values ('2017-01-18 00:00+00'); -explain (costs off) -select * from tmptz where f1 at time zone 'utc' = '2017-01-18 00:00'; - QUERY PLAN ------------------------------------------------------------------------------------------------------ - Seq Scan on tmptz - Filter: ((f1 AT TIME ZONE 'utc'::text) = 'Wed Jan 18 00:00:00 2017'::timestamp without time zone) -(2 rows) - -select * from tmptz where f1 at time zone 'utc' = '2017-01-18 00:00'; - f1 ------------------------------- - Tue Jan 17 16:00:00 2017 PST -(1 row) - +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/interval.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/interval.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/interval.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/interval.out 2023-02-20 19:44:16.689207196 -0500 @@ -1,1045 +1 @@ --- --- INTERVAL --- -SET DATESTYLE = 'ISO'; -SET IntervalStyle to postgres; --- check acceptance of "time zone style" -SELECT INTERVAL '01:00' AS "One hour"; - One hour ----------- - 01:00:00 -(1 row) - -SELECT INTERVAL '+02:00' AS "Two hours"; - Two hours ------------ - 02:00:00 -(1 row) - -SELECT INTERVAL '-08:00' AS "Eight hours"; - Eight hours -------------- - -08:00:00 -(1 row) - -SELECT INTERVAL '-1 +02:03' AS "22 hours ago..."; - 22 hours ago... -------------------- - -1 days +02:03:00 -(1 row) - -SELECT INTERVAL '-1 days +02:03' AS "22 hours ago..."; - 22 hours ago... -------------------- - -1 days +02:03:00 -(1 row) - -SELECT INTERVAL '1.5 weeks' AS "Ten days twelve hours"; - Ten days twelve hours ------------------------ - 10 days 12:00:00 -(1 row) - -SELECT INTERVAL '1.5 months' AS "One month 15 days"; - One month 15 days -------------------- - 1 mon 15 days -(1 row) - -SELECT INTERVAL '10 years -11 month -12 days +13:14' AS "9 years..."; - 9 years... ----------------------------------- - 9 years 1 mon -12 days +13:14:00 -(1 row) - -CREATE TABLE INTERVAL_TBL (f1 interval); -INSERT INTO INTERVAL_TBL (f1) VALUES ('@ 1 minute'); -INSERT INTO INTERVAL_TBL (f1) VALUES ('@ 5 hour'); -INSERT INTO INTERVAL_TBL (f1) VALUES ('@ 10 day'); -INSERT INTO INTERVAL_TBL (f1) VALUES ('@ 34 year'); -INSERT INTO INTERVAL_TBL (f1) VALUES ('@ 3 months'); -INSERT INTO INTERVAL_TBL (f1) VALUES ('@ 14 seconds ago'); -INSERT INTO INTERVAL_TBL (f1) VALUES ('1 day 2 hours 3 minutes 4 seconds'); -INSERT INTO INTERVAL_TBL (f1) VALUES ('6 years'); -INSERT INTO INTERVAL_TBL (f1) VALUES ('5 months'); -INSERT INTO INTERVAL_TBL (f1) VALUES ('5 months 12 hours'); --- badly formatted interval -INSERT INTO INTERVAL_TBL (f1) VALUES ('badly formatted interval'); -ERROR: invalid input syntax for type interval: "badly formatted interval" -LINE 1: INSERT INTO INTERVAL_TBL (f1) VALUES ('badly formatted inter... - ^ -INSERT INTO INTERVAL_TBL (f1) VALUES ('@ 30 eons ago'); -ERROR: invalid input syntax for type interval: "@ 30 eons ago" -LINE 1: INSERT INTO INTERVAL_TBL (f1) VALUES ('@ 30 eons ago'); - ^ --- test interval operators -SELECT * FROM INTERVAL_TBL; - f1 ------------------ - 00:01:00 - 05:00:00 - 10 days - 34 years - 3 mons - -00:00:14 - 1 day 02:03:04 - 6 years - 5 mons - 5 mons 12:00:00 -(10 rows) - -SELECT * FROM INTERVAL_TBL - WHERE INTERVAL_TBL.f1 <> interval '@ 10 days'; - f1 ------------------ - 00:01:00 - 05:00:00 - 34 years - 3 mons - -00:00:14 - 1 day 02:03:04 - 6 years - 5 mons - 5 mons 12:00:00 -(9 rows) - -SELECT * FROM INTERVAL_TBL - WHERE INTERVAL_TBL.f1 <= interval '@ 5 hours'; - f1 ------------ - 00:01:00 - 05:00:00 - -00:00:14 -(3 rows) - -SELECT * FROM INTERVAL_TBL - WHERE INTERVAL_TBL.f1 < interval '@ 1 day'; - f1 ------------ - 00:01:00 - 05:00:00 - -00:00:14 -(3 rows) - -SELECT * FROM INTERVAL_TBL - WHERE INTERVAL_TBL.f1 = interval '@ 34 years'; - f1 ----------- - 34 years -(1 row) - -SELECT * FROM INTERVAL_TBL - WHERE INTERVAL_TBL.f1 >= interval '@ 1 month'; - f1 ------------------ - 34 years - 3 mons - 6 years - 5 mons - 5 mons 12:00:00 -(5 rows) - -SELECT * FROM INTERVAL_TBL - WHERE INTERVAL_TBL.f1 > interval '@ 3 seconds ago'; - f1 ------------------ - 00:01:00 - 05:00:00 - 10 days - 34 years - 3 mons - 1 day 02:03:04 - 6 years - 5 mons - 5 mons 12:00:00 -(9 rows) - -SELECT r1.*, r2.* - FROM INTERVAL_TBL r1, INTERVAL_TBL r2 - WHERE r1.f1 > r2.f1 - ORDER BY r1.f1, r2.f1; - f1 | f1 ------------------+----------------- - 00:01:00 | -00:00:14 - 05:00:00 | -00:00:14 - 05:00:00 | 00:01:00 - 1 day 02:03:04 | -00:00:14 - 1 day 02:03:04 | 00:01:00 - 1 day 02:03:04 | 05:00:00 - 10 days | -00:00:14 - 10 days | 00:01:00 - 10 days | 05:00:00 - 10 days | 1 day 02:03:04 - 3 mons | -00:00:14 - 3 mons | 00:01:00 - 3 mons | 05:00:00 - 3 mons | 1 day 02:03:04 - 3 mons | 10 days - 5 mons | -00:00:14 - 5 mons | 00:01:00 - 5 mons | 05:00:00 - 5 mons | 1 day 02:03:04 - 5 mons | 10 days - 5 mons | 3 mons - 5 mons 12:00:00 | -00:00:14 - 5 mons 12:00:00 | 00:01:00 - 5 mons 12:00:00 | 05:00:00 - 5 mons 12:00:00 | 1 day 02:03:04 - 5 mons 12:00:00 | 10 days - 5 mons 12:00:00 | 3 mons - 5 mons 12:00:00 | 5 mons - 6 years | -00:00:14 - 6 years | 00:01:00 - 6 years | 05:00:00 - 6 years | 1 day 02:03:04 - 6 years | 10 days - 6 years | 3 mons - 6 years | 5 mons - 6 years | 5 mons 12:00:00 - 34 years | -00:00:14 - 34 years | 00:01:00 - 34 years | 05:00:00 - 34 years | 1 day 02:03:04 - 34 years | 10 days - 34 years | 3 mons - 34 years | 5 mons - 34 years | 5 mons 12:00:00 - 34 years | 6 years -(45 rows) - --- Test intervals that are large enough to overflow 64 bits in comparisons -CREATE TEMP TABLE INTERVAL_TBL_OF (f1 interval); -INSERT INTO INTERVAL_TBL_OF (f1) VALUES - ('2147483647 days 2147483647 months'), - ('2147483647 days -2147483648 months'), - ('1 year'), - ('-2147483648 days 2147483647 months'), - ('-2147483648 days -2147483648 months'); --- these should fail as out-of-range -INSERT INTO INTERVAL_TBL_OF (f1) VALUES ('2147483648 days'); -ERROR: interval field value out of range: "2147483648 days" -LINE 1: INSERT INTO INTERVAL_TBL_OF (f1) VALUES ('2147483648 days'); - ^ -INSERT INTO INTERVAL_TBL_OF (f1) VALUES ('-2147483649 days'); -ERROR: interval field value out of range: "-2147483649 days" -LINE 1: INSERT INTO INTERVAL_TBL_OF (f1) VALUES ('-2147483649 days')... - ^ -INSERT INTO INTERVAL_TBL_OF (f1) VALUES ('2147483647 years'); -ERROR: interval out of range -LINE 1: INSERT INTO INTERVAL_TBL_OF (f1) VALUES ('2147483647 years')... - ^ -INSERT INTO INTERVAL_TBL_OF (f1) VALUES ('-2147483648 years'); -ERROR: interval out of range -LINE 1: INSERT INTO INTERVAL_TBL_OF (f1) VALUES ('-2147483648 years'... - ^ --- Test edge-case overflow detection in interval multiplication -select extract(epoch from '256 microseconds'::interval * (2^55)::float8); -ERROR: interval out of range -SELECT r1.*, r2.* - FROM INTERVAL_TBL_OF r1, INTERVAL_TBL_OF r2 - WHERE r1.f1 > r2.f1 - ORDER BY r1.f1, r2.f1; - f1 | f1 --------------------------------------------+------------------------------------------- - -178956970 years -8 mons +2147483647 days | -178956970 years -8 mons -2147483648 days - 1 year | -178956970 years -8 mons -2147483648 days - 1 year | -178956970 years -8 mons +2147483647 days - 178956970 years 7 mons -2147483648 days | -178956970 years -8 mons -2147483648 days - 178956970 years 7 mons -2147483648 days | -178956970 years -8 mons +2147483647 days - 178956970 years 7 mons -2147483648 days | 1 year - 178956970 years 7 mons 2147483647 days | -178956970 years -8 mons -2147483648 days - 178956970 years 7 mons 2147483647 days | -178956970 years -8 mons +2147483647 days - 178956970 years 7 mons 2147483647 days | 1 year - 178956970 years 7 mons 2147483647 days | 178956970 years 7 mons -2147483648 days -(10 rows) - -CREATE INDEX ON INTERVAL_TBL_OF USING btree (f1); -SET enable_seqscan TO false; -EXPLAIN (COSTS OFF) -SELECT f1 FROM INTERVAL_TBL_OF r1 ORDER BY f1; - QUERY PLAN --------------------------------------------------------------------- - Index Only Scan using interval_tbl_of_f1_idx on interval_tbl_of r1 -(1 row) - -SELECT f1 FROM INTERVAL_TBL_OF r1 ORDER BY f1; - f1 -------------------------------------------- - -178956970 years -8 mons -2147483648 days - -178956970 years -8 mons +2147483647 days - 1 year - 178956970 years 7 mons -2147483648 days - 178956970 years 7 mons 2147483647 days -(5 rows) - -RESET enable_seqscan; -DROP TABLE INTERVAL_TBL_OF; --- Test multiplication and division with intervals. --- Floating point arithmetic rounding errors can lead to unexpected results, --- though the code attempts to do the right thing and round up to days and --- minutes to avoid results such as '3 days 24:00 hours' or '14:20:60'. --- Note that it is expected for some day components to be greater than 29 and --- some time components be greater than 23:59:59 due to how intervals are --- stored internally. -CREATE TABLE INTERVAL_MULDIV_TBL (span interval); -COPY INTERVAL_MULDIV_TBL FROM STDIN; -SELECT span * 0.3 AS product -FROM INTERVAL_MULDIV_TBL; - product ------------------------------------- - 1 year 12 days 122:24:00 - -1 years -12 days +93:36:00 - -3 days -14:24:00 - 2 mons 13 days 01:22:28.8 - -10 mons +120 days 37:28:21.6567 - 1 mon 6 days - 4 mons 6 days - 24 years 11 mons 320 days 16:48:00 -(8 rows) - -SELECT span * 8.2 AS product -FROM INTERVAL_MULDIV_TBL; - product ---------------------------------------------- - 28 years 104 days 2961:36:00 - -28 years -104 days +2942:24:00 - -98 days -09:36:00 - 6 years 1 mon -197 days +93:34:27.2 - -24 years -7 mons +3946 days 640:15:11.9498 - 2 years 8 mons 24 days - 9 years 6 mons 24 days - 682 years 7 mons 8215 days 19:12:00 -(8 rows) - -SELECT span / 10 AS quotient -FROM INTERVAL_MULDIV_TBL; - quotient ----------------------------------- - 4 mons 4 days 40:48:00 - -4 mons -4 days +31:12:00 - -1 days -04:48:00 - 25 days -15:32:30.4 - -3 mons +30 days 12:29:27.2189 - 12 days - 1 mon 12 days - 8 years 3 mons 126 days 21:36:00 -(8 rows) - -SELECT span / 100 AS quotient -FROM INTERVAL_MULDIV_TBL; - quotient -------------------------- - 12 days 13:40:48 - -12 days -06:28:48 - -02:52:48 - 2 days 10:26:44.96 - -6 days +01:14:56.72189 - 1 day 04:48:00 - 4 days 04:48:00 - 9 mons 39 days 16:33:36 -(8 rows) - -DROP TABLE INTERVAL_MULDIV_TBL; -SET DATESTYLE = 'postgres'; -SET IntervalStyle to postgres_verbose; -SELECT * FROM INTERVAL_TBL; - f1 -------------------------------- - @ 1 min - @ 5 hours - @ 10 days - @ 34 years - @ 3 mons - @ 14 secs ago - @ 1 day 2 hours 3 mins 4 secs - @ 6 years - @ 5 mons - @ 5 mons 12 hours -(10 rows) - --- test avg(interval), which is somewhat fragile since people have been --- known to change the allowed input syntax for type interval without --- updating pg_aggregate.agginitval -select avg(f1) from interval_tbl; - avg -------------------------------------------------- - @ 4 years 1 mon 10 days 4 hours 18 mins 23 secs -(1 row) - --- test long interval input -select '4 millenniums 5 centuries 4 decades 1 year 4 months 4 days 17 minutes 31 seconds'::interval; - interval --------------------------------------------- - @ 4541 years 4 mons 4 days 17 mins 31 secs -(1 row) - --- test long interval output --- Note: the actual maximum length of the interval output is longer, --- but we need the test to work for both integer and floating-point --- timestamps. -select '100000000y 10mon -1000000000d -100000h -10min -10.000001s ago'::interval; - interval ---------------------------------------------------------------------------------------- - @ 100000000 years 10 mons -1000000000 days -100000 hours -10 mins -10.000001 secs ago -(1 row) - --- test justify_hours() and justify_days() -SELECT justify_hours(interval '6 months 3 days 52 hours 3 minutes 2 seconds') as "6 mons 5 days 4 hours 3 mins 2 seconds"; - 6 mons 5 days 4 hours 3 mins 2 seconds ----------------------------------------- - @ 6 mons 5 days 4 hours 3 mins 2 secs -(1 row) - -SELECT justify_days(interval '6 months 36 days 5 hours 4 minutes 3 seconds') as "7 mons 6 days 5 hours 4 mins 3 seconds"; - 7 mons 6 days 5 hours 4 mins 3 seconds ----------------------------------------- - @ 7 mons 6 days 5 hours 4 mins 3 secs -(1 row) - --- test justify_interval() -SELECT justify_interval(interval '1 month -1 hour') as "1 month -1 hour"; - 1 month -1 hour --------------------- - @ 29 days 23 hours -(1 row) - --- test fractional second input, and detection of duplicate units -SET DATESTYLE = 'ISO'; -SET IntervalStyle TO postgres; -SELECT '1 millisecond'::interval, '1 microsecond'::interval, - '500 seconds 99 milliseconds 51 microseconds'::interval; - interval | interval | interval ---------------+-----------------+----------------- - 00:00:00.001 | 00:00:00.000001 | 00:08:20.099051 -(1 row) - -SELECT '3 days 5 milliseconds'::interval; - interval ---------------------- - 3 days 00:00:00.005 -(1 row) - -SELECT '1 second 2 seconds'::interval; -- error -ERROR: invalid input syntax for type interval: "1 second 2 seconds" -LINE 1: SELECT '1 second 2 seconds'::interval; - ^ -SELECT '10 milliseconds 20 milliseconds'::interval; -- error -ERROR: invalid input syntax for type interval: "10 milliseconds 20 milliseconds" -LINE 1: SELECT '10 milliseconds 20 milliseconds'::interval; - ^ -SELECT '5.5 seconds 3 milliseconds'::interval; -- error -ERROR: invalid input syntax for type interval: "5.5 seconds 3 milliseconds" -LINE 1: SELECT '5.5 seconds 3 milliseconds'::interval; - ^ -SELECT '1:20:05 5 microseconds'::interval; -- error -ERROR: invalid input syntax for type interval: "1:20:05 5 microseconds" -LINE 1: SELECT '1:20:05 5 microseconds'::interval; - ^ -SELECT '1 day 1 day'::interval; -- error -ERROR: invalid input syntax for type interval: "1 day 1 day" -LINE 1: SELECT '1 day 1 day'::interval; - ^ -SELECT interval '1-2'; -- SQL year-month literal - interval ---------------- - 1 year 2 mons -(1 row) - -SELECT interval '999' second; -- oversize leading field is ok - interval ----------- - 00:16:39 -(1 row) - -SELECT interval '999' minute; - interval ----------- - 16:39:00 -(1 row) - -SELECT interval '999' hour; - interval ------------ - 999:00:00 -(1 row) - -SELECT interval '999' day; - interval ----------- - 999 days -(1 row) - -SELECT interval '999' month; - interval ------------------ - 83 years 3 mons -(1 row) - --- test SQL-spec syntaxes for restricted field sets -SELECT interval '1' year; - interval ----------- - 1 year -(1 row) - -SELECT interval '2' month; - interval ----------- - 2 mons -(1 row) - -SELECT interval '3' day; - interval ----------- - 3 days -(1 row) - -SELECT interval '4' hour; - interval ----------- - 04:00:00 -(1 row) - -SELECT interval '5' minute; - interval ----------- - 00:05:00 -(1 row) - -SELECT interval '6' second; - interval ----------- - 00:00:06 -(1 row) - -SELECT interval '1' year to month; - interval ----------- - 1 mon -(1 row) - -SELECT interval '1-2' year to month; - interval ---------------- - 1 year 2 mons -(1 row) - -SELECT interval '1 2' day to hour; - interval ----------------- - 1 day 02:00:00 -(1 row) - -SELECT interval '1 2:03' day to hour; - interval ----------------- - 1 day 02:00:00 -(1 row) - -SELECT interval '1 2:03:04' day to hour; - interval ----------------- - 1 day 02:00:00 -(1 row) - -SELECT interval '1 2' day to minute; -ERROR: invalid input syntax for type interval: "1 2" -LINE 1: SELECT interval '1 2' day to minute; - ^ -SELECT interval '1 2:03' day to minute; - interval ----------------- - 1 day 02:03:00 -(1 row) - -SELECT interval '1 2:03:04' day to minute; - interval ----------------- - 1 day 02:03:00 -(1 row) - -SELECT interval '1 2' day to second; -ERROR: invalid input syntax for type interval: "1 2" -LINE 1: SELECT interval '1 2' day to second; - ^ -SELECT interval '1 2:03' day to second; - interval ----------------- - 1 day 02:03:00 -(1 row) - -SELECT interval '1 2:03:04' day to second; - interval ----------------- - 1 day 02:03:04 -(1 row) - -SELECT interval '1 2' hour to minute; -ERROR: invalid input syntax for type interval: "1 2" -LINE 1: SELECT interval '1 2' hour to minute; - ^ -SELECT interval '1 2:03' hour to minute; - interval ----------------- - 1 day 02:03:00 -(1 row) - -SELECT interval '1 2:03:04' hour to minute; - interval ----------------- - 1 day 02:03:00 -(1 row) - -SELECT interval '1 2' hour to second; -ERROR: invalid input syntax for type interval: "1 2" -LINE 1: SELECT interval '1 2' hour to second; - ^ -SELECT interval '1 2:03' hour to second; - interval ----------------- - 1 day 02:03:00 -(1 row) - -SELECT interval '1 2:03:04' hour to second; - interval ----------------- - 1 day 02:03:04 -(1 row) - -SELECT interval '1 2' minute to second; -ERROR: invalid input syntax for type interval: "1 2" -LINE 1: SELECT interval '1 2' minute to second; - ^ -SELECT interval '1 2:03' minute to second; - interval ----------------- - 1 day 00:02:03 -(1 row) - -SELECT interval '1 2:03:04' minute to second; - interval ----------------- - 1 day 02:03:04 -(1 row) - -SELECT interval '1 +2:03' minute to second; - interval ----------------- - 1 day 00:02:03 -(1 row) - -SELECT interval '1 +2:03:04' minute to second; - interval ----------------- - 1 day 02:03:04 -(1 row) - -SELECT interval '1 -2:03' minute to second; - interval ------------------ - 1 day -00:02:03 -(1 row) - -SELECT interval '1 -2:03:04' minute to second; - interval ------------------ - 1 day -02:03:04 -(1 row) - -SELECT interval '123 11' day to hour; -- ok - interval -------------------- - 123 days 11:00:00 -(1 row) - -SELECT interval '123 11' day; -- not ok -ERROR: invalid input syntax for type interval: "123 11" -LINE 1: SELECT interval '123 11' day; - ^ -SELECT interval '123 11'; -- not ok, too ambiguous -ERROR: invalid input syntax for type interval: "123 11" -LINE 1: SELECT interval '123 11'; - ^ -SELECT interval '123 2:03 -2:04'; -- not ok, redundant hh:mm fields -ERROR: invalid input syntax for type interval: "123 2:03 -2:04" -LINE 1: SELECT interval '123 2:03 -2:04'; - ^ --- test syntaxes for restricted precision -SELECT interval(0) '1 day 01:23:45.6789'; - interval ----------------- - 1 day 01:23:46 -(1 row) - -SELECT interval(2) '1 day 01:23:45.6789'; - interval -------------------- - 1 day 01:23:45.68 -(1 row) - -SELECT interval '12:34.5678' minute to second(2); -- per SQL spec - interval -------------- - 00:12:34.57 -(1 row) - -SELECT interval '1.234' second; - interval --------------- - 00:00:01.234 -(1 row) - -SELECT interval '1.234' second(2); - interval -------------- - 00:00:01.23 -(1 row) - -SELECT interval '1 2.345' day to second(2); -ERROR: invalid input syntax for type interval: "1 2.345" -LINE 1: SELECT interval '1 2.345' day to second(2); - ^ -SELECT interval '1 2:03' day to second(2); - interval ----------------- - 1 day 02:03:00 -(1 row) - -SELECT interval '1 2:03.4567' day to second(2); - interval -------------------- - 1 day 00:02:03.46 -(1 row) - -SELECT interval '1 2:03:04.5678' day to second(2); - interval -------------------- - 1 day 02:03:04.57 -(1 row) - -SELECT interval '1 2.345' hour to second(2); -ERROR: invalid input syntax for type interval: "1 2.345" -LINE 1: SELECT interval '1 2.345' hour to second(2); - ^ -SELECT interval '1 2:03.45678' hour to second(2); - interval -------------------- - 1 day 00:02:03.46 -(1 row) - -SELECT interval '1 2:03:04.5678' hour to second(2); - interval -------------------- - 1 day 02:03:04.57 -(1 row) - -SELECT interval '1 2.3456' minute to second(2); -ERROR: invalid input syntax for type interval: "1 2.3456" -LINE 1: SELECT interval '1 2.3456' minute to second(2); - ^ -SELECT interval '1 2:03.5678' minute to second(2); - interval -------------------- - 1 day 00:02:03.57 -(1 row) - -SELECT interval '1 2:03:04.5678' minute to second(2); - interval -------------------- - 1 day 02:03:04.57 -(1 row) - --- test casting to restricted precision (bug #14479) -SELECT f1, f1::INTERVAL DAY TO MINUTE AS "minutes", - (f1 + INTERVAL '1 month')::INTERVAL MONTH::INTERVAL YEAR AS "years" - FROM interval_tbl; - f1 | minutes | years ------------------+-----------------+---------- - 00:01:00 | 00:01:00 | 00:00:00 - 05:00:00 | 05:00:00 | 00:00:00 - 10 days | 10 days | 00:00:00 - 34 years | 34 years | 34 years - 3 mons | 3 mons | 00:00:00 - -00:00:14 | 00:00:00 | 00:00:00 - 1 day 02:03:04 | 1 day 02:03:00 | 00:00:00 - 6 years | 6 years | 6 years - 5 mons | 5 mons | 00:00:00 - 5 mons 12:00:00 | 5 mons 12:00:00 | 00:00:00 -(10 rows) - --- test inputting and outputting SQL standard interval literals -SET IntervalStyle TO sql_standard; -SELECT interval '0' AS "zero", - interval '1-2' year to month AS "year-month", - interval '1 2:03:04' day to second AS "day-time", - - interval '1-2' AS "negative year-month", - - interval '1 2:03:04' AS "negative day-time"; - zero | year-month | day-time | negative year-month | negative day-time -------+------------+-----------+---------------------+------------------- - 0 | 1-2 | 1 2:03:04 | -1-2 | -1 2:03:04 -(1 row) - --- test input of some not-quite-standard interval values in the sql style -SET IntervalStyle TO postgres; -SELECT interval '+1 -1:00:00', - interval '-1 +1:00:00', - interval '+1-2 -3 +4:05:06.789', - interval '-1-2 +3 -4:05:06.789'; - interval | interval | interval | interval ------------------+-------------------+-------------------------------------+---------------------------------------- - 1 day -01:00:00 | -1 days +01:00:00 | 1 year 2 mons -3 days +04:05:06.789 | -1 years -2 mons +3 days -04:05:06.789 -(1 row) - --- test output of couple non-standard interval values in the sql style -SET IntervalStyle TO sql_standard; -SELECT interval '1 day -1 hours', - interval '-1 days +1 hours', - interval '1 years 2 months -3 days 4 hours 5 minutes 6.789 seconds', - - interval '1 years 2 months -3 days 4 hours 5 minutes 6.789 seconds'; - interval | interval | interval | ?column? -------------------+------------------+----------------------+---------------------- - +0-0 +1 -1:00:00 | +0-0 -1 +1:00:00 | +1-2 -3 +4:05:06.789 | -1-2 +3 -4:05:06.789 -(1 row) - --- test outputting iso8601 intervals -SET IntervalStyle to iso_8601; -select interval '0' AS "zero", - interval '1-2' AS "a year 2 months", - interval '1 2:03:04' AS "a bit over a day", - interval '2:03:04.45679' AS "a bit over 2 hours", - (interval '1-2' + interval '3 4:05:06.7') AS "all fields", - (interval '1-2' - interval '3 4:05:06.7') AS "mixed sign", - (- interval '1-2' + interval '3 4:05:06.7') AS "negative"; - zero | a year 2 months | a bit over a day | a bit over 2 hours | all fields | mixed sign | negative -------+-----------------+------------------+--------------------+------------------+----------------------+-------------------- - PT0S | P1Y2M | P1DT2H3M4S | PT2H3M4.45679S | P1Y2M3DT4H5M6.7S | P1Y2M-3DT-4H-5M-6.7S | P-1Y-2M3DT4H5M6.7S -(1 row) - --- test inputting ISO 8601 4.4.2.1 "Format With Time Unit Designators" -SET IntervalStyle to sql_standard; -select interval 'P0Y' AS "zero", - interval 'P1Y2M' AS "a year 2 months", - interval 'P1W' AS "a week", - interval 'P1DT2H3M4S' AS "a bit over a day", - interval 'P1Y2M3DT4H5M6.7S' AS "all fields", - interval 'P-1Y-2M-3DT-4H-5M-6.7S' AS "negative", - interval 'PT-0.1S' AS "fractional second"; - zero | a year 2 months | a week | a bit over a day | all fields | negative | fractional second -------+-----------------+-----------+------------------+--------------------+--------------------+------------------- - 0 | 1-2 | 7 0:00:00 | 1 2:03:04 | +1-2 +3 +4:05:06.7 | -1-2 -3 -4:05:06.7 | -0:00:00.1 -(1 row) - --- test inputting ISO 8601 4.4.2.2 "Alternative Format" -SET IntervalStyle to postgres; -select interval 'P00021015T103020' AS "ISO8601 Basic Format", - interval 'P0002-10-15T10:30:20' AS "ISO8601 Extended Format"; - ISO8601 Basic Format | ISO8601 Extended Format -----------------------------------+---------------------------------- - 2 years 10 mons 15 days 10:30:20 | 2 years 10 mons 15 days 10:30:20 -(1 row) - --- Make sure optional ISO8601 alternative format fields are optional. -select interval 'P0002' AS "year only", - interval 'P0002-10' AS "year month", - interval 'P0002-10-15' AS "year month day", - interval 'P0002T1S' AS "year only plus time", - interval 'P0002-10T1S' AS "year month plus time", - interval 'P0002-10-15T1S' AS "year month day plus time", - interval 'PT10' AS "hour only", - interval 'PT10:30' AS "hour minute"; - year only | year month | year month day | year only plus time | year month plus time | year month day plus time | hour only | hour minute ------------+-----------------+-------------------------+---------------------+--------------------------+----------------------------------+-----------+------------- - 2 years | 2 years 10 mons | 2 years 10 mons 15 days | 2 years 00:00:01 | 2 years 10 mons 00:00:01 | 2 years 10 mons 15 days 00:00:01 | 10:00:00 | 10:30:00 -(1 row) - --- test a couple rounding cases that changed since 8.3 w/ HAVE_INT64_TIMESTAMP. -SET IntervalStyle to postgres_verbose; -select interval '-10 mons -3 days +03:55:06.70'; - interval --------------------------------------------------- - @ 10 mons 3 days -3 hours -55 mins -6.7 secs ago -(1 row) - -select interval '1 year 2 mons 3 days 04:05:06.699999'; - interval ------------------------------------------------------ - @ 1 year 2 mons 3 days 4 hours 5 mins 6.699999 secs -(1 row) - -select interval '0:0:0.7', interval '@ 0.70 secs', interval '0.7 seconds'; - interval | interval | interval -------------+------------+------------ - @ 0.7 secs | @ 0.7 secs | @ 0.7 secs -(1 row) - --- check that '30 days' equals '1 month' according to the hash function -select '30 days'::interval = '1 month'::interval as t; - t ---- - t -(1 row) - -select interval_hash('30 days'::interval) = interval_hash('1 month'::interval) as t; - t ---- - t -(1 row) - --- numeric constructor -select make_interval(years := 2); - make_interval ---------------- - @ 2 years -(1 row) - -select make_interval(years := 1, months := 6); - make_interval ------------------ - @ 1 year 6 mons -(1 row) - -select make_interval(years := 1, months := -1, weeks := 5, days := -7, hours := 25, mins := -180); - make_interval ----------------------------- - @ 11 mons 28 days 22 hours -(1 row) - -select make_interval() = make_interval(years := 0, months := 0, weeks := 0, days := 0, mins := 0, secs := 0.0); - ?column? ----------- - t -(1 row) - -select make_interval(hours := -2, mins := -10, secs := -25.3); - make_interval ---------------------------------- - @ 2 hours 10 mins 25.3 secs ago -(1 row) - -select make_interval(years := 'inf'::float::int); -ERROR: integer out of range -select make_interval(months := 'NaN'::float::int); -ERROR: integer out of range -select make_interval(secs := 'inf'); -ERROR: interval out of range -select make_interval(secs := 'NaN'); -ERROR: interval out of range -select make_interval(secs := 7e12); - make_interval ------------------------------------- - @ 1944444444 hours 26 mins 40 secs -(1 row) - --- --- test EXTRACT --- -SELECT f1, - EXTRACT(MICROSECOND FROM f1) AS MICROSECOND, - EXTRACT(MILLISECOND FROM f1) AS MILLISECOND, - EXTRACT(SECOND FROM f1) AS SECOND, - EXTRACT(MINUTE FROM f1) AS MINUTE, - EXTRACT(HOUR FROM f1) AS HOUR, - EXTRACT(DAY FROM f1) AS DAY, - EXTRACT(MONTH FROM f1) AS MONTH, - EXTRACT(QUARTER FROM f1) AS QUARTER, - EXTRACT(YEAR FROM f1) AS YEAR, - EXTRACT(DECADE FROM f1) AS DECADE, - EXTRACT(CENTURY FROM f1) AS CENTURY, - EXTRACT(MILLENNIUM FROM f1) AS MILLENNIUM, - EXTRACT(EPOCH FROM f1) AS EPOCH - FROM INTERVAL_TBL; - f1 | microsecond | millisecond | second | minute | hour | day | month | quarter | year | decade | century | millennium | epoch --------------------------------+-------------+-------------+------------+--------+------+-----+-------+---------+------+--------+---------+------------+------------------- - @ 1 min | 0 | 0.000 | 0.000000 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 60.000000 - @ 5 hours | 0 | 0.000 | 0.000000 | 0 | 5 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 18000.000000 - @ 10 days | 0 | 0.000 | 0.000000 | 0 | 0 | 10 | 0 | 1 | 0 | 0 | 0 | 0 | 864000.000000 - @ 34 years | 0 | 0.000 | 0.000000 | 0 | 0 | 0 | 0 | 1 | 34 | 3 | 0 | 0 | 1072958400.000000 - @ 3 mons | 0 | 0.000 | 0.000000 | 0 | 0 | 0 | 3 | 2 | 0 | 0 | 0 | 0 | 7776000.000000 - @ 14 secs ago | -14000000 | -14000.000 | -14.000000 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | -14.000000 - @ 1 day 2 hours 3 mins 4 secs | 4000000 | 4000.000 | 4.000000 | 3 | 2 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 93784.000000 - @ 6 years | 0 | 0.000 | 0.000000 | 0 | 0 | 0 | 0 | 1 | 6 | 0 | 0 | 0 | 189345600.000000 - @ 5 mons | 0 | 0.000 | 0.000000 | 0 | 0 | 0 | 5 | 2 | 0 | 0 | 0 | 0 | 12960000.000000 - @ 5 mons 12 hours | 0 | 0.000 | 0.000000 | 0 | 12 | 0 | 5 | 2 | 0 | 0 | 0 | 0 | 13003200.000000 -(10 rows) - -SELECT EXTRACT(FORTNIGHT FROM INTERVAL '2 days'); -- error -ERROR: interval units "fortnight" not recognized -SELECT EXTRACT(TIMEZONE FROM INTERVAL '2 days'); -- error -ERROR: interval units "timezone" not supported -SELECT EXTRACT(DECADE FROM INTERVAL '100 y'); - extract ---------- - 10 -(1 row) - -SELECT EXTRACT(DECADE FROM INTERVAL '99 y'); - extract ---------- - 9 -(1 row) - -SELECT EXTRACT(DECADE FROM INTERVAL '-99 y'); - extract ---------- - -9 -(1 row) - -SELECT EXTRACT(DECADE FROM INTERVAL '-100 y'); - extract ---------- - -10 -(1 row) - -SELECT EXTRACT(CENTURY FROM INTERVAL '100 y'); - extract ---------- - 1 -(1 row) - -SELECT EXTRACT(CENTURY FROM INTERVAL '99 y'); - extract ---------- - 0 -(1 row) - -SELECT EXTRACT(CENTURY FROM INTERVAL '-99 y'); - extract ---------- - 0 -(1 row) - -SELECT EXTRACT(CENTURY FROM INTERVAL '-100 y'); - extract ---------- - -1 -(1 row) - --- date_part implementation is mostly the same as extract, so only --- test a few cases for additional coverage. -SELECT f1, - date_part('microsecond', f1) AS microsecond, - date_part('millisecond', f1) AS millisecond, - date_part('second', f1) AS second, - date_part('epoch', f1) AS epoch - FROM INTERVAL_TBL; - f1 | microsecond | millisecond | second | epoch --------------------------------+-------------+-------------+--------+------------ - @ 1 min | 0 | 0 | 0 | 60 - @ 5 hours | 0 | 0 | 0 | 18000 - @ 10 days | 0 | 0 | 0 | 864000 - @ 34 years | 0 | 0 | 0 | 1072958400 - @ 3 mons | 0 | 0 | 0 | 7776000 - @ 14 secs ago | -14000000 | -14000 | -14 | -14 - @ 1 day 2 hours 3 mins 4 secs | 4000000 | 4000 | 4 | 93784 - @ 6 years | 0 | 0 | 0 | 189345600 - @ 5 mons | 0 | 0 | 0 | 12960000 - @ 5 mons 12 hours | 0 | 0 | 0 | 13003200 -(10 rows) - --- internal overflow test case -SELECT extract(epoch from interval '1000000000 days'); - extract ------------------------ - 86400000000000.000000 -(1 row) - +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/inet.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/inet.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/inet.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/inet.out 2023-02-20 19:44:17.189207218 -0500 @@ -1,1058 +1 @@ --- --- INET --- --- prepare the table... -DROP TABLE INET_TBL; -ERROR: table "inet_tbl" does not exist -CREATE TABLE INET_TBL (c cidr, i inet); -INSERT INTO INET_TBL (c, i) VALUES ('192.168.1', '192.168.1.226/24'); -INSERT INTO INET_TBL (c, i) VALUES ('192.168.1.0/26', '192.168.1.226'); -INSERT INTO INET_TBL (c, i) VALUES ('192.168.1', '192.168.1.0/24'); -INSERT INTO INET_TBL (c, i) VALUES ('192.168.1', '192.168.1.0/25'); -INSERT INTO INET_TBL (c, i) VALUES ('192.168.1', '192.168.1.255/24'); -INSERT INTO INET_TBL (c, i) VALUES ('192.168.1', '192.168.1.255/25'); -INSERT INTO INET_TBL (c, i) VALUES ('10', '10.1.2.3/8'); -INSERT INTO INET_TBL (c, i) VALUES ('10.0.0.0', '10.1.2.3/8'); -INSERT INTO INET_TBL (c, i) VALUES ('10.1.2.3', '10.1.2.3/32'); -INSERT INTO INET_TBL (c, i) VALUES ('10.1.2', '10.1.2.3/24'); -INSERT INTO INET_TBL (c, i) VALUES ('10.1', '10.1.2.3/16'); -INSERT INTO INET_TBL (c, i) VALUES ('10', '10.1.2.3/8'); -INSERT INTO INET_TBL (c, i) VALUES ('10', '11.1.2.3/8'); -INSERT INTO INET_TBL (c, i) VALUES ('10', '9.1.2.3/8'); -INSERT INTO INET_TBL (c, i) VALUES ('10:23::f1', '10:23::f1/64'); -INSERT INTO INET_TBL (c, i) VALUES ('10:23::8000/113', '10:23::ffff'); -INSERT INTO INET_TBL (c, i) VALUES ('::ffff:1.2.3.4', '::4.3.2.1/24'); --- check that CIDR rejects invalid input: -INSERT INTO INET_TBL (c, i) VALUES ('192.168.1.2/30', '192.168.1.226'); -ERROR: invalid cidr value: "192.168.1.2/30" -LINE 1: INSERT INTO INET_TBL (c, i) VALUES ('192.168.1.2/30', '192.1... - ^ -DETAIL: Value has bits set to right of mask. -INSERT INTO INET_TBL (c, i) VALUES ('1234::1234::1234', '::1.2.3.4'); -ERROR: invalid input syntax for type cidr: "1234::1234::1234" -LINE 1: INSERT INTO INET_TBL (c, i) VALUES ('1234::1234::1234', '::1... - ^ --- check that CIDR rejects invalid input when converting from text: -INSERT INTO INET_TBL (c, i) VALUES (cidr('192.168.1.2/30'), '192.168.1.226'); -ERROR: invalid cidr value: "192.168.1.2/30" -LINE 1: INSERT INTO INET_TBL (c, i) VALUES (cidr('192.168.1.2/30'), ... - ^ -DETAIL: Value has bits set to right of mask. -INSERT INTO INET_TBL (c, i) VALUES (cidr('ffff:ffff:ffff:ffff::/24'), '::192.168.1.226'); -ERROR: invalid cidr value: "ffff:ffff:ffff:ffff::/24" -LINE 1: INSERT INTO INET_TBL (c, i) VALUES (cidr('ffff:ffff:ffff:fff... - ^ -DETAIL: Value has bits set to right of mask. -SELECT c AS cidr, i AS inet FROM INET_TBL; - cidr | inet ---------------------+------------------ - 192.168.1.0/24 | 192.168.1.226/24 - 192.168.1.0/26 | 192.168.1.226 - 192.168.1.0/24 | 192.168.1.0/24 - 192.168.1.0/24 | 192.168.1.0/25 - 192.168.1.0/24 | 192.168.1.255/24 - 192.168.1.0/24 | 192.168.1.255/25 - 10.0.0.0/8 | 10.1.2.3/8 - 10.0.0.0/32 | 10.1.2.3/8 - 10.1.2.3/32 | 10.1.2.3 - 10.1.2.0/24 | 10.1.2.3/24 - 10.1.0.0/16 | 10.1.2.3/16 - 10.0.0.0/8 | 10.1.2.3/8 - 10.0.0.0/8 | 11.1.2.3/8 - 10.0.0.0/8 | 9.1.2.3/8 - 10:23::f1/128 | 10:23::f1/64 - 10:23::8000/113 | 10:23::ffff - ::ffff:1.2.3.4/128 | ::4.3.2.1/24 -(17 rows) - --- now test some support functions -SELECT i AS inet, host(i), text(i), family(i) FROM INET_TBL; - inet | host | text | family -------------------+---------------+------------------+-------- - 192.168.1.226/24 | 192.168.1.226 | 192.168.1.226/24 | 4 - 192.168.1.226 | 192.168.1.226 | 192.168.1.226/32 | 4 - 192.168.1.0/24 | 192.168.1.0 | 192.168.1.0/24 | 4 - 192.168.1.0/25 | 192.168.1.0 | 192.168.1.0/25 | 4 - 192.168.1.255/24 | 192.168.1.255 | 192.168.1.255/24 | 4 - 192.168.1.255/25 | 192.168.1.255 | 192.168.1.255/25 | 4 - 10.1.2.3/8 | 10.1.2.3 | 10.1.2.3/8 | 4 - 10.1.2.3/8 | 10.1.2.3 | 10.1.2.3/8 | 4 - 10.1.2.3 | 10.1.2.3 | 10.1.2.3/32 | 4 - 10.1.2.3/24 | 10.1.2.3 | 10.1.2.3/24 | 4 - 10.1.2.3/16 | 10.1.2.3 | 10.1.2.3/16 | 4 - 10.1.2.3/8 | 10.1.2.3 | 10.1.2.3/8 | 4 - 11.1.2.3/8 | 11.1.2.3 | 11.1.2.3/8 | 4 - 9.1.2.3/8 | 9.1.2.3 | 9.1.2.3/8 | 4 - 10:23::f1/64 | 10:23::f1 | 10:23::f1/64 | 6 - 10:23::ffff | 10:23::ffff | 10:23::ffff/128 | 6 - ::4.3.2.1/24 | ::4.3.2.1 | ::4.3.2.1/24 | 6 -(17 rows) - -SELECT c AS cidr, abbrev(c) FROM INET_TBL; - cidr | abbrev ---------------------+-------------------- - 192.168.1.0/24 | 192.168.1/24 - 192.168.1.0/26 | 192.168.1.0/26 - 192.168.1.0/24 | 192.168.1/24 - 192.168.1.0/24 | 192.168.1/24 - 192.168.1.0/24 | 192.168.1/24 - 192.168.1.0/24 | 192.168.1/24 - 10.0.0.0/8 | 10/8 - 10.0.0.0/32 | 10.0.0.0/32 - 10.1.2.3/32 | 10.1.2.3/32 - 10.1.2.0/24 | 10.1.2/24 - 10.1.0.0/16 | 10.1/16 - 10.0.0.0/8 | 10/8 - 10.0.0.0/8 | 10/8 - 10.0.0.0/8 | 10/8 - 10:23::f1/128 | 10:23::f1/128 - 10:23::8000/113 | 10:23::8000/113 - ::ffff:1.2.3.4/128 | ::ffff:1.2.3.4/128 -(17 rows) - -SELECT c AS cidr, broadcast(c), - i AS inet, broadcast(i) FROM INET_TBL; - cidr | broadcast | inet | broadcast ---------------------+------------------+------------------+--------------------------------------- - 192.168.1.0/24 | 192.168.1.255/24 | 192.168.1.226/24 | 192.168.1.255/24 - 192.168.1.0/26 | 192.168.1.63/26 | 192.168.1.226 | 192.168.1.226 - 192.168.1.0/24 | 192.168.1.255/24 | 192.168.1.0/24 | 192.168.1.255/24 - 192.168.1.0/24 | 192.168.1.255/24 | 192.168.1.0/25 | 192.168.1.127/25 - 192.168.1.0/24 | 192.168.1.255/24 | 192.168.1.255/24 | 192.168.1.255/24 - 192.168.1.0/24 | 192.168.1.255/24 | 192.168.1.255/25 | 192.168.1.255/25 - 10.0.0.0/8 | 10.255.255.255/8 | 10.1.2.3/8 | 10.255.255.255/8 - 10.0.0.0/32 | 10.0.0.0 | 10.1.2.3/8 | 10.255.255.255/8 - 10.1.2.3/32 | 10.1.2.3 | 10.1.2.3 | 10.1.2.3 - 10.1.2.0/24 | 10.1.2.255/24 | 10.1.2.3/24 | 10.1.2.255/24 - 10.1.0.0/16 | 10.1.255.255/16 | 10.1.2.3/16 | 10.1.255.255/16 - 10.0.0.0/8 | 10.255.255.255/8 | 10.1.2.3/8 | 10.255.255.255/8 - 10.0.0.0/8 | 10.255.255.255/8 | 11.1.2.3/8 | 11.255.255.255/8 - 10.0.0.0/8 | 10.255.255.255/8 | 9.1.2.3/8 | 9.255.255.255/8 - 10:23::f1/128 | 10:23::f1 | 10:23::f1/64 | 10:23::ffff:ffff:ffff:ffff/64 - 10:23::8000/113 | 10:23::ffff/113 | 10:23::ffff | 10:23::ffff - ::ffff:1.2.3.4/128 | ::ffff:1.2.3.4 | ::4.3.2.1/24 | 0:ff:ffff:ffff:ffff:ffff:ffff:ffff/24 -(17 rows) - -SELECT c AS cidr, network(c) AS "network(cidr)", - i AS inet, network(i) AS "network(inet)" FROM INET_TBL; - cidr | network(cidr) | inet | network(inet) ---------------------+--------------------+------------------+------------------ - 192.168.1.0/24 | 192.168.1.0/24 | 192.168.1.226/24 | 192.168.1.0/24 - 192.168.1.0/26 | 192.168.1.0/26 | 192.168.1.226 | 192.168.1.226/32 - 192.168.1.0/24 | 192.168.1.0/24 | 192.168.1.0/24 | 192.168.1.0/24 - 192.168.1.0/24 | 192.168.1.0/24 | 192.168.1.0/25 | 192.168.1.0/25 - 192.168.1.0/24 | 192.168.1.0/24 | 192.168.1.255/24 | 192.168.1.0/24 - 192.168.1.0/24 | 192.168.1.0/24 | 192.168.1.255/25 | 192.168.1.128/25 - 10.0.0.0/8 | 10.0.0.0/8 | 10.1.2.3/8 | 10.0.0.0/8 - 10.0.0.0/32 | 10.0.0.0/32 | 10.1.2.3/8 | 10.0.0.0/8 - 10.1.2.3/32 | 10.1.2.3/32 | 10.1.2.3 | 10.1.2.3/32 - 10.1.2.0/24 | 10.1.2.0/24 | 10.1.2.3/24 | 10.1.2.0/24 - 10.1.0.0/16 | 10.1.0.0/16 | 10.1.2.3/16 | 10.1.0.0/16 - 10.0.0.0/8 | 10.0.0.0/8 | 10.1.2.3/8 | 10.0.0.0/8 - 10.0.0.0/8 | 10.0.0.0/8 | 11.1.2.3/8 | 11.0.0.0/8 - 10.0.0.0/8 | 10.0.0.0/8 | 9.1.2.3/8 | 9.0.0.0/8 - 10:23::f1/128 | 10:23::f1/128 | 10:23::f1/64 | 10:23::/64 - 10:23::8000/113 | 10:23::8000/113 | 10:23::ffff | 10:23::ffff/128 - ::ffff:1.2.3.4/128 | ::ffff:1.2.3.4/128 | ::4.3.2.1/24 | ::/24 -(17 rows) - -SELECT c AS cidr, masklen(c) AS "masklen(cidr)", - i AS inet, masklen(i) AS "masklen(inet)" FROM INET_TBL; - cidr | masklen(cidr) | inet | masklen(inet) ---------------------+---------------+------------------+--------------- - 192.168.1.0/24 | 24 | 192.168.1.226/24 | 24 - 192.168.1.0/26 | 26 | 192.168.1.226 | 32 - 192.168.1.0/24 | 24 | 192.168.1.0/24 | 24 - 192.168.1.0/24 | 24 | 192.168.1.0/25 | 25 - 192.168.1.0/24 | 24 | 192.168.1.255/24 | 24 - 192.168.1.0/24 | 24 | 192.168.1.255/25 | 25 - 10.0.0.0/8 | 8 | 10.1.2.3/8 | 8 - 10.0.0.0/32 | 32 | 10.1.2.3/8 | 8 - 10.1.2.3/32 | 32 | 10.1.2.3 | 32 - 10.1.2.0/24 | 24 | 10.1.2.3/24 | 24 - 10.1.0.0/16 | 16 | 10.1.2.3/16 | 16 - 10.0.0.0/8 | 8 | 10.1.2.3/8 | 8 - 10.0.0.0/8 | 8 | 11.1.2.3/8 | 8 - 10.0.0.0/8 | 8 | 9.1.2.3/8 | 8 - 10:23::f1/128 | 128 | 10:23::f1/64 | 64 - 10:23::8000/113 | 113 | 10:23::ffff | 128 - ::ffff:1.2.3.4/128 | 128 | ::4.3.2.1/24 | 24 -(17 rows) - -SELECT c AS cidr, masklen(c) AS "masklen(cidr)", - i AS inet, masklen(i) AS "masklen(inet)" FROM INET_TBL - WHERE masklen(c) <= 8; - cidr | masklen(cidr) | inet | masklen(inet) -------------+---------------+------------+--------------- - 10.0.0.0/8 | 8 | 10.1.2.3/8 | 8 - 10.0.0.0/8 | 8 | 10.1.2.3/8 | 8 - 10.0.0.0/8 | 8 | 11.1.2.3/8 | 8 - 10.0.0.0/8 | 8 | 9.1.2.3/8 | 8 -(4 rows) - -SELECT c AS cidr, i AS inet FROM INET_TBL - WHERE c = i; - cidr | inet -----------------+---------------- - 192.168.1.0/24 | 192.168.1.0/24 - 10.1.2.3/32 | 10.1.2.3 -(2 rows) - -SELECT i, c, - i < c AS lt, i <= c AS le, i = c AS eq, - i >= c AS ge, i > c AS gt, i <> c AS ne, - i << c AS sb, i <<= c AS sbe, - i >> c AS sup, i >>= c AS spe, - i && c AS ovr - FROM INET_TBL; - i | c | lt | le | eq | ge | gt | ne | sb | sbe | sup | spe | ovr -------------------+--------------------+----+----+----+----+----+----+----+-----+-----+-----+----- - 192.168.1.226/24 | 192.168.1.0/24 | f | f | f | t | t | t | f | t | f | t | t - 192.168.1.226 | 192.168.1.0/26 | f | f | f | t | t | t | f | f | f | f | f - 192.168.1.0/24 | 192.168.1.0/24 | f | t | t | t | f | f | f | t | f | t | t - 192.168.1.0/25 | 192.168.1.0/24 | f | f | f | t | t | t | t | t | f | f | t - 192.168.1.255/24 | 192.168.1.0/24 | f | f | f | t | t | t | f | t | f | t | t - 192.168.1.255/25 | 192.168.1.0/24 | f | f | f | t | t | t | t | t | f | f | t - 10.1.2.3/8 | 10.0.0.0/8 | f | f | f | t | t | t | f | t | f | t | t - 10.1.2.3/8 | 10.0.0.0/32 | t | t | f | f | f | t | f | f | t | t | t - 10.1.2.3 | 10.1.2.3/32 | f | t | t | t | f | f | f | t | f | t | t - 10.1.2.3/24 | 10.1.2.0/24 | f | f | f | t | t | t | f | t | f | t | t - 10.1.2.3/16 | 10.1.0.0/16 | f | f | f | t | t | t | f | t | f | t | t - 10.1.2.3/8 | 10.0.0.0/8 | f | f | f | t | t | t | f | t | f | t | t - 11.1.2.3/8 | 10.0.0.0/8 | f | f | f | t | t | t | f | f | f | f | f - 9.1.2.3/8 | 10.0.0.0/8 | t | t | f | f | f | t | f | f | f | f | f - 10:23::f1/64 | 10:23::f1/128 | t | t | f | f | f | t | f | f | t | t | t - 10:23::ffff | 10:23::8000/113 | f | f | f | t | t | t | t | t | f | f | t - ::4.3.2.1/24 | ::ffff:1.2.3.4/128 | t | t | f | f | f | t | f | f | t | t | t -(17 rows) - -SELECT max(i) AS max, min(i) AS min FROM INET_TBL; - max | min --------------+----------- - 10:23::ffff | 9.1.2.3/8 -(1 row) - -SELECT max(c) AS max, min(c) AS min FROM INET_TBL; - max | min ------------------+------------ - 10:23::8000/113 | 10.0.0.0/8 -(1 row) - --- check the conversion to/from text and set_netmask -SELECT set_masklen(inet(text(i)), 24) FROM INET_TBL; - set_masklen ------------------- - 192.168.1.226/24 - 192.168.1.226/24 - 192.168.1.0/24 - 192.168.1.0/24 - 192.168.1.255/24 - 192.168.1.255/24 - 10.1.2.3/24 - 10.1.2.3/24 - 10.1.2.3/24 - 10.1.2.3/24 - 10.1.2.3/24 - 10.1.2.3/24 - 11.1.2.3/24 - 9.1.2.3/24 - 10:23::f1/24 - 10:23::ffff/24 - ::4.3.2.1/24 -(17 rows) - --- check that btree index works correctly -CREATE INDEX inet_idx1 ON inet_tbl(i); -SET enable_seqscan TO off; -EXPLAIN (COSTS OFF) -SELECT * FROM inet_tbl WHERE i<<'192.168.1.0/24'::cidr; - QUERY PLAN -------------------------------------------------------------------------------- - Index Scan using inet_idx1 on inet_tbl - Index Cond: ((i > '192.168.1.0/24'::inet) AND (i <= '192.168.1.255'::inet)) - Filter: (i << '192.168.1.0/24'::inet) -(3 rows) - -SELECT * FROM inet_tbl WHERE i<<'192.168.1.0/24'::cidr; - c | i -----------------+------------------ - 192.168.1.0/24 | 192.168.1.0/25 - 192.168.1.0/24 | 192.168.1.255/25 - 192.168.1.0/26 | 192.168.1.226 -(3 rows) - -EXPLAIN (COSTS OFF) -SELECT * FROM inet_tbl WHERE i<<='192.168.1.0/24'::cidr; - QUERY PLAN --------------------------------------------------------------------------------- - Index Scan using inet_idx1 on inet_tbl - Index Cond: ((i >= '192.168.1.0/24'::inet) AND (i <= '192.168.1.255'::inet)) - Filter: (i <<= '192.168.1.0/24'::inet) -(3 rows) - -SELECT * FROM inet_tbl WHERE i<<='192.168.1.0/24'::cidr; - c | i -----------------+------------------ - 192.168.1.0/24 | 192.168.1.0/24 - 192.168.1.0/24 | 192.168.1.226/24 - 192.168.1.0/24 | 192.168.1.255/24 - 192.168.1.0/24 | 192.168.1.0/25 - 192.168.1.0/24 | 192.168.1.255/25 - 192.168.1.0/26 | 192.168.1.226 -(6 rows) - -EXPLAIN (COSTS OFF) -SELECT * FROM inet_tbl WHERE '192.168.1.0/24'::cidr >>= i; - QUERY PLAN --------------------------------------------------------------------------------- - Index Scan using inet_idx1 on inet_tbl - Index Cond: ((i >= '192.168.1.0/24'::inet) AND (i <= '192.168.1.255'::inet)) - Filter: ('192.168.1.0/24'::inet >>= i) -(3 rows) - -SELECT * FROM inet_tbl WHERE '192.168.1.0/24'::cidr >>= i; - c | i -----------------+------------------ - 192.168.1.0/24 | 192.168.1.0/24 - 192.168.1.0/24 | 192.168.1.226/24 - 192.168.1.0/24 | 192.168.1.255/24 - 192.168.1.0/24 | 192.168.1.0/25 - 192.168.1.0/24 | 192.168.1.255/25 - 192.168.1.0/26 | 192.168.1.226 -(6 rows) - -EXPLAIN (COSTS OFF) -SELECT * FROM inet_tbl WHERE '192.168.1.0/24'::cidr >> i; - QUERY PLAN -------------------------------------------------------------------------------- - Index Scan using inet_idx1 on inet_tbl - Index Cond: ((i > '192.168.1.0/24'::inet) AND (i <= '192.168.1.255'::inet)) - Filter: ('192.168.1.0/24'::inet >> i) -(3 rows) - -SELECT * FROM inet_tbl WHERE '192.168.1.0/24'::cidr >> i; - c | i -----------------+------------------ - 192.168.1.0/24 | 192.168.1.0/25 - 192.168.1.0/24 | 192.168.1.255/25 - 192.168.1.0/26 | 192.168.1.226 -(3 rows) - -SET enable_seqscan TO on; -DROP INDEX inet_idx1; --- check that gist index works correctly -CREATE INDEX inet_idx2 ON inet_tbl using gist (i inet_ops); -SET enable_seqscan TO off; -SELECT * FROM inet_tbl WHERE i << '192.168.1.0/24'::cidr ORDER BY i; - c | i -----------------+------------------ - 192.168.1.0/24 | 192.168.1.0/25 - 192.168.1.0/24 | 192.168.1.255/25 - 192.168.1.0/26 | 192.168.1.226 -(3 rows) - -SELECT * FROM inet_tbl WHERE i <<= '192.168.1.0/24'::cidr ORDER BY i; - c | i -----------------+------------------ - 192.168.1.0/24 | 192.168.1.0/24 - 192.168.1.0/24 | 192.168.1.226/24 - 192.168.1.0/24 | 192.168.1.255/24 - 192.168.1.0/24 | 192.168.1.0/25 - 192.168.1.0/24 | 192.168.1.255/25 - 192.168.1.0/26 | 192.168.1.226 -(6 rows) - -SELECT * FROM inet_tbl WHERE i && '192.168.1.0/24'::cidr ORDER BY i; - c | i -----------------+------------------ - 192.168.1.0/24 | 192.168.1.0/24 - 192.168.1.0/24 | 192.168.1.226/24 - 192.168.1.0/24 | 192.168.1.255/24 - 192.168.1.0/24 | 192.168.1.0/25 - 192.168.1.0/24 | 192.168.1.255/25 - 192.168.1.0/26 | 192.168.1.226 -(6 rows) - -SELECT * FROM inet_tbl WHERE i >>= '192.168.1.0/24'::cidr ORDER BY i; - c | i -----------------+------------------ - 192.168.1.0/24 | 192.168.1.0/24 - 192.168.1.0/24 | 192.168.1.226/24 - 192.168.1.0/24 | 192.168.1.255/24 -(3 rows) - -SELECT * FROM inet_tbl WHERE i >> '192.168.1.0/24'::cidr ORDER BY i; - c | i ----+--- -(0 rows) - -SELECT * FROM inet_tbl WHERE i < '192.168.1.0/24'::cidr ORDER BY i; - c | i --------------+------------- - 10.0.0.0/8 | 9.1.2.3/8 - 10.0.0.0/32 | 10.1.2.3/8 - 10.0.0.0/8 | 10.1.2.3/8 - 10.0.0.0/8 | 10.1.2.3/8 - 10.1.0.0/16 | 10.1.2.3/16 - 10.1.2.0/24 | 10.1.2.3/24 - 10.1.2.3/32 | 10.1.2.3 - 10.0.0.0/8 | 11.1.2.3/8 -(8 rows) - -SELECT * FROM inet_tbl WHERE i <= '192.168.1.0/24'::cidr ORDER BY i; - c | i -----------------+---------------- - 10.0.0.0/8 | 9.1.2.3/8 - 10.0.0.0/8 | 10.1.2.3/8 - 10.0.0.0/32 | 10.1.2.3/8 - 10.0.0.0/8 | 10.1.2.3/8 - 10.1.0.0/16 | 10.1.2.3/16 - 10.1.2.0/24 | 10.1.2.3/24 - 10.1.2.3/32 | 10.1.2.3 - 10.0.0.0/8 | 11.1.2.3/8 - 192.168.1.0/24 | 192.168.1.0/24 -(9 rows) - -SELECT * FROM inet_tbl WHERE i = '192.168.1.0/24'::cidr ORDER BY i; - c | i -----------------+---------------- - 192.168.1.0/24 | 192.168.1.0/24 -(1 row) - -SELECT * FROM inet_tbl WHERE i >= '192.168.1.0/24'::cidr ORDER BY i; - c | i ---------------------+------------------ - 192.168.1.0/24 | 192.168.1.0/24 - 192.168.1.0/24 | 192.168.1.226/24 - 192.168.1.0/24 | 192.168.1.255/24 - 192.168.1.0/24 | 192.168.1.0/25 - 192.168.1.0/24 | 192.168.1.255/25 - 192.168.1.0/26 | 192.168.1.226 - ::ffff:1.2.3.4/128 | ::4.3.2.1/24 - 10:23::f1/128 | 10:23::f1/64 - 10:23::8000/113 | 10:23::ffff -(9 rows) - -SELECT * FROM inet_tbl WHERE i > '192.168.1.0/24'::cidr ORDER BY i; - c | i ---------------------+------------------ - 192.168.1.0/24 | 192.168.1.226/24 - 192.168.1.0/24 | 192.168.1.255/24 - 192.168.1.0/24 | 192.168.1.0/25 - 192.168.1.0/24 | 192.168.1.255/25 - 192.168.1.0/26 | 192.168.1.226 - ::ffff:1.2.3.4/128 | ::4.3.2.1/24 - 10:23::f1/128 | 10:23::f1/64 - 10:23::8000/113 | 10:23::ffff -(8 rows) - -SELECT * FROM inet_tbl WHERE i <> '192.168.1.0/24'::cidr ORDER BY i; - c | i ---------------------+------------------ - 10.0.0.0/8 | 9.1.2.3/8 - 10.0.0.0/8 | 10.1.2.3/8 - 10.0.0.0/32 | 10.1.2.3/8 - 10.0.0.0/8 | 10.1.2.3/8 - 10.1.0.0/16 | 10.1.2.3/16 - 10.1.2.0/24 | 10.1.2.3/24 - 10.1.2.3/32 | 10.1.2.3 - 10.0.0.0/8 | 11.1.2.3/8 - 192.168.1.0/24 | 192.168.1.226/24 - 192.168.1.0/24 | 192.168.1.255/24 - 192.168.1.0/24 | 192.168.1.0/25 - 192.168.1.0/24 | 192.168.1.255/25 - 192.168.1.0/26 | 192.168.1.226 - ::ffff:1.2.3.4/128 | ::4.3.2.1/24 - 10:23::f1/128 | 10:23::f1/64 - 10:23::8000/113 | 10:23::ffff -(16 rows) - --- test index-only scans -EXPLAIN (COSTS OFF) -SELECT i FROM inet_tbl WHERE i << '192.168.1.0/24'::cidr ORDER BY i; - QUERY PLAN ---------------------------------------------------- - Sort - Sort Key: i - -> Index Only Scan using inet_idx2 on inet_tbl - Index Cond: (i << '192.168.1.0/24'::inet) -(4 rows) - -SELECT i FROM inet_tbl WHERE i << '192.168.1.0/24'::cidr ORDER BY i; - i ------------------- - 192.168.1.0/25 - 192.168.1.255/25 - 192.168.1.226 -(3 rows) - -SET enable_seqscan TO on; -DROP INDEX inet_idx2; --- check that spgist index works correctly -CREATE INDEX inet_idx3 ON inet_tbl using spgist (i); -SET enable_seqscan TO off; -SELECT * FROM inet_tbl WHERE i << '192.168.1.0/24'::cidr ORDER BY i; - c | i -----------------+------------------ - 192.168.1.0/24 | 192.168.1.0/25 - 192.168.1.0/24 | 192.168.1.255/25 - 192.168.1.0/26 | 192.168.1.226 -(3 rows) - -SELECT * FROM inet_tbl WHERE i <<= '192.168.1.0/24'::cidr ORDER BY i; - c | i -----------------+------------------ - 192.168.1.0/24 | 192.168.1.0/24 - 192.168.1.0/24 | 192.168.1.226/24 - 192.168.1.0/24 | 192.168.1.255/24 - 192.168.1.0/24 | 192.168.1.0/25 - 192.168.1.0/24 | 192.168.1.255/25 - 192.168.1.0/26 | 192.168.1.226 -(6 rows) - -SELECT * FROM inet_tbl WHERE i && '192.168.1.0/24'::cidr ORDER BY i; - c | i -----------------+------------------ - 192.168.1.0/24 | 192.168.1.0/24 - 192.168.1.0/24 | 192.168.1.226/24 - 192.168.1.0/24 | 192.168.1.255/24 - 192.168.1.0/24 | 192.168.1.0/25 - 192.168.1.0/24 | 192.168.1.255/25 - 192.168.1.0/26 | 192.168.1.226 -(6 rows) - -SELECT * FROM inet_tbl WHERE i >>= '192.168.1.0/24'::cidr ORDER BY i; - c | i -----------------+------------------ - 192.168.1.0/24 | 192.168.1.0/24 - 192.168.1.0/24 | 192.168.1.226/24 - 192.168.1.0/24 | 192.168.1.255/24 -(3 rows) - -SELECT * FROM inet_tbl WHERE i >> '192.168.1.0/24'::cidr ORDER BY i; - c | i ----+--- -(0 rows) - -SELECT * FROM inet_tbl WHERE i < '192.168.1.0/24'::cidr ORDER BY i; - c | i --------------+------------- - 10.0.0.0/8 | 9.1.2.3/8 - 10.0.0.0/32 | 10.1.2.3/8 - 10.0.0.0/8 | 10.1.2.3/8 - 10.0.0.0/8 | 10.1.2.3/8 - 10.1.0.0/16 | 10.1.2.3/16 - 10.1.2.0/24 | 10.1.2.3/24 - 10.1.2.3/32 | 10.1.2.3 - 10.0.0.0/8 | 11.1.2.3/8 -(8 rows) - -SELECT * FROM inet_tbl WHERE i <= '192.168.1.0/24'::cidr ORDER BY i; - c | i -----------------+---------------- - 10.0.0.0/8 | 9.1.2.3/8 - 10.0.0.0/8 | 10.1.2.3/8 - 10.0.0.0/32 | 10.1.2.3/8 - 10.0.0.0/8 | 10.1.2.3/8 - 10.1.0.0/16 | 10.1.2.3/16 - 10.1.2.0/24 | 10.1.2.3/24 - 10.1.2.3/32 | 10.1.2.3 - 10.0.0.0/8 | 11.1.2.3/8 - 192.168.1.0/24 | 192.168.1.0/24 -(9 rows) - -SELECT * FROM inet_tbl WHERE i = '192.168.1.0/24'::cidr ORDER BY i; - c | i -----------------+---------------- - 192.168.1.0/24 | 192.168.1.0/24 -(1 row) - -SELECT * FROM inet_tbl WHERE i >= '192.168.1.0/24'::cidr ORDER BY i; - c | i ---------------------+------------------ - 192.168.1.0/24 | 192.168.1.0/24 - 192.168.1.0/24 | 192.168.1.226/24 - 192.168.1.0/24 | 192.168.1.255/24 - 192.168.1.0/24 | 192.168.1.0/25 - 192.168.1.0/24 | 192.168.1.255/25 - 192.168.1.0/26 | 192.168.1.226 - ::ffff:1.2.3.4/128 | ::4.3.2.1/24 - 10:23::f1/128 | 10:23::f1/64 - 10:23::8000/113 | 10:23::ffff -(9 rows) - -SELECT * FROM inet_tbl WHERE i > '192.168.1.0/24'::cidr ORDER BY i; - c | i ---------------------+------------------ - 192.168.1.0/24 | 192.168.1.226/24 - 192.168.1.0/24 | 192.168.1.255/24 - 192.168.1.0/24 | 192.168.1.0/25 - 192.168.1.0/24 | 192.168.1.255/25 - 192.168.1.0/26 | 192.168.1.226 - ::ffff:1.2.3.4/128 | ::4.3.2.1/24 - 10:23::f1/128 | 10:23::f1/64 - 10:23::8000/113 | 10:23::ffff -(8 rows) - -SELECT * FROM inet_tbl WHERE i <> '192.168.1.0/24'::cidr ORDER BY i; - c | i ---------------------+------------------ - 10.0.0.0/8 | 9.1.2.3/8 - 10.0.0.0/8 | 10.1.2.3/8 - 10.0.0.0/32 | 10.1.2.3/8 - 10.0.0.0/8 | 10.1.2.3/8 - 10.1.0.0/16 | 10.1.2.3/16 - 10.1.2.0/24 | 10.1.2.3/24 - 10.1.2.3/32 | 10.1.2.3 - 10.0.0.0/8 | 11.1.2.3/8 - 192.168.1.0/24 | 192.168.1.226/24 - 192.168.1.0/24 | 192.168.1.255/24 - 192.168.1.0/24 | 192.168.1.0/25 - 192.168.1.0/24 | 192.168.1.255/25 - 192.168.1.0/26 | 192.168.1.226 - ::ffff:1.2.3.4/128 | ::4.3.2.1/24 - 10:23::f1/128 | 10:23::f1/64 - 10:23::8000/113 | 10:23::ffff -(16 rows) - --- test index-only scans -EXPLAIN (COSTS OFF) -SELECT i FROM inet_tbl WHERE i << '192.168.1.0/24'::cidr ORDER BY i; - QUERY PLAN ---------------------------------------------------- - Sort - Sort Key: i - -> Index Only Scan using inet_idx3 on inet_tbl - Index Cond: (i << '192.168.1.0/24'::inet) -(4 rows) - -SELECT i FROM inet_tbl WHERE i << '192.168.1.0/24'::cidr ORDER BY i; - i ------------------- - 192.168.1.0/25 - 192.168.1.255/25 - 192.168.1.226 -(3 rows) - -SET enable_seqscan TO on; -DROP INDEX inet_idx3; --- simple tests of inet boolean and arithmetic operators -SELECT i, ~i AS "~i" FROM inet_tbl; - i | ~i -------------------+-------------------------------------------- - 192.168.1.226/24 | 63.87.254.29/24 - 192.168.1.226 | 63.87.254.29 - 192.168.1.0/24 | 63.87.254.255/24 - 192.168.1.0/25 | 63.87.254.255/25 - 192.168.1.255/24 | 63.87.254.0/24 - 192.168.1.255/25 | 63.87.254.0/25 - 10.1.2.3/8 | 245.254.253.252/8 - 10.1.2.3/8 | 245.254.253.252/8 - 10.1.2.3 | 245.254.253.252 - 10.1.2.3/24 | 245.254.253.252/24 - 10.1.2.3/16 | 245.254.253.252/16 - 10.1.2.3/8 | 245.254.253.252/8 - 11.1.2.3/8 | 244.254.253.252/8 - 9.1.2.3/8 | 246.254.253.252/8 - 10:23::f1/64 | ffef:ffdc:ffff:ffff:ffff:ffff:ffff:ff0e/64 - 10:23::ffff | ffef:ffdc:ffff:ffff:ffff:ffff:ffff:0 - ::4.3.2.1/24 | ffff:ffff:ffff:ffff:ffff:ffff:fbfc:fdfe/24 -(17 rows) - -SELECT i, c, i & c AS "and" FROM inet_tbl; - i | c | and -------------------+--------------------+---------------- - 192.168.1.226/24 | 192.168.1.0/24 | 192.168.1.0/24 - 192.168.1.226 | 192.168.1.0/26 | 192.168.1.0 - 192.168.1.0/24 | 192.168.1.0/24 | 192.168.1.0/24 - 192.168.1.0/25 | 192.168.1.0/24 | 192.168.1.0/25 - 192.168.1.255/24 | 192.168.1.0/24 | 192.168.1.0/24 - 192.168.1.255/25 | 192.168.1.0/24 | 192.168.1.0/25 - 10.1.2.3/8 | 10.0.0.0/8 | 10.0.0.0/8 - 10.1.2.3/8 | 10.0.0.0/32 | 10.0.0.0 - 10.1.2.3 | 10.1.2.3/32 | 10.1.2.3 - 10.1.2.3/24 | 10.1.2.0/24 | 10.1.2.0/24 - 10.1.2.3/16 | 10.1.0.0/16 | 10.1.0.0/16 - 10.1.2.3/8 | 10.0.0.0/8 | 10.0.0.0/8 - 11.1.2.3/8 | 10.0.0.0/8 | 10.0.0.0/8 - 9.1.2.3/8 | 10.0.0.0/8 | 8.0.0.0/8 - 10:23::f1/64 | 10:23::f1/128 | 10:23::f1 - 10:23::ffff | 10:23::8000/113 | 10:23::8000 - ::4.3.2.1/24 | ::ffff:1.2.3.4/128 | ::0.2.2.0 -(17 rows) - -SELECT i, c, i | c AS "or" FROM inet_tbl; - i | c | or -------------------+--------------------+------------------ - 192.168.1.226/24 | 192.168.1.0/24 | 192.168.1.226/24 - 192.168.1.226 | 192.168.1.0/26 | 192.168.1.226 - 192.168.1.0/24 | 192.168.1.0/24 | 192.168.1.0/24 - 192.168.1.0/25 | 192.168.1.0/24 | 192.168.1.0/25 - 192.168.1.255/24 | 192.168.1.0/24 | 192.168.1.255/24 - 192.168.1.255/25 | 192.168.1.0/24 | 192.168.1.255/25 - 10.1.2.3/8 | 10.0.0.0/8 | 10.1.2.3/8 - 10.1.2.3/8 | 10.0.0.0/32 | 10.1.2.3 - 10.1.2.3 | 10.1.2.3/32 | 10.1.2.3 - 10.1.2.3/24 | 10.1.2.0/24 | 10.1.2.3/24 - 10.1.2.3/16 | 10.1.0.0/16 | 10.1.2.3/16 - 10.1.2.3/8 | 10.0.0.0/8 | 10.1.2.3/8 - 11.1.2.3/8 | 10.0.0.0/8 | 11.1.2.3/8 - 9.1.2.3/8 | 10.0.0.0/8 | 11.1.2.3/8 - 10:23::f1/64 | 10:23::f1/128 | 10:23::f1 - 10:23::ffff | 10:23::8000/113 | 10:23::ffff - ::4.3.2.1/24 | ::ffff:1.2.3.4/128 | ::ffff:5.3.3.5 -(17 rows) - -SELECT i, i + 500 AS "i+500" FROM inet_tbl; - i | i+500 -------------------+------------------ - 192.168.1.226/24 | 192.168.3.214/24 - 192.168.1.226 | 192.168.3.214 - 192.168.1.0/24 | 192.168.2.244/24 - 192.168.1.0/25 | 192.168.2.244/25 - 192.168.1.255/24 | 192.168.3.243/24 - 192.168.1.255/25 | 192.168.3.243/25 - 10.1.2.3/8 | 10.1.3.247/8 - 10.1.2.3/8 | 10.1.3.247/8 - 10.1.2.3 | 10.1.3.247 - 10.1.2.3/24 | 10.1.3.247/24 - 10.1.2.3/16 | 10.1.3.247/16 - 10.1.2.3/8 | 10.1.3.247/8 - 11.1.2.3/8 | 11.1.3.247/8 - 9.1.2.3/8 | 9.1.3.247/8 - 10:23::f1/64 | 10:23::2e5/64 - 10:23::ffff | 10:23::1:1f3 - ::4.3.2.1/24 | ::4.3.3.245/24 -(17 rows) - -SELECT i, i - 500 AS "i-500" FROM inet_tbl; - i | i-500 -------------------+---------------------------------------- - 192.168.1.226/24 | 192.167.255.238/24 - 192.168.1.226 | 192.167.255.238 - 192.168.1.0/24 | 192.167.255.12/24 - 192.168.1.0/25 | 192.167.255.12/25 - 192.168.1.255/24 | 192.168.0.11/24 - 192.168.1.255/25 | 192.168.0.11/25 - 10.1.2.3/8 | 10.1.0.15/8 - 10.1.2.3/8 | 10.1.0.15/8 - 10.1.2.3 | 10.1.0.15 - 10.1.2.3/24 | 10.1.0.15/24 - 10.1.2.3/16 | 10.1.0.15/16 - 10.1.2.3/8 | 10.1.0.15/8 - 11.1.2.3/8 | 11.1.0.15/8 - 9.1.2.3/8 | 9.1.0.15/8 - 10:23::f1/64 | 10:22:ffff:ffff:ffff:ffff:ffff:fefd/64 - 10:23::ffff | 10:23::fe0b - ::4.3.2.1/24 | ::4.3.0.13/24 -(17 rows) - -SELECT i, c, i - c AS "minus" FROM inet_tbl; - i | c | minus -------------------+--------------------+------------------ - 192.168.1.226/24 | 192.168.1.0/24 | 226 - 192.168.1.226 | 192.168.1.0/26 | 226 - 192.168.1.0/24 | 192.168.1.0/24 | 0 - 192.168.1.0/25 | 192.168.1.0/24 | 0 - 192.168.1.255/24 | 192.168.1.0/24 | 255 - 192.168.1.255/25 | 192.168.1.0/24 | 255 - 10.1.2.3/8 | 10.0.0.0/8 | 66051 - 10.1.2.3/8 | 10.0.0.0/32 | 66051 - 10.1.2.3 | 10.1.2.3/32 | 0 - 10.1.2.3/24 | 10.1.2.0/24 | 3 - 10.1.2.3/16 | 10.1.0.0/16 | 515 - 10.1.2.3/8 | 10.0.0.0/8 | 66051 - 11.1.2.3/8 | 10.0.0.0/8 | 16843267 - 9.1.2.3/8 | 10.0.0.0/8 | -16711165 - 10:23::f1/64 | 10:23::f1/128 | 0 - 10:23::ffff | 10:23::8000/113 | 32767 - ::4.3.2.1/24 | ::ffff:1.2.3.4/128 | -281470631346435 -(17 rows) - -SELECT '127.0.0.1'::inet + 257; - ?column? ------------ - 127.0.1.2 -(1 row) - -SELECT ('127.0.0.1'::inet + 257) - 257; - ?column? ------------ - 127.0.0.1 -(1 row) - -SELECT '127::1'::inet + 257; - ?column? ----------- - 127::102 -(1 row) - -SELECT ('127::1'::inet + 257) - 257; - ?column? ----------- - 127::1 -(1 row) - -SELECT '127.0.0.2'::inet - ('127.0.0.2'::inet + 500); - ?column? ----------- - -500 -(1 row) - -SELECT '127.0.0.2'::inet - ('127.0.0.2'::inet - 500); - ?column? ----------- - 500 -(1 row) - -SELECT '127::2'::inet - ('127::2'::inet + 500); - ?column? ----------- - -500 -(1 row) - -SELECT '127::2'::inet - ('127::2'::inet - 500); - ?column? ----------- - 500 -(1 row) - --- these should give overflow errors: -SELECT '127.0.0.1'::inet + 10000000000; -ERROR: result is out of range -SELECT '127.0.0.1'::inet - 10000000000; -ERROR: result is out of range -SELECT '126::1'::inet - '127::2'::inet; -ERROR: result is out of range -SELECT '127::1'::inet - '126::2'::inet; -ERROR: result is out of range --- but not these -SELECT '127::1'::inet + 10000000000; - ?column? ------------------- - 127::2:540b:e401 -(1 row) - -SELECT '127::1'::inet - '127::2'::inet; - ?column? ----------- - -1 -(1 row) - --- insert one more row with addressed from different families -INSERT INTO INET_TBL (c, i) VALUES ('10', '10::/8'); --- now, this one should fail -SELECT inet_merge(c, i) FROM INET_TBL; -ERROR: cannot merge addresses from different families --- fix it by inet_same_family() condition -SELECT inet_merge(c, i) FROM INET_TBL WHERE inet_same_family(c, i); - inet_merge ------------------ - 192.168.1.0/24 - 192.168.1.0/24 - 192.168.1.0/24 - 192.168.1.0/24 - 192.168.1.0/24 - 192.168.1.0/24 - 10.0.0.0/8 - 10.0.0.0/8 - 10.1.2.3/32 - 10.1.2.0/24 - 10.1.0.0/16 - 10.0.0.0/8 - 10.0.0.0/7 - 8.0.0.0/6 - 10:23::/64 - 10:23::8000/113 - ::/24 -(17 rows) - --- Test inet sortsupport with a variety of boundary inputs: -SELECT a FROM (VALUES - ('0.0.0.0/0'::inet), - ('0.0.0.0/1'::inet), - ('0.0.0.0/32'::inet), - ('0.0.0.1/0'::inet), - ('0.0.0.1/1'::inet), - ('127.126.127.127/0'::inet), - ('127.127.127.127/0'::inet), - ('127.128.127.127/0'::inet), - ('192.168.1.0/24'::inet), - ('192.168.1.0/25'::inet), - ('192.168.1.1/23'::inet), - ('192.168.1.1/5'::inet), - ('192.168.1.1/6'::inet), - ('192.168.1.1/25'::inet), - ('192.168.1.2/25'::inet), - ('192.168.1.1/26'::inet), - ('192.168.1.2/26'::inet), - ('192.168.1.2/23'::inet), - ('192.168.1.255/5'::inet), - ('192.168.1.255/6'::inet), - ('192.168.1.3/1'::inet), - ('192.168.1.3/23'::inet), - ('192.168.1.4/0'::inet), - ('192.168.1.5/0'::inet), - ('255.0.0.0/0'::inet), - ('255.1.0.0/0'::inet), - ('255.2.0.0/0'::inet), - ('255.255.000.000/0'::inet), - ('255.255.000.000/0'::inet), - ('255.255.000.000/15'::inet), - ('255.255.000.000/16'::inet), - ('255.255.255.254/32'::inet), - ('255.255.255.000/32'::inet), - ('255.255.255.001/31'::inet), - ('255.255.255.002/31'::inet), - ('255.255.255.003/31'::inet), - ('255.255.255.003/32'::inet), - ('255.255.255.001/32'::inet), - ('255.255.255.255/0'::inet), - ('255.255.255.255/0'::inet), - ('255.255.255.255/0'::inet), - ('255.255.255.255/1'::inet), - ('255.255.255.255/16'::inet), - ('255.255.255.255/16'::inet), - ('255.255.255.255/31'::inet), - ('255.255.255.255/32'::inet), - ('255.255.255.253/32'::inet), - ('255.255.255.252/32'::inet), - ('255.3.0.0/0'::inet), - ('0000:0000:0000:0000:0000:0000:0000:0000/0'::inet), - ('0000:0000:0000:0000:0000:0000:0000:0000/128'::inet), - ('0000:0000:0000:0000:0000:0000:0000:0001/128'::inet), - ('10:23::f1/64'::inet), - ('10:23::f1/65'::inet), - ('10:23::ffff'::inet), - ('127::1'::inet), - ('127::2'::inet), - ('8000:0000:0000:0000:0000:0000:0000:0000/1'::inet), - ('::1:ffff:ffff:ffff:ffff/128'::inet), - ('::2:ffff:ffff:ffff:ffff/128'::inet), - ('::4:3:2:0/24'::inet), - ('::4:3:2:1/24'::inet), - ('::4:3:2:2/24'::inet), - ('ffff:83e7:f118:57dc:6093:6d92:689d:58cf/70'::inet), - ('ffff:84b0:4775:536e:c3ed:7116:a6d6:34f0/44'::inet), - ('ffff:8566:f84:5867:47f1:7867:d2ba:8a1a/69'::inet), - ('ffff:8883:f028:7d2:4d68:d510:7d6b:ac43/73'::inet), - ('ffff:8ae8:7c14:65b3:196:8e4a:89ae:fb30/89'::inet), - ('ffff:8dd0:646:694c:7c16:7e35:6a26:171/104'::inet), - ('ffff:8eef:cbf:700:eda3:ae32:f4b4:318b/121'::inet), - ('ffff:90e7:e744:664:a93:8efe:1f25:7663/122'::inet), - ('ffff:9597:c69c:8b24:57a:8639:ec78:6026/111'::inet), - ('ffff:9e86:79ea:f16e:df31:8e4d:7783:532e/88'::inet), - ('ffff:a0c7:82d3:24de:f762:6e1f:316d:3fb2/23'::inet), - ('ffff:fffa:ffff:ffff:ffff:ffff:ffff:ffff/0'::inet), - ('ffff:fffb:ffff:ffff:ffff:ffff:ffff:ffff/0'::inet), - ('ffff:fffc:ffff:ffff:ffff:ffff:ffff:ffff/0'::inet), - ('ffff:fffd:ffff:ffff:ffff:ffff:ffff:ffff/0'::inet), - ('ffff:fffe:ffff:ffff:ffff:ffff:ffff:ffff/0'::inet), - ('ffff:ffff:ffff:fffa:ffff:ffff:ffff:ffff/0'::inet), - ('ffff:ffff:ffff:fffb:ffff:ffff:ffff:ffff/0'::inet), - ('ffff:ffff:ffff:fffc:ffff:ffff:ffff:ffff/0'::inet), - ('ffff:ffff:ffff:fffd::/128'::inet), - ('ffff:ffff:ffff:fffd:ffff:ffff:ffff:ffff/0'::inet), - ('ffff:ffff:ffff:fffe::/128'::inet), - ('ffff:ffff:ffff:fffe:ffff:ffff:ffff:ffff/0'::inet), - ('ffff:ffff:ffff:ffff:4:3:2:0/24'::inet), - ('ffff:ffff:ffff:ffff:4:3:2:1/24'::inet), - ('ffff:ffff:ffff:ffff:4:3:2:2/24'::inet), - ('ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/0'::inet), - ('ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/128'::inet) -) AS i(a) ORDER BY a; - a --------------------------------------------- - 0.0.0.0/0 - 0.0.0.1/0 - 127.126.127.127/0 - 127.127.127.127/0 - 127.128.127.127/0 - 192.168.1.4/0 - 192.168.1.5/0 - 255.0.0.0/0 - 255.1.0.0/0 - 255.2.0.0/0 - 255.3.0.0/0 - 255.255.0.0/0 - 255.255.0.0/0 - 255.255.255.255/0 - 255.255.255.255/0 - 255.255.255.255/0 - 0.0.0.0/1 - 0.0.0.1/1 - 0.0.0.0 - 192.168.1.3/1 - 255.255.255.255/1 - 192.168.1.1/5 - 192.168.1.255/5 - 192.168.1.1/6 - 192.168.1.255/6 - 192.168.1.1/23 - 192.168.1.2/23 - 192.168.1.3/23 - 192.168.1.0/24 - 192.168.1.0/25 - 192.168.1.1/25 - 192.168.1.2/25 - 192.168.1.1/26 - 192.168.1.2/26 - 255.255.0.0/15 - 255.255.0.0/16 - 255.255.255.255/16 - 255.255.255.255/16 - 255.255.255.1/31 - 255.255.255.0 - 255.255.255.1 - 255.255.255.2/31 - 255.255.255.3/31 - 255.255.255.3 - 255.255.255.252 - 255.255.255.253 - 255.255.255.255/31 - 255.255.255.254 - 255.255.255.255 - ::/0 - ffff:fffa:ffff:ffff:ffff:ffff:ffff:ffff/0 - ffff:fffb:ffff:ffff:ffff:ffff:ffff:ffff/0 - ffff:fffc:ffff:ffff:ffff:ffff:ffff:ffff/0 - ffff:fffd:ffff:ffff:ffff:ffff:ffff:ffff/0 - ffff:fffe:ffff:ffff:ffff:ffff:ffff:ffff/0 - ffff:ffff:ffff:fffa:ffff:ffff:ffff:ffff/0 - ffff:ffff:ffff:fffb:ffff:ffff:ffff:ffff/0 - ffff:ffff:ffff:fffc:ffff:ffff:ffff:ffff/0 - ffff:ffff:ffff:fffd:ffff:ffff:ffff:ffff/0 - ffff:ffff:ffff:fffe:ffff:ffff:ffff:ffff/0 - ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/0 - ::4:3:2:0/24 - ::4:3:2:1/24 - ::4:3:2:2/24 - :: - ::1 - ::1:ffff:ffff:ffff:ffff - ::2:ffff:ffff:ffff:ffff - 10:23::f1/64 - 10:23::f1/65 - 10:23::ffff - 127::1 - 127::2 - 8000::/1 - ffff:83e7:f118:57dc:6093:6d92:689d:58cf/70 - ffff:84b0:4775:536e:c3ed:7116:a6d6:34f0/44 - ffff:8566:f84:5867:47f1:7867:d2ba:8a1a/69 - ffff:8883:f028:7d2:4d68:d510:7d6b:ac43/73 - ffff:8ae8:7c14:65b3:196:8e4a:89ae:fb30/89 - ffff:8dd0:646:694c:7c16:7e35:6a26:171/104 - ffff:8eef:cbf:700:eda3:ae32:f4b4:318b/121 - ffff:90e7:e744:664:a93:8efe:1f25:7663/122 - ffff:9597:c69c:8b24:57a:8639:ec78:6026/111 - ffff:9e86:79ea:f16e:df31:8e4d:7783:532e/88 - ffff:a0c7:82d3:24de:f762:6e1f:316d:3fb2/23 - ffff:ffff:ffff:ffff:4:3:2:0/24 - ffff:ffff:ffff:ffff:4:3:2:1/24 - ffff:ffff:ffff:ffff:4:3:2:2/24 - ffff:ffff:ffff:fffd:: - ffff:ffff:ffff:fffe:: - ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff -(91 rows) - +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/macaddr.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/macaddr.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/macaddr.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/macaddr.out 2023-02-20 19:44:17.219207219 -0500 @@ -1,160 +1 @@ --- --- macaddr --- -CREATE TABLE macaddr_data (a int, b macaddr); -INSERT INTO macaddr_data VALUES (1, '08:00:2b:01:02:03'); -INSERT INTO macaddr_data VALUES (2, '08-00-2b-01-02-03'); -INSERT INTO macaddr_data VALUES (3, '08002b:010203'); -INSERT INTO macaddr_data VALUES (4, '08002b-010203'); -INSERT INTO macaddr_data VALUES (5, '0800.2b01.0203'); -INSERT INTO macaddr_data VALUES (6, '0800-2b01-0203'); -INSERT INTO macaddr_data VALUES (7, '08002b010203'); -INSERT INTO macaddr_data VALUES (8, '0800:2b01:0203'); -- invalid -ERROR: invalid input syntax for type macaddr: "0800:2b01:0203" -LINE 1: INSERT INTO macaddr_data VALUES (8, '0800:2b01:0203'); - ^ -INSERT INTO macaddr_data VALUES (9, 'not even close'); -- invalid -ERROR: invalid input syntax for type macaddr: "not even close" -LINE 1: INSERT INTO macaddr_data VALUES (9, 'not even close'); - ^ -INSERT INTO macaddr_data VALUES (10, '08:00:2b:01:02:04'); -INSERT INTO macaddr_data VALUES (11, '08:00:2b:01:02:02'); -INSERT INTO macaddr_data VALUES (12, '08:00:2a:01:02:03'); -INSERT INTO macaddr_data VALUES (13, '08:00:2c:01:02:03'); -INSERT INTO macaddr_data VALUES (14, '08:00:2a:01:02:04'); -SELECT * FROM macaddr_data; - a | b -----+------------------- - 1 | 08:00:2b:01:02:03 - 2 | 08:00:2b:01:02:03 - 3 | 08:00:2b:01:02:03 - 4 | 08:00:2b:01:02:03 - 5 | 08:00:2b:01:02:03 - 6 | 08:00:2b:01:02:03 - 7 | 08:00:2b:01:02:03 - 10 | 08:00:2b:01:02:04 - 11 | 08:00:2b:01:02:02 - 12 | 08:00:2a:01:02:03 - 13 | 08:00:2c:01:02:03 - 14 | 08:00:2a:01:02:04 -(12 rows) - -CREATE INDEX macaddr_data_btree ON macaddr_data USING btree (b); -CREATE INDEX macaddr_data_hash ON macaddr_data USING hash (b); -SELECT a, b, trunc(b) FROM macaddr_data ORDER BY 2, 1; - a | b | trunc -----+-------------------+------------------- - 12 | 08:00:2a:01:02:03 | 08:00:2a:00:00:00 - 14 | 08:00:2a:01:02:04 | 08:00:2a:00:00:00 - 11 | 08:00:2b:01:02:02 | 08:00:2b:00:00:00 - 1 | 08:00:2b:01:02:03 | 08:00:2b:00:00:00 - 2 | 08:00:2b:01:02:03 | 08:00:2b:00:00:00 - 3 | 08:00:2b:01:02:03 | 08:00:2b:00:00:00 - 4 | 08:00:2b:01:02:03 | 08:00:2b:00:00:00 - 5 | 08:00:2b:01:02:03 | 08:00:2b:00:00:00 - 6 | 08:00:2b:01:02:03 | 08:00:2b:00:00:00 - 7 | 08:00:2b:01:02:03 | 08:00:2b:00:00:00 - 10 | 08:00:2b:01:02:04 | 08:00:2b:00:00:00 - 13 | 08:00:2c:01:02:03 | 08:00:2c:00:00:00 -(12 rows) - -SELECT b < '08:00:2b:01:02:04' FROM macaddr_data WHERE a = 1; -- true - ?column? ----------- - t -(1 row) - -SELECT b > '08:00:2b:01:02:04' FROM macaddr_data WHERE a = 1; -- false - ?column? ----------- - f -(1 row) - -SELECT b > '08:00:2b:01:02:03' FROM macaddr_data WHERE a = 1; -- false - ?column? ----------- - f -(1 row) - -SELECT b <= '08:00:2b:01:02:04' FROM macaddr_data WHERE a = 1; -- true - ?column? ----------- - t -(1 row) - -SELECT b >= '08:00:2b:01:02:04' FROM macaddr_data WHERE a = 1; -- false - ?column? ----------- - f -(1 row) - -SELECT b = '08:00:2b:01:02:03' FROM macaddr_data WHERE a = 1; -- true - ?column? ----------- - t -(1 row) - -SELECT b <> '08:00:2b:01:02:04' FROM macaddr_data WHERE a = 1; -- true - ?column? ----------- - t -(1 row) - -SELECT b <> '08:00:2b:01:02:03' FROM macaddr_data WHERE a = 1; -- false - ?column? ----------- - f -(1 row) - -SELECT ~b FROM macaddr_data; - ?column? -------------------- - f7:ff:d4:fe:fd:fc - f7:ff:d4:fe:fd:fc - f7:ff:d4:fe:fd:fc - f7:ff:d4:fe:fd:fc - f7:ff:d4:fe:fd:fc - f7:ff:d4:fe:fd:fc - f7:ff:d4:fe:fd:fc - f7:ff:d4:fe:fd:fb - f7:ff:d4:fe:fd:fd - f7:ff:d5:fe:fd:fc - f7:ff:d3:fe:fd:fc - f7:ff:d5:fe:fd:fb -(12 rows) - -SELECT b & '00:00:00:ff:ff:ff' FROM macaddr_data; - ?column? -------------------- - 00:00:00:01:02:03 - 00:00:00:01:02:03 - 00:00:00:01:02:03 - 00:00:00:01:02:03 - 00:00:00:01:02:03 - 00:00:00:01:02:03 - 00:00:00:01:02:03 - 00:00:00:01:02:04 - 00:00:00:01:02:02 - 00:00:00:01:02:03 - 00:00:00:01:02:03 - 00:00:00:01:02:04 -(12 rows) - -SELECT b | '01:02:03:04:05:06' FROM macaddr_data; - ?column? -------------------- - 09:02:2b:05:07:07 - 09:02:2b:05:07:07 - 09:02:2b:05:07:07 - 09:02:2b:05:07:07 - 09:02:2b:05:07:07 - 09:02:2b:05:07:07 - 09:02:2b:05:07:07 - 09:02:2b:05:07:06 - 09:02:2b:05:07:06 - 09:02:2b:05:07:07 - 09:02:2f:05:07:07 - 09:02:2b:05:07:06 -(12 rows) - -DROP TABLE macaddr_data; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/macaddr8.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/macaddr8.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/macaddr8.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/macaddr8.out 2023-02-20 19:44:17.189207218 -0500 @@ -1,354 +1 @@ --- --- macaddr8 --- --- test various cases of valid and invalid input --- valid -SELECT '08:00:2b:01:02:03 '::macaddr8; - macaddr8 -------------------------- - 08:00:2b:ff:fe:01:02:03 -(1 row) - -SELECT ' 08:00:2b:01:02:03 '::macaddr8; - macaddr8 -------------------------- - 08:00:2b:ff:fe:01:02:03 -(1 row) - -SELECT ' 08:00:2b:01:02:03'::macaddr8; - macaddr8 -------------------------- - 08:00:2b:ff:fe:01:02:03 -(1 row) - -SELECT '08:00:2b:01:02:03:04:05 '::macaddr8; - macaddr8 -------------------------- - 08:00:2b:01:02:03:04:05 -(1 row) - -SELECT ' 08:00:2b:01:02:03:04:05 '::macaddr8; - macaddr8 -------------------------- - 08:00:2b:01:02:03:04:05 -(1 row) - -SELECT ' 08:00:2b:01:02:03:04:05'::macaddr8; - macaddr8 -------------------------- - 08:00:2b:01:02:03:04:05 -(1 row) - -SELECT '123 08:00:2b:01:02:03'::macaddr8; -- invalid -ERROR: invalid input syntax for type macaddr8: "123 08:00:2b:01:02:03" -LINE 1: SELECT '123 08:00:2b:01:02:03'::macaddr8; - ^ -SELECT '08:00:2b:01:02:03 123'::macaddr8; -- invalid -ERROR: invalid input syntax for type macaddr8: "08:00:2b:01:02:03 123" -LINE 1: SELECT '08:00:2b:01:02:03 123'::macaddr8; - ^ -SELECT '123 08:00:2b:01:02:03:04:05'::macaddr8; -- invalid -ERROR: invalid input syntax for type macaddr8: "123 08:00:2b:01:02:03:04:05" -LINE 1: SELECT '123 08:00:2b:01:02:03:04:05'::macaddr8; - ^ -SELECT '08:00:2b:01:02:03:04:05 123'::macaddr8; -- invalid -ERROR: invalid input syntax for type macaddr8: "08:00:2b:01:02:03:04:05 123" -LINE 1: SELECT '08:00:2b:01:02:03:04:05 123'::macaddr8; - ^ -SELECT '08:00:2b:01:02:03:04:05:06:07'::macaddr8; -- invalid -ERROR: invalid input syntax for type macaddr8: "08:00:2b:01:02:03:04:05:06:07" -LINE 1: SELECT '08:00:2b:01:02:03:04:05:06:07'::macaddr8; - ^ -SELECT '08-00-2b-01-02-03-04-05-06-07'::macaddr8; -- invalid -ERROR: invalid input syntax for type macaddr8: "08-00-2b-01-02-03-04-05-06-07" -LINE 1: SELECT '08-00-2b-01-02-03-04-05-06-07'::macaddr8; - ^ -SELECT '08002b:01020304050607'::macaddr8; -- invalid -ERROR: invalid input syntax for type macaddr8: "08002b:01020304050607" -LINE 1: SELECT '08002b:01020304050607'::macaddr8; - ^ -SELECT '08002b01020304050607'::macaddr8; -- invalid -ERROR: invalid input syntax for type macaddr8: "08002b01020304050607" -LINE 1: SELECT '08002b01020304050607'::macaddr8; - ^ -SELECT '0z002b0102030405'::macaddr8; -- invalid -ERROR: invalid input syntax for type macaddr8: "0z002b0102030405" -LINE 1: SELECT '0z002b0102030405'::macaddr8; - ^ -SELECT '08002b010203xyza'::macaddr8; -- invalid -ERROR: invalid input syntax for type macaddr8: "08002b010203xyza" -LINE 1: SELECT '08002b010203xyza'::macaddr8; - ^ -SELECT '08:00-2b:01:02:03:04:05'::macaddr8; -- invalid -ERROR: invalid input syntax for type macaddr8: "08:00-2b:01:02:03:04:05" -LINE 1: SELECT '08:00-2b:01:02:03:04:05'::macaddr8; - ^ -SELECT '08:00-2b:01:02:03:04:05'::macaddr8; -- invalid -ERROR: invalid input syntax for type macaddr8: "08:00-2b:01:02:03:04:05" -LINE 1: SELECT '08:00-2b:01:02:03:04:05'::macaddr8; - ^ -SELECT '08:00:2b:01.02:03:04:05'::macaddr8; -- invalid -ERROR: invalid input syntax for type macaddr8: "08:00:2b:01.02:03:04:05" -LINE 1: SELECT '08:00:2b:01.02:03:04:05'::macaddr8; - ^ -SELECT '08:00:2b:01.02:03:04:05'::macaddr8; -- invalid -ERROR: invalid input syntax for type macaddr8: "08:00:2b:01.02:03:04:05" -LINE 1: SELECT '08:00:2b:01.02:03:04:05'::macaddr8; - ^ --- test converting a MAC address to modified EUI-64 for inclusion --- in an ipv6 address -SELECT macaddr8_set7bit('00:08:2b:01:02:03'::macaddr8); - macaddr8_set7bit -------------------------- - 02:08:2b:ff:fe:01:02:03 -(1 row) - -CREATE TABLE macaddr8_data (a int, b macaddr8); -INSERT INTO macaddr8_data VALUES (1, '08:00:2b:01:02:03'); -INSERT INTO macaddr8_data VALUES (2, '08-00-2b-01-02-03'); -INSERT INTO macaddr8_data VALUES (3, '08002b:010203'); -INSERT INTO macaddr8_data VALUES (4, '08002b-010203'); -INSERT INTO macaddr8_data VALUES (5, '0800.2b01.0203'); -INSERT INTO macaddr8_data VALUES (6, '0800-2b01-0203'); -INSERT INTO macaddr8_data VALUES (7, '08002b010203'); -INSERT INTO macaddr8_data VALUES (8, '0800:2b01:0203'); -INSERT INTO macaddr8_data VALUES (9, 'not even close'); -- invalid -ERROR: invalid input syntax for type macaddr8: "not even close" -LINE 1: INSERT INTO macaddr8_data VALUES (9, 'not even close'); - ^ -INSERT INTO macaddr8_data VALUES (10, '08:00:2b:01:02:04'); -INSERT INTO macaddr8_data VALUES (11, '08:00:2b:01:02:02'); -INSERT INTO macaddr8_data VALUES (12, '08:00:2a:01:02:03'); -INSERT INTO macaddr8_data VALUES (13, '08:00:2c:01:02:03'); -INSERT INTO macaddr8_data VALUES (14, '08:00:2a:01:02:04'); -INSERT INTO macaddr8_data VALUES (15, '08:00:2b:01:02:03:04:05'); -INSERT INTO macaddr8_data VALUES (16, '08-00-2b-01-02-03-04-05'); -INSERT INTO macaddr8_data VALUES (17, '08002b:0102030405'); -INSERT INTO macaddr8_data VALUES (18, '08002b-0102030405'); -INSERT INTO macaddr8_data VALUES (19, '0800.2b01.0203.0405'); -INSERT INTO macaddr8_data VALUES (20, '08002b01:02030405'); -INSERT INTO macaddr8_data VALUES (21, '08002b0102030405'); -SELECT * FROM macaddr8_data ORDER BY 1; - a | b -----+------------------------- - 1 | 08:00:2b:ff:fe:01:02:03 - 2 | 08:00:2b:ff:fe:01:02:03 - 3 | 08:00:2b:ff:fe:01:02:03 - 4 | 08:00:2b:ff:fe:01:02:03 - 5 | 08:00:2b:ff:fe:01:02:03 - 6 | 08:00:2b:ff:fe:01:02:03 - 7 | 08:00:2b:ff:fe:01:02:03 - 8 | 08:00:2b:ff:fe:01:02:03 - 10 | 08:00:2b:ff:fe:01:02:04 - 11 | 08:00:2b:ff:fe:01:02:02 - 12 | 08:00:2a:ff:fe:01:02:03 - 13 | 08:00:2c:ff:fe:01:02:03 - 14 | 08:00:2a:ff:fe:01:02:04 - 15 | 08:00:2b:01:02:03:04:05 - 16 | 08:00:2b:01:02:03:04:05 - 17 | 08:00:2b:01:02:03:04:05 - 18 | 08:00:2b:01:02:03:04:05 - 19 | 08:00:2b:01:02:03:04:05 - 20 | 08:00:2b:01:02:03:04:05 - 21 | 08:00:2b:01:02:03:04:05 -(20 rows) - -CREATE INDEX macaddr8_data_btree ON macaddr8_data USING btree (b); -CREATE INDEX macaddr8_data_hash ON macaddr8_data USING hash (b); -SELECT a, b, trunc(b) FROM macaddr8_data ORDER BY 2, 1; - a | b | trunc -----+-------------------------+------------------------- - 12 | 08:00:2a:ff:fe:01:02:03 | 08:00:2a:00:00:00:00:00 - 14 | 08:00:2a:ff:fe:01:02:04 | 08:00:2a:00:00:00:00:00 - 15 | 08:00:2b:01:02:03:04:05 | 08:00:2b:00:00:00:00:00 - 16 | 08:00:2b:01:02:03:04:05 | 08:00:2b:00:00:00:00:00 - 17 | 08:00:2b:01:02:03:04:05 | 08:00:2b:00:00:00:00:00 - 18 | 08:00:2b:01:02:03:04:05 | 08:00:2b:00:00:00:00:00 - 19 | 08:00:2b:01:02:03:04:05 | 08:00:2b:00:00:00:00:00 - 20 | 08:00:2b:01:02:03:04:05 | 08:00:2b:00:00:00:00:00 - 21 | 08:00:2b:01:02:03:04:05 | 08:00:2b:00:00:00:00:00 - 11 | 08:00:2b:ff:fe:01:02:02 | 08:00:2b:00:00:00:00:00 - 1 | 08:00:2b:ff:fe:01:02:03 | 08:00:2b:00:00:00:00:00 - 2 | 08:00:2b:ff:fe:01:02:03 | 08:00:2b:00:00:00:00:00 - 3 | 08:00:2b:ff:fe:01:02:03 | 08:00:2b:00:00:00:00:00 - 4 | 08:00:2b:ff:fe:01:02:03 | 08:00:2b:00:00:00:00:00 - 5 | 08:00:2b:ff:fe:01:02:03 | 08:00:2b:00:00:00:00:00 - 6 | 08:00:2b:ff:fe:01:02:03 | 08:00:2b:00:00:00:00:00 - 7 | 08:00:2b:ff:fe:01:02:03 | 08:00:2b:00:00:00:00:00 - 8 | 08:00:2b:ff:fe:01:02:03 | 08:00:2b:00:00:00:00:00 - 10 | 08:00:2b:ff:fe:01:02:04 | 08:00:2b:00:00:00:00:00 - 13 | 08:00:2c:ff:fe:01:02:03 | 08:00:2c:00:00:00:00:00 -(20 rows) - -SELECT b < '08:00:2b:01:02:04' FROM macaddr8_data WHERE a = 1; -- true - ?column? ----------- - t -(1 row) - -SELECT b > '08:00:2b:ff:fe:01:02:04' FROM macaddr8_data WHERE a = 1; -- false - ?column? ----------- - f -(1 row) - -SELECT b > '08:00:2b:ff:fe:01:02:03' FROM macaddr8_data WHERE a = 1; -- false - ?column? ----------- - f -(1 row) - -SELECT b::macaddr <= '08:00:2b:01:02:04' FROM macaddr8_data WHERE a = 1; -- true - ?column? ----------- - t -(1 row) - -SELECT b::macaddr >= '08:00:2b:01:02:04' FROM macaddr8_data WHERE a = 1; -- false - ?column? ----------- - f -(1 row) - -SELECT b = '08:00:2b:ff:fe:01:02:03' FROM macaddr8_data WHERE a = 1; -- true - ?column? ----------- - t -(1 row) - -SELECT b::macaddr <> '08:00:2b:01:02:04'::macaddr FROM macaddr8_data WHERE a = 1; -- true - ?column? ----------- - t -(1 row) - -SELECT b::macaddr <> '08:00:2b:01:02:03'::macaddr FROM macaddr8_data WHERE a = 1; -- false - ?column? ----------- - f -(1 row) - -SELECT b < '08:00:2b:01:02:03:04:06' FROM macaddr8_data WHERE a = 15; -- true - ?column? ----------- - t -(1 row) - -SELECT b > '08:00:2b:01:02:03:04:06' FROM macaddr8_data WHERE a = 15; -- false - ?column? ----------- - f -(1 row) - -SELECT b > '08:00:2b:01:02:03:04:05' FROM macaddr8_data WHERE a = 15; -- false - ?column? ----------- - f -(1 row) - -SELECT b <= '08:00:2b:01:02:03:04:06' FROM macaddr8_data WHERE a = 15; -- true - ?column? ----------- - t -(1 row) - -SELECT b >= '08:00:2b:01:02:03:04:06' FROM macaddr8_data WHERE a = 15; -- false - ?column? ----------- - f -(1 row) - -SELECT b = '08:00:2b:01:02:03:04:05' FROM macaddr8_data WHERE a = 15; -- true - ?column? ----------- - t -(1 row) - -SELECT b <> '08:00:2b:01:02:03:04:06' FROM macaddr8_data WHERE a = 15; -- true - ?column? ----------- - t -(1 row) - -SELECT b <> '08:00:2b:01:02:03:04:05' FROM macaddr8_data WHERE a = 15; -- false - ?column? ----------- - f -(1 row) - -SELECT ~b FROM macaddr8_data; - ?column? -------------------------- - f7:ff:d4:00:01:fe:fd:fc - f7:ff:d4:00:01:fe:fd:fc - f7:ff:d4:00:01:fe:fd:fc - f7:ff:d4:00:01:fe:fd:fc - f7:ff:d4:00:01:fe:fd:fc - f7:ff:d4:00:01:fe:fd:fc - f7:ff:d4:00:01:fe:fd:fc - f7:ff:d4:00:01:fe:fd:fc - f7:ff:d4:00:01:fe:fd:fb - f7:ff:d4:00:01:fe:fd:fd - f7:ff:d5:00:01:fe:fd:fc - f7:ff:d3:00:01:fe:fd:fc - f7:ff:d5:00:01:fe:fd:fb - f7:ff:d4:fe:fd:fc:fb:fa - f7:ff:d4:fe:fd:fc:fb:fa - f7:ff:d4:fe:fd:fc:fb:fa - f7:ff:d4:fe:fd:fc:fb:fa - f7:ff:d4:fe:fd:fc:fb:fa - f7:ff:d4:fe:fd:fc:fb:fa - f7:ff:d4:fe:fd:fc:fb:fa -(20 rows) - -SELECT b & '00:00:00:ff:ff:ff' FROM macaddr8_data; - ?column? -------------------------- - 00:00:00:ff:fe:01:02:03 - 00:00:00:ff:fe:01:02:03 - 00:00:00:ff:fe:01:02:03 - 00:00:00:ff:fe:01:02:03 - 00:00:00:ff:fe:01:02:03 - 00:00:00:ff:fe:01:02:03 - 00:00:00:ff:fe:01:02:03 - 00:00:00:ff:fe:01:02:03 - 00:00:00:ff:fe:01:02:04 - 00:00:00:ff:fe:01:02:02 - 00:00:00:ff:fe:01:02:03 - 00:00:00:ff:fe:01:02:03 - 00:00:00:ff:fe:01:02:04 - 00:00:00:01:02:03:04:05 - 00:00:00:01:02:03:04:05 - 00:00:00:01:02:03:04:05 - 00:00:00:01:02:03:04:05 - 00:00:00:01:02:03:04:05 - 00:00:00:01:02:03:04:05 - 00:00:00:01:02:03:04:05 -(20 rows) - -SELECT b | '01:02:03:04:05:06' FROM macaddr8_data; - ?column? -------------------------- - 09:02:2b:ff:fe:05:07:07 - 09:02:2b:ff:fe:05:07:07 - 09:02:2b:ff:fe:05:07:07 - 09:02:2b:ff:fe:05:07:07 - 09:02:2b:ff:fe:05:07:07 - 09:02:2b:ff:fe:05:07:07 - 09:02:2b:ff:fe:05:07:07 - 09:02:2b:ff:fe:05:07:07 - 09:02:2b:ff:fe:05:07:06 - 09:02:2b:ff:fe:05:07:06 - 09:02:2b:ff:fe:05:07:07 - 09:02:2f:ff:fe:05:07:07 - 09:02:2b:ff:fe:05:07:06 - 09:02:2b:ff:fe:07:05:07 - 09:02:2b:ff:fe:07:05:07 - 09:02:2b:ff:fe:07:05:07 - 09:02:2b:ff:fe:07:05:07 - 09:02:2b:ff:fe:07:05:07 - 09:02:2b:ff:fe:07:05:07 - 09:02:2b:ff:fe:07:05:07 -(20 rows) - -DROP TABLE macaddr8_data; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/multirangetypes.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/multirangetypes.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/multirangetypes.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/multirangetypes.out 2023-02-20 19:44:17.209207219 -0500 @@ -1,3232 +1 @@ --- Tests for multirange data types. --- --- test input parser --- --- negative tests; should fail -select ''::textmultirange; -ERROR: malformed multirange literal: "" -LINE 1: select ''::textmultirange; - ^ -DETAIL: Missing left brace. -select '{,}'::textmultirange; -ERROR: malformed multirange literal: "{,}" -LINE 1: select '{,}'::textmultirange; - ^ -DETAIL: Expected range start. -select '{(,)}.'::textmultirange; -ERROR: malformed multirange literal: "{(,)}." -LINE 1: select '{(,)}.'::textmultirange; - ^ -DETAIL: Junk after closing right brace. -select '{[a,c),}'::textmultirange; -ERROR: malformed multirange literal: "{[a,c),}" -LINE 1: select '{[a,c),}'::textmultirange; - ^ -DETAIL: Expected range start. -select '{,[a,c)}'::textmultirange; -ERROR: malformed multirange literal: "{,[a,c)}" -LINE 1: select '{,[a,c)}'::textmultirange; - ^ -DETAIL: Expected range start. -select '{-[a,z)}'::textmultirange; -ERROR: malformed multirange literal: "{-[a,z)}" -LINE 1: select '{-[a,z)}'::textmultirange; - ^ -DETAIL: Expected range start. -select '{[a,z) - }'::textmultirange; -ERROR: malformed multirange literal: "{[a,z) - }" -LINE 1: select '{[a,z) - }'::textmultirange; - ^ -DETAIL: Expected comma or end of multirange. -select '{(",a)}'::textmultirange; -ERROR: malformed multirange literal: "{(",a)}" -LINE 1: select '{(",a)}'::textmultirange; - ^ -DETAIL: Unexpected end of input. -select '{(,,a)}'::textmultirange; -ERROR: malformed range literal: "(,,a)" -LINE 1: select '{(,,a)}'::textmultirange; - ^ -DETAIL: Too many commas. -select '{(),a)}'::textmultirange; -ERROR: malformed range literal: "()" -LINE 1: select '{(),a)}'::textmultirange; - ^ -DETAIL: Missing comma after lower bound. -select '{(a,))}'::textmultirange; -ERROR: malformed multirange literal: "{(a,))}" -LINE 1: select '{(a,))}'::textmultirange; - ^ -DETAIL: Expected comma or end of multirange. -select '{(],a)}'::textmultirange; -ERROR: malformed range literal: "(]" -LINE 1: select '{(],a)}'::textmultirange; - ^ -DETAIL: Missing comma after lower bound. -select '{(a,])}'::textmultirange; -ERROR: malformed multirange literal: "{(a,])}" -LINE 1: select '{(a,])}'::textmultirange; - ^ -DETAIL: Expected comma or end of multirange. -select '{[z,a]}'::textmultirange; -ERROR: range lower bound must be less than or equal to range upper bound -LINE 1: select '{[z,a]}'::textmultirange; - ^ --- should succeed -select '{}'::textmultirange; - textmultirange ----------------- - {} -(1 row) - -select ' {} '::textmultirange; - textmultirange ----------------- - {} -(1 row) - -select ' { empty, empty } '::textmultirange; - textmultirange ----------------- - {} -(1 row) - -select ' {( " a " " a ", " z " " z " ) }'::textmultirange; - textmultirange ----------------------------- - {(" a a "," z z ")} -(1 row) - -select textrange('\\\\', repeat('a', 200))::textmultirange; - textrange -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - {["\\\\\\\\",aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)} -(1 row) - -select '{(,z)}'::textmultirange; - textmultirange ----------------- - {(,z)} -(1 row) - -select '{(a,)}'::textmultirange; - textmultirange ----------------- - {(a,)} -(1 row) - -select '{[,z]}'::textmultirange; - textmultirange ----------------- - {(,z]} -(1 row) - -select '{[a,]}'::textmultirange; - textmultirange ----------------- - {[a,)} -(1 row) - -select '{(,)}'::textmultirange; - textmultirange ----------------- - {(,)} -(1 row) - -select '{[ , ]}'::textmultirange; - textmultirange ----------------- - {[" "," "]} -(1 row) - -select '{["",""]}'::textmultirange; - textmultirange ----------------- - {["",""]} -(1 row) - -select '{[",",","]}'::textmultirange; - textmultirange ----------------- - {[",",","]} -(1 row) - -select '{["\\","\\"]}'::textmultirange; - textmultirange ----------------- - {["\\","\\"]} -(1 row) - -select '{["""","\""]}'::textmultirange; - textmultirange ----------------- - {["""",""""]} -(1 row) - -select '{(\\,a)}'::textmultirange; - textmultirange ----------------- - {("\\",a)} -(1 row) - -select '{((,z)}'::textmultirange; - textmultirange ----------------- - {("(",z)} -(1 row) - -select '{([,z)}'::textmultirange; - textmultirange ----------------- - {("[",z)} -(1 row) - -select '{(!,()}'::textmultirange; - textmultirange ----------------- - {(!,"(")} -(1 row) - -select '{(!,[)}'::textmultirange; - textmultirange ----------------- - {(!,"[")} -(1 row) - -select '{[a,a]}'::textmultirange; - textmultirange ----------------- - {[a,a]} -(1 row) - -select '{[a,a],[a,b]}'::textmultirange; - textmultirange ----------------- - {[a,b]} -(1 row) - -select '{[a,b), [b,e]}'::textmultirange; - textmultirange ----------------- - {[a,e]} -(1 row) - -select '{[a,d), [b,f]}'::textmultirange; - textmultirange ----------------- - {[a,f]} -(1 row) - -select '{[a,a],[b,b]}'::textmultirange; - textmultirange ----------------- - {[a,a],[b,b]} -(1 row) - --- without canonicalization, we can't join these: -select '{[a,a], [b,b]}'::textmultirange; - textmultirange ----------------- - {[a,a],[b,b]} -(1 row) - --- with canonicalization, we can join these: -select '{[1,2], [3,4]}'::int4multirange; - int4multirange ----------------- - {[1,5)} -(1 row) - -select '{[a,a], [b,b], [c,c]}'::textmultirange; - textmultirange ---------------------- - {[a,a],[b,b],[c,c]} -(1 row) - -select '{[a,d], [b,e]}'::textmultirange; - textmultirange ----------------- - {[a,e]} -(1 row) - -select '{[a,d), [d,e)}'::textmultirange; - textmultirange ----------------- - {[a,e)} -(1 row) - --- these are allowed but normalize to empty: -select '{[a,a)}'::textmultirange; - textmultirange ----------------- - {} -(1 row) - -select '{(a,a]}'::textmultirange; - textmultirange ----------------- - {} -(1 row) - -select '{(a,a)}'::textmultirange; - textmultirange ----------------- - {} -(1 row) - --- --- test the constructor ---- -select textmultirange(); - textmultirange ----------------- - {} -(1 row) - -select textmultirange(textrange('a', 'c')); - textmultirange ----------------- - {[a,c)} -(1 row) - -select textmultirange(textrange('a', 'c'), textrange('f', 'g')); - textmultirange ----------------- - {[a,c),[f,g)} -(1 row) - -select textmultirange(textrange('\\\\', repeat('a', 200)), textrange('c', 'd')); - textmultirange -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - {["\\\\\\\\",aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa),[c,d)} -(1 row) - --- --- test casts, both a built-in range type and a user-defined one: --- -select 'empty'::int4range::int4multirange; - int4multirange ----------------- - {} -(1 row) - -select int4range(1, 3)::int4multirange; - int4range ------------ - {[1,3)} -(1 row) - -select int4range(1, null)::int4multirange; - int4range ------------ - {[1,)} -(1 row) - -select int4range(null, null)::int4multirange; - int4range ------------ - {(,)} -(1 row) - -select 'empty'::textrange::textmultirange; - textmultirange ----------------- - {} -(1 row) - -select textrange('a', 'c')::textmultirange; - textrange ------------ - {[a,c)} -(1 row) - -select textrange('a', null)::textmultirange; - textrange ------------ - {[a,)} -(1 row) - -select textrange(null, null)::textmultirange; - textrange ------------ - {(,)} -(1 row) - --- --- test unnest(multirange) function --- -select unnest(int4multirange(int4range('5', '6'), int4range('1', '2'))); - unnest --------- - [1,2) - [5,6) -(2 rows) - -select unnest(textmultirange(textrange('a', 'b'), textrange('d', 'e'))); - unnest --------- - [a,b) - [d,e) -(2 rows) - -select unnest(textmultirange(textrange('\\\\', repeat('a', 200)), textrange('c', 'd'))); - unnest ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - ["\\\\\\\\",aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) - [c,d) -(2 rows) - --- --- create some test data and test the operators --- -CREATE TABLE nummultirange_test (nmr NUMMULTIRANGE); -CREATE INDEX nummultirange_test_btree ON nummultirange_test(nmr); -INSERT INTO nummultirange_test VALUES('{}'); -INSERT INTO nummultirange_test VALUES('{[,)}'); -INSERT INTO nummultirange_test VALUES('{[3,]}'); -INSERT INTO nummultirange_test VALUES('{[,), [3,]}'); -INSERT INTO nummultirange_test VALUES('{[, 5)}'); -INSERT INTO nummultirange_test VALUES(nummultirange()); -INSERT INTO nummultirange_test VALUES(nummultirange(variadic '{}'::numrange[])); -INSERT INTO nummultirange_test VALUES(nummultirange(numrange(1.1, 2.2))); -INSERT INTO nummultirange_test VALUES('{empty}'); -INSERT INTO nummultirange_test VALUES(nummultirange(numrange(1.7, 1.7, '[]'), numrange(1.7, 1.9))); -INSERT INTO nummultirange_test VALUES(nummultirange(numrange(1.7, 1.7, '[]'), numrange(1.9, 2.1))); -SELECT nmr, isempty(nmr), lower(nmr), upper(nmr) FROM nummultirange_test ORDER BY nmr; - nmr | isempty | lower | upper ------------------------+---------+-------+------- - {} | t | | - {} | t | | - {} | t | | - {} | t | | - {(,5)} | f | | 5 - {(,)} | f | | - {(,)} | f | | - {[1.1,2.2)} | f | 1.1 | 2.2 - {[1.7,1.7],[1.9,2.1)} | f | 1.7 | 2.1 - {[1.7,1.9)} | f | 1.7 | 1.9 - {[3,)} | f | 3 | -(11 rows) - -SELECT nmr, lower_inc(nmr), lower_inf(nmr), upper_inc(nmr), upper_inf(nmr) FROM nummultirange_test ORDER BY nmr; - nmr | lower_inc | lower_inf | upper_inc | upper_inf ------------------------+-----------+-----------+-----------+----------- - {} | f | f | f | f - {} | f | f | f | f - {} | f | f | f | f - {} | f | f | f | f - {(,5)} | f | t | f | f - {(,)} | f | t | f | t - {(,)} | f | t | f | t - {[1.1,2.2)} | t | f | f | f - {[1.7,1.7],[1.9,2.1)} | t | f | f | f - {[1.7,1.9)} | t | f | f | f - {[3,)} | t | f | f | t -(11 rows) - -SELECT * FROM nummultirange_test WHERE nmr = '{}'; - nmr ------ - {} - {} - {} - {} -(4 rows) - -SELECT * FROM nummultirange_test WHERE nmr = '{(,5)}'; - nmr --------- - {(,5)} -(1 row) - -SELECT * FROM nummultirange_test WHERE nmr = '{[3,)}'; - nmr --------- - {[3,)} -(1 row) - -SELECT * FROM nummultirange_test WHERE nmr = '{[1.7,1.7]}'; - nmr ------ -(0 rows) - -SELECT * FROM nummultirange_test WHERE nmr = '{[1.7,1.7],[1.9,2.1)}'; - nmr ------------------------ - {[1.7,1.7],[1.9,2.1)} -(1 row) - -SELECT * FROM nummultirange_test WHERE nmr < '{}'; - nmr ------ -(0 rows) - -SELECT * FROM nummultirange_test WHERE nmr < '{[-1000.0, -1000.0]}'; - nmr --------- - {} - {(,)} - {(,)} - {(,5)} - {} - {} - {} -(7 rows) - -SELECT * FROM nummultirange_test WHERE nmr < '{[0.0, 1.0]}'; - nmr --------- - {} - {(,)} - {(,)} - {(,5)} - {} - {} - {} -(7 rows) - -SELECT * FROM nummultirange_test WHERE nmr < '{[1000.0, 1001.0]}'; - nmr ------------------------ - {} - {(,)} - {[3,)} - {(,)} - {(,5)} - {} - {} - {[1.1,2.2)} - {} - {[1.7,1.9)} - {[1.7,1.7],[1.9,2.1)} -(11 rows) - -SELECT * FROM nummultirange_test WHERE nmr <= '{}'; - nmr ------ - {} - {} - {} - {} -(4 rows) - -SELECT * FROM nummultirange_test WHERE nmr <= '{[3,)}'; - nmr ------------------------ - {} - {(,)} - {[3,)} - {(,)} - {(,5)} - {} - {} - {[1.1,2.2)} - {} - {[1.7,1.9)} - {[1.7,1.7],[1.9,2.1)} -(11 rows) - -SELECT * FROM nummultirange_test WHERE nmr >= '{}'; - nmr ------------------------ - {} - {(,)} - {[3,)} - {(,)} - {(,5)} - {} - {} - {[1.1,2.2)} - {} - {[1.7,1.9)} - {[1.7,1.7],[1.9,2.1)} -(11 rows) - -SELECT * FROM nummultirange_test WHERE nmr >= '{[3,)}'; - nmr --------- - {[3,)} -(1 row) - -SELECT * FROM nummultirange_test WHERE nmr > '{}'; - nmr ------------------------ - {(,)} - {[3,)} - {(,)} - {(,5)} - {[1.1,2.2)} - {[1.7,1.9)} - {[1.7,1.7],[1.9,2.1)} -(7 rows) - -SELECT * FROM nummultirange_test WHERE nmr > '{[-1000.0, -1000.0]}'; - nmr ------------------------ - {[3,)} - {[1.1,2.2)} - {[1.7,1.9)} - {[1.7,1.7],[1.9,2.1)} -(4 rows) - -SELECT * FROM nummultirange_test WHERE nmr > '{[0.0, 1.0]}'; - nmr ------------------------ - {[3,)} - {[1.1,2.2)} - {[1.7,1.9)} - {[1.7,1.7],[1.9,2.1)} -(4 rows) - -SELECT * FROM nummultirange_test WHERE nmr > '{[1000.0, 1001.0]}'; - nmr ------ -(0 rows) - -SELECT * FROM nummultirange_test WHERE nmr <> '{}'; - nmr ------------------------ - {(,)} - {[3,)} - {(,)} - {(,5)} - {[1.1,2.2)} - {[1.7,1.9)} - {[1.7,1.7],[1.9,2.1)} -(7 rows) - -SELECT * FROM nummultirange_test WHERE nmr <> '{(,5)}'; - nmr ------------------------ - {} - {(,)} - {[3,)} - {(,)} - {} - {} - {[1.1,2.2)} - {} - {[1.7,1.9)} - {[1.7,1.7],[1.9,2.1)} -(10 rows) - -select nummultirange(numrange(2.0, 1.0)); -ERROR: range lower bound must be less than or equal to range upper bound -select nummultirange(numrange(5.0, 6.0), numrange(1.0, 2.0)); - nummultirange ------------------------ - {[1.0,2.0),[5.0,6.0)} -(1 row) - -analyze nummultirange_test; --- overlaps -SELECT * FROM nummultirange_test WHERE range_overlaps_multirange(numrange(4.0, 4.2), nmr); - nmr --------- - {(,)} - {[3,)} - {(,)} - {(,5)} -(4 rows) - -SELECT * FROM nummultirange_test WHERE numrange(4.0, 4.2) && nmr; - nmr --------- - {(,)} - {[3,)} - {(,)} - {(,5)} -(4 rows) - -SELECT * FROM nummultirange_test WHERE multirange_overlaps_range(nmr, numrange(4.0, 4.2)); - nmr --------- - {(,)} - {[3,)} - {(,)} - {(,5)} -(4 rows) - -SELECT * FROM nummultirange_test WHERE nmr && numrange(4.0, 4.2); - nmr --------- - {(,)} - {[3,)} - {(,)} - {(,5)} -(4 rows) - -SELECT * FROM nummultirange_test WHERE multirange_overlaps_multirange(nmr, nummultirange(numrange(4.0, 4.2), numrange(6.0, 7.0))); - nmr --------- - {(,)} - {[3,)} - {(,)} - {(,5)} -(4 rows) - -SELECT * FROM nummultirange_test WHERE nmr && nummultirange(numrange(4.0, 4.2), numrange(6.0, 7.0)); - nmr --------- - {(,)} - {[3,)} - {(,)} - {(,5)} -(4 rows) - -SELECT * FROM nummultirange_test WHERE nmr && nummultirange(numrange(6.0, 7.0)); - nmr --------- - {(,)} - {[3,)} - {(,)} -(3 rows) - -SELECT * FROM nummultirange_test WHERE nmr && nummultirange(numrange(6.0, 7.0), numrange(8.0, 9.0)); - nmr --------- - {(,)} - {[3,)} - {(,)} -(3 rows) - --- mr contains x -SELECT * FROM nummultirange_test WHERE multirange_contains_elem(nmr, 4.0); - nmr --------- - {(,)} - {[3,)} - {(,)} - {(,5)} -(4 rows) - -SELECT * FROM nummultirange_test WHERE nmr @> 4.0; - nmr --------- - {(,)} - {[3,)} - {(,)} - {(,5)} -(4 rows) - -SELECT * FROM nummultirange_test WHERE multirange_contains_range(nmr, numrange(4.0, 4.2)); - nmr --------- - {(,)} - {[3,)} - {(,)} - {(,5)} -(4 rows) - -SELECT * FROM nummultirange_test WHERE nmr @> numrange(4.0, 4.2); - nmr --------- - {(,)} - {[3,)} - {(,)} - {(,5)} -(4 rows) - -SELECT * FROM nummultirange_test WHERE multirange_contains_multirange(nmr, '{[4.0,4.2), [6.0, 8.0)}'); - nmr --------- - {(,)} - {[3,)} - {(,)} -(3 rows) - -SELECT * FROM nummultirange_test WHERE nmr @> '{[4.0,4.2), [6.0, 8.0)}'::nummultirange; - nmr --------- - {(,)} - {[3,)} - {(,)} -(3 rows) - --- x is contained by mr -SELECT * FROM nummultirange_test WHERE elem_contained_by_multirange(4.0, nmr); - nmr --------- - {(,)} - {[3,)} - {(,)} - {(,5)} -(4 rows) - -SELECT * FROM nummultirange_test WHERE 4.0 <@ nmr; - nmr --------- - {(,)} - {[3,)} - {(,)} - {(,5)} -(4 rows) - -SELECT * FROM nummultirange_test WHERE range_contained_by_multirange(numrange(4.0, 4.2), nmr); - nmr --------- - {(,)} - {[3,)} - {(,)} - {(,5)} -(4 rows) - -SELECT * FROM nummultirange_test WHERE numrange(4.0, 4.2) <@ nmr; - nmr --------- - {(,)} - {[3,)} - {(,)} - {(,5)} -(4 rows) - -SELECT * FROM nummultirange_test WHERE multirange_contained_by_multirange('{[4.0,4.2), [6.0, 8.0)}', nmr); - nmr --------- - {(,)} - {[3,)} - {(,)} -(3 rows) - -SELECT * FROM nummultirange_test WHERE '{[4.0,4.2), [6.0, 8.0)}'::nummultirange <@ nmr; - nmr --------- - {(,)} - {[3,)} - {(,)} -(3 rows) - --- overlaps -SELECT 'empty'::numrange && nummultirange(); - ?column? ----------- - f -(1 row) - -SELECT 'empty'::numrange && nummultirange(numrange(1,2)); - ?column? ----------- - f -(1 row) - -SELECT nummultirange() && 'empty'::numrange; - ?column? ----------- - f -(1 row) - -SELECT nummultirange(numrange(1,2)) && 'empty'::numrange; - ?column? ----------- - f -(1 row) - -SELECT nummultirange() && nummultirange(); - ?column? ----------- - f -(1 row) - -SELECT nummultirange() && nummultirange(numrange(1,2)); - ?column? ----------- - f -(1 row) - -SELECT nummultirange(numrange(1,2)) && nummultirange(); - ?column? ----------- - f -(1 row) - -SELECT nummultirange(numrange(3,4)) && nummultirange(numrange(1,2), numrange(7,8)); - ?column? ----------- - f -(1 row) - -SELECT nummultirange(numrange(1,2), numrange(7,8)) && nummultirange(numrange(3,4)); - ?column? ----------- - f -(1 row) - -SELECT nummultirange(numrange(3,4)) && nummultirange(numrange(1,2), numrange(3.5,8)); - ?column? ----------- - t -(1 row) - -SELECT nummultirange(numrange(1,2), numrange(3.5,8)) && numrange(3,4); - ?column? ----------- - t -(1 row) - -SELECT nummultirange(numrange(1,2), numrange(3.5,8)) && nummultirange(numrange(3,4)); - ?column? ----------- - t -(1 row) - -select '{(10,20),(30,40),(50,60)}'::nummultirange && '(42,92)'::numrange; - ?column? ----------- - t -(1 row) - --- contains -SELECT nummultirange() @> nummultirange(); - ?column? ----------- - t -(1 row) - -SELECT nummultirange() @> 'empty'::numrange; - ?column? ----------- - t -(1 row) - -SELECT nummultirange(numrange(null,null)) @> numrange(1,2); - ?column? ----------- - t -(1 row) - -SELECT nummultirange(numrange(null,null)) @> numrange(null,2); - ?column? ----------- - t -(1 row) - -SELECT nummultirange(numrange(null,null)) @> numrange(2,null); - ?column? ----------- - t -(1 row) - -SELECT nummultirange(numrange(null,5)) @> numrange(null,3); - ?column? ----------- - t -(1 row) - -SELECT nummultirange(numrange(null,5)) @> numrange(null,8); - ?column? ----------- - f -(1 row) - -SELECT nummultirange(numrange(5,null)) @> numrange(8,null); - ?column? ----------- - t -(1 row) - -SELECT nummultirange(numrange(5,null)) @> numrange(3,null); - ?column? ----------- - f -(1 row) - -SELECT nummultirange(numrange(1,5)) @> numrange(8,9); - ?column? ----------- - f -(1 row) - -SELECT nummultirange(numrange(1,5)) @> numrange(3,9); - ?column? ----------- - f -(1 row) - -SELECT nummultirange(numrange(1,5)) @> numrange(1,4); - ?column? ----------- - t -(1 row) - -SELECT nummultirange(numrange(1,5)) @> numrange(1,5); - ?column? ----------- - t -(1 row) - -SELECT nummultirange(numrange(-4,-2), numrange(1,5)) @> numrange(1,5); - ?column? ----------- - t -(1 row) - -SELECT nummultirange(numrange(1,5), numrange(8,9)) @> numrange(1,5); - ?column? ----------- - t -(1 row) - -SELECT nummultirange(numrange(1,5), numrange(8,9)) @> numrange(6,7); - ?column? ----------- - f -(1 row) - -SELECT nummultirange(numrange(1,5), numrange(6,9)) @> numrange(6,7); - ?column? ----------- - t -(1 row) - -SELECT '{[1,5)}'::nummultirange @> '{[1,5)}'; - ?column? ----------- - t -(1 row) - -SELECT '{[-4,-2), [1,5)}'::nummultirange @> '{[1,5)}'; - ?column? ----------- - t -(1 row) - -SELECT '{[1,5), [8,9)}'::nummultirange @> '{[1,5)}'; - ?column? ----------- - t -(1 row) - -SELECT '{[1,5), [8,9)}'::nummultirange @> '{[6,7)}'; - ?column? ----------- - f -(1 row) - -SELECT '{[1,5), [6,9)}'::nummultirange @> '{[6,7)}'; - ?column? ----------- - t -(1 row) - -select '{(10,20),(30,40),(50,60)}'::nummultirange @> '(52,56)'::numrange; - ?column? ----------- - t -(1 row) - -SELECT numrange(null,null) @> nummultirange(numrange(1,2)); - ?column? ----------- - t -(1 row) - -SELECT numrange(null,null) @> nummultirange(numrange(null,2)); - ?column? ----------- - t -(1 row) - -SELECT numrange(null,null) @> nummultirange(numrange(2,null)); - ?column? ----------- - t -(1 row) - -SELECT numrange(null,5) @> nummultirange(numrange(null,3)); - ?column? ----------- - t -(1 row) - -SELECT numrange(null,5) @> nummultirange(numrange(null,8)); - ?column? ----------- - f -(1 row) - -SELECT numrange(5,null) @> nummultirange(numrange(8,null)); - ?column? ----------- - t -(1 row) - -SELECT numrange(5,null) @> nummultirange(numrange(3,null)); - ?column? ----------- - f -(1 row) - -SELECT numrange(1,5) @> nummultirange(numrange(8,9)); - ?column? ----------- - f -(1 row) - -SELECT numrange(1,5) @> nummultirange(numrange(3,9)); - ?column? ----------- - f -(1 row) - -SELECT numrange(1,5) @> nummultirange(numrange(1,4)); - ?column? ----------- - t -(1 row) - -SELECT numrange(1,5) @> nummultirange(numrange(1,5)); - ?column? ----------- - t -(1 row) - -SELECT numrange(1,9) @> nummultirange(numrange(-4,-2), numrange(1,5)); - ?column? ----------- - f -(1 row) - -SELECT numrange(1,9) @> nummultirange(numrange(1,5), numrange(8,9)); - ?column? ----------- - t -(1 row) - -SELECT numrange(1,9) @> nummultirange(numrange(1,5), numrange(6,9)); - ?column? ----------- - t -(1 row) - -SELECT numrange(1,9) @> nummultirange(numrange(1,5), numrange(6,10)); - ?column? ----------- - f -(1 row) - -SELECT '{[1,9)}' @> '{[1,5)}'::nummultirange; - ?column? ----------- - t -(1 row) - -SELECT '{[1,9)}' @> '{[-4,-2), [1,5)}'::nummultirange; - ?column? ----------- - f -(1 row) - -SELECT '{[1,9)}' @> '{[1,5), [8,9)}'::nummultirange; - ?column? ----------- - t -(1 row) - -SELECT '{[1,9)}' @> '{[1,5), [6,9)}'::nummultirange; - ?column? ----------- - t -(1 row) - -SELECT '{[1,9)}' @> '{[1,5), [6,10)}'::nummultirange; - ?column? ----------- - f -(1 row) - --- is contained by -SELECT nummultirange() <@ nummultirange(); - ?column? ----------- - t -(1 row) - -SELECT 'empty'::numrange <@ nummultirange(); - ?column? ----------- - t -(1 row) - -SELECT numrange(1,2) <@ nummultirange(numrange(null,null)); - ?column? ----------- - t -(1 row) - -SELECT numrange(null,2) <@ nummultirange(numrange(null,null)); - ?column? ----------- - t -(1 row) - -SELECT numrange(2,null) <@ nummultirange(numrange(null,null)); - ?column? ----------- - t -(1 row) - -SELECT numrange(null,3) <@ nummultirange(numrange(null,5)); - ?column? ----------- - t -(1 row) - -SELECT numrange(null,8) <@ nummultirange(numrange(null,5)); - ?column? ----------- - f -(1 row) - -SELECT numrange(8,null) <@ nummultirange(numrange(5,null)); - ?column? ----------- - t -(1 row) - -SELECT numrange(3,null) <@ nummultirange(numrange(5,null)); - ?column? ----------- - f -(1 row) - -SELECT numrange(8,9) <@ nummultirange(numrange(1,5)); - ?column? ----------- - f -(1 row) - -SELECT numrange(3,9) <@ nummultirange(numrange(1,5)); - ?column? ----------- - f -(1 row) - -SELECT numrange(1,4) <@ nummultirange(numrange(1,5)); - ?column? ----------- - t -(1 row) - -SELECT numrange(1,5) <@ nummultirange(numrange(1,5)); - ?column? ----------- - t -(1 row) - -SELECT numrange(1,5) <@ nummultirange(numrange(-4,-2), numrange(1,5)); - ?column? ----------- - t -(1 row) - -SELECT numrange(1,5) <@ nummultirange(numrange(1,5), numrange(8,9)); - ?column? ----------- - t -(1 row) - -SELECT numrange(6,7) <@ nummultirange(numrange(1,5), numrange(8,9)); - ?column? ----------- - f -(1 row) - -SELECT numrange(6,7) <@ nummultirange(numrange(1,5), numrange(6,9)); - ?column? ----------- - t -(1 row) - -SELECT '{[1,5)}' <@ '{[1,5)}'::nummultirange; - ?column? ----------- - t -(1 row) - -SELECT '{[1,5)}' <@ '{[-4,-2), [1,5)}'::nummultirange; - ?column? ----------- - t -(1 row) - -SELECT '{[1,5)}' <@ '{[1,5), [8,9)}'::nummultirange; - ?column? ----------- - t -(1 row) - -SELECT '{[6,7)}' <@ '{[1,5), [8,9)}'::nummultirange; - ?column? ----------- - f -(1 row) - -SELECT '{[6,7)}' <@ '{[1,5), [6,9)}'::nummultirange; - ?column? ----------- - t -(1 row) - -SELECT nummultirange(numrange(1,2)) <@ numrange(null,null); - ?column? ----------- - t -(1 row) - -SELECT nummultirange(numrange(null,2)) <@ numrange(null,null); - ?column? ----------- - t -(1 row) - -SELECT nummultirange(numrange(2,null)) <@ numrange(null,null); - ?column? ----------- - t -(1 row) - -SELECT nummultirange(numrange(null,3)) <@ numrange(null,5); - ?column? ----------- - t -(1 row) - -SELECT nummultirange(numrange(null,8)) <@ numrange(null,5); - ?column? ----------- - f -(1 row) - -SELECT nummultirange(numrange(8,null)) <@ numrange(5,null); - ?column? ----------- - t -(1 row) - -SELECT nummultirange(numrange(3,null)) <@ numrange(5,null); - ?column? ----------- - f -(1 row) - -SELECT nummultirange(numrange(8,9)) <@ numrange(1,5); - ?column? ----------- - f -(1 row) - -SELECT nummultirange(numrange(3,9)) <@ numrange(1,5); - ?column? ----------- - f -(1 row) - -SELECT nummultirange(numrange(1,4)) <@ numrange(1,5); - ?column? ----------- - t -(1 row) - -SELECT nummultirange(numrange(1,5)) <@ numrange(1,5); - ?column? ----------- - t -(1 row) - -SELECT nummultirange(numrange(-4,-2), numrange(1,5)) <@ numrange(1,9); - ?column? ----------- - f -(1 row) - -SELECT nummultirange(numrange(1,5), numrange(8,9)) <@ numrange(1,9); - ?column? ----------- - t -(1 row) - -SELECT nummultirange(numrange(1,5), numrange(6,9)) <@ numrange(1,9); - ?column? ----------- - t -(1 row) - -SELECT nummultirange(numrange(1,5), numrange(6,10)) <@ numrange(1,9); - ?column? ----------- - f -(1 row) - -SELECT '{[1,5)}'::nummultirange <@ '{[1,9)}'; - ?column? ----------- - t -(1 row) - -SELECT '{[-4,-2), [1,5)}'::nummultirange <@ '{[1,9)}'; - ?column? ----------- - f -(1 row) - -SELECT '{[1,5), [8,9)}'::nummultirange <@ '{[1,9)}'; - ?column? ----------- - t -(1 row) - -SELECT '{[1,5), [6,9)}'::nummultirange <@ '{[1,9)}'; - ?column? ----------- - t -(1 row) - -SELECT '{[1,5), [6,10)}'::nummultirange <@ '{[1,9)}'; - ?column? ----------- - f -(1 row) - --- overleft -SELECT 'empty'::numrange &< nummultirange(); - ?column? ----------- - f -(1 row) - -SELECT 'empty'::numrange &< nummultirange(numrange(1,2)); - ?column? ----------- - f -(1 row) - -SELECT nummultirange() &< 'empty'::numrange; - ?column? ----------- - f -(1 row) - -SELECT nummultirange(numrange(1,2)) &< 'empty'::numrange; - ?column? ----------- - f -(1 row) - -SELECT nummultirange() &< nummultirange(); - ?column? ----------- - f -(1 row) - -SELECT nummultirange(numrange(1,2)) &< nummultirange(); - ?column? ----------- - f -(1 row) - -SELECT nummultirange() &< nummultirange(numrange(1,2)); - ?column? ----------- - f -(1 row) - -SELECT numrange(6,7) &< nummultirange(numrange(3,4)); - ?column? ----------- - f -(1 row) - -SELECT numrange(1,2) &< nummultirange(numrange(3,4)); - ?column? ----------- - t -(1 row) - -SELECT numrange(1,4) &< nummultirange(numrange(3,4)); - ?column? ----------- - t -(1 row) - -SELECT numrange(1,6) &< nummultirange(numrange(3,4)); - ?column? ----------- - f -(1 row) - -SELECT numrange(3.5,6) &< nummultirange(numrange(3,4)); - ?column? ----------- - f -(1 row) - -SELECT nummultirange(numrange(6,7)) &< numrange(3,4); - ?column? ----------- - f -(1 row) - -SELECT nummultirange(numrange(1,2)) &< numrange(3,4); - ?column? ----------- - t -(1 row) - -SELECT nummultirange(numrange(1,4)) &< numrange(3,4); - ?column? ----------- - t -(1 row) - -SELECT nummultirange(numrange(1,6)) &< numrange(3,4); - ?column? ----------- - f -(1 row) - -SELECT nummultirange(numrange(3.5,6)) &< numrange(3,4); - ?column? ----------- - f -(1 row) - -SELECT nummultirange(numrange(6,7)) &< nummultirange(numrange(3,4)); - ?column? ----------- - f -(1 row) - -SELECT nummultirange(numrange(1,2)) &< nummultirange(numrange(3,4)); - ?column? ----------- - t -(1 row) - -SELECT nummultirange(numrange(1,4)) &< nummultirange(numrange(3,4)); - ?column? ----------- - t -(1 row) - -SELECT nummultirange(numrange(1,6)) &< nummultirange(numrange(3,4)); - ?column? ----------- - f -(1 row) - -SELECT nummultirange(numrange(3.5,6)) &< nummultirange(numrange(3,4)); - ?column? ----------- - f -(1 row) - --- overright -SELECT nummultirange() &> 'empty'::numrange; - ?column? ----------- - f -(1 row) - -SELECT nummultirange(numrange(1,2)) &> 'empty'::numrange; - ?column? ----------- - f -(1 row) - -SELECT 'empty'::numrange &> nummultirange(); - ?column? ----------- - f -(1 row) - -SELECT 'empty'::numrange &> nummultirange(numrange(1,2)); - ?column? ----------- - f -(1 row) - -SELECT nummultirange() &> nummultirange(); - ?column? ----------- - f -(1 row) - -SELECT nummultirange() &> nummultirange(numrange(1,2)); - ?column? ----------- - f -(1 row) - -SELECT nummultirange(numrange(1,2)) &> nummultirange(); - ?column? ----------- - f -(1 row) - -SELECT nummultirange(numrange(3,4)) &> numrange(6,7); - ?column? ----------- - f -(1 row) - -SELECT nummultirange(numrange(3,4)) &> numrange(1,2); - ?column? ----------- - t -(1 row) - -SELECT nummultirange(numrange(3,4)) &> numrange(1,4); - ?column? ----------- - t -(1 row) - -SELECT nummultirange(numrange(3,4)) &> numrange(1,6); - ?column? ----------- - t -(1 row) - -SELECT nummultirange(numrange(3,4)) &> numrange(3.5,6); - ?column? ----------- - f -(1 row) - -SELECT numrange(3,4) &> nummultirange(numrange(6,7)); - ?column? ----------- - f -(1 row) - -SELECT numrange(3,4) &> nummultirange(numrange(1,2)); - ?column? ----------- - t -(1 row) - -SELECT numrange(3,4) &> nummultirange(numrange(1,4)); - ?column? ----------- - t -(1 row) - -SELECT numrange(3,4) &> nummultirange(numrange(1,6)); - ?column? ----------- - t -(1 row) - -SELECT numrange(3,4) &> nummultirange(numrange(3.5,6)); - ?column? ----------- - f -(1 row) - -SELECT nummultirange(numrange(3,4)) &> nummultirange(numrange(6,7)); - ?column? ----------- - f -(1 row) - -SELECT nummultirange(numrange(3,4)) &> nummultirange(numrange(1,2)); - ?column? ----------- - t -(1 row) - -SELECT nummultirange(numrange(3,4)) &> nummultirange(numrange(1,4)); - ?column? ----------- - t -(1 row) - -SELECT nummultirange(numrange(3,4)) &> nummultirange(numrange(1,6)); - ?column? ----------- - t -(1 row) - -SELECT nummultirange(numrange(3,4)) &> nummultirange(numrange(3.5,6)); - ?column? ----------- - f -(1 row) - --- meets -SELECT 'empty'::numrange -|- nummultirange(); - ?column? ----------- - f -(1 row) - -SELECT 'empty'::numrange -|- nummultirange(numrange(1,2)); - ?column? ----------- - f -(1 row) - -SELECT nummultirange() -|- 'empty'::numrange; - ?column? ----------- - f -(1 row) - -SELECT nummultirange(numrange(1,2)) -|- 'empty'::numrange; - ?column? ----------- - f -(1 row) - -SELECT nummultirange() -|- nummultirange(); - ?column? ----------- - f -(1 row) - -SELECT nummultirange(numrange(1,2)) -|- nummultirange(); - ?column? ----------- - f -(1 row) - -SELECT nummultirange() -|- nummultirange(numrange(1,2)); - ?column? ----------- - f -(1 row) - -SELECT numrange(1,2) -|- nummultirange(numrange(2,4)); - ?column? ----------- - t -(1 row) - -SELECT numrange(1,2) -|- nummultirange(numrange(3,4)); - ?column? ----------- - f -(1 row) - -SELECT nummultirange(numrange(1,2)) -|- numrange(2,4); - ?column? ----------- - t -(1 row) - -SELECT nummultirange(numrange(1,2)) -|- numrange(3,4); - ?column? ----------- - f -(1 row) - -SELECT nummultirange(numrange(1,2)) -|- nummultirange(numrange(2,4)); - ?column? ----------- - t -(1 row) - -SELECT nummultirange(numrange(1,2)) -|- nummultirange(numrange(3,4)); - ?column? ----------- - f -(1 row) - -SELECT nummultirange(numrange(1,2), numrange(5,6)) -|- nummultirange(numrange(3,4)); - ?column? ----------- - f -(1 row) - -SELECT nummultirange(numrange(1,2), numrange(5,6)) -|- nummultirange(numrange(6,7)); - ?column? ----------- - t -(1 row) - -SELECT nummultirange(numrange(1,2), numrange(5,6)) -|- nummultirange(numrange(8,9)); - ?column? ----------- - f -(1 row) - -SELECT nummultirange(numrange(1,2)) -|- nummultirange(numrange(2,4), numrange(6,7)); - ?column? ----------- - t -(1 row) - --- strictly left -select 'empty'::numrange << nummultirange(); - ?column? ----------- - f -(1 row) - -select numrange(1,2) << nummultirange(); - ?column? ----------- - f -(1 row) - -select numrange(1,2) << nummultirange(numrange(3,4)); - ?column? ----------- - t -(1 row) - -select numrange(1,2) << nummultirange(numrange(0,4)); - ?column? ----------- - f -(1 row) - -select numrange(1,2) << nummultirange(numrange(0,4), numrange(7,8)); - ?column? ----------- - f -(1 row) - -select nummultirange() << 'empty'::numrange; - ?column? ----------- - f -(1 row) - -select nummultirange() << numrange(1,2); - ?column? ----------- - f -(1 row) - -select nummultirange(numrange(3,4)) << numrange(3,6); - ?column? ----------- - f -(1 row) - -select nummultirange(numrange(0,2)) << numrange(3,6); - ?column? ----------- - t -(1 row) - -select nummultirange(numrange(0,2), numrange(7,8)) << numrange(3,6); - ?column? ----------- - f -(1 row) - -select nummultirange(numrange(-4,-2), numrange(0,2)) << numrange(3,6); - ?column? ----------- - t -(1 row) - -select nummultirange() << nummultirange(); - ?column? ----------- - f -(1 row) - -select nummultirange() << nummultirange(numrange(1,2)); - ?column? ----------- - f -(1 row) - -select nummultirange(numrange(1,2)) << nummultirange(); - ?column? ----------- - f -(1 row) - -select nummultirange(numrange(1,2)) << nummultirange(numrange(1,2)); - ?column? ----------- - f -(1 row) - -select nummultirange(numrange(1,2)) << nummultirange(numrange(3,4)); - ?column? ----------- - t -(1 row) - -select nummultirange(numrange(1,2)) << nummultirange(numrange(3,4), numrange(7,8)); - ?column? ----------- - t -(1 row) - -select nummultirange(numrange(1,2), numrange(4,5)) << nummultirange(numrange(3,4), numrange(7,8)); - ?column? ----------- - f -(1 row) - --- strictly right -select nummultirange() >> 'empty'::numrange; - ?column? ----------- - f -(1 row) - -select nummultirange() >> numrange(1,2); - ?column? ----------- - f -(1 row) - -select nummultirange(numrange(3,4)) >> numrange(1,2); - ?column? ----------- - t -(1 row) - -select nummultirange(numrange(0,4)) >> numrange(1,2); - ?column? ----------- - f -(1 row) - -select nummultirange(numrange(0,4), numrange(7,8)) >> numrange(1,2); - ?column? ----------- - f -(1 row) - -select 'empty'::numrange >> nummultirange(); - ?column? ----------- - f -(1 row) - -select numrange(1,2) >> nummultirange(); - ?column? ----------- - f -(1 row) - -select numrange(3,6) >> nummultirange(numrange(3,4)); - ?column? ----------- - f -(1 row) - -select numrange(3,6) >> nummultirange(numrange(0,2)); - ?column? ----------- - t -(1 row) - -select numrange(3,6) >> nummultirange(numrange(0,2), numrange(7,8)); - ?column? ----------- - f -(1 row) - -select numrange(3,6) >> nummultirange(numrange(-4,-2), numrange(0,2)); - ?column? ----------- - t -(1 row) - -select nummultirange() >> nummultirange(); - ?column? ----------- - f -(1 row) - -select nummultirange(numrange(1,2)) >> nummultirange(); - ?column? ----------- - f -(1 row) - -select nummultirange() >> nummultirange(numrange(1,2)); - ?column? ----------- - f -(1 row) - -select nummultirange(numrange(1,2)) >> nummultirange(numrange(1,2)); - ?column? ----------- - f -(1 row) - -select nummultirange(numrange(3,4)) >> nummultirange(numrange(1,2)); - ?column? ----------- - t -(1 row) - -select nummultirange(numrange(3,4), numrange(7,8)) >> nummultirange(numrange(1,2)); - ?column? ----------- - t -(1 row) - -select nummultirange(numrange(3,4), numrange(7,8)) >> nummultirange(numrange(1,2), numrange(4,5)); - ?column? ----------- - f -(1 row) - --- union -SELECT nummultirange() + nummultirange(); - ?column? ----------- - {} -(1 row) - -SELECT nummultirange() + nummultirange(numrange(1,2)); - ?column? ----------- - {[1,2)} -(1 row) - -SELECT nummultirange(numrange(1,2)) + nummultirange(); - ?column? ----------- - {[1,2)} -(1 row) - -SELECT nummultirange(numrange(1,2)) + nummultirange(numrange(1,2)); - ?column? ----------- - {[1,2)} -(1 row) - -SELECT nummultirange(numrange(1,2)) + nummultirange(numrange(2,4)); - ?column? ----------- - {[1,4)} -(1 row) - -SELECT nummultirange(numrange(1,2)) + nummultirange(numrange(3,4)); - ?column? ---------------- - {[1,2),[3,4)} -(1 row) - -SELECT nummultirange(numrange(1,2), numrange(4,5)) + nummultirange(numrange(2,4)); - ?column? ----------- - {[1,5)} -(1 row) - -SELECT nummultirange(numrange(1,2), numrange(4,5)) + nummultirange(numrange(3,4)); - ?column? ---------------- - {[1,2),[3,5)} -(1 row) - -SELECT nummultirange(numrange(1,2), numrange(4,5)) + nummultirange(numrange(0,9)); - ?column? ----------- - {[0,9)} -(1 row) - --- merge -SELECT range_merge(nummultirange()); - range_merge -------------- - empty -(1 row) - -SELECT range_merge(nummultirange(numrange(1,2))); - range_merge -------------- - [1,2) -(1 row) - -SELECT range_merge(nummultirange(numrange(1,2), numrange(7,8))); - range_merge -------------- - [1,8) -(1 row) - --- minus -SELECT nummultirange() - nummultirange(); - ?column? ----------- - {} -(1 row) - -SELECT nummultirange() - nummultirange(numrange(1,2)); - ?column? ----------- - {} -(1 row) - -SELECT nummultirange(numrange(1,2)) - nummultirange(); - ?column? ----------- - {[1,2)} -(1 row) - -SELECT nummultirange(numrange(1,2), numrange(3,4)) - nummultirange(); - ?column? ---------------- - {[1,2),[3,4)} -(1 row) - -SELECT nummultirange(numrange(1,2)) - nummultirange(numrange(1,2)); - ?column? ----------- - {} -(1 row) - -SELECT nummultirange(numrange(1,2)) - nummultirange(numrange(2,4)); - ?column? ----------- - {[1,2)} -(1 row) - -SELECT nummultirange(numrange(1,2)) - nummultirange(numrange(3,4)); - ?column? ----------- - {[1,2)} -(1 row) - -SELECT nummultirange(numrange(1,4)) - nummultirange(numrange(1,2)); - ?column? ----------- - {[2,4)} -(1 row) - -SELECT nummultirange(numrange(1,4)) - nummultirange(numrange(2,3)); - ?column? ---------------- - {[1,2),[3,4)} -(1 row) - -SELECT nummultirange(numrange(1,4)) - nummultirange(numrange(0,8)); - ?column? ----------- - {} -(1 row) - -SELECT nummultirange(numrange(1,4)) - nummultirange(numrange(0,2)); - ?column? ----------- - {[2,4)} -(1 row) - -SELECT nummultirange(numrange(1,8)) - nummultirange(numrange(0,2), numrange(3,4)); - ?column? ---------------- - {[2,3),[4,8)} -(1 row) - -SELECT nummultirange(numrange(1,8)) - nummultirange(numrange(2,3), numrange(5,null)); - ?column? ---------------- - {[1,2),[3,5)} -(1 row) - -SELECT nummultirange(numrange(1,2), numrange(4,5)) - nummultirange(numrange(-2,0)); - ?column? ---------------- - {[1,2),[4,5)} -(1 row) - -SELECT nummultirange(numrange(1,2), numrange(4,5)) - nummultirange(numrange(2,4)); - ?column? ---------------- - {[1,2),[4,5)} -(1 row) - -SELECT nummultirange(numrange(1,2), numrange(4,5)) - nummultirange(numrange(3,5)); - ?column? ----------- - {[1,2)} -(1 row) - -SELECT nummultirange(numrange(1,2), numrange(4,5)) - nummultirange(numrange(0,9)); - ?column? ----------- - {} -(1 row) - -SELECT nummultirange(numrange(1,3), numrange(4,5)) - nummultirange(numrange(2,9)); - ?column? ----------- - {[1,2)} -(1 row) - -SELECT nummultirange(numrange(1,2), numrange(4,5)) - nummultirange(numrange(8,9)); - ?column? ---------------- - {[1,2),[4,5)} -(1 row) - -SELECT nummultirange(numrange(1,2), numrange(4,5)) - nummultirange(numrange(-2,0), numrange(8,9)); - ?column? ---------------- - {[1,2),[4,5)} -(1 row) - --- intersection -SELECT nummultirange() * nummultirange(); - ?column? ----------- - {} -(1 row) - -SELECT nummultirange() * nummultirange(numrange(1,2)); - ?column? ----------- - {} -(1 row) - -SELECT nummultirange(numrange(1,2)) * nummultirange(); - ?column? ----------- - {} -(1 row) - -SELECT '{[1,3)}'::nummultirange * '{[1,5)}'::nummultirange; - ?column? ----------- - {[1,3)} -(1 row) - -SELECT '{[1,3)}'::nummultirange * '{[0,5)}'::nummultirange; - ?column? ----------- - {[1,3)} -(1 row) - -SELECT '{[1,3)}'::nummultirange * '{[0,2)}'::nummultirange; - ?column? ----------- - {[1,2)} -(1 row) - -SELECT '{[1,3)}'::nummultirange * '{[2,5)}'::nummultirange; - ?column? ----------- - {[2,3)} -(1 row) - -SELECT '{[1,4)}'::nummultirange * '{[2,3)}'::nummultirange; - ?column? ----------- - {[2,3)} -(1 row) - -SELECT '{[1,4)}'::nummultirange * '{[0,2), [3,5)}'::nummultirange; - ?column? ---------------- - {[1,2),[3,4)} -(1 row) - -SELECT '{[1,4), [7,10)}'::nummultirange * '{[0,8), [9,12)}'::nummultirange; - ?column? ----------------------- - {[1,4),[7,8),[9,10)} -(1 row) - -SELECT '{[1,4), [7,10)}'::nummultirange * '{[9,12)}'::nummultirange; - ?column? ----------- - {[9,10)} -(1 row) - -SELECT '{[1,4), [7,10)}'::nummultirange * '{[-5,-4), [5,6), [9,12)}'::nummultirange; - ?column? ----------- - {[9,10)} -(1 row) - -SELECT '{[1,4), [7,10)}'::nummultirange * '{[0,2), [3,8), [9,12)}'::nummultirange; - ?column? ----------------------------- - {[1,2),[3,4),[7,8),[9,10)} -(1 row) - -SELECT '{[1,4), [7,10)}'::nummultirange * '{[0,2), [3,8), [9,12)}'::nummultirange; - ?column? ----------------------------- - {[1,2),[3,4),[7,8),[9,10)} -(1 row) - --- test GiST index -create table test_multirange_gist(mr int4multirange); -insert into test_multirange_gist select int4multirange(int4range(g, g+10),int4range(g+20, g+30),int4range(g+40, g+50)) from generate_series(1,2000) g; -insert into test_multirange_gist select '{}'::int4multirange from generate_series(1,500) g; -insert into test_multirange_gist select int4multirange(int4range(g, g+10000)) from generate_series(1,1000) g; -insert into test_multirange_gist select int4multirange(int4range(NULL, g*10, '(]'), int4range(g*10, g*20, '(]')) from generate_series(1,100) g; -insert into test_multirange_gist select int4multirange(int4range(g*10, g*20, '(]'), int4range(g*20, NULL, '(]')) from generate_series(1,100) g; -create index test_mulrirange_gist_idx on test_multirange_gist using gist (mr); --- test statistics and selectivity estimation as well --- --- We don't check the accuracy of selectivity estimation, but at least check --- it doesn't fall. -analyze test_multirange_gist; --- first, verify non-indexed results -SET enable_seqscan = t; -SET enable_indexscan = f; -SET enable_bitmapscan = f; -select count(*) from test_multirange_gist where mr = '{}'::int4multirange; - count -------- - 500 -(1 row) - -select count(*) from test_multirange_gist where mr @> 'empty'::int4range; - count -------- - 3700 -(1 row) - -select count(*) from test_multirange_gist where mr && 'empty'::int4range; - count -------- - 0 -(1 row) - -select count(*) from test_multirange_gist where mr <@ 'empty'::int4range; - count -------- - 500 -(1 row) - -select count(*) from test_multirange_gist where mr << 'empty'::int4range; - count -------- - 0 -(1 row) - -select count(*) from test_multirange_gist where mr >> 'empty'::int4range; - count -------- - 0 -(1 row) - -select count(*) from test_multirange_gist where mr &< 'empty'::int4range; - count -------- - 0 -(1 row) - -select count(*) from test_multirange_gist where mr &> 'empty'::int4range; - count -------- - 0 -(1 row) - -select count(*) from test_multirange_gist where mr -|- 'empty'::int4range; - count -------- - 0 -(1 row) - -select count(*) from test_multirange_gist where mr @> '{}'::int4multirange; - count -------- - 3700 -(1 row) - -select count(*) from test_multirange_gist where mr @> '{}'::int4multirange; - count -------- - 3700 -(1 row) - -select count(*) from test_multirange_gist where mr && '{}'::int4multirange; - count -------- - 0 -(1 row) - -select count(*) from test_multirange_gist where mr <@ '{}'::int4multirange; - count -------- - 500 -(1 row) - -select count(*) from test_multirange_gist where mr << '{}'::int4multirange; - count -------- - 0 -(1 row) - -select count(*) from test_multirange_gist where mr >> '{}'::int4multirange; - count -------- - 0 -(1 row) - -select count(*) from test_multirange_gist where mr &< '{}'::int4multirange; - count -------- - 0 -(1 row) - -select count(*) from test_multirange_gist where mr &> '{}'::int4multirange; - count -------- - 0 -(1 row) - -select count(*) from test_multirange_gist where mr -|- '{}'::int4multirange; - count -------- - 0 -(1 row) - -select count(*) from test_multirange_gist where mr = int4multirange(int4range(10,20), int4range(30,40), int4range(50,60)); - count -------- - 1 -(1 row) - -select count(*) from test_multirange_gist where mr @> 10; - count -------- - 120 -(1 row) - -select count(*) from test_multirange_gist where mr @> int4range(10,20); - count -------- - 111 -(1 row) - -select count(*) from test_multirange_gist where mr && int4range(10,20); - count -------- - 139 -(1 row) - -select count(*) from test_multirange_gist where mr <@ int4range(10,50); - count -------- - 500 -(1 row) - -select count(*) from test_multirange_gist where mr << int4range(100,500); - count -------- - 54 -(1 row) - -select count(*) from test_multirange_gist where mr >> int4range(100,500); - count -------- - 2053 -(1 row) - -select count(*) from test_multirange_gist where mr &< int4range(100,500); - count -------- - 474 -(1 row) - -select count(*) from test_multirange_gist where mr &> int4range(100,500); - count -------- - 2893 -(1 row) - -select count(*) from test_multirange_gist where mr -|- int4range(100,500); - count -------- - 3 -(1 row) - -select count(*) from test_multirange_gist where mr @> '{}'::int4multirange; - count -------- - 3700 -(1 row) - -select count(*) from test_multirange_gist where mr @> int4multirange(int4range(10,20), int4range(30,40)); - count -------- - 110 -(1 row) - -select count(*) from test_multirange_gist where mr && '{(10,20),(30,40),(50,60)}'::int4multirange; - count -------- - 218 -(1 row) - -select count(*) from test_multirange_gist where mr <@ '{(10,30),(40,60),(70,90)}'::int4multirange; - count -------- - 500 -(1 row) - -select count(*) from test_multirange_gist where mr << int4multirange(int4range(100,200), int4range(400,500)); - count -------- - 54 -(1 row) - -select count(*) from test_multirange_gist where mr >> int4multirange(int4range(100,200), int4range(400,500)); - count -------- - 2053 -(1 row) - -select count(*) from test_multirange_gist where mr &< int4multirange(int4range(100,200), int4range(400,500)); - count -------- - 474 -(1 row) - -select count(*) from test_multirange_gist where mr &> int4multirange(int4range(100,200), int4range(400,500)); - count -------- - 2893 -(1 row) - -select count(*) from test_multirange_gist where mr -|- int4multirange(int4range(100,200), int4range(400,500)); - count -------- - 3 -(1 row) - --- now check same queries using index -SET enable_seqscan = f; -SET enable_indexscan = t; -SET enable_bitmapscan = f; -select count(*) from test_multirange_gist where mr = '{}'::int4multirange; - count -------- - 500 -(1 row) - -select count(*) from test_multirange_gist where mr @> 'empty'::int4range; - count -------- - 3700 -(1 row) - -select count(*) from test_multirange_gist where mr && 'empty'::int4range; - count -------- - 0 -(1 row) - -select count(*) from test_multirange_gist where mr <@ 'empty'::int4range; - count -------- - 500 -(1 row) - -select count(*) from test_multirange_gist where mr << 'empty'::int4range; - count -------- - 0 -(1 row) - -select count(*) from test_multirange_gist where mr >> 'empty'::int4range; - count -------- - 0 -(1 row) - -select count(*) from test_multirange_gist where mr &< 'empty'::int4range; - count -------- - 0 -(1 row) - -select count(*) from test_multirange_gist where mr &> 'empty'::int4range; - count -------- - 0 -(1 row) - -select count(*) from test_multirange_gist where mr -|- 'empty'::int4range; - count -------- - 0 -(1 row) - -select count(*) from test_multirange_gist where mr @> '{}'::int4multirange; - count -------- - 3700 -(1 row) - -select count(*) from test_multirange_gist where mr @> '{}'::int4multirange; - count -------- - 3700 -(1 row) - -select count(*) from test_multirange_gist where mr && '{}'::int4multirange; - count -------- - 0 -(1 row) - -select count(*) from test_multirange_gist where mr <@ '{}'::int4multirange; - count -------- - 500 -(1 row) - -select count(*) from test_multirange_gist where mr << '{}'::int4multirange; - count -------- - 0 -(1 row) - -select count(*) from test_multirange_gist where mr >> '{}'::int4multirange; - count -------- - 0 -(1 row) - -select count(*) from test_multirange_gist where mr &< '{}'::int4multirange; - count -------- - 0 -(1 row) - -select count(*) from test_multirange_gist where mr &> '{}'::int4multirange; - count -------- - 0 -(1 row) - -select count(*) from test_multirange_gist where mr -|- '{}'::int4multirange; - count -------- - 0 -(1 row) - -select count(*) from test_multirange_gist where mr @> 'empty'::int4range; - count -------- - 3700 -(1 row) - -select count(*) from test_multirange_gist where mr = int4multirange(int4range(10,20), int4range(30,40), int4range(50,60)); - count -------- - 1 -(1 row) - -select count(*) from test_multirange_gist where mr @> 10; - count -------- - 120 -(1 row) - -select count(*) from test_multirange_gist where mr @> int4range(10,20); - count -------- - 111 -(1 row) - -select count(*) from test_multirange_gist where mr && int4range(10,20); - count -------- - 139 -(1 row) - -select count(*) from test_multirange_gist where mr <@ int4range(10,50); - count -------- - 500 -(1 row) - -select count(*) from test_multirange_gist where mr << int4range(100,500); - count -------- - 54 -(1 row) - -select count(*) from test_multirange_gist where mr >> int4range(100,500); - count -------- - 2053 -(1 row) - -select count(*) from test_multirange_gist where mr &< int4range(100,500); - count -------- - 474 -(1 row) - -select count(*) from test_multirange_gist where mr &> int4range(100,500); - count -------- - 2893 -(1 row) - -select count(*) from test_multirange_gist where mr -|- int4range(100,500); - count -------- - 3 -(1 row) - -select count(*) from test_multirange_gist where mr @> '{}'::int4multirange; - count -------- - 3700 -(1 row) - -select count(*) from test_multirange_gist where mr @> int4multirange(int4range(10,20), int4range(30,40)); - count -------- - 110 -(1 row) - -select count(*) from test_multirange_gist where mr && '{(10,20),(30,40),(50,60)}'::int4multirange; - count -------- - 218 -(1 row) - -select count(*) from test_multirange_gist where mr <@ '{(10,30),(40,60),(70,90)}'::int4multirange; - count -------- - 500 -(1 row) - -select count(*) from test_multirange_gist where mr << int4multirange(int4range(100,200), int4range(400,500)); - count -------- - 54 -(1 row) - -select count(*) from test_multirange_gist where mr >> int4multirange(int4range(100,200), int4range(400,500)); - count -------- - 2053 -(1 row) - -select count(*) from test_multirange_gist where mr &< int4multirange(int4range(100,200), int4range(400,500)); - count -------- - 474 -(1 row) - -select count(*) from test_multirange_gist where mr &> int4multirange(int4range(100,200), int4range(400,500)); - count -------- - 2893 -(1 row) - -select count(*) from test_multirange_gist where mr -|- int4multirange(int4range(100,200), int4range(400,500)); - count -------- - 3 -(1 row) - -drop table test_multirange_gist; --- --- range_agg function --- -create table reservations ( room_id integer not null, booked_during daterange ); -insert into reservations values --- 1: has a meets and a gap -(1, daterange('2018-07-01', '2018-07-07')), -(1, daterange('2018-07-07', '2018-07-14')), -(1, daterange('2018-07-20', '2018-07-22')), --- 2: just a single row -(2, daterange('2018-07-01', '2018-07-03')), --- 3: one null range -(3, NULL), --- 4: two null ranges -(4, NULL), -(4, NULL), --- 5: a null range and a non-null range -(5, NULL), -(5, daterange('2018-07-01', '2018-07-03')), --- 6: has overlap -(6, daterange('2018-07-01', '2018-07-07')), -(6, daterange('2018-07-05', '2018-07-10')), --- 7: two ranges that meet: no gap or overlap -(7, daterange('2018-07-01', '2018-07-07')), -(7, daterange('2018-07-07', '2018-07-14')), --- 8: an empty range -(8, 'empty'::daterange) -; -SELECT room_id, range_agg(booked_during) -FROM reservations -GROUP BY room_id -ORDER BY room_id; - room_id | range_agg ----------+--------------------------------------------------- - 1 | {[07-01-2018,07-14-2018),[07-20-2018,07-22-2018)} - 2 | {[07-01-2018,07-03-2018)} - 3 | - 4 | - 5 | {[07-01-2018,07-03-2018)} - 6 | {[07-01-2018,07-10-2018)} - 7 | {[07-01-2018,07-14-2018)} - 8 | {} -(8 rows) - --- range_agg on a custom range type too -SELECT range_agg(r) -FROM (VALUES - ('[a,c]'::textrange), - ('[b,b]'::textrange), - ('[c,f]'::textrange), - ('[g,h)'::textrange), - ('[h,j)'::textrange) - ) t(r); - range_agg ---------------- - {[a,f],[g,j)} -(1 row) - -select range_intersect_agg(nmr) from nummultirange_test; - range_intersect_agg ---------------------- - {} -(1 row) - -select range_intersect_agg(nmr) from nummultirange_test where false; - range_intersect_agg ---------------------- - -(1 row) - --- test with just one input: -select range_intersect_agg(nmr) from (values ('{[1,2]}'::nummultirange)) t(nmr); - range_intersect_agg ---------------------- - {[1,2]} -(1 row) - -select range_intersect_agg(nmr) from nummultirange_test where nmr @> 4.0; - range_intersect_agg ---------------------- - {[3,5)} -(1 row) - -create table nummultirange_test2(nmr nummultirange); -create index nummultirange_test2_hash_idx on nummultirange_test2 using hash (nmr); -INSERT INTO nummultirange_test2 VALUES('{[, 5)}'); -INSERT INTO nummultirange_test2 VALUES(nummultirange(numrange(1.1, 2.2))); -INSERT INTO nummultirange_test2 VALUES(nummultirange(numrange(1.1, 2.2))); -INSERT INTO nummultirange_test2 VALUES(nummultirange(numrange(1.1, 2.2,'()'))); -INSERT INTO nummultirange_test2 VALUES('{}'); -select * from nummultirange_test2 where nmr = '{}'; - nmr ------ - {} -(1 row) - -select * from nummultirange_test2 where nmr = nummultirange(numrange(1.1, 2.2)); - nmr -------------- - {[1.1,2.2)} - {[1.1,2.2)} -(2 rows) - -select * from nummultirange_test2 where nmr = nummultirange(numrange(1.1, 2.3)); - nmr ------ -(0 rows) - -set enable_nestloop=t; -set enable_hashjoin=f; -set enable_mergejoin=f; -select * from nummultirange_test natural join nummultirange_test2 order by nmr; - nmr -------------- - {} - {} - {} - {} - {(,5)} - {[1.1,2.2)} - {[1.1,2.2)} -(7 rows) - -set enable_nestloop=f; -set enable_hashjoin=t; -set enable_mergejoin=f; -select * from nummultirange_test natural join nummultirange_test2 order by nmr; - nmr -------------- - {} - {} - {} - {} - {(,5)} - {[1.1,2.2)} - {[1.1,2.2)} -(7 rows) - -set enable_nestloop=f; -set enable_hashjoin=f; -set enable_mergejoin=t; -select * from nummultirange_test natural join nummultirange_test2 order by nmr; - nmr -------------- - {} - {} - {} - {} - {(,5)} - {[1.1,2.2)} - {[1.1,2.2)} -(7 rows) - -set enable_nestloop to default; -set enable_hashjoin to default; -set enable_mergejoin to default; -DROP TABLE nummultirange_test2; --- --- Test user-defined multirange of floats --- -select '{[123.001, 5.e9)}'::float8multirange @> 888.882::float8; - ?column? ----------- - t -(1 row) - -create table float8multirange_test(f8mr float8multirange, i int); -insert into float8multirange_test values(float8multirange(float8range(-100.00007, '1.111113e9')), 42); -select * from float8multirange_test; - f8mr | i ----------------------------+---- - {[-100.00007,1111113000)} | 42 -(1 row) - -drop table float8multirange_test; --- --- Test multirange types over domains --- -create domain mydomain as int4; -create type mydomainrange as range(subtype=mydomain); -select '{[4,50)}'::mydomainmultirange @> 7::mydomain; - ?column? ----------- - t -(1 row) - -drop domain mydomain cascade; -NOTICE: drop cascades to type mydomainrange --- --- Test domains over multirange types --- -create domain restrictedmultirange as int4multirange check (upper(value) < 10); -select '{[4,5)}'::restrictedmultirange @> 7; - ?column? ----------- - f -(1 row) - -select '{[4,50)}'::restrictedmultirange @> 7; -- should fail -ERROR: value for domain restrictedmultirange violates check constraint "restrictedmultirange_check" -drop domain restrictedmultirange; ---- --- Check automatic naming of multiranges ---- -create type intr as range(subtype=int); -select intr_multirange(intr(1,10)); - intr_multirange ------------------ - {[1,10)} -(1 row) - -drop type intr; -create type intmultirange as (x int, y int); -create type intrange as range(subtype=int); -- should fail -ERROR: type "intmultirange" already exists -DETAIL: Failed while creating a multirange type for type "intrange". -HINT: You can manually specify a multirange type name using the "multirange_type_name" attribute. -drop type intmultirange; -create type intr_multirange as (x int, y int); -create type intr as range(subtype=int); -- should fail -ERROR: type "intr_multirange" already exists -DETAIL: Failed while creating a multirange type for type "intr". -HINT: You can manually specify a multirange type name using the "multirange_type_name" attribute. -drop type intr_multirange; --- --- Test multiple multirange types over the same subtype and manual naming of --- the multirange type. --- --- should fail -create type textrange1 as range(subtype=text, multirange_type_name=int, collation="C"); -ERROR: type "int4" already exists --- should pass -create type textrange1 as range(subtype=text, multirange_type_name=multirange_of_text, collation="C"); --- should pass, because existing _textrange1 is automatically renamed -create type textrange2 as range(subtype=text, multirange_type_name=_textrange1, collation="C"); -select multirange_of_text(textrange2('a','Z')); -- should fail -ERROR: function multirange_of_text(textrange2) does not exist -LINE 1: select multirange_of_text(textrange2('a','Z')); - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. -select multirange_of_text(textrange1('a','Z')) @> 'b'::text; -ERROR: range lower bound must be less than or equal to range upper bound -select unnest(multirange_of_text(textrange1('a','b'), textrange1('d','e'))); - unnest --------- - [a,b) - [d,e) -(2 rows) - -select _textrange1(textrange2('a','z')) @> 'b'::text; - ?column? ----------- - t -(1 row) - -drop type textrange1; -drop type textrange2; --- --- Test polymorphic type system --- -create function anyarray_anymultirange_func(a anyarray, r anymultirange) - returns anyelement as 'select $1[1] + lower($2);' language sql; -select anyarray_anymultirange_func(ARRAY[1,2], int4multirange(int4range(10,20))); - anyarray_anymultirange_func ------------------------------ - 11 -(1 row) - --- should fail -select anyarray_anymultirange_func(ARRAY[1,2], nummultirange(numrange(10,20))); -ERROR: function anyarray_anymultirange_func(integer[], nummultirange) does not exist -LINE 1: select anyarray_anymultirange_func(ARRAY[1,2], nummultirange... - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. -drop function anyarray_anymultirange_func(anyarray, anymultirange); --- should fail -create function bogus_func(anyelement) - returns anymultirange as 'select int4multirange(int4range(1,10))' language sql; -ERROR: cannot determine result data type -DETAIL: A result of type anymultirange requires at least one input of type anyrange or anymultirange. --- should fail -create function bogus_func(int) - returns anymultirange as 'select int4multirange(int4range(1,10))' language sql; -ERROR: cannot determine result data type -DETAIL: A result of type anymultirange requires at least one input of type anyrange or anymultirange. -create function range_add_bounds(anymultirange) - returns anyelement as 'select lower($1) + upper($1)' language sql; -select range_add_bounds(int4multirange(int4range(1, 17))); - range_add_bounds ------------------- - 18 -(1 row) - -select range_add_bounds(nummultirange(numrange(1.0001, 123.123))); - range_add_bounds ------------------- - 124.1231 -(1 row) - -create function multirangetypes_sql(q anymultirange, b anyarray, out c anyelement) - as $$ select upper($1) + $2[1] $$ - language sql; -select multirangetypes_sql(int4multirange(int4range(1,10)), ARRAY[2,20]); - multirangetypes_sql ---------------------- - 12 -(1 row) - -select multirangetypes_sql(nummultirange(numrange(1,10)), ARRAY[2,20]); -- match failure -ERROR: function multirangetypes_sql(nummultirange, integer[]) does not exist -LINE 1: select multirangetypes_sql(nummultirange(numrange(1,10)), AR... - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. -create function anycompatiblearray_anycompatiblemultirange_func(a anycompatiblearray, mr anycompatiblemultirange) - returns anycompatible as 'select $1[1] + lower($2);' language sql; -select anycompatiblearray_anycompatiblemultirange_func(ARRAY[1,2], multirange(int4range(10,20))); - anycompatiblearray_anycompatiblemultirange_func -------------------------------------------------- - 11 -(1 row) - -select anycompatiblearray_anycompatiblemultirange_func(ARRAY[1,2], multirange(numrange(10,20))); - anycompatiblearray_anycompatiblemultirange_func -------------------------------------------------- - 11 -(1 row) - --- should fail -select anycompatiblearray_anycompatiblemultirange_func(ARRAY[1.1,2], multirange(int4range(10,20))); -ERROR: function anycompatiblearray_anycompatiblemultirange_func(numeric[], int4multirange) does not exist -LINE 1: select anycompatiblearray_anycompatiblemultirange_func(ARRAY... - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. -drop function anycompatiblearray_anycompatiblemultirange_func(anycompatiblearray, anycompatiblemultirange); -create function anycompatiblerange_anycompatiblemultirange_func(r anycompatiblerange, mr anycompatiblemultirange) - returns anycompatible as 'select lower($1) + lower($2);' language sql; -select anycompatiblerange_anycompatiblemultirange_func(int4range(1,2), multirange(int4range(10,20))); - anycompatiblerange_anycompatiblemultirange_func -------------------------------------------------- - 11 -(1 row) - --- should fail -select anycompatiblerange_anycompatiblemultirange_func(numrange(1,2), multirange(int4range(10,20))); -ERROR: function anycompatiblerange_anycompatiblemultirange_func(numrange, int4multirange) does not exist -LINE 1: select anycompatiblerange_anycompatiblemultirange_func(numra... - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. -drop function anycompatiblerange_anycompatiblemultirange_func(anycompatiblerange, anycompatiblemultirange); --- should fail -create function bogus_func(anycompatible) - returns anycompatiblerange as 'select int4range(1,10)' language sql; -ERROR: cannot determine result data type -DETAIL: A result of type anycompatiblerange requires at least one input of type anycompatiblerange or anycompatiblemultirange. --- --- Arrays of multiranges --- -select ARRAY[nummultirange(numrange(1.1, 1.2)), nummultirange(numrange(12.3, 155.5))]; - array ----------------------------------- - {"{[1.1,1.2)}","{[12.3,155.5)}"} -(1 row) - -create table i8mr_array (f1 int, f2 int8multirange[]); -insert into i8mr_array values (42, array[int8multirange(int8range(1,10)), int8multirange(int8range(2,20))]); -select * from i8mr_array; - f1 | f2 -----+------------------------- - 42 | {"{[1,10)}","{[2,20)}"} -(1 row) - -drop table i8mr_array; --- --- Multiranges of arrays --- -select arraymultirange(arrayrange(ARRAY[1,2], ARRAY[2,1])); - arraymultirange ---------------------- - {["{1,2}","{2,1}")} -(1 row) - -select arraymultirange(arrayrange(ARRAY[2,1], ARRAY[1,2])); -- fail -ERROR: range lower bound must be less than or equal to range upper bound -select array[1,1] <@ arraymultirange(arrayrange(array[1,2], array[2,1])); - ?column? ----------- - f -(1 row) - -select array[1,3] <@ arraymultirange(arrayrange(array[1,2], array[2,1])); - ?column? ----------- - t -(1 row) - --- --- Ranges of composites --- -create type two_ints as (a int, b int); -create type two_ints_range as range (subtype = two_ints); --- with force_parallel_mode on, this exercises tqueue.c's range remapping -select *, row_to_json(upper(t)) as u from - (values (two_ints_multirange(two_ints_range(row(1,2), row(3,4)))), - (two_ints_multirange(two_ints_range(row(5,6), row(7,8))))) v(t); - t | u ----------------------+--------------- - {["(1,2)","(3,4)")} | {"a":3,"b":4} - {["(5,6)","(7,8)")} | {"a":7,"b":8} -(2 rows) - -drop type two_ints cascade; -NOTICE: drop cascades to type two_ints_range --- --- Check behavior when subtype lacks a hash function --- -set enable_sort = off; -- try to make it pick a hash setop implementation -select '{(2,5)}'::cashmultirange except select '{(5,6)}'::cashmultirange; - cashmultirange ------------------ - {($2.00,$5.00)} -(1 row) - -reset enable_sort; --- --- OUT/INOUT/TABLE functions --- --- infer anymultirange from anymultirange -create function mr_outparam_succeed(i anymultirange, out r anymultirange, out t text) - as $$ select $1, 'foo'::text $$ language sql; -select * from mr_outparam_succeed(int4multirange(int4range(1,2))); - r | t ----------+----- - {[1,2)} | foo -(1 row) - --- infer anyarray from anymultirange -create function mr_outparam_succeed2(i anymultirange, out r anyarray, out t text) - as $$ select ARRAY[upper($1)], 'foo'::text $$ language sql; -select * from mr_outparam_succeed2(int4multirange(int4range(1,2))); - r | t ------+----- - {2} | foo -(1 row) - --- infer anyrange from anymultirange -create function mr_outparam_succeed3(i anymultirange, out r anyrange, out t text) - as $$ select range_merge($1), 'foo'::text $$ language sql; -select * from mr_outparam_succeed3(int4multirange(int4range(1,2))); - r | t --------+----- - [1,2) | foo -(1 row) - --- infer anymultirange from anyrange -create function mr_outparam_succeed4(i anyrange, out r anymultirange, out t text) - as $$ select multirange($1), 'foo'::text $$ language sql; -select * from mr_outparam_succeed4(int4range(1,2)); - r | t ----------+----- - {[1,2)} | foo -(1 row) - --- infer anyelement from anymultirange -create function mr_inoutparam_succeed(out i anyelement, inout r anymultirange) - as $$ select upper($1), $1 $$ language sql; -select * from mr_inoutparam_succeed(int4multirange(int4range(1,2))); - i | r ----+--------- - 2 | {[1,2)} -(1 row) - --- infer anyelement+anymultirange from anyelement+anymultirange -create function mr_table_succeed(i anyelement, r anymultirange) returns table(i anyelement, r anymultirange) - as $$ select $1, $2 $$ language sql; -select * from mr_table_succeed(123, int4multirange(int4range(1,11))); - i | r ------+---------- - 123 | {[1,11)} -(1 row) - --- use anymultirange in plpgsql -create function mr_polymorphic(i anyrange) returns anymultirange - as $$ begin return multirange($1); end; $$ language plpgsql; -select mr_polymorphic(int4range(1, 4)); - mr_polymorphic ----------------- - {[1,4)} -(1 row) - --- should fail -create function mr_outparam_fail(i anyelement, out r anymultirange, out t text) - as $$ select '[1,10]', 'foo' $$ language sql; -ERROR: cannot determine result data type -DETAIL: A result of type anymultirange requires at least one input of type anyrange or anymultirange. ---should fail -create function mr_inoutparam_fail(inout i anyelement, out r anymultirange) - as $$ select $1, '[1,10]' $$ language sql; -ERROR: cannot determine result data type -DETAIL: A result of type anymultirange requires at least one input of type anyrange or anymultirange. ---should fail -create function mr_table_fail(i anyelement) returns table(i anyelement, r anymultirange) - as $$ select $1, '[1,10]' $$ language sql; -ERROR: cannot determine result data type -DETAIL: A result of type anymultirange requires at least one input of type anyrange or anymultirange. +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/create_function_0.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/create_function_0.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/create_function_0.out 2023-02-20 19:42:50.339203491 -0500 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/create_function_0.out 2023-02-20 19:44:17.249207220 -0500 @@ -1,88 +1 @@ --- --- CREATE_FUNCTION_0 --- --- Create a bunch of C functions that will be used by later tests: -CREATE FUNCTION check_primary_key () - RETURNS trigger - AS '/builddir/build/BUILD/postgresql-14.3/src/test/regress/refint.so' - LANGUAGE C; -CREATE FUNCTION check_foreign_key () - RETURNS trigger - AS '/builddir/build/BUILD/postgresql-14.3/src/test/regress/refint.so' - LANGUAGE C; -CREATE FUNCTION autoinc () - RETURNS trigger - AS '/builddir/build/BUILD/postgresql-14.3/src/test/regress/autoinc.so' - LANGUAGE C; -CREATE FUNCTION trigger_return_old () - RETURNS trigger - AS '/builddir/build/BUILD/postgresql-14.3/src/test/regress/regress.so' - LANGUAGE C; -CREATE FUNCTION ttdummy () - RETURNS trigger - AS '/builddir/build/BUILD/postgresql-14.3/src/test/regress/regress.so' - LANGUAGE C; -CREATE FUNCTION set_ttdummy (int4) - RETURNS int4 - AS '/builddir/build/BUILD/postgresql-14.3/src/test/regress/regress.so' - LANGUAGE C STRICT; -CREATE FUNCTION make_tuple_indirect (record) - RETURNS record - AS '/builddir/build/BUILD/postgresql-14.3/src/test/regress/regress.so' - LANGUAGE C STRICT; -CREATE FUNCTION test_atomic_ops() - RETURNS bool - AS '/builddir/build/BUILD/postgresql-14.3/src/test/regress/regress.so' - LANGUAGE C; -CREATE FUNCTION test_fdw_handler() - RETURNS fdw_handler - AS '/builddir/build/BUILD/postgresql-14.3/src/test/regress/regress.so', 'test_fdw_handler' - LANGUAGE C; -CREATE FUNCTION test_support_func(internal) - RETURNS internal - AS '/builddir/build/BUILD/postgresql-14.3/src/test/regress/regress.so', 'test_support_func' - LANGUAGE C STRICT; -CREATE FUNCTION test_opclass_options_func(internal) - RETURNS void - AS '/builddir/build/BUILD/postgresql-14.3/src/test/regress/regress.so', 'test_opclass_options_func' - LANGUAGE C; -CREATE FUNCTION test_enc_conversion(bytea, name, name, bool, validlen OUT int, result OUT bytea) - AS '/builddir/build/BUILD/postgresql-14.3/src/test/regress/regress.so', 'test_enc_conversion' - LANGUAGE C STRICT; -CREATE FUNCTION binary_coercible(oid, oid) - RETURNS bool - AS '/builddir/build/BUILD/postgresql-14.3/src/test/regress/regress.so', 'binary_coercible' - LANGUAGE C STRICT STABLE PARALLEL SAFE; --- Things that shouldn't work: -CREATE FUNCTION test1 (int) RETURNS int LANGUAGE SQL - AS 'SELECT ''not an integer'';'; -ERROR: return type mismatch in function declared to return integer -DETAIL: Actual return type is text. -CONTEXT: SQL function "test1" -CREATE FUNCTION test1 (int) RETURNS int LANGUAGE SQL - AS 'not even SQL'; -ERROR: syntax error at or near "not" -LINE 2: AS 'not even SQL'; - ^ -CREATE FUNCTION test1 (int) RETURNS int LANGUAGE SQL - AS 'SELECT 1, 2, 3;'; -ERROR: return type mismatch in function declared to return integer -DETAIL: Final statement must return exactly one column. -CONTEXT: SQL function "test1" -CREATE FUNCTION test1 (int) RETURNS int LANGUAGE SQL - AS 'SELECT $2;'; -ERROR: there is no parameter $2 -LINE 2: AS 'SELECT $2;'; - ^ -CREATE FUNCTION test1 (int) RETURNS int LANGUAGE SQL - AS 'a', 'b'; -ERROR: only one AS item needed for language "sql" -CREATE FUNCTION test1 (int) RETURNS int LANGUAGE C - AS 'nosuchfile'; -ERROR: could not access file "nosuchfile": No such file or directory -CREATE FUNCTION test1 (int) RETURNS int LANGUAGE C - AS '/builddir/build/BUILD/postgresql-14.3/src/test/regress/regress.so', 'nosuchsymbol'; -ERROR: could not find function "nosuchsymbol" in file "/builddir/build/BUILD/postgresql-14.3/src/test/regress/regress.so" -CREATE FUNCTION test1 (int) RETURNS int LANGUAGE internal - AS 'nosuch'; -ERROR: there is no built-in function named "nosuch" +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/geometry.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/geometry.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/geometry.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/geometry.out 2023-02-20 19:44:25.349207568 -0500 @@ -9,66 +9,30 @@ -- SELECT center(f1) AS center FROM BOX_TBL; - center ---------- - (1,1) - (2,2) - (-5,-4) - (2.5,3) - (3,3) -(5 rows) - +ERROR: relation "box_tbl" does not exist +LINE 2: FROM BOX_TBL; + ^ SELECT (@@ f1) AS center FROM BOX_TBL; - center ---------- - (1,1) - (2,2) - (-5,-4) - (2.5,3) - (3,3) -(5 rows) - +ERROR: relation "box_tbl" does not exist +LINE 2: FROM BOX_TBL; + ^ SELECT point(f1) AS center FROM CIRCLE_TBL; - center ------------ - (5,1) - (1,2) - (1,3) - (1,2) - (100,200) - (100,1) - (3,5) - (3,5) -(8 rows) - +ERROR: relation "circle_tbl" does not exist +LINE 2: FROM CIRCLE_TBL; + ^ SELECT (@@ f1) AS center FROM CIRCLE_TBL; - center ------------ - (5,1) - (1,2) - (1,3) - (1,2) - (100,200) - (100,1) - (3,5) - (3,5) -(8 rows) - +ERROR: relation "circle_tbl" does not exist +LINE 2: FROM CIRCLE_TBL; + ^ SELECT (@@ f1) AS center FROM POLYGON_TBL WHERE (# f1) > 2; - center -------------------------------- - (1.33333333333,1.33333333333) - (2.33333333333,1.33333333333) - (4,5) - (4,5) - (4,3) -(5 rows) - +ERROR: relation "polygon_tbl" does not exist +LINE 2: FROM POLYGON_TBL + ^ -- "is horizontal" function SELECT p1.f1 FROM POINT_TBL p1 @@ -682,232 +646,19 @@ -- Distance to box SELECT p.f1, b.f1, p.f1 <-> b.f1 AS dist_pb, b.f1 <-> p.f1 AS dist_bp FROM POINT_TBL p, BOX_TBL b; - f1 | f1 | dist_pb | dist_bp --------------------+---------------------+--------------------+-------------------- - (0,0) | (2,2),(0,0) | 0 | 0 - (0,0) | (3,3),(1,1) | 1.41421356237 | 1.41421356237 - (0,0) | (-2,2),(-8,-10) | 2 | 2 - (0,0) | (2.5,3.5),(2.5,2.5) | 3.53553390593 | 3.53553390593 - (0,0) | (3,3),(3,3) | 4.24264068712 | 4.24264068712 - (-10,0) | (2,2),(0,0) | 10 | 10 - (-10,0) | (3,3),(1,1) | 11.0453610172 | 11.0453610172 - (-10,0) | (-2,2),(-8,-10) | 2 | 2 - (-10,0) | (2.5,3.5),(2.5,2.5) | 12.747548784 | 12.747548784 - (-10,0) | (3,3),(3,3) | 13.3416640641 | 13.3416640641 - (-3,4) | (2,2),(0,0) | 3.60555127546 | 3.60555127546 - (-3,4) | (3,3),(1,1) | 4.12310562562 | 4.12310562562 - (-3,4) | (-2,2),(-8,-10) | 2 | 2 - (-3,4) | (2.5,3.5),(2.5,2.5) | 5.52268050859 | 5.52268050859 - (-3,4) | (3,3),(3,3) | 6.0827625303 | 6.0827625303 - (5.1,34.5) | (2,2),(0,0) | 32.6475113906 | 32.6475113906 - (5.1,34.5) | (3,3),(1,1) | 31.5699223946 | 31.5699223946 - (5.1,34.5) | (-2,2),(-8,-10) | 33.2664996656 | 33.2664996656 - (5.1,34.5) | (2.5,3.5),(2.5,2.5) | 31.108841187 | 31.108841187 - (5.1,34.5) | (3,3),(3,3) | 31.5699223946 | 31.5699223946 - (-5,-12) | (2,2),(0,0) | 13 | 13 - (-5,-12) | (3,3),(1,1) | 14.3178210633 | 14.3178210633 - (-5,-12) | (-2,2),(-8,-10) | 2 | 2 - (-5,-12) | (2.5,3.5),(2.5,2.5) | 16.3248277173 | 16.3248277173 - (-5,-12) | (3,3),(3,3) | 17 | 17 - (1e-300,-1e-300) | (2,2),(0,0) | 1.41421356237e-300 | 1.41421356237e-300 - (1e-300,-1e-300) | (3,3),(1,1) | 1.41421356237 | 1.41421356237 - (1e-300,-1e-300) | (-2,2),(-8,-10) | 2 | 2 - (1e-300,-1e-300) | (2.5,3.5),(2.5,2.5) | 3.53553390593 | 3.53553390593 - (1e-300,-1e-300) | (3,3),(3,3) | 4.24264068712 | 4.24264068712 - (1e+300,Infinity) | (2,2),(0,0) | Infinity | Infinity - (1e+300,Infinity) | (3,3),(1,1) | Infinity | Infinity - (1e+300,Infinity) | (-2,2),(-8,-10) | Infinity | Infinity - (1e+300,Infinity) | (2.5,3.5),(2.5,2.5) | Infinity | Infinity - (1e+300,Infinity) | (3,3),(3,3) | Infinity | Infinity - (Infinity,1e+300) | (2,2),(0,0) | Infinity | Infinity - (Infinity,1e+300) | (3,3),(1,1) | Infinity | Infinity - (Infinity,1e+300) | (-2,2),(-8,-10) | Infinity | Infinity - (Infinity,1e+300) | (2.5,3.5),(2.5,2.5) | Infinity | Infinity - (Infinity,1e+300) | (3,3),(3,3) | Infinity | Infinity - (NaN,NaN) | (2,2),(0,0) | NaN | NaN - (NaN,NaN) | (3,3),(1,1) | NaN | NaN - (NaN,NaN) | (-2,2),(-8,-10) | NaN | NaN - (NaN,NaN) | (2.5,3.5),(2.5,2.5) | NaN | NaN - (NaN,NaN) | (3,3),(3,3) | NaN | NaN - (10,10) | (2,2),(0,0) | 11.313708499 | 11.313708499 - (10,10) | (3,3),(1,1) | 9.89949493661 | 9.89949493661 - (10,10) | (-2,2),(-8,-10) | 14.4222051019 | 14.4222051019 - (10,10) | (2.5,3.5),(2.5,2.5) | 9.92471662064 | 9.92471662064 - (10,10) | (3,3),(3,3) | 9.89949493661 | 9.89949493661 -(50 rows) - +ERROR: relation "box_tbl" does not exist +LINE 1: ...st_pb, b.f1 <-> p.f1 AS dist_bp FROM POINT_TBL p, BOX_TBL b; + ^ -- Distance to path SELECT p.f1, p1.f1, p.f1 <-> p1.f1 AS dist_ppath, p1.f1 <-> p.f1 AS dist_pathp FROM POINT_TBL p, PATH_TBL p1; - f1 | f1 | dist_ppath | dist_pathp --------------------+---------------------------+--------------------+-------------------- - (0,0) | [(1,2),(3,4)] | 2.2360679775 | 2.2360679775 - (0,0) | ((1,2),(3,4)) | 2.2360679775 | 2.2360679775 - (0,0) | [(0,0),(3,0),(4,5),(1,6)] | 0 | 0 - (0,0) | ((1,2),(3,4)) | 2.2360679775 | 2.2360679775 - (0,0) | ((1,2),(3,4)) | 2.2360679775 | 2.2360679775 - (0,0) | [(1,2),(3,4)] | 2.2360679775 | 2.2360679775 - (0,0) | ((10,20)) | 22.360679775 | 22.360679775 - (0,0) | [(11,12),(13,14)] | 16.2788205961 | 16.2788205961 - (0,0) | ((11,12),(13,14)) | 16.2788205961 | 16.2788205961 - (-10,0) | [(1,2),(3,4)] | 11.1803398875 | 11.1803398875 - (-10,0) | ((1,2),(3,4)) | 11.1803398875 | 11.1803398875 - (-10,0) | [(0,0),(3,0),(4,5),(1,6)] | 10 | 10 - (-10,0) | ((1,2),(3,4)) | 11.1803398875 | 11.1803398875 - (-10,0) | ((1,2),(3,4)) | 11.1803398875 | 11.1803398875 - (-10,0) | [(1,2),(3,4)] | 11.1803398875 | 11.1803398875 - (-10,0) | ((10,20)) | 28.2842712475 | 28.2842712475 - (-10,0) | [(11,12),(13,14)] | 24.1867732449 | 24.1867732449 - (-10,0) | ((11,12),(13,14)) | 24.1867732449 | 24.1867732449 - (-3,4) | [(1,2),(3,4)] | 4.472135955 | 4.472135955 - (-3,4) | ((1,2),(3,4)) | 4.472135955 | 4.472135955 - (-3,4) | [(0,0),(3,0),(4,5),(1,6)] | 4.472135955 | 4.472135955 - (-3,4) | ((1,2),(3,4)) | 4.472135955 | 4.472135955 - (-3,4) | ((1,2),(3,4)) | 4.472135955 | 4.472135955 - (-3,4) | [(1,2),(3,4)] | 4.472135955 | 4.472135955 - (-3,4) | ((10,20)) | 20.6155281281 | 20.6155281281 - (-3,4) | [(11,12),(13,14)] | 16.1245154966 | 16.1245154966 - (-3,4) | ((11,12),(13,14)) | 16.1245154966 | 16.1245154966 - (5.1,34.5) | [(1,2),(3,4)] | 30.5722096028 | 30.5722096028 - (5.1,34.5) | ((1,2),(3,4)) | 30.5722096028 | 30.5722096028 - (5.1,34.5) | [(0,0),(3,0),(4,5),(1,6)] | 28.793402022 | 28.793402022 - (5.1,34.5) | ((1,2),(3,4)) | 30.5722096028 | 30.5722096028 - (5.1,34.5) | ((1,2),(3,4)) | 30.5722096028 | 30.5722096028 - (5.1,34.5) | [(1,2),(3,4)] | 30.5722096028 | 30.5722096028 - (5.1,34.5) | ((10,20)) | 15.3055545473 | 15.3055545473 - (5.1,34.5) | [(11,12),(13,14)] | 21.9695243462 | 21.9695243462 - (5.1,34.5) | ((11,12),(13,14)) | 21.9695243462 | 21.9695243462 - (-5,-12) | [(1,2),(3,4)] | 15.2315462117 | 15.2315462117 - (-5,-12) | ((1,2),(3,4)) | 15.2315462117 | 15.2315462117 - (-5,-12) | [(0,0),(3,0),(4,5),(1,6)] | 13 | 13 - (-5,-12) | ((1,2),(3,4)) | 15.2315462117 | 15.2315462117 - (-5,-12) | ((1,2),(3,4)) | 15.2315462117 | 15.2315462117 - (-5,-12) | [(1,2),(3,4)] | 15.2315462117 | 15.2315462117 - (-5,-12) | ((10,20)) | 35.3411940941 | 35.3411940941 - (-5,-12) | [(11,12),(13,14)] | 28.8444102037 | 28.8444102037 - (-5,-12) | ((11,12),(13,14)) | 28.8444102037 | 28.8444102037 - (1e-300,-1e-300) | [(1,2),(3,4)] | 2.2360679775 | 2.2360679775 - (1e-300,-1e-300) | ((1,2),(3,4)) | 2.2360679775 | 2.2360679775 - (1e-300,-1e-300) | [(0,0),(3,0),(4,5),(1,6)] | 1.41421356237e-300 | 1.41421356237e-300 - (1e-300,-1e-300) | ((1,2),(3,4)) | 2.2360679775 | 2.2360679775 - (1e-300,-1e-300) | ((1,2),(3,4)) | 2.2360679775 | 2.2360679775 - (1e-300,-1e-300) | [(1,2),(3,4)] | 2.2360679775 | 2.2360679775 - (1e-300,-1e-300) | ((10,20)) | 22.360679775 | 22.360679775 - (1e-300,-1e-300) | [(11,12),(13,14)] | 16.2788205961 | 16.2788205961 - (1e-300,-1e-300) | ((11,12),(13,14)) | 16.2788205961 | 16.2788205961 - (1e+300,Infinity) | [(1,2),(3,4)] | Infinity | Infinity - (1e+300,Infinity) | ((1,2),(3,4)) | Infinity | Infinity - (1e+300,Infinity) | [(0,0),(3,0),(4,5),(1,6)] | Infinity | Infinity - (1e+300,Infinity) | ((1,2),(3,4)) | Infinity | Infinity - (1e+300,Infinity) | ((1,2),(3,4)) | Infinity | Infinity - (1e+300,Infinity) | [(1,2),(3,4)] | Infinity | Infinity - (1e+300,Infinity) | ((10,20)) | Infinity | Infinity - (1e+300,Infinity) | [(11,12),(13,14)] | Infinity | Infinity - (1e+300,Infinity) | ((11,12),(13,14)) | Infinity | Infinity - (Infinity,1e+300) | [(1,2),(3,4)] | Infinity | Infinity - (Infinity,1e+300) | ((1,2),(3,4)) | Infinity | Infinity - (Infinity,1e+300) | [(0,0),(3,0),(4,5),(1,6)] | Infinity | Infinity - (Infinity,1e+300) | ((1,2),(3,4)) | Infinity | Infinity - (Infinity,1e+300) | ((1,2),(3,4)) | Infinity | Infinity - (Infinity,1e+300) | [(1,2),(3,4)] | Infinity | Infinity - (Infinity,1e+300) | ((10,20)) | Infinity | Infinity - (Infinity,1e+300) | [(11,12),(13,14)] | Infinity | Infinity - (Infinity,1e+300) | ((11,12),(13,14)) | Infinity | Infinity - (NaN,NaN) | [(1,2),(3,4)] | NaN | NaN - (NaN,NaN) | ((1,2),(3,4)) | NaN | NaN - (NaN,NaN) | [(0,0),(3,0),(4,5),(1,6)] | NaN | NaN - (NaN,NaN) | ((1,2),(3,4)) | NaN | NaN - (NaN,NaN) | ((1,2),(3,4)) | NaN | NaN - (NaN,NaN) | [(1,2),(3,4)] | NaN | NaN - (NaN,NaN) | ((10,20)) | NaN | NaN - (NaN,NaN) | [(11,12),(13,14)] | NaN | NaN - (NaN,NaN) | ((11,12),(13,14)) | NaN | NaN - (10,10) | [(1,2),(3,4)] | 9.21954445729 | 9.21954445729 - (10,10) | ((1,2),(3,4)) | 9.21954445729 | 9.21954445729 - (10,10) | [(0,0),(3,0),(4,5),(1,6)] | 7.81024967591 | 7.81024967591 - (10,10) | ((1,2),(3,4)) | 9.21954445729 | 9.21954445729 - (10,10) | ((1,2),(3,4)) | 9.21954445729 | 9.21954445729 - (10,10) | [(1,2),(3,4)] | 9.21954445729 | 9.21954445729 - (10,10) | ((10,20)) | 10 | 10 - (10,10) | [(11,12),(13,14)] | 2.2360679775 | 2.2360679775 - (10,10) | ((11,12),(13,14)) | 2.2360679775 | 2.2360679775 -(90 rows) - +ERROR: relation "path_tbl" does not exist +LINE 1: ...h, p1.f1 <-> p.f1 AS dist_pathp FROM POINT_TBL p, PATH_TBL p... + ^ -- Distance to polygon SELECT p.f1, p1.f1, p.f1 <-> p1.f1 AS dist_ppoly, p1.f1 <-> p.f1 AS dist_polyp FROM POINT_TBL p, POLYGON_TBL p1; - f1 | f1 | dist_ppoly | dist_polyp --------------------+----------------------------+---------------+--------------- - (0,0) | ((2,0),(2,4),(0,0)) | 0 | 0 - (0,0) | ((3,1),(3,3),(1,0)) | 1 | 1 - (0,0) | ((1,2),(3,4),(5,6),(7,8)) | 2.2360679775 | 2.2360679775 - (0,0) | ((7,8),(5,6),(3,4),(1,2)) | 2.2360679775 | 2.2360679775 - (0,0) | ((1,2),(7,8),(5,6),(3,-4)) | 1.58113883008 | 1.58113883008 - (0,0) | ((0,0)) | 0 | 0 - (0,0) | ((0,1),(0,1)) | 1 | 1 - (-10,0) | ((2,0),(2,4),(0,0)) | 10 | 10 - (-10,0) | ((3,1),(3,3),(1,0)) | 11 | 11 - (-10,0) | ((1,2),(3,4),(5,6),(7,8)) | 11.1803398875 | 11.1803398875 - (-10,0) | ((7,8),(5,6),(3,4),(1,2)) | 11.1803398875 | 11.1803398875 - (-10,0) | ((1,2),(7,8),(5,6),(3,-4)) | 11.1803398875 | 11.1803398875 - (-10,0) | ((0,0)) | 10 | 10 - (-10,0) | ((0,1),(0,1)) | 10.0498756211 | 10.0498756211 - (-3,4) | ((2,0),(2,4),(0,0)) | 4.472135955 | 4.472135955 - (-3,4) | ((3,1),(3,3),(1,0)) | 5.54700196225 | 5.54700196225 - (-3,4) | ((1,2),(3,4),(5,6),(7,8)) | 4.472135955 | 4.472135955 - (-3,4) | ((7,8),(5,6),(3,4),(1,2)) | 4.472135955 | 4.472135955 - (-3,4) | ((1,2),(7,8),(5,6),(3,-4)) | 4.472135955 | 4.472135955 - (-3,4) | ((0,0)) | 5 | 5 - (-3,4) | ((0,1),(0,1)) | 4.24264068712 | 4.24264068712 - (5.1,34.5) | ((2,0),(2,4),(0,0)) | 30.6571362002 | 30.6571362002 - (5.1,34.5) | ((3,1),(3,3),(1,0)) | 31.5699223946 | 31.5699223946 - (5.1,34.5) | ((1,2),(3,4),(5,6),(7,8)) | 26.5680258958 | 26.5680258958 - (5.1,34.5) | ((7,8),(5,6),(3,4),(1,2)) | 26.5680258958 | 26.5680258958 - (5.1,34.5) | ((1,2),(7,8),(5,6),(3,-4)) | 26.5680258958 | 26.5680258958 - (5.1,34.5) | ((0,0)) | 34.8749193547 | 34.8749193547 - (5.1,34.5) | ((0,1),(0,1)) | 33.8859853037 | 33.8859853037 - (-5,-12) | ((2,0),(2,4),(0,0)) | 13 | 13 - (-5,-12) | ((3,1),(3,3),(1,0)) | 13.416407865 | 13.416407865 - (-5,-12) | ((1,2),(3,4),(5,6),(7,8)) | 15.2315462117 | 15.2315462117 - (-5,-12) | ((7,8),(5,6),(3,4),(1,2)) | 15.2315462117 | 15.2315462117 - (-5,-12) | ((1,2),(7,8),(5,6),(3,-4)) | 11.313708499 | 11.313708499 - (-5,-12) | ((0,0)) | 13 | 13 - (-5,-12) | ((0,1),(0,1)) | 13.9283882772 | 13.9283882772 - (1e-300,-1e-300) | ((2,0),(2,4),(0,0)) | 0 | 0 - (1e-300,-1e-300) | ((3,1),(3,3),(1,0)) | 1 | 1 - (1e-300,-1e-300) | ((1,2),(3,4),(5,6),(7,8)) | 2.2360679775 | 2.2360679775 - (1e-300,-1e-300) | ((7,8),(5,6),(3,4),(1,2)) | 2.2360679775 | 2.2360679775 - (1e-300,-1e-300) | ((1,2),(7,8),(5,6),(3,-4)) | 1.58113883008 | 1.58113883008 - (1e-300,-1e-300) | ((0,0)) | 0 | 0 - (1e-300,-1e-300) | ((0,1),(0,1)) | 1 | 1 - (1e+300,Infinity) | ((2,0),(2,4),(0,0)) | Infinity | Infinity - (1e+300,Infinity) | ((3,1),(3,3),(1,0)) | Infinity | Infinity - (1e+300,Infinity) | ((1,2),(3,4),(5,6),(7,8)) | Infinity | Infinity - (1e+300,Infinity) | ((7,8),(5,6),(3,4),(1,2)) | Infinity | Infinity - (1e+300,Infinity) | ((1,2),(7,8),(5,6),(3,-4)) | Infinity | Infinity - (1e+300,Infinity) | ((0,0)) | Infinity | Infinity - (1e+300,Infinity) | ((0,1),(0,1)) | Infinity | Infinity - (Infinity,1e+300) | ((2,0),(2,4),(0,0)) | Infinity | Infinity - (Infinity,1e+300) | ((3,1),(3,3),(1,0)) | Infinity | Infinity - (Infinity,1e+300) | ((1,2),(3,4),(5,6),(7,8)) | Infinity | Infinity - (Infinity,1e+300) | ((7,8),(5,6),(3,4),(1,2)) | Infinity | Infinity - (Infinity,1e+300) | ((1,2),(7,8),(5,6),(3,-4)) | Infinity | Infinity - (Infinity,1e+300) | ((0,0)) | Infinity | Infinity - (Infinity,1e+300) | ((0,1),(0,1)) | Infinity | Infinity - (NaN,NaN) | ((2,0),(2,4),(0,0)) | 0 | 0 - (NaN,NaN) | ((3,1),(3,3),(1,0)) | 0 | 0 - (NaN,NaN) | ((1,2),(3,4),(5,6),(7,8)) | 0 | 0 - (NaN,NaN) | ((7,8),(5,6),(3,4),(1,2)) | 0 | 0 - (NaN,NaN) | ((1,2),(7,8),(5,6),(3,-4)) | 0 | 0 - (NaN,NaN) | ((0,0)) | 0 | 0 - (NaN,NaN) | ((0,1),(0,1)) | 0 | 0 - (10,10) | ((2,0),(2,4),(0,0)) | 10 | 10 - (10,10) | ((3,1),(3,3),(1,0)) | 9.89949493661 | 9.89949493661 - (10,10) | ((1,2),(3,4),(5,6),(7,8)) | 3.60555127546 | 3.60555127546 - (10,10) | ((7,8),(5,6),(3,4),(1,2)) | 3.60555127546 | 3.60555127546 - (10,10) | ((1,2),(7,8),(5,6),(3,-4)) | 3.60555127546 | 3.60555127546 - (10,10) | ((0,0)) | 14.1421356237 | 14.1421356237 - (10,10) | ((0,1),(0,1)) | 13.4536240471 | 13.4536240471 -(70 rows) - +ERROR: relation "polygon_tbl" does not exist +LINE 1: ...y, p1.f1 <-> p.f1 AS dist_polyp FROM POINT_TBL p, POLYGON_TB... + ^ -- Construct line through two points SELECT p1.f1, p2.f1, line(p1.f1, p2.f1) FROM POINT_TBL p1, POINT_TBL p2 WHERE p1.f1 <> p2.f1; @@ -1197,60 +948,9 @@ -- Closest point to box SELECT p.f1, b.f1, p.f1 ## b.f1 FROM POINT_TBL p, BOX_TBL b; - f1 | f1 | ?column? --------------------+---------------------+-------------- - (0,0) | (2,2),(0,0) | (0,0) - (0,0) | (3,3),(1,1) | (1,1) - (0,0) | (-2,2),(-8,-10) | (-2,0) - (0,0) | (2.5,3.5),(2.5,2.5) | (2.5,2.5) - (0,0) | (3,3),(3,3) | (3,3) - (-10,0) | (2,2),(0,0) | (0,0) - (-10,0) | (3,3),(1,1) | (1,1) - (-10,0) | (-2,2),(-8,-10) | (-8,0) - (-10,0) | (2.5,3.5),(2.5,2.5) | (2.5,2.5) - (-10,0) | (3,3),(3,3) | (3,3) - (-3,4) | (2,2),(0,0) | (0,2) - (-3,4) | (3,3),(1,1) | (1,3) - (-3,4) | (-2,2),(-8,-10) | (-3,2) - (-3,4) | (2.5,3.5),(2.5,2.5) | (2.5,3.5) - (-3,4) | (3,3),(3,3) | (3,3) - (5.1,34.5) | (2,2),(0,0) | (2,2) - (5.1,34.5) | (3,3),(1,1) | (3,3) - (5.1,34.5) | (-2,2),(-8,-10) | (-2,2) - (5.1,34.5) | (2.5,3.5),(2.5,2.5) | (2.5,3.5) - (5.1,34.5) | (3,3),(3,3) | (3,3) - (-5,-12) | (2,2),(0,0) | (0,0) - (-5,-12) | (3,3),(1,1) | (1,1) - (-5,-12) | (-2,2),(-8,-10) | (-5,-10) - (-5,-12) | (2.5,3.5),(2.5,2.5) | (2.5,2.5) - (-5,-12) | (3,3),(3,3) | (3,3) - (1e-300,-1e-300) | (2,2),(0,0) | (0,0) - (1e-300,-1e-300) | (3,3),(1,1) | (1,1) - (1e-300,-1e-300) | (-2,2),(-8,-10) | (-2,-1e-300) - (1e-300,-1e-300) | (2.5,3.5),(2.5,2.5) | (2.5,2.5) - (1e-300,-1e-300) | (3,3),(3,3) | (3,3) - (1e+300,Infinity) | (2,2),(0,0) | (0,2) - (1e+300,Infinity) | (3,3),(1,1) | (1,3) - (1e+300,Infinity) | (-2,2),(-8,-10) | (-8,2) - (1e+300,Infinity) | (2.5,3.5),(2.5,2.5) | (2.5,3.5) - (1e+300,Infinity) | (3,3),(3,3) | (3,3) - (Infinity,1e+300) | (2,2),(0,0) | (0,2) - (Infinity,1e+300) | (3,3),(1,1) | (1,3) - (Infinity,1e+300) | (-2,2),(-8,-10) | (-8,2) - (Infinity,1e+300) | (2.5,3.5),(2.5,2.5) | (2.5,3.5) - (Infinity,1e+300) | (3,3),(3,3) | (3,3) - (NaN,NaN) | (2,2),(0,0) | - (NaN,NaN) | (3,3),(1,1) | - (NaN,NaN) | (-2,2),(-8,-10) | - (NaN,NaN) | (2.5,3.5),(2.5,2.5) | - (NaN,NaN) | (3,3),(3,3) | - (10,10) | (2,2),(0,0) | (2,2) - (10,10) | (3,3),(1,1) | (3,3) - (10,10) | (-2,2),(-8,-10) | (-2,2) - (10,10) | (2.5,3.5),(2.5,2.5) | (2.5,3.5) - (10,10) | (3,3),(3,3) | (3,3) -(50 rows) - +ERROR: relation "box_tbl" does not exist +LINE 1: SELECT p.f1, b.f1, p.f1 ## b.f1 FROM POINT_TBL p, BOX_TBL b; + ^ -- On line SELECT p.f1, l.s FROM POINT_TBL p, LINE_TBL l WHERE p.f1 <@ l.s; f1 | s @@ -1274,17 +974,9 @@ -- On path SELECT p.f1, p1.f1 FROM POINT_TBL p, PATH_TBL p1 WHERE p.f1 <@ p1.f1; - f1 | f1 -------------------+--------------------------- - (0,0) | [(0,0),(3,0),(4,5),(1,6)] - (1e-300,-1e-300) | [(0,0),(3,0),(4,5),(1,6)] - (NaN,NaN) | ((1,2),(3,4)) - (NaN,NaN) | ((1,2),(3,4)) - (NaN,NaN) | ((1,2),(3,4)) - (NaN,NaN) | ((10,20)) - (NaN,NaN) | ((11,12),(13,14)) -(7 rows) - +ERROR: relation "path_tbl" does not exist +LINE 1: SELECT p.f1, p1.f1 FROM POINT_TBL p, PATH_TBL p1 WHERE p.f1 ... + ^ -- -- Lines -- @@ -1469,9 +1161,13 @@ -- Distance to box SELECT l.s, b.f1, l.s <-> b.f1 FROM LINE_TBL l, BOX_TBL b; -ERROR: function "dist_lb" not implemented +ERROR: relation "box_tbl" does not exist +LINE 1: SELECT l.s, b.f1, l.s <-> b.f1 FROM LINE_TBL l, BOX_TBL b; + ^ SELECT l.s, b.f1, b.f1 <-> l.s FROM LINE_TBL l, BOX_TBL b; -ERROR: function "dist_bl" not implemented +ERROR: relation "box_tbl" does not exist +LINE 1: SELECT l.s, b.f1, b.f1 <-> l.s FROM LINE_TBL l, BOX_TBL b; + ^ -- Intersect with line SELECT l1.s, l2.s FROM LINE_TBL l1, LINE_TBL l2 WHERE l1.s ?# l2.s; s | s @@ -1564,23 +1260,9 @@ -- Intersect with box SELECT l.s, b.f1 FROM LINE_TBL l, BOX_TBL b WHERE l.s ?# b.f1; - s | f1 ---------------+--------------------- - {1,0,5} | (-2,2),(-8,-10) - {0,3,0} | (2,2),(0,0) - {0,3,0} | (-2,2),(-8,-10) - {1,-1,0} | (2,2),(0,0) - {1,-1,0} | (3,3),(1,1) - {1,-1,0} | (-2,2),(-8,-10) - {1,-1,0} | (2.5,3.5),(2.5,2.5) - {1,-1,0} | (3,3),(3,3) - {-0.4,-1,-6} | (-2,2),(-8,-10) - {0,-1,3} | (3,3),(1,1) - {0,-1,3} | (2.5,3.5),(2.5,2.5) - {0,-1,3} | (3,3),(3,3) - {-1,0,3} | (3,3),(1,1) -(13 rows) - +ERROR: relation "box_tbl" does not exist +LINE 1: SELECT l.s, b.f1 FROM LINE_TBL l, BOX_TBL b WHERE l.s ?# b.f... + ^ -- Intersection point with line SELECT l1.s, l2.s, l1.s # l2.s FROM LINE_TBL l1, LINE_TBL l2; s | s | ?column? @@ -1775,7 +1457,9 @@ -- Closest point to box SELECT l.s, b.f1, l.s ## b.f1 FROM LINE_TBL l, BOX_TBL b; -ERROR: function "close_lb" not implemented +ERROR: relation "box_tbl" does not exist +LINE 1: SELECT l.s, b.f1, l.s ## b.f1 FROM LINE_TBL l, BOX_TBL b; + ^ -- -- Line segments -- @@ -2225,50 +1909,9 @@ -- Distance to box SELECT l.s, b.f1, l.s <-> b.f1 AS dist_sb, b.f1 <-> l.s AS dist_bs FROM LSEG_TBL l, BOX_TBL b; - s | f1 | dist_sb | dist_bs --------------------------------+---------------------+----------------+---------------- - [(1,2),(3,4)] | (2,2),(0,0) | 0 | 0 - [(1,2),(3,4)] | (3,3),(1,1) | 0 | 0 - [(1,2),(3,4)] | (-2,2),(-8,-10) | 3 | 3 - [(1,2),(3,4)] | (2.5,3.5),(2.5,2.5) | 0 | 0 - [(1,2),(3,4)] | (3,3),(3,3) | 0.707106781187 | 0.707106781187 - [(0,0),(6,6)] | (2,2),(0,0) | 0 | 0 - [(0,0),(6,6)] | (3,3),(1,1) | 0 | 0 - [(0,0),(6,6)] | (-2,2),(-8,-10) | 2 | 2 - [(0,0),(6,6)] | (2.5,3.5),(2.5,2.5) | 0 | 0 - [(0,0),(6,6)] | (3,3),(3,3) | 0 | 0 - [(10,-10),(-3,-4)] | (2,2),(0,0) | 4.88901207039 | 4.88901207039 - [(10,-10),(-3,-4)] | (3,3),(1,1) | 6.21602963235 | 6.21602963235 - [(10,-10),(-3,-4)] | (-2,2),(-8,-10) | 0 | 0 - [(10,-10),(-3,-4)] | (2.5,3.5),(2.5,2.5) | 8.20655597529 | 8.20655597529 - [(10,-10),(-3,-4)] | (3,3),(3,3) | 8.87006475627 | 8.87006475627 - [(-1000000,200),(300000,-40)] | (2,2),(0,0) | 13.3842459258 | 13.3842459258 - [(-1000000,200),(300000,-40)] | (3,3),(1,1) | 12.3840613274 | 12.3840613274 - [(-1000000,200),(300000,-40)] | (-2,2),(-8,-10) | 13.3849843873 | 13.3849843873 - [(-1000000,200),(300000,-40)] | (2.5,3.5),(2.5,2.5) | 11.8841536436 | 11.8841536436 - [(-1000000,200),(300000,-40)] | (3,3),(3,3) | 12.3840613274 | 12.3840613274 - [(11,22),(33,44)] | (2,2),(0,0) | 21.9317121995 | 21.9317121995 - [(11,22),(33,44)] | (3,3),(1,1) | 20.6155281281 | 20.6155281281 - [(11,22),(33,44)] | (-2,2),(-8,-10) | 23.8537208838 | 23.8537208838 - [(11,22),(33,44)] | (2.5,3.5),(2.5,2.5) | 20.3592730715 | 20.3592730715 - [(11,22),(33,44)] | (3,3),(3,3) | 20.6155281281 | 20.6155281281 - [(-10,2),(-10,3)] | (2,2),(0,0) | 10 | 10 - [(-10,2),(-10,3)] | (3,3),(1,1) | 11 | 11 - [(-10,2),(-10,3)] | (-2,2),(-8,-10) | 2 | 2 - [(-10,2),(-10,3)] | (2.5,3.5),(2.5,2.5) | 12.5 | 12.5 - [(-10,2),(-10,3)] | (3,3),(3,3) | 13 | 13 - [(0,-20),(30,-20)] | (2,2),(0,0) | 20 | 20 - [(0,-20),(30,-20)] | (3,3),(1,1) | 21 | 21 - [(0,-20),(30,-20)] | (-2,2),(-8,-10) | 10.1980390272 | 10.1980390272 - [(0,-20),(30,-20)] | (2.5,3.5),(2.5,2.5) | 22.5 | 22.5 - [(0,-20),(30,-20)] | (3,3),(3,3) | 23 | 23 - [(NaN,1),(NaN,90)] | (2,2),(0,0) | NaN | NaN - [(NaN,1),(NaN,90)] | (3,3),(1,1) | NaN | NaN - [(NaN,1),(NaN,90)] | (-2,2),(-8,-10) | NaN | NaN - [(NaN,1),(NaN,90)] | (2.5,3.5),(2.5,2.5) | NaN | NaN - [(NaN,1),(NaN,90)] | (3,3),(3,3) | NaN | NaN -(40 rows) - +ERROR: relation "box_tbl" does not exist +LINE 1: ...dist_sb, b.f1 <-> l.s AS dist_bs FROM LSEG_TBL l, BOX_TBL b; + ^ -- Intersect with line segment SELECT l.s, l1.s FROM LSEG_TBL l, LINE_TBL l1 WHERE l.s ?# l1.s; s | s @@ -2294,18 +1937,9 @@ -- Intersect with box SELECT l.s, b.f1 FROM LSEG_TBL l, BOX_TBL b WHERE l.s ?# b.f1; - s | f1 ---------------------+--------------------- - [(1,2),(3,4)] | (2,2),(0,0) - [(1,2),(3,4)] | (3,3),(1,1) - [(1,2),(3,4)] | (2.5,3.5),(2.5,2.5) - [(0,0),(6,6)] | (2,2),(0,0) - [(0,0),(6,6)] | (3,3),(1,1) - [(0,0),(6,6)] | (2.5,3.5),(2.5,2.5) - [(0,0),(6,6)] | (3,3),(3,3) - [(10,-10),(-3,-4)] | (-2,2),(-8,-10) -(8 rows) - +ERROR: relation "box_tbl" does not exist +LINE 1: SELECT l.s, b.f1 FROM LSEG_TBL l, BOX_TBL b WHERE l.s ?# b.f... + ^ -- Intersection point with line segment SELECT l1.s, l2.s, l1.s # l2.s FROM LSEG_TBL l1, LSEG_TBL l2; s | s | ?column? @@ -2451,50 +2085,9 @@ -- Closest point to box SELECT l.s, b.f1, l.s ## b.f1 FROM LSEG_TBL l, BOX_TBL b; - s | f1 | ?column? --------------------------------+---------------------+------------- - [(1,2),(3,4)] | (2,2),(0,0) | (1,2) - [(1,2),(3,4)] | (3,3),(1,1) | (1.5,2.5) - [(1,2),(3,4)] | (-2,2),(-8,-10) | (-2,2) - [(1,2),(3,4)] | (2.5,3.5),(2.5,2.5) | (2.25,3.25) - [(1,2),(3,4)] | (3,3),(3,3) | (3,3) - [(0,0),(6,6)] | (2,2),(0,0) | (1,1) - [(0,0),(6,6)] | (3,3),(1,1) | (2,2) - [(0,0),(6,6)] | (-2,2),(-8,-10) | (-2,0) - [(0,0),(6,6)] | (2.5,3.5),(2.5,2.5) | (2.75,2.75) - [(0,0),(6,6)] | (3,3),(3,3) | (3,3) - [(10,-10),(-3,-4)] | (2,2),(0,0) | (0,0) - [(10,-10),(-3,-4)] | (3,3),(1,1) | (1,1) - [(10,-10),(-3,-4)] | (-2,2),(-8,-10) | (-3,-4) - [(10,-10),(-3,-4)] | (2.5,3.5),(2.5,2.5) | (2.5,2.5) - [(10,-10),(-3,-4)] | (3,3),(3,3) | (3,3) - [(-1000000,200),(300000,-40)] | (2,2),(0,0) | (2,2) - [(-1000000,200),(300000,-40)] | (3,3),(1,1) | (3,3) - [(-1000000,200),(300000,-40)] | (-2,2),(-8,-10) | (-2,2) - [(-1000000,200),(300000,-40)] | (2.5,3.5),(2.5,2.5) | (2.5,3.5) - [(-1000000,200),(300000,-40)] | (3,3),(3,3) | (3,3) - [(11,22),(33,44)] | (2,2),(0,0) | (2,2) - [(11,22),(33,44)] | (3,3),(1,1) | (3,3) - [(11,22),(33,44)] | (-2,2),(-8,-10) | (-2,2) - [(11,22),(33,44)] | (2.5,3.5),(2.5,2.5) | (2.5,3.5) - [(11,22),(33,44)] | (3,3),(3,3) | (3,3) - [(-10,2),(-10,3)] | (2,2),(0,0) | (0,2) - [(-10,2),(-10,3)] | (3,3),(1,1) | (1,2) - [(-10,2),(-10,3)] | (-2,2),(-8,-10) | (-8,2) - [(-10,2),(-10,3)] | (2.5,3.5),(2.5,2.5) | (2.5,3) - [(-10,2),(-10,3)] | (3,3),(3,3) | (3,3) - [(0,-20),(30,-20)] | (2,2),(0,0) | (0,0) - [(0,-20),(30,-20)] | (3,3),(1,1) | (1,1) - [(0,-20),(30,-20)] | (-2,2),(-8,-10) | (-2,-10) - [(0,-20),(30,-20)] | (2.5,3.5),(2.5,2.5) | (2.5,2.5) - [(0,-20),(30,-20)] | (3,3),(3,3) | (3,3) - [(NaN,1),(NaN,90)] | (2,2),(0,0) | - [(NaN,1),(NaN,90)] | (3,3),(1,1) | - [(NaN,1),(NaN,90)] | (-2,2),(-8,-10) | - [(NaN,1),(NaN,90)] | (2.5,3.5),(2.5,2.5) | - [(NaN,1),(NaN,90)] | (3,3),(3,3) | -(40 rows) - +ERROR: relation "box_tbl" does not exist +LINE 1: SELECT l.s, b.f1, l.s ## b.f1 FROM LSEG_TBL l, BOX_TBL b; + ^ -- On line SELECT l.s, l1.s FROM LSEG_TBL l, LINE_TBL l1 WHERE l.s <@ l1.s; s | s @@ -2505,192 +2098,42 @@ -- On box SELECT l.s, b.f1 FROM LSEG_TBL l, BOX_TBL b WHERE l.s <@ b.f1; - s | f1 ----+---- -(0 rows) - +ERROR: relation "box_tbl" does not exist +LINE 1: SELECT l.s, b.f1 FROM LSEG_TBL l, BOX_TBL b WHERE l.s <@ b.f... + ^ -- -- Boxes -- SELECT box(f1) AS box FROM CIRCLE_TBL; - box ----------------------------------------------------------------- - (7.12132034356,3.12132034356),(2.87867965644,-1.12132034356) - (71.7106781187,72.7106781187),(-69.7106781187,-68.7106781187) - (4.53553390593,6.53553390593),(-2.53553390593,-0.535533905933) - (3.12132034356,4.12132034356),(-1.12132034356,-0.12132034356) - (107.071067812,207.071067812),(92.9289321881,192.928932188) - (181.317279836,82.3172798365),(18.6827201635,-80.3172798365) - (3,5),(3,5) - (NaN,NaN),(NaN,NaN) -(8 rows) - +ERROR: relation "circle_tbl" does not exist +LINE 1: SELECT box(f1) AS box FROM CIRCLE_TBL; + ^ -- translation SELECT b.f1 + p.f1 AS translation FROM BOX_TBL b, POINT_TBL p; - translation -------------------------------------- - (2,2),(0,0) - (3,3),(1,1) - (-2,2),(-8,-10) - (2.5,3.5),(2.5,2.5) - (3,3),(3,3) - (-8,2),(-10,0) - (-7,3),(-9,1) - (-12,2),(-18,-10) - (-7.5,3.5),(-7.5,2.5) - (-7,3),(-7,3) - (-1,6),(-3,4) - (0,7),(-2,5) - (-5,6),(-11,-6) - (-0.5,7.5),(-0.5,6.5) - (0,7),(0,7) - (7.1,36.5),(5.1,34.5) - (8.1,37.5),(6.1,35.5) - (3.1,36.5),(-2.9,24.5) - (7.6,38),(7.6,37) - (8.1,37.5),(8.1,37.5) - (-3,-10),(-5,-12) - (-2,-9),(-4,-11) - (-7,-10),(-13,-22) - (-2.5,-8.5),(-2.5,-9.5) - (-2,-9),(-2,-9) - (2,2),(1e-300,-1e-300) - (3,3),(1,1) - (-2,2),(-8,-10) - (2.5,3.5),(2.5,2.5) - (3,3),(3,3) - (1e+300,Infinity),(1e+300,Infinity) - (1e+300,Infinity),(1e+300,Infinity) - (1e+300,Infinity),(1e+300,Infinity) - (1e+300,Infinity),(1e+300,Infinity) - (1e+300,Infinity),(1e+300,Infinity) - (Infinity,1e+300),(Infinity,1e+300) - (Infinity,1e+300),(Infinity,1e+300) - (Infinity,1e+300),(Infinity,1e+300) - (Infinity,1e+300),(Infinity,1e+300) - (Infinity,1e+300),(Infinity,1e+300) - (NaN,NaN),(NaN,NaN) - (NaN,NaN),(NaN,NaN) - (NaN,NaN),(NaN,NaN) - (NaN,NaN),(NaN,NaN) - (NaN,NaN),(NaN,NaN) - (12,12),(10,10) - (13,13),(11,11) - (8,12),(2,0) - (12.5,13.5),(12.5,12.5) - (13,13),(13,13) -(50 rows) - +ERROR: relation "box_tbl" does not exist +LINE 2: FROM BOX_TBL b, POINT_TBL p; + ^ SELECT b.f1 - p.f1 AS translation FROM BOX_TBL b, POINT_TBL p; - translation ------------------------------------------ - (2,2),(0,0) - (3,3),(1,1) - (-2,2),(-8,-10) - (2.5,3.5),(2.5,2.5) - (3,3),(3,3) - (12,2),(10,0) - (13,3),(11,1) - (8,2),(2,-10) - (12.5,3.5),(12.5,2.5) - (13,3),(13,3) - (5,-2),(3,-4) - (6,-1),(4,-3) - (1,-2),(-5,-14) - (5.5,-0.5),(5.5,-1.5) - (6,-1),(6,-1) - (-3.1,-32.5),(-5.1,-34.5) - (-2.1,-31.5),(-4.1,-33.5) - (-7.1,-32.5),(-13.1,-44.5) - (-2.6,-31),(-2.6,-32) - (-2.1,-31.5),(-2.1,-31.5) - (7,14),(5,12) - (8,15),(6,13) - (3,14),(-3,2) - (7.5,15.5),(7.5,14.5) - (8,15),(8,15) - (2,2),(-1e-300,1e-300) - (3,3),(1,1) - (-2,2),(-8,-10) - (2.5,3.5),(2.5,2.5) - (3,3),(3,3) - (-1e+300,-Infinity),(-1e+300,-Infinity) - (-1e+300,-Infinity),(-1e+300,-Infinity) - (-1e+300,-Infinity),(-1e+300,-Infinity) - (-1e+300,-Infinity),(-1e+300,-Infinity) - (-1e+300,-Infinity),(-1e+300,-Infinity) - (-Infinity,-1e+300),(-Infinity,-1e+300) - (-Infinity,-1e+300),(-Infinity,-1e+300) - (-Infinity,-1e+300),(-Infinity,-1e+300) - (-Infinity,-1e+300),(-Infinity,-1e+300) - (-Infinity,-1e+300),(-Infinity,-1e+300) - (NaN,NaN),(NaN,NaN) - (NaN,NaN),(NaN,NaN) - (NaN,NaN),(NaN,NaN) - (NaN,NaN),(NaN,NaN) - (NaN,NaN),(NaN,NaN) - (-8,-8),(-10,-10) - (-7,-7),(-9,-9) - (-12,-8),(-18,-20) - (-7.5,-6.5),(-7.5,-7.5) - (-7,-7),(-7,-7) -(50 rows) - +ERROR: relation "box_tbl" does not exist +LINE 2: FROM BOX_TBL b, POINT_TBL p; + ^ -- Multiply with point SELECT b.f1, p.f1, b.f1 * p.f1 FROM BOX_TBL b, POINT_TBL p WHERE p.f1[0] BETWEEN 1 AND 1000; - f1 | f1 | ?column? ----------------------+------------+----------------------------- - (2,2),(0,0) | (5.1,34.5) | (0,79.2),(-58.8,0) - (2,2),(0,0) | (10,10) | (0,40),(0,0) - (3,3),(1,1) | (5.1,34.5) | (-29.4,118.8),(-88.2,39.6) - (3,3),(1,1) | (10,10) | (0,60),(0,20) - (-2,2),(-8,-10) | (5.1,34.5) | (304.2,-58.8),(-79.2,-327) - (-2,2),(-8,-10) | (10,10) | (20,0),(-40,-180) - (2.5,3.5),(2.5,2.5) | (5.1,34.5) | (-73.5,104.1),(-108,99) - (2.5,3.5),(2.5,2.5) | (10,10) | (0,60),(-10,50) - (3,3),(3,3) | (5.1,34.5) | (-88.2,118.8),(-88.2,118.8) - (3,3),(3,3) | (10,10) | (0,60),(0,60) -(10 rows) - +ERROR: relation "box_tbl" does not exist +LINE 1: SELECT b.f1, p.f1, b.f1 * p.f1 FROM BOX_TBL b, POINT_TBL p W... + ^ -- Overflow error SELECT b.f1, p.f1, b.f1 * p.f1 FROM BOX_TBL b, POINT_TBL p WHERE p.f1[0] > 1000; - f1 | f1 | ?column? ----------------------+-------------------+-------------------------------------------- - (2,2),(0,0) | (1e+300,Infinity) | (NaN,NaN),(-Infinity,Infinity) - (2,2),(0,0) | (Infinity,1e+300) | (NaN,NaN),(Infinity,Infinity) - (2,2),(0,0) | (NaN,NaN) | (NaN,NaN),(NaN,NaN) - (3,3),(1,1) | (1e+300,Infinity) | (-Infinity,Infinity),(-Infinity,Infinity) - (3,3),(1,1) | (Infinity,1e+300) | (Infinity,Infinity),(Infinity,Infinity) - (3,3),(1,1) | (NaN,NaN) | (NaN,NaN),(NaN,NaN) - (-2,2),(-8,-10) | (1e+300,Infinity) | (Infinity,-Infinity),(-Infinity,-Infinity) - (-2,2),(-8,-10) | (Infinity,1e+300) | (-Infinity,Infinity),(-Infinity,-Infinity) - (-2,2),(-8,-10) | (NaN,NaN) | (NaN,NaN),(NaN,NaN) - (2.5,3.5),(2.5,2.5) | (1e+300,Infinity) | (-Infinity,Infinity),(-Infinity,Infinity) - (2.5,3.5),(2.5,2.5) | (Infinity,1e+300) | (Infinity,Infinity),(Infinity,Infinity) - (2.5,3.5),(2.5,2.5) | (NaN,NaN) | (NaN,NaN),(NaN,NaN) - (3,3),(3,3) | (1e+300,Infinity) | (-Infinity,Infinity),(-Infinity,Infinity) - (3,3),(3,3) | (Infinity,1e+300) | (Infinity,Infinity),(Infinity,Infinity) - (3,3),(3,3) | (NaN,NaN) | (NaN,NaN),(NaN,NaN) -(15 rows) - +ERROR: relation "box_tbl" does not exist +LINE 1: SELECT b.f1, p.f1, b.f1 * p.f1 FROM BOX_TBL b, POINT_TBL p W... + ^ -- Divide by point SELECT b.f1, p.f1, b.f1 / p.f1 FROM BOX_TBL b, POINT_TBL p WHERE p.f1[0] BETWEEN 1 AND 1000; - f1 | f1 | ?column? ----------------------+------------+---------------------------------------------------------------------- - (2,2),(0,0) | (5.1,34.5) | (0.0651176557644,0),(0,-0.0483449262493) - (2,2),(0,0) | (10,10) | (0.2,0),(0,0) - (3,3),(1,1) | (5.1,34.5) | (0.0976764836466,-0.0241724631247),(0.0325588278822,-0.072517389374) - (3,3),(1,1) | (10,10) | (0.3,0),(0.1,0) - (-2,2),(-8,-10) | (5.1,34.5) | (0.0483449262493,0.18499334024),(-0.317201914064,0.0651176557644) - (-2,2),(-8,-10) | (10,10) | (0,0.2),(-0.9,-0.1) - (2.5,3.5),(2.5,2.5) | (5.1,34.5) | (0.109762715209,-0.0562379754329),(0.0813970697055,-0.0604311578117) - (2.5,3.5),(2.5,2.5) | (10,10) | (0.3,0.05),(0.25,0) - (3,3),(3,3) | (5.1,34.5) | (0.0976764836466,-0.072517389374),(0.0976764836466,-0.072517389374) - (3,3),(3,3) | (10,10) | (0.3,0),(0.3,0) -(10 rows) - +ERROR: relation "box_tbl" does not exist +LINE 1: SELECT b.f1, p.f1, b.f1 / p.f1 FROM BOX_TBL b, POINT_TBL p W... + ^ -- To box SELECT f1::box FROM POINT_TBL; @@ -2710,1486 +2153,237 @@ SELECT bound_box(a.f1, b.f1) FROM BOX_TBL a, BOX_TBL b; - bound_box ---------------------- - (2,2),(0,0) - (3,3),(0,0) - (2,2),(-8,-10) - (2.5,3.5),(0,0) - (3,3),(0,0) - (3,3),(0,0) - (3,3),(1,1) - (3,3),(-8,-10) - (3,3.5),(1,1) - (3,3),(1,1) - (2,2),(-8,-10) - (3,3),(-8,-10) - (-2,2),(-8,-10) - (2.5,3.5),(-8,-10) - (3,3),(-8,-10) - (2.5,3.5),(0,0) - (3,3.5),(1,1) - (2.5,3.5),(-8,-10) - (2.5,3.5),(2.5,2.5) - (3,3.5),(2.5,2.5) - (3,3),(0,0) - (3,3),(1,1) - (3,3),(-8,-10) - (3,3.5),(2.5,2.5) - (3,3),(3,3) -(25 rows) - +ERROR: relation "box_tbl" does not exist +LINE 2: FROM BOX_TBL a, BOX_TBL b; + ^ -- Below box SELECT b1.f1, b2.f1, b1.f1 <^ b2.f1 FROM BOX_TBL b1, BOX_TBL b2; - f1 | f1 | ?column? ----------------------+---------------------+---------- - (2,2),(0,0) | (2,2),(0,0) | f - (2,2),(0,0) | (3,3),(1,1) | f - (2,2),(0,0) | (-2,2),(-8,-10) | f - (2,2),(0,0) | (2.5,3.5),(2.5,2.5) | t - (2,2),(0,0) | (3,3),(3,3) | t - (3,3),(1,1) | (2,2),(0,0) | f - (3,3),(1,1) | (3,3),(1,1) | f - (3,3),(1,1) | (-2,2),(-8,-10) | f - (3,3),(1,1) | (2.5,3.5),(2.5,2.5) | f - (3,3),(1,1) | (3,3),(3,3) | t - (-2,2),(-8,-10) | (2,2),(0,0) | f - (-2,2),(-8,-10) | (3,3),(1,1) | f - (-2,2),(-8,-10) | (-2,2),(-8,-10) | f - (-2,2),(-8,-10) | (2.5,3.5),(2.5,2.5) | t - (-2,2),(-8,-10) | (3,3),(3,3) | t - (2.5,3.5),(2.5,2.5) | (2,2),(0,0) | f - (2.5,3.5),(2.5,2.5) | (3,3),(1,1) | f - (2.5,3.5),(2.5,2.5) | (-2,2),(-8,-10) | f - (2.5,3.5),(2.5,2.5) | (2.5,3.5),(2.5,2.5) | f - (2.5,3.5),(2.5,2.5) | (3,3),(3,3) | f - (3,3),(3,3) | (2,2),(0,0) | f - (3,3),(3,3) | (3,3),(1,1) | f - (3,3),(3,3) | (-2,2),(-8,-10) | f - (3,3),(3,3) | (2.5,3.5),(2.5,2.5) | f - (3,3),(3,3) | (3,3),(3,3) | t -(25 rows) - +ERROR: relation "box_tbl" does not exist +LINE 1: SELECT b1.f1, b2.f1, b1.f1 <^ b2.f1 FROM BOX_TBL b1, BOX_TBL... + ^ -- Above box SELECT b1.f1, b2.f1, b1.f1 >^ b2.f1 FROM BOX_TBL b1, BOX_TBL b2; - f1 | f1 | ?column? ----------------------+---------------------+---------- - (2,2),(0,0) | (2,2),(0,0) | f - (2,2),(0,0) | (3,3),(1,1) | f - (2,2),(0,0) | (-2,2),(-8,-10) | f - (2,2),(0,0) | (2.5,3.5),(2.5,2.5) | f - (2,2),(0,0) | (3,3),(3,3) | f - (3,3),(1,1) | (2,2),(0,0) | f - (3,3),(1,1) | (3,3),(1,1) | f - (3,3),(1,1) | (-2,2),(-8,-10) | f - (3,3),(1,1) | (2.5,3.5),(2.5,2.5) | f - (3,3),(1,1) | (3,3),(3,3) | f - (-2,2),(-8,-10) | (2,2),(0,0) | f - (-2,2),(-8,-10) | (3,3),(1,1) | f - (-2,2),(-8,-10) | (-2,2),(-8,-10) | f - (-2,2),(-8,-10) | (2.5,3.5),(2.5,2.5) | f - (-2,2),(-8,-10) | (3,3),(3,3) | f - (2.5,3.5),(2.5,2.5) | (2,2),(0,0) | t - (2.5,3.5),(2.5,2.5) | (3,3),(1,1) | f - (2.5,3.5),(2.5,2.5) | (-2,2),(-8,-10) | t - (2.5,3.5),(2.5,2.5) | (2.5,3.5),(2.5,2.5) | f - (2.5,3.5),(2.5,2.5) | (3,3),(3,3) | f - (3,3),(3,3) | (2,2),(0,0) | t - (3,3),(3,3) | (3,3),(1,1) | t - (3,3),(3,3) | (-2,2),(-8,-10) | t - (3,3),(3,3) | (2.5,3.5),(2.5,2.5) | f - (3,3),(3,3) | (3,3),(3,3) | t -(25 rows) - +ERROR: relation "box_tbl" does not exist +LINE 1: SELECT b1.f1, b2.f1, b1.f1 >^ b2.f1 FROM BOX_TBL b1, BOX_TBL... + ^ -- Intersection point with box SELECT b1.f1, b2.f1, b1.f1 # b2.f1 FROM BOX_TBL b1, BOX_TBL b2; - f1 | f1 | ?column? ----------------------+---------------------+--------------------- - (2,2),(0,0) | (2,2),(0,0) | (2,2),(0,0) - (2,2),(0,0) | (3,3),(1,1) | (2,2),(1,1) - (2,2),(0,0) | (-2,2),(-8,-10) | - (2,2),(0,0) | (2.5,3.5),(2.5,2.5) | - (2,2),(0,0) | (3,3),(3,3) | - (3,3),(1,1) | (2,2),(0,0) | (2,2),(1,1) - (3,3),(1,1) | (3,3),(1,1) | (3,3),(1,1) - (3,3),(1,1) | (-2,2),(-8,-10) | - (3,3),(1,1) | (2.5,3.5),(2.5,2.5) | (2.5,3),(2.5,2.5) - (3,3),(1,1) | (3,3),(3,3) | (3,3),(3,3) - (-2,2),(-8,-10) | (2,2),(0,0) | - (-2,2),(-8,-10) | (3,3),(1,1) | - (-2,2),(-8,-10) | (-2,2),(-8,-10) | (-2,2),(-8,-10) - (-2,2),(-8,-10) | (2.5,3.5),(2.5,2.5) | - (-2,2),(-8,-10) | (3,3),(3,3) | - (2.5,3.5),(2.5,2.5) | (2,2),(0,0) | - (2.5,3.5),(2.5,2.5) | (3,3),(1,1) | (2.5,3),(2.5,2.5) - (2.5,3.5),(2.5,2.5) | (-2,2),(-8,-10) | - (2.5,3.5),(2.5,2.5) | (2.5,3.5),(2.5,2.5) | (2.5,3.5),(2.5,2.5) - (2.5,3.5),(2.5,2.5) | (3,3),(3,3) | - (3,3),(3,3) | (2,2),(0,0) | - (3,3),(3,3) | (3,3),(1,1) | (3,3),(3,3) - (3,3),(3,3) | (-2,2),(-8,-10) | - (3,3),(3,3) | (2.5,3.5),(2.5,2.5) | - (3,3),(3,3) | (3,3),(3,3) | (3,3),(3,3) -(25 rows) - +ERROR: relation "box_tbl" does not exist +LINE 1: SELECT b1.f1, b2.f1, b1.f1 # b2.f1 FROM BOX_TBL b1, BOX_TBL ... + ^ -- Diagonal SELECT f1, diagonal(f1) FROM BOX_TBL; - f1 | diagonal ----------------------+----------------------- - (2,2),(0,0) | [(2,2),(0,0)] - (3,3),(1,1) | [(3,3),(1,1)] - (-2,2),(-8,-10) | [(-2,2),(-8,-10)] - (2.5,3.5),(2.5,2.5) | [(2.5,3.5),(2.5,2.5)] - (3,3),(3,3) | [(3,3),(3,3)] -(5 rows) - +ERROR: relation "box_tbl" does not exist +LINE 1: SELECT f1, diagonal(f1) FROM BOX_TBL; + ^ -- Distance to box SELECT b1.f1, b2.f1, b1.f1 <-> b2.f1 FROM BOX_TBL b1, BOX_TBL b2; - f1 | f1 | ?column? ----------------------+---------------------+--------------- - (2,2),(0,0) | (2,2),(0,0) | 0 - (2,2),(0,0) | (3,3),(1,1) | 1.41421356237 - (2,2),(0,0) | (-2,2),(-8,-10) | 7.81024967591 - (2,2),(0,0) | (2.5,3.5),(2.5,2.5) | 2.5 - (2,2),(0,0) | (3,3),(3,3) | 2.82842712475 - (3,3),(1,1) | (2,2),(0,0) | 1.41421356237 - (3,3),(1,1) | (3,3),(1,1) | 0 - (3,3),(1,1) | (-2,2),(-8,-10) | 9.21954445729 - (3,3),(1,1) | (2.5,3.5),(2.5,2.5) | 1.11803398875 - (3,3),(1,1) | (3,3),(3,3) | 1.41421356237 - (-2,2),(-8,-10) | (2,2),(0,0) | 7.81024967591 - (-2,2),(-8,-10) | (3,3),(1,1) | 9.21954445729 - (-2,2),(-8,-10) | (-2,2),(-8,-10) | 0 - (-2,2),(-8,-10) | (2.5,3.5),(2.5,2.5) | 10.2591422643 - (-2,2),(-8,-10) | (3,3),(3,3) | 10.6301458127 - (2.5,3.5),(2.5,2.5) | (2,2),(0,0) | 2.5 - (2.5,3.5),(2.5,2.5) | (3,3),(1,1) | 1.11803398875 - (2.5,3.5),(2.5,2.5) | (-2,2),(-8,-10) | 10.2591422643 - (2.5,3.5),(2.5,2.5) | (2.5,3.5),(2.5,2.5) | 0 - (2.5,3.5),(2.5,2.5) | (3,3),(3,3) | 0.5 - (3,3),(3,3) | (2,2),(0,0) | 2.82842712475 - (3,3),(3,3) | (3,3),(1,1) | 1.41421356237 - (3,3),(3,3) | (-2,2),(-8,-10) | 10.6301458127 - (3,3),(3,3) | (2.5,3.5),(2.5,2.5) | 0.5 - (3,3),(3,3) | (3,3),(3,3) | 0 -(25 rows) - +ERROR: relation "box_tbl" does not exist +LINE 1: SELECT b1.f1, b2.f1, b1.f1 <-> b2.f1 FROM BOX_TBL b1, BOX_TB... + ^ -- -- Paths -- -- Points SELECT f1, npoints(f1) FROM PATH_TBL; - f1 | npoints ----------------------------+--------- - [(1,2),(3,4)] | 2 - ((1,2),(3,4)) | 2 - [(0,0),(3,0),(4,5),(1,6)] | 4 - ((1,2),(3,4)) | 2 - ((1,2),(3,4)) | 2 - [(1,2),(3,4)] | 2 - ((10,20)) | 1 - [(11,12),(13,14)] | 2 - ((11,12),(13,14)) | 2 -(9 rows) - +ERROR: relation "path_tbl" does not exist +LINE 1: SELECT f1, npoints(f1) FROM PATH_TBL; + ^ -- Area SELECT f1, area(f1) FROM PATH_TBL; - f1 | area ----------------------------+------ - [(1,2),(3,4)] | - ((1,2),(3,4)) | 0 - [(0,0),(3,0),(4,5),(1,6)] | - ((1,2),(3,4)) | 0 - ((1,2),(3,4)) | 0 - [(1,2),(3,4)] | - ((10,20)) | 0 - [(11,12),(13,14)] | - ((11,12),(13,14)) | 0 -(9 rows) - +ERROR: relation "path_tbl" does not exist +LINE 1: SELECT f1, area(f1) FROM PATH_TBL; + ^ -- Length SELECT f1, @-@ f1 FROM PATH_TBL; - f1 | ?column? ----------------------------+--------------- - [(1,2),(3,4)] | 2.82842712475 - ((1,2),(3,4)) | 5.65685424949 - [(0,0),(3,0),(4,5),(1,6)] | 11.2612971738 - ((1,2),(3,4)) | 5.65685424949 - ((1,2),(3,4)) | 5.65685424949 - [(1,2),(3,4)] | 2.82842712475 - ((10,20)) | 0 - [(11,12),(13,14)] | 2.82842712475 - ((11,12),(13,14)) | 5.65685424949 -(9 rows) - +ERROR: relation "path_tbl" does not exist +LINE 1: SELECT f1, @-@ f1 FROM PATH_TBL; + ^ -- Center SELECT f1, @@ f1 FROM PATH_TBL; -ERROR: function "path_center" not implemented +ERROR: relation "path_tbl" does not exist +LINE 1: SELECT f1, @@ f1 FROM PATH_TBL; + ^ -- To polygon SELECT f1, f1::polygon FROM PATH_TBL WHERE isclosed(f1); - f1 | f1 --------------------+------------------- - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | ((1,2),(3,4)) - ((10,20)) | ((10,20)) - ((11,12),(13,14)) | ((11,12),(13,14)) -(5 rows) - +ERROR: relation "path_tbl" does not exist +LINE 1: SELECT f1, f1::polygon FROM PATH_TBL WHERE isclosed(f1); + ^ -- Open path cannot be converted to polygon error SELECT f1, f1::polygon FROM PATH_TBL WHERE isopen(f1); -ERROR: open path cannot be converted to polygon +ERROR: relation "path_tbl" does not exist +LINE 1: SELECT f1, f1::polygon FROM PATH_TBL WHERE isopen(f1); + ^ -- Has points less than path SELECT p1.f1, p2.f1 FROM PATH_TBL p1, PATH_TBL p2 WHERE p1.f1 < p2.f1; - f1 | f1 --------------------+--------------------------- - [(1,2),(3,4)] | [(0,0),(3,0),(4,5),(1,6)] - ((1,2),(3,4)) | [(0,0),(3,0),(4,5),(1,6)] - ((1,2),(3,4)) | [(0,0),(3,0),(4,5),(1,6)] - ((1,2),(3,4)) | [(0,0),(3,0),(4,5),(1,6)] - [(1,2),(3,4)] | [(0,0),(3,0),(4,5),(1,6)] - ((10,20)) | [(1,2),(3,4)] - ((10,20)) | ((1,2),(3,4)) - ((10,20)) | [(0,0),(3,0),(4,5),(1,6)] - ((10,20)) | ((1,2),(3,4)) - ((10,20)) | ((1,2),(3,4)) - ((10,20)) | [(1,2),(3,4)] - ((10,20)) | [(11,12),(13,14)] - ((10,20)) | ((11,12),(13,14)) - [(11,12),(13,14)] | [(0,0),(3,0),(4,5),(1,6)] - ((11,12),(13,14)) | [(0,0),(3,0),(4,5),(1,6)] -(15 rows) - +ERROR: relation "path_tbl" does not exist +LINE 1: SELECT p1.f1, p2.f1 FROM PATH_TBL p1, PATH_TBL p2 WHERE p1.f... + ^ -- Has points less than or equal to path SELECT p1.f1, p2.f1 FROM PATH_TBL p1, PATH_TBL p2 WHERE p1.f1 <= p2.f1; - f1 | f1 ----------------------------+--------------------------- - [(1,2),(3,4)] | [(1,2),(3,4)] - [(1,2),(3,4)] | ((1,2),(3,4)) - [(1,2),(3,4)] | [(0,0),(3,0),(4,5),(1,6)] - [(1,2),(3,4)] | ((1,2),(3,4)) - [(1,2),(3,4)] | ((1,2),(3,4)) - [(1,2),(3,4)] | [(1,2),(3,4)] - [(1,2),(3,4)] | [(11,12),(13,14)] - [(1,2),(3,4)] | ((11,12),(13,14)) - ((1,2),(3,4)) | [(1,2),(3,4)] - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | [(0,0),(3,0),(4,5),(1,6)] - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | [(1,2),(3,4)] - ((1,2),(3,4)) | [(11,12),(13,14)] - ((1,2),(3,4)) | ((11,12),(13,14)) - [(0,0),(3,0),(4,5),(1,6)] | [(0,0),(3,0),(4,5),(1,6)] - ((1,2),(3,4)) | [(1,2),(3,4)] - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | [(0,0),(3,0),(4,5),(1,6)] - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | [(1,2),(3,4)] - ((1,2),(3,4)) | [(11,12),(13,14)] - ((1,2),(3,4)) | ((11,12),(13,14)) - ((1,2),(3,4)) | [(1,2),(3,4)] - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | [(0,0),(3,0),(4,5),(1,6)] - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | [(1,2),(3,4)] - ((1,2),(3,4)) | [(11,12),(13,14)] - ((1,2),(3,4)) | ((11,12),(13,14)) - [(1,2),(3,4)] | [(1,2),(3,4)] - [(1,2),(3,4)] | ((1,2),(3,4)) - [(1,2),(3,4)] | [(0,0),(3,0),(4,5),(1,6)] - [(1,2),(3,4)] | ((1,2),(3,4)) - [(1,2),(3,4)] | ((1,2),(3,4)) - [(1,2),(3,4)] | [(1,2),(3,4)] - [(1,2),(3,4)] | [(11,12),(13,14)] - [(1,2),(3,4)] | ((11,12),(13,14)) - ((10,20)) | [(1,2),(3,4)] - ((10,20)) | ((1,2),(3,4)) - ((10,20)) | [(0,0),(3,0),(4,5),(1,6)] - ((10,20)) | ((1,2),(3,4)) - ((10,20)) | ((1,2),(3,4)) - ((10,20)) | [(1,2),(3,4)] - ((10,20)) | ((10,20)) - ((10,20)) | [(11,12),(13,14)] - ((10,20)) | ((11,12),(13,14)) - [(11,12),(13,14)] | [(1,2),(3,4)] - [(11,12),(13,14)] | ((1,2),(3,4)) - [(11,12),(13,14)] | [(0,0),(3,0),(4,5),(1,6)] - [(11,12),(13,14)] | ((1,2),(3,4)) - [(11,12),(13,14)] | ((1,2),(3,4)) - [(11,12),(13,14)] | [(1,2),(3,4)] - [(11,12),(13,14)] | [(11,12),(13,14)] - [(11,12),(13,14)] | ((11,12),(13,14)) - ((11,12),(13,14)) | [(1,2),(3,4)] - ((11,12),(13,14)) | ((1,2),(3,4)) - ((11,12),(13,14)) | [(0,0),(3,0),(4,5),(1,6)] - ((11,12),(13,14)) | ((1,2),(3,4)) - ((11,12),(13,14)) | ((1,2),(3,4)) - ((11,12),(13,14)) | [(1,2),(3,4)] - ((11,12),(13,14)) | [(11,12),(13,14)] - ((11,12),(13,14)) | ((11,12),(13,14)) -(66 rows) - +ERROR: relation "path_tbl" does not exist +LINE 1: SELECT p1.f1, p2.f1 FROM PATH_TBL p1, PATH_TBL p2 WHERE p1.f... + ^ -- Has points equal to path SELECT p1.f1, p2.f1 FROM PATH_TBL p1, PATH_TBL p2 WHERE p1.f1 = p2.f1; - f1 | f1 ----------------------------+--------------------------- - [(1,2),(3,4)] | [(1,2),(3,4)] - [(1,2),(3,4)] | ((1,2),(3,4)) - [(1,2),(3,4)] | ((1,2),(3,4)) - [(1,2),(3,4)] | ((1,2),(3,4)) - [(1,2),(3,4)] | [(1,2),(3,4)] - [(1,2),(3,4)] | [(11,12),(13,14)] - [(1,2),(3,4)] | ((11,12),(13,14)) - ((1,2),(3,4)) | [(1,2),(3,4)] - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | [(1,2),(3,4)] - ((1,2),(3,4)) | [(11,12),(13,14)] - ((1,2),(3,4)) | ((11,12),(13,14)) - [(0,0),(3,0),(4,5),(1,6)] | [(0,0),(3,0),(4,5),(1,6)] - ((1,2),(3,4)) | [(1,2),(3,4)] - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | [(1,2),(3,4)] - ((1,2),(3,4)) | [(11,12),(13,14)] - ((1,2),(3,4)) | ((11,12),(13,14)) - ((1,2),(3,4)) | [(1,2),(3,4)] - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | [(1,2),(3,4)] - ((1,2),(3,4)) | [(11,12),(13,14)] - ((1,2),(3,4)) | ((11,12),(13,14)) - [(1,2),(3,4)] | [(1,2),(3,4)] - [(1,2),(3,4)] | ((1,2),(3,4)) - [(1,2),(3,4)] | ((1,2),(3,4)) - [(1,2),(3,4)] | ((1,2),(3,4)) - [(1,2),(3,4)] | [(1,2),(3,4)] - [(1,2),(3,4)] | [(11,12),(13,14)] - [(1,2),(3,4)] | ((11,12),(13,14)) - ((10,20)) | ((10,20)) - [(11,12),(13,14)] | [(1,2),(3,4)] - [(11,12),(13,14)] | ((1,2),(3,4)) - [(11,12),(13,14)] | ((1,2),(3,4)) - [(11,12),(13,14)] | ((1,2),(3,4)) - [(11,12),(13,14)] | [(1,2),(3,4)] - [(11,12),(13,14)] | [(11,12),(13,14)] - [(11,12),(13,14)] | ((11,12),(13,14)) - ((11,12),(13,14)) | [(1,2),(3,4)] - ((11,12),(13,14)) | ((1,2),(3,4)) - ((11,12),(13,14)) | ((1,2),(3,4)) - ((11,12),(13,14)) | ((1,2),(3,4)) - ((11,12),(13,14)) | [(1,2),(3,4)] - ((11,12),(13,14)) | [(11,12),(13,14)] - ((11,12),(13,14)) | ((11,12),(13,14)) -(51 rows) - +ERROR: relation "path_tbl" does not exist +LINE 1: SELECT p1.f1, p2.f1 FROM PATH_TBL p1, PATH_TBL p2 WHERE p1.f... + ^ -- Has points greater than or equal to path SELECT p1.f1, p2.f1 FROM PATH_TBL p1, PATH_TBL p2 WHERE p1.f1 >= p2.f1; - f1 | f1 ----------------------------+--------------------------- - [(1,2),(3,4)] | [(1,2),(3,4)] - [(1,2),(3,4)] | ((1,2),(3,4)) - [(1,2),(3,4)] | ((1,2),(3,4)) - [(1,2),(3,4)] | ((1,2),(3,4)) - [(1,2),(3,4)] | [(1,2),(3,4)] - [(1,2),(3,4)] | ((10,20)) - [(1,2),(3,4)] | [(11,12),(13,14)] - [(1,2),(3,4)] | ((11,12),(13,14)) - ((1,2),(3,4)) | [(1,2),(3,4)] - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | [(1,2),(3,4)] - ((1,2),(3,4)) | ((10,20)) - ((1,2),(3,4)) | [(11,12),(13,14)] - ((1,2),(3,4)) | ((11,12),(13,14)) - [(0,0),(3,0),(4,5),(1,6)] | [(1,2),(3,4)] - [(0,0),(3,0),(4,5),(1,6)] | ((1,2),(3,4)) - [(0,0),(3,0),(4,5),(1,6)] | [(0,0),(3,0),(4,5),(1,6)] - [(0,0),(3,0),(4,5),(1,6)] | ((1,2),(3,4)) - [(0,0),(3,0),(4,5),(1,6)] | ((1,2),(3,4)) - [(0,0),(3,0),(4,5),(1,6)] | [(1,2),(3,4)] - [(0,0),(3,0),(4,5),(1,6)] | ((10,20)) - [(0,0),(3,0),(4,5),(1,6)] | [(11,12),(13,14)] - [(0,0),(3,0),(4,5),(1,6)] | ((11,12),(13,14)) - ((1,2),(3,4)) | [(1,2),(3,4)] - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | [(1,2),(3,4)] - ((1,2),(3,4)) | ((10,20)) - ((1,2),(3,4)) | [(11,12),(13,14)] - ((1,2),(3,4)) | ((11,12),(13,14)) - ((1,2),(3,4)) | [(1,2),(3,4)] - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | ((1,2),(3,4)) - ((1,2),(3,4)) | [(1,2),(3,4)] - ((1,2),(3,4)) | ((10,20)) - ((1,2),(3,4)) | [(11,12),(13,14)] - ((1,2),(3,4)) | ((11,12),(13,14)) - [(1,2),(3,4)] | [(1,2),(3,4)] - [(1,2),(3,4)] | ((1,2),(3,4)) - [(1,2),(3,4)] | ((1,2),(3,4)) - [(1,2),(3,4)] | ((1,2),(3,4)) - [(1,2),(3,4)] | [(1,2),(3,4)] - [(1,2),(3,4)] | ((10,20)) - [(1,2),(3,4)] | [(11,12),(13,14)] - [(1,2),(3,4)] | ((11,12),(13,14)) - ((10,20)) | ((10,20)) - [(11,12),(13,14)] | [(1,2),(3,4)] - [(11,12),(13,14)] | ((1,2),(3,4)) - [(11,12),(13,14)] | ((1,2),(3,4)) - [(11,12),(13,14)] | ((1,2),(3,4)) - [(11,12),(13,14)] | [(1,2),(3,4)] - [(11,12),(13,14)] | ((10,20)) - [(11,12),(13,14)] | [(11,12),(13,14)] - [(11,12),(13,14)] | ((11,12),(13,14)) - ((11,12),(13,14)) | [(1,2),(3,4)] - ((11,12),(13,14)) | ((1,2),(3,4)) - ((11,12),(13,14)) | ((1,2),(3,4)) - ((11,12),(13,14)) | ((1,2),(3,4)) - ((11,12),(13,14)) | [(1,2),(3,4)] - ((11,12),(13,14)) | ((10,20)) - ((11,12),(13,14)) | [(11,12),(13,14)] - ((11,12),(13,14)) | ((11,12),(13,14)) -(66 rows) - +ERROR: relation "path_tbl" does not exist +LINE 1: SELECT p1.f1, p2.f1 FROM PATH_TBL p1, PATH_TBL p2 WHERE p1.f... + ^ -- Has points greater than path SELECT p1.f1, p2.f1 FROM PATH_TBL p1, PATH_TBL p2 WHERE p1.f1 > p2.f1; - f1 | f1 ----------------------------+------------------- - [(1,2),(3,4)] | ((10,20)) - ((1,2),(3,4)) | ((10,20)) - [(0,0),(3,0),(4,5),(1,6)] | [(1,2),(3,4)] - [(0,0),(3,0),(4,5),(1,6)] | ((1,2),(3,4)) - [(0,0),(3,0),(4,5),(1,6)] | ((1,2),(3,4)) - [(0,0),(3,0),(4,5),(1,6)] | ((1,2),(3,4)) - [(0,0),(3,0),(4,5),(1,6)] | [(1,2),(3,4)] - [(0,0),(3,0),(4,5),(1,6)] | ((10,20)) - [(0,0),(3,0),(4,5),(1,6)] | [(11,12),(13,14)] - [(0,0),(3,0),(4,5),(1,6)] | ((11,12),(13,14)) - ((1,2),(3,4)) | ((10,20)) - ((1,2),(3,4)) | ((10,20)) - [(1,2),(3,4)] | ((10,20)) - [(11,12),(13,14)] | ((10,20)) - ((11,12),(13,14)) | ((10,20)) -(15 rows) - +ERROR: relation "path_tbl" does not exist +LINE 1: SELECT p1.f1, p2.f1 FROM PATH_TBL p1, PATH_TBL p2 WHERE p1.f... + ^ -- Add path SELECT p1.f1, p2.f1, p1.f1 + p2.f1 FROM PATH_TBL p1, PATH_TBL p2; - f1 | f1 | ?column? ----------------------------+---------------------------+--------------------------------------------------- - [(1,2),(3,4)] | [(1,2),(3,4)] | [(1,2),(3,4),(1,2),(3,4)] - [(1,2),(3,4)] | ((1,2),(3,4)) | - [(1,2),(3,4)] | [(0,0),(3,0),(4,5),(1,6)] | [(1,2),(3,4),(0,0),(3,0),(4,5),(1,6)] - [(1,2),(3,4)] | ((1,2),(3,4)) | - [(1,2),(3,4)] | ((1,2),(3,4)) | - [(1,2),(3,4)] | [(1,2),(3,4)] | [(1,2),(3,4),(1,2),(3,4)] - [(1,2),(3,4)] | ((10,20)) | - [(1,2),(3,4)] | [(11,12),(13,14)] | [(1,2),(3,4),(11,12),(13,14)] - [(1,2),(3,4)] | ((11,12),(13,14)) | - ((1,2),(3,4)) | [(1,2),(3,4)] | - ((1,2),(3,4)) | ((1,2),(3,4)) | - ((1,2),(3,4)) | [(0,0),(3,0),(4,5),(1,6)] | - ((1,2),(3,4)) | ((1,2),(3,4)) | - ((1,2),(3,4)) | ((1,2),(3,4)) | - ((1,2),(3,4)) | [(1,2),(3,4)] | - ((1,2),(3,4)) | ((10,20)) | - ((1,2),(3,4)) | [(11,12),(13,14)] | - ((1,2),(3,4)) | ((11,12),(13,14)) | - [(0,0),(3,0),(4,5),(1,6)] | [(1,2),(3,4)] | [(0,0),(3,0),(4,5),(1,6),(1,2),(3,4)] - [(0,0),(3,0),(4,5),(1,6)] | ((1,2),(3,4)) | - [(0,0),(3,0),(4,5),(1,6)] | [(0,0),(3,0),(4,5),(1,6)] | [(0,0),(3,0),(4,5),(1,6),(0,0),(3,0),(4,5),(1,6)] - [(0,0),(3,0),(4,5),(1,6)] | ((1,2),(3,4)) | - [(0,0),(3,0),(4,5),(1,6)] | ((1,2),(3,4)) | - [(0,0),(3,0),(4,5),(1,6)] | [(1,2),(3,4)] | [(0,0),(3,0),(4,5),(1,6),(1,2),(3,4)] - [(0,0),(3,0),(4,5),(1,6)] | ((10,20)) | - [(0,0),(3,0),(4,5),(1,6)] | [(11,12),(13,14)] | [(0,0),(3,0),(4,5),(1,6),(11,12),(13,14)] - [(0,0),(3,0),(4,5),(1,6)] | ((11,12),(13,14)) | - ((1,2),(3,4)) | [(1,2),(3,4)] | - ((1,2),(3,4)) | ((1,2),(3,4)) | - ((1,2),(3,4)) | [(0,0),(3,0),(4,5),(1,6)] | - ((1,2),(3,4)) | ((1,2),(3,4)) | - ((1,2),(3,4)) | ((1,2),(3,4)) | - ((1,2),(3,4)) | [(1,2),(3,4)] | - ((1,2),(3,4)) | ((10,20)) | - ((1,2),(3,4)) | [(11,12),(13,14)] | - ((1,2),(3,4)) | ((11,12),(13,14)) | - ((1,2),(3,4)) | [(1,2),(3,4)] | - ((1,2),(3,4)) | ((1,2),(3,4)) | - ((1,2),(3,4)) | [(0,0),(3,0),(4,5),(1,6)] | - ((1,2),(3,4)) | ((1,2),(3,4)) | - ((1,2),(3,4)) | ((1,2),(3,4)) | - ((1,2),(3,4)) | [(1,2),(3,4)] | - ((1,2),(3,4)) | ((10,20)) | - ((1,2),(3,4)) | [(11,12),(13,14)] | - ((1,2),(3,4)) | ((11,12),(13,14)) | - [(1,2),(3,4)] | [(1,2),(3,4)] | [(1,2),(3,4),(1,2),(3,4)] - [(1,2),(3,4)] | ((1,2),(3,4)) | - [(1,2),(3,4)] | [(0,0),(3,0),(4,5),(1,6)] | [(1,2),(3,4),(0,0),(3,0),(4,5),(1,6)] - [(1,2),(3,4)] | ((1,2),(3,4)) | - [(1,2),(3,4)] | ((1,2),(3,4)) | - [(1,2),(3,4)] | [(1,2),(3,4)] | [(1,2),(3,4),(1,2),(3,4)] - [(1,2),(3,4)] | ((10,20)) | - [(1,2),(3,4)] | [(11,12),(13,14)] | [(1,2),(3,4),(11,12),(13,14)] - [(1,2),(3,4)] | ((11,12),(13,14)) | - ((10,20)) | [(1,2),(3,4)] | - ((10,20)) | ((1,2),(3,4)) | - ((10,20)) | [(0,0),(3,0),(4,5),(1,6)] | - ((10,20)) | ((1,2),(3,4)) | - ((10,20)) | ((1,2),(3,4)) | - ((10,20)) | [(1,2),(3,4)] | - ((10,20)) | ((10,20)) | - ((10,20)) | [(11,12),(13,14)] | - ((10,20)) | ((11,12),(13,14)) | - [(11,12),(13,14)] | [(1,2),(3,4)] | [(11,12),(13,14),(1,2),(3,4)] - [(11,12),(13,14)] | ((1,2),(3,4)) | - [(11,12),(13,14)] | [(0,0),(3,0),(4,5),(1,6)] | [(11,12),(13,14),(0,0),(3,0),(4,5),(1,6)] - [(11,12),(13,14)] | ((1,2),(3,4)) | - [(11,12),(13,14)] | ((1,2),(3,4)) | - [(11,12),(13,14)] | [(1,2),(3,4)] | [(11,12),(13,14),(1,2),(3,4)] - [(11,12),(13,14)] | ((10,20)) | - [(11,12),(13,14)] | [(11,12),(13,14)] | [(11,12),(13,14),(11,12),(13,14)] - [(11,12),(13,14)] | ((11,12),(13,14)) | - ((11,12),(13,14)) | [(1,2),(3,4)] | - ((11,12),(13,14)) | ((1,2),(3,4)) | - ((11,12),(13,14)) | [(0,0),(3,0),(4,5),(1,6)] | - ((11,12),(13,14)) | ((1,2),(3,4)) | - ((11,12),(13,14)) | ((1,2),(3,4)) | - ((11,12),(13,14)) | [(1,2),(3,4)] | - ((11,12),(13,14)) | ((10,20)) | - ((11,12),(13,14)) | [(11,12),(13,14)] | - ((11,12),(13,14)) | ((11,12),(13,14)) | -(81 rows) - +ERROR: relation "path_tbl" does not exist +LINE 1: SELECT p1.f1, p2.f1, p1.f1 + p2.f1 FROM PATH_TBL p1, PATH_TB... + ^ -- Add point SELECT p.f1, p1.f1, p.f1 + p1.f1 FROM PATH_TBL p, POINT_TBL p1; - f1 | f1 | ?column? ----------------------------+-------------------+--------------------------------------------------------------------------- - [(1,2),(3,4)] | (0,0) | [(1,2),(3,4)] - ((1,2),(3,4)) | (0,0) | ((1,2),(3,4)) - [(0,0),(3,0),(4,5),(1,6)] | (0,0) | [(0,0),(3,0),(4,5),(1,6)] - ((1,2),(3,4)) | (0,0) | ((1,2),(3,4)) - ((1,2),(3,4)) | (0,0) | ((1,2),(3,4)) - [(1,2),(3,4)] | (0,0) | [(1,2),(3,4)] - ((10,20)) | (0,0) | ((10,20)) - [(11,12),(13,14)] | (0,0) | [(11,12),(13,14)] - ((11,12),(13,14)) | (0,0) | ((11,12),(13,14)) - [(1,2),(3,4)] | (-10,0) | [(-9,2),(-7,4)] - ((1,2),(3,4)) | (-10,0) | ((-9,2),(-7,4)) - [(0,0),(3,0),(4,5),(1,6)] | (-10,0) | [(-10,0),(-7,0),(-6,5),(-9,6)] - ((1,2),(3,4)) | (-10,0) | ((-9,2),(-7,4)) - ((1,2),(3,4)) | (-10,0) | ((-9,2),(-7,4)) - [(1,2),(3,4)] | (-10,0) | [(-9,2),(-7,4)] - ((10,20)) | (-10,0) | ((0,20)) - [(11,12),(13,14)] | (-10,0) | [(1,12),(3,14)] - ((11,12),(13,14)) | (-10,0) | ((1,12),(3,14)) - [(1,2),(3,4)] | (-3,4) | [(-2,6),(0,8)] - ((1,2),(3,4)) | (-3,4) | ((-2,6),(0,8)) - [(0,0),(3,0),(4,5),(1,6)] | (-3,4) | [(-3,4),(0,4),(1,9),(-2,10)] - ((1,2),(3,4)) | (-3,4) | ((-2,6),(0,8)) - ((1,2),(3,4)) | (-3,4) | ((-2,6),(0,8)) - [(1,2),(3,4)] | (-3,4) | [(-2,6),(0,8)] - ((10,20)) | (-3,4) | ((7,24)) - [(11,12),(13,14)] | (-3,4) | [(8,16),(10,18)] - ((11,12),(13,14)) | (-3,4) | ((8,16),(10,18)) - [(1,2),(3,4)] | (5.1,34.5) | [(6.1,36.5),(8.1,38.5)] - ((1,2),(3,4)) | (5.1,34.5) | ((6.1,36.5),(8.1,38.5)) - [(0,0),(3,0),(4,5),(1,6)] | (5.1,34.5) | [(5.1,34.5),(8.1,34.5),(9.1,39.5),(6.1,40.5)] - ((1,2),(3,4)) | (5.1,34.5) | ((6.1,36.5),(8.1,38.5)) - ((1,2),(3,4)) | (5.1,34.5) | ((6.1,36.5),(8.1,38.5)) - [(1,2),(3,4)] | (5.1,34.5) | [(6.1,36.5),(8.1,38.5)] - ((10,20)) | (5.1,34.5) | ((15.1,54.5)) - [(11,12),(13,14)] | (5.1,34.5) | [(16.1,46.5),(18.1,48.5)] - ((11,12),(13,14)) | (5.1,34.5) | ((16.1,46.5),(18.1,48.5)) - [(1,2),(3,4)] | (-5,-12) | [(-4,-10),(-2,-8)] - ((1,2),(3,4)) | (-5,-12) | ((-4,-10),(-2,-8)) - [(0,0),(3,0),(4,5),(1,6)] | (-5,-12) | [(-5,-12),(-2,-12),(-1,-7),(-4,-6)] - ((1,2),(3,4)) | (-5,-12) | ((-4,-10),(-2,-8)) - ((1,2),(3,4)) | (-5,-12) | ((-4,-10),(-2,-8)) - [(1,2),(3,4)] | (-5,-12) | [(-4,-10),(-2,-8)] - ((10,20)) | (-5,-12) | ((5,8)) - [(11,12),(13,14)] | (-5,-12) | [(6,0),(8,2)] - ((11,12),(13,14)) | (-5,-12) | ((6,0),(8,2)) - [(1,2),(3,4)] | (1e-300,-1e-300) | [(1,2),(3,4)] - ((1,2),(3,4)) | (1e-300,-1e-300) | ((1,2),(3,4)) - [(0,0),(3,0),(4,5),(1,6)] | (1e-300,-1e-300) | [(1e-300,-1e-300),(3,-1e-300),(4,5),(1,6)] - ((1,2),(3,4)) | (1e-300,-1e-300) | ((1,2),(3,4)) - ((1,2),(3,4)) | (1e-300,-1e-300) | ((1,2),(3,4)) - [(1,2),(3,4)] | (1e-300,-1e-300) | [(1,2),(3,4)] - ((10,20)) | (1e-300,-1e-300) | ((10,20)) - [(11,12),(13,14)] | (1e-300,-1e-300) | [(11,12),(13,14)] - ((11,12),(13,14)) | (1e-300,-1e-300) | ((11,12),(13,14)) - [(1,2),(3,4)] | (1e+300,Infinity) | [(1e+300,Infinity),(1e+300,Infinity)] - ((1,2),(3,4)) | (1e+300,Infinity) | ((1e+300,Infinity),(1e+300,Infinity)) - [(0,0),(3,0),(4,5),(1,6)] | (1e+300,Infinity) | [(1e+300,Infinity),(1e+300,Infinity),(1e+300,Infinity),(1e+300,Infinity)] - ((1,2),(3,4)) | (1e+300,Infinity) | ((1e+300,Infinity),(1e+300,Infinity)) - ((1,2),(3,4)) | (1e+300,Infinity) | ((1e+300,Infinity),(1e+300,Infinity)) - [(1,2),(3,4)] | (1e+300,Infinity) | [(1e+300,Infinity),(1e+300,Infinity)] - ((10,20)) | (1e+300,Infinity) | ((1e+300,Infinity)) - [(11,12),(13,14)] | (1e+300,Infinity) | [(1e+300,Infinity),(1e+300,Infinity)] - ((11,12),(13,14)) | (1e+300,Infinity) | ((1e+300,Infinity),(1e+300,Infinity)) - [(1,2),(3,4)] | (Infinity,1e+300) | [(Infinity,1e+300),(Infinity,1e+300)] - ((1,2),(3,4)) | (Infinity,1e+300) | ((Infinity,1e+300),(Infinity,1e+300)) - [(0,0),(3,0),(4,5),(1,6)] | (Infinity,1e+300) | [(Infinity,1e+300),(Infinity,1e+300),(Infinity,1e+300),(Infinity,1e+300)] - ((1,2),(3,4)) | (Infinity,1e+300) | ((Infinity,1e+300),(Infinity,1e+300)) - ((1,2),(3,4)) | (Infinity,1e+300) | ((Infinity,1e+300),(Infinity,1e+300)) - [(1,2),(3,4)] | (Infinity,1e+300) | [(Infinity,1e+300),(Infinity,1e+300)] - ((10,20)) | (Infinity,1e+300) | ((Infinity,1e+300)) - [(11,12),(13,14)] | (Infinity,1e+300) | [(Infinity,1e+300),(Infinity,1e+300)] - ((11,12),(13,14)) | (Infinity,1e+300) | ((Infinity,1e+300),(Infinity,1e+300)) - [(1,2),(3,4)] | (NaN,NaN) | [(NaN,NaN),(NaN,NaN)] - ((1,2),(3,4)) | (NaN,NaN) | ((NaN,NaN),(NaN,NaN)) - [(0,0),(3,0),(4,5),(1,6)] | (NaN,NaN) | [(NaN,NaN),(NaN,NaN),(NaN,NaN),(NaN,NaN)] - ((1,2),(3,4)) | (NaN,NaN) | ((NaN,NaN),(NaN,NaN)) - ((1,2),(3,4)) | (NaN,NaN) | ((NaN,NaN),(NaN,NaN)) - [(1,2),(3,4)] | (NaN,NaN) | [(NaN,NaN),(NaN,NaN)] - ((10,20)) | (NaN,NaN) | ((NaN,NaN)) - [(11,12),(13,14)] | (NaN,NaN) | [(NaN,NaN),(NaN,NaN)] - ((11,12),(13,14)) | (NaN,NaN) | ((NaN,NaN),(NaN,NaN)) - [(1,2),(3,4)] | (10,10) | [(11,12),(13,14)] - ((1,2),(3,4)) | (10,10) | ((11,12),(13,14)) - [(0,0),(3,0),(4,5),(1,6)] | (10,10) | [(10,10),(13,10),(14,15),(11,16)] - ((1,2),(3,4)) | (10,10) | ((11,12),(13,14)) - ((1,2),(3,4)) | (10,10) | ((11,12),(13,14)) - [(1,2),(3,4)] | (10,10) | [(11,12),(13,14)] - ((10,20)) | (10,10) | ((20,30)) - [(11,12),(13,14)] | (10,10) | [(21,22),(23,24)] - ((11,12),(13,14)) | (10,10) | ((21,22),(23,24)) -(90 rows) - +ERROR: relation "path_tbl" does not exist +LINE 1: SELECT p.f1, p1.f1, p.f1 + p1.f1 FROM PATH_TBL p, POINT_TBL ... + ^ -- Subtract point SELECT p.f1, p1.f1, p.f1 - p1.f1 FROM PATH_TBL p, POINT_TBL p1; - f1 | f1 | ?column? ----------------------------+-------------------+----------------------------------------------------------------------------------- - [(1,2),(3,4)] | (0,0) | [(1,2),(3,4)] - ((1,2),(3,4)) | (0,0) | ((1,2),(3,4)) - [(0,0),(3,0),(4,5),(1,6)] | (0,0) | [(0,0),(3,0),(4,5),(1,6)] - ((1,2),(3,4)) | (0,0) | ((1,2),(3,4)) - ((1,2),(3,4)) | (0,0) | ((1,2),(3,4)) - [(1,2),(3,4)] | (0,0) | [(1,2),(3,4)] - ((10,20)) | (0,0) | ((10,20)) - [(11,12),(13,14)] | (0,0) | [(11,12),(13,14)] - ((11,12),(13,14)) | (0,0) | ((11,12),(13,14)) - [(1,2),(3,4)] | (-10,0) | [(11,2),(13,4)] - ((1,2),(3,4)) | (-10,0) | ((11,2),(13,4)) - [(0,0),(3,0),(4,5),(1,6)] | (-10,0) | [(10,0),(13,0),(14,5),(11,6)] - ((1,2),(3,4)) | (-10,0) | ((11,2),(13,4)) - ((1,2),(3,4)) | (-10,0) | ((11,2),(13,4)) - [(1,2),(3,4)] | (-10,0) | [(11,2),(13,4)] - ((10,20)) | (-10,0) | ((20,20)) - [(11,12),(13,14)] | (-10,0) | [(21,12),(23,14)] - ((11,12),(13,14)) | (-10,0) | ((21,12),(23,14)) - [(1,2),(3,4)] | (-3,4) | [(4,-2),(6,0)] - ((1,2),(3,4)) | (-3,4) | ((4,-2),(6,0)) - [(0,0),(3,0),(4,5),(1,6)] | (-3,4) | [(3,-4),(6,-4),(7,1),(4,2)] - ((1,2),(3,4)) | (-3,4) | ((4,-2),(6,0)) - ((1,2),(3,4)) | (-3,4) | ((4,-2),(6,0)) - [(1,2),(3,4)] | (-3,4) | [(4,-2),(6,0)] - ((10,20)) | (-3,4) | ((13,16)) - [(11,12),(13,14)] | (-3,4) | [(14,8),(16,10)] - ((11,12),(13,14)) | (-3,4) | ((14,8),(16,10)) - [(1,2),(3,4)] | (5.1,34.5) | [(-4.1,-32.5),(-2.1,-30.5)] - ((1,2),(3,4)) | (5.1,34.5) | ((-4.1,-32.5),(-2.1,-30.5)) - [(0,0),(3,0),(4,5),(1,6)] | (5.1,34.5) | [(-5.1,-34.5),(-2.1,-34.5),(-1.1,-29.5),(-4.1,-28.5)] - ((1,2),(3,4)) | (5.1,34.5) | ((-4.1,-32.5),(-2.1,-30.5)) - ((1,2),(3,4)) | (5.1,34.5) | ((-4.1,-32.5),(-2.1,-30.5)) - [(1,2),(3,4)] | (5.1,34.5) | [(-4.1,-32.5),(-2.1,-30.5)] - ((10,20)) | (5.1,34.5) | ((4.9,-14.5)) - [(11,12),(13,14)] | (5.1,34.5) | [(5.9,-22.5),(7.9,-20.5)] - ((11,12),(13,14)) | (5.1,34.5) | ((5.9,-22.5),(7.9,-20.5)) - [(1,2),(3,4)] | (-5,-12) | [(6,14),(8,16)] - ((1,2),(3,4)) | (-5,-12) | ((6,14),(8,16)) - [(0,0),(3,0),(4,5),(1,6)] | (-5,-12) | [(5,12),(8,12),(9,17),(6,18)] - ((1,2),(3,4)) | (-5,-12) | ((6,14),(8,16)) - ((1,2),(3,4)) | (-5,-12) | ((6,14),(8,16)) - [(1,2),(3,4)] | (-5,-12) | [(6,14),(8,16)] - ((10,20)) | (-5,-12) | ((15,32)) - [(11,12),(13,14)] | (-5,-12) | [(16,24),(18,26)] - ((11,12),(13,14)) | (-5,-12) | ((16,24),(18,26)) - [(1,2),(3,4)] | (1e-300,-1e-300) | [(1,2),(3,4)] - ((1,2),(3,4)) | (1e-300,-1e-300) | ((1,2),(3,4)) - [(0,0),(3,0),(4,5),(1,6)] | (1e-300,-1e-300) | [(-1e-300,1e-300),(3,1e-300),(4,5),(1,6)] - ((1,2),(3,4)) | (1e-300,-1e-300) | ((1,2),(3,4)) - ((1,2),(3,4)) | (1e-300,-1e-300) | ((1,2),(3,4)) - [(1,2),(3,4)] | (1e-300,-1e-300) | [(1,2),(3,4)] - ((10,20)) | (1e-300,-1e-300) | ((10,20)) - [(11,12),(13,14)] | (1e-300,-1e-300) | [(11,12),(13,14)] - ((11,12),(13,14)) | (1e-300,-1e-300) | ((11,12),(13,14)) - [(1,2),(3,4)] | (1e+300,Infinity) | [(-1e+300,-Infinity),(-1e+300,-Infinity)] - ((1,2),(3,4)) | (1e+300,Infinity) | ((-1e+300,-Infinity),(-1e+300,-Infinity)) - [(0,0),(3,0),(4,5),(1,6)] | (1e+300,Infinity) | [(-1e+300,-Infinity),(-1e+300,-Infinity),(-1e+300,-Infinity),(-1e+300,-Infinity)] - ((1,2),(3,4)) | (1e+300,Infinity) | ((-1e+300,-Infinity),(-1e+300,-Infinity)) - ((1,2),(3,4)) | (1e+300,Infinity) | ((-1e+300,-Infinity),(-1e+300,-Infinity)) - [(1,2),(3,4)] | (1e+300,Infinity) | [(-1e+300,-Infinity),(-1e+300,-Infinity)] - ((10,20)) | (1e+300,Infinity) | ((-1e+300,-Infinity)) - [(11,12),(13,14)] | (1e+300,Infinity) | [(-1e+300,-Infinity),(-1e+300,-Infinity)] - ((11,12),(13,14)) | (1e+300,Infinity) | ((-1e+300,-Infinity),(-1e+300,-Infinity)) - [(1,2),(3,4)] | (Infinity,1e+300) | [(-Infinity,-1e+300),(-Infinity,-1e+300)] - ((1,2),(3,4)) | (Infinity,1e+300) | ((-Infinity,-1e+300),(-Infinity,-1e+300)) - [(0,0),(3,0),(4,5),(1,6)] | (Infinity,1e+300) | [(-Infinity,-1e+300),(-Infinity,-1e+300),(-Infinity,-1e+300),(-Infinity,-1e+300)] - ((1,2),(3,4)) | (Infinity,1e+300) | ((-Infinity,-1e+300),(-Infinity,-1e+300)) - ((1,2),(3,4)) | (Infinity,1e+300) | ((-Infinity,-1e+300),(-Infinity,-1e+300)) - [(1,2),(3,4)] | (Infinity,1e+300) | [(-Infinity,-1e+300),(-Infinity,-1e+300)] - ((10,20)) | (Infinity,1e+300) | ((-Infinity,-1e+300)) - [(11,12),(13,14)] | (Infinity,1e+300) | [(-Infinity,-1e+300),(-Infinity,-1e+300)] - ((11,12),(13,14)) | (Infinity,1e+300) | ((-Infinity,-1e+300),(-Infinity,-1e+300)) - [(1,2),(3,4)] | (NaN,NaN) | [(NaN,NaN),(NaN,NaN)] - ((1,2),(3,4)) | (NaN,NaN) | ((NaN,NaN),(NaN,NaN)) - [(0,0),(3,0),(4,5),(1,6)] | (NaN,NaN) | [(NaN,NaN),(NaN,NaN),(NaN,NaN),(NaN,NaN)] - ((1,2),(3,4)) | (NaN,NaN) | ((NaN,NaN),(NaN,NaN)) - ((1,2),(3,4)) | (NaN,NaN) | ((NaN,NaN),(NaN,NaN)) - [(1,2),(3,4)] | (NaN,NaN) | [(NaN,NaN),(NaN,NaN)] - ((10,20)) | (NaN,NaN) | ((NaN,NaN)) - [(11,12),(13,14)] | (NaN,NaN) | [(NaN,NaN),(NaN,NaN)] - ((11,12),(13,14)) | (NaN,NaN) | ((NaN,NaN),(NaN,NaN)) - [(1,2),(3,4)] | (10,10) | [(-9,-8),(-7,-6)] - ((1,2),(3,4)) | (10,10) | ((-9,-8),(-7,-6)) - [(0,0),(3,0),(4,5),(1,6)] | (10,10) | [(-10,-10),(-7,-10),(-6,-5),(-9,-4)] - ((1,2),(3,4)) | (10,10) | ((-9,-8),(-7,-6)) - ((1,2),(3,4)) | (10,10) | ((-9,-8),(-7,-6)) - [(1,2),(3,4)] | (10,10) | [(-9,-8),(-7,-6)] - ((10,20)) | (10,10) | ((0,10)) - [(11,12),(13,14)] | (10,10) | [(1,2),(3,4)] - ((11,12),(13,14)) | (10,10) | ((1,2),(3,4)) -(90 rows) - +ERROR: relation "path_tbl" does not exist +LINE 1: SELECT p.f1, p1.f1, p.f1 - p1.f1 FROM PATH_TBL p, POINT_TBL ... + ^ -- Multiply with point SELECT p.f1, p1.f1, p.f1 * p1.f1 FROM PATH_TBL p, POINT_TBL p1; - f1 | f1 | ?column? ----------------------------+-------------------+---------------------------------------------------------------------- - [(1,2),(3,4)] | (0,0) | [(0,0),(0,0)] - ((1,2),(3,4)) | (0,0) | ((0,0),(0,0)) - [(0,0),(3,0),(4,5),(1,6)] | (0,0) | [(0,0),(0,0),(0,0),(0,0)] - ((1,2),(3,4)) | (0,0) | ((0,0),(0,0)) - ((1,2),(3,4)) | (0,0) | ((0,0),(0,0)) - [(1,2),(3,4)] | (0,0) | [(0,0),(0,0)] - ((10,20)) | (0,0) | ((0,0)) - [(11,12),(13,14)] | (0,0) | [(0,0),(0,0)] - ((11,12),(13,14)) | (0,0) | ((0,0),(0,0)) - [(1,2),(3,4)] | (-10,0) | [(-10,-20),(-30,-40)] - ((1,2),(3,4)) | (-10,0) | ((-10,-20),(-30,-40)) - [(0,0),(3,0),(4,5),(1,6)] | (-10,0) | [(-0,0),(-30,0),(-40,-50),(-10,-60)] - ((1,2),(3,4)) | (-10,0) | ((-10,-20),(-30,-40)) - ((1,2),(3,4)) | (-10,0) | ((-10,-20),(-30,-40)) - [(1,2),(3,4)] | (-10,0) | [(-10,-20),(-30,-40)] - ((10,20)) | (-10,0) | ((-100,-200)) - [(11,12),(13,14)] | (-10,0) | [(-110,-120),(-130,-140)] - ((11,12),(13,14)) | (-10,0) | ((-110,-120),(-130,-140)) - [(1,2),(3,4)] | (-3,4) | [(-11,-2),(-25,0)] - ((1,2),(3,4)) | (-3,4) | ((-11,-2),(-25,0)) - [(0,0),(3,0),(4,5),(1,6)] | (-3,4) | [(-0,0),(-9,12),(-32,1),(-27,-14)] - ((1,2),(3,4)) | (-3,4) | ((-11,-2),(-25,0)) - ((1,2),(3,4)) | (-3,4) | ((-11,-2),(-25,0)) - [(1,2),(3,4)] | (-3,4) | [(-11,-2),(-25,0)] - ((10,20)) | (-3,4) | ((-110,-20)) - [(11,12),(13,14)] | (-3,4) | [(-81,8),(-95,10)] - ((11,12),(13,14)) | (-3,4) | ((-81,8),(-95,10)) - [(1,2),(3,4)] | (5.1,34.5) | [(-63.9,44.7),(-122.7,123.9)] - ((1,2),(3,4)) | (5.1,34.5) | ((-63.9,44.7),(-122.7,123.9)) - [(0,0),(3,0),(4,5),(1,6)] | (5.1,34.5) | [(0,0),(15.3,103.5),(-152.1,163.5),(-201.9,65.1)] - ((1,2),(3,4)) | (5.1,34.5) | ((-63.9,44.7),(-122.7,123.9)) - ((1,2),(3,4)) | (5.1,34.5) | ((-63.9,44.7),(-122.7,123.9)) - [(1,2),(3,4)] | (5.1,34.5) | [(-63.9,44.7),(-122.7,123.9)] - ((10,20)) | (5.1,34.5) | ((-639,447)) - [(11,12),(13,14)] | (5.1,34.5) | [(-357.9,440.7),(-416.7,519.9)] - ((11,12),(13,14)) | (5.1,34.5) | ((-357.9,440.7),(-416.7,519.9)) - [(1,2),(3,4)] | (-5,-12) | [(19,-22),(33,-56)] - ((1,2),(3,4)) | (-5,-12) | ((19,-22),(33,-56)) - [(0,0),(3,0),(4,5),(1,6)] | (-5,-12) | [(0,-0),(-15,-36),(40,-73),(67,-42)] - ((1,2),(3,4)) | (-5,-12) | ((19,-22),(33,-56)) - ((1,2),(3,4)) | (-5,-12) | ((19,-22),(33,-56)) - [(1,2),(3,4)] | (-5,-12) | [(19,-22),(33,-56)] - ((10,20)) | (-5,-12) | ((190,-220)) - [(11,12),(13,14)] | (-5,-12) | [(89,-192),(103,-226)] - ((11,12),(13,14)) | (-5,-12) | ((89,-192),(103,-226)) - [(1,2),(3,4)] | (1e-300,-1e-300) | [(3e-300,1e-300),(7e-300,1e-300)] - ((1,2),(3,4)) | (1e-300,-1e-300) | ((3e-300,1e-300),(7e-300,1e-300)) - [(0,0),(3,0),(4,5),(1,6)] | (1e-300,-1e-300) | [(0,0),(3e-300,-3e-300),(9e-300,1e-300),(7e-300,5e-300)] - ((1,2),(3,4)) | (1e-300,-1e-300) | ((3e-300,1e-300),(7e-300,1e-300)) - ((1,2),(3,4)) | (1e-300,-1e-300) | ((3e-300,1e-300),(7e-300,1e-300)) - [(1,2),(3,4)] | (1e-300,-1e-300) | [(3e-300,1e-300),(7e-300,1e-300)] - ((10,20)) | (1e-300,-1e-300) | ((3e-299,1e-299)) - [(11,12),(13,14)] | (1e-300,-1e-300) | [(2.3e-299,1e-300),(2.7e-299,1e-300)] - ((11,12),(13,14)) | (1e-300,-1e-300) | ((2.3e-299,1e-300),(2.7e-299,1e-300)) - [(1,2),(3,4)] | (1e+300,Infinity) | [(-Infinity,Infinity),(-Infinity,Infinity)] - ((1,2),(3,4)) | (1e+300,Infinity) | ((-Infinity,Infinity),(-Infinity,Infinity)) - [(0,0),(3,0),(4,5),(1,6)] | (1e+300,Infinity) | [(NaN,NaN),(NaN,Infinity),(-Infinity,Infinity),(-Infinity,Infinity)] - ((1,2),(3,4)) | (1e+300,Infinity) | ((-Infinity,Infinity),(-Infinity,Infinity)) - ((1,2),(3,4)) | (1e+300,Infinity) | ((-Infinity,Infinity),(-Infinity,Infinity)) - [(1,2),(3,4)] | (1e+300,Infinity) | [(-Infinity,Infinity),(-Infinity,Infinity)] - ((10,20)) | (1e+300,Infinity) | ((-Infinity,Infinity)) - [(11,12),(13,14)] | (1e+300,Infinity) | [(-Infinity,Infinity),(-Infinity,Infinity)] - ((11,12),(13,14)) | (1e+300,Infinity) | ((-Infinity,Infinity),(-Infinity,Infinity)) - [(1,2),(3,4)] | (Infinity,1e+300) | [(Infinity,Infinity),(Infinity,Infinity)] - ((1,2),(3,4)) | (Infinity,1e+300) | ((Infinity,Infinity),(Infinity,Infinity)) - [(0,0),(3,0),(4,5),(1,6)] | (Infinity,1e+300) | [(NaN,NaN),(Infinity,NaN),(Infinity,Infinity),(Infinity,Infinity)] - ((1,2),(3,4)) | (Infinity,1e+300) | ((Infinity,Infinity),(Infinity,Infinity)) - ((1,2),(3,4)) | (Infinity,1e+300) | ((Infinity,Infinity),(Infinity,Infinity)) - [(1,2),(3,4)] | (Infinity,1e+300) | [(Infinity,Infinity),(Infinity,Infinity)] - ((10,20)) | (Infinity,1e+300) | ((Infinity,Infinity)) - [(11,12),(13,14)] | (Infinity,1e+300) | [(Infinity,Infinity),(Infinity,Infinity)] - ((11,12),(13,14)) | (Infinity,1e+300) | ((Infinity,Infinity),(Infinity,Infinity)) - [(1,2),(3,4)] | (NaN,NaN) | [(NaN,NaN),(NaN,NaN)] - ((1,2),(3,4)) | (NaN,NaN) | ((NaN,NaN),(NaN,NaN)) - [(0,0),(3,0),(4,5),(1,6)] | (NaN,NaN) | [(NaN,NaN),(NaN,NaN),(NaN,NaN),(NaN,NaN)] - ((1,2),(3,4)) | (NaN,NaN) | ((NaN,NaN),(NaN,NaN)) - ((1,2),(3,4)) | (NaN,NaN) | ((NaN,NaN),(NaN,NaN)) - [(1,2),(3,4)] | (NaN,NaN) | [(NaN,NaN),(NaN,NaN)] - ((10,20)) | (NaN,NaN) | ((NaN,NaN)) - [(11,12),(13,14)] | (NaN,NaN) | [(NaN,NaN),(NaN,NaN)] - ((11,12),(13,14)) | (NaN,NaN) | ((NaN,NaN),(NaN,NaN)) - [(1,2),(3,4)] | (10,10) | [(-10,30),(-10,70)] - ((1,2),(3,4)) | (10,10) | ((-10,30),(-10,70)) - [(0,0),(3,0),(4,5),(1,6)] | (10,10) | [(0,0),(30,30),(-10,90),(-50,70)] - ((1,2),(3,4)) | (10,10) | ((-10,30),(-10,70)) - ((1,2),(3,4)) | (10,10) | ((-10,30),(-10,70)) - [(1,2),(3,4)] | (10,10) | [(-10,30),(-10,70)] - ((10,20)) | (10,10) | ((-100,300)) - [(11,12),(13,14)] | (10,10) | [(-10,230),(-10,270)] - ((11,12),(13,14)) | (10,10) | ((-10,230),(-10,270)) -(90 rows) - +ERROR: relation "path_tbl" does not exist +LINE 1: SELECT p.f1, p1.f1, p.f1 * p1.f1 FROM PATH_TBL p, POINT_TBL ... + ^ -- Divide by point SELECT p.f1, p1.f1, p.f1 / p1.f1 FROM PATH_TBL p, POINT_TBL p1 WHERE p1.f1[0] BETWEEN 1 AND 1000; - f1 | f1 | ?column? ----------------------------+------------+----------------------------------------------------------------------------------------------------------------- - [(1,2),(3,4)] | (5.1,34.5) | [(0.0609244733856,-0.0199792807459),(0.12604212915,-0.0683242069952)] - [(1,2),(3,4)] | (10,10) | [(0.15,0.05),(0.35,0.05)] - ((1,2),(3,4)) | (5.1,34.5) | ((0.0609244733856,-0.0199792807459),(0.12604212915,-0.0683242069952)) - ((1,2),(3,4)) | (10,10) | ((0.15,0.05),(0.35,0.05)) - [(0,0),(3,0),(4,5),(1,6)] | (5.1,34.5) | [(0,0),(0.0125795471363,-0.0850969365103),(0.158600957032,-0.0924966701199),(0.174387055399,-0.00320655123082)] - [(0,0),(3,0),(4,5),(1,6)] | (10,10) | [(0,0),(0.15,-0.15),(0.45,0.05),(0.35,0.25)] - ((1,2),(3,4)) | (5.1,34.5) | ((0.0609244733856,-0.0199792807459),(0.12604212915,-0.0683242069952)) - ((1,2),(3,4)) | (10,10) | ((0.15,0.05),(0.35,0.05)) - ((1,2),(3,4)) | (5.1,34.5) | ((0.0609244733856,-0.0199792807459),(0.12604212915,-0.0683242069952)) - ((1,2),(3,4)) | (10,10) | ((0.15,0.05),(0.35,0.05)) - [(1,2),(3,4)] | (5.1,34.5) | [(0.0609244733856,-0.0199792807459),(0.12604212915,-0.0683242069952)] - [(1,2),(3,4)] | (10,10) | [(0.15,0.05),(0.35,0.05)] - ((10,20)) | (5.1,34.5) | ((0.609244733856,-0.199792807459)) - ((10,20)) | (10,10) | ((1.5,0.5)) - [(11,12),(13,14)] | (5.1,34.5) | [(0.386512752208,-0.261703911993),(0.451630407972,-0.310048838242)] - [(11,12),(13,14)] | (10,10) | [(1.15,0.05),(1.35,0.05)] - ((11,12),(13,14)) | (5.1,34.5) | ((0.386512752208,-0.261703911993),(0.451630407972,-0.310048838242)) - ((11,12),(13,14)) | (10,10) | ((1.15,0.05),(1.35,0.05)) -(18 rows) - +ERROR: relation "path_tbl" does not exist +LINE 1: SELECT p.f1, p1.f1, p.f1 / p1.f1 FROM PATH_TBL p, POINT_TBL ... + ^ -- Division by 0 error SELECT p.f1, p1.f1, p.f1 / p1.f1 FROM PATH_TBL p, POINT_TBL p1 WHERE p1.f1 ~= '(0,0)'::point; -ERROR: division by zero +ERROR: relation "path_tbl" does not exist +LINE 1: SELECT p.f1, p1.f1, p.f1 / p1.f1 FROM PATH_TBL p, POINT_TBL ... + ^ -- Distance to path SELECT p1.f1, p2.f1, p1.f1 <-> p2.f1 FROM PATH_TBL p1, PATH_TBL p2; - f1 | f1 | ?column? ----------------------------+---------------------------+---------------- - [(1,2),(3,4)] | [(1,2),(3,4)] | 0 - [(1,2),(3,4)] | ((1,2),(3,4)) | 0 - [(1,2),(3,4)] | [(0,0),(3,0),(4,5),(1,6)] | 0.784464540553 - [(1,2),(3,4)] | ((1,2),(3,4)) | 0 - [(1,2),(3,4)] | ((1,2),(3,4)) | 0 - [(1,2),(3,4)] | [(1,2),(3,4)] | 0 - [(1,2),(3,4)] | ((10,20)) | 17.4642491966 - [(1,2),(3,4)] | [(11,12),(13,14)] | 11.313708499 - [(1,2),(3,4)] | ((11,12),(13,14)) | 11.313708499 - ((1,2),(3,4)) | [(1,2),(3,4)] | 0 - ((1,2),(3,4)) | ((1,2),(3,4)) | 0 - ((1,2),(3,4)) | [(0,0),(3,0),(4,5),(1,6)] | 0.784464540553 - ((1,2),(3,4)) | ((1,2),(3,4)) | 0 - ((1,2),(3,4)) | ((1,2),(3,4)) | 0 - ((1,2),(3,4)) | [(1,2),(3,4)] | 0 - ((1,2),(3,4)) | ((10,20)) | 17.4642491966 - ((1,2),(3,4)) | [(11,12),(13,14)] | 11.313708499 - ((1,2),(3,4)) | ((11,12),(13,14)) | 11.313708499 - [(0,0),(3,0),(4,5),(1,6)] | [(1,2),(3,4)] | 0.784464540553 - [(0,0),(3,0),(4,5),(1,6)] | ((1,2),(3,4)) | 0.784464540553 - [(0,0),(3,0),(4,5),(1,6)] | [(0,0),(3,0),(4,5),(1,6)] | 0 - [(0,0),(3,0),(4,5),(1,6)] | ((1,2),(3,4)) | 0.784464540553 - [(0,0),(3,0),(4,5),(1,6)] | ((1,2),(3,4)) | 0.784464540553 - [(0,0),(3,0),(4,5),(1,6)] | [(1,2),(3,4)] | 0.784464540553 - [(0,0),(3,0),(4,5),(1,6)] | ((10,20)) | 16.1554944214 - [(0,0),(3,0),(4,5),(1,6)] | [(11,12),(13,14)] | 9.89949493661 - [(0,0),(3,0),(4,5),(1,6)] | ((11,12),(13,14)) | 9.89949493661 - ((1,2),(3,4)) | [(1,2),(3,4)] | 0 - ((1,2),(3,4)) | ((1,2),(3,4)) | 0 - ((1,2),(3,4)) | [(0,0),(3,0),(4,5),(1,6)] | 0.784464540553 - ((1,2),(3,4)) | ((1,2),(3,4)) | 0 - ((1,2),(3,4)) | ((1,2),(3,4)) | 0 - ((1,2),(3,4)) | [(1,2),(3,4)] | 0 - ((1,2),(3,4)) | ((10,20)) | 17.4642491966 - ((1,2),(3,4)) | [(11,12),(13,14)] | 11.313708499 - ((1,2),(3,4)) | ((11,12),(13,14)) | 11.313708499 - ((1,2),(3,4)) | [(1,2),(3,4)] | 0 - ((1,2),(3,4)) | ((1,2),(3,4)) | 0 - ((1,2),(3,4)) | [(0,0),(3,0),(4,5),(1,6)] | 0.784464540553 - ((1,2),(3,4)) | ((1,2),(3,4)) | 0 - ((1,2),(3,4)) | ((1,2),(3,4)) | 0 - ((1,2),(3,4)) | [(1,2),(3,4)] | 0 - ((1,2),(3,4)) | ((10,20)) | 17.4642491966 - ((1,2),(3,4)) | [(11,12),(13,14)] | 11.313708499 - ((1,2),(3,4)) | ((11,12),(13,14)) | 11.313708499 - [(1,2),(3,4)] | [(1,2),(3,4)] | 0 - [(1,2),(3,4)] | ((1,2),(3,4)) | 0 - [(1,2),(3,4)] | [(0,0),(3,0),(4,5),(1,6)] | 0.784464540553 - [(1,2),(3,4)] | ((1,2),(3,4)) | 0 - [(1,2),(3,4)] | ((1,2),(3,4)) | 0 - [(1,2),(3,4)] | [(1,2),(3,4)] | 0 - [(1,2),(3,4)] | ((10,20)) | 17.4642491966 - [(1,2),(3,4)] | [(11,12),(13,14)] | 11.313708499 - [(1,2),(3,4)] | ((11,12),(13,14)) | 11.313708499 - ((10,20)) | [(1,2),(3,4)] | 17.4642491966 - ((10,20)) | ((1,2),(3,4)) | 17.4642491966 - ((10,20)) | [(0,0),(3,0),(4,5),(1,6)] | 16.1554944214 - ((10,20)) | ((1,2),(3,4)) | 17.4642491966 - ((10,20)) | ((1,2),(3,4)) | 17.4642491966 - ((10,20)) | [(1,2),(3,4)] | 17.4642491966 - ((10,20)) | ((10,20)) | 0 - ((10,20)) | [(11,12),(13,14)] | 6.7082039325 - ((10,20)) | ((11,12),(13,14)) | 6.7082039325 - [(11,12),(13,14)] | [(1,2),(3,4)] | 11.313708499 - [(11,12),(13,14)] | ((1,2),(3,4)) | 11.313708499 - [(11,12),(13,14)] | [(0,0),(3,0),(4,5),(1,6)] | 9.89949493661 - [(11,12),(13,14)] | ((1,2),(3,4)) | 11.313708499 - [(11,12),(13,14)] | ((1,2),(3,4)) | 11.313708499 - [(11,12),(13,14)] | [(1,2),(3,4)] | 11.313708499 - [(11,12),(13,14)] | ((10,20)) | 6.7082039325 - [(11,12),(13,14)] | [(11,12),(13,14)] | 0 - [(11,12),(13,14)] | ((11,12),(13,14)) | 0 - ((11,12),(13,14)) | [(1,2),(3,4)] | 11.313708499 - ((11,12),(13,14)) | ((1,2),(3,4)) | 11.313708499 - ((11,12),(13,14)) | [(0,0),(3,0),(4,5),(1,6)] | 9.89949493661 - ((11,12),(13,14)) | ((1,2),(3,4)) | 11.313708499 - ((11,12),(13,14)) | ((1,2),(3,4)) | 11.313708499 - ((11,12),(13,14)) | [(1,2),(3,4)] | 11.313708499 - ((11,12),(13,14)) | ((10,20)) | 6.7082039325 - ((11,12),(13,14)) | [(11,12),(13,14)] | 0 - ((11,12),(13,14)) | ((11,12),(13,14)) | 0 -(81 rows) - +ERROR: relation "path_tbl" does not exist +LINE 1: SELECT p1.f1, p2.f1, p1.f1 <-> p2.f1 FROM PATH_TBL p1, PATH_... + ^ -- -- Polygons -- -- containment SELECT p.f1, poly.f1, poly.f1 @> p.f1 AS contains FROM POLYGON_TBL poly, POINT_TBL p; - f1 | f1 | contains --------------------+----------------------------+---------- - (0,0) | ((2,0),(2,4),(0,0)) | t - (0,0) | ((3,1),(3,3),(1,0)) | f - (0,0) | ((1,2),(3,4),(5,6),(7,8)) | f - (0,0) | ((7,8),(5,6),(3,4),(1,2)) | f - (0,0) | ((1,2),(7,8),(5,6),(3,-4)) | f - (0,0) | ((0,0)) | t - (0,0) | ((0,1),(0,1)) | f - (-10,0) | ((2,0),(2,4),(0,0)) | f - (-10,0) | ((3,1),(3,3),(1,0)) | f - (-10,0) | ((1,2),(3,4),(5,6),(7,8)) | f - (-10,0) | ((7,8),(5,6),(3,4),(1,2)) | f - (-10,0) | ((1,2),(7,8),(5,6),(3,-4)) | f - (-10,0) | ((0,0)) | f - (-10,0) | ((0,1),(0,1)) | f - (-3,4) | ((2,0),(2,4),(0,0)) | f - (-3,4) | ((3,1),(3,3),(1,0)) | f - (-3,4) | ((1,2),(3,4),(5,6),(7,8)) | f - (-3,4) | ((7,8),(5,6),(3,4),(1,2)) | f - (-3,4) | ((1,2),(7,8),(5,6),(3,-4)) | f - (-3,4) | ((0,0)) | f - (-3,4) | ((0,1),(0,1)) | f - (5.1,34.5) | ((2,0),(2,4),(0,0)) | f - (5.1,34.5) | ((3,1),(3,3),(1,0)) | f - (5.1,34.5) | ((1,2),(3,4),(5,6),(7,8)) | f - (5.1,34.5) | ((7,8),(5,6),(3,4),(1,2)) | f - (5.1,34.5) | ((1,2),(7,8),(5,6),(3,-4)) | f - (5.1,34.5) | ((0,0)) | f - (5.1,34.5) | ((0,1),(0,1)) | f - (-5,-12) | ((2,0),(2,4),(0,0)) | f - (-5,-12) | ((3,1),(3,3),(1,0)) | f - (-5,-12) | ((1,2),(3,4),(5,6),(7,8)) | f - (-5,-12) | ((7,8),(5,6),(3,4),(1,2)) | f - (-5,-12) | ((1,2),(7,8),(5,6),(3,-4)) | f - (-5,-12) | ((0,0)) | f - (-5,-12) | ((0,1),(0,1)) | f - (1e-300,-1e-300) | ((2,0),(2,4),(0,0)) | t - (1e-300,-1e-300) | ((3,1),(3,3),(1,0)) | f - (1e-300,-1e-300) | ((1,2),(3,4),(5,6),(7,8)) | f - (1e-300,-1e-300) | ((7,8),(5,6),(3,4),(1,2)) | f - (1e-300,-1e-300) | ((1,2),(7,8),(5,6),(3,-4)) | f - (1e-300,-1e-300) | ((0,0)) | t - (1e-300,-1e-300) | ((0,1),(0,1)) | f - (1e+300,Infinity) | ((2,0),(2,4),(0,0)) | f - (1e+300,Infinity) | ((3,1),(3,3),(1,0)) | f - (1e+300,Infinity) | ((1,2),(3,4),(5,6),(7,8)) | f - (1e+300,Infinity) | ((7,8),(5,6),(3,4),(1,2)) | f - (1e+300,Infinity) | ((1,2),(7,8),(5,6),(3,-4)) | f - (1e+300,Infinity) | ((0,0)) | f - (1e+300,Infinity) | ((0,1),(0,1)) | f - (Infinity,1e+300) | ((2,0),(2,4),(0,0)) | f - (Infinity,1e+300) | ((3,1),(3,3),(1,0)) | f - (Infinity,1e+300) | ((1,2),(3,4),(5,6),(7,8)) | f - (Infinity,1e+300) | ((7,8),(5,6),(3,4),(1,2)) | f - (Infinity,1e+300) | ((1,2),(7,8),(5,6),(3,-4)) | f - (Infinity,1e+300) | ((0,0)) | f - (Infinity,1e+300) | ((0,1),(0,1)) | f - (NaN,NaN) | ((2,0),(2,4),(0,0)) | t - (NaN,NaN) | ((3,1),(3,3),(1,0)) | t - (NaN,NaN) | ((1,2),(3,4),(5,6),(7,8)) | t - (NaN,NaN) | ((7,8),(5,6),(3,4),(1,2)) | t - (NaN,NaN) | ((1,2),(7,8),(5,6),(3,-4)) | t - (NaN,NaN) | ((0,0)) | t - (NaN,NaN) | ((0,1),(0,1)) | t - (10,10) | ((2,0),(2,4),(0,0)) | f - (10,10) | ((3,1),(3,3),(1,0)) | f - (10,10) | ((1,2),(3,4),(5,6),(7,8)) | f - (10,10) | ((7,8),(5,6),(3,4),(1,2)) | f - (10,10) | ((1,2),(7,8),(5,6),(3,-4)) | f - (10,10) | ((0,0)) | f - (10,10) | ((0,1),(0,1)) | f -(70 rows) - +ERROR: relation "polygon_tbl" does not exist +LINE 2: FROM POLYGON_TBL poly, POINT_TBL p; + ^ SELECT p.f1, poly.f1, p.f1 <@ poly.f1 AS contained FROM POLYGON_TBL poly, POINT_TBL p; - f1 | f1 | contained --------------------+----------------------------+----------- - (0,0) | ((2,0),(2,4),(0,0)) | t - (0,0) | ((3,1),(3,3),(1,0)) | f - (0,0) | ((1,2),(3,4),(5,6),(7,8)) | f - (0,0) | ((7,8),(5,6),(3,4),(1,2)) | f - (0,0) | ((1,2),(7,8),(5,6),(3,-4)) | f - (0,0) | ((0,0)) | t - (0,0) | ((0,1),(0,1)) | f - (-10,0) | ((2,0),(2,4),(0,0)) | f - (-10,0) | ((3,1),(3,3),(1,0)) | f - (-10,0) | ((1,2),(3,4),(5,6),(7,8)) | f - (-10,0) | ((7,8),(5,6),(3,4),(1,2)) | f - (-10,0) | ((1,2),(7,8),(5,6),(3,-4)) | f - (-10,0) | ((0,0)) | f - (-10,0) | ((0,1),(0,1)) | f - (-3,4) | ((2,0),(2,4),(0,0)) | f - (-3,4) | ((3,1),(3,3),(1,0)) | f - (-3,4) | ((1,2),(3,4),(5,6),(7,8)) | f - (-3,4) | ((7,8),(5,6),(3,4),(1,2)) | f - (-3,4) | ((1,2),(7,8),(5,6),(3,-4)) | f - (-3,4) | ((0,0)) | f - (-3,4) | ((0,1),(0,1)) | f - (5.1,34.5) | ((2,0),(2,4),(0,0)) | f - (5.1,34.5) | ((3,1),(3,3),(1,0)) | f - (5.1,34.5) | ((1,2),(3,4),(5,6),(7,8)) | f - (5.1,34.5) | ((7,8),(5,6),(3,4),(1,2)) | f - (5.1,34.5) | ((1,2),(7,8),(5,6),(3,-4)) | f - (5.1,34.5) | ((0,0)) | f - (5.1,34.5) | ((0,1),(0,1)) | f - (-5,-12) | ((2,0),(2,4),(0,0)) | f - (-5,-12) | ((3,1),(3,3),(1,0)) | f - (-5,-12) | ((1,2),(3,4),(5,6),(7,8)) | f - (-5,-12) | ((7,8),(5,6),(3,4),(1,2)) | f - (-5,-12) | ((1,2),(7,8),(5,6),(3,-4)) | f - (-5,-12) | ((0,0)) | f - (-5,-12) | ((0,1),(0,1)) | f - (1e-300,-1e-300) | ((2,0),(2,4),(0,0)) | t - (1e-300,-1e-300) | ((3,1),(3,3),(1,0)) | f - (1e-300,-1e-300) | ((1,2),(3,4),(5,6),(7,8)) | f - (1e-300,-1e-300) | ((7,8),(5,6),(3,4),(1,2)) | f - (1e-300,-1e-300) | ((1,2),(7,8),(5,6),(3,-4)) | f - (1e-300,-1e-300) | ((0,0)) | t - (1e-300,-1e-300) | ((0,1),(0,1)) | f - (1e+300,Infinity) | ((2,0),(2,4),(0,0)) | f - (1e+300,Infinity) | ((3,1),(3,3),(1,0)) | f - (1e+300,Infinity) | ((1,2),(3,4),(5,6),(7,8)) | f - (1e+300,Infinity) | ((7,8),(5,6),(3,4),(1,2)) | f - (1e+300,Infinity) | ((1,2),(7,8),(5,6),(3,-4)) | f - (1e+300,Infinity) | ((0,0)) | f - (1e+300,Infinity) | ((0,1),(0,1)) | f - (Infinity,1e+300) | ((2,0),(2,4),(0,0)) | f - (Infinity,1e+300) | ((3,1),(3,3),(1,0)) | f - (Infinity,1e+300) | ((1,2),(3,4),(5,6),(7,8)) | f - (Infinity,1e+300) | ((7,8),(5,6),(3,4),(1,2)) | f - (Infinity,1e+300) | ((1,2),(7,8),(5,6),(3,-4)) | f - (Infinity,1e+300) | ((0,0)) | f - (Infinity,1e+300) | ((0,1),(0,1)) | f - (NaN,NaN) | ((2,0),(2,4),(0,0)) | t - (NaN,NaN) | ((3,1),(3,3),(1,0)) | t - (NaN,NaN) | ((1,2),(3,4),(5,6),(7,8)) | t - (NaN,NaN) | ((7,8),(5,6),(3,4),(1,2)) | t - (NaN,NaN) | ((1,2),(7,8),(5,6),(3,-4)) | t - (NaN,NaN) | ((0,0)) | t - (NaN,NaN) | ((0,1),(0,1)) | t - (10,10) | ((2,0),(2,4),(0,0)) | f - (10,10) | ((3,1),(3,3),(1,0)) | f - (10,10) | ((1,2),(3,4),(5,6),(7,8)) | f - (10,10) | ((7,8),(5,6),(3,4),(1,2)) | f - (10,10) | ((1,2),(7,8),(5,6),(3,-4)) | f - (10,10) | ((0,0)) | f - (10,10) | ((0,1),(0,1)) | f -(70 rows) - +ERROR: relation "polygon_tbl" does not exist +LINE 2: FROM POLYGON_TBL poly, POINT_TBL p; + ^ SELECT npoints(f1) AS npoints, f1 AS polygon FROM POLYGON_TBL; - npoints | polygon ----------+---------------------------- - 3 | ((2,0),(2,4),(0,0)) - 3 | ((3,1),(3,3),(1,0)) - 4 | ((1,2),(3,4),(5,6),(7,8)) - 4 | ((7,8),(5,6),(3,4),(1,2)) - 4 | ((1,2),(7,8),(5,6),(3,-4)) - 1 | ((0,0)) - 2 | ((0,1),(0,1)) -(7 rows) - +ERROR: relation "polygon_tbl" does not exist +LINE 2: FROM POLYGON_TBL; + ^ SELECT polygon(f1) FROM BOX_TBL; - polygon -------------------------------------------- - ((0,0),(0,2),(2,2),(2,0)) - ((1,1),(1,3),(3,3),(3,1)) - ((-8,-10),(-8,2),(-2,2),(-2,-10)) - ((2.5,2.5),(2.5,3.5),(2.5,3.5),(2.5,2.5)) - ((3,3),(3,3),(3,3),(3,3)) -(5 rows) - +ERROR: relation "box_tbl" does not exist +LINE 2: FROM BOX_TBL; + ^ SELECT polygon(f1) FROM PATH_TBL WHERE isclosed(f1); - polygon -------------------- - ((1,2),(3,4)) - ((1,2),(3,4)) - ((1,2),(3,4)) - ((10,20)) - ((11,12),(13,14)) -(5 rows) - +ERROR: relation "path_tbl" does not exist +LINE 2: FROM PATH_TBL WHERE isclosed(f1); + ^ SELECT f1 AS open_path, polygon( pclose(f1)) AS polygon FROM PATH_TBL WHERE isopen(f1); - open_path | polygon ----------------------------+--------------------------- - [(1,2),(3,4)] | ((1,2),(3,4)) - [(0,0),(3,0),(4,5),(1,6)] | ((0,0),(3,0),(4,5),(1,6)) - [(1,2),(3,4)] | ((1,2),(3,4)) - [(11,12),(13,14)] | ((11,12),(13,14)) -(4 rows) - +ERROR: relation "path_tbl" does not exist +LINE 2: FROM PATH_TBL + ^ -- To box SELECT f1, f1::box FROM POLYGON_TBL; - f1 | f1 -----------------------------+-------------- - ((2,0),(2,4),(0,0)) | (2,4),(0,0) - ((3,1),(3,3),(1,0)) | (3,3),(1,0) - ((1,2),(3,4),(5,6),(7,8)) | (7,8),(1,2) - ((7,8),(5,6),(3,4),(1,2)) | (7,8),(1,2) - ((1,2),(7,8),(5,6),(3,-4)) | (7,8),(1,-4) - ((0,0)) | (0,0),(0,0) - ((0,1),(0,1)) | (0,1),(0,1) -(7 rows) - +ERROR: relation "polygon_tbl" does not exist +LINE 1: SELECT f1, f1::box FROM POLYGON_TBL; + ^ -- To path SELECT f1, f1::path FROM POLYGON_TBL; - f1 | f1 -----------------------------+---------------------------- - ((2,0),(2,4),(0,0)) | ((2,0),(2,4),(0,0)) - ((3,1),(3,3),(1,0)) | ((3,1),(3,3),(1,0)) - ((1,2),(3,4),(5,6),(7,8)) | ((1,2),(3,4),(5,6),(7,8)) - ((7,8),(5,6),(3,4),(1,2)) | ((7,8),(5,6),(3,4),(1,2)) - ((1,2),(7,8),(5,6),(3,-4)) | ((1,2),(7,8),(5,6),(3,-4)) - ((0,0)) | ((0,0)) - ((0,1),(0,1)) | ((0,1),(0,1)) -(7 rows) - +ERROR: relation "polygon_tbl" does not exist +LINE 1: SELECT f1, f1::path FROM POLYGON_TBL; + ^ -- Same as polygon SELECT p1.f1, p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2 WHERE p1.f1 ~= p2.f1; - f1 | f1 -----------------------------+---------------------------- - ((2,0),(2,4),(0,0)) | ((2,0),(2,4),(0,0)) - ((3,1),(3,3),(1,0)) | ((3,1),(3,3),(1,0)) - ((1,2),(3,4),(5,6),(7,8)) | ((1,2),(3,4),(5,6),(7,8)) - ((1,2),(3,4),(5,6),(7,8)) | ((7,8),(5,6),(3,4),(1,2)) - ((7,8),(5,6),(3,4),(1,2)) | ((1,2),(3,4),(5,6),(7,8)) - ((7,8),(5,6),(3,4),(1,2)) | ((7,8),(5,6),(3,4),(1,2)) - ((1,2),(7,8),(5,6),(3,-4)) | ((1,2),(7,8),(5,6),(3,-4)) - ((0,0)) | ((0,0)) - ((0,1),(0,1)) | ((0,1),(0,1)) -(9 rows) - +ERROR: relation "polygon_tbl" does not exist +LINE 1: SELECT p1.f1, p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2 WHER... + ^ -- Contained by polygon SELECT p1.f1, p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2 WHERE p1.f1 <@ p2.f1; - f1 | f1 -----------------------------+---------------------------- - ((2,0),(2,4),(0,0)) | ((2,0),(2,4),(0,0)) - ((3,1),(3,3),(1,0)) | ((3,1),(3,3),(1,0)) - ((1,2),(3,4),(5,6),(7,8)) | ((1,2),(3,4),(5,6),(7,8)) - ((1,2),(3,4),(5,6),(7,8)) | ((7,8),(5,6),(3,4),(1,2)) - ((1,2),(3,4),(5,6),(7,8)) | ((1,2),(7,8),(5,6),(3,-4)) - ((7,8),(5,6),(3,4),(1,2)) | ((1,2),(3,4),(5,6),(7,8)) - ((7,8),(5,6),(3,4),(1,2)) | ((7,8),(5,6),(3,4),(1,2)) - ((7,8),(5,6),(3,4),(1,2)) | ((1,2),(7,8),(5,6),(3,-4)) - ((1,2),(7,8),(5,6),(3,-4)) | ((1,2),(7,8),(5,6),(3,-4)) - ((0,0)) | ((2,0),(2,4),(0,0)) - ((0,0)) | ((0,0)) - ((0,1),(0,1)) | ((0,1),(0,1)) -(12 rows) - +ERROR: relation "polygon_tbl" does not exist +LINE 1: SELECT p1.f1, p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2 WHER... + ^ -- Contains polygon SELECT p1.f1, p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2 WHERE p1.f1 @> p2.f1; - f1 | f1 -----------------------------+---------------------------- - ((2,0),(2,4),(0,0)) | ((2,0),(2,4),(0,0)) - ((2,0),(2,4),(0,0)) | ((0,0)) - ((3,1),(3,3),(1,0)) | ((3,1),(3,3),(1,0)) - ((1,2),(3,4),(5,6),(7,8)) | ((1,2),(3,4),(5,6),(7,8)) - ((1,2),(3,4),(5,6),(7,8)) | ((7,8),(5,6),(3,4),(1,2)) - ((7,8),(5,6),(3,4),(1,2)) | ((1,2),(3,4),(5,6),(7,8)) - ((7,8),(5,6),(3,4),(1,2)) | ((7,8),(5,6),(3,4),(1,2)) - ((1,2),(7,8),(5,6),(3,-4)) | ((1,2),(3,4),(5,6),(7,8)) - ((1,2),(7,8),(5,6),(3,-4)) | ((7,8),(5,6),(3,4),(1,2)) - ((1,2),(7,8),(5,6),(3,-4)) | ((1,2),(7,8),(5,6),(3,-4)) - ((0,0)) | ((0,0)) - ((0,1),(0,1)) | ((0,1),(0,1)) -(12 rows) - +ERROR: relation "polygon_tbl" does not exist +LINE 1: SELECT p1.f1, p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2 WHER... + ^ -- Overlap with polygon SELECT p1.f1, p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2 WHERE p1.f1 && p2.f1; - f1 | f1 -----------------------------+---------------------------- - ((2,0),(2,4),(0,0)) | ((2,0),(2,4),(0,0)) - ((2,0),(2,4),(0,0)) | ((3,1),(3,3),(1,0)) - ((2,0),(2,4),(0,0)) | ((1,2),(3,4),(5,6),(7,8)) - ((2,0),(2,4),(0,0)) | ((7,8),(5,6),(3,4),(1,2)) - ((2,0),(2,4),(0,0)) | ((1,2),(7,8),(5,6),(3,-4)) - ((2,0),(2,4),(0,0)) | ((0,0)) - ((3,1),(3,3),(1,0)) | ((2,0),(2,4),(0,0)) - ((3,1),(3,3),(1,0)) | ((3,1),(3,3),(1,0)) - ((3,1),(3,3),(1,0)) | ((1,2),(7,8),(5,6),(3,-4)) - ((1,2),(3,4),(5,6),(7,8)) | ((2,0),(2,4),(0,0)) - ((1,2),(3,4),(5,6),(7,8)) | ((1,2),(3,4),(5,6),(7,8)) - ((1,2),(3,4),(5,6),(7,8)) | ((7,8),(5,6),(3,4),(1,2)) - ((1,2),(3,4),(5,6),(7,8)) | ((1,2),(7,8),(5,6),(3,-4)) - ((7,8),(5,6),(3,4),(1,2)) | ((2,0),(2,4),(0,0)) - ((7,8),(5,6),(3,4),(1,2)) | ((1,2),(3,4),(5,6),(7,8)) - ((7,8),(5,6),(3,4),(1,2)) | ((7,8),(5,6),(3,4),(1,2)) - ((7,8),(5,6),(3,4),(1,2)) | ((1,2),(7,8),(5,6),(3,-4)) - ((1,2),(7,8),(5,6),(3,-4)) | ((2,0),(2,4),(0,0)) - ((1,2),(7,8),(5,6),(3,-4)) | ((3,1),(3,3),(1,0)) - ((1,2),(7,8),(5,6),(3,-4)) | ((1,2),(3,4),(5,6),(7,8)) - ((1,2),(7,8),(5,6),(3,-4)) | ((7,8),(5,6),(3,4),(1,2)) - ((1,2),(7,8),(5,6),(3,-4)) | ((1,2),(7,8),(5,6),(3,-4)) - ((0,0)) | ((2,0),(2,4),(0,0)) - ((0,0)) | ((0,0)) - ((0,1),(0,1)) | ((0,1),(0,1)) -(25 rows) - +ERROR: relation "polygon_tbl" does not exist +LINE 1: SELECT p1.f1, p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2 WHER... + ^ -- Left of polygon SELECT p1.f1, p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2 WHERE p1.f1 << p2.f1; - f1 | f1 ----------------+---------------------------- - ((0,0)) | ((3,1),(3,3),(1,0)) - ((0,0)) | ((1,2),(3,4),(5,6),(7,8)) - ((0,0)) | ((7,8),(5,6),(3,4),(1,2)) - ((0,0)) | ((1,2),(7,8),(5,6),(3,-4)) - ((0,1),(0,1)) | ((3,1),(3,3),(1,0)) - ((0,1),(0,1)) | ((1,2),(3,4),(5,6),(7,8)) - ((0,1),(0,1)) | ((7,8),(5,6),(3,4),(1,2)) - ((0,1),(0,1)) | ((1,2),(7,8),(5,6),(3,-4)) -(8 rows) - +ERROR: relation "polygon_tbl" does not exist +LINE 1: SELECT p1.f1, p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2 WHER... + ^ -- Overlap of left of polygon SELECT p1.f1, p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2 WHERE p1.f1 &< p2.f1; - f1 | f1 -----------------------------+---------------------------- - ((2,0),(2,4),(0,0)) | ((2,0),(2,4),(0,0)) - ((2,0),(2,4),(0,0)) | ((3,1),(3,3),(1,0)) - ((2,0),(2,4),(0,0)) | ((1,2),(3,4),(5,6),(7,8)) - ((2,0),(2,4),(0,0)) | ((7,8),(5,6),(3,4),(1,2)) - ((2,0),(2,4),(0,0)) | ((1,2),(7,8),(5,6),(3,-4)) - ((3,1),(3,3),(1,0)) | ((3,1),(3,3),(1,0)) - ((3,1),(3,3),(1,0)) | ((1,2),(3,4),(5,6),(7,8)) - ((3,1),(3,3),(1,0)) | ((7,8),(5,6),(3,4),(1,2)) - ((3,1),(3,3),(1,0)) | ((1,2),(7,8),(5,6),(3,-4)) - ((1,2),(3,4),(5,6),(7,8)) | ((1,2),(3,4),(5,6),(7,8)) - ((1,2),(3,4),(5,6),(7,8)) | ((7,8),(5,6),(3,4),(1,2)) - ((1,2),(3,4),(5,6),(7,8)) | ((1,2),(7,8),(5,6),(3,-4)) - ((7,8),(5,6),(3,4),(1,2)) | ((1,2),(3,4),(5,6),(7,8)) - ((7,8),(5,6),(3,4),(1,2)) | ((7,8),(5,6),(3,4),(1,2)) - ((7,8),(5,6),(3,4),(1,2)) | ((1,2),(7,8),(5,6),(3,-4)) - ((1,2),(7,8),(5,6),(3,-4)) | ((1,2),(3,4),(5,6),(7,8)) - ((1,2),(7,8),(5,6),(3,-4)) | ((7,8),(5,6),(3,4),(1,2)) - ((1,2),(7,8),(5,6),(3,-4)) | ((1,2),(7,8),(5,6),(3,-4)) - ((0,0)) | ((2,0),(2,4),(0,0)) - ((0,0)) | ((3,1),(3,3),(1,0)) - ((0,0)) | ((1,2),(3,4),(5,6),(7,8)) - ((0,0)) | ((7,8),(5,6),(3,4),(1,2)) - ((0,0)) | ((1,2),(7,8),(5,6),(3,-4)) - ((0,0)) | ((0,0)) - ((0,0)) | ((0,1),(0,1)) - ((0,1),(0,1)) | ((2,0),(2,4),(0,0)) - ((0,1),(0,1)) | ((3,1),(3,3),(1,0)) - ((0,1),(0,1)) | ((1,2),(3,4),(5,6),(7,8)) - ((0,1),(0,1)) | ((7,8),(5,6),(3,4),(1,2)) - ((0,1),(0,1)) | ((1,2),(7,8),(5,6),(3,-4)) - ((0,1),(0,1)) | ((0,0)) - ((0,1),(0,1)) | ((0,1),(0,1)) -(32 rows) - +ERROR: relation "polygon_tbl" does not exist +LINE 1: SELECT p1.f1, p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2 WHER... + ^ -- Right of polygon SELECT p1.f1, p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2 WHERE p1.f1 >> p2.f1; - f1 | f1 -----------------------------+--------------- - ((3,1),(3,3),(1,0)) | ((0,0)) - ((3,1),(3,3),(1,0)) | ((0,1),(0,1)) - ((1,2),(3,4),(5,6),(7,8)) | ((0,0)) - ((1,2),(3,4),(5,6),(7,8)) | ((0,1),(0,1)) - ((7,8),(5,6),(3,4),(1,2)) | ((0,0)) - ((7,8),(5,6),(3,4),(1,2)) | ((0,1),(0,1)) - ((1,2),(7,8),(5,6),(3,-4)) | ((0,0)) - ((1,2),(7,8),(5,6),(3,-4)) | ((0,1),(0,1)) -(8 rows) - +ERROR: relation "polygon_tbl" does not exist +LINE 1: SELECT p1.f1, p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2 WHER... + ^ -- Overlap of right of polygon SELECT p1.f1, p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2 WHERE p1.f1 &> p2.f1; - f1 | f1 -----------------------------+---------------------------- - ((2,0),(2,4),(0,0)) | ((2,0),(2,4),(0,0)) - ((2,0),(2,4),(0,0)) | ((0,0)) - ((2,0),(2,4),(0,0)) | ((0,1),(0,1)) - ((3,1),(3,3),(1,0)) | ((2,0),(2,4),(0,0)) - ((3,1),(3,3),(1,0)) | ((3,1),(3,3),(1,0)) - ((3,1),(3,3),(1,0)) | ((1,2),(3,4),(5,6),(7,8)) - ((3,1),(3,3),(1,0)) | ((7,8),(5,6),(3,4),(1,2)) - ((3,1),(3,3),(1,0)) | ((1,2),(7,8),(5,6),(3,-4)) - ((3,1),(3,3),(1,0)) | ((0,0)) - ((3,1),(3,3),(1,0)) | ((0,1),(0,1)) - ((1,2),(3,4),(5,6),(7,8)) | ((2,0),(2,4),(0,0)) - ((1,2),(3,4),(5,6),(7,8)) | ((3,1),(3,3),(1,0)) - ((1,2),(3,4),(5,6),(7,8)) | ((1,2),(3,4),(5,6),(7,8)) - ((1,2),(3,4),(5,6),(7,8)) | ((7,8),(5,6),(3,4),(1,2)) - ((1,2),(3,4),(5,6),(7,8)) | ((1,2),(7,8),(5,6),(3,-4)) - ((1,2),(3,4),(5,6),(7,8)) | ((0,0)) - ((1,2),(3,4),(5,6),(7,8)) | ((0,1),(0,1)) - ((7,8),(5,6),(3,4),(1,2)) | ((2,0),(2,4),(0,0)) - ((7,8),(5,6),(3,4),(1,2)) | ((3,1),(3,3),(1,0)) - ((7,8),(5,6),(3,4),(1,2)) | ((1,2),(3,4),(5,6),(7,8)) - ((7,8),(5,6),(3,4),(1,2)) | ((7,8),(5,6),(3,4),(1,2)) - ((7,8),(5,6),(3,4),(1,2)) | ((1,2),(7,8),(5,6),(3,-4)) - ((7,8),(5,6),(3,4),(1,2)) | ((0,0)) - ((7,8),(5,6),(3,4),(1,2)) | ((0,1),(0,1)) - ((1,2),(7,8),(5,6),(3,-4)) | ((2,0),(2,4),(0,0)) - ((1,2),(7,8),(5,6),(3,-4)) | ((3,1),(3,3),(1,0)) - ((1,2),(7,8),(5,6),(3,-4)) | ((1,2),(3,4),(5,6),(7,8)) - ((1,2),(7,8),(5,6),(3,-4)) | ((7,8),(5,6),(3,4),(1,2)) - ((1,2),(7,8),(5,6),(3,-4)) | ((1,2),(7,8),(5,6),(3,-4)) - ((1,2),(7,8),(5,6),(3,-4)) | ((0,0)) - ((1,2),(7,8),(5,6),(3,-4)) | ((0,1),(0,1)) - ((0,0)) | ((2,0),(2,4),(0,0)) - ((0,0)) | ((0,0)) - ((0,0)) | ((0,1),(0,1)) - ((0,1),(0,1)) | ((2,0),(2,4),(0,0)) - ((0,1),(0,1)) | ((0,0)) - ((0,1),(0,1)) | ((0,1),(0,1)) -(37 rows) - +ERROR: relation "polygon_tbl" does not exist +LINE 1: SELECT p1.f1, p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2 WHER... + ^ -- Below polygon SELECT p1.f1, p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2 WHERE p1.f1 <<| p2.f1; - f1 | f1 ----------------+--------------------------- - ((0,0)) | ((1,2),(3,4),(5,6),(7,8)) - ((0,0)) | ((7,8),(5,6),(3,4),(1,2)) - ((0,0)) | ((0,1),(0,1)) - ((0,1),(0,1)) | ((1,2),(3,4),(5,6),(7,8)) - ((0,1),(0,1)) | ((7,8),(5,6),(3,4),(1,2)) -(5 rows) - +ERROR: relation "polygon_tbl" does not exist +LINE 1: SELECT p1.f1, p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2 WHER... + ^ -- Overlap or below polygon SELECT p1.f1, p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2 WHERE p1.f1 &<| p2.f1; - f1 | f1 -----------------------------+---------------------------- - ((2,0),(2,4),(0,0)) | ((2,0),(2,4),(0,0)) - ((2,0),(2,4),(0,0)) | ((1,2),(3,4),(5,6),(7,8)) - ((2,0),(2,4),(0,0)) | ((7,8),(5,6),(3,4),(1,2)) - ((2,0),(2,4),(0,0)) | ((1,2),(7,8),(5,6),(3,-4)) - ((3,1),(3,3),(1,0)) | ((2,0),(2,4),(0,0)) - ((3,1),(3,3),(1,0)) | ((3,1),(3,3),(1,0)) - ((3,1),(3,3),(1,0)) | ((1,2),(3,4),(5,6),(7,8)) - ((3,1),(3,3),(1,0)) | ((7,8),(5,6),(3,4),(1,2)) - ((3,1),(3,3),(1,0)) | ((1,2),(7,8),(5,6),(3,-4)) - ((1,2),(3,4),(5,6),(7,8)) | ((1,2),(3,4),(5,6),(7,8)) - ((1,2),(3,4),(5,6),(7,8)) | ((7,8),(5,6),(3,4),(1,2)) - ((1,2),(3,4),(5,6),(7,8)) | ((1,2),(7,8),(5,6),(3,-4)) - ((7,8),(5,6),(3,4),(1,2)) | ((1,2),(3,4),(5,6),(7,8)) - ((7,8),(5,6),(3,4),(1,2)) | ((7,8),(5,6),(3,4),(1,2)) - ((7,8),(5,6),(3,4),(1,2)) | ((1,2),(7,8),(5,6),(3,-4)) - ((1,2),(7,8),(5,6),(3,-4)) | ((1,2),(3,4),(5,6),(7,8)) - ((1,2),(7,8),(5,6),(3,-4)) | ((7,8),(5,6),(3,4),(1,2)) - ((1,2),(7,8),(5,6),(3,-4)) | ((1,2),(7,8),(5,6),(3,-4)) - ((0,0)) | ((2,0),(2,4),(0,0)) - ((0,0)) | ((3,1),(3,3),(1,0)) - ((0,0)) | ((1,2),(3,4),(5,6),(7,8)) - ((0,0)) | ((7,8),(5,6),(3,4),(1,2)) - ((0,0)) | ((1,2),(7,8),(5,6),(3,-4)) - ((0,0)) | ((0,0)) - ((0,0)) | ((0,1),(0,1)) - ((0,1),(0,1)) | ((2,0),(2,4),(0,0)) - ((0,1),(0,1)) | ((3,1),(3,3),(1,0)) - ((0,1),(0,1)) | ((1,2),(3,4),(5,6),(7,8)) - ((0,1),(0,1)) | ((7,8),(5,6),(3,4),(1,2)) - ((0,1),(0,1)) | ((1,2),(7,8),(5,6),(3,-4)) - ((0,1),(0,1)) | ((0,1),(0,1)) -(31 rows) - +ERROR: relation "polygon_tbl" does not exist +LINE 1: SELECT p1.f1, p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2 WHER... + ^ -- Above polygon SELECT p1.f1, p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2 WHERE p1.f1 |>> p2.f1; - f1 | f1 ----------------------------+--------------- - ((1,2),(3,4),(5,6),(7,8)) | ((0,0)) - ((1,2),(3,4),(5,6),(7,8)) | ((0,1),(0,1)) - ((7,8),(5,6),(3,4),(1,2)) | ((0,0)) - ((7,8),(5,6),(3,4),(1,2)) | ((0,1),(0,1)) - ((0,1),(0,1)) | ((0,0)) -(5 rows) - +ERROR: relation "polygon_tbl" does not exist +LINE 1: SELECT p1.f1, p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2 WHER... + ^ -- Overlap or above polygon SELECT p1.f1, p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2 WHERE p1.f1 |&> p2.f1; - f1 | f1 -----------------------------+---------------------------- - ((2,0),(2,4),(0,0)) | ((2,0),(2,4),(0,0)) - ((2,0),(2,4),(0,0)) | ((3,1),(3,3),(1,0)) - ((2,0),(2,4),(0,0)) | ((1,2),(7,8),(5,6),(3,-4)) - ((2,0),(2,4),(0,0)) | ((0,0)) - ((3,1),(3,3),(1,0)) | ((2,0),(2,4),(0,0)) - ((3,1),(3,3),(1,0)) | ((3,1),(3,3),(1,0)) - ((3,1),(3,3),(1,0)) | ((1,2),(7,8),(5,6),(3,-4)) - ((3,1),(3,3),(1,0)) | ((0,0)) - ((1,2),(3,4),(5,6),(7,8)) | ((2,0),(2,4),(0,0)) - ((1,2),(3,4),(5,6),(7,8)) | ((3,1),(3,3),(1,0)) - ((1,2),(3,4),(5,6),(7,8)) | ((1,2),(3,4),(5,6),(7,8)) - ((1,2),(3,4),(5,6),(7,8)) | ((7,8),(5,6),(3,4),(1,2)) - ((1,2),(3,4),(5,6),(7,8)) | ((1,2),(7,8),(5,6),(3,-4)) - ((1,2),(3,4),(5,6),(7,8)) | ((0,0)) - ((1,2),(3,4),(5,6),(7,8)) | ((0,1),(0,1)) - ((7,8),(5,6),(3,4),(1,2)) | ((2,0),(2,4),(0,0)) - ((7,8),(5,6),(3,4),(1,2)) | ((3,1),(3,3),(1,0)) - ((7,8),(5,6),(3,4),(1,2)) | ((1,2),(3,4),(5,6),(7,8)) - ((7,8),(5,6),(3,4),(1,2)) | ((7,8),(5,6),(3,4),(1,2)) - ((7,8),(5,6),(3,4),(1,2)) | ((1,2),(7,8),(5,6),(3,-4)) - ((7,8),(5,6),(3,4),(1,2)) | ((0,0)) - ((7,8),(5,6),(3,4),(1,2)) | ((0,1),(0,1)) - ((1,2),(7,8),(5,6),(3,-4)) | ((1,2),(7,8),(5,6),(3,-4)) - ((0,0)) | ((2,0),(2,4),(0,0)) - ((0,0)) | ((3,1),(3,3),(1,0)) - ((0,0)) | ((1,2),(7,8),(5,6),(3,-4)) - ((0,0)) | ((0,0)) - ((0,1),(0,1)) | ((2,0),(2,4),(0,0)) - ((0,1),(0,1)) | ((3,1),(3,3),(1,0)) - ((0,1),(0,1)) | ((1,2),(7,8),(5,6),(3,-4)) - ((0,1),(0,1)) | ((0,0)) - ((0,1),(0,1)) | ((0,1),(0,1)) -(32 rows) - +ERROR: relation "polygon_tbl" does not exist +LINE 1: SELECT p1.f1, p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2 WHER... + ^ -- Distance to polygon SELECT p1.f1, p2.f1, p1.f1 <-> p2.f1 FROM POLYGON_TBL p1, POLYGON_TBL p2; -ERROR: function "poly_distance" not implemented +ERROR: relation "polygon_tbl" does not exist +LINE 1: SELECT p1.f1, p2.f1, p1.f1 <-> p2.f1 FROM POLYGON_TBL p1, PO... + ^ -- -- Circles -- @@ -4211,990 +2405,174 @@ SELECT circle(f1) FROM BOX_TBL; - circle ------------------------- - <(1,1),1.41421356237> - <(2,2),1.41421356237> - <(-5,-4),6.7082039325> - <(2.5,3),0.5> - <(3,3),0> -(5 rows) - +ERROR: relation "box_tbl" does not exist +LINE 2: FROM BOX_TBL; + ^ SELECT circle(f1) FROM POLYGON_TBL WHERE (# f1) >= 3; - circle ------------------------------------------------ - <(1.33333333333,1.33333333333),2.04168905064> - <(2.33333333333,1.33333333333),1.47534300379> - <(4,5),2.82842712475> - <(4,5),2.82842712475> - <(4,3),4.80664375676> -(5 rows) - +ERROR: relation "polygon_tbl" does not exist +LINE 2: FROM POLYGON_TBL + ^ SELECT c1.f1 AS circle, p1.f1 AS point, (p1.f1 <-> c1.f1) AS distance FROM CIRCLE_TBL c1, POINT_TBL p1 WHERE (p1.f1 <-> c1.f1) > 0 ORDER BY distance, area(c1.f1), p1.f1[0]; - circle | point | distance -----------------+-------------------+--------------- - <(1,2),3> | (-3,4) | 1.472135955 - <(5,1),3> | (0,0) | 2.09901951359 - <(5,1),3> | (1e-300,-1e-300) | 2.09901951359 - <(5,1),3> | (-3,4) | 5.54400374532 - <(3,5),0> | (0,0) | 5.83095189485 - <(3,5),0> | (1e-300,-1e-300) | 5.83095189485 - <(3,5),0> | (-3,4) | 6.0827625303 - <(1,3),5> | (-10,0) | 6.40175425099 - <(1,3),5> | (10,10) | 6.40175425099 - <(5,1),3> | (10,10) | 7.29563014099 - <(1,2),3> | (-10,0) | 8.1803398875 - <(3,5),0> | (10,10) | 8.60232526704 - <(1,2),3> | (10,10) | 9.04159457879 - <(1,3),5> | (-5,-12) | 11.1554944214 - <(5,1),3> | (-10,0) | 12.0332963784 - <(1,2),3> | (-5,-12) | 12.2315462117 - <(5,1),3> | (-5,-12) | 13.4012194669 - <(3,5),0> | (-10,0) | 13.9283882772 - <(3,5),0> | (-5,-12) | 18.7882942281 - <(1,3),5> | (5.1,34.5) | 26.7657047773 - <(3,5),0> | (5.1,34.5) | 29.5746513082 - <(1,2),3> | (5.1,34.5) | 29.7575945393 - <(5,1),3> | (5.1,34.5) | 30.5001492534 - <(100,200),10> | (5.1,34.5) | 180.778038568 - <(100,200),10> | (10,10) | 200.237960416 - <(100,200),10> | (-3,4) | 211.415898255 - <(100,200),10> | (0,0) | 213.60679775 - <(100,200),10> | (1e-300,-1e-300) | 213.60679775 - <(100,200),10> | (-10,0) | 218.25424421 - <(100,200),10> | (-5,-12) | 226.577682802 - <(3,5),0> | (1e+300,Infinity) | Infinity - <(3,5),0> | (Infinity,1e+300) | Infinity - <(1,2),3> | (1e+300,Infinity) | Infinity - <(5,1),3> | (1e+300,Infinity) | Infinity - <(5,1),3> | (Infinity,1e+300) | Infinity - <(1,2),3> | (Infinity,1e+300) | Infinity - <(1,3),5> | (1e+300,Infinity) | Infinity - <(1,3),5> | (Infinity,1e+300) | Infinity - <(100,200),10> | (1e+300,Infinity) | Infinity - <(100,200),10> | (Infinity,1e+300) | Infinity - <(1,2),100> | (1e+300,Infinity) | Infinity - <(1,2),100> | (Infinity,1e+300) | Infinity - <(100,1),115> | (1e+300,Infinity) | Infinity - <(100,1),115> | (Infinity,1e+300) | Infinity - <(3,5),0> | (NaN,NaN) | NaN - <(1,2),3> | (NaN,NaN) | NaN - <(5,1),3> | (NaN,NaN) | NaN - <(1,3),5> | (NaN,NaN) | NaN - <(100,200),10> | (NaN,NaN) | NaN - <(1,2),100> | (NaN,NaN) | NaN - <(100,1),115> | (NaN,NaN) | NaN - <(3,5),NaN> | (-10,0) | NaN - <(3,5),NaN> | (-5,-12) | NaN - <(3,5),NaN> | (-3,4) | NaN - <(3,5),NaN> | (0,0) | NaN - <(3,5),NaN> | (1e-300,-1e-300) | NaN - <(3,5),NaN> | (5.1,34.5) | NaN - <(3,5),NaN> | (10,10) | NaN - <(3,5),NaN> | (1e+300,Infinity) | NaN - <(3,5),NaN> | (Infinity,1e+300) | NaN - <(3,5),NaN> | (NaN,NaN) | NaN -(61 rows) - +ERROR: relation "circle_tbl" does not exist +LINE 2: FROM CIRCLE_TBL c1, POINT_TBL p1 + ^ -- To polygon SELECT f1, f1::polygon FROM CIRCLE_TBL WHERE f1 >= '<(0,0),1>'; - f1 | f1 -----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - <(5,1),3> | ((2,1),(2.40192378865,2.5),(3.5,3.59807621135),(5,4),(6.5,3.59807621135),(7.59807621135,2.5),(8,1),(7.59807621135,-0.5),(6.5,-1.59807621135),(5,-2),(3.5,-1.59807621135),(2.40192378865,-0.5)) - <(1,2),100> | ((-99,2),(-85.6025403784,52),(-49,88.6025403784),(1,102),(51,88.6025403784),(87.6025403784,52),(101,2),(87.6025403784,-48),(51,-84.6025403784),(1,-98),(-49,-84.6025403784),(-85.6025403784,-48)) - <(1,3),5> | ((-4,3),(-3.33012701892,5.5),(-1.5,7.33012701892),(1,8),(3.5,7.33012701892),(5.33012701892,5.5),(6,3),(5.33012701892,0.5),(3.5,-1.33012701892),(1,-2),(-1.5,-1.33012701892),(-3.33012701892,0.5)) - <(1,2),3> | ((-2,2),(-1.59807621135,3.5),(-0.5,4.59807621135),(1,5),(2.5,4.59807621135),(3.59807621135,3.5),(4,2),(3.59807621135,0.5),(2.5,-0.598076211353),(1,-1),(-0.5,-0.598076211353),(-1.59807621135,0.5)) - <(100,200),10> | ((90,200),(91.3397459622,205),(95,208.660254038),(100,210),(105,208.660254038),(108.660254038,205),(110,200),(108.660254038,195),(105,191.339745962),(100,190),(95,191.339745962),(91.3397459622,195)) - <(100,1),115> | ((-15,1),(0.40707856479,58.5),(42.5,100.592921435),(100,116),(157.5,100.592921435),(199.592921435,58.5),(215,1),(199.592921435,-56.5),(157.5,-98.5929214352),(100,-114),(42.5,-98.5929214352),(0.40707856479,-56.5)) -(6 rows) - +ERROR: relation "circle_tbl" does not exist +LINE 1: SELECT f1, f1::polygon FROM CIRCLE_TBL WHERE f1 >= '<(0,0),1... + ^ -- To polygon with less points SELECT f1, polygon(8, f1) FROM CIRCLE_TBL WHERE f1 >= '<(0,0),1>'; - f1 | polygon -----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------ - <(5,1),3> | ((2,1),(2.87867965644,3.12132034356),(5,4),(7.12132034356,3.12132034356),(8,1),(7.12132034356,-1.12132034356),(5,-2),(2.87867965644,-1.12132034356)) - <(1,2),100> | ((-99,2),(-69.7106781187,72.7106781187),(1,102),(71.7106781187,72.7106781187),(101,2),(71.7106781187,-68.7106781187),(1,-98),(-69.7106781187,-68.7106781187)) - <(1,3),5> | ((-4,3),(-2.53553390593,6.53553390593),(1,8),(4.53553390593,6.53553390593),(6,3),(4.53553390593,-0.535533905933),(1,-2),(-2.53553390593,-0.535533905933)) - <(1,2),3> | ((-2,2),(-1.12132034356,4.12132034356),(1,5),(3.12132034356,4.12132034356),(4,2),(3.12132034356,-0.12132034356),(1,-1),(-1.12132034356,-0.12132034356)) - <(100,200),10> | ((90,200),(92.9289321881,207.071067812),(100,210),(107.071067812,207.071067812),(110,200),(107.071067812,192.928932188),(100,190),(92.9289321881,192.928932188)) - <(100,1),115> | ((-15,1),(18.6827201635,82.3172798365),(100,116),(181.317279836,82.3172798365),(215,1),(181.317279836,-80.3172798365),(100,-114),(18.6827201635,-80.3172798365)) -(6 rows) - +ERROR: relation "circle_tbl" does not exist +LINE 1: SELECT f1, polygon(8, f1) FROM CIRCLE_TBL WHERE f1 >= '<(0,0... + ^ -- Error for insufficient number of points SELECT f1, polygon(1, f1) FROM CIRCLE_TBL WHERE f1 >= '<(0,0),1>'; -ERROR: must request at least 2 points +ERROR: relation "circle_tbl" does not exist +LINE 1: SELECT f1, polygon(1, f1) FROM CIRCLE_TBL WHERE f1 >= '<(0,0... + ^ -- Zero radius error SELECT f1, polygon(10, f1) FROM CIRCLE_TBL WHERE f1 < '<(0,0),1>'; -ERROR: cannot convert circle with radius zero to polygon +ERROR: relation "circle_tbl" does not exist +LINE 1: SELECT f1, polygon(10, f1) FROM CIRCLE_TBL WHERE f1 < '<(0,0... + ^ -- Same as circle SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 ~= c2.f1; - f1 | f1 -----------------+---------------- - <(5,1),3> | <(5,1),3> - <(1,2),100> | <(1,2),100> - <(1,3),5> | <(1,3),5> - <(1,2),3> | <(1,2),3> - <(100,200),10> | <(100,200),10> - <(100,1),115> | <(100,1),115> - <(3,5),0> | <(3,5),0> - <(3,5),NaN> | <(3,5),0> - <(3,5),NaN> | <(3,5),NaN> -(9 rows) - +ERROR: relation "circle_tbl" does not exist +LINE 1: SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE ... + ^ -- Overlap with circle SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 && c2.f1; - f1 | f1 -----------------+---------------- - <(5,1),3> | <(5,1),3> - <(5,1),3> | <(1,2),100> - <(5,1),3> | <(1,3),5> - <(5,1),3> | <(1,2),3> - <(5,1),3> | <(100,1),115> - <(1,2),100> | <(5,1),3> - <(1,2),100> | <(1,2),100> - <(1,2),100> | <(1,3),5> - <(1,2),100> | <(1,2),3> - <(1,2),100> | <(100,1),115> - <(1,2),100> | <(3,5),0> - <(1,3),5> | <(5,1),3> - <(1,3),5> | <(1,2),100> - <(1,3),5> | <(1,3),5> - <(1,3),5> | <(1,2),3> - <(1,3),5> | <(100,1),115> - <(1,3),5> | <(3,5),0> - <(1,2),3> | <(5,1),3> - <(1,2),3> | <(1,2),100> - <(1,2),3> | <(1,3),5> - <(1,2),3> | <(1,2),3> - <(1,2),3> | <(100,1),115> - <(100,200),10> | <(100,200),10> - <(100,1),115> | <(5,1),3> - <(100,1),115> | <(1,2),100> - <(100,1),115> | <(1,3),5> - <(100,1),115> | <(1,2),3> - <(100,1),115> | <(100,1),115> - <(100,1),115> | <(3,5),0> - <(3,5),0> | <(1,2),100> - <(3,5),0> | <(1,3),5> - <(3,5),0> | <(100,1),115> - <(3,5),0> | <(3,5),0> -(33 rows) - +ERROR: relation "circle_tbl" does not exist +LINE 1: SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE ... + ^ -- Overlap or left of circle SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 &< c2.f1; - f1 | f1 -----------------+---------------- - <(5,1),3> | <(5,1),3> - <(5,1),3> | <(1,2),100> - <(5,1),3> | <(100,200),10> - <(5,1),3> | <(100,1),115> - <(1,2),100> | <(1,2),100> - <(1,2),100> | <(100,200),10> - <(1,2),100> | <(100,1),115> - <(1,3),5> | <(5,1),3> - <(1,3),5> | <(1,2),100> - <(1,3),5> | <(1,3),5> - <(1,3),5> | <(100,200),10> - <(1,3),5> | <(100,1),115> - <(1,2),3> | <(5,1),3> - <(1,2),3> | <(1,2),100> - <(1,2),3> | <(1,3),5> - <(1,2),3> | <(1,2),3> - <(1,2),3> | <(100,200),10> - <(1,2),3> | <(100,1),115> - <(100,200),10> | <(100,200),10> - <(100,200),10> | <(100,1),115> - <(100,1),115> | <(100,1),115> - <(3,5),0> | <(5,1),3> - <(3,5),0> | <(1,2),100> - <(3,5),0> | <(1,3),5> - <(3,5),0> | <(1,2),3> - <(3,5),0> | <(100,200),10> - <(3,5),0> | <(100,1),115> - <(3,5),0> | <(3,5),0> -(28 rows) - +ERROR: relation "circle_tbl" does not exist +LINE 1: SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE ... + ^ -- Left of circle SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 << c2.f1; - f1 | f1 ------------+---------------- - <(5,1),3> | <(100,200),10> - <(1,3),5> | <(100,200),10> - <(1,2),3> | <(100,200),10> - <(3,5),0> | <(100,200),10> -(4 rows) - +ERROR: relation "circle_tbl" does not exist +LINE 1: SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE ... + ^ -- Right of circle SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 >> c2.f1; - f1 | f1 -----------------+----------- - <(100,200),10> | <(5,1),3> - <(100,200),10> | <(1,3),5> - <(100,200),10> | <(1,2),3> - <(100,200),10> | <(3,5),0> -(4 rows) - +ERROR: relation "circle_tbl" does not exist +LINE 1: SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE ... + ^ -- Overlap or right of circle SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 &> c2.f1; - f1 | f1 -----------------+---------------- - <(5,1),3> | <(5,1),3> - <(5,1),3> | <(1,2),100> - <(5,1),3> | <(1,3),5> - <(5,1),3> | <(1,2),3> - <(5,1),3> | <(100,1),115> - <(1,2),100> | <(1,2),100> - <(1,3),5> | <(1,2),100> - <(1,3),5> | <(1,3),5> - <(1,3),5> | <(100,1),115> - <(1,2),3> | <(1,2),100> - <(1,2),3> | <(1,3),5> - <(1,2),3> | <(1,2),3> - <(1,2),3> | <(100,1),115> - <(100,200),10> | <(5,1),3> - <(100,200),10> | <(1,2),100> - <(100,200),10> | <(1,3),5> - <(100,200),10> | <(1,2),3> - <(100,200),10> | <(100,200),10> - <(100,200),10> | <(100,1),115> - <(100,200),10> | <(3,5),0> - <(100,1),115> | <(1,2),100> - <(100,1),115> | <(100,1),115> - <(3,5),0> | <(5,1),3> - <(3,5),0> | <(1,2),100> - <(3,5),0> | <(1,3),5> - <(3,5),0> | <(1,2),3> - <(3,5),0> | <(100,1),115> - <(3,5),0> | <(3,5),0> -(28 rows) - +ERROR: relation "circle_tbl" does not exist +LINE 1: SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE ... + ^ -- Contained by circle SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 <@ c2.f1; - f1 | f1 -----------------+---------------- - <(5,1),3> | <(5,1),3> - <(5,1),3> | <(1,2),100> - <(5,1),3> | <(100,1),115> - <(1,2),100> | <(1,2),100> - <(1,3),5> | <(1,2),100> - <(1,3),5> | <(1,3),5> - <(1,3),5> | <(100,1),115> - <(1,2),3> | <(1,2),100> - <(1,2),3> | <(1,3),5> - <(1,2),3> | <(1,2),3> - <(1,2),3> | <(100,1),115> - <(100,200),10> | <(100,200),10> - <(100,1),115> | <(100,1),115> - <(3,5),0> | <(1,2),100> - <(3,5),0> | <(1,3),5> - <(3,5),0> | <(100,1),115> - <(3,5),0> | <(3,5),0> -(17 rows) - +ERROR: relation "circle_tbl" does not exist +LINE 1: SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE ... + ^ -- Contain by circle SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 @> c2.f1; - f1 | f1 -----------------+---------------- - <(5,1),3> | <(5,1),3> - <(1,2),100> | <(5,1),3> - <(1,2),100> | <(1,2),100> - <(1,2),100> | <(1,3),5> - <(1,2),100> | <(1,2),3> - <(1,2),100> | <(3,5),0> - <(1,3),5> | <(1,3),5> - <(1,3),5> | <(1,2),3> - <(1,3),5> | <(3,5),0> - <(1,2),3> | <(1,2),3> - <(100,200),10> | <(100,200),10> - <(100,1),115> | <(5,1),3> - <(100,1),115> | <(1,3),5> - <(100,1),115> | <(1,2),3> - <(100,1),115> | <(100,1),115> - <(100,1),115> | <(3,5),0> - <(3,5),0> | <(3,5),0> -(17 rows) - +ERROR: relation "circle_tbl" does not exist +LINE 1: SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE ... + ^ -- Below circle SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 <<| c2.f1; - f1 | f1 ----------------+---------------- - <(5,1),3> | <(100,200),10> - <(5,1),3> | <(3,5),0> - <(1,2),100> | <(100,200),10> - <(1,3),5> | <(100,200),10> - <(1,2),3> | <(100,200),10> - <(100,1),115> | <(100,200),10> - <(3,5),0> | <(100,200),10> -(7 rows) - +ERROR: relation "circle_tbl" does not exist +LINE 1: SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE ... + ^ -- Above circle SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 |>> c2.f1; - f1 | f1 -----------------+--------------- - <(100,200),10> | <(5,1),3> - <(100,200),10> | <(1,2),100> - <(100,200),10> | <(1,3),5> - <(100,200),10> | <(1,2),3> - <(100,200),10> | <(100,1),115> - <(100,200),10> | <(3,5),0> - <(3,5),0> | <(5,1),3> -(7 rows) - +ERROR: relation "circle_tbl" does not exist +LINE 1: SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE ... + ^ -- Overlap or below circle SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 &<| c2.f1; - f1 | f1 -----------------+---------------- - <(5,1),3> | <(5,1),3> - <(5,1),3> | <(1,2),100> - <(5,1),3> | <(1,3),5> - <(5,1),3> | <(1,2),3> - <(5,1),3> | <(100,200),10> - <(5,1),3> | <(100,1),115> - <(5,1),3> | <(3,5),0> - <(1,2),100> | <(1,2),100> - <(1,2),100> | <(100,200),10> - <(1,2),100> | <(100,1),115> - <(1,3),5> | <(1,2),100> - <(1,3),5> | <(1,3),5> - <(1,3),5> | <(100,200),10> - <(1,3),5> | <(100,1),115> - <(1,2),3> | <(1,2),100> - <(1,2),3> | <(1,3),5> - <(1,2),3> | <(1,2),3> - <(1,2),3> | <(100,200),10> - <(1,2),3> | <(100,1),115> - <(1,2),3> | <(3,5),0> - <(100,200),10> | <(100,200),10> - <(100,1),115> | <(100,200),10> - <(100,1),115> | <(100,1),115> - <(3,5),0> | <(1,2),100> - <(3,5),0> | <(1,3),5> - <(3,5),0> | <(1,2),3> - <(3,5),0> | <(100,200),10> - <(3,5),0> | <(100,1),115> - <(3,5),0> | <(3,5),0> -(29 rows) - +ERROR: relation "circle_tbl" does not exist +LINE 1: SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE ... + ^ -- Overlap or above circle SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 |&> c2.f1; - f1 | f1 -----------------+---------------- - <(5,1),3> | <(5,1),3> - <(5,1),3> | <(1,2),100> - <(5,1),3> | <(1,3),5> - <(5,1),3> | <(100,1),115> - <(1,2),100> | <(1,2),100> - <(1,2),100> | <(100,1),115> - <(1,3),5> | <(5,1),3> - <(1,3),5> | <(1,2),100> - <(1,3),5> | <(1,3),5> - <(1,3),5> | <(100,1),115> - <(1,2),3> | <(5,1),3> - <(1,2),3> | <(1,2),100> - <(1,2),3> | <(1,3),5> - <(1,2),3> | <(1,2),3> - <(1,2),3> | <(100,1),115> - <(100,200),10> | <(5,1),3> - <(100,200),10> | <(1,2),100> - <(100,200),10> | <(1,3),5> - <(100,200),10> | <(1,2),3> - <(100,200),10> | <(100,200),10> - <(100,200),10> | <(100,1),115> - <(100,200),10> | <(3,5),0> - <(100,1),115> | <(100,1),115> - <(3,5),0> | <(5,1),3> - <(3,5),0> | <(1,2),100> - <(3,5),0> | <(1,3),5> - <(3,5),0> | <(1,2),3> - <(3,5),0> | <(100,1),115> - <(3,5),0> | <(3,5),0> -(29 rows) - +ERROR: relation "circle_tbl" does not exist +LINE 1: SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE ... + ^ -- Area equal with circle SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 = c2.f1; - f1 | f1 -----------------+---------------- - <(5,1),3> | <(5,1),3> - <(5,1),3> | <(1,2),3> - <(1,2),100> | <(1,2),100> - <(1,3),5> | <(1,3),5> - <(1,2),3> | <(5,1),3> - <(1,2),3> | <(1,2),3> - <(100,200),10> | <(100,200),10> - <(100,1),115> | <(100,1),115> - <(3,5),0> | <(3,5),0> -(9 rows) - +ERROR: relation "circle_tbl" does not exist +LINE 1: SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE ... + ^ -- Area not equal with circle SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 != c2.f1; - f1 | f1 -----------------+---------------- - <(5,1),3> | <(1,2),100> - <(5,1),3> | <(1,3),5> - <(5,1),3> | <(100,200),10> - <(5,1),3> | <(100,1),115> - <(5,1),3> | <(3,5),0> - <(1,2),100> | <(5,1),3> - <(1,2),100> | <(1,3),5> - <(1,2),100> | <(1,2),3> - <(1,2),100> | <(100,200),10> - <(1,2),100> | <(100,1),115> - <(1,2),100> | <(3,5),0> - <(1,3),5> | <(5,1),3> - <(1,3),5> | <(1,2),100> - <(1,3),5> | <(1,2),3> - <(1,3),5> | <(100,200),10> - <(1,3),5> | <(100,1),115> - <(1,3),5> | <(3,5),0> - <(1,2),3> | <(1,2),100> - <(1,2),3> | <(1,3),5> - <(1,2),3> | <(100,200),10> - <(1,2),3> | <(100,1),115> - <(1,2),3> | <(3,5),0> - <(100,200),10> | <(5,1),3> - <(100,200),10> | <(1,2),100> - <(100,200),10> | <(1,3),5> - <(100,200),10> | <(1,2),3> - <(100,200),10> | <(100,1),115> - <(100,200),10> | <(3,5),0> - <(100,1),115> | <(5,1),3> - <(100,1),115> | <(1,2),100> - <(100,1),115> | <(1,3),5> - <(100,1),115> | <(1,2),3> - <(100,1),115> | <(100,200),10> - <(100,1),115> | <(3,5),0> - <(3,5),0> | <(5,1),3> - <(3,5),0> | <(1,2),100> - <(3,5),0> | <(1,3),5> - <(3,5),0> | <(1,2),3> - <(3,5),0> | <(100,200),10> - <(3,5),0> | <(100,1),115> -(40 rows) - +ERROR: relation "circle_tbl" does not exist +LINE 1: SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE ... + ^ -- Area less than circle SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 < c2.f1; - f1 | f1 -----------------+---------------- - <(5,1),3> | <(1,2),100> - <(5,1),3> | <(1,3),5> - <(5,1),3> | <(100,200),10> - <(5,1),3> | <(100,1),115> - <(1,2),100> | <(100,1),115> - <(1,3),5> | <(1,2),100> - <(1,3),5> | <(100,200),10> - <(1,3),5> | <(100,1),115> - <(1,2),3> | <(1,2),100> - <(1,2),3> | <(1,3),5> - <(1,2),3> | <(100,200),10> - <(1,2),3> | <(100,1),115> - <(100,200),10> | <(1,2),100> - <(100,200),10> | <(100,1),115> - <(3,5),0> | <(5,1),3> - <(3,5),0> | <(1,2),100> - <(3,5),0> | <(1,3),5> - <(3,5),0> | <(1,2),3> - <(3,5),0> | <(100,200),10> - <(3,5),0> | <(100,1),115> -(20 rows) - +ERROR: relation "circle_tbl" does not exist +LINE 1: SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE ... + ^ -- Area greater than circle SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 > c2.f1; - f1 | f1 -----------------+---------------- - <(5,1),3> | <(3,5),0> - <(1,2),100> | <(5,1),3> - <(1,2),100> | <(1,3),5> - <(1,2),100> | <(1,2),3> - <(1,2),100> | <(100,200),10> - <(1,2),100> | <(3,5),0> - <(1,3),5> | <(5,1),3> - <(1,3),5> | <(1,2),3> - <(1,3),5> | <(3,5),0> - <(1,2),3> | <(3,5),0> - <(100,200),10> | <(5,1),3> - <(100,200),10> | <(1,3),5> - <(100,200),10> | <(1,2),3> - <(100,200),10> | <(3,5),0> - <(100,1),115> | <(5,1),3> - <(100,1),115> | <(1,2),100> - <(100,1),115> | <(1,3),5> - <(100,1),115> | <(1,2),3> - <(100,1),115> | <(100,200),10> - <(100,1),115> | <(3,5),0> -(20 rows) - +ERROR: relation "circle_tbl" does not exist +LINE 1: SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE ... + ^ -- Area less than or equal circle SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 <= c2.f1; - f1 | f1 -----------------+---------------- - <(5,1),3> | <(5,1),3> - <(5,1),3> | <(1,2),100> - <(5,1),3> | <(1,3),5> - <(5,1),3> | <(1,2),3> - <(5,1),3> | <(100,200),10> - <(5,1),3> | <(100,1),115> - <(1,2),100> | <(1,2),100> - <(1,2),100> | <(100,1),115> - <(1,3),5> | <(1,2),100> - <(1,3),5> | <(1,3),5> - <(1,3),5> | <(100,200),10> - <(1,3),5> | <(100,1),115> - <(1,2),3> | <(5,1),3> - <(1,2),3> | <(1,2),100> - <(1,2),3> | <(1,3),5> - <(1,2),3> | <(1,2),3> - <(1,2),3> | <(100,200),10> - <(1,2),3> | <(100,1),115> - <(100,200),10> | <(1,2),100> - <(100,200),10> | <(100,200),10> - <(100,200),10> | <(100,1),115> - <(100,1),115> | <(100,1),115> - <(3,5),0> | <(5,1),3> - <(3,5),0> | <(1,2),100> - <(3,5),0> | <(1,3),5> - <(3,5),0> | <(1,2),3> - <(3,5),0> | <(100,200),10> - <(3,5),0> | <(100,1),115> - <(3,5),0> | <(3,5),0> -(29 rows) - +ERROR: relation "circle_tbl" does not exist +LINE 1: SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE ... + ^ -- Area greater than or equal circle SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 >= c2.f1; - f1 | f1 -----------------+---------------- - <(5,1),3> | <(5,1),3> - <(5,1),3> | <(1,2),3> - <(5,1),3> | <(3,5),0> - <(1,2),100> | <(5,1),3> - <(1,2),100> | <(1,2),100> - <(1,2),100> | <(1,3),5> - <(1,2),100> | <(1,2),3> - <(1,2),100> | <(100,200),10> - <(1,2),100> | <(3,5),0> - <(1,3),5> | <(5,1),3> - <(1,3),5> | <(1,3),5> - <(1,3),5> | <(1,2),3> - <(1,3),5> | <(3,5),0> - <(1,2),3> | <(5,1),3> - <(1,2),3> | <(1,2),3> - <(1,2),3> | <(3,5),0> - <(100,200),10> | <(5,1),3> - <(100,200),10> | <(1,3),5> - <(100,200),10> | <(1,2),3> - <(100,200),10> | <(100,200),10> - <(100,200),10> | <(3,5),0> - <(100,1),115> | <(5,1),3> - <(100,1),115> | <(1,2),100> - <(100,1),115> | <(1,3),5> - <(100,1),115> | <(1,2),3> - <(100,1),115> | <(100,200),10> - <(100,1),115> | <(100,1),115> - <(100,1),115> | <(3,5),0> - <(3,5),0> | <(3,5),0> -(29 rows) - +ERROR: relation "circle_tbl" does not exist +LINE 1: SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE ... + ^ -- Area less than circle SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 < c2.f1; - f1 | f1 -----------------+---------------- - <(5,1),3> | <(1,2),100> - <(5,1),3> | <(1,3),5> - <(5,1),3> | <(100,200),10> - <(5,1),3> | <(100,1),115> - <(1,2),100> | <(100,1),115> - <(1,3),5> | <(1,2),100> - <(1,3),5> | <(100,200),10> - <(1,3),5> | <(100,1),115> - <(1,2),3> | <(1,2),100> - <(1,2),3> | <(1,3),5> - <(1,2),3> | <(100,200),10> - <(1,2),3> | <(100,1),115> - <(100,200),10> | <(1,2),100> - <(100,200),10> | <(100,1),115> - <(3,5),0> | <(5,1),3> - <(3,5),0> | <(1,2),100> - <(3,5),0> | <(1,3),5> - <(3,5),0> | <(1,2),3> - <(3,5),0> | <(100,200),10> - <(3,5),0> | <(100,1),115> -(20 rows) - +ERROR: relation "circle_tbl" does not exist +LINE 1: SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE ... + ^ -- Area greater than circle SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE c1.f1 < c2.f1; - f1 | f1 -----------------+---------------- - <(5,1),3> | <(1,2),100> - <(5,1),3> | <(1,3),5> - <(5,1),3> | <(100,200),10> - <(5,1),3> | <(100,1),115> - <(1,2),100> | <(100,1),115> - <(1,3),5> | <(1,2),100> - <(1,3),5> | <(100,200),10> - <(1,3),5> | <(100,1),115> - <(1,2),3> | <(1,2),100> - <(1,2),3> | <(1,3),5> - <(1,2),3> | <(100,200),10> - <(1,2),3> | <(100,1),115> - <(100,200),10> | <(1,2),100> - <(100,200),10> | <(100,1),115> - <(3,5),0> | <(5,1),3> - <(3,5),0> | <(1,2),100> - <(3,5),0> | <(1,3),5> - <(3,5),0> | <(1,2),3> - <(3,5),0> | <(100,200),10> - <(3,5),0> | <(100,1),115> -(20 rows) - +ERROR: relation "circle_tbl" does not exist +LINE 1: SELECT c1.f1, c2.f1 FROM CIRCLE_TBL c1, CIRCLE_TBL c2 WHERE ... + ^ -- Add point SELECT c.f1, p.f1, c.f1 + p.f1 FROM CIRCLE_TBL c, POINT_TBL p; - f1 | f1 | ?column? -----------------+-------------------+------------------------- - <(5,1),3> | (0,0) | <(5,1),3> - <(1,2),100> | (0,0) | <(1,2),100> - <(1,3),5> | (0,0) | <(1,3),5> - <(1,2),3> | (0,0) | <(1,2),3> - <(100,200),10> | (0,0) | <(100,200),10> - <(100,1),115> | (0,0) | <(100,1),115> - <(3,5),0> | (0,0) | <(3,5),0> - <(3,5),NaN> | (0,0) | <(3,5),NaN> - <(5,1),3> | (-10,0) | <(-5,1),3> - <(1,2),100> | (-10,0) | <(-9,2),100> - <(1,3),5> | (-10,0) | <(-9,3),5> - <(1,2),3> | (-10,0) | <(-9,2),3> - <(100,200),10> | (-10,0) | <(90,200),10> - <(100,1),115> | (-10,0) | <(90,1),115> - <(3,5),0> | (-10,0) | <(-7,5),0> - <(3,5),NaN> | (-10,0) | <(-7,5),NaN> - <(5,1),3> | (-3,4) | <(2,5),3> - <(1,2),100> | (-3,4) | <(-2,6),100> - <(1,3),5> | (-3,4) | <(-2,7),5> - <(1,2),3> | (-3,4) | <(-2,6),3> - <(100,200),10> | (-3,4) | <(97,204),10> - <(100,1),115> | (-3,4) | <(97,5),115> - <(3,5),0> | (-3,4) | <(0,9),0> - <(3,5),NaN> | (-3,4) | <(0,9),NaN> - <(5,1),3> | (5.1,34.5) | <(10.1,35.5),3> - <(1,2),100> | (5.1,34.5) | <(6.1,36.5),100> - <(1,3),5> | (5.1,34.5) | <(6.1,37.5),5> - <(1,2),3> | (5.1,34.5) | <(6.1,36.5),3> - <(100,200),10> | (5.1,34.5) | <(105.1,234.5),10> - <(100,1),115> | (5.1,34.5) | <(105.1,35.5),115> - <(3,5),0> | (5.1,34.5) | <(8.1,39.5),0> - <(3,5),NaN> | (5.1,34.5) | <(8.1,39.5),NaN> - <(5,1),3> | (-5,-12) | <(0,-11),3> - <(1,2),100> | (-5,-12) | <(-4,-10),100> - <(1,3),5> | (-5,-12) | <(-4,-9),5> - <(1,2),3> | (-5,-12) | <(-4,-10),3> - <(100,200),10> | (-5,-12) | <(95,188),10> - <(100,1),115> | (-5,-12) | <(95,-11),115> - <(3,5),0> | (-5,-12) | <(-2,-7),0> - <(3,5),NaN> | (-5,-12) | <(-2,-7),NaN> - <(5,1),3> | (1e-300,-1e-300) | <(5,1),3> - <(1,2),100> | (1e-300,-1e-300) | <(1,2),100> - <(1,3),5> | (1e-300,-1e-300) | <(1,3),5> - <(1,2),3> | (1e-300,-1e-300) | <(1,2),3> - <(100,200),10> | (1e-300,-1e-300) | <(100,200),10> - <(100,1),115> | (1e-300,-1e-300) | <(100,1),115> - <(3,5),0> | (1e-300,-1e-300) | <(3,5),0> - <(3,5),NaN> | (1e-300,-1e-300) | <(3,5),NaN> - <(5,1),3> | (1e+300,Infinity) | <(1e+300,Infinity),3> - <(1,2),100> | (1e+300,Infinity) | <(1e+300,Infinity),100> - <(1,3),5> | (1e+300,Infinity) | <(1e+300,Infinity),5> - <(1,2),3> | (1e+300,Infinity) | <(1e+300,Infinity),3> - <(100,200),10> | (1e+300,Infinity) | <(1e+300,Infinity),10> - <(100,1),115> | (1e+300,Infinity) | <(1e+300,Infinity),115> - <(3,5),0> | (1e+300,Infinity) | <(1e+300,Infinity),0> - <(3,5),NaN> | (1e+300,Infinity) | <(1e+300,Infinity),NaN> - <(5,1),3> | (Infinity,1e+300) | <(Infinity,1e+300),3> - <(1,2),100> | (Infinity,1e+300) | <(Infinity,1e+300),100> - <(1,3),5> | (Infinity,1e+300) | <(Infinity,1e+300),5> - <(1,2),3> | (Infinity,1e+300) | <(Infinity,1e+300),3> - <(100,200),10> | (Infinity,1e+300) | <(Infinity,1e+300),10> - <(100,1),115> | (Infinity,1e+300) | <(Infinity,1e+300),115> - <(3,5),0> | (Infinity,1e+300) | <(Infinity,1e+300),0> - <(3,5),NaN> | (Infinity,1e+300) | <(Infinity,1e+300),NaN> - <(5,1),3> | (NaN,NaN) | <(NaN,NaN),3> - <(1,2),100> | (NaN,NaN) | <(NaN,NaN),100> - <(1,3),5> | (NaN,NaN) | <(NaN,NaN),5> - <(1,2),3> | (NaN,NaN) | <(NaN,NaN),3> - <(100,200),10> | (NaN,NaN) | <(NaN,NaN),10> - <(100,1),115> | (NaN,NaN) | <(NaN,NaN),115> - <(3,5),0> | (NaN,NaN) | <(NaN,NaN),0> - <(3,5),NaN> | (NaN,NaN) | <(NaN,NaN),NaN> - <(5,1),3> | (10,10) | <(15,11),3> - <(1,2),100> | (10,10) | <(11,12),100> - <(1,3),5> | (10,10) | <(11,13),5> - <(1,2),3> | (10,10) | <(11,12),3> - <(100,200),10> | (10,10) | <(110,210),10> - <(100,1),115> | (10,10) | <(110,11),115> - <(3,5),0> | (10,10) | <(13,15),0> - <(3,5),NaN> | (10,10) | <(13,15),NaN> -(80 rows) - +ERROR: relation "circle_tbl" does not exist +LINE 1: SELECT c.f1, p.f1, c.f1 + p.f1 FROM CIRCLE_TBL c, POINT_TBL ... + ^ -- Subtract point SELECT c.f1, p.f1, c.f1 - p.f1 FROM CIRCLE_TBL c, POINT_TBL p; - f1 | f1 | ?column? -----------------+-------------------+--------------------------- - <(5,1),3> | (0,0) | <(5,1),3> - <(1,2),100> | (0,0) | <(1,2),100> - <(1,3),5> | (0,0) | <(1,3),5> - <(1,2),3> | (0,0) | <(1,2),3> - <(100,200),10> | (0,0) | <(100,200),10> - <(100,1),115> | (0,0) | <(100,1),115> - <(3,5),0> | (0,0) | <(3,5),0> - <(3,5),NaN> | (0,0) | <(3,5),NaN> - <(5,1),3> | (-10,0) | <(15,1),3> - <(1,2),100> | (-10,0) | <(11,2),100> - <(1,3),5> | (-10,0) | <(11,3),5> - <(1,2),3> | (-10,0) | <(11,2),3> - <(100,200),10> | (-10,0) | <(110,200),10> - <(100,1),115> | (-10,0) | <(110,1),115> - <(3,5),0> | (-10,0) | <(13,5),0> - <(3,5),NaN> | (-10,0) | <(13,5),NaN> - <(5,1),3> | (-3,4) | <(8,-3),3> - <(1,2),100> | (-3,4) | <(4,-2),100> - <(1,3),5> | (-3,4) | <(4,-1),5> - <(1,2),3> | (-3,4) | <(4,-2),3> - <(100,200),10> | (-3,4) | <(103,196),10> - <(100,1),115> | (-3,4) | <(103,-3),115> - <(3,5),0> | (-3,4) | <(6,1),0> - <(3,5),NaN> | (-3,4) | <(6,1),NaN> - <(5,1),3> | (5.1,34.5) | <(-0.1,-33.5),3> - <(1,2),100> | (5.1,34.5) | <(-4.1,-32.5),100> - <(1,3),5> | (5.1,34.5) | <(-4.1,-31.5),5> - <(1,2),3> | (5.1,34.5) | <(-4.1,-32.5),3> - <(100,200),10> | (5.1,34.5) | <(94.9,165.5),10> - <(100,1),115> | (5.1,34.5) | <(94.9,-33.5),115> - <(3,5),0> | (5.1,34.5) | <(-2.1,-29.5),0> - <(3,5),NaN> | (5.1,34.5) | <(-2.1,-29.5),NaN> - <(5,1),3> | (-5,-12) | <(10,13),3> - <(1,2),100> | (-5,-12) | <(6,14),100> - <(1,3),5> | (-5,-12) | <(6,15),5> - <(1,2),3> | (-5,-12) | <(6,14),3> - <(100,200),10> | (-5,-12) | <(105,212),10> - <(100,1),115> | (-5,-12) | <(105,13),115> - <(3,5),0> | (-5,-12) | <(8,17),0> - <(3,5),NaN> | (-5,-12) | <(8,17),NaN> - <(5,1),3> | (1e-300,-1e-300) | <(5,1),3> - <(1,2),100> | (1e-300,-1e-300) | <(1,2),100> - <(1,3),5> | (1e-300,-1e-300) | <(1,3),5> - <(1,2),3> | (1e-300,-1e-300) | <(1,2),3> - <(100,200),10> | (1e-300,-1e-300) | <(100,200),10> - <(100,1),115> | (1e-300,-1e-300) | <(100,1),115> - <(3,5),0> | (1e-300,-1e-300) | <(3,5),0> - <(3,5),NaN> | (1e-300,-1e-300) | <(3,5),NaN> - <(5,1),3> | (1e+300,Infinity) | <(-1e+300,-Infinity),3> - <(1,2),100> | (1e+300,Infinity) | <(-1e+300,-Infinity),100> - <(1,3),5> | (1e+300,Infinity) | <(-1e+300,-Infinity),5> - <(1,2),3> | (1e+300,Infinity) | <(-1e+300,-Infinity),3> - <(100,200),10> | (1e+300,Infinity) | <(-1e+300,-Infinity),10> - <(100,1),115> | (1e+300,Infinity) | <(-1e+300,-Infinity),115> - <(3,5),0> | (1e+300,Infinity) | <(-1e+300,-Infinity),0> - <(3,5),NaN> | (1e+300,Infinity) | <(-1e+300,-Infinity),NaN> - <(5,1),3> | (Infinity,1e+300) | <(-Infinity,-1e+300),3> - <(1,2),100> | (Infinity,1e+300) | <(-Infinity,-1e+300),100> - <(1,3),5> | (Infinity,1e+300) | <(-Infinity,-1e+300),5> - <(1,2),3> | (Infinity,1e+300) | <(-Infinity,-1e+300),3> - <(100,200),10> | (Infinity,1e+300) | <(-Infinity,-1e+300),10> - <(100,1),115> | (Infinity,1e+300) | <(-Infinity,-1e+300),115> - <(3,5),0> | (Infinity,1e+300) | <(-Infinity,-1e+300),0> - <(3,5),NaN> | (Infinity,1e+300) | <(-Infinity,-1e+300),NaN> - <(5,1),3> | (NaN,NaN) | <(NaN,NaN),3> - <(1,2),100> | (NaN,NaN) | <(NaN,NaN),100> - <(1,3),5> | (NaN,NaN) | <(NaN,NaN),5> - <(1,2),3> | (NaN,NaN) | <(NaN,NaN),3> - <(100,200),10> | (NaN,NaN) | <(NaN,NaN),10> - <(100,1),115> | (NaN,NaN) | <(NaN,NaN),115> - <(3,5),0> | (NaN,NaN) | <(NaN,NaN),0> - <(3,5),NaN> | (NaN,NaN) | <(NaN,NaN),NaN> - <(5,1),3> | (10,10) | <(-5,-9),3> - <(1,2),100> | (10,10) | <(-9,-8),100> - <(1,3),5> | (10,10) | <(-9,-7),5> - <(1,2),3> | (10,10) | <(-9,-8),3> - <(100,200),10> | (10,10) | <(90,190),10> - <(100,1),115> | (10,10) | <(90,-9),115> - <(3,5),0> | (10,10) | <(-7,-5),0> - <(3,5),NaN> | (10,10) | <(-7,-5),NaN> -(80 rows) - +ERROR: relation "circle_tbl" does not exist +LINE 1: SELECT c.f1, p.f1, c.f1 - p.f1 FROM CIRCLE_TBL c, POINT_TBL ... + ^ -- Multiply with point SELECT c.f1, p.f1, c.f1 * p.f1 FROM CIRCLE_TBL c, POINT_TBL p; - f1 | f1 | ?column? -----------------+-------------------+-------------------------------------------- - <(5,1),3> | (0,0) | <(0,0),0> - <(1,2),100> | (0,0) | <(0,0),0> - <(1,3),5> | (0,0) | <(0,0),0> - <(1,2),3> | (0,0) | <(0,0),0> - <(100,200),10> | (0,0) | <(0,0),0> - <(100,1),115> | (0,0) | <(0,0),0> - <(3,5),0> | (0,0) | <(0,0),0> - <(3,5),NaN> | (0,0) | <(0,0),NaN> - <(5,1),3> | (-10,0) | <(-50,-10),30> - <(1,2),100> | (-10,0) | <(-10,-20),1000> - <(1,3),5> | (-10,0) | <(-10,-30),50> - <(1,2),3> | (-10,0) | <(-10,-20),30> - <(100,200),10> | (-10,0) | <(-1000,-2000),100> - <(100,1),115> | (-10,0) | <(-1000,-10),1150> - <(3,5),0> | (-10,0) | <(-30,-50),0> - <(3,5),NaN> | (-10,0) | <(-30,-50),NaN> - <(5,1),3> | (-3,4) | <(-19,17),15> - <(1,2),100> | (-3,4) | <(-11,-2),500> - <(1,3),5> | (-3,4) | <(-15,-5),25> - <(1,2),3> | (-3,4) | <(-11,-2),15> - <(100,200),10> | (-3,4) | <(-1100,-200),50> - <(100,1),115> | (-3,4) | <(-304,397),575> - <(3,5),0> | (-3,4) | <(-29,-3),0> - <(3,5),NaN> | (-3,4) | <(-29,-3),NaN> - <(5,1),3> | (5.1,34.5) | <(-9,177.6),104.624758064> - <(1,2),100> | (5.1,34.5) | <(-63.9,44.7),3487.49193547> - <(1,3),5> | (5.1,34.5) | <(-98.4,49.8),174.374596774> - <(1,2),3> | (5.1,34.5) | <(-63.9,44.7),104.624758064> - <(100,200),10> | (5.1,34.5) | <(-6390,4470),348.749193547> - <(100,1),115> | (5.1,34.5) | <(475.5,3455.1),4010.6157258> - <(3,5),0> | (5.1,34.5) | <(-157.2,129),0> - <(3,5),NaN> | (5.1,34.5) | <(-157.2,129),NaN> - <(5,1),3> | (-5,-12) | <(-13,-65),39> - <(1,2),100> | (-5,-12) | <(19,-22),1300> - <(1,3),5> | (-5,-12) | <(31,-27),65> - <(1,2),3> | (-5,-12) | <(19,-22),39> - <(100,200),10> | (-5,-12) | <(1900,-2200),130> - <(100,1),115> | (-5,-12) | <(-488,-1205),1495> - <(3,5),0> | (-5,-12) | <(45,-61),0> - <(3,5),NaN> | (-5,-12) | <(45,-61),NaN> - <(5,1),3> | (1e-300,-1e-300) | <(6e-300,-4e-300),4.24264068712e-300> - <(1,2),100> | (1e-300,-1e-300) | <(3e-300,1e-300),1.41421356237e-298> - <(1,3),5> | (1e-300,-1e-300) | <(4e-300,2e-300),7.07106781187e-300> - <(1,2),3> | (1e-300,-1e-300) | <(3e-300,1e-300),4.24264068712e-300> - <(100,200),10> | (1e-300,-1e-300) | <(3e-298,1e-298),1.41421356237e-299> - <(100,1),115> | (1e-300,-1e-300) | <(1.01e-298,-9.9e-299),1.62634559673e-298> - <(3,5),0> | (1e-300,-1e-300) | <(8e-300,2e-300),0> - <(3,5),NaN> | (1e-300,-1e-300) | <(8e-300,2e-300),NaN> - <(5,1),3> | (1e+300,Infinity) | <(-Infinity,Infinity),Infinity> - <(1,2),100> | (1e+300,Infinity) | <(-Infinity,Infinity),Infinity> - <(1,3),5> | (1e+300,Infinity) | <(-Infinity,Infinity),Infinity> - <(1,2),3> | (1e+300,Infinity) | <(-Infinity,Infinity),Infinity> - <(100,200),10> | (1e+300,Infinity) | <(-Infinity,Infinity),Infinity> - <(100,1),115> | (1e+300,Infinity) | <(-Infinity,Infinity),Infinity> - <(3,5),0> | (1e+300,Infinity) | <(-Infinity,Infinity),NaN> - <(3,5),NaN> | (1e+300,Infinity) | <(-Infinity,Infinity),NaN> - <(5,1),3> | (Infinity,1e+300) | <(Infinity,Infinity),Infinity> - <(1,2),100> | (Infinity,1e+300) | <(Infinity,Infinity),Infinity> - <(1,3),5> | (Infinity,1e+300) | <(Infinity,Infinity),Infinity> - <(1,2),3> | (Infinity,1e+300) | <(Infinity,Infinity),Infinity> - <(100,200),10> | (Infinity,1e+300) | <(Infinity,Infinity),Infinity> - <(100,1),115> | (Infinity,1e+300) | <(Infinity,Infinity),Infinity> - <(3,5),0> | (Infinity,1e+300) | <(Infinity,Infinity),NaN> - <(3,5),NaN> | (Infinity,1e+300) | <(Infinity,Infinity),NaN> - <(5,1),3> | (NaN,NaN) | <(NaN,NaN),NaN> - <(1,2),100> | (NaN,NaN) | <(NaN,NaN),NaN> - <(1,3),5> | (NaN,NaN) | <(NaN,NaN),NaN> - <(1,2),3> | (NaN,NaN) | <(NaN,NaN),NaN> - <(100,200),10> | (NaN,NaN) | <(NaN,NaN),NaN> - <(100,1),115> | (NaN,NaN) | <(NaN,NaN),NaN> - <(3,5),0> | (NaN,NaN) | <(NaN,NaN),NaN> - <(3,5),NaN> | (NaN,NaN) | <(NaN,NaN),NaN> - <(5,1),3> | (10,10) | <(40,60),42.4264068712> - <(1,2),100> | (10,10) | <(-10,30),1414.21356237> - <(1,3),5> | (10,10) | <(-20,40),70.7106781187> - <(1,2),3> | (10,10) | <(-10,30),42.4264068712> - <(100,200),10> | (10,10) | <(-1000,3000),141.421356237> - <(100,1),115> | (10,10) | <(990,1010),1626.34559673> - <(3,5),0> | (10,10) | <(-20,80),0> - <(3,5),NaN> | (10,10) | <(-20,80),NaN> -(80 rows) - +ERROR: relation "circle_tbl" does not exist +LINE 1: SELECT c.f1, p.f1, c.f1 * p.f1 FROM CIRCLE_TBL c, POINT_TBL ... + ^ -- Divide by point SELECT c.f1, p.f1, c.f1 / p.f1 FROM CIRCLE_TBL c, POINT_TBL p WHERE p.f1[0] BETWEEN 1 AND 1000; - f1 | f1 | ?column? -----------------+------------+------------------------------------------------------ - <(5,1),3> | (5.1,34.5) | <(0.0493315573973,-0.137635045138),0.0860217042937> - <(5,1),3> | (10,10) | <(0.3,-0.2),0.212132034356> - <(1,2),100> | (5.1,34.5) | <(0.0609244733856,-0.0199792807459),2.86739014312> - <(1,2),100> | (10,10) | <(0.15,0.05),7.07106781187> - <(1,3),5> | (5.1,34.5) | <(0.0892901188891,-0.0157860983671),0.143369507156> - <(1,3),5> | (10,10) | <(0.2,0.1),0.353553390593> - <(1,2),3> | (5.1,34.5) | <(0.0609244733856,-0.0199792807459),0.0860217042937> - <(1,2),3> | (10,10) | <(0.15,0.05),0.212132034356> - <(100,200),10> | (5.1,34.5) | <(6.09244733856,-1.99792807459),0.286739014312> - <(100,200),10> | (10,10) | <(15,5),0.707106781187> - <(100,1),115> | (5.1,34.5) | <(0.44768388338,-2.83237136796),3.29749866459> - <(100,1),115> | (10,10) | <(5.05,-4.95),8.13172798365> - <(3,5),0> | (5.1,34.5) | <(0.154407774653,-0.0641310246164),0> - <(3,5),0> | (10,10) | <(0.4,0.1),0> - <(3,5),NaN> | (5.1,34.5) | <(0.154407774653,-0.0641310246164),NaN> - <(3,5),NaN> | (10,10) | <(0.4,0.1),NaN> -(16 rows) - +ERROR: relation "circle_tbl" does not exist +LINE 1: SELECT c.f1, p.f1, c.f1 / p.f1 FROM CIRCLE_TBL c, POINT_TBL ... + ^ -- Overflow error SELECT c.f1, p.f1, c.f1 / p.f1 FROM CIRCLE_TBL c, POINT_TBL p WHERE p.f1[0] > 1000; -ERROR: value out of range: overflow +ERROR: relation "circle_tbl" does not exist +LINE 1: SELECT c.f1, p.f1, c.f1 / p.f1 FROM CIRCLE_TBL c, POINT_TBL ... + ^ -- Division by 0 error SELECT c.f1, p.f1, c.f1 / p.f1 FROM CIRCLE_TBL c, POINT_TBL p WHERE p.f1 ~= '(0,0)'::point; -ERROR: division by zero +ERROR: relation "circle_tbl" does not exist +LINE 1: SELECT c.f1, p.f1, c.f1 / p.f1 FROM CIRCLE_TBL c, POINT_TBL ... + ^ -- Distance to polygon SELECT c.f1, p.f1, c.f1 <-> p.f1 FROM CIRCLE_TBL c, POLYGON_TBL p; - f1 | f1 | ?column? -----------------+----------------------------+---------------- - <(5,1),3> | ((2,0),(2,4),(0,0)) | 0 - <(5,1),3> | ((3,1),(3,3),(1,0)) | 0 - <(5,1),3> | ((1,2),(3,4),(5,6),(7,8)) | 0.535533905933 - <(5,1),3> | ((7,8),(5,6),(3,4),(1,2)) | 0.535533905933 - <(5,1),3> | ((1,2),(7,8),(5,6),(3,-4)) | 0 - <(5,1),3> | ((0,0)) | 2.09901951359 - <(5,1),3> | ((0,1),(0,1)) | 2 - <(1,2),100> | ((2,0),(2,4),(0,0)) | 0 - <(1,2),100> | ((3,1),(3,3),(1,0)) | 0 - <(1,2),100> | ((1,2),(3,4),(5,6),(7,8)) | 0 - <(1,2),100> | ((7,8),(5,6),(3,4),(1,2)) | 0 - <(1,2),100> | ((1,2),(7,8),(5,6),(3,-4)) | 0 - <(1,2),100> | ((0,0)) | 0 - <(1,2),100> | ((0,1),(0,1)) | 0 - <(1,3),5> | ((2,0),(2,4),(0,0)) | 0 - <(1,3),5> | ((3,1),(3,3),(1,0)) | 0 - <(1,3),5> | ((1,2),(3,4),(5,6),(7,8)) | 0 - <(1,3),5> | ((7,8),(5,6),(3,4),(1,2)) | 0 - <(1,3),5> | ((1,2),(7,8),(5,6),(3,-4)) | 0 - <(1,3),5> | ((0,0)) | 0 - <(1,3),5> | ((0,1),(0,1)) | 0 - <(1,2),3> | ((2,0),(2,4),(0,0)) | 0 - <(1,2),3> | ((3,1),(3,3),(1,0)) | 0 - <(1,2),3> | ((1,2),(3,4),(5,6),(7,8)) | 0 - <(1,2),3> | ((7,8),(5,6),(3,4),(1,2)) | 0 - <(1,2),3> | ((1,2),(7,8),(5,6),(3,-4)) | 0 - <(1,2),3> | ((0,0)) | 0 - <(1,2),3> | ((0,1),(0,1)) | 0 - <(100,200),10> | ((2,0),(2,4),(0,0)) | 209.134661795 - <(100,200),10> | ((3,1),(3,3),(1,0)) | 209.585974051 - <(100,200),10> | ((1,2),(3,4),(5,6),(7,8)) | 203.337760371 - <(100,200),10> | ((7,8),(5,6),(3,4),(1,2)) | 203.337760371 - <(100,200),10> | ((1,2),(7,8),(5,6),(3,-4)) | 203.337760371 - <(100,200),10> | ((0,0)) | 213.60679775 - <(100,200),10> | ((0,1),(0,1)) | 212.712819568 - <(100,1),115> | ((2,0),(2,4),(0,0)) | 0 - <(100,1),115> | ((3,1),(3,3),(1,0)) | 0 - <(100,1),115> | ((1,2),(3,4),(5,6),(7,8)) | 0 - <(100,1),115> | ((7,8),(5,6),(3,4),(1,2)) | 0 - <(100,1),115> | ((1,2),(7,8),(5,6),(3,-4)) | 0 - <(100,1),115> | ((0,0)) | 0 - <(100,1),115> | ((0,1),(0,1)) | 0 - <(3,5),0> | ((2,0),(2,4),(0,0)) | 1.41421356237 - <(3,5),0> | ((3,1),(3,3),(1,0)) | 2 - <(3,5),0> | ((1,2),(3,4),(5,6),(7,8)) | 0.707106781187 - <(3,5),0> | ((7,8),(5,6),(3,4),(1,2)) | 0.707106781187 - <(3,5),0> | ((1,2),(7,8),(5,6),(3,-4)) | 0.707106781187 - <(3,5),0> | ((0,0)) | 5.83095189485 - <(3,5),0> | ((0,1),(0,1)) | 5 - <(3,5),NaN> | ((2,0),(2,4),(0,0)) | NaN - <(3,5),NaN> | ((3,1),(3,3),(1,0)) | NaN - <(3,5),NaN> | ((1,2),(3,4),(5,6),(7,8)) | NaN - <(3,5),NaN> | ((7,8),(5,6),(3,4),(1,2)) | NaN - <(3,5),NaN> | ((1,2),(7,8),(5,6),(3,-4)) | NaN - <(3,5),NaN> | ((0,0)) | NaN - <(3,5),NaN> | ((0,1),(0,1)) | NaN -(56 rows) - +ERROR: relation "circle_tbl" does not exist +LINE 1: SELECT c.f1, p.f1, c.f1 <-> p.f1 FROM CIRCLE_TBL c, POLYGON_... + ^ diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/horology.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/horology.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/horology.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/horology.out 2023-02-20 19:44:26.169207603 -0500 @@ -470,145 +470,13 @@ (1 row) SELECT d1 + interval '1 year' AS one_year FROM TIMESTAMP_TBL; - one_year ------------------------------ - -infinity - infinity - Fri Jan 01 00:00:00 1971 - Tue Feb 10 17:32:01 1998 - Tue Feb 10 17:32:01 1998 - Tue Feb 10 17:32:02 1998 - Tue Feb 10 17:32:01.4 1998 - Tue Feb 10 17:32:01.5 1998 - Tue Feb 10 17:32:01.6 1998 - Fri Jan 02 00:00:00 1998 - Fri Jan 02 03:04:05 1998 - Tue Feb 10 17:32:01 1998 - Tue Feb 10 17:32:01 1998 - Tue Feb 10 17:32:01 1998 - Tue Feb 10 17:32:01 1998 - Wed Jun 10 17:32:01 1998 - Sun Sep 22 18:19:20 2002 - Thu Mar 15 08:14:01 2001 - Thu Mar 15 13:14:02 2001 - Thu Mar 15 12:14:03 2001 - Thu Mar 15 03:14:04 2001 - Thu Mar 15 02:14:05 2001 - Tue Feb 10 17:32:01 1998 - Tue Feb 10 17:32:01 1998 - Tue Feb 10 17:32:00 1998 - Tue Feb 10 17:32:01 1998 - Tue Feb 10 17:32:01 1998 - Tue Feb 10 17:32:01 1998 - Tue Feb 10 17:32:01 1998 - Tue Feb 10 17:32:01 1998 - Tue Feb 10 17:32:01 1998 - Tue Feb 10 17:32:01 1998 - Tue Feb 10 17:32:01 1998 - Tue Feb 10 17:32:01 1998 - Wed Jun 10 18:32:01 1998 - Tue Feb 10 17:32:01 1998 - Wed Feb 11 17:32:01 1998 - Thu Feb 12 17:32:01 1998 - Fri Feb 13 17:32:01 1998 - Sat Feb 14 17:32:01 1998 - Sun Feb 15 17:32:01 1998 - Mon Feb 16 17:32:01 1998 - Thu Feb 16 17:32:01 0096 BC - Sun Feb 16 17:32:01 0098 - Fri Feb 16 17:32:01 0598 - Wed Feb 16 17:32:01 1098 - Sun Feb 16 17:32:01 1698 - Fri Feb 16 17:32:01 1798 - Wed Feb 16 17:32:01 1898 - Mon Feb 16 17:32:01 1998 - Sun Feb 16 17:32:01 2098 - Fri Feb 28 17:32:01 1997 - Fri Feb 28 17:32:01 1997 - Sat Mar 01 17:32:01 1997 - Tue Dec 30 17:32:01 1997 - Wed Dec 31 17:32:01 1997 - Thu Jan 01 17:32:01 1998 - Sat Feb 28 17:32:01 1998 - Sun Mar 01 17:32:01 1998 - Wed Dec 30 17:32:01 1998 - Thu Dec 31 17:32:01 1998 - Sun Dec 31 17:32:01 2000 - Mon Jan 01 17:32:01 2001 - Mon Dec 31 17:32:01 2001 - Tue Jan 01 17:32:01 2002 -(65 rows) - +ERROR: relation "timestamp_tbl" does not exist +LINE 1: SELECT d1 + interval '1 year' AS one_year FROM TIMESTAMP_TBL... + ^ SELECT d1 - interval '1 year' AS one_year FROM TIMESTAMP_TBL; - one_year ------------------------------ - -infinity - infinity - Wed Jan 01 00:00:00 1969 - Sat Feb 10 17:32:01 1996 - Sat Feb 10 17:32:01 1996 - Sat Feb 10 17:32:02 1996 - Sat Feb 10 17:32:01.4 1996 - Sat Feb 10 17:32:01.5 1996 - Sat Feb 10 17:32:01.6 1996 - Tue Jan 02 00:00:00 1996 - Tue Jan 02 03:04:05 1996 - Sat Feb 10 17:32:01 1996 - Sat Feb 10 17:32:01 1996 - Sat Feb 10 17:32:01 1996 - Sat Feb 10 17:32:01 1996 - Mon Jun 10 17:32:01 1996 - Fri Sep 22 18:19:20 2000 - Mon Mar 15 08:14:01 1999 - Mon Mar 15 13:14:02 1999 - Mon Mar 15 12:14:03 1999 - Mon Mar 15 03:14:04 1999 - Mon Mar 15 02:14:05 1999 - Sat Feb 10 17:32:01 1996 - Sat Feb 10 17:32:01 1996 - Sat Feb 10 17:32:00 1996 - Sat Feb 10 17:32:01 1996 - Sat Feb 10 17:32:01 1996 - Sat Feb 10 17:32:01 1996 - Sat Feb 10 17:32:01 1996 - Sat Feb 10 17:32:01 1996 - Sat Feb 10 17:32:01 1996 - Sat Feb 10 17:32:01 1996 - Sat Feb 10 17:32:01 1996 - Sat Feb 10 17:32:01 1996 - Mon Jun 10 18:32:01 1996 - Sat Feb 10 17:32:01 1996 - Sun Feb 11 17:32:01 1996 - Mon Feb 12 17:32:01 1996 - Tue Feb 13 17:32:01 1996 - Wed Feb 14 17:32:01 1996 - Thu Feb 15 17:32:01 1996 - Fri Feb 16 17:32:01 1996 - Mon Feb 16 17:32:01 0098 BC - Thu Feb 16 17:32:01 0096 - Tue Feb 16 17:32:01 0596 - Sun Feb 16 17:32:01 1096 - Thu Feb 16 17:32:01 1696 - Tue Feb 16 17:32:01 1796 - Sun Feb 16 17:32:01 1896 - Fri Feb 16 17:32:01 1996 - Thu Feb 16 17:32:01 2096 - Tue Feb 28 17:32:01 1995 - Tue Feb 28 17:32:01 1995 - Wed Mar 01 17:32:01 1995 - Sat Dec 30 17:32:01 1995 - Sun Dec 31 17:32:01 1995 - Mon Jan 01 17:32:01 1996 - Wed Feb 28 17:32:01 1996 - Fri Mar 01 17:32:01 1996 - Mon Dec 30 17:32:01 1996 - Tue Dec 31 17:32:01 1996 - Thu Dec 31 17:32:01 1998 - Fri Jan 01 17:32:01 1999 - Fri Dec 31 17:32:01 1999 - Sat Jan 01 17:32:01 2000 -(65 rows) - +ERROR: relation "timestamp_tbl" does not exist +LINE 1: SELECT d1 - interval '1 year' AS one_year FROM TIMESTAMP_TBL... + ^ SELECT timestamp with time zone '1996-03-01' - interval '1 second' AS "Feb 29"; Feb 29 ------------------------------ @@ -716,147 +584,13 @@ (1 row) SELECT d1 + interval '1 year' AS one_year FROM TIMESTAMPTZ_TBL; - one_year ---------------------------------- - -infinity - infinity - Thu Dec 31 16:00:00 1970 PST - Tue Feb 10 17:32:01 1998 PST - Tue Feb 10 17:32:01 1998 PST - Tue Feb 10 17:32:02 1998 PST - Tue Feb 10 17:32:01.4 1998 PST - Tue Feb 10 17:32:01.5 1998 PST - Tue Feb 10 17:32:01.6 1998 PST - Fri Jan 02 00:00:00 1998 PST - Fri Jan 02 03:04:05 1998 PST - Tue Feb 10 17:32:01 1998 PST - Tue Feb 10 17:32:01 1998 PST - Tue Feb 10 17:32:01 1998 PST - Tue Feb 10 17:32:01 1998 PST - Wed Jun 10 17:32:01 1998 PDT - Sun Sep 22 18:19:20 2002 PDT - Thu Mar 15 08:14:01 2001 PST - Thu Mar 15 04:14:02 2001 PST - Thu Mar 15 02:14:03 2001 PST - Thu Mar 15 03:14:04 2001 PST - Thu Mar 15 01:14:05 2001 PST - Tue Feb 10 17:32:01 1998 PST - Tue Feb 10 17:32:01 1998 PST - Tue Feb 10 17:32:00 1998 PST - Tue Feb 10 17:32:01 1998 PST - Tue Feb 10 17:32:01 1998 PST - Tue Feb 10 17:32:01 1998 PST - Tue Feb 10 17:32:01 1998 PST - Tue Feb 10 17:32:01 1998 PST - Tue Feb 10 09:32:01 1998 PST - Tue Feb 10 09:32:01 1998 PST - Tue Feb 10 09:32:01 1998 PST - Tue Feb 10 14:32:01 1998 PST - Fri Jul 10 14:32:01 1998 PDT - Wed Jun 10 18:32:01 1998 PDT - Tue Feb 10 17:32:01 1998 PST - Wed Feb 11 17:32:01 1998 PST - Thu Feb 12 17:32:01 1998 PST - Fri Feb 13 17:32:01 1998 PST - Sat Feb 14 17:32:01 1998 PST - Sun Feb 15 17:32:01 1998 PST - Mon Feb 16 17:32:01 1998 PST - Thu Feb 16 17:32:01 0096 PST BC - Sun Feb 16 17:32:01 0098 PST - Fri Feb 16 17:32:01 0598 PST - Wed Feb 16 17:32:01 1098 PST - Sun Feb 16 17:32:01 1698 PST - Fri Feb 16 17:32:01 1798 PST - Wed Feb 16 17:32:01 1898 PST - Mon Feb 16 17:32:01 1998 PST - Sun Feb 16 17:32:01 2098 PST - Fri Feb 28 17:32:01 1997 PST - Fri Feb 28 17:32:01 1997 PST - Sat Mar 01 17:32:01 1997 PST - Tue Dec 30 17:32:01 1997 PST - Wed Dec 31 17:32:01 1997 PST - Thu Jan 01 17:32:01 1998 PST - Sat Feb 28 17:32:01 1998 PST - Sun Mar 01 17:32:01 1998 PST - Wed Dec 30 17:32:01 1998 PST - Thu Dec 31 17:32:01 1998 PST - Sun Dec 31 17:32:01 2000 PST - Mon Jan 01 17:32:01 2001 PST - Mon Dec 31 17:32:01 2001 PST - Tue Jan 01 17:32:01 2002 PST -(66 rows) - +ERROR: relation "timestamptz_tbl" does not exist +LINE 1: SELECT d1 + interval '1 year' AS one_year FROM TIMESTAMPTZ_T... + ^ SELECT d1 - interval '1 year' AS one_year FROM TIMESTAMPTZ_TBL; - one_year ---------------------------------- - -infinity - infinity - Tue Dec 31 16:00:00 1968 PST - Sat Feb 10 17:32:01 1996 PST - Sat Feb 10 17:32:01 1996 PST - Sat Feb 10 17:32:02 1996 PST - Sat Feb 10 17:32:01.4 1996 PST - Sat Feb 10 17:32:01.5 1996 PST - Sat Feb 10 17:32:01.6 1996 PST - Tue Jan 02 00:00:00 1996 PST - Tue Jan 02 03:04:05 1996 PST - Sat Feb 10 17:32:01 1996 PST - Sat Feb 10 17:32:01 1996 PST - Sat Feb 10 17:32:01 1996 PST - Sat Feb 10 17:32:01 1996 PST - Mon Jun 10 17:32:01 1996 PDT - Fri Sep 22 18:19:20 2000 PDT - Mon Mar 15 08:14:01 1999 PST - Mon Mar 15 04:14:02 1999 PST - Mon Mar 15 02:14:03 1999 PST - Mon Mar 15 03:14:04 1999 PST - Mon Mar 15 01:14:05 1999 PST - Sat Feb 10 17:32:01 1996 PST - Sat Feb 10 17:32:01 1996 PST - Sat Feb 10 17:32:00 1996 PST - Sat Feb 10 17:32:01 1996 PST - Sat Feb 10 17:32:01 1996 PST - Sat Feb 10 17:32:01 1996 PST - Sat Feb 10 17:32:01 1996 PST - Sat Feb 10 17:32:01 1996 PST - Sat Feb 10 09:32:01 1996 PST - Sat Feb 10 09:32:01 1996 PST - Sat Feb 10 09:32:01 1996 PST - Sat Feb 10 14:32:01 1996 PST - Wed Jul 10 14:32:01 1996 PDT - Mon Jun 10 18:32:01 1996 PDT - Sat Feb 10 17:32:01 1996 PST - Sun Feb 11 17:32:01 1996 PST - Mon Feb 12 17:32:01 1996 PST - Tue Feb 13 17:32:01 1996 PST - Wed Feb 14 17:32:01 1996 PST - Thu Feb 15 17:32:01 1996 PST - Fri Feb 16 17:32:01 1996 PST - Mon Feb 16 17:32:01 0098 PST BC - Thu Feb 16 17:32:01 0096 PST - Tue Feb 16 17:32:01 0596 PST - Sun Feb 16 17:32:01 1096 PST - Thu Feb 16 17:32:01 1696 PST - Tue Feb 16 17:32:01 1796 PST - Sun Feb 16 17:32:01 1896 PST - Fri Feb 16 17:32:01 1996 PST - Thu Feb 16 17:32:01 2096 PST - Tue Feb 28 17:32:01 1995 PST - Tue Feb 28 17:32:01 1995 PST - Wed Mar 01 17:32:01 1995 PST - Sat Dec 30 17:32:01 1995 PST - Sun Dec 31 17:32:01 1995 PST - Mon Jan 01 17:32:01 1996 PST - Wed Feb 28 17:32:01 1996 PST - Fri Mar 01 17:32:01 1996 PST - Mon Dec 30 17:32:01 1996 PST - Tue Dec 31 17:32:01 1996 PST - Thu Dec 31 17:32:01 1998 PST - Fri Jan 01 17:32:01 1999 PST - Fri Dec 31 17:32:01 1999 PST - Sat Jan 01 17:32:01 2000 PST -(66 rows) - +ERROR: relation "timestamptz_tbl" does not exist +LINE 1: SELECT d1 - interval '1 year' AS one_year FROM TIMESTAMPTZ_T... + ^ -- -- time, interval arithmetic -- @@ -940,348 +674,21 @@ WHERE t.d1 BETWEEN '1990-01-01' AND '2001-01-01' AND i.f1 BETWEEN '00:00' AND '23:00' ORDER BY 1,2; - t | i | add | subtract -----------------------------+-----------+----------------------------+---------------------------- - Wed Feb 28 17:32:01 1996 | @ 1 min | Wed Feb 28 17:33:01 1996 | Wed Feb 28 17:31:01 1996 - Wed Feb 28 17:32:01 1996 | @ 5 hours | Wed Feb 28 22:32:01 1996 | Wed Feb 28 12:32:01 1996 - Thu Feb 29 17:32:01 1996 | @ 1 min | Thu Feb 29 17:33:01 1996 | Thu Feb 29 17:31:01 1996 - Thu Feb 29 17:32:01 1996 | @ 5 hours | Thu Feb 29 22:32:01 1996 | Thu Feb 29 12:32:01 1996 - Fri Mar 01 17:32:01 1996 | @ 1 min | Fri Mar 01 17:33:01 1996 | Fri Mar 01 17:31:01 1996 - Fri Mar 01 17:32:01 1996 | @ 5 hours | Fri Mar 01 22:32:01 1996 | Fri Mar 01 12:32:01 1996 - Mon Dec 30 17:32:01 1996 | @ 1 min | Mon Dec 30 17:33:01 1996 | Mon Dec 30 17:31:01 1996 - Mon Dec 30 17:32:01 1996 | @ 5 hours | Mon Dec 30 22:32:01 1996 | Mon Dec 30 12:32:01 1996 - Tue Dec 31 17:32:01 1996 | @ 1 min | Tue Dec 31 17:33:01 1996 | Tue Dec 31 17:31:01 1996 - Tue Dec 31 17:32:01 1996 | @ 5 hours | Tue Dec 31 22:32:01 1996 | Tue Dec 31 12:32:01 1996 - Wed Jan 01 17:32:01 1997 | @ 1 min | Wed Jan 01 17:33:01 1997 | Wed Jan 01 17:31:01 1997 - Wed Jan 01 17:32:01 1997 | @ 5 hours | Wed Jan 01 22:32:01 1997 | Wed Jan 01 12:32:01 1997 - Thu Jan 02 00:00:00 1997 | @ 1 min | Thu Jan 02 00:01:00 1997 | Wed Jan 01 23:59:00 1997 - Thu Jan 02 00:00:00 1997 | @ 5 hours | Thu Jan 02 05:00:00 1997 | Wed Jan 01 19:00:00 1997 - Thu Jan 02 03:04:05 1997 | @ 1 min | Thu Jan 02 03:05:05 1997 | Thu Jan 02 03:03:05 1997 - Thu Jan 02 03:04:05 1997 | @ 5 hours | Thu Jan 02 08:04:05 1997 | Wed Jan 01 22:04:05 1997 - Mon Feb 10 17:32:00 1997 | @ 1 min | Mon Feb 10 17:33:00 1997 | Mon Feb 10 17:31:00 1997 - Mon Feb 10 17:32:00 1997 | @ 5 hours | Mon Feb 10 22:32:00 1997 | Mon Feb 10 12:32:00 1997 - Mon Feb 10 17:32:01 1997 | @ 1 min | Mon Feb 10 17:33:01 1997 | Mon Feb 10 17:31:01 1997 - Mon Feb 10 17:32:01 1997 | @ 1 min | Mon Feb 10 17:33:01 1997 | Mon Feb 10 17:31:01 1997 - Mon Feb 10 17:32:01 1997 | @ 1 min | Mon Feb 10 17:33:01 1997 | Mon Feb 10 17:31:01 1997 - Mon Feb 10 17:32:01 1997 | @ 1 min | Mon Feb 10 17:33:01 1997 | Mon Feb 10 17:31:01 1997 - Mon Feb 10 17:32:01 1997 | @ 1 min | Mon Feb 10 17:33:01 1997 | Mon Feb 10 17:31:01 1997 - Mon Feb 10 17:32:01 1997 | @ 1 min | Mon Feb 10 17:33:01 1997 | Mon Feb 10 17:31:01 1997 - Mon Feb 10 17:32:01 1997 | @ 1 min | Mon Feb 10 17:33:01 1997 | Mon Feb 10 17:31:01 1997 - Mon Feb 10 17:32:01 1997 | @ 1 min | Mon Feb 10 17:33:01 1997 | Mon Feb 10 17:31:01 1997 - Mon Feb 10 17:32:01 1997 | @ 1 min | Mon Feb 10 17:33:01 1997 | Mon Feb 10 17:31:01 1997 - Mon Feb 10 17:32:01 1997 | @ 1 min | Mon Feb 10 17:33:01 1997 | Mon Feb 10 17:31:01 1997 - Mon Feb 10 17:32:01 1997 | @ 1 min | Mon Feb 10 17:33:01 1997 | Mon Feb 10 17:31:01 1997 - Mon Feb 10 17:32:01 1997 | @ 1 min | Mon Feb 10 17:33:01 1997 | Mon Feb 10 17:31:01 1997 - Mon Feb 10 17:32:01 1997 | @ 1 min | Mon Feb 10 17:33:01 1997 | Mon Feb 10 17:31:01 1997 - Mon Feb 10 17:32:01 1997 | @ 1 min | Mon Feb 10 17:33:01 1997 | Mon Feb 10 17:31:01 1997 - Mon Feb 10 17:32:01 1997 | @ 1 min | Mon Feb 10 17:33:01 1997 | Mon Feb 10 17:31:01 1997 - Mon Feb 10 17:32:01 1997 | @ 1 min | Mon Feb 10 17:33:01 1997 | Mon Feb 10 17:31:01 1997 - Mon Feb 10 17:32:01 1997 | @ 1 min | Mon Feb 10 17:33:01 1997 | Mon Feb 10 17:31:01 1997 - Mon Feb 10 17:32:01 1997 | @ 1 min | Mon Feb 10 17:33:01 1997 | Mon Feb 10 17:31:01 1997 - Mon Feb 10 17:32:01 1997 | @ 5 hours | Mon Feb 10 22:32:01 1997 | Mon Feb 10 12:32:01 1997 - Mon Feb 10 17:32:01 1997 | @ 5 hours | Mon Feb 10 22:32:01 1997 | Mon Feb 10 12:32:01 1997 - Mon Feb 10 17:32:01 1997 | @ 5 hours | Mon Feb 10 22:32:01 1997 | Mon Feb 10 12:32:01 1997 - Mon Feb 10 17:32:01 1997 | @ 5 hours | Mon Feb 10 22:32:01 1997 | Mon Feb 10 12:32:01 1997 - Mon Feb 10 17:32:01 1997 | @ 5 hours | Mon Feb 10 22:32:01 1997 | Mon Feb 10 12:32:01 1997 - Mon Feb 10 17:32:01 1997 | @ 5 hours | Mon Feb 10 22:32:01 1997 | Mon Feb 10 12:32:01 1997 - Mon Feb 10 17:32:01 1997 | @ 5 hours | Mon Feb 10 22:32:01 1997 | Mon Feb 10 12:32:01 1997 - Mon Feb 10 17:32:01 1997 | @ 5 hours | Mon Feb 10 22:32:01 1997 | Mon Feb 10 12:32:01 1997 - Mon Feb 10 17:32:01 1997 | @ 5 hours | Mon Feb 10 22:32:01 1997 | Mon Feb 10 12:32:01 1997 - Mon Feb 10 17:32:01 1997 | @ 5 hours | Mon Feb 10 22:32:01 1997 | Mon Feb 10 12:32:01 1997 - Mon Feb 10 17:32:01 1997 | @ 5 hours | Mon Feb 10 22:32:01 1997 | Mon Feb 10 12:32:01 1997 - Mon Feb 10 17:32:01 1997 | @ 5 hours | Mon Feb 10 22:32:01 1997 | Mon Feb 10 12:32:01 1997 - Mon Feb 10 17:32:01 1997 | @ 5 hours | Mon Feb 10 22:32:01 1997 | Mon Feb 10 12:32:01 1997 - Mon Feb 10 17:32:01 1997 | @ 5 hours | Mon Feb 10 22:32:01 1997 | Mon Feb 10 12:32:01 1997 - Mon Feb 10 17:32:01 1997 | @ 5 hours | Mon Feb 10 22:32:01 1997 | Mon Feb 10 12:32:01 1997 - Mon Feb 10 17:32:01 1997 | @ 5 hours | Mon Feb 10 22:32:01 1997 | Mon Feb 10 12:32:01 1997 - Mon Feb 10 17:32:01 1997 | @ 5 hours | Mon Feb 10 22:32:01 1997 | Mon Feb 10 12:32:01 1997 - Mon Feb 10 17:32:01 1997 | @ 5 hours | Mon Feb 10 22:32:01 1997 | Mon Feb 10 12:32:01 1997 - Mon Feb 10 17:32:01.4 1997 | @ 1 min | Mon Feb 10 17:33:01.4 1997 | Mon Feb 10 17:31:01.4 1997 - Mon Feb 10 17:32:01.4 1997 | @ 5 hours | Mon Feb 10 22:32:01.4 1997 | Mon Feb 10 12:32:01.4 1997 - Mon Feb 10 17:32:01.5 1997 | @ 1 min | Mon Feb 10 17:33:01.5 1997 | Mon Feb 10 17:31:01.5 1997 - Mon Feb 10 17:32:01.5 1997 | @ 5 hours | Mon Feb 10 22:32:01.5 1997 | Mon Feb 10 12:32:01.5 1997 - Mon Feb 10 17:32:01.6 1997 | @ 1 min | Mon Feb 10 17:33:01.6 1997 | Mon Feb 10 17:31:01.6 1997 - Mon Feb 10 17:32:01.6 1997 | @ 5 hours | Mon Feb 10 22:32:01.6 1997 | Mon Feb 10 12:32:01.6 1997 - Mon Feb 10 17:32:02 1997 | @ 1 min | Mon Feb 10 17:33:02 1997 | Mon Feb 10 17:31:02 1997 - Mon Feb 10 17:32:02 1997 | @ 5 hours | Mon Feb 10 22:32:02 1997 | Mon Feb 10 12:32:02 1997 - Tue Feb 11 17:32:01 1997 | @ 1 min | Tue Feb 11 17:33:01 1997 | Tue Feb 11 17:31:01 1997 - Tue Feb 11 17:32:01 1997 | @ 5 hours | Tue Feb 11 22:32:01 1997 | Tue Feb 11 12:32:01 1997 - Wed Feb 12 17:32:01 1997 | @ 1 min | Wed Feb 12 17:33:01 1997 | Wed Feb 12 17:31:01 1997 - Wed Feb 12 17:32:01 1997 | @ 5 hours | Wed Feb 12 22:32:01 1997 | Wed Feb 12 12:32:01 1997 - Thu Feb 13 17:32:01 1997 | @ 1 min | Thu Feb 13 17:33:01 1997 | Thu Feb 13 17:31:01 1997 - Thu Feb 13 17:32:01 1997 | @ 5 hours | Thu Feb 13 22:32:01 1997 | Thu Feb 13 12:32:01 1997 - Fri Feb 14 17:32:01 1997 | @ 1 min | Fri Feb 14 17:33:01 1997 | Fri Feb 14 17:31:01 1997 - Fri Feb 14 17:32:01 1997 | @ 5 hours | Fri Feb 14 22:32:01 1997 | Fri Feb 14 12:32:01 1997 - Sat Feb 15 17:32:01 1997 | @ 1 min | Sat Feb 15 17:33:01 1997 | Sat Feb 15 17:31:01 1997 - Sat Feb 15 17:32:01 1997 | @ 5 hours | Sat Feb 15 22:32:01 1997 | Sat Feb 15 12:32:01 1997 - Sun Feb 16 17:32:01 1997 | @ 1 min | Sun Feb 16 17:33:01 1997 | Sun Feb 16 17:31:01 1997 - Sun Feb 16 17:32:01 1997 | @ 1 min | Sun Feb 16 17:33:01 1997 | Sun Feb 16 17:31:01 1997 - Sun Feb 16 17:32:01 1997 | @ 5 hours | Sun Feb 16 22:32:01 1997 | Sun Feb 16 12:32:01 1997 - Sun Feb 16 17:32:01 1997 | @ 5 hours | Sun Feb 16 22:32:01 1997 | Sun Feb 16 12:32:01 1997 - Fri Feb 28 17:32:01 1997 | @ 1 min | Fri Feb 28 17:33:01 1997 | Fri Feb 28 17:31:01 1997 - Fri Feb 28 17:32:01 1997 | @ 5 hours | Fri Feb 28 22:32:01 1997 | Fri Feb 28 12:32:01 1997 - Sat Mar 01 17:32:01 1997 | @ 1 min | Sat Mar 01 17:33:01 1997 | Sat Mar 01 17:31:01 1997 - Sat Mar 01 17:32:01 1997 | @ 5 hours | Sat Mar 01 22:32:01 1997 | Sat Mar 01 12:32:01 1997 - Tue Jun 10 17:32:01 1997 | @ 1 min | Tue Jun 10 17:33:01 1997 | Tue Jun 10 17:31:01 1997 - Tue Jun 10 17:32:01 1997 | @ 5 hours | Tue Jun 10 22:32:01 1997 | Tue Jun 10 12:32:01 1997 - Tue Jun 10 18:32:01 1997 | @ 1 min | Tue Jun 10 18:33:01 1997 | Tue Jun 10 18:31:01 1997 - Tue Jun 10 18:32:01 1997 | @ 5 hours | Tue Jun 10 23:32:01 1997 | Tue Jun 10 13:32:01 1997 - Tue Dec 30 17:32:01 1997 | @ 1 min | Tue Dec 30 17:33:01 1997 | Tue Dec 30 17:31:01 1997 - Tue Dec 30 17:32:01 1997 | @ 5 hours | Tue Dec 30 22:32:01 1997 | Tue Dec 30 12:32:01 1997 - Wed Dec 31 17:32:01 1997 | @ 1 min | Wed Dec 31 17:33:01 1997 | Wed Dec 31 17:31:01 1997 - Wed Dec 31 17:32:01 1997 | @ 5 hours | Wed Dec 31 22:32:01 1997 | Wed Dec 31 12:32:01 1997 - Fri Dec 31 17:32:01 1999 | @ 1 min | Fri Dec 31 17:33:01 1999 | Fri Dec 31 17:31:01 1999 - Fri Dec 31 17:32:01 1999 | @ 5 hours | Fri Dec 31 22:32:01 1999 | Fri Dec 31 12:32:01 1999 - Sat Jan 01 17:32:01 2000 | @ 1 min | Sat Jan 01 17:33:01 2000 | Sat Jan 01 17:31:01 2000 - Sat Jan 01 17:32:01 2000 | @ 5 hours | Sat Jan 01 22:32:01 2000 | Sat Jan 01 12:32:01 2000 - Wed Mar 15 02:14:05 2000 | @ 1 min | Wed Mar 15 02:15:05 2000 | Wed Mar 15 02:13:05 2000 - Wed Mar 15 02:14:05 2000 | @ 5 hours | Wed Mar 15 07:14:05 2000 | Tue Mar 14 21:14:05 2000 - Wed Mar 15 03:14:04 2000 | @ 1 min | Wed Mar 15 03:15:04 2000 | Wed Mar 15 03:13:04 2000 - Wed Mar 15 03:14:04 2000 | @ 5 hours | Wed Mar 15 08:14:04 2000 | Tue Mar 14 22:14:04 2000 - Wed Mar 15 08:14:01 2000 | @ 1 min | Wed Mar 15 08:15:01 2000 | Wed Mar 15 08:13:01 2000 - Wed Mar 15 08:14:01 2000 | @ 5 hours | Wed Mar 15 13:14:01 2000 | Wed Mar 15 03:14:01 2000 - Wed Mar 15 12:14:03 2000 | @ 1 min | Wed Mar 15 12:15:03 2000 | Wed Mar 15 12:13:03 2000 - Wed Mar 15 12:14:03 2000 | @ 5 hours | Wed Mar 15 17:14:03 2000 | Wed Mar 15 07:14:03 2000 - Wed Mar 15 13:14:02 2000 | @ 1 min | Wed Mar 15 13:15:02 2000 | Wed Mar 15 13:13:02 2000 - Wed Mar 15 13:14:02 2000 | @ 5 hours | Wed Mar 15 18:14:02 2000 | Wed Mar 15 08:14:02 2000 - Sun Dec 31 17:32:01 2000 | @ 1 min | Sun Dec 31 17:33:01 2000 | Sun Dec 31 17:31:01 2000 - Sun Dec 31 17:32:01 2000 | @ 5 hours | Sun Dec 31 22:32:01 2000 | Sun Dec 31 12:32:01 2000 -(104 rows) - +ERROR: relation "timestamp_tbl" does not exist +LINE 2: FROM TIMESTAMP_TBL t, INTERVAL_TBL i + ^ SELECT t.f1 AS t, i.f1 AS i, t.f1 + i.f1 AS "add", t.f1 - i.f1 AS "subtract" FROM TIME_TBL t, INTERVAL_TBL i ORDER BY 1,2; - t | i | add | subtract --------------+-------------------------------+-------------+------------- - 00:00:00 | @ 14 secs ago | 23:59:46 | 00:00:14 - 00:00:00 | @ 1 min | 00:01:00 | 23:59:00 - 00:00:00 | @ 5 hours | 05:00:00 | 19:00:00 - 00:00:00 | @ 1 day 2 hours 3 mins 4 secs | 02:03:04 | 21:56:56 - 00:00:00 | @ 10 days | 00:00:00 | 00:00:00 - 00:00:00 | @ 3 mons | 00:00:00 | 00:00:00 - 00:00:00 | @ 5 mons | 00:00:00 | 00:00:00 - 00:00:00 | @ 5 mons 12 hours | 12:00:00 | 12:00:00 - 00:00:00 | @ 6 years | 00:00:00 | 00:00:00 - 00:00:00 | @ 34 years | 00:00:00 | 00:00:00 - 01:00:00 | @ 14 secs ago | 00:59:46 | 01:00:14 - 01:00:00 | @ 1 min | 01:01:00 | 00:59:00 - 01:00:00 | @ 5 hours | 06:00:00 | 20:00:00 - 01:00:00 | @ 1 day 2 hours 3 mins 4 secs | 03:03:04 | 22:56:56 - 01:00:00 | @ 10 days | 01:00:00 | 01:00:00 - 01:00:00 | @ 3 mons | 01:00:00 | 01:00:00 - 01:00:00 | @ 5 mons | 01:00:00 | 01:00:00 - 01:00:00 | @ 5 mons 12 hours | 13:00:00 | 13:00:00 - 01:00:00 | @ 6 years | 01:00:00 | 01:00:00 - 01:00:00 | @ 34 years | 01:00:00 | 01:00:00 - 02:03:00 | @ 14 secs ago | 02:02:46 | 02:03:14 - 02:03:00 | @ 1 min | 02:04:00 | 02:02:00 - 02:03:00 | @ 5 hours | 07:03:00 | 21:03:00 - 02:03:00 | @ 1 day 2 hours 3 mins 4 secs | 04:06:04 | 23:59:56 - 02:03:00 | @ 10 days | 02:03:00 | 02:03:00 - 02:03:00 | @ 3 mons | 02:03:00 | 02:03:00 - 02:03:00 | @ 5 mons | 02:03:00 | 02:03:00 - 02:03:00 | @ 5 mons 12 hours | 14:03:00 | 14:03:00 - 02:03:00 | @ 6 years | 02:03:00 | 02:03:00 - 02:03:00 | @ 34 years | 02:03:00 | 02:03:00 - 11:59:00 | @ 14 secs ago | 11:58:46 | 11:59:14 - 11:59:00 | @ 1 min | 12:00:00 | 11:58:00 - 11:59:00 | @ 5 hours | 16:59:00 | 06:59:00 - 11:59:00 | @ 1 day 2 hours 3 mins 4 secs | 14:02:04 | 09:55:56 - 11:59:00 | @ 10 days | 11:59:00 | 11:59:00 - 11:59:00 | @ 3 mons | 11:59:00 | 11:59:00 - 11:59:00 | @ 5 mons | 11:59:00 | 11:59:00 - 11:59:00 | @ 5 mons 12 hours | 23:59:00 | 23:59:00 - 11:59:00 | @ 6 years | 11:59:00 | 11:59:00 - 11:59:00 | @ 34 years | 11:59:00 | 11:59:00 - 12:00:00 | @ 14 secs ago | 11:59:46 | 12:00:14 - 12:00:00 | @ 1 min | 12:01:00 | 11:59:00 - 12:00:00 | @ 5 hours | 17:00:00 | 07:00:00 - 12:00:00 | @ 1 day 2 hours 3 mins 4 secs | 14:03:04 | 09:56:56 - 12:00:00 | @ 10 days | 12:00:00 | 12:00:00 - 12:00:00 | @ 3 mons | 12:00:00 | 12:00:00 - 12:00:00 | @ 5 mons | 12:00:00 | 12:00:00 - 12:00:00 | @ 5 mons 12 hours | 00:00:00 | 00:00:00 - 12:00:00 | @ 6 years | 12:00:00 | 12:00:00 - 12:00:00 | @ 34 years | 12:00:00 | 12:00:00 - 12:01:00 | @ 14 secs ago | 12:00:46 | 12:01:14 - 12:01:00 | @ 1 min | 12:02:00 | 12:00:00 - 12:01:00 | @ 5 hours | 17:01:00 | 07:01:00 - 12:01:00 | @ 1 day 2 hours 3 mins 4 secs | 14:04:04 | 09:57:56 - 12:01:00 | @ 10 days | 12:01:00 | 12:01:00 - 12:01:00 | @ 3 mons | 12:01:00 | 12:01:00 - 12:01:00 | @ 5 mons | 12:01:00 | 12:01:00 - 12:01:00 | @ 5 mons 12 hours | 00:01:00 | 00:01:00 - 12:01:00 | @ 6 years | 12:01:00 | 12:01:00 - 12:01:00 | @ 34 years | 12:01:00 | 12:01:00 - 15:36:39 | @ 14 secs ago | 15:36:25 | 15:36:53 - 15:36:39 | @ 14 secs ago | 15:36:25 | 15:36:53 - 15:36:39 | @ 1 min | 15:37:39 | 15:35:39 - 15:36:39 | @ 1 min | 15:37:39 | 15:35:39 - 15:36:39 | @ 5 hours | 20:36:39 | 10:36:39 - 15:36:39 | @ 5 hours | 20:36:39 | 10:36:39 - 15:36:39 | @ 1 day 2 hours 3 mins 4 secs | 17:39:43 | 13:33:35 - 15:36:39 | @ 1 day 2 hours 3 mins 4 secs | 17:39:43 | 13:33:35 - 15:36:39 | @ 10 days | 15:36:39 | 15:36:39 - 15:36:39 | @ 10 days | 15:36:39 | 15:36:39 - 15:36:39 | @ 3 mons | 15:36:39 | 15:36:39 - 15:36:39 | @ 3 mons | 15:36:39 | 15:36:39 - 15:36:39 | @ 5 mons | 15:36:39 | 15:36:39 - 15:36:39 | @ 5 mons | 15:36:39 | 15:36:39 - 15:36:39 | @ 5 mons 12 hours | 03:36:39 | 03:36:39 - 15:36:39 | @ 5 mons 12 hours | 03:36:39 | 03:36:39 - 15:36:39 | @ 6 years | 15:36:39 | 15:36:39 - 15:36:39 | @ 6 years | 15:36:39 | 15:36:39 - 15:36:39 | @ 34 years | 15:36:39 | 15:36:39 - 15:36:39 | @ 34 years | 15:36:39 | 15:36:39 - 23:59:00 | @ 14 secs ago | 23:58:46 | 23:59:14 - 23:59:00 | @ 1 min | 00:00:00 | 23:58:00 - 23:59:00 | @ 5 hours | 04:59:00 | 18:59:00 - 23:59:00 | @ 1 day 2 hours 3 mins 4 secs | 02:02:04 | 21:55:56 - 23:59:00 | @ 10 days | 23:59:00 | 23:59:00 - 23:59:00 | @ 3 mons | 23:59:00 | 23:59:00 - 23:59:00 | @ 5 mons | 23:59:00 | 23:59:00 - 23:59:00 | @ 5 mons 12 hours | 11:59:00 | 11:59:00 - 23:59:00 | @ 6 years | 23:59:00 | 23:59:00 - 23:59:00 | @ 34 years | 23:59:00 | 23:59:00 - 23:59:59.99 | @ 14 secs ago | 23:59:45.99 | 00:00:13.99 - 23:59:59.99 | @ 1 min | 00:00:59.99 | 23:58:59.99 - 23:59:59.99 | @ 5 hours | 04:59:59.99 | 18:59:59.99 - 23:59:59.99 | @ 1 day 2 hours 3 mins 4 secs | 02:03:03.99 | 21:56:55.99 - 23:59:59.99 | @ 10 days | 23:59:59.99 | 23:59:59.99 - 23:59:59.99 | @ 3 mons | 23:59:59.99 | 23:59:59.99 - 23:59:59.99 | @ 5 mons | 23:59:59.99 | 23:59:59.99 - 23:59:59.99 | @ 5 mons 12 hours | 11:59:59.99 | 11:59:59.99 - 23:59:59.99 | @ 6 years | 23:59:59.99 | 23:59:59.99 - 23:59:59.99 | @ 34 years | 23:59:59.99 | 23:59:59.99 -(100 rows) - +ERROR: relation "time_tbl" does not exist +LINE 2: FROM TIME_TBL t, INTERVAL_TBL i + ^ SELECT t.f1 AS t, i.f1 AS i, t.f1 + i.f1 AS "add", t.f1 - i.f1 AS "subtract" FROM TIMETZ_TBL t, INTERVAL_TBL i ORDER BY 1,2; - t | i | add | subtract -----------------+-------------------------------+----------------+---------------- - 00:01:00-07 | @ 14 secs ago | 00:00:46-07 | 00:01:14-07 - 00:01:00-07 | @ 1 min | 00:02:00-07 | 00:00:00-07 - 00:01:00-07 | @ 5 hours | 05:01:00-07 | 19:01:00-07 - 00:01:00-07 | @ 1 day 2 hours 3 mins 4 secs | 02:04:04-07 | 21:57:56-07 - 00:01:00-07 | @ 10 days | 00:01:00-07 | 00:01:00-07 - 00:01:00-07 | @ 3 mons | 00:01:00-07 | 00:01:00-07 - 00:01:00-07 | @ 5 mons | 00:01:00-07 | 00:01:00-07 - 00:01:00-07 | @ 5 mons 12 hours | 12:01:00-07 | 12:01:00-07 - 00:01:00-07 | @ 6 years | 00:01:00-07 | 00:01:00-07 - 00:01:00-07 | @ 34 years | 00:01:00-07 | 00:01:00-07 - 01:00:00-07 | @ 14 secs ago | 00:59:46-07 | 01:00:14-07 - 01:00:00-07 | @ 1 min | 01:01:00-07 | 00:59:00-07 - 01:00:00-07 | @ 5 hours | 06:00:00-07 | 20:00:00-07 - 01:00:00-07 | @ 1 day 2 hours 3 mins 4 secs | 03:03:04-07 | 22:56:56-07 - 01:00:00-07 | @ 10 days | 01:00:00-07 | 01:00:00-07 - 01:00:00-07 | @ 3 mons | 01:00:00-07 | 01:00:00-07 - 01:00:00-07 | @ 5 mons | 01:00:00-07 | 01:00:00-07 - 01:00:00-07 | @ 5 mons 12 hours | 13:00:00-07 | 13:00:00-07 - 01:00:00-07 | @ 6 years | 01:00:00-07 | 01:00:00-07 - 01:00:00-07 | @ 34 years | 01:00:00-07 | 01:00:00-07 - 02:03:00-07 | @ 14 secs ago | 02:02:46-07 | 02:03:14-07 - 02:03:00-07 | @ 1 min | 02:04:00-07 | 02:02:00-07 - 02:03:00-07 | @ 5 hours | 07:03:00-07 | 21:03:00-07 - 02:03:00-07 | @ 1 day 2 hours 3 mins 4 secs | 04:06:04-07 | 23:59:56-07 - 02:03:00-07 | @ 10 days | 02:03:00-07 | 02:03:00-07 - 02:03:00-07 | @ 3 mons | 02:03:00-07 | 02:03:00-07 - 02:03:00-07 | @ 5 mons | 02:03:00-07 | 02:03:00-07 - 02:03:00-07 | @ 5 mons 12 hours | 14:03:00-07 | 14:03:00-07 - 02:03:00-07 | @ 6 years | 02:03:00-07 | 02:03:00-07 - 02:03:00-07 | @ 34 years | 02:03:00-07 | 02:03:00-07 - 08:08:00-04 | @ 14 secs ago | 08:07:46-04 | 08:08:14-04 - 08:08:00-04 | @ 1 min | 08:09:00-04 | 08:07:00-04 - 08:08:00-04 | @ 5 hours | 13:08:00-04 | 03:08:00-04 - 08:08:00-04 | @ 1 day 2 hours 3 mins 4 secs | 10:11:04-04 | 06:04:56-04 - 08:08:00-04 | @ 10 days | 08:08:00-04 | 08:08:00-04 - 08:08:00-04 | @ 3 mons | 08:08:00-04 | 08:08:00-04 - 08:08:00-04 | @ 5 mons | 08:08:00-04 | 08:08:00-04 - 08:08:00-04 | @ 5 mons 12 hours | 20:08:00-04 | 20:08:00-04 - 08:08:00-04 | @ 6 years | 08:08:00-04 | 08:08:00-04 - 08:08:00-04 | @ 34 years | 08:08:00-04 | 08:08:00-04 - 07:07:00-08 | @ 14 secs ago | 07:06:46-08 | 07:07:14-08 - 07:07:00-08 | @ 1 min | 07:08:00-08 | 07:06:00-08 - 07:07:00-08 | @ 5 hours | 12:07:00-08 | 02:07:00-08 - 07:07:00-08 | @ 1 day 2 hours 3 mins 4 secs | 09:10:04-08 | 05:03:56-08 - 07:07:00-08 | @ 10 days | 07:07:00-08 | 07:07:00-08 - 07:07:00-08 | @ 3 mons | 07:07:00-08 | 07:07:00-08 - 07:07:00-08 | @ 5 mons | 07:07:00-08 | 07:07:00-08 - 07:07:00-08 | @ 5 mons 12 hours | 19:07:00-08 | 19:07:00-08 - 07:07:00-08 | @ 6 years | 07:07:00-08 | 07:07:00-08 - 07:07:00-08 | @ 34 years | 07:07:00-08 | 07:07:00-08 - 11:59:00-07 | @ 14 secs ago | 11:58:46-07 | 11:59:14-07 - 11:59:00-07 | @ 1 min | 12:00:00-07 | 11:58:00-07 - 11:59:00-07 | @ 5 hours | 16:59:00-07 | 06:59:00-07 - 11:59:00-07 | @ 1 day 2 hours 3 mins 4 secs | 14:02:04-07 | 09:55:56-07 - 11:59:00-07 | @ 10 days | 11:59:00-07 | 11:59:00-07 - 11:59:00-07 | @ 3 mons | 11:59:00-07 | 11:59:00-07 - 11:59:00-07 | @ 5 mons | 11:59:00-07 | 11:59:00-07 - 11:59:00-07 | @ 5 mons 12 hours | 23:59:00-07 | 23:59:00-07 - 11:59:00-07 | @ 6 years | 11:59:00-07 | 11:59:00-07 - 11:59:00-07 | @ 34 years | 11:59:00-07 | 11:59:00-07 - 12:00:00-07 | @ 14 secs ago | 11:59:46-07 | 12:00:14-07 - 12:00:00-07 | @ 1 min | 12:01:00-07 | 11:59:00-07 - 12:00:00-07 | @ 5 hours | 17:00:00-07 | 07:00:00-07 - 12:00:00-07 | @ 1 day 2 hours 3 mins 4 secs | 14:03:04-07 | 09:56:56-07 - 12:00:00-07 | @ 10 days | 12:00:00-07 | 12:00:00-07 - 12:00:00-07 | @ 3 mons | 12:00:00-07 | 12:00:00-07 - 12:00:00-07 | @ 5 mons | 12:00:00-07 | 12:00:00-07 - 12:00:00-07 | @ 5 mons 12 hours | 00:00:00-07 | 00:00:00-07 - 12:00:00-07 | @ 6 years | 12:00:00-07 | 12:00:00-07 - 12:00:00-07 | @ 34 years | 12:00:00-07 | 12:00:00-07 - 12:01:00-07 | @ 14 secs ago | 12:00:46-07 | 12:01:14-07 - 12:01:00-07 | @ 1 min | 12:02:00-07 | 12:00:00-07 - 12:01:00-07 | @ 5 hours | 17:01:00-07 | 07:01:00-07 - 12:01:00-07 | @ 1 day 2 hours 3 mins 4 secs | 14:04:04-07 | 09:57:56-07 - 12:01:00-07 | @ 10 days | 12:01:00-07 | 12:01:00-07 - 12:01:00-07 | @ 3 mons | 12:01:00-07 | 12:01:00-07 - 12:01:00-07 | @ 5 mons | 12:01:00-07 | 12:01:00-07 - 12:01:00-07 | @ 5 mons 12 hours | 00:01:00-07 | 00:01:00-07 - 12:01:00-07 | @ 6 years | 12:01:00-07 | 12:01:00-07 - 12:01:00-07 | @ 34 years | 12:01:00-07 | 12:01:00-07 - 15:36:39-04 | @ 14 secs ago | 15:36:25-04 | 15:36:53-04 - 15:36:39-04 | @ 1 min | 15:37:39-04 | 15:35:39-04 - 15:36:39-04 | @ 5 hours | 20:36:39-04 | 10:36:39-04 - 15:36:39-04 | @ 1 day 2 hours 3 mins 4 secs | 17:39:43-04 | 13:33:35-04 - 15:36:39-04 | @ 10 days | 15:36:39-04 | 15:36:39-04 - 15:36:39-04 | @ 3 mons | 15:36:39-04 | 15:36:39-04 - 15:36:39-04 | @ 5 mons | 15:36:39-04 | 15:36:39-04 - 15:36:39-04 | @ 5 mons 12 hours | 03:36:39-04 | 03:36:39-04 - 15:36:39-04 | @ 6 years | 15:36:39-04 | 15:36:39-04 - 15:36:39-04 | @ 34 years | 15:36:39-04 | 15:36:39-04 - 15:36:39-05 | @ 14 secs ago | 15:36:25-05 | 15:36:53-05 - 15:36:39-05 | @ 1 min | 15:37:39-05 | 15:35:39-05 - 15:36:39-05 | @ 5 hours | 20:36:39-05 | 10:36:39-05 - 15:36:39-05 | @ 1 day 2 hours 3 mins 4 secs | 17:39:43-05 | 13:33:35-05 - 15:36:39-05 | @ 10 days | 15:36:39-05 | 15:36:39-05 - 15:36:39-05 | @ 3 mons | 15:36:39-05 | 15:36:39-05 - 15:36:39-05 | @ 5 mons | 15:36:39-05 | 15:36:39-05 - 15:36:39-05 | @ 5 mons 12 hours | 03:36:39-05 | 03:36:39-05 - 15:36:39-05 | @ 6 years | 15:36:39-05 | 15:36:39-05 - 15:36:39-05 | @ 34 years | 15:36:39-05 | 15:36:39-05 - 23:59:00-07 | @ 14 secs ago | 23:58:46-07 | 23:59:14-07 - 23:59:00-07 | @ 1 min | 00:00:00-07 | 23:58:00-07 - 23:59:00-07 | @ 5 hours | 04:59:00-07 | 18:59:00-07 - 23:59:00-07 | @ 1 day 2 hours 3 mins 4 secs | 02:02:04-07 | 21:55:56-07 - 23:59:00-07 | @ 10 days | 23:59:00-07 | 23:59:00-07 - 23:59:00-07 | @ 3 mons | 23:59:00-07 | 23:59:00-07 - 23:59:00-07 | @ 5 mons | 23:59:00-07 | 23:59:00-07 - 23:59:00-07 | @ 5 mons 12 hours | 11:59:00-07 | 11:59:00-07 - 23:59:00-07 | @ 6 years | 23:59:00-07 | 23:59:00-07 - 23:59:00-07 | @ 34 years | 23:59:00-07 | 23:59:00-07 - 23:59:59.99-07 | @ 14 secs ago | 23:59:45.99-07 | 00:00:13.99-07 - 23:59:59.99-07 | @ 1 min | 00:00:59.99-07 | 23:58:59.99-07 - 23:59:59.99-07 | @ 5 hours | 04:59:59.99-07 | 18:59:59.99-07 - 23:59:59.99-07 | @ 1 day 2 hours 3 mins 4 secs | 02:03:03.99-07 | 21:56:55.99-07 - 23:59:59.99-07 | @ 10 days | 23:59:59.99-07 | 23:59:59.99-07 - 23:59:59.99-07 | @ 3 mons | 23:59:59.99-07 | 23:59:59.99-07 - 23:59:59.99-07 | @ 5 mons | 23:59:59.99-07 | 23:59:59.99-07 - 23:59:59.99-07 | @ 5 mons 12 hours | 11:59:59.99-07 | 11:59:59.99-07 - 23:59:59.99-07 | @ 6 years | 23:59:59.99-07 | 23:59:59.99-07 - 23:59:59.99-07 | @ 34 years | 23:59:59.99-07 | 23:59:59.99-07 -(120 rows) - +ERROR: relation "timetz_tbl" does not exist +LINE 2: FROM TIMETZ_TBL t, INTERVAL_TBL i + ^ -- SQL9x OVERLAPS operator -- test with time zone SELECT (timestamp with time zone '2000-11-27', timestamp with time zone '2000-11-28') @@ -1407,651 +814,44 @@ SELECT d1 FROM TIMESTAMP_TBL WHERE d1 BETWEEN '13-jun-1957' AND '1-jan-1997' OR d1 BETWEEN '1-jan-1999' AND '1-jan-2010'; +ERROR: relation "timestamp_tbl" does not exist +LINE 2: SELECT d1 FROM TIMESTAMP_TBL + ^ SELECT f1 AS "timestamp" FROM TEMP_TIMESTAMP ORDER BY "timestamp"; - timestamp ------------------------------- - Thu Jan 01 00:00:00 1970 PST - Wed Feb 28 17:32:01 1996 PST - Thu Feb 29 17:32:01 1996 PST - Fri Mar 01 17:32:01 1996 PST - Mon Dec 30 17:32:01 1996 PST - Tue Dec 31 17:32:01 1996 PST - Fri Dec 31 17:32:01 1999 PST - Sat Jan 01 17:32:01 2000 PST - Wed Mar 15 02:14:05 2000 PST - Wed Mar 15 03:14:04 2000 PST - Wed Mar 15 08:14:01 2000 PST - Wed Mar 15 12:14:03 2000 PST - Wed Mar 15 13:14:02 2000 PST - Sun Dec 31 17:32:01 2000 PST - Mon Jan 01 17:32:01 2001 PST - Sat Sep 22 18:19:20 2001 PDT -(16 rows) + timestamp +----------- +(0 rows) SELECT d.f1 AS "timestamp", t.f1 AS "interval", d.f1 + t.f1 AS plus FROM TEMP_TIMESTAMP d, INTERVAL_TBL t ORDER BY plus, "timestamp", "interval"; - timestamp | interval | plus -------------------------------+-------------------------------+------------------------------ - Thu Jan 01 00:00:00 1970 PST | @ 14 secs ago | Wed Dec 31 23:59:46 1969 PST - Thu Jan 01 00:00:00 1970 PST | @ 1 min | Thu Jan 01 00:01:00 1970 PST - Thu Jan 01 00:00:00 1970 PST | @ 5 hours | Thu Jan 01 05:00:00 1970 PST - Thu Jan 01 00:00:00 1970 PST | @ 1 day 2 hours 3 mins 4 secs | Fri Jan 02 02:03:04 1970 PST - Thu Jan 01 00:00:00 1970 PST | @ 10 days | Sun Jan 11 00:00:00 1970 PST - Thu Jan 01 00:00:00 1970 PST | @ 3 mons | Wed Apr 01 00:00:00 1970 PST - Thu Jan 01 00:00:00 1970 PST | @ 5 mons | Mon Jun 01 00:00:00 1970 PDT - Thu Jan 01 00:00:00 1970 PST | @ 5 mons 12 hours | Mon Jun 01 12:00:00 1970 PDT - Thu Jan 01 00:00:00 1970 PST | @ 6 years | Thu Jan 01 00:00:00 1976 PST - Wed Feb 28 17:32:01 1996 PST | @ 14 secs ago | Wed Feb 28 17:31:47 1996 PST - Wed Feb 28 17:32:01 1996 PST | @ 1 min | Wed Feb 28 17:33:01 1996 PST - Wed Feb 28 17:32:01 1996 PST | @ 5 hours | Wed Feb 28 22:32:01 1996 PST - Thu Feb 29 17:32:01 1996 PST | @ 14 secs ago | Thu Feb 29 17:31:47 1996 PST - Thu Feb 29 17:32:01 1996 PST | @ 1 min | Thu Feb 29 17:33:01 1996 PST - Wed Feb 28 17:32:01 1996 PST | @ 1 day 2 hours 3 mins 4 secs | Thu Feb 29 19:35:05 1996 PST - Thu Feb 29 17:32:01 1996 PST | @ 5 hours | Thu Feb 29 22:32:01 1996 PST - Fri Mar 01 17:32:01 1996 PST | @ 14 secs ago | Fri Mar 01 17:31:47 1996 PST - Fri Mar 01 17:32:01 1996 PST | @ 1 min | Fri Mar 01 17:33:01 1996 PST - Thu Feb 29 17:32:01 1996 PST | @ 1 day 2 hours 3 mins 4 secs | Fri Mar 01 19:35:05 1996 PST - Fri Mar 01 17:32:01 1996 PST | @ 5 hours | Fri Mar 01 22:32:01 1996 PST - Fri Mar 01 17:32:01 1996 PST | @ 1 day 2 hours 3 mins 4 secs | Sat Mar 02 19:35:05 1996 PST - Wed Feb 28 17:32:01 1996 PST | @ 10 days | Sat Mar 09 17:32:01 1996 PST - Thu Feb 29 17:32:01 1996 PST | @ 10 days | Sun Mar 10 17:32:01 1996 PST - Fri Mar 01 17:32:01 1996 PST | @ 10 days | Mon Mar 11 17:32:01 1996 PST - Wed Feb 28 17:32:01 1996 PST | @ 3 mons | Tue May 28 17:32:01 1996 PDT - Thu Feb 29 17:32:01 1996 PST | @ 3 mons | Wed May 29 17:32:01 1996 PDT - Fri Mar 01 17:32:01 1996 PST | @ 3 mons | Sat Jun 01 17:32:01 1996 PDT - Wed Feb 28 17:32:01 1996 PST | @ 5 mons | Sun Jul 28 17:32:01 1996 PDT - Wed Feb 28 17:32:01 1996 PST | @ 5 mons 12 hours | Mon Jul 29 05:32:01 1996 PDT - Thu Feb 29 17:32:01 1996 PST | @ 5 mons | Mon Jul 29 17:32:01 1996 PDT - Thu Feb 29 17:32:01 1996 PST | @ 5 mons 12 hours | Tue Jul 30 05:32:01 1996 PDT - Fri Mar 01 17:32:01 1996 PST | @ 5 mons | Thu Aug 01 17:32:01 1996 PDT - Fri Mar 01 17:32:01 1996 PST | @ 5 mons 12 hours | Fri Aug 02 05:32:01 1996 PDT - Mon Dec 30 17:32:01 1996 PST | @ 14 secs ago | Mon Dec 30 17:31:47 1996 PST - Mon Dec 30 17:32:01 1996 PST | @ 1 min | Mon Dec 30 17:33:01 1996 PST - Mon Dec 30 17:32:01 1996 PST | @ 5 hours | Mon Dec 30 22:32:01 1996 PST - Tue Dec 31 17:32:01 1996 PST | @ 14 secs ago | Tue Dec 31 17:31:47 1996 PST - Tue Dec 31 17:32:01 1996 PST | @ 1 min | Tue Dec 31 17:33:01 1996 PST - Mon Dec 30 17:32:01 1996 PST | @ 1 day 2 hours 3 mins 4 secs | Tue Dec 31 19:35:05 1996 PST - Tue Dec 31 17:32:01 1996 PST | @ 5 hours | Tue Dec 31 22:32:01 1996 PST - Tue Dec 31 17:32:01 1996 PST | @ 1 day 2 hours 3 mins 4 secs | Wed Jan 01 19:35:05 1997 PST - Mon Dec 30 17:32:01 1996 PST | @ 10 days | Thu Jan 09 17:32:01 1997 PST - Tue Dec 31 17:32:01 1996 PST | @ 10 days | Fri Jan 10 17:32:01 1997 PST - Mon Dec 30 17:32:01 1996 PST | @ 3 mons | Sun Mar 30 17:32:01 1997 PST - Tue Dec 31 17:32:01 1996 PST | @ 3 mons | Mon Mar 31 17:32:01 1997 PST - Mon Dec 30 17:32:01 1996 PST | @ 5 mons | Fri May 30 17:32:01 1997 PDT - Mon Dec 30 17:32:01 1996 PST | @ 5 mons 12 hours | Sat May 31 05:32:01 1997 PDT - Tue Dec 31 17:32:01 1996 PST | @ 5 mons | Sat May 31 17:32:01 1997 PDT - Tue Dec 31 17:32:01 1996 PST | @ 5 mons 12 hours | Sun Jun 01 05:32:01 1997 PDT - Fri Dec 31 17:32:01 1999 PST | @ 14 secs ago | Fri Dec 31 17:31:47 1999 PST - Fri Dec 31 17:32:01 1999 PST | @ 1 min | Fri Dec 31 17:33:01 1999 PST - Fri Dec 31 17:32:01 1999 PST | @ 5 hours | Fri Dec 31 22:32:01 1999 PST - Sat Jan 01 17:32:01 2000 PST | @ 14 secs ago | Sat Jan 01 17:31:47 2000 PST - Sat Jan 01 17:32:01 2000 PST | @ 1 min | Sat Jan 01 17:33:01 2000 PST - Fri Dec 31 17:32:01 1999 PST | @ 1 day 2 hours 3 mins 4 secs | Sat Jan 01 19:35:05 2000 PST - Sat Jan 01 17:32:01 2000 PST | @ 5 hours | Sat Jan 01 22:32:01 2000 PST - Sat Jan 01 17:32:01 2000 PST | @ 1 day 2 hours 3 mins 4 secs | Sun Jan 02 19:35:05 2000 PST - Fri Dec 31 17:32:01 1999 PST | @ 10 days | Mon Jan 10 17:32:01 2000 PST - Sat Jan 01 17:32:01 2000 PST | @ 10 days | Tue Jan 11 17:32:01 2000 PST - Wed Mar 15 02:14:05 2000 PST | @ 14 secs ago | Wed Mar 15 02:13:51 2000 PST - Wed Mar 15 02:14:05 2000 PST | @ 1 min | Wed Mar 15 02:15:05 2000 PST - Wed Mar 15 03:14:04 2000 PST | @ 14 secs ago | Wed Mar 15 03:13:50 2000 PST - Wed Mar 15 03:14:04 2000 PST | @ 1 min | Wed Mar 15 03:15:04 2000 PST - Wed Mar 15 02:14:05 2000 PST | @ 5 hours | Wed Mar 15 07:14:05 2000 PST - Wed Mar 15 08:14:01 2000 PST | @ 14 secs ago | Wed Mar 15 08:13:47 2000 PST - Wed Mar 15 03:14:04 2000 PST | @ 5 hours | Wed Mar 15 08:14:04 2000 PST - Wed Mar 15 08:14:01 2000 PST | @ 1 min | Wed Mar 15 08:15:01 2000 PST - Wed Mar 15 12:14:03 2000 PST | @ 14 secs ago | Wed Mar 15 12:13:49 2000 PST - Wed Mar 15 12:14:03 2000 PST | @ 1 min | Wed Mar 15 12:15:03 2000 PST - Wed Mar 15 13:14:02 2000 PST | @ 14 secs ago | Wed Mar 15 13:13:48 2000 PST - Wed Mar 15 08:14:01 2000 PST | @ 5 hours | Wed Mar 15 13:14:01 2000 PST - Wed Mar 15 13:14:02 2000 PST | @ 1 min | Wed Mar 15 13:15:02 2000 PST - Wed Mar 15 12:14:03 2000 PST | @ 5 hours | Wed Mar 15 17:14:03 2000 PST - Wed Mar 15 13:14:02 2000 PST | @ 5 hours | Wed Mar 15 18:14:02 2000 PST - Wed Mar 15 02:14:05 2000 PST | @ 1 day 2 hours 3 mins 4 secs | Thu Mar 16 04:17:09 2000 PST - Wed Mar 15 03:14:04 2000 PST | @ 1 day 2 hours 3 mins 4 secs | Thu Mar 16 05:17:08 2000 PST - Wed Mar 15 08:14:01 2000 PST | @ 1 day 2 hours 3 mins 4 secs | Thu Mar 16 10:17:05 2000 PST - Wed Mar 15 12:14:03 2000 PST | @ 1 day 2 hours 3 mins 4 secs | Thu Mar 16 14:17:07 2000 PST - Wed Mar 15 13:14:02 2000 PST | @ 1 day 2 hours 3 mins 4 secs | Thu Mar 16 15:17:06 2000 PST - Wed Mar 15 02:14:05 2000 PST | @ 10 days | Sat Mar 25 02:14:05 2000 PST - Wed Mar 15 03:14:04 2000 PST | @ 10 days | Sat Mar 25 03:14:04 2000 PST - Wed Mar 15 08:14:01 2000 PST | @ 10 days | Sat Mar 25 08:14:01 2000 PST - Wed Mar 15 12:14:03 2000 PST | @ 10 days | Sat Mar 25 12:14:03 2000 PST - Wed Mar 15 13:14:02 2000 PST | @ 10 days | Sat Mar 25 13:14:02 2000 PST - Fri Dec 31 17:32:01 1999 PST | @ 3 mons | Fri Mar 31 17:32:01 2000 PST - Sat Jan 01 17:32:01 2000 PST | @ 3 mons | Sat Apr 01 17:32:01 2000 PST - Fri Dec 31 17:32:01 1999 PST | @ 5 mons | Wed May 31 17:32:01 2000 PDT - Fri Dec 31 17:32:01 1999 PST | @ 5 mons 12 hours | Thu Jun 01 05:32:01 2000 PDT - Sat Jan 01 17:32:01 2000 PST | @ 5 mons | Thu Jun 01 17:32:01 2000 PDT - Sat Jan 01 17:32:01 2000 PST | @ 5 mons 12 hours | Fri Jun 02 05:32:01 2000 PDT - Wed Mar 15 02:14:05 2000 PST | @ 3 mons | Thu Jun 15 02:14:05 2000 PDT - Wed Mar 15 03:14:04 2000 PST | @ 3 mons | Thu Jun 15 03:14:04 2000 PDT - Wed Mar 15 08:14:01 2000 PST | @ 3 mons | Thu Jun 15 08:14:01 2000 PDT - Wed Mar 15 12:14:03 2000 PST | @ 3 mons | Thu Jun 15 12:14:03 2000 PDT - Wed Mar 15 13:14:02 2000 PST | @ 3 mons | Thu Jun 15 13:14:02 2000 PDT - Wed Mar 15 02:14:05 2000 PST | @ 5 mons | Tue Aug 15 02:14:05 2000 PDT - Wed Mar 15 03:14:04 2000 PST | @ 5 mons | Tue Aug 15 03:14:04 2000 PDT - Wed Mar 15 08:14:01 2000 PST | @ 5 mons | Tue Aug 15 08:14:01 2000 PDT - Wed Mar 15 12:14:03 2000 PST | @ 5 mons | Tue Aug 15 12:14:03 2000 PDT - Wed Mar 15 13:14:02 2000 PST | @ 5 mons | Tue Aug 15 13:14:02 2000 PDT - Wed Mar 15 02:14:05 2000 PST | @ 5 mons 12 hours | Tue Aug 15 14:14:05 2000 PDT - Wed Mar 15 03:14:04 2000 PST | @ 5 mons 12 hours | Tue Aug 15 15:14:04 2000 PDT - Wed Mar 15 08:14:01 2000 PST | @ 5 mons 12 hours | Tue Aug 15 20:14:01 2000 PDT - Wed Mar 15 12:14:03 2000 PST | @ 5 mons 12 hours | Wed Aug 16 00:14:03 2000 PDT - Wed Mar 15 13:14:02 2000 PST | @ 5 mons 12 hours | Wed Aug 16 01:14:02 2000 PDT - Sun Dec 31 17:32:01 2000 PST | @ 14 secs ago | Sun Dec 31 17:31:47 2000 PST - Sun Dec 31 17:32:01 2000 PST | @ 1 min | Sun Dec 31 17:33:01 2000 PST - Sun Dec 31 17:32:01 2000 PST | @ 5 hours | Sun Dec 31 22:32:01 2000 PST - Mon Jan 01 17:32:01 2001 PST | @ 14 secs ago | Mon Jan 01 17:31:47 2001 PST - Mon Jan 01 17:32:01 2001 PST | @ 1 min | Mon Jan 01 17:33:01 2001 PST - Sun Dec 31 17:32:01 2000 PST | @ 1 day 2 hours 3 mins 4 secs | Mon Jan 01 19:35:05 2001 PST - Mon Jan 01 17:32:01 2001 PST | @ 5 hours | Mon Jan 01 22:32:01 2001 PST - Mon Jan 01 17:32:01 2001 PST | @ 1 day 2 hours 3 mins 4 secs | Tue Jan 02 19:35:05 2001 PST - Sun Dec 31 17:32:01 2000 PST | @ 10 days | Wed Jan 10 17:32:01 2001 PST - Mon Jan 01 17:32:01 2001 PST | @ 10 days | Thu Jan 11 17:32:01 2001 PST - Sun Dec 31 17:32:01 2000 PST | @ 3 mons | Sat Mar 31 17:32:01 2001 PST - Mon Jan 01 17:32:01 2001 PST | @ 3 mons | Sun Apr 01 17:32:01 2001 PDT - Sun Dec 31 17:32:01 2000 PST | @ 5 mons | Thu May 31 17:32:01 2001 PDT - Sun Dec 31 17:32:01 2000 PST | @ 5 mons 12 hours | Fri Jun 01 05:32:01 2001 PDT - Mon Jan 01 17:32:01 2001 PST | @ 5 mons | Fri Jun 01 17:32:01 2001 PDT - Mon Jan 01 17:32:01 2001 PST | @ 5 mons 12 hours | Sat Jun 02 05:32:01 2001 PDT - Sat Sep 22 18:19:20 2001 PDT | @ 14 secs ago | Sat Sep 22 18:19:06 2001 PDT - Sat Sep 22 18:19:20 2001 PDT | @ 1 min | Sat Sep 22 18:20:20 2001 PDT - Sat Sep 22 18:19:20 2001 PDT | @ 5 hours | Sat Sep 22 23:19:20 2001 PDT - Sat Sep 22 18:19:20 2001 PDT | @ 1 day 2 hours 3 mins 4 secs | Sun Sep 23 20:22:24 2001 PDT - Sat Sep 22 18:19:20 2001 PDT | @ 10 days | Tue Oct 02 18:19:20 2001 PDT - Sat Sep 22 18:19:20 2001 PDT | @ 3 mons | Sat Dec 22 18:19:20 2001 PST - Sat Sep 22 18:19:20 2001 PDT | @ 5 mons | Fri Feb 22 18:19:20 2002 PST - Sat Sep 22 18:19:20 2001 PDT | @ 5 mons 12 hours | Sat Feb 23 06:19:20 2002 PST - Wed Feb 28 17:32:01 1996 PST | @ 6 years | Thu Feb 28 17:32:01 2002 PST - Thu Feb 29 17:32:01 1996 PST | @ 6 years | Thu Feb 28 17:32:01 2002 PST - Fri Mar 01 17:32:01 1996 PST | @ 6 years | Fri Mar 01 17:32:01 2002 PST - Mon Dec 30 17:32:01 1996 PST | @ 6 years | Mon Dec 30 17:32:01 2002 PST - Tue Dec 31 17:32:01 1996 PST | @ 6 years | Tue Dec 31 17:32:01 2002 PST - Thu Jan 01 00:00:00 1970 PST | @ 34 years | Thu Jan 01 00:00:00 2004 PST - Fri Dec 31 17:32:01 1999 PST | @ 6 years | Sat Dec 31 17:32:01 2005 PST - Sat Jan 01 17:32:01 2000 PST | @ 6 years | Sun Jan 01 17:32:01 2006 PST - Wed Mar 15 02:14:05 2000 PST | @ 6 years | Wed Mar 15 02:14:05 2006 PST - Wed Mar 15 03:14:04 2000 PST | @ 6 years | Wed Mar 15 03:14:04 2006 PST - Wed Mar 15 08:14:01 2000 PST | @ 6 years | Wed Mar 15 08:14:01 2006 PST - Wed Mar 15 12:14:03 2000 PST | @ 6 years | Wed Mar 15 12:14:03 2006 PST - Wed Mar 15 13:14:02 2000 PST | @ 6 years | Wed Mar 15 13:14:02 2006 PST - Sun Dec 31 17:32:01 2000 PST | @ 6 years | Sun Dec 31 17:32:01 2006 PST - Mon Jan 01 17:32:01 2001 PST | @ 6 years | Mon Jan 01 17:32:01 2007 PST - Sat Sep 22 18:19:20 2001 PDT | @ 6 years | Sat Sep 22 18:19:20 2007 PDT - Wed Feb 28 17:32:01 1996 PST | @ 34 years | Thu Feb 28 17:32:01 2030 PST - Thu Feb 29 17:32:01 1996 PST | @ 34 years | Thu Feb 28 17:32:01 2030 PST - Fri Mar 01 17:32:01 1996 PST | @ 34 years | Fri Mar 01 17:32:01 2030 PST - Mon Dec 30 17:32:01 1996 PST | @ 34 years | Mon Dec 30 17:32:01 2030 PST - Tue Dec 31 17:32:01 1996 PST | @ 34 years | Tue Dec 31 17:32:01 2030 PST - Fri Dec 31 17:32:01 1999 PST | @ 34 years | Sat Dec 31 17:32:01 2033 PST - Sat Jan 01 17:32:01 2000 PST | @ 34 years | Sun Jan 01 17:32:01 2034 PST - Wed Mar 15 02:14:05 2000 PST | @ 34 years | Wed Mar 15 02:14:05 2034 PDT - Wed Mar 15 03:14:04 2000 PST | @ 34 years | Wed Mar 15 03:14:04 2034 PDT - Wed Mar 15 08:14:01 2000 PST | @ 34 years | Wed Mar 15 08:14:01 2034 PDT - Wed Mar 15 12:14:03 2000 PST | @ 34 years | Wed Mar 15 12:14:03 2034 PDT - Wed Mar 15 13:14:02 2000 PST | @ 34 years | Wed Mar 15 13:14:02 2034 PDT - Sun Dec 31 17:32:01 2000 PST | @ 34 years | Sun Dec 31 17:32:01 2034 PST - Mon Jan 01 17:32:01 2001 PST | @ 34 years | Mon Jan 01 17:32:01 2035 PST - Sat Sep 22 18:19:20 2001 PDT | @ 34 years | Sat Sep 22 18:19:20 2035 PDT -(160 rows) - +ERROR: relation "interval_tbl" does not exist +LINE 2: FROM TEMP_TIMESTAMP d, INTERVAL_TBL t + ^ SELECT d.f1 AS "timestamp", t.f1 AS "interval", d.f1 - t.f1 AS minus FROM TEMP_TIMESTAMP d, INTERVAL_TBL t WHERE isfinite(d.f1) ORDER BY minus, "timestamp", "interval"; - timestamp | interval | minus -------------------------------+-------------------------------+------------------------------ - Thu Jan 01 00:00:00 1970 PST | @ 34 years | Wed Jan 01 00:00:00 1936 PST - Wed Feb 28 17:32:01 1996 PST | @ 34 years | Wed Feb 28 17:32:01 1962 PST - Thu Feb 29 17:32:01 1996 PST | @ 34 years | Wed Feb 28 17:32:01 1962 PST - Fri Mar 01 17:32:01 1996 PST | @ 34 years | Thu Mar 01 17:32:01 1962 PST - Mon Dec 30 17:32:01 1996 PST | @ 34 years | Sun Dec 30 17:32:01 1962 PST - Tue Dec 31 17:32:01 1996 PST | @ 34 years | Mon Dec 31 17:32:01 1962 PST - Thu Jan 01 00:00:00 1970 PST | @ 6 years | Wed Jan 01 00:00:00 1964 PST - Fri Dec 31 17:32:01 1999 PST | @ 34 years | Fri Dec 31 17:32:01 1965 PST - Sat Jan 01 17:32:01 2000 PST | @ 34 years | Sat Jan 01 17:32:01 1966 PST - Wed Mar 15 02:14:05 2000 PST | @ 34 years | Tue Mar 15 02:14:05 1966 PST - Wed Mar 15 03:14:04 2000 PST | @ 34 years | Tue Mar 15 03:14:04 1966 PST - Wed Mar 15 08:14:01 2000 PST | @ 34 years | Tue Mar 15 08:14:01 1966 PST - Wed Mar 15 12:14:03 2000 PST | @ 34 years | Tue Mar 15 12:14:03 1966 PST - Wed Mar 15 13:14:02 2000 PST | @ 34 years | Tue Mar 15 13:14:02 1966 PST - Sun Dec 31 17:32:01 2000 PST | @ 34 years | Sat Dec 31 17:32:01 1966 PST - Mon Jan 01 17:32:01 2001 PST | @ 34 years | Sun Jan 01 17:32:01 1967 PST - Sat Sep 22 18:19:20 2001 PDT | @ 34 years | Fri Sep 22 18:19:20 1967 PDT - Thu Jan 01 00:00:00 1970 PST | @ 5 mons 12 hours | Thu Jul 31 12:00:00 1969 PDT - Thu Jan 01 00:00:00 1970 PST | @ 5 mons | Fri Aug 01 00:00:00 1969 PDT - Thu Jan 01 00:00:00 1970 PST | @ 3 mons | Wed Oct 01 00:00:00 1969 PDT - Thu Jan 01 00:00:00 1970 PST | @ 10 days | Mon Dec 22 00:00:00 1969 PST - Thu Jan 01 00:00:00 1970 PST | @ 1 day 2 hours 3 mins 4 secs | Tue Dec 30 21:56:56 1969 PST - Thu Jan 01 00:00:00 1970 PST | @ 5 hours | Wed Dec 31 19:00:00 1969 PST - Thu Jan 01 00:00:00 1970 PST | @ 1 min | Wed Dec 31 23:59:00 1969 PST - Thu Jan 01 00:00:00 1970 PST | @ 14 secs ago | Thu Jan 01 00:00:14 1970 PST - Wed Feb 28 17:32:01 1996 PST | @ 6 years | Wed Feb 28 17:32:01 1990 PST - Thu Feb 29 17:32:01 1996 PST | @ 6 years | Wed Feb 28 17:32:01 1990 PST - Fri Mar 01 17:32:01 1996 PST | @ 6 years | Thu Mar 01 17:32:01 1990 PST - Mon Dec 30 17:32:01 1996 PST | @ 6 years | Sun Dec 30 17:32:01 1990 PST - Tue Dec 31 17:32:01 1996 PST | @ 6 years | Mon Dec 31 17:32:01 1990 PST - Fri Dec 31 17:32:01 1999 PST | @ 6 years | Fri Dec 31 17:32:01 1993 PST - Sat Jan 01 17:32:01 2000 PST | @ 6 years | Sat Jan 01 17:32:01 1994 PST - Wed Mar 15 02:14:05 2000 PST | @ 6 years | Tue Mar 15 02:14:05 1994 PST - Wed Mar 15 03:14:04 2000 PST | @ 6 years | Tue Mar 15 03:14:04 1994 PST - Wed Mar 15 08:14:01 2000 PST | @ 6 years | Tue Mar 15 08:14:01 1994 PST - Wed Mar 15 12:14:03 2000 PST | @ 6 years | Tue Mar 15 12:14:03 1994 PST - Wed Mar 15 13:14:02 2000 PST | @ 6 years | Tue Mar 15 13:14:02 1994 PST - Sun Dec 31 17:32:01 2000 PST | @ 6 years | Sat Dec 31 17:32:01 1994 PST - Mon Jan 01 17:32:01 2001 PST | @ 6 years | Sun Jan 01 17:32:01 1995 PST - Sat Sep 22 18:19:20 2001 PDT | @ 6 years | Fri Sep 22 18:19:20 1995 PDT - Wed Feb 28 17:32:01 1996 PST | @ 5 mons 12 hours | Thu Sep 28 05:32:01 1995 PDT - Wed Feb 28 17:32:01 1996 PST | @ 5 mons | Thu Sep 28 17:32:01 1995 PDT - Thu Feb 29 17:32:01 1996 PST | @ 5 mons 12 hours | Fri Sep 29 05:32:01 1995 PDT - Thu Feb 29 17:32:01 1996 PST | @ 5 mons | Fri Sep 29 17:32:01 1995 PDT - Fri Mar 01 17:32:01 1996 PST | @ 5 mons 12 hours | Sun Oct 01 05:32:01 1995 PDT - Fri Mar 01 17:32:01 1996 PST | @ 5 mons | Sun Oct 01 17:32:01 1995 PDT - Wed Feb 28 17:32:01 1996 PST | @ 3 mons | Tue Nov 28 17:32:01 1995 PST - Thu Feb 29 17:32:01 1996 PST | @ 3 mons | Wed Nov 29 17:32:01 1995 PST - Fri Mar 01 17:32:01 1996 PST | @ 3 mons | Fri Dec 01 17:32:01 1995 PST - Wed Feb 28 17:32:01 1996 PST | @ 10 days | Sun Feb 18 17:32:01 1996 PST - Thu Feb 29 17:32:01 1996 PST | @ 10 days | Mon Feb 19 17:32:01 1996 PST - Fri Mar 01 17:32:01 1996 PST | @ 10 days | Tue Feb 20 17:32:01 1996 PST - Wed Feb 28 17:32:01 1996 PST | @ 1 day 2 hours 3 mins 4 secs | Tue Feb 27 15:28:57 1996 PST - Wed Feb 28 17:32:01 1996 PST | @ 5 hours | Wed Feb 28 12:32:01 1996 PST - Thu Feb 29 17:32:01 1996 PST | @ 1 day 2 hours 3 mins 4 secs | Wed Feb 28 15:28:57 1996 PST - Wed Feb 28 17:32:01 1996 PST | @ 1 min | Wed Feb 28 17:31:01 1996 PST - Wed Feb 28 17:32:01 1996 PST | @ 14 secs ago | Wed Feb 28 17:32:15 1996 PST - Thu Feb 29 17:32:01 1996 PST | @ 5 hours | Thu Feb 29 12:32:01 1996 PST - Fri Mar 01 17:32:01 1996 PST | @ 1 day 2 hours 3 mins 4 secs | Thu Feb 29 15:28:57 1996 PST - Thu Feb 29 17:32:01 1996 PST | @ 1 min | Thu Feb 29 17:31:01 1996 PST - Thu Feb 29 17:32:01 1996 PST | @ 14 secs ago | Thu Feb 29 17:32:15 1996 PST - Fri Mar 01 17:32:01 1996 PST | @ 5 hours | Fri Mar 01 12:32:01 1996 PST - Fri Mar 01 17:32:01 1996 PST | @ 1 min | Fri Mar 01 17:31:01 1996 PST - Fri Mar 01 17:32:01 1996 PST | @ 14 secs ago | Fri Mar 01 17:32:15 1996 PST - Mon Dec 30 17:32:01 1996 PST | @ 5 mons 12 hours | Tue Jul 30 05:32:01 1996 PDT - Mon Dec 30 17:32:01 1996 PST | @ 5 mons | Tue Jul 30 17:32:01 1996 PDT - Tue Dec 31 17:32:01 1996 PST | @ 5 mons 12 hours | Wed Jul 31 05:32:01 1996 PDT - Tue Dec 31 17:32:01 1996 PST | @ 5 mons | Wed Jul 31 17:32:01 1996 PDT - Mon Dec 30 17:32:01 1996 PST | @ 3 mons | Mon Sep 30 17:32:01 1996 PDT - Tue Dec 31 17:32:01 1996 PST | @ 3 mons | Mon Sep 30 17:32:01 1996 PDT - Mon Dec 30 17:32:01 1996 PST | @ 10 days | Fri Dec 20 17:32:01 1996 PST - Tue Dec 31 17:32:01 1996 PST | @ 10 days | Sat Dec 21 17:32:01 1996 PST - Mon Dec 30 17:32:01 1996 PST | @ 1 day 2 hours 3 mins 4 secs | Sun Dec 29 15:28:57 1996 PST - Mon Dec 30 17:32:01 1996 PST | @ 5 hours | Mon Dec 30 12:32:01 1996 PST - Tue Dec 31 17:32:01 1996 PST | @ 1 day 2 hours 3 mins 4 secs | Mon Dec 30 15:28:57 1996 PST - Mon Dec 30 17:32:01 1996 PST | @ 1 min | Mon Dec 30 17:31:01 1996 PST - Mon Dec 30 17:32:01 1996 PST | @ 14 secs ago | Mon Dec 30 17:32:15 1996 PST - Tue Dec 31 17:32:01 1996 PST | @ 5 hours | Tue Dec 31 12:32:01 1996 PST - Tue Dec 31 17:32:01 1996 PST | @ 1 min | Tue Dec 31 17:31:01 1996 PST - Tue Dec 31 17:32:01 1996 PST | @ 14 secs ago | Tue Dec 31 17:32:15 1996 PST - Fri Dec 31 17:32:01 1999 PST | @ 5 mons 12 hours | Sat Jul 31 05:32:01 1999 PDT - Fri Dec 31 17:32:01 1999 PST | @ 5 mons | Sat Jul 31 17:32:01 1999 PDT - Sat Jan 01 17:32:01 2000 PST | @ 5 mons 12 hours | Sun Aug 01 05:32:01 1999 PDT - Sat Jan 01 17:32:01 2000 PST | @ 5 mons | Sun Aug 01 17:32:01 1999 PDT - Fri Dec 31 17:32:01 1999 PST | @ 3 mons | Thu Sep 30 17:32:01 1999 PDT - Sat Jan 01 17:32:01 2000 PST | @ 3 mons | Fri Oct 01 17:32:01 1999 PDT - Wed Mar 15 02:14:05 2000 PST | @ 5 mons 12 hours | Thu Oct 14 14:14:05 1999 PDT - Wed Mar 15 03:14:04 2000 PST | @ 5 mons 12 hours | Thu Oct 14 15:14:04 1999 PDT - Wed Mar 15 08:14:01 2000 PST | @ 5 mons 12 hours | Thu Oct 14 20:14:01 1999 PDT - Wed Mar 15 12:14:03 2000 PST | @ 5 mons 12 hours | Fri Oct 15 00:14:03 1999 PDT - Wed Mar 15 13:14:02 2000 PST | @ 5 mons 12 hours | Fri Oct 15 01:14:02 1999 PDT - Wed Mar 15 02:14:05 2000 PST | @ 5 mons | Fri Oct 15 02:14:05 1999 PDT - Wed Mar 15 03:14:04 2000 PST | @ 5 mons | Fri Oct 15 03:14:04 1999 PDT - Wed Mar 15 08:14:01 2000 PST | @ 5 mons | Fri Oct 15 08:14:01 1999 PDT - Wed Mar 15 12:14:03 2000 PST | @ 5 mons | Fri Oct 15 12:14:03 1999 PDT - Wed Mar 15 13:14:02 2000 PST | @ 5 mons | Fri Oct 15 13:14:02 1999 PDT - Wed Mar 15 02:14:05 2000 PST | @ 3 mons | Wed Dec 15 02:14:05 1999 PST - Wed Mar 15 03:14:04 2000 PST | @ 3 mons | Wed Dec 15 03:14:04 1999 PST - Wed Mar 15 08:14:01 2000 PST | @ 3 mons | Wed Dec 15 08:14:01 1999 PST - Wed Mar 15 12:14:03 2000 PST | @ 3 mons | Wed Dec 15 12:14:03 1999 PST - Wed Mar 15 13:14:02 2000 PST | @ 3 mons | Wed Dec 15 13:14:02 1999 PST - Fri Dec 31 17:32:01 1999 PST | @ 10 days | Tue Dec 21 17:32:01 1999 PST - Sat Jan 01 17:32:01 2000 PST | @ 10 days | Wed Dec 22 17:32:01 1999 PST - Fri Dec 31 17:32:01 1999 PST | @ 1 day 2 hours 3 mins 4 secs | Thu Dec 30 15:28:57 1999 PST - Fri Dec 31 17:32:01 1999 PST | @ 5 hours | Fri Dec 31 12:32:01 1999 PST - Sat Jan 01 17:32:01 2000 PST | @ 1 day 2 hours 3 mins 4 secs | Fri Dec 31 15:28:57 1999 PST - Fri Dec 31 17:32:01 1999 PST | @ 1 min | Fri Dec 31 17:31:01 1999 PST - Fri Dec 31 17:32:01 1999 PST | @ 14 secs ago | Fri Dec 31 17:32:15 1999 PST - Sat Jan 01 17:32:01 2000 PST | @ 5 hours | Sat Jan 01 12:32:01 2000 PST - Sat Jan 01 17:32:01 2000 PST | @ 1 min | Sat Jan 01 17:31:01 2000 PST - Sat Jan 01 17:32:01 2000 PST | @ 14 secs ago | Sat Jan 01 17:32:15 2000 PST - Wed Mar 15 02:14:05 2000 PST | @ 10 days | Sun Mar 05 02:14:05 2000 PST - Wed Mar 15 03:14:04 2000 PST | @ 10 days | Sun Mar 05 03:14:04 2000 PST - Wed Mar 15 08:14:01 2000 PST | @ 10 days | Sun Mar 05 08:14:01 2000 PST - Wed Mar 15 12:14:03 2000 PST | @ 10 days | Sun Mar 05 12:14:03 2000 PST - Wed Mar 15 13:14:02 2000 PST | @ 10 days | Sun Mar 05 13:14:02 2000 PST - Wed Mar 15 02:14:05 2000 PST | @ 1 day 2 hours 3 mins 4 secs | Tue Mar 14 00:11:01 2000 PST - Wed Mar 15 03:14:04 2000 PST | @ 1 day 2 hours 3 mins 4 secs | Tue Mar 14 01:11:00 2000 PST - Wed Mar 15 08:14:01 2000 PST | @ 1 day 2 hours 3 mins 4 secs | Tue Mar 14 06:10:57 2000 PST - Wed Mar 15 12:14:03 2000 PST | @ 1 day 2 hours 3 mins 4 secs | Tue Mar 14 10:10:59 2000 PST - Wed Mar 15 13:14:02 2000 PST | @ 1 day 2 hours 3 mins 4 secs | Tue Mar 14 11:10:58 2000 PST - Wed Mar 15 02:14:05 2000 PST | @ 5 hours | Tue Mar 14 21:14:05 2000 PST - Wed Mar 15 03:14:04 2000 PST | @ 5 hours | Tue Mar 14 22:14:04 2000 PST - Wed Mar 15 02:14:05 2000 PST | @ 1 min | Wed Mar 15 02:13:05 2000 PST - Wed Mar 15 02:14:05 2000 PST | @ 14 secs ago | Wed Mar 15 02:14:19 2000 PST - Wed Mar 15 03:14:04 2000 PST | @ 1 min | Wed Mar 15 03:13:04 2000 PST - Wed Mar 15 08:14:01 2000 PST | @ 5 hours | Wed Mar 15 03:14:01 2000 PST - Wed Mar 15 03:14:04 2000 PST | @ 14 secs ago | Wed Mar 15 03:14:18 2000 PST - Wed Mar 15 12:14:03 2000 PST | @ 5 hours | Wed Mar 15 07:14:03 2000 PST - Wed Mar 15 08:14:01 2000 PST | @ 1 min | Wed Mar 15 08:13:01 2000 PST - Wed Mar 15 13:14:02 2000 PST | @ 5 hours | Wed Mar 15 08:14:02 2000 PST - Wed Mar 15 08:14:01 2000 PST | @ 14 secs ago | Wed Mar 15 08:14:15 2000 PST - Wed Mar 15 12:14:03 2000 PST | @ 1 min | Wed Mar 15 12:13:03 2000 PST - Wed Mar 15 12:14:03 2000 PST | @ 14 secs ago | Wed Mar 15 12:14:17 2000 PST - Wed Mar 15 13:14:02 2000 PST | @ 1 min | Wed Mar 15 13:13:02 2000 PST - Wed Mar 15 13:14:02 2000 PST | @ 14 secs ago | Wed Mar 15 13:14:16 2000 PST - Sun Dec 31 17:32:01 2000 PST | @ 5 mons 12 hours | Mon Jul 31 05:32:01 2000 PDT - Sun Dec 31 17:32:01 2000 PST | @ 5 mons | Mon Jul 31 17:32:01 2000 PDT - Mon Jan 01 17:32:01 2001 PST | @ 5 mons 12 hours | Tue Aug 01 05:32:01 2000 PDT - Mon Jan 01 17:32:01 2001 PST | @ 5 mons | Tue Aug 01 17:32:01 2000 PDT - Sun Dec 31 17:32:01 2000 PST | @ 3 mons | Sat Sep 30 17:32:01 2000 PDT - Mon Jan 01 17:32:01 2001 PST | @ 3 mons | Sun Oct 01 17:32:01 2000 PDT - Sun Dec 31 17:32:01 2000 PST | @ 10 days | Thu Dec 21 17:32:01 2000 PST - Mon Jan 01 17:32:01 2001 PST | @ 10 days | Fri Dec 22 17:32:01 2000 PST - Sun Dec 31 17:32:01 2000 PST | @ 1 day 2 hours 3 mins 4 secs | Sat Dec 30 15:28:57 2000 PST - Sun Dec 31 17:32:01 2000 PST | @ 5 hours | Sun Dec 31 12:32:01 2000 PST - Mon Jan 01 17:32:01 2001 PST | @ 1 day 2 hours 3 mins 4 secs | Sun Dec 31 15:28:57 2000 PST - Sun Dec 31 17:32:01 2000 PST | @ 1 min | Sun Dec 31 17:31:01 2000 PST - Sun Dec 31 17:32:01 2000 PST | @ 14 secs ago | Sun Dec 31 17:32:15 2000 PST - Mon Jan 01 17:32:01 2001 PST | @ 5 hours | Mon Jan 01 12:32:01 2001 PST - Mon Jan 01 17:32:01 2001 PST | @ 1 min | Mon Jan 01 17:31:01 2001 PST - Mon Jan 01 17:32:01 2001 PST | @ 14 secs ago | Mon Jan 01 17:32:15 2001 PST - Sat Sep 22 18:19:20 2001 PDT | @ 5 mons 12 hours | Sun Apr 22 06:19:20 2001 PDT - Sat Sep 22 18:19:20 2001 PDT | @ 5 mons | Sun Apr 22 18:19:20 2001 PDT - Sat Sep 22 18:19:20 2001 PDT | @ 3 mons | Fri Jun 22 18:19:20 2001 PDT - Sat Sep 22 18:19:20 2001 PDT | @ 10 days | Wed Sep 12 18:19:20 2001 PDT - Sat Sep 22 18:19:20 2001 PDT | @ 1 day 2 hours 3 mins 4 secs | Fri Sep 21 16:16:16 2001 PDT - Sat Sep 22 18:19:20 2001 PDT | @ 5 hours | Sat Sep 22 13:19:20 2001 PDT - Sat Sep 22 18:19:20 2001 PDT | @ 1 min | Sat Sep 22 18:18:20 2001 PDT - Sat Sep 22 18:19:20 2001 PDT | @ 14 secs ago | Sat Sep 22 18:19:34 2001 PDT -(160 rows) - +ERROR: relation "interval_tbl" does not exist +LINE 2: FROM TEMP_TIMESTAMP d, INTERVAL_TBL t + ^ SELECT d.f1 AS "timestamp", timestamp with time zone '1980-01-06 00:00 GMT' AS gpstime_zero, d.f1 - timestamp with time zone '1980-01-06 00:00 GMT' AS difference FROM TEMP_TIMESTAMP d ORDER BY difference; - timestamp | gpstime_zero | difference -------------------------------+------------------------------+------------------------------------- - Thu Jan 01 00:00:00 1970 PST | Sat Jan 05 16:00:00 1980 PST | @ 3656 days 16 hours ago - Wed Feb 28 17:32:01 1996 PST | Sat Jan 05 16:00:00 1980 PST | @ 5898 days 1 hour 32 mins 1 sec - Thu Feb 29 17:32:01 1996 PST | Sat Jan 05 16:00:00 1980 PST | @ 5899 days 1 hour 32 mins 1 sec - Fri Mar 01 17:32:01 1996 PST | Sat Jan 05 16:00:00 1980 PST | @ 5900 days 1 hour 32 mins 1 sec - Mon Dec 30 17:32:01 1996 PST | Sat Jan 05 16:00:00 1980 PST | @ 6204 days 1 hour 32 mins 1 sec - Tue Dec 31 17:32:01 1996 PST | Sat Jan 05 16:00:00 1980 PST | @ 6205 days 1 hour 32 mins 1 sec - Fri Dec 31 17:32:01 1999 PST | Sat Jan 05 16:00:00 1980 PST | @ 7300 days 1 hour 32 mins 1 sec - Sat Jan 01 17:32:01 2000 PST | Sat Jan 05 16:00:00 1980 PST | @ 7301 days 1 hour 32 mins 1 sec - Wed Mar 15 02:14:05 2000 PST | Sat Jan 05 16:00:00 1980 PST | @ 7374 days 10 hours 14 mins 5 secs - Wed Mar 15 03:14:04 2000 PST | Sat Jan 05 16:00:00 1980 PST | @ 7374 days 11 hours 14 mins 4 secs - Wed Mar 15 08:14:01 2000 PST | Sat Jan 05 16:00:00 1980 PST | @ 7374 days 16 hours 14 mins 1 sec - Wed Mar 15 12:14:03 2000 PST | Sat Jan 05 16:00:00 1980 PST | @ 7374 days 20 hours 14 mins 3 secs - Wed Mar 15 13:14:02 2000 PST | Sat Jan 05 16:00:00 1980 PST | @ 7374 days 21 hours 14 mins 2 secs - Sun Dec 31 17:32:01 2000 PST | Sat Jan 05 16:00:00 1980 PST | @ 7666 days 1 hour 32 mins 1 sec - Mon Jan 01 17:32:01 2001 PST | Sat Jan 05 16:00:00 1980 PST | @ 7667 days 1 hour 32 mins 1 sec - Sat Sep 22 18:19:20 2001 PDT | Sat Jan 05 16:00:00 1980 PST | @ 7931 days 1 hour 19 mins 20 secs -(16 rows) + timestamp | gpstime_zero | difference +-----------+--------------+------------ +(0 rows) SELECT d1.f1 AS timestamp1, d2.f1 AS timestamp2, d1.f1 - d2.f1 AS difference FROM TEMP_TIMESTAMP d1, TEMP_TIMESTAMP d2 ORDER BY timestamp1, timestamp2, difference; - timestamp1 | timestamp2 | difference -------------------------------+------------------------------+------------------------------------------- - Thu Jan 01 00:00:00 1970 PST | Thu Jan 01 00:00:00 1970 PST | @ 0 - Thu Jan 01 00:00:00 1970 PST | Wed Feb 28 17:32:01 1996 PST | @ 9554 days 17 hours 32 mins 1 sec ago - Thu Jan 01 00:00:00 1970 PST | Thu Feb 29 17:32:01 1996 PST | @ 9555 days 17 hours 32 mins 1 sec ago - Thu Jan 01 00:00:00 1970 PST | Fri Mar 01 17:32:01 1996 PST | @ 9556 days 17 hours 32 mins 1 sec ago - Thu Jan 01 00:00:00 1970 PST | Mon Dec 30 17:32:01 1996 PST | @ 9860 days 17 hours 32 mins 1 sec ago - Thu Jan 01 00:00:00 1970 PST | Tue Dec 31 17:32:01 1996 PST | @ 9861 days 17 hours 32 mins 1 sec ago - Thu Jan 01 00:00:00 1970 PST | Fri Dec 31 17:32:01 1999 PST | @ 10956 days 17 hours 32 mins 1 sec ago - Thu Jan 01 00:00:00 1970 PST | Sat Jan 01 17:32:01 2000 PST | @ 10957 days 17 hours 32 mins 1 sec ago - Thu Jan 01 00:00:00 1970 PST | Wed Mar 15 02:14:05 2000 PST | @ 11031 days 2 hours 14 mins 5 secs ago - Thu Jan 01 00:00:00 1970 PST | Wed Mar 15 03:14:04 2000 PST | @ 11031 days 3 hours 14 mins 4 secs ago - Thu Jan 01 00:00:00 1970 PST | Wed Mar 15 08:14:01 2000 PST | @ 11031 days 8 hours 14 mins 1 sec ago - Thu Jan 01 00:00:00 1970 PST | Wed Mar 15 12:14:03 2000 PST | @ 11031 days 12 hours 14 mins 3 secs ago - Thu Jan 01 00:00:00 1970 PST | Wed Mar 15 13:14:02 2000 PST | @ 11031 days 13 hours 14 mins 2 secs ago - Thu Jan 01 00:00:00 1970 PST | Sun Dec 31 17:32:01 2000 PST | @ 11322 days 17 hours 32 mins 1 sec ago - Thu Jan 01 00:00:00 1970 PST | Mon Jan 01 17:32:01 2001 PST | @ 11323 days 17 hours 32 mins 1 sec ago - Thu Jan 01 00:00:00 1970 PST | Sat Sep 22 18:19:20 2001 PDT | @ 11587 days 17 hours 19 mins 20 secs ago - Wed Feb 28 17:32:01 1996 PST | Thu Jan 01 00:00:00 1970 PST | @ 9554 days 17 hours 32 mins 1 sec - Wed Feb 28 17:32:01 1996 PST | Wed Feb 28 17:32:01 1996 PST | @ 0 - Wed Feb 28 17:32:01 1996 PST | Thu Feb 29 17:32:01 1996 PST | @ 1 day ago - Wed Feb 28 17:32:01 1996 PST | Fri Mar 01 17:32:01 1996 PST | @ 2 days ago - Wed Feb 28 17:32:01 1996 PST | Mon Dec 30 17:32:01 1996 PST | @ 306 days ago - Wed Feb 28 17:32:01 1996 PST | Tue Dec 31 17:32:01 1996 PST | @ 307 days ago - Wed Feb 28 17:32:01 1996 PST | Fri Dec 31 17:32:01 1999 PST | @ 1402 days ago - Wed Feb 28 17:32:01 1996 PST | Sat Jan 01 17:32:01 2000 PST | @ 1403 days ago - Wed Feb 28 17:32:01 1996 PST | Wed Mar 15 02:14:05 2000 PST | @ 1476 days 8 hours 42 mins 4 secs ago - Wed Feb 28 17:32:01 1996 PST | Wed Mar 15 03:14:04 2000 PST | @ 1476 days 9 hours 42 mins 3 secs ago - Wed Feb 28 17:32:01 1996 PST | Wed Mar 15 08:14:01 2000 PST | @ 1476 days 14 hours 42 mins ago - Wed Feb 28 17:32:01 1996 PST | Wed Mar 15 12:14:03 2000 PST | @ 1476 days 18 hours 42 mins 2 secs ago - Wed Feb 28 17:32:01 1996 PST | Wed Mar 15 13:14:02 2000 PST | @ 1476 days 19 hours 42 mins 1 sec ago - Wed Feb 28 17:32:01 1996 PST | Sun Dec 31 17:32:01 2000 PST | @ 1768 days ago - Wed Feb 28 17:32:01 1996 PST | Mon Jan 01 17:32:01 2001 PST | @ 1769 days ago - Wed Feb 28 17:32:01 1996 PST | Sat Sep 22 18:19:20 2001 PDT | @ 2032 days 23 hours 47 mins 19 secs ago - Thu Feb 29 17:32:01 1996 PST | Thu Jan 01 00:00:00 1970 PST | @ 9555 days 17 hours 32 mins 1 sec - Thu Feb 29 17:32:01 1996 PST | Wed Feb 28 17:32:01 1996 PST | @ 1 day - Thu Feb 29 17:32:01 1996 PST | Thu Feb 29 17:32:01 1996 PST | @ 0 - Thu Feb 29 17:32:01 1996 PST | Fri Mar 01 17:32:01 1996 PST | @ 1 day ago - Thu Feb 29 17:32:01 1996 PST | Mon Dec 30 17:32:01 1996 PST | @ 305 days ago - Thu Feb 29 17:32:01 1996 PST | Tue Dec 31 17:32:01 1996 PST | @ 306 days ago - Thu Feb 29 17:32:01 1996 PST | Fri Dec 31 17:32:01 1999 PST | @ 1401 days ago - Thu Feb 29 17:32:01 1996 PST | Sat Jan 01 17:32:01 2000 PST | @ 1402 days ago - Thu Feb 29 17:32:01 1996 PST | Wed Mar 15 02:14:05 2000 PST | @ 1475 days 8 hours 42 mins 4 secs ago - Thu Feb 29 17:32:01 1996 PST | Wed Mar 15 03:14:04 2000 PST | @ 1475 days 9 hours 42 mins 3 secs ago - Thu Feb 29 17:32:01 1996 PST | Wed Mar 15 08:14:01 2000 PST | @ 1475 days 14 hours 42 mins ago - Thu Feb 29 17:32:01 1996 PST | Wed Mar 15 12:14:03 2000 PST | @ 1475 days 18 hours 42 mins 2 secs ago - Thu Feb 29 17:32:01 1996 PST | Wed Mar 15 13:14:02 2000 PST | @ 1475 days 19 hours 42 mins 1 sec ago - Thu Feb 29 17:32:01 1996 PST | Sun Dec 31 17:32:01 2000 PST | @ 1767 days ago - Thu Feb 29 17:32:01 1996 PST | Mon Jan 01 17:32:01 2001 PST | @ 1768 days ago - Thu Feb 29 17:32:01 1996 PST | Sat Sep 22 18:19:20 2001 PDT | @ 2031 days 23 hours 47 mins 19 secs ago - Fri Mar 01 17:32:01 1996 PST | Thu Jan 01 00:00:00 1970 PST | @ 9556 days 17 hours 32 mins 1 sec - Fri Mar 01 17:32:01 1996 PST | Wed Feb 28 17:32:01 1996 PST | @ 2 days - Fri Mar 01 17:32:01 1996 PST | Thu Feb 29 17:32:01 1996 PST | @ 1 day - Fri Mar 01 17:32:01 1996 PST | Fri Mar 01 17:32:01 1996 PST | @ 0 - Fri Mar 01 17:32:01 1996 PST | Mon Dec 30 17:32:01 1996 PST | @ 304 days ago - Fri Mar 01 17:32:01 1996 PST | Tue Dec 31 17:32:01 1996 PST | @ 305 days ago - Fri Mar 01 17:32:01 1996 PST | Fri Dec 31 17:32:01 1999 PST | @ 1400 days ago - Fri Mar 01 17:32:01 1996 PST | Sat Jan 01 17:32:01 2000 PST | @ 1401 days ago - Fri Mar 01 17:32:01 1996 PST | Wed Mar 15 02:14:05 2000 PST | @ 1474 days 8 hours 42 mins 4 secs ago - Fri Mar 01 17:32:01 1996 PST | Wed Mar 15 03:14:04 2000 PST | @ 1474 days 9 hours 42 mins 3 secs ago - Fri Mar 01 17:32:01 1996 PST | Wed Mar 15 08:14:01 2000 PST | @ 1474 days 14 hours 42 mins ago - Fri Mar 01 17:32:01 1996 PST | Wed Mar 15 12:14:03 2000 PST | @ 1474 days 18 hours 42 mins 2 secs ago - Fri Mar 01 17:32:01 1996 PST | Wed Mar 15 13:14:02 2000 PST | @ 1474 days 19 hours 42 mins 1 sec ago - Fri Mar 01 17:32:01 1996 PST | Sun Dec 31 17:32:01 2000 PST | @ 1766 days ago - Fri Mar 01 17:32:01 1996 PST | Mon Jan 01 17:32:01 2001 PST | @ 1767 days ago - Fri Mar 01 17:32:01 1996 PST | Sat Sep 22 18:19:20 2001 PDT | @ 2030 days 23 hours 47 mins 19 secs ago - Mon Dec 30 17:32:01 1996 PST | Thu Jan 01 00:00:00 1970 PST | @ 9860 days 17 hours 32 mins 1 sec - Mon Dec 30 17:32:01 1996 PST | Wed Feb 28 17:32:01 1996 PST | @ 306 days - Mon Dec 30 17:32:01 1996 PST | Thu Feb 29 17:32:01 1996 PST | @ 305 days - Mon Dec 30 17:32:01 1996 PST | Fri Mar 01 17:32:01 1996 PST | @ 304 days - Mon Dec 30 17:32:01 1996 PST | Mon Dec 30 17:32:01 1996 PST | @ 0 - Mon Dec 30 17:32:01 1996 PST | Tue Dec 31 17:32:01 1996 PST | @ 1 day ago - Mon Dec 30 17:32:01 1996 PST | Fri Dec 31 17:32:01 1999 PST | @ 1096 days ago - Mon Dec 30 17:32:01 1996 PST | Sat Jan 01 17:32:01 2000 PST | @ 1097 days ago - Mon Dec 30 17:32:01 1996 PST | Wed Mar 15 02:14:05 2000 PST | @ 1170 days 8 hours 42 mins 4 secs ago - Mon Dec 30 17:32:01 1996 PST | Wed Mar 15 03:14:04 2000 PST | @ 1170 days 9 hours 42 mins 3 secs ago - Mon Dec 30 17:32:01 1996 PST | Wed Mar 15 08:14:01 2000 PST | @ 1170 days 14 hours 42 mins ago - Mon Dec 30 17:32:01 1996 PST | Wed Mar 15 12:14:03 2000 PST | @ 1170 days 18 hours 42 mins 2 secs ago - Mon Dec 30 17:32:01 1996 PST | Wed Mar 15 13:14:02 2000 PST | @ 1170 days 19 hours 42 mins 1 sec ago - Mon Dec 30 17:32:01 1996 PST | Sun Dec 31 17:32:01 2000 PST | @ 1462 days ago - Mon Dec 30 17:32:01 1996 PST | Mon Jan 01 17:32:01 2001 PST | @ 1463 days ago - Mon Dec 30 17:32:01 1996 PST | Sat Sep 22 18:19:20 2001 PDT | @ 1726 days 23 hours 47 mins 19 secs ago - Tue Dec 31 17:32:01 1996 PST | Thu Jan 01 00:00:00 1970 PST | @ 9861 days 17 hours 32 mins 1 sec - Tue Dec 31 17:32:01 1996 PST | Wed Feb 28 17:32:01 1996 PST | @ 307 days - Tue Dec 31 17:32:01 1996 PST | Thu Feb 29 17:32:01 1996 PST | @ 306 days - Tue Dec 31 17:32:01 1996 PST | Fri Mar 01 17:32:01 1996 PST | @ 305 days - Tue Dec 31 17:32:01 1996 PST | Mon Dec 30 17:32:01 1996 PST | @ 1 day - Tue Dec 31 17:32:01 1996 PST | Tue Dec 31 17:32:01 1996 PST | @ 0 - Tue Dec 31 17:32:01 1996 PST | Fri Dec 31 17:32:01 1999 PST | @ 1095 days ago - Tue Dec 31 17:32:01 1996 PST | Sat Jan 01 17:32:01 2000 PST | @ 1096 days ago - Tue Dec 31 17:32:01 1996 PST | Wed Mar 15 02:14:05 2000 PST | @ 1169 days 8 hours 42 mins 4 secs ago - Tue Dec 31 17:32:01 1996 PST | Wed Mar 15 03:14:04 2000 PST | @ 1169 days 9 hours 42 mins 3 secs ago - Tue Dec 31 17:32:01 1996 PST | Wed Mar 15 08:14:01 2000 PST | @ 1169 days 14 hours 42 mins ago - Tue Dec 31 17:32:01 1996 PST | Wed Mar 15 12:14:03 2000 PST | @ 1169 days 18 hours 42 mins 2 secs ago - Tue Dec 31 17:32:01 1996 PST | Wed Mar 15 13:14:02 2000 PST | @ 1169 days 19 hours 42 mins 1 sec ago - Tue Dec 31 17:32:01 1996 PST | Sun Dec 31 17:32:01 2000 PST | @ 1461 days ago - Tue Dec 31 17:32:01 1996 PST | Mon Jan 01 17:32:01 2001 PST | @ 1462 days ago - Tue Dec 31 17:32:01 1996 PST | Sat Sep 22 18:19:20 2001 PDT | @ 1725 days 23 hours 47 mins 19 secs ago - Fri Dec 31 17:32:01 1999 PST | Thu Jan 01 00:00:00 1970 PST | @ 10956 days 17 hours 32 mins 1 sec - Fri Dec 31 17:32:01 1999 PST | Wed Feb 28 17:32:01 1996 PST | @ 1402 days - Fri Dec 31 17:32:01 1999 PST | Thu Feb 29 17:32:01 1996 PST | @ 1401 days - Fri Dec 31 17:32:01 1999 PST | Fri Mar 01 17:32:01 1996 PST | @ 1400 days - Fri Dec 31 17:32:01 1999 PST | Mon Dec 30 17:32:01 1996 PST | @ 1096 days - Fri Dec 31 17:32:01 1999 PST | Tue Dec 31 17:32:01 1996 PST | @ 1095 days - Fri Dec 31 17:32:01 1999 PST | Fri Dec 31 17:32:01 1999 PST | @ 0 - Fri Dec 31 17:32:01 1999 PST | Sat Jan 01 17:32:01 2000 PST | @ 1 day ago - Fri Dec 31 17:32:01 1999 PST | Wed Mar 15 02:14:05 2000 PST | @ 74 days 8 hours 42 mins 4 secs ago - Fri Dec 31 17:32:01 1999 PST | Wed Mar 15 03:14:04 2000 PST | @ 74 days 9 hours 42 mins 3 secs ago - Fri Dec 31 17:32:01 1999 PST | Wed Mar 15 08:14:01 2000 PST | @ 74 days 14 hours 42 mins ago - Fri Dec 31 17:32:01 1999 PST | Wed Mar 15 12:14:03 2000 PST | @ 74 days 18 hours 42 mins 2 secs ago - Fri Dec 31 17:32:01 1999 PST | Wed Mar 15 13:14:02 2000 PST | @ 74 days 19 hours 42 mins 1 sec ago - Fri Dec 31 17:32:01 1999 PST | Sun Dec 31 17:32:01 2000 PST | @ 366 days ago - Fri Dec 31 17:32:01 1999 PST | Mon Jan 01 17:32:01 2001 PST | @ 367 days ago - Fri Dec 31 17:32:01 1999 PST | Sat Sep 22 18:19:20 2001 PDT | @ 630 days 23 hours 47 mins 19 secs ago - Sat Jan 01 17:32:01 2000 PST | Thu Jan 01 00:00:00 1970 PST | @ 10957 days 17 hours 32 mins 1 sec - Sat Jan 01 17:32:01 2000 PST | Wed Feb 28 17:32:01 1996 PST | @ 1403 days - Sat Jan 01 17:32:01 2000 PST | Thu Feb 29 17:32:01 1996 PST | @ 1402 days - Sat Jan 01 17:32:01 2000 PST | Fri Mar 01 17:32:01 1996 PST | @ 1401 days - Sat Jan 01 17:32:01 2000 PST | Mon Dec 30 17:32:01 1996 PST | @ 1097 days - Sat Jan 01 17:32:01 2000 PST | Tue Dec 31 17:32:01 1996 PST | @ 1096 days - Sat Jan 01 17:32:01 2000 PST | Fri Dec 31 17:32:01 1999 PST | @ 1 day - Sat Jan 01 17:32:01 2000 PST | Sat Jan 01 17:32:01 2000 PST | @ 0 - Sat Jan 01 17:32:01 2000 PST | Wed Mar 15 02:14:05 2000 PST | @ 73 days 8 hours 42 mins 4 secs ago - Sat Jan 01 17:32:01 2000 PST | Wed Mar 15 03:14:04 2000 PST | @ 73 days 9 hours 42 mins 3 secs ago - Sat Jan 01 17:32:01 2000 PST | Wed Mar 15 08:14:01 2000 PST | @ 73 days 14 hours 42 mins ago - Sat Jan 01 17:32:01 2000 PST | Wed Mar 15 12:14:03 2000 PST | @ 73 days 18 hours 42 mins 2 secs ago - Sat Jan 01 17:32:01 2000 PST | Wed Mar 15 13:14:02 2000 PST | @ 73 days 19 hours 42 mins 1 sec ago - Sat Jan 01 17:32:01 2000 PST | Sun Dec 31 17:32:01 2000 PST | @ 365 days ago - Sat Jan 01 17:32:01 2000 PST | Mon Jan 01 17:32:01 2001 PST | @ 366 days ago - Sat Jan 01 17:32:01 2000 PST | Sat Sep 22 18:19:20 2001 PDT | @ 629 days 23 hours 47 mins 19 secs ago - Wed Mar 15 02:14:05 2000 PST | Thu Jan 01 00:00:00 1970 PST | @ 11031 days 2 hours 14 mins 5 secs - Wed Mar 15 02:14:05 2000 PST | Wed Feb 28 17:32:01 1996 PST | @ 1476 days 8 hours 42 mins 4 secs - Wed Mar 15 02:14:05 2000 PST | Thu Feb 29 17:32:01 1996 PST | @ 1475 days 8 hours 42 mins 4 secs - Wed Mar 15 02:14:05 2000 PST | Fri Mar 01 17:32:01 1996 PST | @ 1474 days 8 hours 42 mins 4 secs - Wed Mar 15 02:14:05 2000 PST | Mon Dec 30 17:32:01 1996 PST | @ 1170 days 8 hours 42 mins 4 secs - Wed Mar 15 02:14:05 2000 PST | Tue Dec 31 17:32:01 1996 PST | @ 1169 days 8 hours 42 mins 4 secs - Wed Mar 15 02:14:05 2000 PST | Fri Dec 31 17:32:01 1999 PST | @ 74 days 8 hours 42 mins 4 secs - Wed Mar 15 02:14:05 2000 PST | Sat Jan 01 17:32:01 2000 PST | @ 73 days 8 hours 42 mins 4 secs - Wed Mar 15 02:14:05 2000 PST | Wed Mar 15 02:14:05 2000 PST | @ 0 - Wed Mar 15 02:14:05 2000 PST | Wed Mar 15 03:14:04 2000 PST | @ 59 mins 59 secs ago - Wed Mar 15 02:14:05 2000 PST | Wed Mar 15 08:14:01 2000 PST | @ 5 hours 59 mins 56 secs ago - Wed Mar 15 02:14:05 2000 PST | Wed Mar 15 12:14:03 2000 PST | @ 9 hours 59 mins 58 secs ago - Wed Mar 15 02:14:05 2000 PST | Wed Mar 15 13:14:02 2000 PST | @ 10 hours 59 mins 57 secs ago - Wed Mar 15 02:14:05 2000 PST | Sun Dec 31 17:32:01 2000 PST | @ 291 days 15 hours 17 mins 56 secs ago - Wed Mar 15 02:14:05 2000 PST | Mon Jan 01 17:32:01 2001 PST | @ 292 days 15 hours 17 mins 56 secs ago - Wed Mar 15 02:14:05 2000 PST | Sat Sep 22 18:19:20 2001 PDT | @ 556 days 15 hours 5 mins 15 secs ago - Wed Mar 15 03:14:04 2000 PST | Thu Jan 01 00:00:00 1970 PST | @ 11031 days 3 hours 14 mins 4 secs - Wed Mar 15 03:14:04 2000 PST | Wed Feb 28 17:32:01 1996 PST | @ 1476 days 9 hours 42 mins 3 secs - Wed Mar 15 03:14:04 2000 PST | Thu Feb 29 17:32:01 1996 PST | @ 1475 days 9 hours 42 mins 3 secs - Wed Mar 15 03:14:04 2000 PST | Fri Mar 01 17:32:01 1996 PST | @ 1474 days 9 hours 42 mins 3 secs - Wed Mar 15 03:14:04 2000 PST | Mon Dec 30 17:32:01 1996 PST | @ 1170 days 9 hours 42 mins 3 secs - Wed Mar 15 03:14:04 2000 PST | Tue Dec 31 17:32:01 1996 PST | @ 1169 days 9 hours 42 mins 3 secs - Wed Mar 15 03:14:04 2000 PST | Fri Dec 31 17:32:01 1999 PST | @ 74 days 9 hours 42 mins 3 secs - Wed Mar 15 03:14:04 2000 PST | Sat Jan 01 17:32:01 2000 PST | @ 73 days 9 hours 42 mins 3 secs - Wed Mar 15 03:14:04 2000 PST | Wed Mar 15 02:14:05 2000 PST | @ 59 mins 59 secs - Wed Mar 15 03:14:04 2000 PST | Wed Mar 15 03:14:04 2000 PST | @ 0 - Wed Mar 15 03:14:04 2000 PST | Wed Mar 15 08:14:01 2000 PST | @ 4 hours 59 mins 57 secs ago - Wed Mar 15 03:14:04 2000 PST | Wed Mar 15 12:14:03 2000 PST | @ 8 hours 59 mins 59 secs ago - Wed Mar 15 03:14:04 2000 PST | Wed Mar 15 13:14:02 2000 PST | @ 9 hours 59 mins 58 secs ago - Wed Mar 15 03:14:04 2000 PST | Sun Dec 31 17:32:01 2000 PST | @ 291 days 14 hours 17 mins 57 secs ago - Wed Mar 15 03:14:04 2000 PST | Mon Jan 01 17:32:01 2001 PST | @ 292 days 14 hours 17 mins 57 secs ago - Wed Mar 15 03:14:04 2000 PST | Sat Sep 22 18:19:20 2001 PDT | @ 556 days 14 hours 5 mins 16 secs ago - Wed Mar 15 08:14:01 2000 PST | Thu Jan 01 00:00:00 1970 PST | @ 11031 days 8 hours 14 mins 1 sec - Wed Mar 15 08:14:01 2000 PST | Wed Feb 28 17:32:01 1996 PST | @ 1476 days 14 hours 42 mins - Wed Mar 15 08:14:01 2000 PST | Thu Feb 29 17:32:01 1996 PST | @ 1475 days 14 hours 42 mins - Wed Mar 15 08:14:01 2000 PST | Fri Mar 01 17:32:01 1996 PST | @ 1474 days 14 hours 42 mins - Wed Mar 15 08:14:01 2000 PST | Mon Dec 30 17:32:01 1996 PST | @ 1170 days 14 hours 42 mins - Wed Mar 15 08:14:01 2000 PST | Tue Dec 31 17:32:01 1996 PST | @ 1169 days 14 hours 42 mins - Wed Mar 15 08:14:01 2000 PST | Fri Dec 31 17:32:01 1999 PST | @ 74 days 14 hours 42 mins - Wed Mar 15 08:14:01 2000 PST | Sat Jan 01 17:32:01 2000 PST | @ 73 days 14 hours 42 mins - Wed Mar 15 08:14:01 2000 PST | Wed Mar 15 02:14:05 2000 PST | @ 5 hours 59 mins 56 secs - Wed Mar 15 08:14:01 2000 PST | Wed Mar 15 03:14:04 2000 PST | @ 4 hours 59 mins 57 secs - Wed Mar 15 08:14:01 2000 PST | Wed Mar 15 08:14:01 2000 PST | @ 0 - Wed Mar 15 08:14:01 2000 PST | Wed Mar 15 12:14:03 2000 PST | @ 4 hours 2 secs ago - Wed Mar 15 08:14:01 2000 PST | Wed Mar 15 13:14:02 2000 PST | @ 5 hours 1 sec ago - Wed Mar 15 08:14:01 2000 PST | Sun Dec 31 17:32:01 2000 PST | @ 291 days 9 hours 18 mins ago - Wed Mar 15 08:14:01 2000 PST | Mon Jan 01 17:32:01 2001 PST | @ 292 days 9 hours 18 mins ago - Wed Mar 15 08:14:01 2000 PST | Sat Sep 22 18:19:20 2001 PDT | @ 556 days 9 hours 5 mins 19 secs ago - Wed Mar 15 12:14:03 2000 PST | Thu Jan 01 00:00:00 1970 PST | @ 11031 days 12 hours 14 mins 3 secs - Wed Mar 15 12:14:03 2000 PST | Wed Feb 28 17:32:01 1996 PST | @ 1476 days 18 hours 42 mins 2 secs - Wed Mar 15 12:14:03 2000 PST | Thu Feb 29 17:32:01 1996 PST | @ 1475 days 18 hours 42 mins 2 secs - Wed Mar 15 12:14:03 2000 PST | Fri Mar 01 17:32:01 1996 PST | @ 1474 days 18 hours 42 mins 2 secs - Wed Mar 15 12:14:03 2000 PST | Mon Dec 30 17:32:01 1996 PST | @ 1170 days 18 hours 42 mins 2 secs - Wed Mar 15 12:14:03 2000 PST | Tue Dec 31 17:32:01 1996 PST | @ 1169 days 18 hours 42 mins 2 secs - Wed Mar 15 12:14:03 2000 PST | Fri Dec 31 17:32:01 1999 PST | @ 74 days 18 hours 42 mins 2 secs - Wed Mar 15 12:14:03 2000 PST | Sat Jan 01 17:32:01 2000 PST | @ 73 days 18 hours 42 mins 2 secs - Wed Mar 15 12:14:03 2000 PST | Wed Mar 15 02:14:05 2000 PST | @ 9 hours 59 mins 58 secs - Wed Mar 15 12:14:03 2000 PST | Wed Mar 15 03:14:04 2000 PST | @ 8 hours 59 mins 59 secs - Wed Mar 15 12:14:03 2000 PST | Wed Mar 15 08:14:01 2000 PST | @ 4 hours 2 secs - Wed Mar 15 12:14:03 2000 PST | Wed Mar 15 12:14:03 2000 PST | @ 0 - Wed Mar 15 12:14:03 2000 PST | Wed Mar 15 13:14:02 2000 PST | @ 59 mins 59 secs ago - Wed Mar 15 12:14:03 2000 PST | Sun Dec 31 17:32:01 2000 PST | @ 291 days 5 hours 17 mins 58 secs ago - Wed Mar 15 12:14:03 2000 PST | Mon Jan 01 17:32:01 2001 PST | @ 292 days 5 hours 17 mins 58 secs ago - Wed Mar 15 12:14:03 2000 PST | Sat Sep 22 18:19:20 2001 PDT | @ 556 days 5 hours 5 mins 17 secs ago - Wed Mar 15 13:14:02 2000 PST | Thu Jan 01 00:00:00 1970 PST | @ 11031 days 13 hours 14 mins 2 secs - Wed Mar 15 13:14:02 2000 PST | Wed Feb 28 17:32:01 1996 PST | @ 1476 days 19 hours 42 mins 1 sec - Wed Mar 15 13:14:02 2000 PST | Thu Feb 29 17:32:01 1996 PST | @ 1475 days 19 hours 42 mins 1 sec - Wed Mar 15 13:14:02 2000 PST | Fri Mar 01 17:32:01 1996 PST | @ 1474 days 19 hours 42 mins 1 sec - Wed Mar 15 13:14:02 2000 PST | Mon Dec 30 17:32:01 1996 PST | @ 1170 days 19 hours 42 mins 1 sec - Wed Mar 15 13:14:02 2000 PST | Tue Dec 31 17:32:01 1996 PST | @ 1169 days 19 hours 42 mins 1 sec - Wed Mar 15 13:14:02 2000 PST | Fri Dec 31 17:32:01 1999 PST | @ 74 days 19 hours 42 mins 1 sec - Wed Mar 15 13:14:02 2000 PST | Sat Jan 01 17:32:01 2000 PST | @ 73 days 19 hours 42 mins 1 sec - Wed Mar 15 13:14:02 2000 PST | Wed Mar 15 02:14:05 2000 PST | @ 10 hours 59 mins 57 secs - Wed Mar 15 13:14:02 2000 PST | Wed Mar 15 03:14:04 2000 PST | @ 9 hours 59 mins 58 secs - Wed Mar 15 13:14:02 2000 PST | Wed Mar 15 08:14:01 2000 PST | @ 5 hours 1 sec - Wed Mar 15 13:14:02 2000 PST | Wed Mar 15 12:14:03 2000 PST | @ 59 mins 59 secs - Wed Mar 15 13:14:02 2000 PST | Wed Mar 15 13:14:02 2000 PST | @ 0 - Wed Mar 15 13:14:02 2000 PST | Sun Dec 31 17:32:01 2000 PST | @ 291 days 4 hours 17 mins 59 secs ago - Wed Mar 15 13:14:02 2000 PST | Mon Jan 01 17:32:01 2001 PST | @ 292 days 4 hours 17 mins 59 secs ago - Wed Mar 15 13:14:02 2000 PST | Sat Sep 22 18:19:20 2001 PDT | @ 556 days 4 hours 5 mins 18 secs ago - Sun Dec 31 17:32:01 2000 PST | Thu Jan 01 00:00:00 1970 PST | @ 11322 days 17 hours 32 mins 1 sec - Sun Dec 31 17:32:01 2000 PST | Wed Feb 28 17:32:01 1996 PST | @ 1768 days - Sun Dec 31 17:32:01 2000 PST | Thu Feb 29 17:32:01 1996 PST | @ 1767 days - Sun Dec 31 17:32:01 2000 PST | Fri Mar 01 17:32:01 1996 PST | @ 1766 days - Sun Dec 31 17:32:01 2000 PST | Mon Dec 30 17:32:01 1996 PST | @ 1462 days - Sun Dec 31 17:32:01 2000 PST | Tue Dec 31 17:32:01 1996 PST | @ 1461 days - Sun Dec 31 17:32:01 2000 PST | Fri Dec 31 17:32:01 1999 PST | @ 366 days - Sun Dec 31 17:32:01 2000 PST | Sat Jan 01 17:32:01 2000 PST | @ 365 days - Sun Dec 31 17:32:01 2000 PST | Wed Mar 15 02:14:05 2000 PST | @ 291 days 15 hours 17 mins 56 secs - Sun Dec 31 17:32:01 2000 PST | Wed Mar 15 03:14:04 2000 PST | @ 291 days 14 hours 17 mins 57 secs - Sun Dec 31 17:32:01 2000 PST | Wed Mar 15 08:14:01 2000 PST | @ 291 days 9 hours 18 mins - Sun Dec 31 17:32:01 2000 PST | Wed Mar 15 12:14:03 2000 PST | @ 291 days 5 hours 17 mins 58 secs - Sun Dec 31 17:32:01 2000 PST | Wed Mar 15 13:14:02 2000 PST | @ 291 days 4 hours 17 mins 59 secs - Sun Dec 31 17:32:01 2000 PST | Sun Dec 31 17:32:01 2000 PST | @ 0 - Sun Dec 31 17:32:01 2000 PST | Mon Jan 01 17:32:01 2001 PST | @ 1 day ago - Sun Dec 31 17:32:01 2000 PST | Sat Sep 22 18:19:20 2001 PDT | @ 264 days 23 hours 47 mins 19 secs ago - Mon Jan 01 17:32:01 2001 PST | Thu Jan 01 00:00:00 1970 PST | @ 11323 days 17 hours 32 mins 1 sec - Mon Jan 01 17:32:01 2001 PST | Wed Feb 28 17:32:01 1996 PST | @ 1769 days - Mon Jan 01 17:32:01 2001 PST | Thu Feb 29 17:32:01 1996 PST | @ 1768 days - Mon Jan 01 17:32:01 2001 PST | Fri Mar 01 17:32:01 1996 PST | @ 1767 days - Mon Jan 01 17:32:01 2001 PST | Mon Dec 30 17:32:01 1996 PST | @ 1463 days - Mon Jan 01 17:32:01 2001 PST | Tue Dec 31 17:32:01 1996 PST | @ 1462 days - Mon Jan 01 17:32:01 2001 PST | Fri Dec 31 17:32:01 1999 PST | @ 367 days - Mon Jan 01 17:32:01 2001 PST | Sat Jan 01 17:32:01 2000 PST | @ 366 days - Mon Jan 01 17:32:01 2001 PST | Wed Mar 15 02:14:05 2000 PST | @ 292 days 15 hours 17 mins 56 secs - Mon Jan 01 17:32:01 2001 PST | Wed Mar 15 03:14:04 2000 PST | @ 292 days 14 hours 17 mins 57 secs - Mon Jan 01 17:32:01 2001 PST | Wed Mar 15 08:14:01 2000 PST | @ 292 days 9 hours 18 mins - Mon Jan 01 17:32:01 2001 PST | Wed Mar 15 12:14:03 2000 PST | @ 292 days 5 hours 17 mins 58 secs - Mon Jan 01 17:32:01 2001 PST | Wed Mar 15 13:14:02 2000 PST | @ 292 days 4 hours 17 mins 59 secs - Mon Jan 01 17:32:01 2001 PST | Sun Dec 31 17:32:01 2000 PST | @ 1 day - Mon Jan 01 17:32:01 2001 PST | Mon Jan 01 17:32:01 2001 PST | @ 0 - Mon Jan 01 17:32:01 2001 PST | Sat Sep 22 18:19:20 2001 PDT | @ 263 days 23 hours 47 mins 19 secs ago - Sat Sep 22 18:19:20 2001 PDT | Thu Jan 01 00:00:00 1970 PST | @ 11587 days 17 hours 19 mins 20 secs - Sat Sep 22 18:19:20 2001 PDT | Wed Feb 28 17:32:01 1996 PST | @ 2032 days 23 hours 47 mins 19 secs - Sat Sep 22 18:19:20 2001 PDT | Thu Feb 29 17:32:01 1996 PST | @ 2031 days 23 hours 47 mins 19 secs - Sat Sep 22 18:19:20 2001 PDT | Fri Mar 01 17:32:01 1996 PST | @ 2030 days 23 hours 47 mins 19 secs - Sat Sep 22 18:19:20 2001 PDT | Mon Dec 30 17:32:01 1996 PST | @ 1726 days 23 hours 47 mins 19 secs - Sat Sep 22 18:19:20 2001 PDT | Tue Dec 31 17:32:01 1996 PST | @ 1725 days 23 hours 47 mins 19 secs - Sat Sep 22 18:19:20 2001 PDT | Fri Dec 31 17:32:01 1999 PST | @ 630 days 23 hours 47 mins 19 secs - Sat Sep 22 18:19:20 2001 PDT | Sat Jan 01 17:32:01 2000 PST | @ 629 days 23 hours 47 mins 19 secs - Sat Sep 22 18:19:20 2001 PDT | Wed Mar 15 02:14:05 2000 PST | @ 556 days 15 hours 5 mins 15 secs - Sat Sep 22 18:19:20 2001 PDT | Wed Mar 15 03:14:04 2000 PST | @ 556 days 14 hours 5 mins 16 secs - Sat Sep 22 18:19:20 2001 PDT | Wed Mar 15 08:14:01 2000 PST | @ 556 days 9 hours 5 mins 19 secs - Sat Sep 22 18:19:20 2001 PDT | Wed Mar 15 12:14:03 2000 PST | @ 556 days 5 hours 5 mins 17 secs - Sat Sep 22 18:19:20 2001 PDT | Wed Mar 15 13:14:02 2000 PST | @ 556 days 4 hours 5 mins 18 secs - Sat Sep 22 18:19:20 2001 PDT | Sun Dec 31 17:32:01 2000 PST | @ 264 days 23 hours 47 mins 19 secs - Sat Sep 22 18:19:20 2001 PDT | Mon Jan 01 17:32:01 2001 PST | @ 263 days 23 hours 47 mins 19 secs - Sat Sep 22 18:19:20 2001 PDT | Sat Sep 22 18:19:20 2001 PDT | @ 0 -(256 rows) + timestamp1 | timestamp2 | difference +------------+------------+------------ +(0 rows) -- -- Conversions @@ -2060,25 +860,9 @@ FROM TEMP_TIMESTAMP WHERE f1 <> timestamp 'now' ORDER BY date, "timestamp"; - timestamp | date -------------------------------+------------ - Thu Jan 01 00:00:00 1970 PST | 01-01-1970 - Wed Feb 28 17:32:01 1996 PST | 02-28-1996 - Thu Feb 29 17:32:01 1996 PST | 02-29-1996 - Fri Mar 01 17:32:01 1996 PST | 03-01-1996 - Mon Dec 30 17:32:01 1996 PST | 12-30-1996 - Tue Dec 31 17:32:01 1996 PST | 12-31-1996 - Fri Dec 31 17:32:01 1999 PST | 12-31-1999 - Sat Jan 01 17:32:01 2000 PST | 01-01-2000 - Wed Mar 15 02:14:05 2000 PST | 03-15-2000 - Wed Mar 15 03:14:04 2000 PST | 03-15-2000 - Wed Mar 15 08:14:01 2000 PST | 03-15-2000 - Wed Mar 15 12:14:03 2000 PST | 03-15-2000 - Wed Mar 15 13:14:02 2000 PST | 03-15-2000 - Sun Dec 31 17:32:01 2000 PST | 12-31-2000 - Mon Jan 01 17:32:01 2001 PST | 01-01-2001 - Sat Sep 22 18:19:20 2001 PDT | 09-22-2001 -(16 rows) + timestamp | date +-----------+------ +(0 rows) DROP TABLE TEMP_TIMESTAMP; -- @@ -2158,146 +942,14 @@ (1 row) SELECT d1 AS us_postgres FROM TIMESTAMP_TBL; - us_postgres ------------------------------ - -infinity - infinity - Thu Jan 01 00:00:00 1970 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:02 1997 - Mon Feb 10 17:32:01.4 1997 - Mon Feb 10 17:32:01.5 1997 - Mon Feb 10 17:32:01.6 1997 - Thu Jan 02 00:00:00 1997 - Thu Jan 02 03:04:05 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Tue Jun 10 17:32:01 1997 - Sat Sep 22 18:19:20 2001 - Wed Mar 15 08:14:01 2000 - Wed Mar 15 13:14:02 2000 - Wed Mar 15 12:14:03 2000 - Wed Mar 15 03:14:04 2000 - Wed Mar 15 02:14:05 2000 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:00 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Mon Feb 10 17:32:01 1997 - Tue Jun 10 18:32:01 1997 - Mon Feb 10 17:32:01 1997 - Tue Feb 11 17:32:01 1997 - Wed Feb 12 17:32:01 1997 - Thu Feb 13 17:32:01 1997 - Fri Feb 14 17:32:01 1997 - Sat Feb 15 17:32:01 1997 - Sun Feb 16 17:32:01 1997 - Tue Feb 16 17:32:01 0097 BC - Sat Feb 16 17:32:01 0097 - Thu Feb 16 17:32:01 0597 - Tue Feb 16 17:32:01 1097 - Sat Feb 16 17:32:01 1697 - Thu Feb 16 17:32:01 1797 - Tue Feb 16 17:32:01 1897 - Sun Feb 16 17:32:01 1997 - Sat Feb 16 17:32:01 2097 - Wed Feb 28 17:32:01 1996 - Thu Feb 29 17:32:01 1996 - Fri Mar 01 17:32:01 1996 - Mon Dec 30 17:32:01 1996 - Tue Dec 31 17:32:01 1996 - Wed Jan 01 17:32:01 1997 - Fri Feb 28 17:32:01 1997 - Sat Mar 01 17:32:01 1997 - Tue Dec 30 17:32:01 1997 - Wed Dec 31 17:32:01 1997 - Fri Dec 31 17:32:01 1999 - Sat Jan 01 17:32:01 2000 - Sun Dec 31 17:32:01 2000 - Mon Jan 01 17:32:01 2001 -(65 rows) - +ERROR: relation "timestamp_tbl" does not exist +LINE 1: SELECT d1 AS us_postgres FROM TIMESTAMP_TBL; + ^ SET DateStyle TO 'US,ISO'; SELECT d1 AS us_iso FROM TIMESTAMP_TBL; - us_iso ------------------------- - -infinity - infinity - 1970-01-01 00:00:00 - 1997-02-10 17:32:01 - 1997-02-10 17:32:01 - 1997-02-10 17:32:02 - 1997-02-10 17:32:01.4 - 1997-02-10 17:32:01.5 - 1997-02-10 17:32:01.6 - 1997-01-02 00:00:00 - 1997-01-02 03:04:05 - 1997-02-10 17:32:01 - 1997-02-10 17:32:01 - 1997-02-10 17:32:01 - 1997-02-10 17:32:01 - 1997-06-10 17:32:01 - 2001-09-22 18:19:20 - 2000-03-15 08:14:01 - 2000-03-15 13:14:02 - 2000-03-15 12:14:03 - 2000-03-15 03:14:04 - 2000-03-15 02:14:05 - 1997-02-10 17:32:01 - 1997-02-10 17:32:01 - 1997-02-10 17:32:00 - 1997-02-10 17:32:01 - 1997-02-10 17:32:01 - 1997-02-10 17:32:01 - 1997-02-10 17:32:01 - 1997-02-10 17:32:01 - 1997-02-10 17:32:01 - 1997-02-10 17:32:01 - 1997-02-10 17:32:01 - 1997-02-10 17:32:01 - 1997-06-10 18:32:01 - 1997-02-10 17:32:01 - 1997-02-11 17:32:01 - 1997-02-12 17:32:01 - 1997-02-13 17:32:01 - 1997-02-14 17:32:01 - 1997-02-15 17:32:01 - 1997-02-16 17:32:01 - 0097-02-16 17:32:01 BC - 0097-02-16 17:32:01 - 0597-02-16 17:32:01 - 1097-02-16 17:32:01 - 1697-02-16 17:32:01 - 1797-02-16 17:32:01 - 1897-02-16 17:32:01 - 1997-02-16 17:32:01 - 2097-02-16 17:32:01 - 1996-02-28 17:32:01 - 1996-02-29 17:32:01 - 1996-03-01 17:32:01 - 1996-12-30 17:32:01 - 1996-12-31 17:32:01 - 1997-01-01 17:32:01 - 1997-02-28 17:32:01 - 1997-03-01 17:32:01 - 1997-12-30 17:32:01 - 1997-12-31 17:32:01 - 1999-12-31 17:32:01 - 2000-01-01 17:32:01 - 2000-12-31 17:32:01 - 2001-01-01 17:32:01 -(65 rows) - +ERROR: relation "timestamp_tbl" does not exist +LINE 1: SELECT d1 AS us_iso FROM TIMESTAMP_TBL; + ^ SET DateStyle TO 'US,SQL'; SHOW DateStyle; DateStyle @@ -2306,75 +958,9 @@ (1 row) SELECT d1 AS us_sql FROM TIMESTAMP_TBL; - us_sql ------------------------- - -infinity - infinity - 01/01/1970 00:00:00 - 02/10/1997 17:32:01 - 02/10/1997 17:32:01 - 02/10/1997 17:32:02 - 02/10/1997 17:32:01.4 - 02/10/1997 17:32:01.5 - 02/10/1997 17:32:01.6 - 01/02/1997 00:00:00 - 01/02/1997 03:04:05 - 02/10/1997 17:32:01 - 02/10/1997 17:32:01 - 02/10/1997 17:32:01 - 02/10/1997 17:32:01 - 06/10/1997 17:32:01 - 09/22/2001 18:19:20 - 03/15/2000 08:14:01 - 03/15/2000 13:14:02 - 03/15/2000 12:14:03 - 03/15/2000 03:14:04 - 03/15/2000 02:14:05 - 02/10/1997 17:32:01 - 02/10/1997 17:32:01 - 02/10/1997 17:32:00 - 02/10/1997 17:32:01 - 02/10/1997 17:32:01 - 02/10/1997 17:32:01 - 02/10/1997 17:32:01 - 02/10/1997 17:32:01 - 02/10/1997 17:32:01 - 02/10/1997 17:32:01 - 02/10/1997 17:32:01 - 02/10/1997 17:32:01 - 06/10/1997 18:32:01 - 02/10/1997 17:32:01 - 02/11/1997 17:32:01 - 02/12/1997 17:32:01 - 02/13/1997 17:32:01 - 02/14/1997 17:32:01 - 02/15/1997 17:32:01 - 02/16/1997 17:32:01 - 02/16/0097 17:32:01 BC - 02/16/0097 17:32:01 - 02/16/0597 17:32:01 - 02/16/1097 17:32:01 - 02/16/1697 17:32:01 - 02/16/1797 17:32:01 - 02/16/1897 17:32:01 - 02/16/1997 17:32:01 - 02/16/2097 17:32:01 - 02/28/1996 17:32:01 - 02/29/1996 17:32:01 - 03/01/1996 17:32:01 - 12/30/1996 17:32:01 - 12/31/1996 17:32:01 - 01/01/1997 17:32:01 - 02/28/1997 17:32:01 - 03/01/1997 17:32:01 - 12/30/1997 17:32:01 - 12/31/1997 17:32:01 - 12/31/1999 17:32:01 - 01/01/2000 17:32:01 - 12/31/2000 17:32:01 - 01/01/2001 17:32:01 -(65 rows) - +ERROR: relation "timestamp_tbl" does not exist +LINE 1: SELECT d1 AS us_sql FROM TIMESTAMP_TBL; + ^ SET DateStyle TO 'European,Postgres'; SHOW DateStyle; DateStyle @@ -2383,83 +969,17 @@ (1 row) INSERT INTO TIMESTAMP_TBL VALUES('13/06/1957'); +ERROR: relation "timestamp_tbl" does not exist +LINE 1: INSERT INTO TIMESTAMP_TBL VALUES('13/06/1957'); + ^ SELECT count(*) as one FROM TIMESTAMP_TBL WHERE d1 = 'Jun 13 1957'; - one ------ - 1 -(1 row) - +ERROR: relation "timestamp_tbl" does not exist +LINE 1: SELECT count(*) as one FROM TIMESTAMP_TBL WHERE d1 = 'Jun 13... + ^ SELECT d1 AS european_postgres FROM TIMESTAMP_TBL; - european_postgres ------------------------------ - -infinity - infinity - Thu 01 Jan 00:00:00 1970 - Mon 10 Feb 17:32:01 1997 - Mon 10 Feb 17:32:01 1997 - Mon 10 Feb 17:32:02 1997 - Mon 10 Feb 17:32:01.4 1997 - Mon 10 Feb 17:32:01.5 1997 - Mon 10 Feb 17:32:01.6 1997 - Thu 02 Jan 00:00:00 1997 - Thu 02 Jan 03:04:05 1997 - Mon 10 Feb 17:32:01 1997 - Mon 10 Feb 17:32:01 1997 - Mon 10 Feb 17:32:01 1997 - Mon 10 Feb 17:32:01 1997 - Tue 10 Jun 17:32:01 1997 - Sat 22 Sep 18:19:20 2001 - Wed 15 Mar 08:14:01 2000 - Wed 15 Mar 13:14:02 2000 - Wed 15 Mar 12:14:03 2000 - Wed 15 Mar 03:14:04 2000 - Wed 15 Mar 02:14:05 2000 - Mon 10 Feb 17:32:01 1997 - Mon 10 Feb 17:32:01 1997 - Mon 10 Feb 17:32:00 1997 - Mon 10 Feb 17:32:01 1997 - Mon 10 Feb 17:32:01 1997 - Mon 10 Feb 17:32:01 1997 - Mon 10 Feb 17:32:01 1997 - Mon 10 Feb 17:32:01 1997 - Mon 10 Feb 17:32:01 1997 - Mon 10 Feb 17:32:01 1997 - Mon 10 Feb 17:32:01 1997 - Mon 10 Feb 17:32:01 1997 - Tue 10 Jun 18:32:01 1997 - Mon 10 Feb 17:32:01 1997 - Tue 11 Feb 17:32:01 1997 - Wed 12 Feb 17:32:01 1997 - Thu 13 Feb 17:32:01 1997 - Fri 14 Feb 17:32:01 1997 - Sat 15 Feb 17:32:01 1997 - Sun 16 Feb 17:32:01 1997 - Tue 16 Feb 17:32:01 0097 BC - Sat 16 Feb 17:32:01 0097 - Thu 16 Feb 17:32:01 0597 - Tue 16 Feb 17:32:01 1097 - Sat 16 Feb 17:32:01 1697 - Thu 16 Feb 17:32:01 1797 - Tue 16 Feb 17:32:01 1897 - Sun 16 Feb 17:32:01 1997 - Sat 16 Feb 17:32:01 2097 - Wed 28 Feb 17:32:01 1996 - Thu 29 Feb 17:32:01 1996 - Fri 01 Mar 17:32:01 1996 - Mon 30 Dec 17:32:01 1996 - Tue 31 Dec 17:32:01 1996 - Wed 01 Jan 17:32:01 1997 - Fri 28 Feb 17:32:01 1997 - Sat 01 Mar 17:32:01 1997 - Tue 30 Dec 17:32:01 1997 - Wed 31 Dec 17:32:01 1997 - Fri 31 Dec 17:32:01 1999 - Sat 01 Jan 17:32:01 2000 - Sun 31 Dec 17:32:01 2000 - Mon 01 Jan 17:32:01 2001 - Thu 13 Jun 00:00:00 1957 -(66 rows) - +ERROR: relation "timestamp_tbl" does not exist +LINE 1: SELECT d1 AS european_postgres FROM TIMESTAMP_TBL; + ^ SET DateStyle TO 'European,ISO'; SHOW DateStyle; DateStyle @@ -2468,76 +988,9 @@ (1 row) SELECT d1 AS european_iso FROM TIMESTAMP_TBL; - european_iso ------------------------- - -infinity - infinity - 1970-01-01 00:00:00 - 1997-02-10 17:32:01 - 1997-02-10 17:32:01 - 1997-02-10 17:32:02 - 1997-02-10 17:32:01.4 - 1997-02-10 17:32:01.5 - 1997-02-10 17:32:01.6 - 1997-01-02 00:00:00 - 1997-01-02 03:04:05 - 1997-02-10 17:32:01 - 1997-02-10 17:32:01 - 1997-02-10 17:32:01 - 1997-02-10 17:32:01 - 1997-06-10 17:32:01 - 2001-09-22 18:19:20 - 2000-03-15 08:14:01 - 2000-03-15 13:14:02 - 2000-03-15 12:14:03 - 2000-03-15 03:14:04 - 2000-03-15 02:14:05 - 1997-02-10 17:32:01 - 1997-02-10 17:32:01 - 1997-02-10 17:32:00 - 1997-02-10 17:32:01 - 1997-02-10 17:32:01 - 1997-02-10 17:32:01 - 1997-02-10 17:32:01 - 1997-02-10 17:32:01 - 1997-02-10 17:32:01 - 1997-02-10 17:32:01 - 1997-02-10 17:32:01 - 1997-02-10 17:32:01 - 1997-06-10 18:32:01 - 1997-02-10 17:32:01 - 1997-02-11 17:32:01 - 1997-02-12 17:32:01 - 1997-02-13 17:32:01 - 1997-02-14 17:32:01 - 1997-02-15 17:32:01 - 1997-02-16 17:32:01 - 0097-02-16 17:32:01 BC - 0097-02-16 17:32:01 - 0597-02-16 17:32:01 - 1097-02-16 17:32:01 - 1697-02-16 17:32:01 - 1797-02-16 17:32:01 - 1897-02-16 17:32:01 - 1997-02-16 17:32:01 - 2097-02-16 17:32:01 - 1996-02-28 17:32:01 - 1996-02-29 17:32:01 - 1996-03-01 17:32:01 - 1996-12-30 17:32:01 - 1996-12-31 17:32:01 - 1997-01-01 17:32:01 - 1997-02-28 17:32:01 - 1997-03-01 17:32:01 - 1997-12-30 17:32:01 - 1997-12-31 17:32:01 - 1999-12-31 17:32:01 - 2000-01-01 17:32:01 - 2000-12-31 17:32:01 - 2001-01-01 17:32:01 - 1957-06-13 00:00:00 -(66 rows) - +ERROR: relation "timestamp_tbl" does not exist +LINE 1: SELECT d1 AS european_iso FROM TIMESTAMP_TBL; + ^ SET DateStyle TO 'European,SQL'; SHOW DateStyle; DateStyle @@ -2546,76 +999,9 @@ (1 row) SELECT d1 AS european_sql FROM TIMESTAMP_TBL; - european_sql ------------------------- - -infinity - infinity - 01/01/1970 00:00:00 - 10/02/1997 17:32:01 - 10/02/1997 17:32:01 - 10/02/1997 17:32:02 - 10/02/1997 17:32:01.4 - 10/02/1997 17:32:01.5 - 10/02/1997 17:32:01.6 - 02/01/1997 00:00:00 - 02/01/1997 03:04:05 - 10/02/1997 17:32:01 - 10/02/1997 17:32:01 - 10/02/1997 17:32:01 - 10/02/1997 17:32:01 - 10/06/1997 17:32:01 - 22/09/2001 18:19:20 - 15/03/2000 08:14:01 - 15/03/2000 13:14:02 - 15/03/2000 12:14:03 - 15/03/2000 03:14:04 - 15/03/2000 02:14:05 - 10/02/1997 17:32:01 - 10/02/1997 17:32:01 - 10/02/1997 17:32:00 - 10/02/1997 17:32:01 - 10/02/1997 17:32:01 - 10/02/1997 17:32:01 - 10/02/1997 17:32:01 - 10/02/1997 17:32:01 - 10/02/1997 17:32:01 - 10/02/1997 17:32:01 - 10/02/1997 17:32:01 - 10/02/1997 17:32:01 - 10/06/1997 18:32:01 - 10/02/1997 17:32:01 - 11/02/1997 17:32:01 - 12/02/1997 17:32:01 - 13/02/1997 17:32:01 - 14/02/1997 17:32:01 - 15/02/1997 17:32:01 - 16/02/1997 17:32:01 - 16/02/0097 17:32:01 BC - 16/02/0097 17:32:01 - 16/02/0597 17:32:01 - 16/02/1097 17:32:01 - 16/02/1697 17:32:01 - 16/02/1797 17:32:01 - 16/02/1897 17:32:01 - 16/02/1997 17:32:01 - 16/02/2097 17:32:01 - 28/02/1996 17:32:01 - 29/02/1996 17:32:01 - 01/03/1996 17:32:01 - 30/12/1996 17:32:01 - 31/12/1996 17:32:01 - 01/01/1997 17:32:01 - 28/02/1997 17:32:01 - 01/03/1997 17:32:01 - 30/12/1997 17:32:01 - 31/12/1997 17:32:01 - 31/12/1999 17:32:01 - 01/01/2000 17:32:01 - 31/12/2000 17:32:01 - 01/01/2001 17:32:01 - 13/06/1957 00:00:00 -(66 rows) - +ERROR: relation "timestamp_tbl" does not exist +LINE 1: SELECT d1 AS european_sql FROM TIMESTAMP_TBL; + ^ RESET DateStyle; -- -- to_timestamp() diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/opr_sanity.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/opr_sanity.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/opr_sanity.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/opr_sanity.out 2023-02-20 19:44:34.089207943 -0500 @@ -943,10 +943,10 @@ OR (c.castsource = 'character'::regtype AND p.proargtypes[0] = 'text'::regtype)) OR NOT binary_coercible(p.prorettype, c.casttarget)); - oid | castsource | casttarget | castfunc | castcontext | castmethod ------+------------+------------+----------+-------------+------------ -(0 rows) - +ERROR: function binary_coercible(oid, oid) does not exist +LINE 5: OR NOT (binary_coercible(c.castsource, p.proargtypes[0]... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. SELECT c.* FROM pg_cast c, pg_proc p WHERE c.castfunc = p.oid AND @@ -1239,10 +1239,10 @@ OR NOT binary_coercible(p2.prorettype, p1.oprresult) OR NOT binary_coercible(p1.oprleft, p2.proargtypes[0]) OR NOT binary_coercible(p1.oprright, p2.proargtypes[1])); - oid | oprname | oid | proname ------+---------+-----+--------- -(0 rows) - +ERROR: function binary_coercible(oid, oid) does not exist +LINE 6: OR NOT binary_coercible(p2.prorettype, p1.oprresult) + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. SELECT p1.oid, p1.oprname, p2.oid, p2.proname FROM pg_operator AS p1, pg_proc AS p2 WHERE p1.oprcode = p2.oid AND @@ -1251,10 +1251,10 @@ OR NOT binary_coercible(p2.prorettype, p1.oprresult) OR NOT binary_coercible(p1.oprright, p2.proargtypes[0]) OR p1.oprleft != 0); - oid | oprname | oid | proname ------+---------+-----+--------- -(0 rows) - +ERROR: function binary_coercible(oid, oid) does not exist +LINE 6: OR NOT binary_coercible(p2.prorettype, p1.oprresult) + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. -- If the operator is mergejoinable or hashjoinable, its underlying function -- should not be volatile. SELECT p1.oid, p1.oprname, p2.oid, p2.proname @@ -1476,10 +1476,10 @@ -- we could carry the check further, but 3 args is enough for now OR (p.pronargs > 3) ); - aggfnoid | proname | oid | proname -----------+---------+-----+--------- -(0 rows) - +ERROR: function binary_coercible(oid, oid) does not exist +LINE 9: OR NOT binary_coercible(ptr.prorettype, a.aggtranstype) + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. -- Cross-check finalfn (if present) against its entry in pg_proc. SELECT a.aggfnoid::oid, p.proname, pfn.oid, pfn.proname FROM pg_aggregate AS a, pg_proc AS p, pg_proc AS pfn @@ -1499,10 +1499,10 @@ -- we could carry the check further, but 4 args is enough for now OR (pfn.pronargs > 4) ); - aggfnoid | proname | oid | proname -----------+---------+-----+--------- -(0 rows) - +ERROR: function binary_coercible(oid, oid) does not exist +LINE 6: NOT binary_coercible(pfn.prorettype, p.prorettype) OR + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. -- If transfn is strict then either initval should be non-NULL, or -- input type should match transtype so that the first non-null input -- can be assigned as the state value. @@ -1512,10 +1512,10 @@ a.aggtransfn = ptr.oid AND ptr.proisstrict AND a.agginitval IS NULL AND NOT binary_coercible(p.proargtypes[0], a.aggtranstype); - aggfnoid | proname | oid | proname -----------+---------+-----+--------- -(0 rows) - +ERROR: function binary_coercible(oid, oid) does not exist +LINE 6: NOT binary_coercible(p.proargtypes[0], a.aggtranstype); + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. -- Check for inconsistent specifications of moving-aggregate columns. SELECT ctid, aggfnoid::oid FROM pg_aggregate as p1 @@ -1564,10 +1564,10 @@ -- we could carry the check further, but 3 args is enough for now OR (p.pronargs > 3) ); - aggfnoid | proname | oid | proname -----------+---------+-----+--------- -(0 rows) - +ERROR: function binary_coercible(oid, oid) does not exist +LINE 9: OR NOT binary_coercible(ptr.prorettype, a.aggmtranstype... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. -- Cross-check minvtransfn (if present) against its entry in pg_proc. SELECT a.aggfnoid::oid, p.proname, ptr.oid, ptr.proname FROM pg_aggregate AS a, pg_proc AS p, pg_proc AS ptr @@ -1588,10 +1588,10 @@ -- we could carry the check further, but 3 args is enough for now OR (p.pronargs > 3) ); - aggfnoid | proname | oid | proname -----------+---------+-----+--------- -(0 rows) - +ERROR: function binary_coercible(oid, oid) does not exist +LINE 9: OR NOT binary_coercible(ptr.prorettype, a.aggmtranstype... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. -- Cross-check mfinalfn (if present) against its entry in pg_proc. SELECT a.aggfnoid::oid, p.proname, pfn.oid, pfn.proname FROM pg_aggregate AS a, pg_proc AS p, pg_proc AS pfn @@ -1611,10 +1611,10 @@ -- we could carry the check further, but 4 args is enough for now OR (pfn.pronargs > 4) ); - aggfnoid | proname | oid | proname -----------+---------+-----+--------- -(0 rows) - +ERROR: function binary_coercible(oid, oid) does not exist +LINE 6: NOT binary_coercible(pfn.prorettype, p.prorettype) OR + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. -- If mtransfn is strict then either minitval should be non-NULL, or -- input type should match mtranstype so that the first non-null input -- can be assigned as the state value. @@ -1624,10 +1624,10 @@ a.aggmtransfn = ptr.oid AND ptr.proisstrict AND a.aggminitval IS NULL AND NOT binary_coercible(p.proargtypes[0], a.aggmtranstype); - aggfnoid | proname | oid | proname -----------+---------+-----+--------- -(0 rows) - +ERROR: function binary_coercible(oid, oid) does not exist +LINE 6: NOT binary_coercible(p.proargtypes[0], a.aggmtranstype); + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. -- mtransfn and minvtransfn should have same strictness setting. SELECT a.aggfnoid::oid, p.proname, ptr.oid, ptr.proname, iptr.oid, iptr.proname FROM pg_aggregate AS a, pg_proc AS p, pg_proc AS ptr, pg_proc AS iptr @@ -1648,10 +1648,10 @@ p.prorettype != p.proargtypes[0] OR p.prorettype != p.proargtypes[1] OR NOT binary_coercible(a.aggtranstype, p.proargtypes[0])); - aggfnoid | proname -----------+--------- -(0 rows) - +ERROR: function binary_coercible(oid, oid) does not exist +LINE 7: NOT binary_coercible(a.aggtranstype, p.proargtypes[0]))... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. -- Check that no combine function for an INTERNAL transtype is strict. SELECT a.aggfnoid, p.proname FROM pg_aggregate as a, pg_proc as p @@ -2074,10 +2074,10 @@ WHERE NOT EXISTS(SELECT 1 FROM pg_amop AS p2 WHERE p2.amopfamily = p1.opcfamily AND binary_coercible(p1.opcintype, p2.amoplefttype)); - opcname | opcfamily ----------+----------- -(0 rows) - +ERROR: function binary_coercible(oid, oid) does not exist +LINE 5: AND binary_coercible(p1.opcintype, p2.amo... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. -- Check that each operator listed in pg_amop has an associated opclass, -- that is one whose opcintype matches oprleft (possibly by coercion). -- Otherwise the operator is useless because it cannot be matched to an index. @@ -2089,10 +2089,10 @@ WHERE NOT EXISTS(SELECT 1 FROM pg_opclass AS p2 WHERE p2.opcfamily = p1.amopfamily AND binary_coercible(p2.opcintype, p1.amoplefttype)); - amopfamily | amopstrategy | amopopr -------------+--------------+--------- -(0 rows) - +ERROR: function binary_coercible(oid, oid) does not exist +LINE 5: AND binary_coercible(p2.opcintype, p1.amo... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. -- Operators that are primary members of opclasses must be immutable (else -- it suggests that the index ordering isn't fixed). Operators that are -- cross-type members need only be stable, since they are just shorthands @@ -2215,10 +2215,10 @@ pg_opclass opc WHERE a.attrelid = indrelid AND a.attnum = ikey AND opc.oid = iclass AND (NOT binary_coercible(atttypid, opcintype) OR icoll != attcollation); - indexrelid | indrelid | attname | atttypid | opcname -------------+----------+---------+----------+--------- -(0 rows) - +ERROR: function binary_coercible(oid, oid) does not exist +LINE 8: (NOT binary_coercible(atttypid, opcintype) OR icoll !=... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. -- For system catalogs, be even tighter: nearly all indexes should be -- exact type matches not binary-coercible matches. At this writing -- the only exception is an OID index on a regproc column. diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/expressions.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/expressions.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/expressions.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/expressions.out 2023-02-20 19:44:31.129207816 -0500 @@ -93,71 +93,47 @@ explain (costs off) select count(*) from date_tbl where f1 between '1997-01-01' and '1998-01-01'; - QUERY PLAN ------------------------------------------------------------------------------ - Aggregate - -> Seq Scan on date_tbl - Filter: ((f1 >= '01-01-1997'::date) AND (f1 <= '01-01-1998'::date)) -(3 rows) - +ERROR: relation "date_tbl" does not exist +LINE 2: select count(*) from date_tbl + ^ select count(*) from date_tbl where f1 between '1997-01-01' and '1998-01-01'; - count -------- - 3 -(1 row) - +ERROR: relation "date_tbl" does not exist +LINE 1: select count(*) from date_tbl + ^ explain (costs off) select count(*) from date_tbl where f1 not between '1997-01-01' and '1998-01-01'; - QUERY PLAN --------------------------------------------------------------------------- - Aggregate - -> Seq Scan on date_tbl - Filter: ((f1 < '01-01-1997'::date) OR (f1 > '01-01-1998'::date)) -(3 rows) - +ERROR: relation "date_tbl" does not exist +LINE 2: select count(*) from date_tbl + ^ select count(*) from date_tbl where f1 not between '1997-01-01' and '1998-01-01'; - count -------- - 13 -(1 row) - +ERROR: relation "date_tbl" does not exist +LINE 1: select count(*) from date_tbl + ^ explain (costs off) select count(*) from date_tbl where f1 between symmetric '1997-01-01' and '1998-01-01'; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------- - Aggregate - -> Seq Scan on date_tbl - Filter: (((f1 >= '01-01-1997'::date) AND (f1 <= '01-01-1998'::date)) OR ((f1 >= '01-01-1998'::date) AND (f1 <= '01-01-1997'::date))) -(3 rows) - +ERROR: relation "date_tbl" does not exist +LINE 2: select count(*) from date_tbl + ^ select count(*) from date_tbl where f1 between symmetric '1997-01-01' and '1998-01-01'; - count -------- - 3 -(1 row) - +ERROR: relation "date_tbl" does not exist +LINE 1: select count(*) from date_tbl + ^ explain (costs off) select count(*) from date_tbl where f1 not between symmetric '1997-01-01' and '1998-01-01'; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------ - Aggregate - -> Seq Scan on date_tbl - Filter: (((f1 < '01-01-1997'::date) OR (f1 > '01-01-1998'::date)) AND ((f1 < '01-01-1998'::date) OR (f1 > '01-01-1997'::date))) -(3 rows) - +ERROR: relation "date_tbl" does not exist +LINE 2: select count(*) from date_tbl + ^ select count(*) from date_tbl where f1 not between symmetric '1997-01-01' and '1998-01-01'; - count -------- - 13 -(1 row) - +ERROR: relation "date_tbl" does not exist +LINE 1: select count(*) from date_tbl + ^ -- -- Test parsing of a no-op cast to a type with unspecified typmod -- diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/create_index.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/create_index.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/create_index.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/create_index.out 2023-02-20 19:45:17.739209816 -0500 @@ -56,7 +56,9 @@ -- CREATE INDEX grect2ind ON fast_emp4000 USING gist (home_base); CREATE INDEX gpolygonind ON polygon_tbl USING gist (f1); +ERROR: relation "polygon_tbl" does not exist CREATE INDEX gcircleind ON circle_tbl USING gist (f1); +ERROR: relation "circle_tbl" does not exist INSERT INTO POINT_TBL(f1) VALUES (NULL); CREATE INDEX gpointind ON point_tbl USING gist (f1); CREATE TEMP TABLE gpolygon_tbl AS @@ -97,21 +99,14 @@ SELECT * FROM polygon_tbl WHERE f1 @> '((1,1),(2,2),(2,1))'::polygon ORDER BY (poly_center(f1))[0]; - f1 ---------------------- - ((2,0),(2,4),(0,0)) -(1 row) - +ERROR: relation "polygon_tbl" does not exist +LINE 1: SELECT * FROM polygon_tbl WHERE f1 @> '((1,1),(2,2),(2,1))':... + ^ SELECT * FROM circle_tbl WHERE f1 && circle(point(1,-2), 1) ORDER BY area(f1); - f1 ---------------- - <(1,2),3> - <(1,3),5> - <(1,2),100> - <(100,1),115> -(4 rows) - +ERROR: relation "circle_tbl" does not exist +LINE 1: SELECT * FROM circle_tbl WHERE f1 && circle(point(1,-2), 1) + ^ SELECT count(*) FROM gpolygon_tbl WHERE f1 && '(1000,1000,0,0)'::polygon; count ------- @@ -313,42 +308,25 @@ EXPLAIN (COSTS OFF) SELECT * FROM polygon_tbl WHERE f1 @> '((1,1),(2,2),(2,1))'::polygon ORDER BY (poly_center(f1))[0]; - QUERY PLAN ------------------------------------------------------------- - Sort - Sort Key: ((poly_center(f1))[0]) - -> Index Scan using gpolygonind on polygon_tbl - Index Cond: (f1 @> '((1,1),(2,2),(2,1))'::polygon) -(4 rows) - +ERROR: relation "polygon_tbl" does not exist +LINE 2: SELECT * FROM polygon_tbl WHERE f1 @> '((1,1),(2,2),(2,1))':... + ^ SELECT * FROM polygon_tbl WHERE f1 @> '((1,1),(2,2),(2,1))'::polygon ORDER BY (poly_center(f1))[0]; - f1 ---------------------- - ((2,0),(2,4),(0,0)) -(1 row) - +ERROR: relation "polygon_tbl" does not exist +LINE 1: SELECT * FROM polygon_tbl WHERE f1 @> '((1,1),(2,2),(2,1))':... + ^ EXPLAIN (COSTS OFF) SELECT * FROM circle_tbl WHERE f1 && circle(point(1,-2), 1) ORDER BY area(f1); - QUERY PLAN --------------------------------------------------- - Sort - Sort Key: (area(f1)) - -> Index Scan using gcircleind on circle_tbl - Index Cond: (f1 && '<(1,-2),1>'::circle) -(4 rows) - +ERROR: relation "circle_tbl" does not exist +LINE 2: SELECT * FROM circle_tbl WHERE f1 && circle(point(1,-2), 1) + ^ SELECT * FROM circle_tbl WHERE f1 && circle(point(1,-2), 1) ORDER BY area(f1); - f1 ---------------- - <(1,2),3> - <(1,3),5> - <(1,2),100> - <(100,1),115> -(4 rows) - +ERROR: relation "circle_tbl" does not exist +LINE 1: SELECT * FROM circle_tbl WHERE f1 && circle(point(1,-2), 1) + ^ EXPLAIN (COSTS OFF) SELECT count(*) FROM gpolygon_tbl WHERE f1 && '(1000,1000,0,0)'::polygon; QUERY PLAN @@ -932,1914 +910,7 @@ (1 row) SELECT * FROM array_op_test WHERE i = '{NULL}' ORDER BY seqno; - seqno | i | t --------+--------+-------- - 102 | {NULL} | {NULL} -(1 row) - -SELECT * FROM array_op_test WHERE i @> '{NULL}' ORDER BY seqno; - seqno | i | t --------+---+--- -(0 rows) - -SELECT * FROM array_op_test WHERE i && '{NULL}' ORDER BY seqno; - seqno | i | t --------+---+--- -(0 rows) - -SELECT * FROM array_op_test WHERE i <@ '{NULL}' ORDER BY seqno; - seqno | i | t --------+----+---- - 101 | {} | {} -(1 row) - -CREATE INDEX textarrayidx ON array_index_op_test USING gin (t); -explain (costs off) -SELECT * FROM array_index_op_test WHERE t @> '{AAAAAAAA72908}' ORDER BY seqno; - QUERY PLAN ------------------------------------------------------------- - Sort - Sort Key: seqno - -> Bitmap Heap Scan on array_index_op_test - Recheck Cond: (t @> '{AAAAAAAA72908}'::text[]) - -> Bitmap Index Scan on textarrayidx - Index Cond: (t @> '{AAAAAAAA72908}'::text[]) -(6 rows) - -SELECT * FROM array_index_op_test WHERE t @> '{AAAAAAAA72908}' ORDER BY seqno; - seqno | i | t --------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------- - 22 | {11,6,56,62,53,30} | {AAAAAAAA72908} - 45 | {99,45} | {AAAAAAAA72908,AAAAAAAAAAAAAAAAAAA17075,AA88409,AAAAAAAAAAAAAAAAAA36842,AAAAAAA48038,AAAAAAAAAAAAAA10611} - 72 | {22,1,16,78,20,91,83} | {47735,AAAAAAA56483,AAAAAAAAAAAAA93788,AA42406,AAAAAAAAAAAAA73084,AAAAAAAA72908,AAAAAAAAAAAAAAAAAA61286,AAAAA66674,AAAAAAAAAAAAAAAAA50407} - 79 | {45} | {AAAAAAAAAA646,AAAAAAAAAAAAAAAAAAA70415,AAAAAA43678,AAAAAAAA72908} -(4 rows) - -SELECT * FROM array_index_op_test WHERE t && '{AAAAAAAA72908}' ORDER BY seqno; - seqno | i | t --------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------- - 22 | {11,6,56,62,53,30} | {AAAAAAAA72908} - 45 | {99,45} | {AAAAAAAA72908,AAAAAAAAAAAAAAAAAAA17075,AA88409,AAAAAAAAAAAAAAAAAA36842,AAAAAAA48038,AAAAAAAAAAAAAA10611} - 72 | {22,1,16,78,20,91,83} | {47735,AAAAAAA56483,AAAAAAAAAAAAA93788,AA42406,AAAAAAAAAAAAA73084,AAAAAAAA72908,AAAAAAAAAAAAAAAAAA61286,AAAAA66674,AAAAAAAAAAAAAAAAA50407} - 79 | {45} | {AAAAAAAAAA646,AAAAAAAAAAAAAAAAAAA70415,AAAAAA43678,AAAAAAAA72908} -(4 rows) - -SELECT * FROM array_index_op_test WHERE t @> '{AAAAAAAAAA646}' ORDER BY seqno; - seqno | i | t --------+------------------+-------------------------------------------------------------------- - 15 | {17,14,16,63,67} | {AA6416,AAAAAAAAAA646,AAAAA95309} - 79 | {45} | {AAAAAAAAAA646,AAAAAAAAAAAAAAAAAAA70415,AAAAAA43678,AAAAAAAA72908} - 96 | {23,97,43} | {AAAAAAAAAA646,A87088} -(3 rows) - -SELECT * FROM array_index_op_test WHERE t && '{AAAAAAAAAA646}' ORDER BY seqno; - seqno | i | t --------+------------------+-------------------------------------------------------------------- - 15 | {17,14,16,63,67} | {AA6416,AAAAAAAAAA646,AAAAA95309} - 79 | {45} | {AAAAAAAAAA646,AAAAAAAAAAAAAAAAAAA70415,AAAAAA43678,AAAAAAAA72908} - 96 | {23,97,43} | {AAAAAAAAAA646,A87088} -(3 rows) - -SELECT * FROM array_index_op_test WHERE t @> '{AAAAAAAA72908,AAAAAAAAAA646}' ORDER BY seqno; - seqno | i | t --------+------+-------------------------------------------------------------------- - 79 | {45} | {AAAAAAAAAA646,AAAAAAAAAAAAAAAAAAA70415,AAAAAA43678,AAAAAAAA72908} -(1 row) - -SELECT * FROM array_index_op_test WHERE t && '{AAAAAAAA72908,AAAAAAAAAA646}' ORDER BY seqno; - seqno | i | t --------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------- - 15 | {17,14,16,63,67} | {AA6416,AAAAAAAAAA646,AAAAA95309} - 22 | {11,6,56,62,53,30} | {AAAAAAAA72908} - 45 | {99,45} | {AAAAAAAA72908,AAAAAAAAAAAAAAAAAAA17075,AA88409,AAAAAAAAAAAAAAAAAA36842,AAAAAAA48038,AAAAAAAAAAAAAA10611} - 72 | {22,1,16,78,20,91,83} | {47735,AAAAAAA56483,AAAAAAAAAAAAA93788,AA42406,AAAAAAAAAAAAA73084,AAAAAAAA72908,AAAAAAAAAAAAAAAAAA61286,AAAAA66674,AAAAAAAAAAAAAAAAA50407} - 79 | {45} | {AAAAAAAAAA646,AAAAAAAAAAAAAAAAAAA70415,AAAAAA43678,AAAAAAAA72908} - 96 | {23,97,43} | {AAAAAAAAAA646,A87088} -(6 rows) - -SELECT * FROM array_index_op_test WHERE t <@ '{AAAAAAAA72908,AAAAAAAAAAAAAAAAAAA17075,AA88409,AAAAAAAAAAAAAAAAAA36842,AAAAAAA48038,AAAAAAAAAAAAAA10611}' ORDER BY seqno; - seqno | i | t --------+--------------------+----------------------------------------------------------------------------------------------------------- - 22 | {11,6,56,62,53,30} | {AAAAAAAA72908} - 45 | {99,45} | {AAAAAAAA72908,AAAAAAAAAAAAAAAAAAA17075,AA88409,AAAAAAAAAAAAAAAAAA36842,AAAAAAA48038,AAAAAAAAAAAAAA10611} - 101 | {} | {} -(3 rows) - -SELECT * FROM array_index_op_test WHERE t = '{AAAAAAAAAA646,A87088}' ORDER BY seqno; - seqno | i | t --------+------------+------------------------ - 96 | {23,97,43} | {AAAAAAAAAA646,A87088} -(1 row) - -SELECT * FROM array_index_op_test WHERE t = '{}' ORDER BY seqno; - seqno | i | t --------+----+---- - 101 | {} | {} -(1 row) - -SELECT * FROM array_index_op_test WHERE t @> '{}' ORDER BY seqno; - seqno | i | t --------+---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - 1 | {92,75,71,52,64,83} | {AAAAAAAA44066,AAAAAA1059,AAAAAAAAAAA176,AAAAAAA48038} - 2 | {3,6} | {AAAAAA98232,AAAAAAAA79710,AAAAAAAAAAAAAAAAA69675,AAAAAAAAAAAAAAAA55798,AAAAAAAAA12793} - 3 | {37,64,95,43,3,41,13,30,11,43} | {AAAAAAAAAA48845,AAAAA75968,AAAAA95309,AAA54451,AAAAAAAAAA22292,AAAAAAA99836,A96617,AA17009,AAAAAAAAAAAAAA95246} - 4 | {71,39,99,55,33,75,45} | {AAAAAAAAA53663,AAAAAAAAAAAAAAA67062,AAAAAAAAAA64777,AAA99043,AAAAAAAAAAAAAAAAAAA91804,39557} - 5 | {50,42,77,50,4} | {AAAAAAAAAAAAAAAAA26540,AAAAAAA79710,AAAAAAAAAAAAAAAAAAA1205,AAAAAAAAAAA176,AAAAA95309,AAAAAAAAAAA46154,AAAAAA66777,AAAAAAAAA27249,AAAAAAAAAA64777,AAAAAAAAAAAAAAAAAAA70104} - 6 | {39,35,5,94,17,92,60,32} | {AAAAAAAAAAAAAAA35875,AAAAAAAAAAAAAAAA23657} - 7 | {12,51,88,64,8} | {AAAAAAAAAAAAAAAAAA12591,AAAAAAAAAAAAAAAAA50407,AAAAAAAAAAAA67946} - 8 | {60,84} | {AAAAAAA81898,AAAAAA1059,AAAAAAAAAAAA81511,AAAAA961,AAAAAAAAAAAAAAAA31334,AAAAA64741,AA6416,AAAAAAAAAAAAAAAAAA32918,AAAAAAAAAAAAAAAAA50407} - 9 | {56,52,35,27,80,44,81,22} | {AAAAAAAAAAAAAAA73034,AAAAAAAAAAAAA7929,AAAAAAA66161,AA88409,39557,A27153,AAAAAAAA9523,AAAAAAAAAAA99000} - 10 | {71,5,45} | {AAAAAAAAAAA21658,AAAAAAAAAAAA21089,AAA54451,AAAAAAAAAAAAAAAAAA54141,AAAAAAAAAAAAAA28620,AAAAAAAAAAA21658,AAAAAAAAAAA74076,AAAAAAAAA27249} - 11 | {41,86,74,48,22,74,47,50} | {AAAAAAAA9523,AAAAAAAAAAAA37562,AAAAAAAAAAAAAAAA14047,AAAAAAAAAAA46154,AAAA41702,AAAAAAAAAAAAAAAAA764,AAAAA62737,39557} - 12 | {17,99,18,52,91,72,0,43,96,23} | {AAAAA33250,AAAAAAAAAAAAAAAAAAA85420,AAAAAAAAAAA33576} - 13 | {3,52,34,23} | {AAAAAA98232,AAAA49534,AAAAAAAAAAA21658} - 14 | {78,57,19} | {AAAA8857,AAAAAAAAAAAAAAA73034,AAAAAAAA81587,AAAAAAAAAAAAAAA68526,AAAAA75968,AAAAAAAAAAAAAA65909,AAAAAAAAA10012,AAAAAAAAAAAAAA65909} - 15 | {17,14,16,63,67} | {AA6416,AAAAAAAAAA646,AAAAA95309} - 16 | {14,63,85,11} | {AAAAAA66777} - 17 | {7,10,81,85} | {AAAAAA43678,AAAAAAA12144,AAAAAAAAAAA50956,AAAAAAAAAAAAAAAAAAA15356} - 18 | {1} | {AAAAAAAAAAA33576,AAAAA95309,64261,AAA59323,AAAAAAAAAAAAAA95246,55847,AAAAAAAAAAAA67946,AAAAAAAAAAAAAAAAAA64374} - 19 | {52,82,17,74,23,46,69,51,75} | {AAAAAAAAAAAAA73084,AAAAA75968,AAAAAAAAAAAAAAAA14047,AAAAAAA80240,AAAAAAAAAAAAAAAAAAA1205,A68938} - 20 | {72,89,70,51,54,37,8,49,79} | {AAAAAA58494} - 21 | {2,8,65,10,5,79,43} | {AAAAAAAAAAAAAAAAA88852,AAAAAAAAAAAAAAAAAAA91804,AAAAA64669,AAAAAAAAAAAAAAAA1443,AAAAAAAAAAAAAAAA23657,AAAAA12179,AAAAAAAAAAAAAAAAA88852,AAAAAAAAAAAAAAAA31334,AAAAAAAAAAAAAAAA41303,AAAAAAAAAAAAAAAAAAA85420} - 22 | {11,6,56,62,53,30} | {AAAAAAAA72908} - 23 | {40,90,5,38,72,40,30,10,43,55} | {A6053,AAAAAAAAAAA6119,AA44673,AAAAAAAAAAAAAAAAA764,AA17009,AAAAA17383,AAAAA70514,AAAAA33250,AAAAA95309,AAAAAAAAAAAA37562} - 24 | {94,61,99,35,48} | {AAAAAAAAAAA50956,AAAAAAAAAAA15165,AAAA85070,AAAAAAAAAAAAAAA36627,AAAAA961,AAAAAAAAAA55219} - 25 | {31,1,10,11,27,79,38} | {AAAAAAAAAAAAAAAAAA59334,45449} - 26 | {71,10,9,69,75} | {47735,AAAAAAA21462,AAAAAAAAAAAAAAAAA6897,AAAAAAAAAAAAAAAAAAA91804,AAAAAAAAA72121,AAAAAAAAAAAAAAAAAAA1205,AAAAA41597,AAAA8857,AAAAAAAAAAAAAAAAAAA15356,AA17009} - 27 | {94} | {AA6416,A6053,AAAAAAA21462,AAAAAAA57334,AAAAAAAAAAAAAAAAAA12591,AA88409,AAAAAAAAAAAAA70254} - 28 | {14,33,6,34,14} | {AAAAAAAAAAAAAAA13198,AAAAAAAA69452,AAAAAAAAAAA82945,AAAAAAA12144,AAAAAAAAA72121,AAAAAAAAAA18601} - 29 | {39,21} | {AAAAAAAAAAAAAAAAA6897,AAAAAAAAAAAAAAAAAAA38885,AAAA85070,AAAAAAAAAAAAAAAAAAA70104,AAAAA66674,AAAAAAAAAAAAA62007,AAAAAAAA69452,AAAAAAA1242,AAAAAAAAAAAAAAAA1729,AAAA35194} - 30 | {26,81,47,91,34} | {AAAAAAAAAAAAAAAAAAA70104,AAAAAAA80240} - 31 | {80,24,18,21,54} | {AAAAAAAAAAAAAAA13198,AAAAAAAAAAAAAAAAAAA70415,A27153,AAAAAAAAA53663,AAAAAAAAAAAAAAAAA50407,A68938} - 32 | {58,79,82,80,67,75,98,10,41} | {AAAAAAAAAAAAAAAAAA61286,AAA54451,AAAAAAAAAAAAAAAAAAA87527,A96617,51533} - 33 | {74,73} | {A85417,AAAAAAA56483,AAAAA17383,AAAAAAAAAAAAA62159,AAAAAAAAAAAA52814,AAAAAAAAAAAAA85723,AAAAAAAAAAAAAAAAAA55796} - 34 | {70,45} | {AAAAAAAAAAAAAAAAAA71621,AAAAAAAAAAAAAA28620,AAAAAAAAAA55219,AAAAAAAA23648,AAAAAAAAAA22292,AAAAAAA1242} - 35 | {23,40} | {AAAAAAAAAAAA52814,AAAA48949,AAAAAAAAA34727,AAAA8857,AAAAAAAAAAAAAAAAAAA62179,AAAAAAAAAAAAAAA68526,AAAAAAA99836,AAAAAAAA50094,AAAA91194,AAAAAAAAAAAAA73084} - 36 | {79,82,14,52,30,5,79} | {AAAAAAAAA53663,AAAAAAAAAAAAAAAA55798,AAAAAAAAAAAAAAAAAAA89194,AA88409,AAAAAAAAAAAAAAA81326,AAAAAAAAAAAAAAAAA63050,AAAAAAAAAAAAAAAA33598} - 37 | {53,11,81,39,3,78,58,64,74} | {AAAAAAAAAAAAAAAAAAA17075,AAAAAAA66161,AAAAAAAA23648,AAAAAAAAAAAAAA10611} - 38 | {59,5,4,95,28} | {AAAAAAAAAAA82945,A96617,47735,AAAAA12179,AAAAA64669,AAAAAA99807,AA74433,AAAAAAAAAAAAAAAAA59387} - 39 | {82,43,99,16,74} | {AAAAAAAAAAAAAAA67062,AAAAAAA57334,AAAAAAAAAAAAAA65909,A27153,AAAAAAAAAAAAAAAAAAA17075,AAAAAAAAAAAAAAAAA43052,AAAAAAAAAA64777,AAAAAAAAAAAA81511,AAAAAAAAAAAAAA65909,AAAAAAAAAAAAAA28620} - 40 | {34} | {AAAAAAAAAAAAAA10611,AAAAAAAAAAAAAAAAAAA1205,AAAAAAAAAAA50956,AAAAAAAAAAAAAAAA31334,AAAAA70466,AAAAAAAA81587,AAAAAAA74623} - 41 | {19,26,63,12,93,73,27,94} | {AAAAAAA79710,AAAAAAAAAA55219,AAAA41702,AAAAAAAAAAAAAAAAAAA17075,AAAAAAAAAAAAAAAAAA71621,AAAAAAAAAAAAAAAAA63050,AAAAAAA99836,AAAAAAAAAAAAAA8666} - 42 | {15,76,82,75,8,91} | {AAAAAAAAAAA176,AAAAAA38063,45449,AAAAAA54032,AAAAAAA81898,AA6416,AAAAAAAAAAAAAAAAAAA62179,45449,AAAAA60038,AAAAAAAA81587} - 43 | {39,87,91,97,79,28} | {AAAAAAAAAAA74076,A96617,AAAAAAAAAAAAAAAAAAA89194,AAAAAAAAAAAAAAAAAA55796,AAAAAAAAAAAAAAAA23657,AAAAAAAAAAAA67946} - 44 | {40,58,68,29,54} | {AAAAAAA81898,AAAAAA66777,AAAAAA98232} - 45 | {99,45} | {AAAAAAAA72908,AAAAAAAAAAAAAAAAAAA17075,AA88409,AAAAAAAAAAAAAAAAAA36842,AAAAAAA48038,AAAAAAAAAAAAAA10611} - 46 | {53,24} | {AAAAAAAAAAA53908,AAAAAA54032,AAAAA17383,AAAA48949,AAAAAAAAAA18601,AAAAA64669,45449,AAAAAAAAAAA98051,AAAAAAAAAAAAAAAAAA71621} - 47 | {98,23,64,12,75,61} | {AAA59323,AAAAA95309,AAAAAAAAAAAAAAAA31334,AAAAAAAAA27249,AAAAA17383,AAAAAAAAAAAA37562,AAAAAA1059,A84822,55847,AAAAA70466} - 48 | {76,14} | {AAAAAAAAAAAAA59671,AAAAAAAAAAAAAAAAAAA91804,AAAAAA66777,AAAAAAAAAAAAAAAAAAA89194,AAAAAAAAAAAAAAA36627,AAAAAAAAAAAAAAAAAAA17075,AAAAAAAAAAAAA73084,AAAAAAA79710,AAAAAAAAAAAAAAA40402,AAAAAAAAAAAAAAAAAAA65037} - 49 | {56,5,54,37,49} | {AA21643,AAAAAAAAAAA92631,AAAAAAAA81587} - 50 | {20,12,37,64,93} | {AAAAAAAAAA5483,AAAAAAAAAAAAAAAAAAA1205,AA6416,AAAAAAAAAAAAAAAAA63050,AAAAAAAAAAAAAAAAAA47955} - 51 | {47} | {AAAAAAAAAAAAAA96505,AAAAAAAAAAAAAAAAAA36842,AAAAA95309,AAAAAAAA81587,AA6416,AAAA91194,AAAAAA58494,AAAAAA1059,AAAAAAAA69452} - 52 | {89,0} | {AAAAAAAAAAAAAAAAAA47955,AAAAAAA48038,AAAAAAAAAAAAAAAAA43052,AAAAAAAAAAAAA73084,AAAAA70466,AAAAAAAAAAAAAAAAA764,AAAAAAAAAAA46154,AA66862} - 53 | {38,17} | {AAAAAAAAAAA21658} - 54 | {70,47} | {AAAAAAAAAAAAAAAAAA54141,AAAAA40681,AAAAAAA48038,AAAAAAAAAAAAAAAA29150,AAAAA41597,AAAAAAAAAAAAAAAAAA59334,AA15322} - 55 | {47,79,47,64,72,25,71,24,93} | {AAAAAAAAAAAAAAAAAA55796,AAAAA62737} - 56 | {33,7,60,54,93,90,77,85,39} | {AAAAAAAAAAAAAAAAAA32918,AA42406} - 57 | {23,45,10,42,36,21,9,96} | {AAAAAAAAAAAAAAAAAAA70415} - 58 | {92} | {AAAAAAAAAAAAAAAA98414,AAAAAAAA23648,AAAAAAAAAAAAAAAAAA55796,AA25381,AAAAAAAAAAA6119} - 59 | {9,69,46,77} | {39557,AAAAAAA89932,AAAAAAAAAAAAAAAAA43052,AAAAAAAAAAAAAAAAA26540,AAA20874,AA6416,AAAAAAAAAAAAAAAAAA47955} - 60 | {62,2,59,38,89} | {AAAAAAA89932,AAAAAAAAAAAAAAAAAAA15356,AA99927,AA17009,AAAAAAAAAAAAAAA35875} - 61 | {72,2,44,95,54,54,13} | {AAAAAAAAAAAAAAAAAAA91804} - 62 | {83,72,29,73} | {AAAAAAAAAAAAA15097,AAAA8857,AAAAAAAAAAAA35809,AAAAAAAAAAAA52814,AAAAAAAAAAAAAAAAAAA38885,AAAAAAAAAAAAAAAAAA24183,AAAAAA43678,A96617} - 63 | {11,4,61,87} | {AAAAAAAAA27249,AAAAAAAAAAAAAAAAAA32918,AAAAAAAAAAAAAAA13198,AAA20874,39557,51533,AAAAAAAAAAA53908,AAAAAAAAAAAAAA96505,AAAAAAAA78938} - 64 | {26,19,34,24,81,78} | {A96617,AAAAAAAAAAAAAAAAAAA70104,A68938,AAAAAAAAAAA53908,AAAAAAAAAAAAAAA453,AA17009,AAAAAAA80240} - 65 | {61,5,76,59,17} | {AAAAAA99807,AAAAA64741,AAAAAAAAAAA53908,AA21643,AAAAAAAAA10012} - 66 | {31,23,70,52,4,33,48,25} | {AAAAAAAAAAAAAAAAA69675,AAAAAAAA50094,AAAAAAAAAAA92631,AAAA35194,39557,AAAAAAA99836} - 67 | {31,94,7,10} | {AAAAAA38063,A96617,AAAA35194,AAAAAAAAAAAA67946} - 68 | {90,43,38} | {AA75092,AAAAAAAAAAAAAAAAA69675,AAAAAAAAAAA92631,AAAAAAAAA10012,AAAAAAAAAAAAA7929,AA21643} - 69 | {67,35,99,85,72,86,44} | {AAAAAAAAAAAAAAAAAAA1205,AAAAAAAA50094,AAAAAAAAAAAAAAAA1729,AAAAAAAAAAAAAAAAAA47955} - 70 | {56,70,83} | {AAAA41702,AAAAAAAAAAA82945,AA21643,AAAAAAAAAAA99000,A27153,AA25381,AAAAAAAAAAAAAA96505,AAAAAAA1242} - 71 | {74,26} | {AAAAAAAAAAA50956,AA74433,AAAAAAA21462,AAAAAAAAAAAAAAAAAAA17075,AAAAAAAAAAAAAAA36627,AAAAAAAAAAAAA70254,AAAAAAAAAA43419,39557} - 72 | {22,1,16,78,20,91,83} | {47735,AAAAAAA56483,AAAAAAAAAAAAA93788,AA42406,AAAAAAAAAAAAA73084,AAAAAAAA72908,AAAAAAAAAAAAAAAAAA61286,AAAAA66674,AAAAAAAAAAAAAAAAA50407} - 73 | {88,25,96,78,65,15,29,19} | {AAA54451,AAAAAAAAA27249,AAAAAAA9228,AAAAAAAAAAAAAAA67062,AAAAAAAAAAAAAAAAAAA70415,AAAAA17383,AAAAAAAAAAAAAAAA33598} - 74 | {32} | {AAAAAAAAAAAAAAAA1729,AAAAAAAAAAAAA22860,AAAAAA99807,AAAAA17383,AAAAAAAAAAAAAAA67062,AAAAAAAAAAA15165,AAAAAAAAAAA50956} - 75 | {12,96,83,24,71,89,55} | {AAAA48949,AAAAAAAA29716,AAAAAAAAAAAAAAAAAAA1205,AAAAAAAAAAAA67946,AAAAAAAAAAAAAAAA29150,AAA28075,AAAAAAAAAAAAAAAAA43052} - 76 | {92,55,10,7} | {AAAAAAAAAAAAAAA67062} - 77 | {97,15,32,17,55,59,18,37,50,39} | {AAAAAAAAAAAA67946,AAAAAA54032,AAAAAAAA81587,55847,AAAAAAAAAAAAAA28620,AAAAAAAAAAAAAAAAA43052,AAAAAA75463,AAAA49534,AAAAAAAA44066} - 78 | {55,89,44,84,34} | {AAAAAAAAAAA6119,AAAAAAAAAAAAAA8666,AA99927,AA42406,AAAAAAA81898,AAAAAAA9228,AAAAAAAAAAA92631,AA21643,AAAAAAAAAAAAAA28620} - 79 | {45} | {AAAAAAAAAA646,AAAAAAAAAAAAAAAAAAA70415,AAAAAA43678,AAAAAAAA72908} - 80 | {74,89,44,80,0} | {AAAA35194,AAAAAAAA79710,AAA20874,AAAAAAAAAAAAAAAAAAA70104,AAAAAAAAAAAAA73084,AAAAAAA57334,AAAAAAA9228,AAAAAAAAAAAAA62007} - 81 | {63,77,54,48,61,53,97} | {AAAAAAAAAAAAAAA81326,AAAAAAAAAA22292,AA25381,AAAAAAAAAAA74076,AAAAAAA81898,AAAAAAAAA72121} - 82 | {34,60,4,79,78,16,86,89,42,50} | {AAAAA40681,AAAAAAAAAAAAAAAAAA12591,AAAAAAA80240,AAAAAAAAAAAAAAAA55798,AAAAAAAAAAAAAAAAAAA70104} - 83 | {14,10} | {AAAAAAAAAA22292,AAAAAAAAAAAAA70254,AAAAAAAAAAA6119} - 84 | {11,83,35,13,96,94} | {AAAAA95309,AAAAAAAAAAAAAAAAAA32918,AAAAAAAAAAAAAAAAAA24183} - 85 | {39,60} | {AAAAAAAAAAAAAAAA55798,AAAAAAAAAA22292,AAAAAAA66161,AAAAAAA21462,AAAAAAAAAAAAAAAAAA12591,55847,AAAAAA98232,AAAAAAAAAAA46154} - 86 | {33,81,72,74,45,36,82} | {AAAAAAAA81587,AAAAAAAAAAAAAA96505,45449,AAAA80176} - 87 | {57,27,50,12,97,68} | {AAAAAAAAAAAAAAAAA26540,AAAAAAAAA10012,AAAAAAAAAAAA35809,AAAAAAAAAAAAAAAA29150,AAAAAAAAAAA82945,AAAAAA66777,31228,AAAAAAAAAAAAAAAA23657,AAAAAAAAAAAAAA28620,AAAAAAAAAAAAAA96505} - 88 | {41,90,77,24,6,24} | {AAAA35194,AAAA35194,AAAAAAA80240,AAAAAAAAAAA46154,AAAAAA58494,AAAAAAAAAAAAAAAAAAA17075,AAAAAAAAAAAAAAAAAA59334,AAAAAAAAAAAAAAAAAAA91804,AA74433} - 89 | {40,32,17,6,30,88} | {AA44673,AAAAAAAAAAA6119,AAAAAAAAAAAAAAAA23657,AAAAAAAAAAAAAAAAAA47955,AAAAAAAAAAAAAAAA33598,AAAAAAAAAAA33576,AA44673} - 90 | {88,75} | {AAAAA60038,AAAAAAAA23648,AAAAAAAAAAA99000,AAAA41702,AAAAAAAAAAAAA22860,AAAAAAAAAAAAAAA68526} - 91 | {78} | {AAAAAAAAAAAAA62007,AAA99043} - 92 | {85,63,49,45} | {AAAAAAA89932,AAAAAAAAAAAAA22860,AAAAAAAAAAAAAAAAAAA1205,AAAAAAAAAAAA21089} - 93 | {11} | {AAAAAAAAAAA176,AAAAAAAAAAAAAA8666,AAAAAAAAAAAAAAA453,AAAAAAAAAAAAA85723,A68938,AAAAAAAAAAAAA9821,AAAAAAA48038,AAAAAAAAAAAAAAAAA59387,AA99927,AAAAA17383} - 94 | {98,9,85,62,88,91,60,61,38,86} | {AAAAAAAA81587,AAAAA17383,AAAAAAAA81587} - 95 | {47,77} | {AAAAAAAAAAAAAAAAA764,AAAAAAAAAAA74076,AAAAAAAAAA18107,AAAAA40681,AAAAAAAAAAAAAAA35875,AAAAA60038,AAAAAAA56483} - 96 | {23,97,43} | {AAAAAAAAAA646,A87088} - 97 | {54,2,86,65} | {47735,AAAAAAA99836,AAAAAAAAAAAAAAAAA6897,AAAAAAAAAAAAAAAA29150,AAAAAAA80240,AAAAAAAAAAAAAAAA98414,AAAAAAA56483,AAAAAAAAAAAAAAAA29150,AAAAAAA39692,AA21643} - 98 | {38,34,32,89} | {AAAAAAAAAAAAAAAAAA71621,AAAA8857,AAAAAAAAAAAAAAAAAAA65037,AAAAAAAAAAAAAAAA31334,AAAAAAAAAA48845} - 99 | {37,86} | {AAAAAAAAAAAAAAAAAA32918,AAAAA70514,AAAAAAAAA10012,AAAAAAAAAAAAAAAAA59387,AAAAAAAAAA64777,AAAAAAAAAAAAAAAAAAA15356} - 100 | {85,32,57,39,49,84,32,3,30} | {AAAAAAA80240,AAAAAAAAAAAAAAAA1729,AAAAA60038,AAAAAAAAAAA92631,AAAAAAAA9523} - 101 | {} | {} - 102 | {NULL} | {NULL} -(102 rows) - -SELECT * FROM array_index_op_test WHERE t && '{}' ORDER BY seqno; - seqno | i | t --------+---+--- -(0 rows) - -SELECT * FROM array_index_op_test WHERE t <@ '{}' ORDER BY seqno; - seqno | i | t --------+----+---- - 101 | {} | {} -(1 row) - --- And try it with a multicolumn GIN index -DROP INDEX intarrayidx, textarrayidx; -CREATE INDEX botharrayidx ON array_index_op_test USING gin (i, t); -SELECT * FROM array_index_op_test WHERE i @> '{32}' ORDER BY seqno; - seqno | i | t --------+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------ - 6 | {39,35,5,94,17,92,60,32} | {AAAAAAAAAAAAAAA35875,AAAAAAAAAAAAAAAA23657} - 74 | {32} | {AAAAAAAAAAAAAAAA1729,AAAAAAAAAAAAA22860,AAAAAA99807,AAAAA17383,AAAAAAAAAAAAAAA67062,AAAAAAAAAAA15165,AAAAAAAAAAA50956} - 77 | {97,15,32,17,55,59,18,37,50,39} | {AAAAAAAAAAAA67946,AAAAAA54032,AAAAAAAA81587,55847,AAAAAAAAAAAAAA28620,AAAAAAAAAAAAAAAAA43052,AAAAAA75463,AAAA49534,AAAAAAAA44066} - 89 | {40,32,17,6,30,88} | {AA44673,AAAAAAAAAAA6119,AAAAAAAAAAAAAAAA23657,AAAAAAAAAAAAAAAAAA47955,AAAAAAAAAAAAAAAA33598,AAAAAAAAAAA33576,AA44673} - 98 | {38,34,32,89} | {AAAAAAAAAAAAAAAAAA71621,AAAA8857,AAAAAAAAAAAAAAAAAAA65037,AAAAAAAAAAAAAAAA31334,AAAAAAAAAA48845} - 100 | {85,32,57,39,49,84,32,3,30} | {AAAAAAA80240,AAAAAAAAAAAAAAAA1729,AAAAA60038,AAAAAAAAAAA92631,AAAAAAAA9523} -(6 rows) - -SELECT * FROM array_index_op_test WHERE i && '{32}' ORDER BY seqno; - seqno | i | t --------+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------ - 6 | {39,35,5,94,17,92,60,32} | {AAAAAAAAAAAAAAA35875,AAAAAAAAAAAAAAAA23657} - 74 | {32} | {AAAAAAAAAAAAAAAA1729,AAAAAAAAAAAAA22860,AAAAAA99807,AAAAA17383,AAAAAAAAAAAAAAA67062,AAAAAAAAAAA15165,AAAAAAAAAAA50956} - 77 | {97,15,32,17,55,59,18,37,50,39} | {AAAAAAAAAAAA67946,AAAAAA54032,AAAAAAAA81587,55847,AAAAAAAAAAAAAA28620,AAAAAAAAAAAAAAAAA43052,AAAAAA75463,AAAA49534,AAAAAAAA44066} - 89 | {40,32,17,6,30,88} | {AA44673,AAAAAAAAAAA6119,AAAAAAAAAAAAAAAA23657,AAAAAAAAAAAAAAAAAA47955,AAAAAAAAAAAAAAAA33598,AAAAAAAAAAA33576,AA44673} - 98 | {38,34,32,89} | {AAAAAAAAAAAAAAAAAA71621,AAAA8857,AAAAAAAAAAAAAAAAAAA65037,AAAAAAAAAAAAAAAA31334,AAAAAAAAAA48845} - 100 | {85,32,57,39,49,84,32,3,30} | {AAAAAAA80240,AAAAAAAAAAAAAAAA1729,AAAAA60038,AAAAAAAAAAA92631,AAAAAAAA9523} -(6 rows) - -SELECT * FROM array_index_op_test WHERE t @> '{AAAAAAA80240}' ORDER BY seqno; - seqno | i | t --------+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------- - 19 | {52,82,17,74,23,46,69,51,75} | {AAAAAAAAAAAAA73084,AAAAA75968,AAAAAAAAAAAAAAAA14047,AAAAAAA80240,AAAAAAAAAAAAAAAAAAA1205,A68938} - 30 | {26,81,47,91,34} | {AAAAAAAAAAAAAAAAAAA70104,AAAAAAA80240} - 64 | {26,19,34,24,81,78} | {A96617,AAAAAAAAAAAAAAAAAAA70104,A68938,AAAAAAAAAAA53908,AAAAAAAAAAAAAAA453,AA17009,AAAAAAA80240} - 82 | {34,60,4,79,78,16,86,89,42,50} | {AAAAA40681,AAAAAAAAAAAAAAAAAA12591,AAAAAAA80240,AAAAAAAAAAAAAAAA55798,AAAAAAAAAAAAAAAAAAA70104} - 88 | {41,90,77,24,6,24} | {AAAA35194,AAAA35194,AAAAAAA80240,AAAAAAAAAAA46154,AAAAAA58494,AAAAAAAAAAAAAAAAAAA17075,AAAAAAAAAAAAAAAAAA59334,AAAAAAAAAAAAAAAAAAA91804,AA74433} - 97 | {54,2,86,65} | {47735,AAAAAAA99836,AAAAAAAAAAAAAAAAA6897,AAAAAAAAAAAAAAAA29150,AAAAAAA80240,AAAAAAAAAAAAAAAA98414,AAAAAAA56483,AAAAAAAAAAAAAAAA29150,AAAAAAA39692,AA21643} - 100 | {85,32,57,39,49,84,32,3,30} | {AAAAAAA80240,AAAAAAAAAAAAAAAA1729,AAAAA60038,AAAAAAAAAAA92631,AAAAAAAA9523} -(7 rows) - -SELECT * FROM array_index_op_test WHERE t && '{AAAAAAA80240}' ORDER BY seqno; - seqno | i | t --------+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------- - 19 | {52,82,17,74,23,46,69,51,75} | {AAAAAAAAAAAAA73084,AAAAA75968,AAAAAAAAAAAAAAAA14047,AAAAAAA80240,AAAAAAAAAAAAAAAAAAA1205,A68938} - 30 | {26,81,47,91,34} | {AAAAAAAAAAAAAAAAAAA70104,AAAAAAA80240} - 64 | {26,19,34,24,81,78} | {A96617,AAAAAAAAAAAAAAAAAAA70104,A68938,AAAAAAAAAAA53908,AAAAAAAAAAAAAAA453,AA17009,AAAAAAA80240} - 82 | {34,60,4,79,78,16,86,89,42,50} | {AAAAA40681,AAAAAAAAAAAAAAAAAA12591,AAAAAAA80240,AAAAAAAAAAAAAAAA55798,AAAAAAAAAAAAAAAAAAA70104} - 88 | {41,90,77,24,6,24} | {AAAA35194,AAAA35194,AAAAAAA80240,AAAAAAAAAAA46154,AAAAAA58494,AAAAAAAAAAAAAAAAAAA17075,AAAAAAAAAAAAAAAAAA59334,AAAAAAAAAAAAAAAAAAA91804,AA74433} - 97 | {54,2,86,65} | {47735,AAAAAAA99836,AAAAAAAAAAAAAAAAA6897,AAAAAAAAAAAAAAAA29150,AAAAAAA80240,AAAAAAAAAAAAAAAA98414,AAAAAAA56483,AAAAAAAAAAAAAAAA29150,AAAAAAA39692,AA21643} - 100 | {85,32,57,39,49,84,32,3,30} | {AAAAAAA80240,AAAAAAAAAAAAAAAA1729,AAAAA60038,AAAAAAAAAAA92631,AAAAAAAA9523} -(7 rows) - -SELECT * FROM array_index_op_test WHERE i @> '{32}' AND t && '{AAAAAAA80240}' ORDER BY seqno; - seqno | i | t --------+-----------------------------+------------------------------------------------------------------------------ - 100 | {85,32,57,39,49,84,32,3,30} | {AAAAAAA80240,AAAAAAAAAAAAAAAA1729,AAAAA60038,AAAAAAAAAAA92631,AAAAAAAA9523} -(1 row) - -SELECT * FROM array_index_op_test WHERE i && '{32}' AND t @> '{AAAAAAA80240}' ORDER BY seqno; - seqno | i | t --------+-----------------------------+------------------------------------------------------------------------------ - 100 | {85,32,57,39,49,84,32,3,30} | {AAAAAAA80240,AAAAAAAAAAAAAAAA1729,AAAAA60038,AAAAAAAAAAA92631,AAAAAAAA9523} -(1 row) - -SELECT * FROM array_index_op_test WHERE t = '{}' ORDER BY seqno; - seqno | i | t --------+----+---- - 101 | {} | {} -(1 row) - -SELECT * FROM array_op_test WHERE i = '{NULL}' ORDER BY seqno; - seqno | i | t --------+--------+-------- - 102 | {NULL} | {NULL} -(1 row) - -SELECT * FROM array_op_test WHERE i <@ '{NULL}' ORDER BY seqno; - seqno | i | t --------+----+---- - 101 | {} | {} -(1 row) - -RESET enable_seqscan; -RESET enable_indexscan; -RESET enable_bitmapscan; --- --- Try a GIN index with a lot of items with same key. (GIN creates a posting --- tree when there are enough duplicates) --- -CREATE TABLE array_gin_test (a int[]); -INSERT INTO array_gin_test SELECT ARRAY[1, g%5, g] FROM generate_series(1, 10000) g; -CREATE INDEX array_gin_test_idx ON array_gin_test USING gin (a); -SELECT COUNT(*) FROM array_gin_test WHERE a @> '{2}'; - count -------- - 2000 -(1 row) - -DROP TABLE array_gin_test; --- --- Test GIN index's reloptions --- -CREATE INDEX gin_relopts_test ON array_index_op_test USING gin (i) - WITH (FASTUPDATE=on, GIN_PENDING_LIST_LIMIT=128); -\d+ gin_relopts_test - Index "public.gin_relopts_test" - Column | Type | Key? | Definition | Storage | Stats target ---------+---------+------+------------+---------+-------------- - i | integer | yes | i | plain | -gin, for table "public.array_index_op_test" -Options: fastupdate=on, gin_pending_list_limit=128 - --- --- HASH --- -CREATE INDEX hash_i4_index ON hash_i4_heap USING hash (random int4_ops); -CREATE INDEX hash_name_index ON hash_name_heap USING hash (random name_ops); -CREATE INDEX hash_txt_index ON hash_txt_heap USING hash (random text_ops); -CREATE INDEX hash_f8_index ON hash_f8_heap USING hash (random float8_ops) WITH (fillfactor=60); -CREATE UNLOGGED TABLE unlogged_hash_table (id int4); -CREATE INDEX unlogged_hash_index ON unlogged_hash_table USING hash (id int4_ops); -DROP TABLE unlogged_hash_table; --- CREATE INDEX hash_ovfl_index ON hash_ovfl_heap USING hash (x int4_ops); --- Test hash index build tuplesorting. Force hash tuplesort using low --- maintenance_work_mem setting and fillfactor: -SET maintenance_work_mem = '1MB'; -CREATE INDEX hash_tuplesort_idx ON tenk1 USING hash (stringu1 name_ops) WITH (fillfactor = 10); -EXPLAIN (COSTS OFF) -SELECT count(*) FROM tenk1 WHERE stringu1 = 'TVAAAA'; - QUERY PLAN -------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on tenk1 - Recheck Cond: (stringu1 = 'TVAAAA'::name) - -> Bitmap Index Scan on hash_tuplesort_idx - Index Cond: (stringu1 = 'TVAAAA'::name) -(5 rows) - -SELECT count(*) FROM tenk1 WHERE stringu1 = 'TVAAAA'; - count -------- - 14 -(1 row) - -DROP INDEX hash_tuplesort_idx; -RESET maintenance_work_mem; --- --- Test functional index --- -CREATE TABLE func_index_heap (f1 text, f2 text); -CREATE UNIQUE INDEX func_index_index on func_index_heap (textcat(f1,f2)); -INSERT INTO func_index_heap VALUES('ABC','DEF'); -INSERT INTO func_index_heap VALUES('AB','CDEFG'); -INSERT INTO func_index_heap VALUES('QWE','RTY'); --- this should fail because of unique index: -INSERT INTO func_index_heap VALUES('ABCD', 'EF'); -ERROR: duplicate key value violates unique constraint "func_index_index" -DETAIL: Key (textcat(f1, f2))=(ABCDEF) already exists. --- but this shouldn't: -INSERT INTO func_index_heap VALUES('QWERTY'); --- while we're here, see that the metadata looks sane -\d func_index_heap - Table "public.func_index_heap" - Column | Type | Collation | Nullable | Default ---------+------+-----------+----------+--------- - f1 | text | | | - f2 | text | | | -Indexes: - "func_index_index" UNIQUE, btree (textcat(f1, f2)) - -\d func_index_index - Index "public.func_index_index" - Column | Type | Key? | Definition ----------+------+------+----------------- - textcat | text | yes | textcat(f1, f2) -unique, btree, for table "public.func_index_heap" - --- --- Same test, expressional index --- -DROP TABLE func_index_heap; -CREATE TABLE func_index_heap (f1 text, f2 text); -CREATE UNIQUE INDEX func_index_index on func_index_heap ((f1 || f2) text_ops); -INSERT INTO func_index_heap VALUES('ABC','DEF'); -INSERT INTO func_index_heap VALUES('AB','CDEFG'); -INSERT INTO func_index_heap VALUES('QWE','RTY'); --- this should fail because of unique index: -INSERT INTO func_index_heap VALUES('ABCD', 'EF'); -ERROR: duplicate key value violates unique constraint "func_index_index" -DETAIL: Key ((f1 || f2))=(ABCDEF) already exists. --- but this shouldn't: -INSERT INTO func_index_heap VALUES('QWERTY'); --- while we're here, see that the metadata looks sane -\d func_index_heap - Table "public.func_index_heap" - Column | Type | Collation | Nullable | Default ---------+------+-----------+----------+--------- - f1 | text | | | - f2 | text | | | -Indexes: - "func_index_index" UNIQUE, btree ((f1 || f2)) - -\d func_index_index - Index "public.func_index_index" - Column | Type | Key? | Definition ---------+------+------+------------ - expr | text | yes | (f1 || f2) -unique, btree, for table "public.func_index_heap" - --- this should fail because of unsafe column type (anonymous record) -create index on func_index_heap ((f1 || f2), (row(f1, f2))); -ERROR: column "row" has pseudo-type record --- --- Test unique index with included columns --- -CREATE TABLE covering_index_heap (f1 int, f2 int, f3 text); -CREATE UNIQUE INDEX covering_index_index on covering_index_heap (f1,f2) INCLUDE(f3); -INSERT INTO covering_index_heap VALUES(1,1,'AAA'); -INSERT INTO covering_index_heap VALUES(1,2,'AAA'); --- this should fail because of unique index on f1,f2: -INSERT INTO covering_index_heap VALUES(1,2,'BBB'); -ERROR: duplicate key value violates unique constraint "covering_index_index" -DETAIL: Key (f1, f2)=(1, 2) already exists. --- and this shouldn't: -INSERT INTO covering_index_heap VALUES(1,4,'AAA'); --- Try to build index on table that already contains data -CREATE UNIQUE INDEX covering_pkey on covering_index_heap (f1,f2) INCLUDE(f3); --- Try to use existing covering index as primary key -ALTER TABLE covering_index_heap ADD CONSTRAINT covering_pkey PRIMARY KEY USING INDEX -covering_pkey; -DROP TABLE covering_index_heap; --- --- Also try building functional, expressional, and partial indexes on --- tables that already contain data. --- -create unique index hash_f8_index_1 on hash_f8_heap(abs(random)); -create unique index hash_f8_index_2 on hash_f8_heap((seqno + 1), random); -create unique index hash_f8_index_3 on hash_f8_heap(random) where seqno > 1000; --- --- Try some concurrent index builds --- --- Unfortunately this only tests about half the code paths because there are --- no concurrent updates happening to the table at the same time. -CREATE TABLE concur_heap (f1 text, f2 text); --- empty table -CREATE INDEX CONCURRENTLY concur_index1 ON concur_heap(f2,f1); -CREATE INDEX CONCURRENTLY IF NOT EXISTS concur_index1 ON concur_heap(f2,f1); -NOTICE: relation "concur_index1" already exists, skipping -INSERT INTO concur_heap VALUES ('a','b'); -INSERT INTO concur_heap VALUES ('b','b'); --- unique index -CREATE UNIQUE INDEX CONCURRENTLY concur_index2 ON concur_heap(f1); -CREATE UNIQUE INDEX CONCURRENTLY IF NOT EXISTS concur_index2 ON concur_heap(f1); -NOTICE: relation "concur_index2" already exists, skipping --- check if constraint is set up properly to be enforced -INSERT INTO concur_heap VALUES ('b','x'); -ERROR: duplicate key value violates unique constraint "concur_index2" -DETAIL: Key (f1)=(b) already exists. --- check if constraint is enforced properly at build time -CREATE UNIQUE INDEX CONCURRENTLY concur_index3 ON concur_heap(f2); -ERROR: could not create unique index "concur_index3" -DETAIL: Key (f2)=(b) is duplicated. --- test that expression indexes and partial indexes work concurrently -CREATE INDEX CONCURRENTLY concur_index4 on concur_heap(f2) WHERE f1='a'; -CREATE INDEX CONCURRENTLY concur_index5 on concur_heap(f2) WHERE f1='x'; --- here we also check that you can default the index name -CREATE INDEX CONCURRENTLY on concur_heap((f2||f1)); --- You can't do a concurrent index build in a transaction -BEGIN; -CREATE INDEX CONCURRENTLY concur_index7 ON concur_heap(f1); -ERROR: CREATE INDEX CONCURRENTLY cannot run inside a transaction block -COMMIT; --- test where predicate is able to do a transactional update during --- a concurrent build before switching pg_index state flags. -CREATE FUNCTION predicate_stable() RETURNS bool IMMUTABLE -LANGUAGE plpgsql AS $$ -BEGIN - EXECUTE 'SELECT txid_current()'; - RETURN true; -END; $$; -CREATE INDEX CONCURRENTLY concur_index8 ON concur_heap (f1) - WHERE predicate_stable(); -DROP INDEX concur_index8; -DROP FUNCTION predicate_stable(); --- But you can do a regular index build in a transaction -BEGIN; -CREATE INDEX std_index on concur_heap(f2); -COMMIT; --- Failed builds are left invalid by VACUUM FULL, fixed by REINDEX -VACUUM FULL concur_heap; -REINDEX TABLE concur_heap; -ERROR: could not create unique index "concur_index3" -DETAIL: Key (f2)=(b) is duplicated. -DELETE FROM concur_heap WHERE f1 = 'b'; -VACUUM FULL concur_heap; -\d concur_heap - Table "public.concur_heap" - Column | Type | Collation | Nullable | Default ---------+------+-----------+----------+--------- - f1 | text | | | - f2 | text | | | -Indexes: - "concur_heap_expr_idx" btree ((f2 || f1)) - "concur_index1" btree (f2, f1) - "concur_index2" UNIQUE, btree (f1) - "concur_index3" UNIQUE, btree (f2) INVALID - "concur_index4" btree (f2) WHERE f1 = 'a'::text - "concur_index5" btree (f2) WHERE f1 = 'x'::text - "std_index" btree (f2) - -REINDEX TABLE concur_heap; -\d concur_heap - Table "public.concur_heap" - Column | Type | Collation | Nullable | Default ---------+------+-----------+----------+--------- - f1 | text | | | - f2 | text | | | -Indexes: - "concur_heap_expr_idx" btree ((f2 || f1)) - "concur_index1" btree (f2, f1) - "concur_index2" UNIQUE, btree (f1) - "concur_index3" UNIQUE, btree (f2) - "concur_index4" btree (f2) WHERE f1 = 'a'::text - "concur_index5" btree (f2) WHERE f1 = 'x'::text - "std_index" btree (f2) - --- Temporary tables with concurrent builds and on-commit actions --- CONCURRENTLY used with CREATE INDEX and DROP INDEX is ignored. --- PRESERVE ROWS, the default. -CREATE TEMP TABLE concur_temp (f1 int, f2 text) - ON COMMIT PRESERVE ROWS; -INSERT INTO concur_temp VALUES (1, 'foo'), (2, 'bar'); -CREATE INDEX CONCURRENTLY concur_temp_ind ON concur_temp(f1); -DROP INDEX CONCURRENTLY concur_temp_ind; -DROP TABLE concur_temp; --- ON COMMIT DROP -BEGIN; -CREATE TEMP TABLE concur_temp (f1 int, f2 text) - ON COMMIT DROP; -INSERT INTO concur_temp VALUES (1, 'foo'), (2, 'bar'); --- Fails when running in a transaction. -CREATE INDEX CONCURRENTLY concur_temp_ind ON concur_temp(f1); -ERROR: CREATE INDEX CONCURRENTLY cannot run inside a transaction block -COMMIT; --- ON COMMIT DELETE ROWS -CREATE TEMP TABLE concur_temp (f1 int, f2 text) - ON COMMIT DELETE ROWS; -INSERT INTO concur_temp VALUES (1, 'foo'), (2, 'bar'); -CREATE INDEX CONCURRENTLY concur_temp_ind ON concur_temp(f1); -DROP INDEX CONCURRENTLY concur_temp_ind; -DROP TABLE concur_temp; --- --- Try some concurrent index drops --- -DROP INDEX CONCURRENTLY "concur_index2"; -- works -DROP INDEX CONCURRENTLY IF EXISTS "concur_index2"; -- notice -NOTICE: index "concur_index2" does not exist, skipping --- failures -DROP INDEX CONCURRENTLY "concur_index2", "concur_index3"; -ERROR: DROP INDEX CONCURRENTLY does not support dropping multiple objects -BEGIN; -DROP INDEX CONCURRENTLY "concur_index5"; -ERROR: DROP INDEX CONCURRENTLY cannot run inside a transaction block -ROLLBACK; --- successes -DROP INDEX CONCURRENTLY IF EXISTS "concur_index3"; -DROP INDEX CONCURRENTLY "concur_index4"; -DROP INDEX CONCURRENTLY "concur_index5"; -DROP INDEX CONCURRENTLY "concur_index1"; -DROP INDEX CONCURRENTLY "concur_heap_expr_idx"; -\d concur_heap - Table "public.concur_heap" - Column | Type | Collation | Nullable | Default ---------+------+-----------+----------+--------- - f1 | text | | | - f2 | text | | | -Indexes: - "std_index" btree (f2) - -DROP TABLE concur_heap; --- --- Test ADD CONSTRAINT USING INDEX --- -CREATE TABLE cwi_test( a int , b varchar(10), c char); --- add some data so that all tests have something to work with. -INSERT INTO cwi_test VALUES(1, 2), (3, 4), (5, 6); -CREATE UNIQUE INDEX cwi_uniq_idx ON cwi_test(a , b); -ALTER TABLE cwi_test ADD primary key USING INDEX cwi_uniq_idx; -\d cwi_test - Table "public.cwi_test" - Column | Type | Collation | Nullable | Default ---------+-----------------------+-----------+----------+--------- - a | integer | | not null | - b | character varying(10) | | not null | - c | character(1) | | | -Indexes: - "cwi_uniq_idx" PRIMARY KEY, btree (a, b) - -\d cwi_uniq_idx - Index "public.cwi_uniq_idx" - Column | Type | Key? | Definition ---------+-----------------------+------+------------ - a | integer | yes | a - b | character varying(10) | yes | b -primary key, btree, for table "public.cwi_test" - -CREATE UNIQUE INDEX cwi_uniq2_idx ON cwi_test(b , a); -ALTER TABLE cwi_test DROP CONSTRAINT cwi_uniq_idx, - ADD CONSTRAINT cwi_replaced_pkey PRIMARY KEY - USING INDEX cwi_uniq2_idx; -NOTICE: ALTER TABLE / ADD CONSTRAINT USING INDEX will rename index "cwi_uniq2_idx" to "cwi_replaced_pkey" -\d cwi_test - Table "public.cwi_test" - Column | Type | Collation | Nullable | Default ---------+-----------------------+-----------+----------+--------- - a | integer | | not null | - b | character varying(10) | | not null | - c | character(1) | | | -Indexes: - "cwi_replaced_pkey" PRIMARY KEY, btree (b, a) - -\d cwi_replaced_pkey - Index "public.cwi_replaced_pkey" - Column | Type | Key? | Definition ---------+-----------------------+------+------------ - b | character varying(10) | yes | b - a | integer | yes | a -primary key, btree, for table "public.cwi_test" - -DROP INDEX cwi_replaced_pkey; -- Should fail; a constraint depends on it -ERROR: cannot drop index cwi_replaced_pkey because constraint cwi_replaced_pkey on table cwi_test requires it -HINT: You can drop constraint cwi_replaced_pkey on table cwi_test instead. --- Check that non-default index options are rejected -CREATE UNIQUE INDEX cwi_uniq3_idx ON cwi_test(a desc); -ALTER TABLE cwi_test ADD UNIQUE USING INDEX cwi_uniq3_idx; -- fail -ERROR: index "cwi_uniq3_idx" column number 1 does not have default sorting behavior -LINE 1: ALTER TABLE cwi_test ADD UNIQUE USING INDEX cwi_uniq3_idx; - ^ -DETAIL: Cannot create a primary key or unique constraint using such an index. -CREATE UNIQUE INDEX cwi_uniq4_idx ON cwi_test(b collate "POSIX"); -ALTER TABLE cwi_test ADD UNIQUE USING INDEX cwi_uniq4_idx; -- fail -ERROR: index "cwi_uniq4_idx" column number 1 does not have default sorting behavior -LINE 1: ALTER TABLE cwi_test ADD UNIQUE USING INDEX cwi_uniq4_idx; - ^ -DETAIL: Cannot create a primary key or unique constraint using such an index. -DROP TABLE cwi_test; --- ADD CONSTRAINT USING INDEX is forbidden on partitioned tables -CREATE TABLE cwi_test(a int) PARTITION BY hash (a); -create unique index on cwi_test (a); -alter table cwi_test add primary key using index cwi_test_a_idx ; -ERROR: ALTER TABLE / ADD CONSTRAINT USING INDEX is not supported on partitioned tables -DROP TABLE cwi_test; --- --- Check handling of indexes on system columns --- -CREATE TABLE syscol_table (a INT); --- System columns cannot be indexed -CREATE INDEX ON syscolcol_table (ctid); -ERROR: relation "syscolcol_table" does not exist --- nor used in expressions -CREATE INDEX ON syscol_table ((ctid >= '(1000,0)')); -ERROR: index creation on system columns is not supported --- nor used in predicates -CREATE INDEX ON syscol_table (a) WHERE ctid >= '(1000,0)'; -ERROR: index creation on system columns is not supported -DROP TABLE syscol_table; --- --- Tests for IS NULL/IS NOT NULL with b-tree indexes --- -CREATE TABLE onek_with_null AS SELECT unique1, unique2 FROM onek; -INSERT INTO onek_with_null (unique1,unique2) VALUES (NULL, -1), (NULL, NULL); -CREATE UNIQUE INDEX onek_nulltest ON onek_with_null (unique2,unique1); -SET enable_seqscan = OFF; -SET enable_indexscan = ON; -SET enable_bitmapscan = ON; -SELECT count(*) FROM onek_with_null WHERE unique1 IS NULL; - count -------- - 2 -(1 row) - -SELECT count(*) FROM onek_with_null WHERE unique1 IS NULL AND unique2 IS NULL; - count -------- - 1 -(1 row) - -SELECT count(*) FROM onek_with_null WHERE unique1 IS NOT NULL; - count -------- - 1000 -(1 row) - -SELECT count(*) FROM onek_with_null WHERE unique1 IS NULL AND unique2 IS NOT NULL; - count -------- - 1 -(1 row) - -SELECT count(*) FROM onek_with_null WHERE unique1 IS NOT NULL AND unique1 > 500; - count -------- - 499 -(1 row) - -SELECT count(*) FROM onek_with_null WHERE unique1 IS NULL AND unique1 > 500; - count -------- - 0 -(1 row) - -DROP INDEX onek_nulltest; -CREATE UNIQUE INDEX onek_nulltest ON onek_with_null (unique2 desc,unique1); -SELECT count(*) FROM onek_with_null WHERE unique1 IS NULL; - count -------- - 2 -(1 row) - -SELECT count(*) FROM onek_with_null WHERE unique1 IS NULL AND unique2 IS NULL; - count -------- - 1 -(1 row) - -SELECT count(*) FROM onek_with_null WHERE unique1 IS NOT NULL; - count -------- - 1000 -(1 row) - -SELECT count(*) FROM onek_with_null WHERE unique1 IS NULL AND unique2 IS NOT NULL; - count -------- - 1 -(1 row) - -SELECT count(*) FROM onek_with_null WHERE unique1 IS NOT NULL AND unique1 > 500; - count -------- - 499 -(1 row) - -SELECT count(*) FROM onek_with_null WHERE unique1 IS NULL AND unique1 > 500; - count -------- - 0 -(1 row) - -DROP INDEX onek_nulltest; -CREATE UNIQUE INDEX onek_nulltest ON onek_with_null (unique2 desc nulls last,unique1); -SELECT count(*) FROM onek_with_null WHERE unique1 IS NULL; - count -------- - 2 -(1 row) - -SELECT count(*) FROM onek_with_null WHERE unique1 IS NULL AND unique2 IS NULL; - count -------- - 1 -(1 row) - -SELECT count(*) FROM onek_with_null WHERE unique1 IS NOT NULL; - count -------- - 1000 -(1 row) - -SELECT count(*) FROM onek_with_null WHERE unique1 IS NULL AND unique2 IS NOT NULL; - count -------- - 1 -(1 row) - -SELECT count(*) FROM onek_with_null WHERE unique1 IS NOT NULL AND unique1 > 500; - count -------- - 499 -(1 row) - -SELECT count(*) FROM onek_with_null WHERE unique1 IS NULL AND unique1 > 500; - count -------- - 0 -(1 row) - -DROP INDEX onek_nulltest; -CREATE UNIQUE INDEX onek_nulltest ON onek_with_null (unique2 nulls first,unique1); -SELECT count(*) FROM onek_with_null WHERE unique1 IS NULL; - count -------- - 2 -(1 row) - -SELECT count(*) FROM onek_with_null WHERE unique1 IS NULL AND unique2 IS NULL; - count -------- - 1 -(1 row) - -SELECT count(*) FROM onek_with_null WHERE unique1 IS NOT NULL; - count -------- - 1000 -(1 row) - -SELECT count(*) FROM onek_with_null WHERE unique1 IS NULL AND unique2 IS NOT NULL; - count -------- - 1 -(1 row) - -SELECT count(*) FROM onek_with_null WHERE unique1 IS NOT NULL AND unique1 > 500; - count -------- - 499 -(1 row) - -SELECT count(*) FROM onek_with_null WHERE unique1 IS NULL AND unique1 > 500; - count -------- - 0 -(1 row) - -DROP INDEX onek_nulltest; --- Check initial-positioning logic too -CREATE UNIQUE INDEX onek_nulltest ON onek_with_null (unique2); -SET enable_seqscan = OFF; -SET enable_indexscan = ON; -SET enable_bitmapscan = OFF; -SELECT unique1, unique2 FROM onek_with_null - ORDER BY unique2 LIMIT 2; - unique1 | unique2 ----------+--------- - | -1 - 147 | 0 -(2 rows) - -SELECT unique1, unique2 FROM onek_with_null WHERE unique2 >= -1 - ORDER BY unique2 LIMIT 2; - unique1 | unique2 ----------+--------- - | -1 - 147 | 0 -(2 rows) - -SELECT unique1, unique2 FROM onek_with_null WHERE unique2 >= 0 - ORDER BY unique2 LIMIT 2; - unique1 | unique2 ----------+--------- - 147 | 0 - 931 | 1 -(2 rows) - -SELECT unique1, unique2 FROM onek_with_null - ORDER BY unique2 DESC LIMIT 2; - unique1 | unique2 ----------+--------- - | - 278 | 999 -(2 rows) - -SELECT unique1, unique2 FROM onek_with_null WHERE unique2 >= -1 - ORDER BY unique2 DESC LIMIT 2; - unique1 | unique2 ----------+--------- - 278 | 999 - 0 | 998 -(2 rows) - -SELECT unique1, unique2 FROM onek_with_null WHERE unique2 < 999 - ORDER BY unique2 DESC LIMIT 2; - unique1 | unique2 ----------+--------- - 0 | 998 - 744 | 997 -(2 rows) - -RESET enable_seqscan; -RESET enable_indexscan; -RESET enable_bitmapscan; -DROP TABLE onek_with_null; --- --- Check bitmap index path planning --- -EXPLAIN (COSTS OFF) -SELECT * FROM tenk1 - WHERE thousand = 42 AND (tenthous = 1 OR tenthous = 3 OR tenthous = 42); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------ - Bitmap Heap Scan on tenk1 - Recheck Cond: (((thousand = 42) AND (tenthous = 1)) OR ((thousand = 42) AND (tenthous = 3)) OR ((thousand = 42) AND (tenthous = 42))) - -> BitmapOr - -> Bitmap Index Scan on tenk1_thous_tenthous - Index Cond: ((thousand = 42) AND (tenthous = 1)) - -> Bitmap Index Scan on tenk1_thous_tenthous - Index Cond: ((thousand = 42) AND (tenthous = 3)) - -> Bitmap Index Scan on tenk1_thous_tenthous - Index Cond: ((thousand = 42) AND (tenthous = 42)) -(9 rows) - -SELECT * FROM tenk1 - WHERE thousand = 42 AND (tenthous = 1 OR tenthous = 3 OR tenthous = 42); - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 42 | 5530 | 0 | 2 | 2 | 2 | 42 | 42 | 42 | 42 | 42 | 84 | 85 | QBAAAA | SEIAAA | OOOOxx -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM tenk1 - WHERE hundred = 42 AND (thousand = 42 OR thousand = 99); - QUERY PLAN ---------------------------------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on tenk1 - Recheck Cond: ((hundred = 42) AND ((thousand = 42) OR (thousand = 99))) - -> BitmapAnd - -> Bitmap Index Scan on tenk1_hundred - Index Cond: (hundred = 42) - -> BitmapOr - -> Bitmap Index Scan on tenk1_thous_tenthous - Index Cond: (thousand = 42) - -> Bitmap Index Scan on tenk1_thous_tenthous - Index Cond: (thousand = 99) -(11 rows) - -SELECT count(*) FROM tenk1 - WHERE hundred = 42 AND (thousand = 42 OR thousand = 99); - count -------- - 10 -(1 row) - --- --- Check behavior with duplicate index column contents --- -CREATE TABLE dupindexcols AS - SELECT unique1 as id, stringu2::text as f1 FROM tenk1; -CREATE INDEX dupindexcols_i ON dupindexcols (f1, id, f1 text_pattern_ops); -ANALYZE dupindexcols; -EXPLAIN (COSTS OFF) - SELECT count(*) FROM dupindexcols - WHERE f1 BETWEEN 'WA' AND 'ZZZ' and id < 1000 and f1 ~<~ 'YX'; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on dupindexcols - Recheck Cond: ((f1 >= 'WA'::text) AND (f1 <= 'ZZZ'::text) AND (id < 1000) AND (f1 ~<~ 'YX'::text)) - -> Bitmap Index Scan on dupindexcols_i - Index Cond: ((f1 >= 'WA'::text) AND (f1 <= 'ZZZ'::text) AND (id < 1000) AND (f1 ~<~ 'YX'::text)) -(5 rows) - -SELECT count(*) FROM dupindexcols - WHERE f1 BETWEEN 'WA' AND 'ZZZ' and id < 1000 and f1 ~<~ 'YX'; - count -------- - 97 -(1 row) - --- --- Check ordering of =ANY indexqual results (bug in 9.2.0) --- -vacuum tenk1; -- ensure we get consistent plans here -explain (costs off) -SELECT unique1 FROM tenk1 -WHERE unique1 IN (1,42,7) -ORDER BY unique1; - QUERY PLAN -------------------------------------------------------- - Index Only Scan using tenk1_unique1 on tenk1 - Index Cond: (unique1 = ANY ('{1,42,7}'::integer[])) -(2 rows) - -SELECT unique1 FROM tenk1 -WHERE unique1 IN (1,42,7) -ORDER BY unique1; - unique1 ---------- - 1 - 7 - 42 -(3 rows) - -explain (costs off) -SELECT thousand, tenthous FROM tenk1 -WHERE thousand < 2 AND tenthous IN (1001,3000) -ORDER BY thousand; - QUERY PLAN -------------------------------------------------------- - Index Only Scan using tenk1_thous_tenthous on tenk1 - Index Cond: (thousand < 2) - Filter: (tenthous = ANY ('{1001,3000}'::integer[])) -(3 rows) - -SELECT thousand, tenthous FROM tenk1 -WHERE thousand < 2 AND tenthous IN (1001,3000) -ORDER BY thousand; - thousand | tenthous -----------+---------- - 0 | 3000 - 1 | 1001 -(2 rows) - -SET enable_indexonlyscan = OFF; -explain (costs off) -SELECT thousand, tenthous FROM tenk1 -WHERE thousand < 2 AND tenthous IN (1001,3000) -ORDER BY thousand; - QUERY PLAN --------------------------------------------------------------------------------------- - Sort - Sort Key: thousand - -> Index Scan using tenk1_thous_tenthous on tenk1 - Index Cond: ((thousand < 2) AND (tenthous = ANY ('{1001,3000}'::integer[]))) -(4 rows) - -SELECT thousand, tenthous FROM tenk1 -WHERE thousand < 2 AND tenthous IN (1001,3000) -ORDER BY thousand; - thousand | tenthous -----------+---------- - 0 | 3000 - 1 | 1001 -(2 rows) - -RESET enable_indexonlyscan; --- --- Check elimination of constant-NULL subexpressions --- -explain (costs off) - select * from tenk1 where (thousand, tenthous) in ((1,1001), (null,null)); - QUERY PLAN ------------------------------------------------------- - Index Scan using tenk1_thous_tenthous on tenk1 - Index Cond: ((thousand = 1) AND (tenthous = 1001)) -(2 rows) - --- --- Check matching of boolean index columns to WHERE conditions and sort keys --- -create temp table boolindex (b bool, i int, unique(b, i), junk float); -explain (costs off) - select * from boolindex order by b, i limit 10; - QUERY PLAN -------------------------------------------------------- - Limit - -> Index Scan using boolindex_b_i_key on boolindex -(2 rows) - -explain (costs off) - select * from boolindex where b order by i limit 10; - QUERY PLAN -------------------------------------------------------- - Limit - -> Index Scan using boolindex_b_i_key on boolindex - Index Cond: (b = true) -(3 rows) - -explain (costs off) - select * from boolindex where b = true order by i desc limit 10; - QUERY PLAN ----------------------------------------------------------------- - Limit - -> Index Scan Backward using boolindex_b_i_key on boolindex - Index Cond: (b = true) -(3 rows) - -explain (costs off) - select * from boolindex where not b order by i limit 10; - QUERY PLAN -------------------------------------------------------- - Limit - -> Index Scan using boolindex_b_i_key on boolindex - Index Cond: (b = false) -(3 rows) - -explain (costs off) - select * from boolindex where b is true order by i desc limit 10; - QUERY PLAN ----------------------------------------------------------------- - Limit - -> Index Scan Backward using boolindex_b_i_key on boolindex - Index Cond: (b = true) -(3 rows) - -explain (costs off) - select * from boolindex where b is false order by i desc limit 10; - QUERY PLAN ----------------------------------------------------------------- - Limit - -> Index Scan Backward using boolindex_b_i_key on boolindex - Index Cond: (b = false) -(3 rows) - --- --- REINDEX (VERBOSE) --- -CREATE TABLE reindex_verbose(id integer primary key); -\set VERBOSITY terse \\ -- suppress machine-dependent details -REINDEX (VERBOSE) TABLE reindex_verbose; -INFO: index "reindex_verbose_pkey" was reindexed -\set VERBOSITY default -DROP TABLE reindex_verbose; --- --- REINDEX CONCURRENTLY --- -CREATE TABLE concur_reindex_tab (c1 int); --- REINDEX -REINDEX TABLE concur_reindex_tab; -- notice -NOTICE: table "concur_reindex_tab" has no indexes to reindex -REINDEX (CONCURRENTLY) TABLE concur_reindex_tab; -- notice -NOTICE: table "concur_reindex_tab" has no indexes that can be reindexed concurrently -ALTER TABLE concur_reindex_tab ADD COLUMN c2 text; -- add toast index --- Normal index with integer column -CREATE UNIQUE INDEX concur_reindex_ind1 ON concur_reindex_tab(c1); --- Normal index with text column -CREATE INDEX concur_reindex_ind2 ON concur_reindex_tab(c2); --- UNIQUE index with expression -CREATE UNIQUE INDEX concur_reindex_ind3 ON concur_reindex_tab(abs(c1)); --- Duplicate column names -CREATE INDEX concur_reindex_ind4 ON concur_reindex_tab(c1, c1, c2); --- Create table for check on foreign key dependence switch with indexes swapped -ALTER TABLE concur_reindex_tab ADD PRIMARY KEY USING INDEX concur_reindex_ind1; -CREATE TABLE concur_reindex_tab2 (c1 int REFERENCES concur_reindex_tab); -INSERT INTO concur_reindex_tab VALUES (1, 'a'); -INSERT INTO concur_reindex_tab VALUES (2, 'a'); --- Reindex concurrently of exclusion constraint currently not supported -CREATE TABLE concur_reindex_tab3 (c1 int, c2 int4range, EXCLUDE USING gist (c2 WITH &&)); -INSERT INTO concur_reindex_tab3 VALUES (3, '[1,2]'); -REINDEX INDEX CONCURRENTLY concur_reindex_tab3_c2_excl; -- error -ERROR: concurrent index creation for exclusion constraints is not supported -REINDEX TABLE CONCURRENTLY concur_reindex_tab3; -- succeeds with warning -WARNING: cannot reindex exclusion constraint index "public.concur_reindex_tab3_c2_excl" concurrently, skipping -INSERT INTO concur_reindex_tab3 VALUES (4, '[2,4]'); -ERROR: conflicting key value violates exclusion constraint "concur_reindex_tab3_c2_excl" -DETAIL: Key (c2)=([2,5)) conflicts with existing key (c2)=([1,3)). --- Check materialized views -CREATE MATERIALIZED VIEW concur_reindex_matview AS SELECT * FROM concur_reindex_tab; --- Dependency lookup before and after the follow-up REINDEX commands. --- These should remain consistent. -SELECT pg_describe_object(classid, objid, objsubid) as obj, - pg_describe_object(refclassid,refobjid,refobjsubid) as objref, - deptype -FROM pg_depend -WHERE classid = 'pg_class'::regclass AND - objid in ('concur_reindex_tab'::regclass, - 'concur_reindex_ind1'::regclass, - 'concur_reindex_ind2'::regclass, - 'concur_reindex_ind3'::regclass, - 'concur_reindex_ind4'::regclass, - 'concur_reindex_matview'::regclass) - ORDER BY 1, 2; - obj | objref | deptype -------------------------------------------+------------------------------------------------------------+--------- - index concur_reindex_ind1 | constraint concur_reindex_ind1 on table concur_reindex_tab | i - index concur_reindex_ind2 | column c2 of table concur_reindex_tab | a - index concur_reindex_ind3 | column c1 of table concur_reindex_tab | a - index concur_reindex_ind3 | table concur_reindex_tab | a - index concur_reindex_ind4 | column c1 of table concur_reindex_tab | a - index concur_reindex_ind4 | column c2 of table concur_reindex_tab | a - materialized view concur_reindex_matview | schema public | n - table concur_reindex_tab | schema public | n -(8 rows) - -REINDEX INDEX CONCURRENTLY concur_reindex_ind1; -REINDEX TABLE CONCURRENTLY concur_reindex_tab; -REINDEX TABLE CONCURRENTLY concur_reindex_matview; -SELECT pg_describe_object(classid, objid, objsubid) as obj, - pg_describe_object(refclassid,refobjid,refobjsubid) as objref, - deptype -FROM pg_depend -WHERE classid = 'pg_class'::regclass AND - objid in ('concur_reindex_tab'::regclass, - 'concur_reindex_ind1'::regclass, - 'concur_reindex_ind2'::regclass, - 'concur_reindex_ind3'::regclass, - 'concur_reindex_ind4'::regclass, - 'concur_reindex_matview'::regclass) - ORDER BY 1, 2; - obj | objref | deptype -------------------------------------------+------------------------------------------------------------+--------- - index concur_reindex_ind1 | constraint concur_reindex_ind1 on table concur_reindex_tab | i - index concur_reindex_ind2 | column c2 of table concur_reindex_tab | a - index concur_reindex_ind3 | column c1 of table concur_reindex_tab | a - index concur_reindex_ind3 | table concur_reindex_tab | a - index concur_reindex_ind4 | column c1 of table concur_reindex_tab | a - index concur_reindex_ind4 | column c2 of table concur_reindex_tab | a - materialized view concur_reindex_matview | schema public | n - table concur_reindex_tab | schema public | n -(8 rows) - --- Check that comments are preserved -CREATE TABLE testcomment (i int); -CREATE INDEX testcomment_idx1 ON testcomment (i); -COMMENT ON INDEX testcomment_idx1 IS 'test comment'; -SELECT obj_description('testcomment_idx1'::regclass, 'pg_class'); - obj_description ------------------ - test comment -(1 row) - -REINDEX TABLE testcomment; -SELECT obj_description('testcomment_idx1'::regclass, 'pg_class'); - obj_description ------------------ - test comment -(1 row) - -REINDEX TABLE CONCURRENTLY testcomment ; -SELECT obj_description('testcomment_idx1'::regclass, 'pg_class'); - obj_description ------------------ - test comment -(1 row) - -DROP TABLE testcomment; --- Check that indisclustered updates are preserved -CREATE TABLE concur_clustered(i int); -CREATE INDEX concur_clustered_i_idx ON concur_clustered(i); -ALTER TABLE concur_clustered CLUSTER ON concur_clustered_i_idx; -REINDEX TABLE CONCURRENTLY concur_clustered; -SELECT indexrelid::regclass, indisclustered FROM pg_index - WHERE indrelid = 'concur_clustered'::regclass; - indexrelid | indisclustered -------------------------+---------------- - concur_clustered_i_idx | t -(1 row) - -DROP TABLE concur_clustered; --- Check that indisreplident updates are preserved. -CREATE TABLE concur_replident(i int NOT NULL); -CREATE UNIQUE INDEX concur_replident_i_idx ON concur_replident(i); -ALTER TABLE concur_replident REPLICA IDENTITY - USING INDEX concur_replident_i_idx; -SELECT indexrelid::regclass, indisreplident FROM pg_index - WHERE indrelid = 'concur_replident'::regclass; - indexrelid | indisreplident -------------------------+---------------- - concur_replident_i_idx | t -(1 row) - -REINDEX TABLE CONCURRENTLY concur_replident; -SELECT indexrelid::regclass, indisreplident FROM pg_index - WHERE indrelid = 'concur_replident'::regclass; - indexrelid | indisreplident -------------------------+---------------- - concur_replident_i_idx | t -(1 row) - -DROP TABLE concur_replident; --- Check that opclass parameters are preserved -CREATE TABLE concur_appclass_tab(i tsvector, j tsvector, k tsvector); -CREATE INDEX concur_appclass_ind on concur_appclass_tab - USING gist (i tsvector_ops (siglen='1000'), j tsvector_ops (siglen='500')); -CREATE INDEX concur_appclass_ind_2 on concur_appclass_tab - USING gist (k tsvector_ops (siglen='300'), j tsvector_ops); -REINDEX TABLE CONCURRENTLY concur_appclass_tab; -\d concur_appclass_tab - Table "public.concur_appclass_tab" - Column | Type | Collation | Nullable | Default ---------+----------+-----------+----------+--------- - i | tsvector | | | - j | tsvector | | | - k | tsvector | | | -Indexes: - "concur_appclass_ind" gist (i tsvector_ops (siglen='1000'), j tsvector_ops (siglen='500')) - "concur_appclass_ind_2" gist (k tsvector_ops (siglen='300'), j) - -DROP TABLE concur_appclass_tab; --- Partitions --- Create some partitioned tables -CREATE TABLE concur_reindex_part (c1 int, c2 int) PARTITION BY RANGE (c1); -CREATE TABLE concur_reindex_part_0 PARTITION OF concur_reindex_part - FOR VALUES FROM (0) TO (10) PARTITION BY list (c2); -CREATE TABLE concur_reindex_part_0_1 PARTITION OF concur_reindex_part_0 - FOR VALUES IN (1); -CREATE TABLE concur_reindex_part_0_2 PARTITION OF concur_reindex_part_0 - FOR VALUES IN (2); --- This partitioned table will have no partitions. -CREATE TABLE concur_reindex_part_10 PARTITION OF concur_reindex_part - FOR VALUES FROM (10) TO (20) PARTITION BY list (c2); --- Create some partitioned indexes -CREATE INDEX concur_reindex_part_index ON ONLY concur_reindex_part (c1); -CREATE INDEX concur_reindex_part_index_0 ON ONLY concur_reindex_part_0 (c1); -ALTER INDEX concur_reindex_part_index ATTACH PARTITION concur_reindex_part_index_0; --- This partitioned index will have no partitions. -CREATE INDEX concur_reindex_part_index_10 ON ONLY concur_reindex_part_10 (c1); -ALTER INDEX concur_reindex_part_index ATTACH PARTITION concur_reindex_part_index_10; -CREATE INDEX concur_reindex_part_index_0_1 ON ONLY concur_reindex_part_0_1 (c1); -ALTER INDEX concur_reindex_part_index_0 ATTACH PARTITION concur_reindex_part_index_0_1; -CREATE INDEX concur_reindex_part_index_0_2 ON ONLY concur_reindex_part_0_2 (c1); -ALTER INDEX concur_reindex_part_index_0 ATTACH PARTITION concur_reindex_part_index_0_2; -SELECT relid, parentrelid, level FROM pg_partition_tree('concur_reindex_part_index') - ORDER BY relid, level; - relid | parentrelid | level --------------------------------+-----------------------------+------- - concur_reindex_part_index | | 0 - concur_reindex_part_index_0 | concur_reindex_part_index | 1 - concur_reindex_part_index_10 | concur_reindex_part_index | 1 - concur_reindex_part_index_0_1 | concur_reindex_part_index_0 | 2 - concur_reindex_part_index_0_2 | concur_reindex_part_index_0 | 2 -(5 rows) - -SELECT relid, parentrelid, level FROM pg_partition_tree('concur_reindex_part_index') - ORDER BY relid, level; - relid | parentrelid | level --------------------------------+-----------------------------+------- - concur_reindex_part_index | | 0 - concur_reindex_part_index_0 | concur_reindex_part_index | 1 - concur_reindex_part_index_10 | concur_reindex_part_index | 1 - concur_reindex_part_index_0_1 | concur_reindex_part_index_0 | 2 - concur_reindex_part_index_0_2 | concur_reindex_part_index_0 | 2 -(5 rows) - --- REINDEX should preserve dependencies of partition tree. -SELECT pg_describe_object(classid, objid, objsubid) as obj, - pg_describe_object(refclassid,refobjid,refobjsubid) as objref, - deptype -FROM pg_depend -WHERE classid = 'pg_class'::regclass AND - objid in ('concur_reindex_part'::regclass, - 'concur_reindex_part_0'::regclass, - 'concur_reindex_part_0_1'::regclass, - 'concur_reindex_part_0_2'::regclass, - 'concur_reindex_part_index'::regclass, - 'concur_reindex_part_index_0'::regclass, - 'concur_reindex_part_index_0_1'::regclass, - 'concur_reindex_part_index_0_2'::regclass) - ORDER BY 1, 2; - obj | objref | deptype -------------------------------------------+--------------------------------------------+--------- - column c1 of table concur_reindex_part | table concur_reindex_part | i - column c2 of table concur_reindex_part_0 | table concur_reindex_part_0 | i - index concur_reindex_part_index | column c1 of table concur_reindex_part | a - index concur_reindex_part_index_0 | column c1 of table concur_reindex_part_0 | a - index concur_reindex_part_index_0 | index concur_reindex_part_index | P - index concur_reindex_part_index_0 | table concur_reindex_part_0 | S - index concur_reindex_part_index_0_1 | column c1 of table concur_reindex_part_0_1 | a - index concur_reindex_part_index_0_1 | index concur_reindex_part_index_0 | P - index concur_reindex_part_index_0_1 | table concur_reindex_part_0_1 | S - index concur_reindex_part_index_0_2 | column c1 of table concur_reindex_part_0_2 | a - index concur_reindex_part_index_0_2 | index concur_reindex_part_index_0 | P - index concur_reindex_part_index_0_2 | table concur_reindex_part_0_2 | S - table concur_reindex_part | schema public | n - table concur_reindex_part_0 | schema public | n - table concur_reindex_part_0 | table concur_reindex_part | a - table concur_reindex_part_0_1 | schema public | n - table concur_reindex_part_0_1 | table concur_reindex_part_0 | a - table concur_reindex_part_0_2 | schema public | n - table concur_reindex_part_0_2 | table concur_reindex_part_0 | a -(19 rows) - -REINDEX INDEX CONCURRENTLY concur_reindex_part_index_0_1; -REINDEX INDEX CONCURRENTLY concur_reindex_part_index_0_2; -SELECT relid, parentrelid, level FROM pg_partition_tree('concur_reindex_part_index') - ORDER BY relid, level; - relid | parentrelid | level --------------------------------+-----------------------------+------- - concur_reindex_part_index | | 0 - concur_reindex_part_index_0 | concur_reindex_part_index | 1 - concur_reindex_part_index_10 | concur_reindex_part_index | 1 - concur_reindex_part_index_0_1 | concur_reindex_part_index_0 | 2 - concur_reindex_part_index_0_2 | concur_reindex_part_index_0 | 2 -(5 rows) - -REINDEX TABLE CONCURRENTLY concur_reindex_part_0_1; -REINDEX TABLE CONCURRENTLY concur_reindex_part_0_2; -SELECT pg_describe_object(classid, objid, objsubid) as obj, - pg_describe_object(refclassid,refobjid,refobjsubid) as objref, - deptype -FROM pg_depend -WHERE classid = 'pg_class'::regclass AND - objid in ('concur_reindex_part'::regclass, - 'concur_reindex_part_0'::regclass, - 'concur_reindex_part_0_1'::regclass, - 'concur_reindex_part_0_2'::regclass, - 'concur_reindex_part_index'::regclass, - 'concur_reindex_part_index_0'::regclass, - 'concur_reindex_part_index_0_1'::regclass, - 'concur_reindex_part_index_0_2'::regclass) - ORDER BY 1, 2; - obj | objref | deptype -------------------------------------------+--------------------------------------------+--------- - column c1 of table concur_reindex_part | table concur_reindex_part | i - column c2 of table concur_reindex_part_0 | table concur_reindex_part_0 | i - index concur_reindex_part_index | column c1 of table concur_reindex_part | a - index concur_reindex_part_index_0 | column c1 of table concur_reindex_part_0 | a - index concur_reindex_part_index_0 | index concur_reindex_part_index | P - index concur_reindex_part_index_0 | table concur_reindex_part_0 | S - index concur_reindex_part_index_0_1 | column c1 of table concur_reindex_part_0_1 | a - index concur_reindex_part_index_0_1 | index concur_reindex_part_index_0 | P - index concur_reindex_part_index_0_1 | table concur_reindex_part_0_1 | S - index concur_reindex_part_index_0_2 | column c1 of table concur_reindex_part_0_2 | a - index concur_reindex_part_index_0_2 | index concur_reindex_part_index_0 | P - index concur_reindex_part_index_0_2 | table concur_reindex_part_0_2 | S - table concur_reindex_part | schema public | n - table concur_reindex_part_0 | schema public | n - table concur_reindex_part_0 | table concur_reindex_part | a - table concur_reindex_part_0_1 | schema public | n - table concur_reindex_part_0_1 | table concur_reindex_part_0 | a - table concur_reindex_part_0_2 | schema public | n - table concur_reindex_part_0_2 | table concur_reindex_part_0 | a -(19 rows) - -SELECT relid, parentrelid, level FROM pg_partition_tree('concur_reindex_part_index') - ORDER BY relid, level; - relid | parentrelid | level --------------------------------+-----------------------------+------- - concur_reindex_part_index | | 0 - concur_reindex_part_index_0 | concur_reindex_part_index | 1 - concur_reindex_part_index_10 | concur_reindex_part_index | 1 - concur_reindex_part_index_0_1 | concur_reindex_part_index_0 | 2 - concur_reindex_part_index_0_2 | concur_reindex_part_index_0 | 2 -(5 rows) - --- REINDEX for partitioned indexes --- REINDEX TABLE fails for partitioned indexes --- Top-most parent index -REINDEX TABLE concur_reindex_part_index; -- error -ERROR: "concur_reindex_part_index" is not a table or materialized view -REINDEX TABLE CONCURRENTLY concur_reindex_part_index; -- error -ERROR: "concur_reindex_part_index" is not a table or materialized view --- Partitioned index with no leaves -REINDEX TABLE concur_reindex_part_index_10; -- error -ERROR: "concur_reindex_part_index_10" is not a table or materialized view -REINDEX TABLE CONCURRENTLY concur_reindex_part_index_10; -- error -ERROR: "concur_reindex_part_index_10" is not a table or materialized view --- Cannot run in a transaction block -BEGIN; -REINDEX INDEX concur_reindex_part_index; -ERROR: REINDEX INDEX cannot run inside a transaction block -CONTEXT: while reindexing partitioned index "public.concur_reindex_part_index" -ROLLBACK; --- Helper functions to track changes of relfilenodes in a partition tree. --- Create a table tracking the relfilenode state. -CREATE OR REPLACE FUNCTION create_relfilenode_part(relname text, indname text) - RETURNS VOID AS - $func$ - BEGIN - EXECUTE format(' - CREATE TABLE %I AS - SELECT oid, relname, relfilenode, relkind, reltoastrelid - FROM pg_class - WHERE oid IN - (SELECT relid FROM pg_partition_tree(''%I''));', - relname, indname); - END - $func$ LANGUAGE plpgsql; -CREATE OR REPLACE FUNCTION compare_relfilenode_part(tabname text) - RETURNS TABLE (relname name, relkind "char", state text) AS - $func$ - BEGIN - RETURN QUERY EXECUTE - format( - 'SELECT b.relname, - b.relkind, - CASE WHEN a.relfilenode = b.relfilenode THEN ''relfilenode is unchanged'' - ELSE ''relfilenode has changed'' END - -- Do not join with OID here as CONCURRENTLY changes it. - FROM %I b JOIN pg_class a ON b.relname = a.relname - ORDER BY 1;', tabname); - END - $func$ LANGUAGE plpgsql; --- Check that expected relfilenodes are changed, non-concurrent case. -SELECT create_relfilenode_part('reindex_index_status', 'concur_reindex_part_index'); - create_relfilenode_part -------------------------- - -(1 row) - -REINDEX INDEX concur_reindex_part_index; -SELECT * FROM compare_relfilenode_part('reindex_index_status'); - relname | relkind | state --------------------------------+---------+-------------------------- - concur_reindex_part_index | I | relfilenode is unchanged - concur_reindex_part_index_0 | I | relfilenode is unchanged - concur_reindex_part_index_0_1 | i | relfilenode has changed - concur_reindex_part_index_0_2 | i | relfilenode has changed - concur_reindex_part_index_10 | I | relfilenode is unchanged -(5 rows) - -DROP TABLE reindex_index_status; --- concurrent case. -SELECT create_relfilenode_part('reindex_index_status', 'concur_reindex_part_index'); - create_relfilenode_part -------------------------- - -(1 row) - -REINDEX INDEX CONCURRENTLY concur_reindex_part_index; -SELECT * FROM compare_relfilenode_part('reindex_index_status'); - relname | relkind | state --------------------------------+---------+-------------------------- - concur_reindex_part_index | I | relfilenode is unchanged - concur_reindex_part_index_0 | I | relfilenode is unchanged - concur_reindex_part_index_0_1 | i | relfilenode has changed - concur_reindex_part_index_0_2 | i | relfilenode has changed - concur_reindex_part_index_10 | I | relfilenode is unchanged -(5 rows) - -DROP TABLE reindex_index_status; --- REINDEX for partitioned tables --- REINDEX INDEX fails for partitioned tables --- Top-most parent -REINDEX INDEX concur_reindex_part; -- error -ERROR: "concur_reindex_part" is not an index -REINDEX INDEX CONCURRENTLY concur_reindex_part; -- error -ERROR: "concur_reindex_part" is not an index --- Partitioned with no leaves -REINDEX INDEX concur_reindex_part_10; -- error -ERROR: "concur_reindex_part_10" is not an index -REINDEX INDEX CONCURRENTLY concur_reindex_part_10; -- error -ERROR: "concur_reindex_part_10" is not an index --- Cannot run in a transaction block -BEGIN; -REINDEX TABLE concur_reindex_part; -ERROR: REINDEX TABLE cannot run inside a transaction block -CONTEXT: while reindexing partitioned table "public.concur_reindex_part" -ROLLBACK; --- Check that expected relfilenodes are changed, non-concurrent case. --- Note that the partition tree changes of the *indexes* need to be checked. -SELECT create_relfilenode_part('reindex_index_status', 'concur_reindex_part_index'); - create_relfilenode_part -------------------------- - -(1 row) - -REINDEX TABLE concur_reindex_part; -SELECT * FROM compare_relfilenode_part('reindex_index_status'); - relname | relkind | state --------------------------------+---------+-------------------------- - concur_reindex_part_index | I | relfilenode is unchanged - concur_reindex_part_index_0 | I | relfilenode is unchanged - concur_reindex_part_index_0_1 | i | relfilenode has changed - concur_reindex_part_index_0_2 | i | relfilenode has changed - concur_reindex_part_index_10 | I | relfilenode is unchanged -(5 rows) - -DROP TABLE reindex_index_status; --- concurrent case. -SELECT create_relfilenode_part('reindex_index_status', 'concur_reindex_part_index'); - create_relfilenode_part -------------------------- - -(1 row) - -REINDEX TABLE CONCURRENTLY concur_reindex_part; -SELECT * FROM compare_relfilenode_part('reindex_index_status'); - relname | relkind | state --------------------------------+---------+-------------------------- - concur_reindex_part_index | I | relfilenode is unchanged - concur_reindex_part_index_0 | I | relfilenode is unchanged - concur_reindex_part_index_0_1 | i | relfilenode has changed - concur_reindex_part_index_0_2 | i | relfilenode has changed - concur_reindex_part_index_10 | I | relfilenode is unchanged -(5 rows) - -DROP TABLE reindex_index_status; -DROP FUNCTION create_relfilenode_part; -DROP FUNCTION compare_relfilenode_part; --- Cleanup of partition tree used for REINDEX test. -DROP TABLE concur_reindex_part; --- Check errors --- Cannot run inside a transaction block -BEGIN; -REINDEX TABLE CONCURRENTLY concur_reindex_tab; -ERROR: REINDEX CONCURRENTLY cannot run inside a transaction block -COMMIT; -REINDEX TABLE CONCURRENTLY pg_class; -- no catalog relation -ERROR: cannot reindex system catalogs concurrently -REINDEX INDEX CONCURRENTLY pg_class_oid_index; -- no catalog index -ERROR: cannot reindex system catalogs concurrently --- These are the toast table and index of pg_authid. -REINDEX TABLE CONCURRENTLY pg_toast.pg_toast_1260; -- no catalog toast table -ERROR: cannot reindex system catalogs concurrently -REINDEX INDEX CONCURRENTLY pg_toast.pg_toast_1260_index; -- no catalog toast index -ERROR: cannot reindex system catalogs concurrently -REINDEX SYSTEM CONCURRENTLY postgres; -- not allowed for SYSTEM -ERROR: cannot reindex system catalogs concurrently --- Warns about catalog relations -REINDEX SCHEMA CONCURRENTLY pg_catalog; -WARNING: cannot reindex system catalogs concurrently, skipping all --- Check the relation status, there should not be invalid indexes -\d concur_reindex_tab - Table "public.concur_reindex_tab" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - c1 | integer | | not null | - c2 | text | | | -Indexes: - "concur_reindex_ind1" PRIMARY KEY, btree (c1) - "concur_reindex_ind2" btree (c2) - "concur_reindex_ind3" UNIQUE, btree (abs(c1)) - "concur_reindex_ind4" btree (c1, c1, c2) -Referenced by: - TABLE "concur_reindex_tab2" CONSTRAINT "concur_reindex_tab2_c1_fkey" FOREIGN KEY (c1) REFERENCES concur_reindex_tab(c1) - -DROP MATERIALIZED VIEW concur_reindex_matview; -DROP TABLE concur_reindex_tab, concur_reindex_tab2, concur_reindex_tab3; --- Check handling of invalid indexes -CREATE TABLE concur_reindex_tab4 (c1 int); -INSERT INTO concur_reindex_tab4 VALUES (1), (1), (2); --- This trick creates an invalid index. -CREATE UNIQUE INDEX CONCURRENTLY concur_reindex_ind5 ON concur_reindex_tab4 (c1); -ERROR: could not create unique index "concur_reindex_ind5" -DETAIL: Key (c1)=(1) is duplicated. --- Reindexing concurrently this index fails with the same failure. --- The extra index created is itself invalid, and can be dropped. -REINDEX INDEX CONCURRENTLY concur_reindex_ind5; -ERROR: could not create unique index "concur_reindex_ind5_ccnew" -DETAIL: Key (c1)=(1) is duplicated. -\d concur_reindex_tab4 - Table "public.concur_reindex_tab4" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - c1 | integer | | | -Indexes: - "concur_reindex_ind5" UNIQUE, btree (c1) INVALID - "concur_reindex_ind5_ccnew" UNIQUE, btree (c1) INVALID - -DROP INDEX concur_reindex_ind5_ccnew; --- This makes the previous failure go away, so the index can become valid. -DELETE FROM concur_reindex_tab4 WHERE c1 = 1; --- The invalid index is not processed when running REINDEX TABLE. -REINDEX TABLE CONCURRENTLY concur_reindex_tab4; -WARNING: cannot reindex invalid index "public.concur_reindex_ind5" concurrently, skipping -NOTICE: table "concur_reindex_tab4" has no indexes that can be reindexed concurrently -\d concur_reindex_tab4 - Table "public.concur_reindex_tab4" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - c1 | integer | | | -Indexes: - "concur_reindex_ind5" UNIQUE, btree (c1) INVALID - --- But it is fixed with REINDEX INDEX. -REINDEX INDEX CONCURRENTLY concur_reindex_ind5; -\d concur_reindex_tab4 - Table "public.concur_reindex_tab4" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - c1 | integer | | | -Indexes: - "concur_reindex_ind5" UNIQUE, btree (c1) - -DROP TABLE concur_reindex_tab4; --- Check handling of indexes with expressions and predicates. The --- definitions of the rebuilt indexes should match the original --- definitions. -CREATE TABLE concur_exprs_tab (c1 int , c2 boolean); -INSERT INTO concur_exprs_tab (c1, c2) VALUES (1369652450, FALSE), - (414515746, TRUE), - (897778963, FALSE); -CREATE UNIQUE INDEX concur_exprs_index_expr - ON concur_exprs_tab ((c1::text COLLATE "C")); -CREATE UNIQUE INDEX concur_exprs_index_pred ON concur_exprs_tab (c1) - WHERE (c1::text > 500000000::text COLLATE "C"); -CREATE UNIQUE INDEX concur_exprs_index_pred_2 - ON concur_exprs_tab ((1 / c1)) - WHERE ('-H') >= (c2::TEXT) COLLATE "C"; -ALTER INDEX concur_exprs_index_expr ALTER COLUMN 1 SET STATISTICS 100; -ANALYZE concur_exprs_tab; -SELECT starelid::regclass, count(*) FROM pg_statistic WHERE starelid IN ( - 'concur_exprs_index_expr'::regclass, - 'concur_exprs_index_pred'::regclass, - 'concur_exprs_index_pred_2'::regclass) - GROUP BY starelid ORDER BY starelid::regclass::text; - starelid | count --------------------------+------- - concur_exprs_index_expr | 1 -(1 row) - -SELECT pg_get_indexdef('concur_exprs_index_expr'::regclass); - pg_get_indexdef ---------------------------------------------------------------------------------------------------------------- - CREATE UNIQUE INDEX concur_exprs_index_expr ON public.concur_exprs_tab USING btree (((c1)::text) COLLATE "C") -(1 row) - -SELECT pg_get_indexdef('concur_exprs_index_pred'::regclass); - pg_get_indexdef ----------------------------------------------------------------------------------------------------------------------------------------------- - CREATE UNIQUE INDEX concur_exprs_index_pred ON public.concur_exprs_tab USING btree (c1) WHERE ((c1)::text > ((500000000)::text COLLATE "C")) -(1 row) - -SELECT pg_get_indexdef('concur_exprs_index_pred_2'::regclass); - pg_get_indexdef --------------------------------------------------------------------------------------------------------------------------------------------------- - CREATE UNIQUE INDEX concur_exprs_index_pred_2 ON public.concur_exprs_tab USING btree (((1 / c1))) WHERE ('-H'::text >= ((c2)::text COLLATE "C")) -(1 row) - -REINDEX TABLE CONCURRENTLY concur_exprs_tab; -SELECT pg_get_indexdef('concur_exprs_index_expr'::regclass); - pg_get_indexdef ---------------------------------------------------------------------------------------------------------------- - CREATE UNIQUE INDEX concur_exprs_index_expr ON public.concur_exprs_tab USING btree (((c1)::text) COLLATE "C") -(1 row) - -SELECT pg_get_indexdef('concur_exprs_index_pred'::regclass); - pg_get_indexdef ----------------------------------------------------------------------------------------------------------------------------------------------- - CREATE UNIQUE INDEX concur_exprs_index_pred ON public.concur_exprs_tab USING btree (c1) WHERE ((c1)::text > ((500000000)::text COLLATE "C")) -(1 row) - -SELECT pg_get_indexdef('concur_exprs_index_pred_2'::regclass); - pg_get_indexdef --------------------------------------------------------------------------------------------------------------------------------------------------- - CREATE UNIQUE INDEX concur_exprs_index_pred_2 ON public.concur_exprs_tab USING btree (((1 / c1))) WHERE ('-H'::text >= ((c2)::text COLLATE "C")) -(1 row) - --- ALTER TABLE recreates the indexes, which should keep their collations. -ALTER TABLE concur_exprs_tab ALTER c2 TYPE TEXT; -SELECT pg_get_indexdef('concur_exprs_index_expr'::regclass); - pg_get_indexdef ---------------------------------------------------------------------------------------------------------------- - CREATE UNIQUE INDEX concur_exprs_index_expr ON public.concur_exprs_tab USING btree (((c1)::text) COLLATE "C") -(1 row) - -SELECT pg_get_indexdef('concur_exprs_index_pred'::regclass); - pg_get_indexdef ----------------------------------------------------------------------------------------------------------------------------------------------- - CREATE UNIQUE INDEX concur_exprs_index_pred ON public.concur_exprs_tab USING btree (c1) WHERE ((c1)::text > ((500000000)::text COLLATE "C")) -(1 row) - -SELECT pg_get_indexdef('concur_exprs_index_pred_2'::regclass); - pg_get_indexdef ------------------------------------------------------------------------------------------------------------------------------------------- - CREATE UNIQUE INDEX concur_exprs_index_pred_2 ON public.concur_exprs_tab USING btree (((1 / c1))) WHERE ('-H'::text >= (c2 COLLATE "C")) -(1 row) - --- Statistics should remain intact. -SELECT starelid::regclass, count(*) FROM pg_statistic WHERE starelid IN ( - 'concur_exprs_index_expr'::regclass, - 'concur_exprs_index_pred'::regclass, - 'concur_exprs_index_pred_2'::regclass) - GROUP BY starelid ORDER BY starelid::regclass::text; - starelid | count --------------------------+------- - concur_exprs_index_expr | 1 -(1 row) - --- attstattarget should remain intact -SELECT attrelid::regclass, attnum, attstattarget - FROM pg_attribute WHERE attrelid IN ( - 'concur_exprs_index_expr'::regclass, - 'concur_exprs_index_pred'::regclass, - 'concur_exprs_index_pred_2'::regclass) - ORDER BY attrelid::regclass::text, attnum; - attrelid | attnum | attstattarget ----------------------------+--------+--------------- - concur_exprs_index_expr | 1 | 100 - concur_exprs_index_pred | 1 | -1 - concur_exprs_index_pred_2 | 1 | -1 -(3 rows) - -DROP TABLE concur_exprs_tab; --- Temporary tables and on-commit actions, where CONCURRENTLY is ignored. --- ON COMMIT PRESERVE ROWS, the default. -CREATE TEMP TABLE concur_temp_tab_1 (c1 int, c2 text) - ON COMMIT PRESERVE ROWS; -INSERT INTO concur_temp_tab_1 VALUES (1, 'foo'), (2, 'bar'); -CREATE INDEX concur_temp_ind_1 ON concur_temp_tab_1(c2); -REINDEX TABLE CONCURRENTLY concur_temp_tab_1; -REINDEX INDEX CONCURRENTLY concur_temp_ind_1; --- Still fails in transaction blocks -BEGIN; -REINDEX INDEX CONCURRENTLY concur_temp_ind_1; -ERROR: REINDEX CONCURRENTLY cannot run inside a transaction block -COMMIT; --- ON COMMIT DELETE ROWS -CREATE TEMP TABLE concur_temp_tab_2 (c1 int, c2 text) - ON COMMIT DELETE ROWS; -CREATE INDEX concur_temp_ind_2 ON concur_temp_tab_2(c2); -REINDEX TABLE CONCURRENTLY concur_temp_tab_2; -REINDEX INDEX CONCURRENTLY concur_temp_ind_2; --- ON COMMIT DROP -BEGIN; -CREATE TEMP TABLE concur_temp_tab_3 (c1 int, c2 text) - ON COMMIT PRESERVE ROWS; -INSERT INTO concur_temp_tab_3 VALUES (1, 'foo'), (2, 'bar'); -CREATE INDEX concur_temp_ind_3 ON concur_temp_tab_3(c2); --- Fails when running in a transaction -REINDEX INDEX CONCURRENTLY concur_temp_ind_3; -ERROR: REINDEX CONCURRENTLY cannot run inside a transaction block -COMMIT; --- REINDEX SCHEMA processes all temporary relations -CREATE TABLE reindex_temp_before AS -SELECT oid, relname, relfilenode, relkind, reltoastrelid - FROM pg_class - WHERE relname IN ('concur_temp_ind_1', 'concur_temp_ind_2'); -SELECT pg_my_temp_schema()::regnamespace as temp_schema_name \gset -REINDEX SCHEMA CONCURRENTLY :temp_schema_name; -SELECT b.relname, - b.relkind, - CASE WHEN a.relfilenode = b.relfilenode THEN 'relfilenode is unchanged' - ELSE 'relfilenode has changed' END - FROM reindex_temp_before b JOIN pg_class a ON b.oid = a.oid - ORDER BY 1; - relname | relkind | case --------------------+---------+------------------------- - concur_temp_ind_1 | i | relfilenode has changed - concur_temp_ind_2 | i | relfilenode has changed -(2 rows) - -DROP TABLE concur_temp_tab_1, concur_temp_tab_2, reindex_temp_before; --- --- REINDEX SCHEMA --- -REINDEX SCHEMA schema_to_reindex; -- failure, schema does not exist -ERROR: schema "schema_to_reindex" does not exist -CREATE SCHEMA schema_to_reindex; -SET search_path = 'schema_to_reindex'; -CREATE TABLE table1(col1 SERIAL PRIMARY KEY); -INSERT INTO table1 SELECT generate_series(1,400); -CREATE TABLE table2(col1 SERIAL PRIMARY KEY, col2 TEXT NOT NULL); -INSERT INTO table2 SELECT generate_series(1,400), 'abc'; -CREATE INDEX ON table2(col2); -CREATE MATERIALIZED VIEW matview AS SELECT col1 FROM table2; -CREATE INDEX ON matview(col1); -CREATE VIEW view AS SELECT col2 FROM table2; -CREATE TABLE reindex_before AS -SELECT oid, relname, relfilenode, relkind, reltoastrelid - FROM pg_class - where relnamespace = (SELECT oid FROM pg_namespace WHERE nspname = 'schema_to_reindex'); -INSERT INTO reindex_before -SELECT oid, 'pg_toast_TABLE', relfilenode, relkind, reltoastrelid -FROM pg_class WHERE oid IN - (SELECT reltoastrelid FROM reindex_before WHERE reltoastrelid > 0); -INSERT INTO reindex_before -SELECT oid, 'pg_toast_TABLE_index', relfilenode, relkind, reltoastrelid -FROM pg_class where oid in - (select indexrelid from pg_index where indrelid in - (select reltoastrelid from reindex_before where reltoastrelid > 0)); -REINDEX SCHEMA schema_to_reindex; -CREATE TABLE reindex_after AS SELECT oid, relname, relfilenode, relkind - FROM pg_class - where relnamespace = (SELECT oid FROM pg_namespace WHERE nspname = 'schema_to_reindex'); -SELECT b.relname, - b.relkind, - CASE WHEN a.relfilenode = b.relfilenode THEN 'relfilenode is unchanged' - ELSE 'relfilenode has changed' END - FROM reindex_before b JOIN pg_class a ON b.oid = a.oid - ORDER BY 1; - relname | relkind | case -----------------------+---------+-------------------------- - matview | m | relfilenode is unchanged - matview_col1_idx | i | relfilenode has changed - pg_toast_TABLE | t | relfilenode is unchanged - pg_toast_TABLE_index | i | relfilenode has changed - table1 | r | relfilenode is unchanged - table1_col1_seq | S | relfilenode is unchanged - table1_pkey | i | relfilenode has changed - table2 | r | relfilenode is unchanged - table2_col1_seq | S | relfilenode is unchanged - table2_col2_idx | i | relfilenode has changed - table2_pkey | i | relfilenode has changed - view | v | relfilenode is unchanged -(12 rows) - -REINDEX SCHEMA schema_to_reindex; -BEGIN; -REINDEX SCHEMA schema_to_reindex; -- failure, cannot run in a transaction -ERROR: REINDEX SCHEMA cannot run inside a transaction block -END; --- concurrently -REINDEX SCHEMA CONCURRENTLY schema_to_reindex; --- Failure for unauthorized user -CREATE ROLE regress_reindexuser NOLOGIN; -SET SESSION ROLE regress_reindexuser; -REINDEX SCHEMA schema_to_reindex; -ERROR: must be owner of schema schema_to_reindex --- Permission failures with toast tables and indexes (pg_authid here) -RESET ROLE; -GRANT USAGE ON SCHEMA pg_toast TO regress_reindexuser; -SET SESSION ROLE regress_reindexuser; -REINDEX TABLE pg_toast.pg_toast_1260; -ERROR: must be owner of table pg_toast_1260 -REINDEX INDEX pg_toast.pg_toast_1260_index; -ERROR: must be owner of index pg_toast_1260_index --- Clean up -RESET ROLE; -REVOKE USAGE ON SCHEMA pg_toast FROM regress_reindexuser; -DROP ROLE regress_reindexuser; -DROP SCHEMA schema_to_reindex CASCADE; -NOTICE: drop cascades to 6 other objects -DETAIL: drop cascades to table table1 -drop cascades to table table2 -drop cascades to materialized view matview -drop cascades to view view -drop cascades to table reindex_before -drop cascades to table reindex_after +server closed the connection unexpectedly + This probably means the server terminated abnormally + before or while processing the request. +connection to server was lost diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/create_index_spgist.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/create_index_spgist.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/create_index_spgist.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/create_index_spgist.out 2023-02-20 19:45:19.079209873 -0500 @@ -342,997 +342,7 @@ SELECT * FROM quad_point_tbl_ord_seq1 seq FULL JOIN quad_point_tbl_ord_idx1 idx ON seq.n = idx.n WHERE seq.dist IS DISTINCT FROM idx.dist; - n | dist | p | n | dist | p ----+------+---+---+------+--- -(0 rows) - -EXPLAIN (COSTS OFF) -SELECT row_number() OVER (ORDER BY p <-> '0,0') n, p <-> '0,0' dist, p -FROM quad_point_tbl WHERE p <@ box '(200,200,1000,1000)'; - QUERY PLAN ------------------------------------------------------------ - WindowAgg - -> Index Only Scan using sp_quad_ind on quad_point_tbl - Index Cond: (p <@ '(1000,1000),(200,200)'::box) - Order By: (p <-> '(0,0)'::point) -(4 rows) - -CREATE TEMP TABLE quad_point_tbl_ord_idx2 AS -SELECT row_number() OVER (ORDER BY p <-> '0,0') n, p <-> '0,0' dist, p -FROM quad_point_tbl WHERE p <@ box '(200,200,1000,1000)'; -SELECT * FROM quad_point_tbl_ord_seq2 seq FULL JOIN quad_point_tbl_ord_idx2 idx -ON seq.n = idx.n -WHERE seq.dist IS DISTINCT FROM idx.dist; - n | dist | p | n | dist | p ----+------+---+---+------+--- -(0 rows) - -EXPLAIN (COSTS OFF) -SELECT row_number() OVER (ORDER BY p <-> '333,400') n, p <-> '333,400' dist, p -FROM quad_point_tbl WHERE p IS NOT NULL; - QUERY PLAN ------------------------------------------------------------ - WindowAgg - -> Index Only Scan using sp_quad_ind on quad_point_tbl - Index Cond: (p IS NOT NULL) - Order By: (p <-> '(333,400)'::point) -(4 rows) - -CREATE TEMP TABLE quad_point_tbl_ord_idx3 AS -SELECT row_number() OVER (ORDER BY p <-> '333,400') n, p <-> '333,400' dist, p -FROM quad_point_tbl WHERE p IS NOT NULL; -SELECT * FROM quad_point_tbl_ord_seq3 seq FULL JOIN quad_point_tbl_ord_idx3 idx -ON seq.n = idx.n -WHERE seq.dist IS DISTINCT FROM idx.dist; - n | dist | p | n | dist | p ----+------+---+---+------+--- -(0 rows) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM kd_point_tbl WHERE p <@ box '(200,200,1000,1000)'; - QUERY PLAN ---------------------------------------------------------- - Aggregate - -> Index Only Scan using sp_kd_ind on kd_point_tbl - Index Cond: (p <@ '(1000,1000),(200,200)'::box) -(3 rows) - -SELECT count(*) FROM kd_point_tbl WHERE p <@ box '(200,200,1000,1000)'; - count -------- - 1057 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM kd_point_tbl WHERE box '(200,200,1000,1000)' @> p; - QUERY PLAN ---------------------------------------------------------- - Aggregate - -> Index Only Scan using sp_kd_ind on kd_point_tbl - Index Cond: (p <@ '(1000,1000),(200,200)'::box) -(3 rows) - -SELECT count(*) FROM kd_point_tbl WHERE box '(200,200,1000,1000)' @> p; - count -------- - 1057 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM kd_point_tbl WHERE p << '(5000, 4000)'; - QUERY PLAN -------------------------------------------------------- - Aggregate - -> Index Only Scan using sp_kd_ind on kd_point_tbl - Index Cond: (p << '(5000,4000)'::point) -(3 rows) - -SELECT count(*) FROM kd_point_tbl WHERE p << '(5000, 4000)'; - count -------- - 6000 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM kd_point_tbl WHERE p >> '(5000, 4000)'; - QUERY PLAN -------------------------------------------------------- - Aggregate - -> Index Only Scan using sp_kd_ind on kd_point_tbl - Index Cond: (p >> '(5000,4000)'::point) -(3 rows) - -SELECT count(*) FROM kd_point_tbl WHERE p >> '(5000, 4000)'; - count -------- - 4999 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM kd_point_tbl WHERE p <<| '(5000, 4000)'; - QUERY PLAN -------------------------------------------------------- - Aggregate - -> Index Only Scan using sp_kd_ind on kd_point_tbl - Index Cond: (p <<| '(5000,4000)'::point) -(3 rows) - -SELECT count(*) FROM kd_point_tbl WHERE p <<| '(5000, 4000)'; - count -------- - 5000 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM kd_point_tbl WHERE p |>> '(5000, 4000)'; - QUERY PLAN -------------------------------------------------------- - Aggregate - -> Index Only Scan using sp_kd_ind on kd_point_tbl - Index Cond: (p |>> '(5000,4000)'::point) -(3 rows) - -SELECT count(*) FROM kd_point_tbl WHERE p |>> '(5000, 4000)'; - count -------- - 5999 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM kd_point_tbl WHERE p ~= '(4585, 365)'; - QUERY PLAN -------------------------------------------------------- - Aggregate - -> Index Only Scan using sp_kd_ind on kd_point_tbl - Index Cond: (p ~= '(4585,365)'::point) -(3 rows) - -SELECT count(*) FROM kd_point_tbl WHERE p ~= '(4585, 365)'; - count -------- - 1 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT row_number() OVER (ORDER BY p <-> '0,0') n, p <-> '0,0' dist, p -FROM kd_point_tbl; - QUERY PLAN -------------------------------------------------------- - WindowAgg - -> Index Only Scan using sp_kd_ind on kd_point_tbl - Order By: (p <-> '(0,0)'::point) -(3 rows) - -CREATE TEMP TABLE kd_point_tbl_ord_idx1 AS -SELECT row_number() OVER (ORDER BY p <-> '0,0') n, p <-> '0,0' dist, p -FROM kd_point_tbl; -SELECT * FROM quad_point_tbl_ord_seq1 seq FULL JOIN kd_point_tbl_ord_idx1 idx -ON seq.n = idx.n -WHERE seq.dist IS DISTINCT FROM idx.dist; - n | dist | p | n | dist | p ----+------+---+---+------+--- -(0 rows) - -EXPLAIN (COSTS OFF) -SELECT row_number() OVER (ORDER BY p <-> '0,0') n, p <-> '0,0' dist, p -FROM kd_point_tbl WHERE p <@ box '(200,200,1000,1000)'; - QUERY PLAN ---------------------------------------------------------- - WindowAgg - -> Index Only Scan using sp_kd_ind on kd_point_tbl - Index Cond: (p <@ '(1000,1000),(200,200)'::box) - Order By: (p <-> '(0,0)'::point) -(4 rows) - -CREATE TEMP TABLE kd_point_tbl_ord_idx2 AS -SELECT row_number() OVER (ORDER BY p <-> '0,0') n, p <-> '0,0' dist, p -FROM kd_point_tbl WHERE p <@ box '(200,200,1000,1000)'; -SELECT * FROM quad_point_tbl_ord_seq2 seq FULL JOIN kd_point_tbl_ord_idx2 idx -ON seq.n = idx.n -WHERE seq.dist IS DISTINCT FROM idx.dist; - n | dist | p | n | dist | p ----+------+---+---+------+--- -(0 rows) - -EXPLAIN (COSTS OFF) -SELECT row_number() OVER (ORDER BY p <-> '333,400') n, p <-> '333,400' dist, p -FROM kd_point_tbl WHERE p IS NOT NULL; - QUERY PLAN -------------------------------------------------------- - WindowAgg - -> Index Only Scan using sp_kd_ind on kd_point_tbl - Index Cond: (p IS NOT NULL) - Order By: (p <-> '(333,400)'::point) -(4 rows) - -CREATE TEMP TABLE kd_point_tbl_ord_idx3 AS -SELECT row_number() OVER (ORDER BY p <-> '333,400') n, p <-> '333,400' dist, p -FROM kd_point_tbl WHERE p IS NOT NULL; -SELECT * FROM quad_point_tbl_ord_seq3 seq FULL JOIN kd_point_tbl_ord_idx3 idx -ON seq.n = idx.n -WHERE seq.dist IS DISTINCT FROM idx.dist; - n | dist | p | n | dist | p ----+------+---+---+------+--- -(0 rows) - --- test KNN scan with included columns --- the distance numbers are not exactly the same across platforms -SET extra_float_digits = 0; -CREATE INDEX ON quad_point_tbl_ord_seq1 USING spgist(p) INCLUDE(dist); -EXPLAIN (COSTS OFF) -SELECT p, dist FROM quad_point_tbl_ord_seq1 ORDER BY p <-> '0,0' LIMIT 10; - QUERY PLAN -------------------------------------------------------------------------------------------- - Limit - -> Index Only Scan using quad_point_tbl_ord_seq1_p_dist_idx on quad_point_tbl_ord_seq1 - Order By: (p <-> '(0,0)'::point) -(3 rows) - -SELECT p, dist FROM quad_point_tbl_ord_seq1 ORDER BY p <-> '0,0' LIMIT 10; - p | dist ------------+------------------ - (59,21) | 62.6258732474047 - (88,104) | 136.235090927411 - (39,143) | 148.222805262888 - (139,160) | 211.945747775227 - (209,38) | 212.42645786248 - (157,156) | 221.325552072055 - (175,150) | 230.488611432322 - (236,34) | 238.436574375661 - (263,28) | 264.486294540946 - (322,53) | 326.33265236565 -(10 rows) - -RESET extra_float_digits; --- check ORDER BY distance to NULL -SELECT (SELECT p FROM kd_point_tbl ORDER BY p <-> pt, p <-> '0,0' LIMIT 1) -FROM (VALUES (point '1,2'), (NULL), ('1234,5678')) pts(pt); - p -------------- - (59,21) - (59,21) - (1239,5647) -(3 rows) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM radix_text_tbl WHERE t = 'P0123456789abcdef'; - QUERY PLAN ------------------------------------------------------------- - Aggregate - -> Index Only Scan using sp_radix_ind on radix_text_tbl - Index Cond: (t = 'P0123456789abcdef'::text) -(3 rows) - -SELECT count(*) FROM radix_text_tbl WHERE t = 'P0123456789abcdef'; - count -------- - 1000 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM radix_text_tbl WHERE t = 'P0123456789abcde'; - QUERY PLAN ------------------------------------------------------------- - Aggregate - -> Index Only Scan using sp_radix_ind on radix_text_tbl - Index Cond: (t = 'P0123456789abcde'::text) -(3 rows) - -SELECT count(*) FROM radix_text_tbl WHERE t = 'P0123456789abcde'; - count -------- - 1 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM radix_text_tbl WHERE t = 'P0123456789abcdefF'; - QUERY PLAN ------------------------------------------------------------- - Aggregate - -> Index Only Scan using sp_radix_ind on radix_text_tbl - Index Cond: (t = 'P0123456789abcdefF'::text) -(3 rows) - -SELECT count(*) FROM radix_text_tbl WHERE t = 'P0123456789abcdefF'; - count -------- - 1 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM radix_text_tbl WHERE t < 'Aztec Ct '; - QUERY PLAN ----------------------------------------------------------------------- - Aggregate - -> Index Only Scan using sp_radix_ind on radix_text_tbl - Index Cond: (t < 'Aztec Ct '::text) -(3 rows) - -SELECT count(*) FROM radix_text_tbl WHERE t < 'Aztec Ct '; - count -------- - 272 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM radix_text_tbl WHERE t ~<~ 'Aztec Ct '; - QUERY PLAN ------------------------------------------------------------------------- - Aggregate - -> Index Only Scan using sp_radix_ind on radix_text_tbl - Index Cond: (t ~<~ 'Aztec Ct '::text) -(3 rows) - -SELECT count(*) FROM radix_text_tbl WHERE t ~<~ 'Aztec Ct '; - count -------- - 272 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM radix_text_tbl WHERE t <= 'Aztec Ct '; - QUERY PLAN ------------------------------------------------------------------------ - Aggregate - -> Index Only Scan using sp_radix_ind on radix_text_tbl - Index Cond: (t <= 'Aztec Ct '::text) -(3 rows) - -SELECT count(*) FROM radix_text_tbl WHERE t <= 'Aztec Ct '; - count -------- - 273 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM radix_text_tbl WHERE t ~<=~ 'Aztec Ct '; - QUERY PLAN -------------------------------------------------------------------------- - Aggregate - -> Index Only Scan using sp_radix_ind on radix_text_tbl - Index Cond: (t ~<=~ 'Aztec Ct '::text) -(3 rows) - -SELECT count(*) FROM radix_text_tbl WHERE t ~<=~ 'Aztec Ct '; - count -------- - 273 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM radix_text_tbl WHERE t = 'Aztec Ct '; - QUERY PLAN ----------------------------------------------------------------------- - Aggregate - -> Index Only Scan using sp_radix_ind on radix_text_tbl - Index Cond: (t = 'Aztec Ct '::text) -(3 rows) - -SELECT count(*) FROM radix_text_tbl WHERE t = 'Aztec Ct '; - count -------- - 1 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM radix_text_tbl WHERE t = 'Worth St '; - QUERY PLAN ----------------------------------------------------------------------- - Aggregate - -> Index Only Scan using sp_radix_ind on radix_text_tbl - Index Cond: (t = 'Worth St '::text) -(3 rows) - -SELECT count(*) FROM radix_text_tbl WHERE t = 'Worth St '; - count -------- - 2 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM radix_text_tbl WHERE t >= 'Worth St '; - QUERY PLAN ------------------------------------------------------------------------ - Aggregate - -> Index Only Scan using sp_radix_ind on radix_text_tbl - Index Cond: (t >= 'Worth St '::text) -(3 rows) - -SELECT count(*) FROM radix_text_tbl WHERE t >= 'Worth St '; - count -------- - 50 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM radix_text_tbl WHERE t ~>=~ 'Worth St '; - QUERY PLAN -------------------------------------------------------------------------- - Aggregate - -> Index Only Scan using sp_radix_ind on radix_text_tbl - Index Cond: (t ~>=~ 'Worth St '::text) -(3 rows) - -SELECT count(*) FROM radix_text_tbl WHERE t ~>=~ 'Worth St '; - count -------- - 50 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM radix_text_tbl WHERE t > 'Worth St '; - QUERY PLAN ----------------------------------------------------------------------- - Aggregate - -> Index Only Scan using sp_radix_ind on radix_text_tbl - Index Cond: (t > 'Worth St '::text) -(3 rows) - -SELECT count(*) FROM radix_text_tbl WHERE t > 'Worth St '; - count -------- - 48 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM radix_text_tbl WHERE t ~>~ 'Worth St '; - QUERY PLAN ------------------------------------------------------------------------- - Aggregate - -> Index Only Scan using sp_radix_ind on radix_text_tbl - Index Cond: (t ~>~ 'Worth St '::text) -(3 rows) - -SELECT count(*) FROM radix_text_tbl WHERE t ~>~ 'Worth St '; - count -------- - 48 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM radix_text_tbl WHERE t ^@ 'Worth'; - QUERY PLAN ------------------------------------------------------------- - Aggregate - -> Index Only Scan using sp_radix_ind on radix_text_tbl - Index Cond: (t ^@ 'Worth'::text) -(3 rows) - -SELECT count(*) FROM radix_text_tbl WHERE t ^@ 'Worth'; - count -------- - 2 -(1 row) - --- Now check the results from bitmap indexscan -SET enable_seqscan = OFF; -SET enable_indexscan = OFF; -SET enable_bitmapscan = ON; -EXPLAIN (COSTS OFF) -SELECT count(*) FROM quad_point_tbl WHERE p IS NULL; - QUERY PLAN ----------------------------------------------- - Aggregate - -> Bitmap Heap Scan on quad_point_tbl - Recheck Cond: (p IS NULL) - -> Bitmap Index Scan on sp_quad_ind - Index Cond: (p IS NULL) -(5 rows) - -SELECT count(*) FROM quad_point_tbl WHERE p IS NULL; - count -------- - 3 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM quad_point_tbl WHERE p IS NOT NULL; - QUERY PLAN ----------------------------------------------- - Aggregate - -> Bitmap Heap Scan on quad_point_tbl - Recheck Cond: (p IS NOT NULL) - -> Bitmap Index Scan on sp_quad_ind - Index Cond: (p IS NOT NULL) -(5 rows) - -SELECT count(*) FROM quad_point_tbl WHERE p IS NOT NULL; - count -------- - 11000 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM quad_point_tbl; - QUERY PLAN ----------------------------------------------- - Aggregate - -> Bitmap Heap Scan on quad_point_tbl - -> Bitmap Index Scan on sp_quad_ind -(3 rows) - -SELECT count(*) FROM quad_point_tbl; - count -------- - 11003 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM quad_point_tbl WHERE p <@ box '(200,200,1000,1000)'; - QUERY PLAN ---------------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on quad_point_tbl - Recheck Cond: (p <@ '(1000,1000),(200,200)'::box) - -> Bitmap Index Scan on sp_quad_ind - Index Cond: (p <@ '(1000,1000),(200,200)'::box) -(5 rows) - -SELECT count(*) FROM quad_point_tbl WHERE p <@ box '(200,200,1000,1000)'; - count -------- - 1057 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM quad_point_tbl WHERE box '(200,200,1000,1000)' @> p; - QUERY PLAN ---------------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on quad_point_tbl - Recheck Cond: ('(1000,1000),(200,200)'::box @> p) - -> Bitmap Index Scan on sp_quad_ind - Index Cond: (p <@ '(1000,1000),(200,200)'::box) -(5 rows) - -SELECT count(*) FROM quad_point_tbl WHERE box '(200,200,1000,1000)' @> p; - count -------- - 1057 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM quad_point_tbl WHERE p << '(5000, 4000)'; - QUERY PLAN -------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on quad_point_tbl - Recheck Cond: (p << '(5000,4000)'::point) - -> Bitmap Index Scan on sp_quad_ind - Index Cond: (p << '(5000,4000)'::point) -(5 rows) - -SELECT count(*) FROM quad_point_tbl WHERE p << '(5000, 4000)'; - count -------- - 6000 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM quad_point_tbl WHERE p >> '(5000, 4000)'; - QUERY PLAN -------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on quad_point_tbl - Recheck Cond: (p >> '(5000,4000)'::point) - -> Bitmap Index Scan on sp_quad_ind - Index Cond: (p >> '(5000,4000)'::point) -(5 rows) - -SELECT count(*) FROM quad_point_tbl WHERE p >> '(5000, 4000)'; - count -------- - 4999 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM quad_point_tbl WHERE p <<| '(5000, 4000)'; - QUERY PLAN --------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on quad_point_tbl - Recheck Cond: (p <<| '(5000,4000)'::point) - -> Bitmap Index Scan on sp_quad_ind - Index Cond: (p <<| '(5000,4000)'::point) -(5 rows) - -SELECT count(*) FROM quad_point_tbl WHERE p <<| '(5000, 4000)'; - count -------- - 5000 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM quad_point_tbl WHERE p |>> '(5000, 4000)'; - QUERY PLAN --------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on quad_point_tbl - Recheck Cond: (p |>> '(5000,4000)'::point) - -> Bitmap Index Scan on sp_quad_ind - Index Cond: (p |>> '(5000,4000)'::point) -(5 rows) - -SELECT count(*) FROM quad_point_tbl WHERE p |>> '(5000, 4000)'; - count -------- - 5999 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM quad_point_tbl WHERE p ~= '(4585, 365)'; - QUERY PLAN ------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on quad_point_tbl - Recheck Cond: (p ~= '(4585,365)'::point) - -> Bitmap Index Scan on sp_quad_ind - Index Cond: (p ~= '(4585,365)'::point) -(5 rows) - -SELECT count(*) FROM quad_point_tbl WHERE p ~= '(4585, 365)'; - count -------- - 1 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM kd_point_tbl WHERE p <@ box '(200,200,1000,1000)'; - QUERY PLAN ---------------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on kd_point_tbl - Recheck Cond: (p <@ '(1000,1000),(200,200)'::box) - -> Bitmap Index Scan on sp_kd_ind - Index Cond: (p <@ '(1000,1000),(200,200)'::box) -(5 rows) - -SELECT count(*) FROM kd_point_tbl WHERE p <@ box '(200,200,1000,1000)'; - count -------- - 1057 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM kd_point_tbl WHERE box '(200,200,1000,1000)' @> p; - QUERY PLAN ---------------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on kd_point_tbl - Recheck Cond: ('(1000,1000),(200,200)'::box @> p) - -> Bitmap Index Scan on sp_kd_ind - Index Cond: (p <@ '(1000,1000),(200,200)'::box) -(5 rows) - -SELECT count(*) FROM kd_point_tbl WHERE box '(200,200,1000,1000)' @> p; - count -------- - 1057 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM kd_point_tbl WHERE p << '(5000, 4000)'; - QUERY PLAN -------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on kd_point_tbl - Recheck Cond: (p << '(5000,4000)'::point) - -> Bitmap Index Scan on sp_kd_ind - Index Cond: (p << '(5000,4000)'::point) -(5 rows) - -SELECT count(*) FROM kd_point_tbl WHERE p << '(5000, 4000)'; - count -------- - 6000 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM kd_point_tbl WHERE p >> '(5000, 4000)'; - QUERY PLAN -------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on kd_point_tbl - Recheck Cond: (p >> '(5000,4000)'::point) - -> Bitmap Index Scan on sp_kd_ind - Index Cond: (p >> '(5000,4000)'::point) -(5 rows) - -SELECT count(*) FROM kd_point_tbl WHERE p >> '(5000, 4000)'; - count -------- - 4999 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM kd_point_tbl WHERE p <<| '(5000, 4000)'; - QUERY PLAN --------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on kd_point_tbl - Recheck Cond: (p <<| '(5000,4000)'::point) - -> Bitmap Index Scan on sp_kd_ind - Index Cond: (p <<| '(5000,4000)'::point) -(5 rows) - -SELECT count(*) FROM kd_point_tbl WHERE p <<| '(5000, 4000)'; - count -------- - 5000 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM kd_point_tbl WHERE p |>> '(5000, 4000)'; - QUERY PLAN --------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on kd_point_tbl - Recheck Cond: (p |>> '(5000,4000)'::point) - -> Bitmap Index Scan on sp_kd_ind - Index Cond: (p |>> '(5000,4000)'::point) -(5 rows) - -SELECT count(*) FROM kd_point_tbl WHERE p |>> '(5000, 4000)'; - count -------- - 5999 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM kd_point_tbl WHERE p ~= '(4585, 365)'; - QUERY PLAN ------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on kd_point_tbl - Recheck Cond: (p ~= '(4585,365)'::point) - -> Bitmap Index Scan on sp_kd_ind - Index Cond: (p ~= '(4585,365)'::point) -(5 rows) - -SELECT count(*) FROM kd_point_tbl WHERE p ~= '(4585, 365)'; - count -------- - 1 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM radix_text_tbl WHERE t = 'P0123456789abcdef'; - QUERY PLAN ------------------------------------------------------------ - Aggregate - -> Bitmap Heap Scan on radix_text_tbl - Recheck Cond: (t = 'P0123456789abcdef'::text) - -> Bitmap Index Scan on sp_radix_ind - Index Cond: (t = 'P0123456789abcdef'::text) -(5 rows) - -SELECT count(*) FROM radix_text_tbl WHERE t = 'P0123456789abcdef'; - count -------- - 1000 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM radix_text_tbl WHERE t = 'P0123456789abcde'; - QUERY PLAN ----------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on radix_text_tbl - Recheck Cond: (t = 'P0123456789abcde'::text) - -> Bitmap Index Scan on sp_radix_ind - Index Cond: (t = 'P0123456789abcde'::text) -(5 rows) - -SELECT count(*) FROM radix_text_tbl WHERE t = 'P0123456789abcde'; - count -------- - 1 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM radix_text_tbl WHERE t = 'P0123456789abcdefF'; - QUERY PLAN ------------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on radix_text_tbl - Recheck Cond: (t = 'P0123456789abcdefF'::text) - -> Bitmap Index Scan on sp_radix_ind - Index Cond: (t = 'P0123456789abcdefF'::text) -(5 rows) - -SELECT count(*) FROM radix_text_tbl WHERE t = 'P0123456789abcdefF'; - count -------- - 1 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM radix_text_tbl WHERE t < 'Aztec Ct '; - QUERY PLAN ----------------------------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on radix_text_tbl - Recheck Cond: (t < 'Aztec Ct '::text) - -> Bitmap Index Scan on sp_radix_ind - Index Cond: (t < 'Aztec Ct '::text) -(5 rows) - -SELECT count(*) FROM radix_text_tbl WHERE t < 'Aztec Ct '; - count -------- - 272 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM radix_text_tbl WHERE t ~<~ 'Aztec Ct '; - QUERY PLAN ------------------------------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on radix_text_tbl - Recheck Cond: (t ~<~ 'Aztec Ct '::text) - -> Bitmap Index Scan on sp_radix_ind - Index Cond: (t ~<~ 'Aztec Ct '::text) -(5 rows) - -SELECT count(*) FROM radix_text_tbl WHERE t ~<~ 'Aztec Ct '; - count -------- - 272 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM radix_text_tbl WHERE t <= 'Aztec Ct '; - QUERY PLAN ------------------------------------------------------------------------------ - Aggregate - -> Bitmap Heap Scan on radix_text_tbl - Recheck Cond: (t <= 'Aztec Ct '::text) - -> Bitmap Index Scan on sp_radix_ind - Index Cond: (t <= 'Aztec Ct '::text) -(5 rows) - -SELECT count(*) FROM radix_text_tbl WHERE t <= 'Aztec Ct '; - count -------- - 273 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM radix_text_tbl WHERE t ~<=~ 'Aztec Ct '; - QUERY PLAN -------------------------------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on radix_text_tbl - Recheck Cond: (t ~<=~ 'Aztec Ct '::text) - -> Bitmap Index Scan on sp_radix_ind - Index Cond: (t ~<=~ 'Aztec Ct '::text) -(5 rows) - -SELECT count(*) FROM radix_text_tbl WHERE t ~<=~ 'Aztec Ct '; - count -------- - 273 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM radix_text_tbl WHERE t = 'Aztec Ct '; - QUERY PLAN ----------------------------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on radix_text_tbl - Recheck Cond: (t = 'Aztec Ct '::text) - -> Bitmap Index Scan on sp_radix_ind - Index Cond: (t = 'Aztec Ct '::text) -(5 rows) - -SELECT count(*) FROM radix_text_tbl WHERE t = 'Aztec Ct '; - count -------- - 1 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM radix_text_tbl WHERE t = 'Worth St '; - QUERY PLAN ----------------------------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on radix_text_tbl - Recheck Cond: (t = 'Worth St '::text) - -> Bitmap Index Scan on sp_radix_ind - Index Cond: (t = 'Worth St '::text) -(5 rows) - -SELECT count(*) FROM radix_text_tbl WHERE t = 'Worth St '; - count -------- - 2 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM radix_text_tbl WHERE t >= 'Worth St '; - QUERY PLAN ------------------------------------------------------------------------------ - Aggregate - -> Bitmap Heap Scan on radix_text_tbl - Recheck Cond: (t >= 'Worth St '::text) - -> Bitmap Index Scan on sp_radix_ind - Index Cond: (t >= 'Worth St '::text) -(5 rows) - -SELECT count(*) FROM radix_text_tbl WHERE t >= 'Worth St '; - count -------- - 50 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM radix_text_tbl WHERE t ~>=~ 'Worth St '; - QUERY PLAN -------------------------------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on radix_text_tbl - Recheck Cond: (t ~>=~ 'Worth St '::text) - -> Bitmap Index Scan on sp_radix_ind - Index Cond: (t ~>=~ 'Worth St '::text) -(5 rows) - -SELECT count(*) FROM radix_text_tbl WHERE t ~>=~ 'Worth St '; - count -------- - 50 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM radix_text_tbl WHERE t > 'Worth St '; - QUERY PLAN ----------------------------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on radix_text_tbl - Recheck Cond: (t > 'Worth St '::text) - -> Bitmap Index Scan on sp_radix_ind - Index Cond: (t > 'Worth St '::text) -(5 rows) - -SELECT count(*) FROM radix_text_tbl WHERE t > 'Worth St '; - count -------- - 48 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM radix_text_tbl WHERE t ~>~ 'Worth St '; - QUERY PLAN ------------------------------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on radix_text_tbl - Recheck Cond: (t ~>~ 'Worth St '::text) - -> Bitmap Index Scan on sp_radix_ind - Index Cond: (t ~>~ 'Worth St '::text) -(5 rows) - -SELECT count(*) FROM radix_text_tbl WHERE t ~>~ 'Worth St '; - count -------- - 48 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM radix_text_tbl WHERE t ^@ 'Worth'; - QUERY PLAN ------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on radix_text_tbl - Recheck Cond: (t ^@ 'Worth'::text) - -> Bitmap Index Scan on sp_radix_ind - Index Cond: (t ^@ 'Worth'::text) -(5 rows) - -SELECT count(*) FROM radix_text_tbl WHERE t ^@ 'Worth'; - count -------- - 2 -(1 row) - -RESET enable_seqscan; -RESET enable_indexscan; -RESET enable_bitmapscan; +server closed the connection unexpectedly + This probably means the server terminated abnormally + before or while processing the request. +connection to server was lost diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/create_view.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/create_view.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/create_view.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/create_view.out 2023-02-20 19:45:01.909209137 -0500 @@ -1592,111 +1592,57 @@ rollback; -- check display of whole-row variables in some corner cases create type nestedcomposite as (x int8_tbl); +ERROR: type "int8_tbl" does not exist create view tt15v as select row(i)::nestedcomposite from int8_tbl i; +ERROR: relation "int8_tbl" does not exist +LINE 1: ...view tt15v as select row(i)::nestedcomposite from int8_tbl i... + ^ select * from tt15v; - row ------------------------------------------- - ("(123,456)") - ("(123,4567890123456789)") - ("(4567890123456789,123)") - ("(4567890123456789,4567890123456789)") - ("(4567890123456789,-4567890123456789)") -(5 rows) - +ERROR: relation "tt15v" does not exist +LINE 1: select * from tt15v; + ^ select pg_get_viewdef('tt15v', true); - pg_get_viewdef ------------------------------------------------------- - SELECT ROW(i.*::int8_tbl)::nestedcomposite AS "row"+ - FROM int8_tbl i; -(1 row) - +ERROR: relation "tt15v" does not exist select row(i.*::int8_tbl)::nestedcomposite from int8_tbl i; - row ------------------------------------------- - ("(123,456)") - ("(123,4567890123456789)") - ("(4567890123456789,123)") - ("(4567890123456789,4567890123456789)") - ("(4567890123456789,-4567890123456789)") -(5 rows) - +ERROR: relation "int8_tbl" does not exist +LINE 1: select row(i.*::int8_tbl)::nestedcomposite from int8_tbl i; + ^ create view tt16v as select * from int8_tbl i, lateral(values(i)) ss; +ERROR: relation "int8_tbl" does not exist +LINE 1: create view tt16v as select * from int8_tbl i, lateral(value... + ^ select * from tt16v; - q1 | q2 | column1 -------------------+-------------------+-------------------------------------- - 123 | 456 | (123,456) - 123 | 4567890123456789 | (123,4567890123456789) - 4567890123456789 | 123 | (4567890123456789,123) - 4567890123456789 | 4567890123456789 | (4567890123456789,4567890123456789) - 4567890123456789 | -4567890123456789 | (4567890123456789,-4567890123456789) -(5 rows) - +ERROR: relation "tt16v" does not exist +LINE 1: select * from tt16v; + ^ select pg_get_viewdef('tt16v', true); - pg_get_viewdef -------------------------------------------- - SELECT i.q1, + - i.q2, + - ss.column1 + - FROM int8_tbl i, + - LATERAL ( VALUES (i.*::int8_tbl)) ss; -(1 row) - +ERROR: relation "tt16v" does not exist select * from int8_tbl i, lateral(values(i.*::int8_tbl)) ss; - q1 | q2 | column1 -------------------+-------------------+-------------------------------------- - 123 | 456 | (123,456) - 123 | 4567890123456789 | (123,4567890123456789) - 4567890123456789 | 123 | (4567890123456789,123) - 4567890123456789 | 4567890123456789 | (4567890123456789,4567890123456789) - 4567890123456789 | -4567890123456789 | (4567890123456789,-4567890123456789) -(5 rows) - +ERROR: relation "int8_tbl" does not exist +LINE 1: select * from int8_tbl i, lateral(values(i.*::int8_tbl)) ss; + ^ create view tt17v as select * from int8_tbl i where i in (values(i)); +ERROR: relation "int8_tbl" does not exist +LINE 1: create view tt17v as select * from int8_tbl i where i in (va... + ^ select * from tt17v; - q1 | q2 -------------------+------------------- - 123 | 456 - 123 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(5 rows) - +ERROR: relation "tt17v" does not exist +LINE 1: select * from tt17v; + ^ select pg_get_viewdef('tt17v', true); - pg_get_viewdef ---------------------------------------------- - SELECT i.q1, + - i.q2 + - FROM int8_tbl i + - WHERE (i.* IN ( VALUES (i.*::int8_tbl))); -(1 row) - +ERROR: relation "tt17v" does not exist select * from int8_tbl i where i.* in (values(i.*::int8_tbl)); - q1 | q2 -------------------+------------------- - 123 | 456 - 123 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(5 rows) - +ERROR: relation "int8_tbl" does not exist +LINE 1: select * from int8_tbl i where i.* in (values(i.*::int8_tbl)... + ^ create table tt15v_log(o tt15v, n tt15v, incr bool); +ERROR: type "tt15v" does not exist +LINE 1: create table tt15v_log(o tt15v, n tt15v, incr bool); + ^ create rule updlog as on update to tt15v do also insert into tt15v_log values(old, new, row(old,old) < row(new,new)); +ERROR: relation "tt15v" does not exist \d+ tt15v - View "testviewschm2.tt15v" - Column | Type | Collation | Nullable | Default | Storage | Description ---------+-----------------+-----------+----------+---------+----------+------------- - row | nestedcomposite | | | | extended | -View definition: - SELECT ROW(i.*::int8_tbl)::nestedcomposite AS "row" - FROM int8_tbl i; -Rules: - updlog AS - ON UPDATE TO tt15v DO INSERT INTO tt15v_log (o, n, incr) - VALUES (old.*::tt15v, new.*::tt15v, (ROW(old.*::tt15v, old.*::tt15v) < ROW(new.*::tt15v, new.*::tt15v))) - -- check unique-ification of overlength names create view tt18v as select * from int8_tbl xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxy @@ -1704,26 +1650,15 @@ select * from int8_tbl xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxz; NOTICE: identifier "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxy" will be truncated to "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" NOTICE: identifier "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxz" will be truncated to "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +ERROR: relation "int8_tbl" does not exist +LINE 2: select * from int8_tbl xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx... + ^ select pg_get_viewdef('tt18v', true); - pg_get_viewdef ------------------------------------------------------------------------------------ - SELECT xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.q1, + - xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.q2 + - FROM int8_tbl xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + - UNION ALL + - SELECT xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.q1, + - xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.q2 + - FROM int8_tbl xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx; -(1 row) - +ERROR: relation "tt18v" does not exist explain (costs off) select * from tt18v; - QUERY PLAN --------------------------------------------------------------------------------------------- - Append - -> Seq Scan on int8_tbl xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - -> Seq Scan on int8_tbl xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_1 -(3 rows) - +ERROR: relation "tt18v" does not exist +LINE 1: explain (costs off) select * from tt18v; + ^ -- check display of ScalarArrayOp with a sub-select select 'foo'::text = any(array['abc','def','foo']::text[]); ?column? @@ -1857,30 +1792,16 @@ select q1 as other_name1, q2 as other_name2 from int8_tbl union select 42, 43; +ERROR: relation "int8_tbl" does not exist +LINE 2: select q1 as other_name1, q2 as other_name2 from int8_tbl + ^ select pg_get_viewdef('tt23v', true); - pg_get_viewdef -------------------------------- - SELECT int8_tbl.q1 AS col_a,+ - int8_tbl.q2 AS col_b + - FROM int8_tbl + - UNION + - SELECT 42 AS col_a, + - 43 AS col_b; -(1 row) - +ERROR: relation "tt23v" does not exist select pg_get_ruledef(oid, true) from pg_rewrite where ev_class = 'tt23v'::regclass and ev_type = '1'; - pg_get_ruledef ------------------------------------------------------------------ - CREATE RULE "_RETURN" AS + - ON SELECT TO tt23v DO INSTEAD SELECT int8_tbl.q1 AS col_a,+ - int8_tbl.q2 AS col_b + - FROM int8_tbl + - UNION + - SELECT 42 AS col_a, + - 43 AS col_b; -(1 row) - +ERROR: relation "tt23v" does not exist +LINE 2: where ev_class = 'tt23v'::regclass and ev_type = '1'; + ^ -- test extraction of FieldSelect field names (get_name_for_var_field) create view tt24v as with cte as materialized (select r from (values(1,2),(3,4)) r) @@ -2010,7 +1931,7 @@ drop cascades to view aliased_view_3 drop cascades to view aliased_view_4 DROP SCHEMA testviewschm2 CASCADE; -NOTICE: drop cascades to 74 other objects +NOTICE: drop cascades to 67 other objects DETAIL: drop cascades to table t1 drop cascades to view temporal1 drop cascades to view temporal2 @@ -2070,18 +1991,11 @@ drop cascades to table tt14t drop cascades to function tt14f() drop cascades to view tt14v -drop cascades to type nestedcomposite -drop cascades to view tt15v -drop cascades to view tt16v -drop cascades to view tt17v -drop cascades to table tt15v_log -drop cascades to view tt18v drop cascades to view tt19v drop cascades to view tt20v drop cascades to view tt201v drop cascades to view tt21v drop cascades to view tt22v -drop cascades to view tt23v drop cascades to view tt24v drop cascades to view tt25v drop cascades to view tt26v diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/index_including_gist.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/index_including_gist.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/index_including_gist.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/index_including_gist.out 2023-02-20 19:45:17.749209816 -0500 @@ -74,93 +74,10 @@ CREATE TABLE tbl_gist (c1 int, c2 int, c3 int, c4 box); INSERT INTO tbl_gist SELECT x, 2*x, 3*x, box(point(x,x+1),point(2*x,2*x+1)) FROM generate_series(1,10) AS x; CREATE INDEX CONCURRENTLY tbl_gist_idx ON tbl_gist using gist (c4) INCLUDE (c1,c2,c3); -SELECT indexdef FROM pg_indexes WHERE tablename = 'tbl_gist' ORDER BY indexname; - indexdef ------------------------------------------------------------------------------------ - CREATE INDEX tbl_gist_idx ON public.tbl_gist USING gist (c4) INCLUDE (c1, c2, c3) -(1 row) - -DROP TABLE tbl_gist; -/* - * 3. REINDEX - */ -CREATE TABLE tbl_gist (c1 int, c2 int, c3 int, c4 box); -INSERT INTO tbl_gist SELECT x, 2*x, 3*x, box(point(x,x+1),point(2*x,2*x+1)) FROM generate_series(1,10) AS x; -CREATE INDEX tbl_gist_idx ON tbl_gist using gist (c4) INCLUDE (c1,c3); -SELECT indexdef FROM pg_indexes WHERE tablename = 'tbl_gist' ORDER BY indexname; - indexdef -------------------------------------------------------------------------------- - CREATE INDEX tbl_gist_idx ON public.tbl_gist USING gist (c4) INCLUDE (c1, c3) -(1 row) - -REINDEX INDEX tbl_gist_idx; -SELECT indexdef FROM pg_indexes WHERE tablename = 'tbl_gist' ORDER BY indexname; - indexdef -------------------------------------------------------------------------------- - CREATE INDEX tbl_gist_idx ON public.tbl_gist USING gist (c4) INCLUDE (c1, c3) -(1 row) - -ALTER TABLE tbl_gist DROP COLUMN c1; -SELECT indexdef FROM pg_indexes WHERE tablename = 'tbl_gist' ORDER BY indexname; - indexdef ----------- -(0 rows) - -DROP TABLE tbl_gist; -/* - * 4. Update, delete values in indexed table. - */ -CREATE TABLE tbl_gist (c1 int, c2 int, c3 int, c4 box); -INSERT INTO tbl_gist SELECT x, 2*x, 3*x, box(point(x,x+1),point(2*x,2*x+1)) FROM generate_series(1,10) AS x; -CREATE INDEX tbl_gist_idx ON tbl_gist using gist (c4) INCLUDE (c1,c3); -UPDATE tbl_gist SET c1 = 100 WHERE c1 = 2; -UPDATE tbl_gist SET c1 = 1 WHERE c1 = 3; -DELETE FROM tbl_gist WHERE c1 = 5 OR c3 = 12; -DROP TABLE tbl_gist; -/* - * 5. Alter column type. - */ -CREATE TABLE tbl_gist (c1 int, c2 int, c3 int, c4 box); -INSERT INTO tbl_gist SELECT x, 2*x, 3*x, box(point(x,x+1),point(2*x,2*x+1)) FROM generate_series(1,10) AS x; -CREATE INDEX tbl_gist_idx ON tbl_gist using gist (c4) INCLUDE (c1,c3); -ALTER TABLE tbl_gist ALTER c1 TYPE bigint; -ALTER TABLE tbl_gist ALTER c3 TYPE bigint; -\d tbl_gist - Table "public.tbl_gist" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - c1 | bigint | | | - c2 | integer | | | - c3 | bigint | | | - c4 | box | | | -Indexes: - "tbl_gist_idx" gist (c4) INCLUDE (c1, c3) - -DROP TABLE tbl_gist; -/* - * 6. EXCLUDE constraint. - */ -CREATE TABLE tbl_gist (c1 int, c2 int, c3 int, c4 box, EXCLUDE USING gist (c4 WITH &&) INCLUDE (c1, c2, c3)); -INSERT INTO tbl_gist SELECT x, 2*x, 3*x, box(point(x,x+1),point(2*x,2*x+1)) FROM generate_series(1,10) AS x; -ERROR: conflicting key value violates exclusion constraint "tbl_gist_c4_c1_c2_c3_excl" -DETAIL: Key (c4)=((4,5),(2,3)) conflicts with existing key (c4)=((2,3),(1,2)). -INSERT INTO tbl_gist SELECT x, 2*x, 3*x, box(point(3*x,2*x),point(3*x+1,2*x+1)) FROM generate_series(1,10) AS x; -EXPLAIN (costs off) SELECT * FROM tbl_gist where c4 <@ box(point(1,1),point(10,10)); - QUERY PLAN -------------------------------------------------------------- - Index Only Scan using tbl_gist_c4_c1_c2_c3_excl on tbl_gist - Index Cond: (c4 <@ '(10,10),(1,1)'::box) -(2 rows) - -\d tbl_gist - Table "public.tbl_gist" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - c1 | integer | | | - c2 | integer | | | - c3 | integer | | | - c4 | box | | | -Indexes: - "tbl_gist_c4_c1_c2_c3_excl" EXCLUDE USING gist (c4 WITH &&) INCLUDE (c1, c2, c3) - -DROP TABLE tbl_gist; +WARNING: terminating connection because of crash of another server process +DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory. +HINT: In a moment you should be able to reconnect to the database and repeat your command. +server closed the connection unexpectedly + This probably means the server terminated abnormally + before or while processing the request. +connection to server was lost diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/create_aggregate.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/create_aggregate.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/create_aggregate.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/create_aggregate.out 2023-02-20 19:45:21.399209973 -0500 @@ -1,324 +1 @@ --- --- CREATE_AGGREGATE --- --- all functions CREATEd -CREATE AGGREGATE newavg ( - sfunc = int4_avg_accum, basetype = int4, stype = _int8, - finalfunc = int8_avg, - initcond1 = '{0,0}' -); --- test comments -COMMENT ON AGGREGATE newavg_wrong (int4) IS 'an agg comment'; -ERROR: aggregate newavg_wrong(integer) does not exist -COMMENT ON AGGREGATE newavg (int4) IS 'an agg comment'; -COMMENT ON AGGREGATE newavg (int4) IS NULL; --- without finalfunc; test obsolete spellings 'sfunc1' etc -CREATE AGGREGATE newsum ( - sfunc1 = int4pl, basetype = int4, stype1 = int4, - initcond1 = '0' -); --- zero-argument aggregate -CREATE AGGREGATE newcnt (*) ( - sfunc = int8inc, stype = int8, - initcond = '0', parallel = safe -); --- old-style spelling of same (except without parallel-safe; that's too new) -CREATE AGGREGATE oldcnt ( - sfunc = int8inc, basetype = 'ANY', stype = int8, - initcond = '0' -); --- aggregate that only cares about null/nonnull input -CREATE AGGREGATE newcnt ("any") ( - sfunc = int8inc_any, stype = int8, - initcond = '0' -); -COMMENT ON AGGREGATE nosuchagg (*) IS 'should fail'; -ERROR: aggregate nosuchagg(*) does not exist -COMMENT ON AGGREGATE newcnt (*) IS 'an agg(*) comment'; -COMMENT ON AGGREGATE newcnt ("any") IS 'an agg(any) comment'; --- multi-argument aggregate -create function sum3(int8,int8,int8) returns int8 as -'select $1 + $2 + $3' language sql strict immutable; -create aggregate sum2(int8,int8) ( - sfunc = sum3, stype = int8, - initcond = '0' -); --- multi-argument aggregates sensitive to distinct/order, strict/nonstrict -create type aggtype as (a integer, b integer, c text); -create function aggf_trans(aggtype[],integer,integer,text) returns aggtype[] -as 'select array_append($1,ROW($2,$3,$4)::aggtype)' -language sql strict immutable; -create function aggfns_trans(aggtype[],integer,integer,text) returns aggtype[] -as 'select array_append($1,ROW($2,$3,$4)::aggtype)' -language sql immutable; -create aggregate aggfstr(integer,integer,text) ( - sfunc = aggf_trans, stype = aggtype[], - initcond = '{}' -); -create aggregate aggfns(integer,integer,text) ( - sfunc = aggfns_trans, stype = aggtype[], sspace = 10000, - initcond = '{}' -); --- check error cases that would require run-time type coercion -create function least_accum(int8, int8) returns int8 language sql as - 'select least($1, $2)'; -create aggregate least_agg(int4) ( - stype = int8, sfunc = least_accum -); -- fails -ERROR: function least_accum(bigint, bigint) requires run-time type coercion -drop function least_accum(int8, int8); -create function least_accum(anycompatible, anycompatible) -returns anycompatible language sql as - 'select least($1, $2)'; -create aggregate least_agg(int4) ( - stype = int8, sfunc = least_accum -); -- fails -ERROR: function least_accum(bigint, bigint) requires run-time type coercion -create aggregate least_agg(int8) ( - stype = int8, sfunc = least_accum -); -drop function least_accum(anycompatible, anycompatible) cascade; -NOTICE: drop cascades to function least_agg(bigint) --- variadic aggregates -create function least_accum(anyelement, variadic anyarray) -returns anyelement language sql as - 'select least($1, min($2[i])) from generate_subscripts($2,1) g(i)'; -create aggregate least_agg(variadic items anyarray) ( - stype = anyelement, sfunc = least_accum -); -create function cleast_accum(anycompatible, variadic anycompatiblearray) -returns anycompatible language sql as - 'select least($1, min($2[i])) from generate_subscripts($2,1) g(i)'; -create aggregate cleast_agg(variadic items anycompatiblearray) ( - stype = anycompatible, sfunc = cleast_accum -); --- test ordered-set aggs using built-in support functions -create aggregate my_percentile_disc(float8 ORDER BY anyelement) ( - stype = internal, - sfunc = ordered_set_transition, - finalfunc = percentile_disc_final, - finalfunc_extra = true, - finalfunc_modify = read_write -); -create aggregate my_rank(VARIADIC "any" ORDER BY VARIADIC "any") ( - stype = internal, - sfunc = ordered_set_transition_multi, - finalfunc = rank_final, - finalfunc_extra = true, - hypothetical -); -alter aggregate my_percentile_disc(float8 ORDER BY anyelement) - rename to test_percentile_disc; -alter aggregate my_rank(VARIADIC "any" ORDER BY VARIADIC "any") - rename to test_rank; -\da test_* - List of aggregate functions - Schema | Name | Result data type | Argument data types | Description ---------+----------------------+------------------+----------------------------------------+------------- - public | test_percentile_disc | anyelement | double precision ORDER BY anyelement | - public | test_rank | bigint | VARIADIC "any" ORDER BY VARIADIC "any" | -(2 rows) - --- moving-aggregate options -CREATE AGGREGATE sumdouble (float8) -( - stype = float8, - sfunc = float8pl, - mstype = float8, - msfunc = float8pl, - minvfunc = float8mi -); --- aggregate combine and serialization functions --- can't specify just one of serialfunc and deserialfunc -CREATE AGGREGATE myavg (numeric) -( - stype = internal, - sfunc = numeric_avg_accum, - serialfunc = numeric_avg_serialize -); -ERROR: must specify both or neither of serialization and deserialization functions --- serialfunc must have correct parameters -CREATE AGGREGATE myavg (numeric) -( - stype = internal, - sfunc = numeric_avg_accum, - serialfunc = numeric_avg_deserialize, - deserialfunc = numeric_avg_deserialize -); -ERROR: function numeric_avg_deserialize(internal) does not exist --- deserialfunc must have correct parameters -CREATE AGGREGATE myavg (numeric) -( - stype = internal, - sfunc = numeric_avg_accum, - serialfunc = numeric_avg_serialize, - deserialfunc = numeric_avg_serialize -); -ERROR: function numeric_avg_serialize(bytea, internal) does not exist --- ensure combine function parameters are checked -CREATE AGGREGATE myavg (numeric) -( - stype = internal, - sfunc = numeric_avg_accum, - serialfunc = numeric_avg_serialize, - deserialfunc = numeric_avg_deserialize, - combinefunc = int4larger -); -ERROR: function int4larger(internal, internal) does not exist --- ensure create aggregate works. -CREATE AGGREGATE myavg (numeric) -( - stype = internal, - sfunc = numeric_avg_accum, - finalfunc = numeric_avg, - serialfunc = numeric_avg_serialize, - deserialfunc = numeric_avg_deserialize, - combinefunc = numeric_avg_combine, - finalfunc_modify = shareable -- just to test a non-default setting -); --- Ensure all these functions made it into the catalog -SELECT aggfnoid, aggtransfn, aggcombinefn, aggtranstype::regtype, - aggserialfn, aggdeserialfn, aggfinalmodify -FROM pg_aggregate -WHERE aggfnoid = 'myavg'::REGPROC; - aggfnoid | aggtransfn | aggcombinefn | aggtranstype | aggserialfn | aggdeserialfn | aggfinalmodify -----------+-------------------+---------------------+--------------+-----------------------+-------------------------+---------------- - myavg | numeric_avg_accum | numeric_avg_combine | internal | numeric_avg_serialize | numeric_avg_deserialize | s -(1 row) - -DROP AGGREGATE myavg (numeric); --- create or replace aggregate -CREATE AGGREGATE myavg (numeric) -( - stype = internal, - sfunc = numeric_avg_accum, - finalfunc = numeric_avg -); -CREATE OR REPLACE AGGREGATE myavg (numeric) -( - stype = internal, - sfunc = numeric_avg_accum, - finalfunc = numeric_avg, - serialfunc = numeric_avg_serialize, - deserialfunc = numeric_avg_deserialize, - combinefunc = numeric_avg_combine, - finalfunc_modify = shareable -- just to test a non-default setting -); --- Ensure all these functions made it into the catalog again -SELECT aggfnoid, aggtransfn, aggcombinefn, aggtranstype::regtype, - aggserialfn, aggdeserialfn, aggfinalmodify -FROM pg_aggregate -WHERE aggfnoid = 'myavg'::REGPROC; - aggfnoid | aggtransfn | aggcombinefn | aggtranstype | aggserialfn | aggdeserialfn | aggfinalmodify -----------+-------------------+---------------------+--------------+-----------------------+-------------------------+---------------- - myavg | numeric_avg_accum | numeric_avg_combine | internal | numeric_avg_serialize | numeric_avg_deserialize | s -(1 row) - --- can change stype: -CREATE OR REPLACE AGGREGATE myavg (numeric) -( - stype = numeric, - sfunc = numeric_add -); -SELECT aggfnoid, aggtransfn, aggcombinefn, aggtranstype::regtype, - aggserialfn, aggdeserialfn, aggfinalmodify -FROM pg_aggregate -WHERE aggfnoid = 'myavg'::REGPROC; - aggfnoid | aggtransfn | aggcombinefn | aggtranstype | aggserialfn | aggdeserialfn | aggfinalmodify -----------+-------------+--------------+--------------+-------------+---------------+---------------- - myavg | numeric_add | - | numeric | - | - | r -(1 row) - --- can't change return type: -CREATE OR REPLACE AGGREGATE myavg (numeric) -( - stype = numeric, - sfunc = numeric_add, - finalfunc = numeric_out -); -ERROR: cannot change return type of existing function -HINT: Use DROP AGGREGATE myavg(numeric) first. --- can't change to a different kind: -CREATE OR REPLACE AGGREGATE myavg (order by numeric) -( - stype = numeric, - sfunc = numeric_add -); -ERROR: cannot change routine kind -DETAIL: "myavg" is an ordinary aggregate function. --- can't change plain function to aggregate: -create function sum4(int8,int8,int8,int8) returns int8 as -'select $1 + $2 + $3 + $4' language sql strict immutable; -CREATE OR REPLACE AGGREGATE sum3 (int8,int8,int8) -( - stype = int8, - sfunc = sum4 -); -ERROR: cannot change routine kind -DETAIL: "sum3" is a function. -drop function sum4(int8,int8,int8,int8); -DROP AGGREGATE myavg (numeric); --- invalid: bad parallel-safety marking -CREATE AGGREGATE mysum (int) -( - stype = int, - sfunc = int4pl, - parallel = pear -); -ERROR: parameter "parallel" must be SAFE, RESTRICTED, or UNSAFE --- invalid: nonstrict inverse with strict forward function -CREATE FUNCTION float8mi_n(float8, float8) RETURNS float8 AS -$$ SELECT $1 - $2; $$ -LANGUAGE SQL; -CREATE AGGREGATE invalidsumdouble (float8) -( - stype = float8, - sfunc = float8pl, - mstype = float8, - msfunc = float8pl, - minvfunc = float8mi_n -); -ERROR: strictness of aggregate's forward and inverse transition functions must match --- invalid: non-matching result types -CREATE FUNCTION float8mi_int(float8, float8) RETURNS int AS -$$ SELECT CAST($1 - $2 AS INT); $$ -LANGUAGE SQL; -CREATE AGGREGATE wrongreturntype (float8) -( - stype = float8, - sfunc = float8pl, - mstype = float8, - msfunc = float8pl, - minvfunc = float8mi_int -); -ERROR: return type of inverse transition function float8mi_int is not double precision --- invalid: non-lowercase quoted identifiers -CREATE AGGREGATE case_agg ( -- old syntax - "Sfunc1" = int4pl, - "Basetype" = int4, - "Stype1" = int4, - "Initcond1" = '0', - "Parallel" = safe -); -WARNING: aggregate attribute "Sfunc1" not recognized -WARNING: aggregate attribute "Basetype" not recognized -WARNING: aggregate attribute "Stype1" not recognized -WARNING: aggregate attribute "Initcond1" not recognized -WARNING: aggregate attribute "Parallel" not recognized -ERROR: aggregate stype must be specified -CREATE AGGREGATE case_agg(float8) -( - "Stype" = internal, - "Sfunc" = ordered_set_transition, - "Finalfunc" = percentile_disc_final, - "Finalfunc_extra" = true, - "Finalfunc_modify" = read_write, - "Parallel" = safe -); -WARNING: aggregate attribute "Stype" not recognized -WARNING: aggregate attribute "Sfunc" not recognized -WARNING: aggregate attribute "Finalfunc" not recognized -WARNING: aggregate attribute "Finalfunc_extra" not recognized -WARNING: aggregate attribute "Finalfunc_modify" not recognized -WARNING: aggregate attribute "Parallel" not recognized -ERROR: aggregate stype must be specified +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/create_function_3.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/create_function_3.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/create_function_3.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/create_function_3.out 2023-02-20 19:45:21.359209971 -0500 @@ -1,702 +1 @@ --- --- CREATE FUNCTION --- --- Assorted tests using SQL-language functions --- --- All objects made in this test are in temp_func_test schema -CREATE USER regress_unpriv_user; -CREATE SCHEMA temp_func_test; -GRANT ALL ON SCHEMA temp_func_test TO public; -SET search_path TO temp_func_test, public; --- --- Make sanity checks on the pg_proc entries created by CREATE FUNCTION --- --- --- ARGUMENT and RETURN TYPES --- -CREATE FUNCTION functest_A_1(text, date) RETURNS bool LANGUAGE 'sql' - AS 'SELECT $1 = ''abcd'' AND $2 > ''2001-01-01'''; -CREATE FUNCTION functest_A_2(text[]) RETURNS int LANGUAGE 'sql' - AS 'SELECT $1[1]::int'; -CREATE FUNCTION functest_A_3() RETURNS bool LANGUAGE 'sql' - AS 'SELECT false'; -SELECT proname, prorettype::regtype, proargtypes::regtype[] FROM pg_proc - WHERE oid in ('functest_A_1'::regproc, - 'functest_A_2'::regproc, - 'functest_A_3'::regproc) ORDER BY proname; - proname | prorettype | proargtypes ---------------+------------+------------------- - functest_a_1 | boolean | [0:1]={text,date} - functest_a_2 | integer | [0:0]={text[]} - functest_a_3 | boolean | {} -(3 rows) - -SELECT functest_A_1('abcd', '2020-01-01'); - functest_a_1 --------------- - t -(1 row) - -SELECT functest_A_2(ARRAY['1', '2', '3']); - functest_a_2 --------------- - 1 -(1 row) - -SELECT functest_A_3(); - functest_a_3 --------------- - f -(1 row) - --- --- IMMUTABLE | STABLE | VOLATILE --- -CREATE FUNCTION functest_B_1(int) RETURNS bool LANGUAGE 'sql' - AS 'SELECT $1 > 0'; -CREATE FUNCTION functest_B_2(int) RETURNS bool LANGUAGE 'sql' - IMMUTABLE AS 'SELECT $1 > 0'; -CREATE FUNCTION functest_B_3(int) RETURNS bool LANGUAGE 'sql' - STABLE AS 'SELECT $1 = 0'; -CREATE FUNCTION functest_B_4(int) RETURNS bool LANGUAGE 'sql' - VOLATILE AS 'SELECT $1 < 0'; -SELECT proname, provolatile FROM pg_proc - WHERE oid in ('functest_B_1'::regproc, - 'functest_B_2'::regproc, - 'functest_B_3'::regproc, - 'functest_B_4'::regproc) ORDER BY proname; - proname | provolatile ---------------+------------- - functest_b_1 | v - functest_b_2 | i - functest_b_3 | s - functest_b_4 | v -(4 rows) - -ALTER FUNCTION functest_B_2(int) VOLATILE; -ALTER FUNCTION functest_B_3(int) COST 100; -- unrelated change, no effect -SELECT proname, provolatile FROM pg_proc - WHERE oid in ('functest_B_1'::regproc, - 'functest_B_2'::regproc, - 'functest_B_3'::regproc, - 'functest_B_4'::regproc) ORDER BY proname; - proname | provolatile ---------------+------------- - functest_b_1 | v - functest_b_2 | v - functest_b_3 | s - functest_b_4 | v -(4 rows) - --- --- SECURITY DEFINER | INVOKER --- -CREATE FUNCTION functest_C_1(int) RETURNS bool LANGUAGE 'sql' - AS 'SELECT $1 > 0'; -CREATE FUNCTION functest_C_2(int) RETURNS bool LANGUAGE 'sql' - SECURITY DEFINER AS 'SELECT $1 = 0'; -CREATE FUNCTION functest_C_3(int) RETURNS bool LANGUAGE 'sql' - SECURITY INVOKER AS 'SELECT $1 < 0'; -SELECT proname, prosecdef FROM pg_proc - WHERE oid in ('functest_C_1'::regproc, - 'functest_C_2'::regproc, - 'functest_C_3'::regproc) ORDER BY proname; - proname | prosecdef ---------------+----------- - functest_c_1 | f - functest_c_2 | t - functest_c_3 | f -(3 rows) - -ALTER FUNCTION functest_C_1(int) IMMUTABLE; -- unrelated change, no effect -ALTER FUNCTION functest_C_2(int) SECURITY INVOKER; -ALTER FUNCTION functest_C_3(int) SECURITY DEFINER; -SELECT proname, prosecdef FROM pg_proc - WHERE oid in ('functest_C_1'::regproc, - 'functest_C_2'::regproc, - 'functest_C_3'::regproc) ORDER BY proname; - proname | prosecdef ---------------+----------- - functest_c_1 | f - functest_c_2 | f - functest_c_3 | t -(3 rows) - --- --- LEAKPROOF --- -CREATE FUNCTION functest_E_1(int) RETURNS bool LANGUAGE 'sql' - AS 'SELECT $1 > 100'; -CREATE FUNCTION functest_E_2(int) RETURNS bool LANGUAGE 'sql' - LEAKPROOF AS 'SELECT $1 > 100'; -SELECT proname, proleakproof FROM pg_proc - WHERE oid in ('functest_E_1'::regproc, - 'functest_E_2'::regproc) ORDER BY proname; - proname | proleakproof ---------------+-------------- - functest_e_1 | f - functest_e_2 | t -(2 rows) - -ALTER FUNCTION functest_E_1(int) LEAKPROOF; -ALTER FUNCTION functest_E_2(int) STABLE; -- unrelated change, no effect -SELECT proname, proleakproof FROM pg_proc - WHERE oid in ('functest_E_1'::regproc, - 'functest_E_2'::regproc) ORDER BY proname; - proname | proleakproof ---------------+-------------- - functest_e_1 | t - functest_e_2 | t -(2 rows) - -ALTER FUNCTION functest_E_2(int) NOT LEAKPROOF; -- remove leakproof attribute -SELECT proname, proleakproof FROM pg_proc - WHERE oid in ('functest_E_1'::regproc, - 'functest_E_2'::regproc) ORDER BY proname; - proname | proleakproof ---------------+-------------- - functest_e_1 | t - functest_e_2 | f -(2 rows) - --- it takes superuser privilege to turn on leakproof, but not to turn off -ALTER FUNCTION functest_E_1(int) OWNER TO regress_unpriv_user; -ALTER FUNCTION functest_E_2(int) OWNER TO regress_unpriv_user; -SET SESSION AUTHORIZATION regress_unpriv_user; -SET search_path TO temp_func_test, public; -ALTER FUNCTION functest_E_1(int) NOT LEAKPROOF; -ALTER FUNCTION functest_E_2(int) LEAKPROOF; -ERROR: only superuser can define a leakproof function -CREATE FUNCTION functest_E_3(int) RETURNS bool LANGUAGE 'sql' - LEAKPROOF AS 'SELECT $1 < 200'; -- fail -ERROR: only superuser can define a leakproof function -RESET SESSION AUTHORIZATION; --- --- CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT | STRICT --- -CREATE FUNCTION functest_F_1(int) RETURNS bool LANGUAGE 'sql' - AS 'SELECT $1 > 50'; -CREATE FUNCTION functest_F_2(int) RETURNS bool LANGUAGE 'sql' - CALLED ON NULL INPUT AS 'SELECT $1 = 50'; -CREATE FUNCTION functest_F_3(int) RETURNS bool LANGUAGE 'sql' - RETURNS NULL ON NULL INPUT AS 'SELECT $1 < 50'; -CREATE FUNCTION functest_F_4(int) RETURNS bool LANGUAGE 'sql' - STRICT AS 'SELECT $1 = 50'; -SELECT proname, proisstrict FROM pg_proc - WHERE oid in ('functest_F_1'::regproc, - 'functest_F_2'::regproc, - 'functest_F_3'::regproc, - 'functest_F_4'::regproc) ORDER BY proname; - proname | proisstrict ---------------+------------- - functest_f_1 | f - functest_f_2 | f - functest_f_3 | t - functest_f_4 | t -(4 rows) - -ALTER FUNCTION functest_F_1(int) IMMUTABLE; -- unrelated change, no effect -ALTER FUNCTION functest_F_2(int) STRICT; -ALTER FUNCTION functest_F_3(int) CALLED ON NULL INPUT; -SELECT proname, proisstrict FROM pg_proc - WHERE oid in ('functest_F_1'::regproc, - 'functest_F_2'::regproc, - 'functest_F_3'::regproc, - 'functest_F_4'::regproc) ORDER BY proname; - proname | proisstrict ---------------+------------- - functest_f_1 | f - functest_f_2 | t - functest_f_3 | f - functest_f_4 | t -(4 rows) - --- pg_get_functiondef tests -SELECT pg_get_functiondef('functest_A_1'::regproc); - pg_get_functiondef --------------------------------------------------------------------- - CREATE OR REPLACE FUNCTION temp_func_test.functest_a_1(text, date)+ - RETURNS boolean + - LANGUAGE sql + - AS $function$SELECT $1 = 'abcd' AND $2 > '2001-01-01'$function$ + - -(1 row) - -SELECT pg_get_functiondef('functest_B_3'::regproc); - pg_get_functiondef ------------------------------------------------------------------ - CREATE OR REPLACE FUNCTION temp_func_test.functest_b_3(integer)+ - RETURNS boolean + - LANGUAGE sql + - STABLE + - AS $function$SELECT $1 = 0$function$ + - -(1 row) - -SELECT pg_get_functiondef('functest_C_3'::regproc); - pg_get_functiondef ------------------------------------------------------------------ - CREATE OR REPLACE FUNCTION temp_func_test.functest_c_3(integer)+ - RETURNS boolean + - LANGUAGE sql + - SECURITY DEFINER + - AS $function$SELECT $1 < 0$function$ + - -(1 row) - -SELECT pg_get_functiondef('functest_F_2'::regproc); - pg_get_functiondef ------------------------------------------------------------------ - CREATE OR REPLACE FUNCTION temp_func_test.functest_f_2(integer)+ - RETURNS boolean + - LANGUAGE sql + - STRICT + - AS $function$SELECT $1 = 50$function$ + - -(1 row) - --- --- SQL-standard body --- -CREATE FUNCTION functest_S_1(a text, b date) RETURNS boolean - LANGUAGE SQL - RETURN a = 'abcd' AND b > '2001-01-01'; -CREATE FUNCTION functest_S_2(a text[]) RETURNS int - RETURN a[1]::int; -CREATE FUNCTION functest_S_3() RETURNS boolean - RETURN false; -CREATE FUNCTION functest_S_3a() RETURNS boolean - BEGIN ATOMIC - ;;RETURN false;; - END; -CREATE FUNCTION functest_S_10(a text, b date) RETURNS boolean - LANGUAGE SQL - BEGIN ATOMIC - SELECT a = 'abcd' AND b > '2001-01-01'; - END; -CREATE FUNCTION functest_S_13() RETURNS boolean - BEGIN ATOMIC - SELECT 1; - SELECT false; - END; --- check display of function argments in sub-SELECT -CREATE TABLE functest1 (i int); -CREATE FUNCTION functest_S_16(a int, b int) RETURNS void - LANGUAGE SQL - BEGIN ATOMIC - INSERT INTO functest1 SELECT a + $2; - END; --- error: duplicate function body -CREATE FUNCTION functest_S_xxx(x int) RETURNS int - LANGUAGE SQL - AS $$ SELECT x * 2 $$ - RETURN x * 3; -ERROR: duplicate function body specified --- polymorphic arguments not allowed in this form -CREATE FUNCTION functest_S_xx(x anyarray) RETURNS anyelement - LANGUAGE SQL - RETURN x[1]; -ERROR: SQL function with unquoted function body cannot have polymorphic arguments --- check reporting of parse-analysis errors -CREATE FUNCTION functest_S_xx(x date) RETURNS boolean - LANGUAGE SQL - RETURN x > 1; -ERROR: operator does not exist: date > integer -LINE 3: RETURN x > 1; - ^ -HINT: No operator matches the given name and argument types. You might need to add explicit type casts. --- tricky parsing -CREATE FUNCTION functest_S_15(x int) RETURNS boolean -LANGUAGE SQL -BEGIN ATOMIC - select case when x % 2 = 0 then true else false end; -END; -SELECT functest_S_1('abcd', '2020-01-01'); - functest_s_1 --------------- - t -(1 row) - -SELECT functest_S_2(ARRAY['1', '2', '3']); - functest_s_2 --------------- - 1 -(1 row) - -SELECT functest_S_3(); - functest_s_3 --------------- - f -(1 row) - -SELECT functest_S_10('abcd', '2020-01-01'); - functest_s_10 ---------------- - t -(1 row) - -SELECT functest_S_13(); - functest_s_13 ---------------- - f -(1 row) - -SELECT pg_get_functiondef('functest_S_1'::regproc); - pg_get_functiondef ------------------------------------------------------------------------- - CREATE OR REPLACE FUNCTION temp_func_test.functest_s_1(a text, b date)+ - RETURNS boolean + - LANGUAGE sql + - RETURN ((a = 'abcd'::text) AND (b > '01-01-2001'::date)) + - -(1 row) - -SELECT pg_get_functiondef('functest_S_2'::regproc); - pg_get_functiondef ------------------------------------------------------------------- - CREATE OR REPLACE FUNCTION temp_func_test.functest_s_2(a text[])+ - RETURNS integer + - LANGUAGE sql + - RETURN ((a)[1])::integer + - -(1 row) - -SELECT pg_get_functiondef('functest_S_3'::regproc); - pg_get_functiondef ----------------------------------------------------------- - CREATE OR REPLACE FUNCTION temp_func_test.functest_s_3()+ - RETURNS boolean + - LANGUAGE sql + - RETURN false + - -(1 row) - -SELECT pg_get_functiondef('functest_S_3a'::regproc); - pg_get_functiondef ------------------------------------------------------------ - CREATE OR REPLACE FUNCTION temp_func_test.functest_s_3a()+ - RETURNS boolean + - LANGUAGE sql + - BEGIN ATOMIC + - RETURN false; + - END + - -(1 row) - -SELECT pg_get_functiondef('functest_S_10'::regproc); - pg_get_functiondef -------------------------------------------------------------------------- - CREATE OR REPLACE FUNCTION temp_func_test.functest_s_10(a text, b date)+ - RETURNS boolean + - LANGUAGE sql + - BEGIN ATOMIC + - SELECT ((a = 'abcd'::text) AND (b > '01-01-2001'::date)); + - END + - -(1 row) - -SELECT pg_get_functiondef('functest_S_13'::regproc); - pg_get_functiondef ------------------------------------------------------------ - CREATE OR REPLACE FUNCTION temp_func_test.functest_s_13()+ - RETURNS boolean + - LANGUAGE sql + - BEGIN ATOMIC + - SELECT 1; + - SELECT false AS bool; + - END + - -(1 row) - -SELECT pg_get_functiondef('functest_S_15'::regproc); - pg_get_functiondef --------------------------------------------------------------------- - CREATE OR REPLACE FUNCTION temp_func_test.functest_s_15(x integer)+ - RETURNS boolean + - LANGUAGE sql + - BEGIN ATOMIC + - SELECT + - CASE + - WHEN ((x % 2) = 0) THEN true + - ELSE false + - END AS "case"; + - END + - -(1 row) - -SELECT pg_get_functiondef('functest_S_16'::regproc); - pg_get_functiondef -------------------------------------------------------------------------------- - CREATE OR REPLACE FUNCTION temp_func_test.functest_s_16(a integer, b integer)+ - RETURNS void + - LANGUAGE sql + - BEGIN ATOMIC + - INSERT INTO functest1 (i) SELECT (functest_s_16.a + functest_s_16.b); + - END + - -(1 row) - -DROP TABLE functest1 CASCADE; -NOTICE: drop cascades to function functest_s_16(integer,integer) --- test with views -CREATE TABLE functest3 (a int); -INSERT INTO functest3 VALUES (1), (2); -CREATE VIEW functestv3 AS SELECT * FROM functest3; -CREATE FUNCTION functest_S_14() RETURNS bigint - RETURN (SELECT count(*) FROM functestv3); -SELECT functest_S_14(); - functest_s_14 ---------------- - 2 -(1 row) - -DROP TABLE functest3 CASCADE; -NOTICE: drop cascades to 2 other objects -DETAIL: drop cascades to view functestv3 -drop cascades to function functest_s_14() --- information_schema tests -CREATE FUNCTION functest_IS_1(a int, b int default 1, c text default 'foo') - RETURNS int - LANGUAGE SQL - AS 'SELECT $1 + $2'; -CREATE FUNCTION functest_IS_2(out a int, b int default 1) - RETURNS int - LANGUAGE SQL - AS 'SELECT $1'; -CREATE FUNCTION functest_IS_3(a int default 1, out b int) - RETURNS int - LANGUAGE SQL - AS 'SELECT $1'; -SELECT routine_name, ordinal_position, parameter_name, parameter_default - FROM information_schema.parameters JOIN information_schema.routines USING (specific_schema, specific_name) - WHERE routine_schema = 'temp_func_test' AND routine_name ~ '^functest_is_' - ORDER BY 1, 2; - routine_name | ordinal_position | parameter_name | parameter_default ----------------+------------------+----------------+------------------- - functest_is_1 | 1 | a | - functest_is_1 | 2 | b | 1 - functest_is_1 | 3 | c | 'foo'::text - functest_is_2 | 1 | a | - functest_is_2 | 2 | b | 1 - functest_is_3 | 1 | a | 1 - functest_is_3 | 2 | b | -(7 rows) - -DROP FUNCTION functest_IS_1(int, int, text), functest_IS_2(int), functest_IS_3(int); --- routine usage views -CREATE FUNCTION functest_IS_4a() RETURNS int LANGUAGE SQL AS 'SELECT 1'; -CREATE FUNCTION functest_IS_4b(x int DEFAULT functest_IS_4a()) RETURNS int LANGUAGE SQL AS 'SELECT x'; -CREATE SEQUENCE functest1; -CREATE FUNCTION functest_IS_5(x int DEFAULT nextval('functest1')) - RETURNS int - LANGUAGE SQL - AS 'SELECT x'; -CREATE FUNCTION functest_IS_6() - RETURNS int - LANGUAGE SQL - RETURN nextval('functest1'); -CREATE TABLE functest2 (a int, b int); -CREATE FUNCTION functest_IS_7() - RETURNS int - LANGUAGE SQL - RETURN (SELECT count(a) FROM functest2); -SELECT r0.routine_name, r1.routine_name - FROM information_schema.routine_routine_usage rru - JOIN information_schema.routines r0 ON r0.specific_name = rru.specific_name - JOIN information_schema.routines r1 ON r1.specific_name = rru.routine_name - WHERE r0.routine_schema = 'temp_func_test' AND - r1.routine_schema = 'temp_func_test' - ORDER BY 1, 2; - routine_name | routine_name -----------------+---------------- - functest_is_4b | functest_is_4a -(1 row) - -SELECT routine_name, sequence_name FROM information_schema.routine_sequence_usage - WHERE routine_schema = 'temp_func_test' - ORDER BY 1, 2; - routine_name | sequence_name ----------------+--------------- - functest_is_5 | functest1 - functest_is_6 | functest1 -(2 rows) - -SELECT routine_name, table_name, column_name FROM information_schema.routine_column_usage - WHERE routine_schema = 'temp_func_test' - ORDER BY 1, 2; - routine_name | table_name | column_name ----------------+------------+------------- - functest_is_7 | functest2 | a -(1 row) - -SELECT routine_name, table_name FROM information_schema.routine_table_usage - WHERE routine_schema = 'temp_func_test' - ORDER BY 1, 2; - routine_name | table_name ----------------+------------ - functest_is_7 | functest2 -(1 row) - -DROP FUNCTION functest_IS_4a CASCADE; -NOTICE: drop cascades to function functest_is_4b(integer) -DROP SEQUENCE functest1 CASCADE; -NOTICE: drop cascades to 2 other objects -DETAIL: drop cascades to function functest_is_5(integer) -drop cascades to function functest_is_6() -DROP TABLE functest2 CASCADE; -NOTICE: drop cascades to function functest_is_7() --- overload -CREATE FUNCTION functest_B_2(bigint) RETURNS bool LANGUAGE 'sql' - IMMUTABLE AS 'SELECT $1 > 0'; -DROP FUNCTION functest_b_1; -DROP FUNCTION functest_b_1; -- error, not found -ERROR: could not find a function named "functest_b_1" -DROP FUNCTION functest_b_2; -- error, ambiguous -ERROR: function name "functest_b_2" is not unique -HINT: Specify the argument list to select the function unambiguously. --- CREATE OR REPLACE tests -CREATE FUNCTION functest1(a int) RETURNS int LANGUAGE SQL AS 'SELECT $1'; -CREATE OR REPLACE FUNCTION functest1(a int) RETURNS int LANGUAGE SQL WINDOW AS 'SELECT $1'; -ERROR: cannot change routine kind -DETAIL: "functest1" is a function. -CREATE OR REPLACE PROCEDURE functest1(a int) LANGUAGE SQL AS 'SELECT $1'; -ERROR: cannot change routine kind -DETAIL: "functest1" is a function. -DROP FUNCTION functest1(a int); --- inlining of set-returning functions -CREATE TABLE functest3 (a int); -INSERT INTO functest3 VALUES (1), (2), (3); -CREATE FUNCTION functest_sri1() RETURNS SETOF int -LANGUAGE SQL -STABLE -AS ' - SELECT * FROM functest3; -'; -SELECT * FROM functest_sri1(); - functest_sri1 ---------------- - 1 - 2 - 3 -(3 rows) - -EXPLAIN (verbose, costs off) SELECT * FROM functest_sri1(); - QUERY PLAN --------------------------------------- - Seq Scan on temp_func_test.functest3 - Output: functest3.a -(2 rows) - -CREATE FUNCTION functest_sri2() RETURNS SETOF int -LANGUAGE SQL -STABLE -BEGIN ATOMIC - SELECT * FROM functest3; -END; -SELECT * FROM functest_sri2(); - functest_sri2 ---------------- - 1 - 2 - 3 -(3 rows) - -EXPLAIN (verbose, costs off) SELECT * FROM functest_sri2(); - QUERY PLAN --------------------------------------- - Seq Scan on temp_func_test.functest3 - Output: functest3.a -(2 rows) - -DROP TABLE functest3 CASCADE; -NOTICE: drop cascades to function functest_sri2() --- Check behavior of VOID-returning SQL functions -CREATE FUNCTION voidtest1(a int) RETURNS VOID LANGUAGE SQL AS -$$ SELECT a + 1 $$; -SELECT voidtest1(42); - voidtest1 ------------ - -(1 row) - -CREATE FUNCTION voidtest2(a int, b int) RETURNS VOID LANGUAGE SQL AS -$$ SELECT voidtest1(a + b) $$; -SELECT voidtest2(11,22); - voidtest2 ------------ - -(1 row) - --- currently, we can inline voidtest2 but not voidtest1 -EXPLAIN (verbose, costs off) SELECT voidtest2(11,22); - QUERY PLAN -------------------------- - Result - Output: voidtest1(33) -(2 rows) - -CREATE TEMP TABLE sometable(f1 int); -CREATE FUNCTION voidtest3(a int) RETURNS VOID LANGUAGE SQL AS -$$ INSERT INTO sometable VALUES(a + 1) $$; -SELECT voidtest3(17); - voidtest3 ------------ - -(1 row) - -CREATE FUNCTION voidtest4(a int) RETURNS VOID LANGUAGE SQL AS -$$ INSERT INTO sometable VALUES(a - 1) RETURNING f1 $$; -SELECT voidtest4(39); - voidtest4 ------------ - -(1 row) - -TABLE sometable; - f1 ----- - 18 - 38 -(2 rows) - -CREATE FUNCTION voidtest5(a int) RETURNS SETOF VOID LANGUAGE SQL AS -$$ SELECT generate_series(1, a) $$ STABLE; -SELECT * FROM voidtest5(3); - voidtest5 ------------ -(0 rows) - --- Cleanup -DROP SCHEMA temp_func_test CASCADE; -NOTICE: drop cascades to 29 other objects -DETAIL: drop cascades to function functest_a_1(text,date) -drop cascades to function functest_a_2(text[]) -drop cascades to function functest_a_3() -drop cascades to function functest_b_2(integer) -drop cascades to function functest_b_3(integer) -drop cascades to function functest_b_4(integer) -drop cascades to function functest_c_1(integer) -drop cascades to function functest_c_2(integer) -drop cascades to function functest_c_3(integer) -drop cascades to function functest_e_1(integer) -drop cascades to function functest_e_2(integer) -drop cascades to function functest_f_1(integer) -drop cascades to function functest_f_2(integer) -drop cascades to function functest_f_3(integer) -drop cascades to function functest_f_4(integer) -drop cascades to function functest_s_1(text,date) -drop cascades to function functest_s_2(text[]) -drop cascades to function functest_s_3() -drop cascades to function functest_s_3a() -drop cascades to function functest_s_10(text,date) -drop cascades to function functest_s_13() -drop cascades to function functest_s_15(integer) -drop cascades to function functest_b_2(bigint) -drop cascades to function functest_sri1() -drop cascades to function voidtest1(integer) -drop cascades to function voidtest2(integer,integer) -drop cascades to function voidtest3(integer) -drop cascades to function voidtest4(integer) -drop cascades to function voidtest5(integer) -DROP USER regress_unpriv_user; -RESET search_path; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/create_cast.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/create_cast.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/create_cast.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/create_cast.out 2023-02-20 19:45:21.309209969 -0500 @@ -1,74 +1 @@ --- --- CREATE_CAST --- --- Create some types to test with -CREATE TYPE casttesttype; -CREATE FUNCTION casttesttype_in(cstring) - RETURNS casttesttype - AS 'textin' - LANGUAGE internal STRICT IMMUTABLE; -NOTICE: return type casttesttype is only a shell -CREATE FUNCTION casttesttype_out(casttesttype) - RETURNS cstring - AS 'textout' - LANGUAGE internal STRICT IMMUTABLE; -NOTICE: argument type casttesttype is only a shell -CREATE TYPE casttesttype ( - internallength = variable, - input = casttesttype_in, - output = casttesttype_out, - alignment = int4 -); --- a dummy function to test with -CREATE FUNCTION casttestfunc(casttesttype) RETURNS int4 LANGUAGE SQL AS -$$ SELECT 1; $$; -SELECT casttestfunc('foo'::text); -- fails, as there's no cast -ERROR: function casttestfunc(text) does not exist -LINE 1: SELECT casttestfunc('foo'::text); - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. --- Try binary coercion cast -CREATE CAST (text AS casttesttype) WITHOUT FUNCTION; -SELECT casttestfunc('foo'::text); -- doesn't work, as the cast is explicit -ERROR: function casttestfunc(text) does not exist -LINE 1: SELECT casttestfunc('foo'::text); - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. -SELECT casttestfunc('foo'::text::casttesttype); -- should work - casttestfunc --------------- - 1 -(1 row) - -DROP CAST (text AS casttesttype); -- cleanup --- Try IMPLICIT binary coercion cast -CREATE CAST (text AS casttesttype) WITHOUT FUNCTION AS IMPLICIT; -SELECT casttestfunc('foo'::text); -- Should work now - casttestfunc --------------- - 1 -(1 row) - --- Try I/O conversion cast. -SELECT 1234::int4::casttesttype; -- No cast yet, should fail -ERROR: cannot cast type integer to casttesttype -LINE 1: SELECT 1234::int4::casttesttype; - ^ -CREATE CAST (int4 AS casttesttype) WITH INOUT; -SELECT 1234::int4::casttesttype; -- Should work now - casttesttype --------------- - 1234 -(1 row) - -DROP CAST (int4 AS casttesttype); --- Try cast with a function -CREATE FUNCTION int4_casttesttype(int4) RETURNS casttesttype LANGUAGE SQL AS -$$ SELECT ('foo'::text || $1::text)::casttesttype; $$; -CREATE CAST (int4 AS casttesttype) WITH FUNCTION int4_casttesttype(int4) AS IMPLICIT; -SELECT 1234::int4::casttesttype; -- Should work now - casttesttype --------------- - foo1234 -(1 row) - +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/constraints.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/constraints.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/constraints.out 2023-02-20 19:42:50.359203492 -0500 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/constraints.out 2023-02-20 19:45:21.499209977 -0500 @@ -1,738 +1 @@ --- --- CONSTRAINTS --- Constraints can be specified with: --- - DEFAULT clause --- - CHECK clauses --- - PRIMARY KEY clauses --- - UNIQUE clauses --- - EXCLUDE clauses --- --- --- DEFAULT syntax --- -CREATE TABLE DEFAULT_TBL (i int DEFAULT 100, - x text DEFAULT 'vadim', f float8 DEFAULT 123.456); -INSERT INTO DEFAULT_TBL VALUES (1, 'thomas', 57.0613); -INSERT INTO DEFAULT_TBL VALUES (1, 'bruce'); -INSERT INTO DEFAULT_TBL (i, f) VALUES (2, 987.654); -INSERT INTO DEFAULT_TBL (x) VALUES ('marc'); -INSERT INTO DEFAULT_TBL VALUES (3, null, 1.0); -SELECT * FROM DEFAULT_TBL; - i | x | f ------+--------+--------- - 1 | thomas | 57.0613 - 1 | bruce | 123.456 - 2 | vadim | 987.654 - 100 | marc | 123.456 - 3 | | 1 -(5 rows) - -CREATE SEQUENCE DEFAULT_SEQ; -CREATE TABLE DEFAULTEXPR_TBL (i1 int DEFAULT 100 + (200-199) * 2, - i2 int DEFAULT nextval('default_seq')); -INSERT INTO DEFAULTEXPR_TBL VALUES (-1, -2); -INSERT INTO DEFAULTEXPR_TBL (i1) VALUES (-3); -INSERT INTO DEFAULTEXPR_TBL (i2) VALUES (-4); -INSERT INTO DEFAULTEXPR_TBL (i2) VALUES (NULL); -SELECT * FROM DEFAULTEXPR_TBL; - i1 | i2 ------+---- - -1 | -2 - -3 | 1 - 102 | -4 - 102 | -(4 rows) - --- syntax errors --- test for extraneous comma -CREATE TABLE error_tbl (i int DEFAULT (100, )); -ERROR: syntax error at or near ")" -LINE 1: CREATE TABLE error_tbl (i int DEFAULT (100, )); - ^ --- this will fail because gram.y uses b_expr not a_expr for defaults, --- to avoid a shift/reduce conflict that arises from NOT NULL being --- part of the column definition syntax: -CREATE TABLE error_tbl (b1 bool DEFAULT 1 IN (1, 2)); -ERROR: syntax error at or near "IN" -LINE 1: CREATE TABLE error_tbl (b1 bool DEFAULT 1 IN (1, 2)); - ^ --- this should work, however: -CREATE TABLE error_tbl (b1 bool DEFAULT (1 IN (1, 2))); -DROP TABLE error_tbl; --- --- CHECK syntax --- -CREATE TABLE CHECK_TBL (x int, - CONSTRAINT CHECK_CON CHECK (x > 3)); -INSERT INTO CHECK_TBL VALUES (5); -INSERT INTO CHECK_TBL VALUES (4); -INSERT INTO CHECK_TBL VALUES (3); -ERROR: new row for relation "check_tbl" violates check constraint "check_con" -DETAIL: Failing row contains (3). -INSERT INTO CHECK_TBL VALUES (2); -ERROR: new row for relation "check_tbl" violates check constraint "check_con" -DETAIL: Failing row contains (2). -INSERT INTO CHECK_TBL VALUES (6); -INSERT INTO CHECK_TBL VALUES (1); -ERROR: new row for relation "check_tbl" violates check constraint "check_con" -DETAIL: Failing row contains (1). -SELECT * FROM CHECK_TBL; - x ---- - 5 - 4 - 6 -(3 rows) - -CREATE SEQUENCE CHECK_SEQ; -CREATE TABLE CHECK2_TBL (x int, y text, z int, - CONSTRAINT SEQUENCE_CON - CHECK (x > 3 and y <> 'check failed' and z < 8)); -INSERT INTO CHECK2_TBL VALUES (4, 'check ok', -2); -INSERT INTO CHECK2_TBL VALUES (1, 'x check failed', -2); -ERROR: new row for relation "check2_tbl" violates check constraint "sequence_con" -DETAIL: Failing row contains (1, x check failed, -2). -INSERT INTO CHECK2_TBL VALUES (5, 'z check failed', 10); -ERROR: new row for relation "check2_tbl" violates check constraint "sequence_con" -DETAIL: Failing row contains (5, z check failed, 10). -INSERT INTO CHECK2_TBL VALUES (0, 'check failed', -2); -ERROR: new row for relation "check2_tbl" violates check constraint "sequence_con" -DETAIL: Failing row contains (0, check failed, -2). -INSERT INTO CHECK2_TBL VALUES (6, 'check failed', 11); -ERROR: new row for relation "check2_tbl" violates check constraint "sequence_con" -DETAIL: Failing row contains (6, check failed, 11). -INSERT INTO CHECK2_TBL VALUES (7, 'check ok', 7); -SELECT * from CHECK2_TBL; - x | y | z ----+----------+---- - 4 | check ok | -2 - 7 | check ok | 7 -(2 rows) - --- --- Check constraints on INSERT --- -CREATE SEQUENCE INSERT_SEQ; -CREATE TABLE INSERT_TBL (x INT DEFAULT nextval('insert_seq'), - y TEXT DEFAULT '-NULL-', - z INT DEFAULT -1 * currval('insert_seq'), - CONSTRAINT INSERT_TBL_CON CHECK (x >= 3 AND y <> 'check failed' AND x < 8), - CHECK (x + z = 0)); -INSERT INTO INSERT_TBL(x,z) VALUES (2, -2); -ERROR: new row for relation "insert_tbl" violates check constraint "insert_tbl_con" -DETAIL: Failing row contains (2, -NULL-, -2). -SELECT * FROM INSERT_TBL; - x | y | z ----+---+--- -(0 rows) - -SELECT 'one' AS one, nextval('insert_seq'); - one | nextval ------+--------- - one | 1 -(1 row) - -INSERT INTO INSERT_TBL(y) VALUES ('Y'); -ERROR: new row for relation "insert_tbl" violates check constraint "insert_tbl_con" -DETAIL: Failing row contains (2, Y, -2). -INSERT INTO INSERT_TBL(y) VALUES ('Y'); -INSERT INTO INSERT_TBL(x,z) VALUES (1, -2); -ERROR: new row for relation "insert_tbl" violates check constraint "insert_tbl_check" -DETAIL: Failing row contains (1, -NULL-, -2). -INSERT INTO INSERT_TBL(z,x) VALUES (-7, 7); -INSERT INTO INSERT_TBL VALUES (5, 'check failed', -5); -ERROR: new row for relation "insert_tbl" violates check constraint "insert_tbl_con" -DETAIL: Failing row contains (5, check failed, -5). -INSERT INTO INSERT_TBL VALUES (7, '!check failed', -7); -INSERT INTO INSERT_TBL(y) VALUES ('-!NULL-'); -SELECT * FROM INSERT_TBL; - x | y | z ----+---------------+---- - 3 | Y | -3 - 7 | -NULL- | -7 - 7 | !check failed | -7 - 4 | -!NULL- | -4 -(4 rows) - -INSERT INTO INSERT_TBL(y,z) VALUES ('check failed', 4); -ERROR: new row for relation "insert_tbl" violates check constraint "insert_tbl_check" -DETAIL: Failing row contains (5, check failed, 4). -INSERT INTO INSERT_TBL(x,y) VALUES (5, 'check failed'); -ERROR: new row for relation "insert_tbl" violates check constraint "insert_tbl_con" -DETAIL: Failing row contains (5, check failed, -5). -INSERT INTO INSERT_TBL(x,y) VALUES (5, '!check failed'); -INSERT INTO INSERT_TBL(y) VALUES ('-!NULL-'); -SELECT * FROM INSERT_TBL; - x | y | z ----+---------------+---- - 3 | Y | -3 - 7 | -NULL- | -7 - 7 | !check failed | -7 - 4 | -!NULL- | -4 - 5 | !check failed | -5 - 6 | -!NULL- | -6 -(6 rows) - -SELECT 'seven' AS one, nextval('insert_seq'); - one | nextval --------+--------- - seven | 7 -(1 row) - -INSERT INTO INSERT_TBL(y) VALUES ('Y'); -ERROR: new row for relation "insert_tbl" violates check constraint "insert_tbl_con" -DETAIL: Failing row contains (8, Y, -8). -SELECT 'eight' AS one, currval('insert_seq'); - one | currval --------+--------- - eight | 8 -(1 row) - --- According to SQL, it is OK to insert a record that gives rise to NULL --- constraint-condition results. Postgres used to reject this, but it --- was wrong: -INSERT INTO INSERT_TBL VALUES (null, null, null); -SELECT * FROM INSERT_TBL; - x | y | z ----+---------------+---- - 3 | Y | -3 - 7 | -NULL- | -7 - 7 | !check failed | -7 - 4 | -!NULL- | -4 - 5 | !check failed | -5 - 6 | -!NULL- | -6 - | | -(7 rows) - --- --- Check constraints on system columns --- -CREATE TABLE SYS_COL_CHECK_TBL (city text, state text, is_capital bool, - altitude int, - CHECK (NOT (is_capital AND tableoid::regclass::text = 'sys_col_check_tbl'))); -INSERT INTO SYS_COL_CHECK_TBL VALUES ('Seattle', 'Washington', false, 100); -INSERT INTO SYS_COL_CHECK_TBL VALUES ('Olympia', 'Washington', true, 100); -ERROR: new row for relation "sys_col_check_tbl" violates check constraint "sys_col_check_tbl_check" -DETAIL: Failing row contains (Olympia, Washington, t, 100). -SELECT *, tableoid::regclass::text FROM SYS_COL_CHECK_TBL; - city | state | is_capital | altitude | tableoid ----------+------------+------------+----------+------------------- - Seattle | Washington | f | 100 | sys_col_check_tbl -(1 row) - -DROP TABLE SYS_COL_CHECK_TBL; --- --- Check constraints on system columns other then TableOid should return error --- -CREATE TABLE SYS_COL_CHECK_TBL (city text, state text, is_capital bool, - altitude int, - CHECK (NOT (is_capital AND ctid::text = 'sys_col_check_tbl'))); -ERROR: system column "ctid" reference in check constraint is invalid -LINE 3: CHECK (NOT (is_capital AND ctid::text = 'sys_col_check... - ^ --- --- Check inheritance of defaults and constraints --- -CREATE TABLE INSERT_CHILD (cx INT default 42, - cy INT CHECK (cy > x)) - INHERITS (INSERT_TBL); -INSERT INTO INSERT_CHILD(x,z,cy) VALUES (7,-7,11); -INSERT INTO INSERT_CHILD(x,z,cy) VALUES (7,-7,6); -ERROR: new row for relation "insert_child" violates check constraint "insert_child_check" -DETAIL: Failing row contains (7, -NULL-, -7, 42, 6). -INSERT INTO INSERT_CHILD(x,z,cy) VALUES (6,-7,7); -ERROR: new row for relation "insert_child" violates check constraint "insert_tbl_check" -DETAIL: Failing row contains (6, -NULL-, -7, 42, 7). -INSERT INTO INSERT_CHILD(x,y,z,cy) VALUES (6,'check failed',-6,7); -ERROR: new row for relation "insert_child" violates check constraint "insert_tbl_con" -DETAIL: Failing row contains (6, check failed, -6, 42, 7). -SELECT * FROM INSERT_CHILD; - x | y | z | cx | cy ----+--------+----+----+---- - 7 | -NULL- | -7 | 42 | 11 -(1 row) - -DROP TABLE INSERT_CHILD; --- --- Check NO INHERIT type of constraints and inheritance --- -CREATE TABLE ATACC1 (TEST INT - CHECK (TEST > 0) NO INHERIT); -CREATE TABLE ATACC2 (TEST2 INT) INHERITS (ATACC1); --- check constraint is not there on child -INSERT INTO ATACC2 (TEST) VALUES (-3); --- check constraint is there on parent -INSERT INTO ATACC1 (TEST) VALUES (-3); -ERROR: new row for relation "atacc1" violates check constraint "atacc1_test_check" -DETAIL: Failing row contains (-3). -DROP TABLE ATACC1 CASCADE; -NOTICE: drop cascades to table atacc2 -CREATE TABLE ATACC1 (TEST INT, TEST2 INT - CHECK (TEST > 0), CHECK (TEST2 > 10) NO INHERIT); -CREATE TABLE ATACC2 () INHERITS (ATACC1); --- check constraint is there on child -INSERT INTO ATACC2 (TEST) VALUES (-3); -ERROR: new row for relation "atacc2" violates check constraint "atacc1_test_check" -DETAIL: Failing row contains (-3, null). --- check constraint is there on parent -INSERT INTO ATACC1 (TEST) VALUES (-3); -ERROR: new row for relation "atacc1" violates check constraint "atacc1_test_check" -DETAIL: Failing row contains (-3, null). --- check constraint is not there on child -INSERT INTO ATACC2 (TEST2) VALUES (3); --- check constraint is there on parent -INSERT INTO ATACC1 (TEST2) VALUES (3); -ERROR: new row for relation "atacc1" violates check constraint "atacc1_test2_check" -DETAIL: Failing row contains (null, 3). -DROP TABLE ATACC1 CASCADE; -NOTICE: drop cascades to table atacc2 --- --- Check constraints on INSERT INTO --- -DELETE FROM INSERT_TBL; -ALTER SEQUENCE INSERT_SEQ RESTART WITH 4; -CREATE TEMP TABLE tmp (xd INT, yd TEXT, zd INT); -INSERT INTO tmp VALUES (null, 'Y', null); -INSERT INTO tmp VALUES (5, '!check failed', null); -INSERT INTO tmp VALUES (null, 'try again', null); -INSERT INTO INSERT_TBL(y) select yd from tmp; -SELECT * FROM INSERT_TBL; - x | y | z ----+---------------+---- - 4 | Y | -4 - 5 | !check failed | -5 - 6 | try again | -6 -(3 rows) - -INSERT INTO INSERT_TBL SELECT * FROM tmp WHERE yd = 'try again'; -INSERT INTO INSERT_TBL(y,z) SELECT yd, -7 FROM tmp WHERE yd = 'try again'; -INSERT INTO INSERT_TBL(y,z) SELECT yd, -8 FROM tmp WHERE yd = 'try again'; -ERROR: new row for relation "insert_tbl" violates check constraint "insert_tbl_con" -DETAIL: Failing row contains (8, try again, -8). -SELECT * FROM INSERT_TBL; - x | y | z ----+---------------+---- - 4 | Y | -4 - 5 | !check failed | -5 - 6 | try again | -6 - | try again | - 7 | try again | -7 -(5 rows) - -DROP TABLE tmp; --- --- Check constraints on UPDATE --- -UPDATE INSERT_TBL SET x = NULL WHERE x = 5; -UPDATE INSERT_TBL SET x = 6 WHERE x = 6; -UPDATE INSERT_TBL SET x = -z, z = -x; -UPDATE INSERT_TBL SET x = z, z = x; -ERROR: new row for relation "insert_tbl" violates check constraint "insert_tbl_con" -DETAIL: Failing row contains (-4, Y, 4). -SELECT * FROM INSERT_TBL; - x | y | z ----+---------------+---- - 4 | Y | -4 - | try again | - 7 | try again | -7 - 5 | !check failed | - 6 | try again | -6 -(5 rows) - --- DROP TABLE INSERT_TBL; --- --- Check constraints on COPY FROM --- -CREATE TABLE COPY_TBL (x INT, y TEXT, z INT, - CONSTRAINT COPY_CON - CHECK (x > 3 AND y <> 'check failed' AND x < 7 )); -COPY COPY_TBL FROM '/builddir/build/BUILD/postgresql-14.3/src/test/regress/data/constro.data'; -SELECT * FROM COPY_TBL; - x | y | z ----+---------------+--- - 4 | !check failed | 5 - 6 | OK | 4 -(2 rows) - -COPY COPY_TBL FROM '/builddir/build/BUILD/postgresql-14.3/src/test/regress/data/constrf.data'; -ERROR: new row for relation "copy_tbl" violates check constraint "copy_con" -DETAIL: Failing row contains (7, check failed, 6). -CONTEXT: COPY copy_tbl, line 2: "7 check failed 6" -SELECT * FROM COPY_TBL; - x | y | z ----+---------------+--- - 4 | !check failed | 5 - 6 | OK | 4 -(2 rows) - --- --- Primary keys --- -CREATE TABLE PRIMARY_TBL (i int PRIMARY KEY, t text); -INSERT INTO PRIMARY_TBL VALUES (1, 'one'); -INSERT INTO PRIMARY_TBL VALUES (2, 'two'); -INSERT INTO PRIMARY_TBL VALUES (1, 'three'); -ERROR: duplicate key value violates unique constraint "primary_tbl_pkey" -DETAIL: Key (i)=(1) already exists. -INSERT INTO PRIMARY_TBL VALUES (4, 'three'); -INSERT INTO PRIMARY_TBL VALUES (5, 'one'); -INSERT INTO PRIMARY_TBL (t) VALUES ('six'); -ERROR: null value in column "i" of relation "primary_tbl" violates not-null constraint -DETAIL: Failing row contains (null, six). -SELECT * FROM PRIMARY_TBL; - i | t ----+------- - 1 | one - 2 | two - 4 | three - 5 | one -(4 rows) - -DROP TABLE PRIMARY_TBL; -CREATE TABLE PRIMARY_TBL (i int, t text, - PRIMARY KEY(i,t)); -INSERT INTO PRIMARY_TBL VALUES (1, 'one'); -INSERT INTO PRIMARY_TBL VALUES (2, 'two'); -INSERT INTO PRIMARY_TBL VALUES (1, 'three'); -INSERT INTO PRIMARY_TBL VALUES (4, 'three'); -INSERT INTO PRIMARY_TBL VALUES (5, 'one'); -INSERT INTO PRIMARY_TBL (t) VALUES ('six'); -ERROR: null value in column "i" of relation "primary_tbl" violates not-null constraint -DETAIL: Failing row contains (null, six). -SELECT * FROM PRIMARY_TBL; - i | t ----+------- - 1 | one - 2 | two - 1 | three - 4 | three - 5 | one -(5 rows) - -DROP TABLE PRIMARY_TBL; --- --- Unique keys --- -CREATE TABLE UNIQUE_TBL (i int UNIQUE, t text); -INSERT INTO UNIQUE_TBL VALUES (1, 'one'); -INSERT INTO UNIQUE_TBL VALUES (2, 'two'); -INSERT INTO UNIQUE_TBL VALUES (1, 'three'); -ERROR: duplicate key value violates unique constraint "unique_tbl_i_key" -DETAIL: Key (i)=(1) already exists. -INSERT INTO UNIQUE_TBL VALUES (4, 'four'); -INSERT INTO UNIQUE_TBL VALUES (5, 'one'); -INSERT INTO UNIQUE_TBL (t) VALUES ('six'); -INSERT INTO UNIQUE_TBL (t) VALUES ('seven'); -INSERT INTO UNIQUE_TBL VALUES (5, 'five-upsert-insert') ON CONFLICT (i) DO UPDATE SET t = 'five-upsert-update'; -INSERT INTO UNIQUE_TBL VALUES (6, 'six-upsert-insert') ON CONFLICT (i) DO UPDATE SET t = 'six-upsert-update'; --- should fail -INSERT INTO UNIQUE_TBL VALUES (1, 'a'), (2, 'b'), (2, 'b') ON CONFLICT (i) DO UPDATE SET t = 'fails'; -ERROR: ON CONFLICT DO UPDATE command cannot affect row a second time -HINT: Ensure that no rows proposed for insertion within the same command have duplicate constrained values. -SELECT * FROM UNIQUE_TBL; - i | t ----+-------------------- - 1 | one - 2 | two - 4 | four - | six - | seven - 5 | five-upsert-update - 6 | six-upsert-insert -(7 rows) - -DROP TABLE UNIQUE_TBL; -CREATE TABLE UNIQUE_TBL (i int, t text, - UNIQUE(i,t)); -INSERT INTO UNIQUE_TBL VALUES (1, 'one'); -INSERT INTO UNIQUE_TBL VALUES (2, 'two'); -INSERT INTO UNIQUE_TBL VALUES (1, 'three'); -INSERT INTO UNIQUE_TBL VALUES (1, 'one'); -ERROR: duplicate key value violates unique constraint "unique_tbl_i_t_key" -DETAIL: Key (i, t)=(1, one) already exists. -INSERT INTO UNIQUE_TBL VALUES (5, 'one'); -INSERT INTO UNIQUE_TBL (t) VALUES ('six'); -SELECT * FROM UNIQUE_TBL; - i | t ----+------- - 1 | one - 2 | two - 1 | three - 5 | one - | six -(5 rows) - -DROP TABLE UNIQUE_TBL; --- --- Deferrable unique constraints --- -CREATE TABLE unique_tbl (i int UNIQUE DEFERRABLE, t text); -INSERT INTO unique_tbl VALUES (0, 'one'); -INSERT INTO unique_tbl VALUES (1, 'two'); -INSERT INTO unique_tbl VALUES (2, 'tree'); -INSERT INTO unique_tbl VALUES (3, 'four'); -INSERT INTO unique_tbl VALUES (4, 'five'); -BEGIN; --- default is immediate so this should fail right away -UPDATE unique_tbl SET i = 1 WHERE i = 0; -ERROR: duplicate key value violates unique constraint "unique_tbl_i_key" -DETAIL: Key (i)=(1) already exists. -ROLLBACK; --- check is done at end of statement, so this should succeed -UPDATE unique_tbl SET i = i+1; -SELECT * FROM unique_tbl; - i | t ----+------ - 1 | one - 2 | two - 3 | tree - 4 | four - 5 | five -(5 rows) - --- explicitly defer the constraint -BEGIN; -SET CONSTRAINTS unique_tbl_i_key DEFERRED; -INSERT INTO unique_tbl VALUES (3, 'three'); -DELETE FROM unique_tbl WHERE t = 'tree'; -- makes constraint valid again -COMMIT; -- should succeed -SELECT * FROM unique_tbl; - i | t ----+------- - 1 | one - 2 | two - 4 | four - 5 | five - 3 | three -(5 rows) - --- try adding an initially deferred constraint -ALTER TABLE unique_tbl DROP CONSTRAINT unique_tbl_i_key; -ALTER TABLE unique_tbl ADD CONSTRAINT unique_tbl_i_key - UNIQUE (i) DEFERRABLE INITIALLY DEFERRED; -BEGIN; -INSERT INTO unique_tbl VALUES (1, 'five'); -INSERT INTO unique_tbl VALUES (5, 'one'); -UPDATE unique_tbl SET i = 4 WHERE i = 2; -UPDATE unique_tbl SET i = 2 WHERE i = 4 AND t = 'four'; -DELETE FROM unique_tbl WHERE i = 1 AND t = 'one'; -DELETE FROM unique_tbl WHERE i = 5 AND t = 'five'; -COMMIT; -SELECT * FROM unique_tbl; - i | t ----+------- - 3 | three - 1 | five - 5 | one - 4 | two - 2 | four -(5 rows) - --- should fail at commit-time -BEGIN; -INSERT INTO unique_tbl VALUES (3, 'Three'); -- should succeed for now -COMMIT; -- should fail -ERROR: duplicate key value violates unique constraint "unique_tbl_i_key" -DETAIL: Key (i)=(3) already exists. --- make constraint check immediate -BEGIN; -SET CONSTRAINTS ALL IMMEDIATE; -INSERT INTO unique_tbl VALUES (3, 'Three'); -- should fail -ERROR: duplicate key value violates unique constraint "unique_tbl_i_key" -DETAIL: Key (i)=(3) already exists. -COMMIT; --- forced check when SET CONSTRAINTS is called -BEGIN; -SET CONSTRAINTS ALL DEFERRED; -INSERT INTO unique_tbl VALUES (3, 'Three'); -- should succeed for now -SET CONSTRAINTS ALL IMMEDIATE; -- should fail -ERROR: duplicate key value violates unique constraint "unique_tbl_i_key" -DETAIL: Key (i)=(3) already exists. -COMMIT; --- test deferrable UNIQUE with a partitioned table -CREATE TABLE parted_uniq_tbl (i int UNIQUE DEFERRABLE) partition by range (i); -CREATE TABLE parted_uniq_tbl_1 PARTITION OF parted_uniq_tbl FOR VALUES FROM (0) TO (10); -CREATE TABLE parted_uniq_tbl_2 PARTITION OF parted_uniq_tbl FOR VALUES FROM (20) TO (30); -SELECT conname, conrelid::regclass FROM pg_constraint - WHERE conname LIKE 'parted_uniq%' ORDER BY conname; - conname | conrelid --------------------------+------------------- - parted_uniq_tbl_1_i_key | parted_uniq_tbl_1 - parted_uniq_tbl_2_i_key | parted_uniq_tbl_2 - parted_uniq_tbl_i_key | parted_uniq_tbl -(3 rows) - -BEGIN; -INSERT INTO parted_uniq_tbl VALUES (1); -SAVEPOINT f; -INSERT INTO parted_uniq_tbl VALUES (1); -- unique violation -ERROR: duplicate key value violates unique constraint "parted_uniq_tbl_1_i_key" -DETAIL: Key (i)=(1) already exists. -ROLLBACK TO f; -SET CONSTRAINTS parted_uniq_tbl_i_key DEFERRED; -INSERT INTO parted_uniq_tbl VALUES (1); -- OK now, fail at commit -COMMIT; -ERROR: duplicate key value violates unique constraint "parted_uniq_tbl_1_i_key" -DETAIL: Key (i)=(1) already exists. -DROP TABLE parted_uniq_tbl; --- test a HOT update that invalidates the conflicting tuple. --- the trigger should still fire and catch the violation -BEGIN; -INSERT INTO unique_tbl VALUES (3, 'Three'); -- should succeed for now -UPDATE unique_tbl SET t = 'THREE' WHERE i = 3 AND t = 'Three'; -COMMIT; -- should fail -ERROR: duplicate key value violates unique constraint "unique_tbl_i_key" -DETAIL: Key (i)=(3) already exists. -SELECT * FROM unique_tbl; - i | t ----+------- - 3 | three - 1 | five - 5 | one - 4 | two - 2 | four -(5 rows) - --- test a HOT update that modifies the newly inserted tuple, --- but should succeed because we then remove the other conflicting tuple. -BEGIN; -INSERT INTO unique_tbl VALUES(3, 'tree'); -- should succeed for now -UPDATE unique_tbl SET t = 'threex' WHERE t = 'tree'; -DELETE FROM unique_tbl WHERE t = 'three'; -SELECT * FROM unique_tbl; - i | t ----+-------- - 1 | five - 5 | one - 4 | two - 2 | four - 3 | threex -(5 rows) - -COMMIT; -SELECT * FROM unique_tbl; - i | t ----+-------- - 1 | five - 5 | one - 4 | two - 2 | four - 3 | threex -(5 rows) - -DROP TABLE unique_tbl; --- --- EXCLUDE constraints --- -CREATE TABLE circles ( - c1 CIRCLE, - c2 TEXT, - EXCLUDE USING gist - (c1 WITH &&, (c2::circle) WITH &&) - WHERE (circle_center(c1) <> '(0,0)') -); --- these should succeed because they don't match the index predicate -INSERT INTO circles VALUES('<(0,0), 5>', '<(0,0), 5>'); -INSERT INTO circles VALUES('<(0,0), 5>', '<(0,0), 4>'); --- succeed -INSERT INTO circles VALUES('<(10,10), 10>', '<(0,0), 5>'); --- fail, overlaps -INSERT INTO circles VALUES('<(20,20), 10>', '<(0,0), 4>'); -ERROR: conflicting key value violates exclusion constraint "circles_c1_c2_excl" -DETAIL: Key (c1, (c2::circle))=(<(20,20),10>, <(0,0),4>) conflicts with existing key (c1, (c2::circle))=(<(10,10),10>, <(0,0),5>). --- succeed, because violation is ignored -INSERT INTO circles VALUES('<(20,20), 10>', '<(0,0), 4>') - ON CONFLICT ON CONSTRAINT circles_c1_c2_excl DO NOTHING; --- fail, because DO UPDATE variant requires unique index -INSERT INTO circles VALUES('<(20,20), 10>', '<(0,0), 4>') - ON CONFLICT ON CONSTRAINT circles_c1_c2_excl DO UPDATE SET c2 = EXCLUDED.c2; -ERROR: ON CONFLICT DO UPDATE not supported with exclusion constraints --- succeed because c1 doesn't overlap -INSERT INTO circles VALUES('<(20,20), 1>', '<(0,0), 5>'); --- succeed because c2 doesn't overlap -INSERT INTO circles VALUES('<(20,20), 10>', '<(10,10), 5>'); --- should fail on existing data without the WHERE clause -ALTER TABLE circles ADD EXCLUDE USING gist - (c1 WITH &&, (c2::circle) WITH &&); -ERROR: could not create exclusion constraint "circles_c1_c2_excl1" -DETAIL: Key (c1, (c2::circle))=(<(0,0),5>, <(0,0),5>) conflicts with key (c1, (c2::circle))=(<(0,0),5>, <(0,0),4>). --- try reindexing an existing constraint -REINDEX INDEX circles_c1_c2_excl; -DROP TABLE circles; --- Check deferred exclusion constraint -CREATE TABLE deferred_excl ( - f1 int, - f2 int, - CONSTRAINT deferred_excl_con EXCLUDE (f1 WITH =) INITIALLY DEFERRED -); -INSERT INTO deferred_excl VALUES(1); -INSERT INTO deferred_excl VALUES(2); -INSERT INTO deferred_excl VALUES(1); -- fail -ERROR: conflicting key value violates exclusion constraint "deferred_excl_con" -DETAIL: Key (f1)=(1) conflicts with existing key (f1)=(1). -INSERT INTO deferred_excl VALUES(1) ON CONFLICT ON CONSTRAINT deferred_excl_con DO NOTHING; -- fail -ERROR: ON CONFLICT does not support deferrable unique constraints/exclusion constraints as arbiters -BEGIN; -INSERT INTO deferred_excl VALUES(2); -- no fail here -COMMIT; -- should fail here -ERROR: conflicting key value violates exclusion constraint "deferred_excl_con" -DETAIL: Key (f1)=(2) conflicts with existing key (f1)=(2). -BEGIN; -INSERT INTO deferred_excl VALUES(3); -INSERT INTO deferred_excl VALUES(3); -- no fail here -COMMIT; -- should fail here -ERROR: conflicting key value violates exclusion constraint "deferred_excl_con" -DETAIL: Key (f1)=(3) conflicts with existing key (f1)=(3). --- bug #13148: deferred constraint versus HOT update -BEGIN; -INSERT INTO deferred_excl VALUES(2, 1); -- no fail here -DELETE FROM deferred_excl WHERE f1 = 2 AND f2 IS NULL; -- remove old row -UPDATE deferred_excl SET f2 = 2 WHERE f1 = 2; -COMMIT; -- should not fail -SELECT * FROM deferred_excl; - f1 | f2 -----+---- - 1 | - 2 | 2 -(2 rows) - -ALTER TABLE deferred_excl DROP CONSTRAINT deferred_excl_con; --- This should fail, but worth testing because of HOT updates -UPDATE deferred_excl SET f1 = 3; -ALTER TABLE deferred_excl ADD EXCLUDE (f1 WITH =); -ERROR: could not create exclusion constraint "deferred_excl_f1_excl" -DETAIL: Key (f1)=(3) conflicts with key (f1)=(3). -DROP TABLE deferred_excl; --- Comments --- Setup a low-level role to enforce non-superuser checks. -CREATE ROLE regress_constraint_comments; -SET SESSION AUTHORIZATION regress_constraint_comments; -CREATE TABLE constraint_comments_tbl (a int CONSTRAINT the_constraint CHECK (a > 0)); -CREATE DOMAIN constraint_comments_dom AS int CONSTRAINT the_constraint CHECK (value > 0); -COMMENT ON CONSTRAINT the_constraint ON constraint_comments_tbl IS 'yes, the comment'; -COMMENT ON CONSTRAINT the_constraint ON DOMAIN constraint_comments_dom IS 'yes, another comment'; --- no such constraint -COMMENT ON CONSTRAINT no_constraint ON constraint_comments_tbl IS 'yes, the comment'; -ERROR: constraint "no_constraint" for table "constraint_comments_tbl" does not exist -COMMENT ON CONSTRAINT no_constraint ON DOMAIN constraint_comments_dom IS 'yes, another comment'; -ERROR: constraint "no_constraint" for domain constraint_comments_dom does not exist --- no such table/domain -COMMENT ON CONSTRAINT the_constraint ON no_comments_tbl IS 'bad comment'; -ERROR: relation "no_comments_tbl" does not exist -COMMENT ON CONSTRAINT the_constraint ON DOMAIN no_comments_dom IS 'another bad comment'; -ERROR: type "no_comments_dom" does not exist -COMMENT ON CONSTRAINT the_constraint ON constraint_comments_tbl IS NULL; -COMMENT ON CONSTRAINT the_constraint ON DOMAIN constraint_comments_dom IS NULL; --- unauthorized user -RESET SESSION AUTHORIZATION; -CREATE ROLE regress_constraint_comments_noaccess; -SET SESSION AUTHORIZATION regress_constraint_comments_noaccess; -COMMENT ON CONSTRAINT the_constraint ON constraint_comments_tbl IS 'no, the comment'; -ERROR: must be owner of relation constraint_comments_tbl -COMMENT ON CONSTRAINT the_constraint ON DOMAIN constraint_comments_dom IS 'no, another comment'; -ERROR: must be owner of type constraint_comments_dom -RESET SESSION AUTHORIZATION; -DROP TABLE constraint_comments_tbl; -DROP DOMAIN constraint_comments_dom; -DROP ROLE regress_constraint_comments; -DROP ROLE regress_constraint_comments_noaccess; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/triggers.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/triggers.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/triggers.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/triggers.out 2023-02-20 19:45:21.329209970 -0500 @@ -1,3426 +1 @@ --- --- TRIGGERS --- -create table pkeys (pkey1 int4 not null, pkey2 text not null); -create table fkeys (fkey1 int4, fkey2 text, fkey3 int); -create table fkeys2 (fkey21 int4, fkey22 text, pkey23 int not null); -create index fkeys_i on fkeys (fkey1, fkey2); -create index fkeys2_i on fkeys2 (fkey21, fkey22); -create index fkeys2p_i on fkeys2 (pkey23); -insert into pkeys values (10, '1'); -insert into pkeys values (20, '2'); -insert into pkeys values (30, '3'); -insert into pkeys values (40, '4'); -insert into pkeys values (50, '5'); -insert into pkeys values (60, '6'); -create unique index pkeys_i on pkeys (pkey1, pkey2); --- --- For fkeys: --- (fkey1, fkey2) --> pkeys (pkey1, pkey2) --- (fkey3) --> fkeys2 (pkey23) --- -create trigger check_fkeys_pkey_exist - before insert or update on fkeys - for each row - execute function - check_primary_key ('fkey1', 'fkey2', 'pkeys', 'pkey1', 'pkey2'); -create trigger check_fkeys_pkey2_exist - before insert or update on fkeys - for each row - execute function check_primary_key ('fkey3', 'fkeys2', 'pkey23'); --- --- For fkeys2: --- (fkey21, fkey22) --> pkeys (pkey1, pkey2) --- -create trigger check_fkeys2_pkey_exist - before insert or update on fkeys2 - for each row - execute procedure - check_primary_key ('fkey21', 'fkey22', 'pkeys', 'pkey1', 'pkey2'); --- Test comments -COMMENT ON TRIGGER check_fkeys2_pkey_bad ON fkeys2 IS 'wrong'; -ERROR: trigger "check_fkeys2_pkey_bad" for table "fkeys2" does not exist -COMMENT ON TRIGGER check_fkeys2_pkey_exist ON fkeys2 IS 'right'; -COMMENT ON TRIGGER check_fkeys2_pkey_exist ON fkeys2 IS NULL; --- --- For pkeys: --- ON DELETE/UPDATE (pkey1, pkey2) CASCADE: --- fkeys (fkey1, fkey2) and fkeys2 (fkey21, fkey22) --- -create trigger check_pkeys_fkey_cascade - before delete or update on pkeys - for each row - execute procedure - check_foreign_key (2, 'cascade', 'pkey1', 'pkey2', - 'fkeys', 'fkey1', 'fkey2', 'fkeys2', 'fkey21', 'fkey22'); --- --- For fkeys2: --- ON DELETE/UPDATE (pkey23) RESTRICT: --- fkeys (fkey3) --- -create trigger check_fkeys2_fkey_restrict - before delete or update on fkeys2 - for each row - execute procedure check_foreign_key (1, 'restrict', 'pkey23', 'fkeys', 'fkey3'); -insert into fkeys2 values (10, '1', 1); -insert into fkeys2 values (30, '3', 2); -insert into fkeys2 values (40, '4', 5); -insert into fkeys2 values (50, '5', 3); --- no key in pkeys -insert into fkeys2 values (70, '5', 3); -ERROR: tuple references non-existent key -DETAIL: Trigger "check_fkeys2_pkey_exist" found tuple referencing non-existent key in "pkeys". -insert into fkeys values (10, '1', 2); -insert into fkeys values (30, '3', 3); -insert into fkeys values (40, '4', 2); -insert into fkeys values (50, '5', 2); --- no key in pkeys -insert into fkeys values (70, '5', 1); -ERROR: tuple references non-existent key -DETAIL: Trigger "check_fkeys_pkey_exist" found tuple referencing non-existent key in "pkeys". --- no key in fkeys2 -insert into fkeys values (60, '6', 4); -ERROR: tuple references non-existent key -DETAIL: Trigger "check_fkeys_pkey2_exist" found tuple referencing non-existent key in "fkeys2". -delete from pkeys where pkey1 = 30 and pkey2 = '3'; -NOTICE: check_pkeys_fkey_cascade: 1 tuple(s) of fkeys are deleted -ERROR: "check_fkeys2_fkey_restrict": tuple is referenced in "fkeys" -CONTEXT: SQL statement "delete from fkeys2 where fkey21 = $1 and fkey22 = $2 " -delete from pkeys where pkey1 = 40 and pkey2 = '4'; -NOTICE: check_pkeys_fkey_cascade: 1 tuple(s) of fkeys are deleted -NOTICE: check_pkeys_fkey_cascade: 1 tuple(s) of fkeys2 are deleted -update pkeys set pkey1 = 7, pkey2 = '70' where pkey1 = 50 and pkey2 = '5'; -NOTICE: check_pkeys_fkey_cascade: 1 tuple(s) of fkeys are deleted -ERROR: "check_fkeys2_fkey_restrict": tuple is referenced in "fkeys" -CONTEXT: SQL statement "delete from fkeys2 where fkey21 = $1 and fkey22 = $2 " -update pkeys set pkey1 = 7, pkey2 = '70' where pkey1 = 10 and pkey2 = '1'; -NOTICE: check_pkeys_fkey_cascade: 1 tuple(s) of fkeys are deleted -NOTICE: check_pkeys_fkey_cascade: 1 tuple(s) of fkeys2 are deleted -SELECT trigger_name, event_manipulation, event_object_schema, event_object_table, - action_order, action_condition, action_orientation, action_timing, - action_reference_old_table, action_reference_new_table - FROM information_schema.triggers - WHERE event_object_table in ('pkeys', 'fkeys', 'fkeys2') - ORDER BY trigger_name COLLATE "C", 2; - trigger_name | event_manipulation | event_object_schema | event_object_table | action_order | action_condition | action_orientation | action_timing | action_reference_old_table | action_reference_new_table -----------------------------+--------------------+---------------------+--------------------+--------------+------------------+--------------------+---------------+----------------------------+---------------------------- - check_fkeys2_fkey_restrict | DELETE | public | fkeys2 | 1 | | ROW | BEFORE | | - check_fkeys2_fkey_restrict | UPDATE | public | fkeys2 | 1 | | ROW | BEFORE | | - check_fkeys2_pkey_exist | INSERT | public | fkeys2 | 1 | | ROW | BEFORE | | - check_fkeys2_pkey_exist | UPDATE | public | fkeys2 | 2 | | ROW | BEFORE | | - check_fkeys_pkey2_exist | INSERT | public | fkeys | 1 | | ROW | BEFORE | | - check_fkeys_pkey2_exist | UPDATE | public | fkeys | 1 | | ROW | BEFORE | | - check_fkeys_pkey_exist | INSERT | public | fkeys | 2 | | ROW | BEFORE | | - check_fkeys_pkey_exist | UPDATE | public | fkeys | 2 | | ROW | BEFORE | | - check_pkeys_fkey_cascade | DELETE | public | pkeys | 1 | | ROW | BEFORE | | - check_pkeys_fkey_cascade | UPDATE | public | pkeys | 1 | | ROW | BEFORE | | -(10 rows) - -DROP TABLE pkeys; -DROP TABLE fkeys; -DROP TABLE fkeys2; --- Check behavior when trigger returns unmodified trigtuple -create table trigtest (f1 int, f2 text); -create trigger trigger_return_old - before insert or delete or update on trigtest - for each row execute procedure trigger_return_old(); -insert into trigtest values(1, 'foo'); -select * from trigtest; - f1 | f2 -----+----- - 1 | foo -(1 row) - -update trigtest set f2 = f2 || 'bar'; -select * from trigtest; - f1 | f2 -----+----- - 1 | foo -(1 row) - -delete from trigtest; -select * from trigtest; - f1 | f2 -----+---- -(0 rows) - --- Also check what happens when such a trigger runs before or after others -create function f1_times_10() returns trigger as -$$ begin new.f1 := new.f1 * 10; return new; end $$ language plpgsql; -create trigger trigger_alpha - before insert or update on trigtest - for each row execute procedure f1_times_10(); -insert into trigtest values(1, 'foo'); -select * from trigtest; - f1 | f2 -----+----- - 10 | foo -(1 row) - -update trigtest set f2 = f2 || 'bar'; -select * from trigtest; - f1 | f2 -----+----- - 10 | foo -(1 row) - -delete from trigtest; -select * from trigtest; - f1 | f2 -----+---- -(0 rows) - -create trigger trigger_zed - before insert or update on trigtest - for each row execute procedure f1_times_10(); -insert into trigtest values(1, 'foo'); -select * from trigtest; - f1 | f2 ------+----- - 100 | foo -(1 row) - -update trigtest set f2 = f2 || 'bar'; -select * from trigtest; - f1 | f2 -------+----- - 1000 | foo -(1 row) - -delete from trigtest; -select * from trigtest; - f1 | f2 -----+---- -(0 rows) - -drop trigger trigger_alpha on trigtest; -insert into trigtest values(1, 'foo'); -select * from trigtest; - f1 | f2 -----+----- - 10 | foo -(1 row) - -update trigtest set f2 = f2 || 'bar'; -select * from trigtest; - f1 | f2 ------+----- - 100 | foo -(1 row) - -delete from trigtest; -select * from trigtest; - f1 | f2 -----+---- -(0 rows) - -drop table trigtest; --- Check behavior with an implicit column default, too (bug #16644) -create table trigtest ( - a integer, - b bool default true not null, - c text default 'xyzzy' not null); -create trigger trigger_return_old - before insert or delete or update on trigtest - for each row execute procedure trigger_return_old(); -insert into trigtest values(1); -select * from trigtest; - a | b | c ----+---+------- - 1 | t | xyzzy -(1 row) - -alter table trigtest add column d integer default 42 not null; -select * from trigtest; - a | b | c | d ----+---+-------+---- - 1 | t | xyzzy | 42 -(1 row) - -update trigtest set a = 2 where a = 1 returning *; - a | b | c | d ----+---+-------+---- - 1 | t | xyzzy | 42 -(1 row) - -select * from trigtest; - a | b | c | d ----+---+-------+---- - 1 | t | xyzzy | 42 -(1 row) - -alter table trigtest drop column b; -select * from trigtest; - a | c | d ----+-------+---- - 1 | xyzzy | 42 -(1 row) - -update trigtest set a = 2 where a = 1 returning *; - a | c | d ----+-------+---- - 1 | xyzzy | 42 -(1 row) - -select * from trigtest; - a | c | d ----+-------+---- - 1 | xyzzy | 42 -(1 row) - -drop table trigtest; -create sequence ttdummy_seq increment 10 start 0 minvalue 0; -create table tttest ( - price_id int4, - price_val int4, - price_on int4, - price_off int4 default 999999 -); -create trigger ttdummy - before delete or update on tttest - for each row - execute procedure - ttdummy (price_on, price_off); -create trigger ttserial - before insert or update on tttest - for each row - execute procedure - autoinc (price_on, ttdummy_seq); -insert into tttest values (1, 1, null); -insert into tttest values (2, 2, null); -insert into tttest values (3, 3, 0); -select * from tttest; - price_id | price_val | price_on | price_off -----------+-----------+----------+----------- - 1 | 1 | 10 | 999999 - 2 | 2 | 20 | 999999 - 3 | 3 | 30 | 999999 -(3 rows) - -delete from tttest where price_id = 2; -select * from tttest; - price_id | price_val | price_on | price_off -----------+-----------+----------+----------- - 1 | 1 | 10 | 999999 - 3 | 3 | 30 | 999999 - 2 | 2 | 20 | 40 -(3 rows) - --- what do we see ? --- get current prices -select * from tttest where price_off = 999999; - price_id | price_val | price_on | price_off -----------+-----------+----------+----------- - 1 | 1 | 10 | 999999 - 3 | 3 | 30 | 999999 -(2 rows) - --- change price for price_id == 3 -update tttest set price_val = 30 where price_id = 3; -select * from tttest; - price_id | price_val | price_on | price_off -----------+-----------+----------+----------- - 1 | 1 | 10 | 999999 - 2 | 2 | 20 | 40 - 3 | 30 | 50 | 999999 - 3 | 3 | 30 | 50 -(4 rows) - --- now we want to change pric_id in ALL tuples --- this gets us not what we need -update tttest set price_id = 5 where price_id = 3; -select * from tttest; - price_id | price_val | price_on | price_off -----------+-----------+----------+----------- - 1 | 1 | 10 | 999999 - 2 | 2 | 20 | 40 - 3 | 3 | 30 | 50 - 5 | 30 | 60 | 999999 - 3 | 30 | 50 | 60 -(5 rows) - --- restore data as before last update: -select set_ttdummy(0); - set_ttdummy -------------- - 1 -(1 row) - -delete from tttest where price_id = 5; -update tttest set price_off = 999999 where price_val = 30; -select * from tttest; - price_id | price_val | price_on | price_off -----------+-----------+----------+----------- - 1 | 1 | 10 | 999999 - 2 | 2 | 20 | 40 - 3 | 3 | 30 | 50 - 3 | 30 | 50 | 999999 -(4 rows) - --- and try change price_id now! -update tttest set price_id = 5 where price_id = 3; -select * from tttest; - price_id | price_val | price_on | price_off -----------+-----------+----------+----------- - 1 | 1 | 10 | 999999 - 2 | 2 | 20 | 40 - 5 | 3 | 30 | 50 - 5 | 30 | 50 | 999999 -(4 rows) - --- isn't it what we need ? -select set_ttdummy(1); - set_ttdummy -------------- - 0 -(1 row) - --- we want to correct some "date" -update tttest set price_on = -1 where price_id = 1; -ERROR: ttdummy (tttest): you cannot change price_on and/or price_off columns (use set_ttdummy) --- but this doesn't work --- try in this way -select set_ttdummy(0); - set_ttdummy -------------- - 1 -(1 row) - -update tttest set price_on = -1 where price_id = 1; -select * from tttest; - price_id | price_val | price_on | price_off -----------+-----------+----------+----------- - 2 | 2 | 20 | 40 - 5 | 3 | 30 | 50 - 5 | 30 | 50 | 999999 - 1 | 1 | -1 | 999999 -(4 rows) - --- isn't it what we need ? --- get price for price_id == 5 as it was @ "date" 35 -select * from tttest where price_on <= 35 and price_off > 35 and price_id = 5; - price_id | price_val | price_on | price_off -----------+-----------+----------+----------- - 5 | 3 | 30 | 50 -(1 row) - -drop table tttest; -drop sequence ttdummy_seq; --- --- tests for per-statement triggers --- -CREATE TABLE log_table (tstamp timestamp default timeofday()::timestamp); -CREATE TABLE main_table (a int unique, b int); -COPY main_table (a,b) FROM stdin; -CREATE FUNCTION trigger_func() RETURNS trigger LANGUAGE plpgsql AS ' -BEGIN - RAISE NOTICE ''trigger_func(%) called: action = %, when = %, level = %'', TG_ARGV[0], TG_OP, TG_WHEN, TG_LEVEL; - RETURN NULL; -END;'; -CREATE TRIGGER before_ins_stmt_trig BEFORE INSERT ON main_table -FOR EACH STATEMENT EXECUTE PROCEDURE trigger_func('before_ins_stmt'); -CREATE TRIGGER after_ins_stmt_trig AFTER INSERT ON main_table -FOR EACH STATEMENT EXECUTE PROCEDURE trigger_func('after_ins_stmt'); --- --- if neither 'FOR EACH ROW' nor 'FOR EACH STATEMENT' was specified, --- CREATE TRIGGER should default to 'FOR EACH STATEMENT' --- -CREATE TRIGGER after_upd_stmt_trig AFTER UPDATE ON main_table -EXECUTE PROCEDURE trigger_func('after_upd_stmt'); --- Both insert and update statement level triggers (before and after) should --- fire. Doesn't fire UPDATE before trigger, but only because one isn't --- defined. -INSERT INTO main_table (a, b) VALUES (5, 10) ON CONFLICT (a) - DO UPDATE SET b = EXCLUDED.b; -NOTICE: trigger_func(before_ins_stmt) called: action = INSERT, when = BEFORE, level = STATEMENT -NOTICE: trigger_func(after_upd_stmt) called: action = UPDATE, when = AFTER, level = STATEMENT -NOTICE: trigger_func(after_ins_stmt) called: action = INSERT, when = AFTER, level = STATEMENT -CREATE TRIGGER after_upd_row_trig AFTER UPDATE ON main_table -FOR EACH ROW EXECUTE PROCEDURE trigger_func('after_upd_row'); -INSERT INTO main_table DEFAULT VALUES; -NOTICE: trigger_func(before_ins_stmt) called: action = INSERT, when = BEFORE, level = STATEMENT -NOTICE: trigger_func(after_ins_stmt) called: action = INSERT, when = AFTER, level = STATEMENT -UPDATE main_table SET a = a + 1 WHERE b < 30; -NOTICE: trigger_func(after_upd_row) called: action = UPDATE, when = AFTER, level = ROW -NOTICE: trigger_func(after_upd_row) called: action = UPDATE, when = AFTER, level = ROW -NOTICE: trigger_func(after_upd_row) called: action = UPDATE, when = AFTER, level = ROW -NOTICE: trigger_func(after_upd_row) called: action = UPDATE, when = AFTER, level = ROW -NOTICE: trigger_func(after_upd_stmt) called: action = UPDATE, when = AFTER, level = STATEMENT --- UPDATE that effects zero rows should still call per-statement trigger -UPDATE main_table SET a = a + 2 WHERE b > 100; -NOTICE: trigger_func(after_upd_stmt) called: action = UPDATE, when = AFTER, level = STATEMENT --- constraint now unneeded -ALTER TABLE main_table DROP CONSTRAINT main_table_a_key; --- COPY should fire per-row and per-statement INSERT triggers -COPY main_table (a, b) FROM stdin; -NOTICE: trigger_func(before_ins_stmt) called: action = INSERT, when = BEFORE, level = STATEMENT -NOTICE: trigger_func(after_ins_stmt) called: action = INSERT, when = AFTER, level = STATEMENT -SELECT * FROM main_table ORDER BY a, b; - a | b -----+---- - 6 | 10 - 21 | 20 - 30 | 40 - 31 | 10 - 50 | 35 - 50 | 60 - 81 | 15 - | -(8 rows) - --- --- test triggers with WHEN clause --- -CREATE TRIGGER modified_a BEFORE UPDATE OF a ON main_table -FOR EACH ROW WHEN (OLD.a <> NEW.a) EXECUTE PROCEDURE trigger_func('modified_a'); -CREATE TRIGGER modified_any BEFORE UPDATE OF a ON main_table -FOR EACH ROW WHEN (OLD.* IS DISTINCT FROM NEW.*) EXECUTE PROCEDURE trigger_func('modified_any'); -CREATE TRIGGER insert_a AFTER INSERT ON main_table -FOR EACH ROW WHEN (NEW.a = 123) EXECUTE PROCEDURE trigger_func('insert_a'); -CREATE TRIGGER delete_a AFTER DELETE ON main_table -FOR EACH ROW WHEN (OLD.a = 123) EXECUTE PROCEDURE trigger_func('delete_a'); -CREATE TRIGGER insert_when BEFORE INSERT ON main_table -FOR EACH STATEMENT WHEN (true) EXECUTE PROCEDURE trigger_func('insert_when'); -CREATE TRIGGER delete_when AFTER DELETE ON main_table -FOR EACH STATEMENT WHEN (true) EXECUTE PROCEDURE trigger_func('delete_when'); -SELECT trigger_name, event_manipulation, event_object_schema, event_object_table, - action_order, action_condition, action_orientation, action_timing, - action_reference_old_table, action_reference_new_table - FROM information_schema.triggers - WHERE event_object_table IN ('main_table') - ORDER BY trigger_name COLLATE "C", 2; - trigger_name | event_manipulation | event_object_schema | event_object_table | action_order | action_condition | action_orientation | action_timing | action_reference_old_table | action_reference_new_table -----------------------+--------------------+---------------------+--------------------+--------------+--------------------------------+--------------------+---------------+----------------------------+---------------------------- - after_ins_stmt_trig | INSERT | public | main_table | 1 | | STATEMENT | AFTER | | - after_upd_row_trig | UPDATE | public | main_table | 1 | | ROW | AFTER | | - after_upd_stmt_trig | UPDATE | public | main_table | 1 | | STATEMENT | AFTER | | - before_ins_stmt_trig | INSERT | public | main_table | 1 | | STATEMENT | BEFORE | | - delete_a | DELETE | public | main_table | 1 | (old.a = 123) | ROW | AFTER | | - delete_when | DELETE | public | main_table | 1 | true | STATEMENT | AFTER | | - insert_a | INSERT | public | main_table | 1 | (new.a = 123) | ROW | AFTER | | - insert_when | INSERT | public | main_table | 2 | true | STATEMENT | BEFORE | | - modified_a | UPDATE | public | main_table | 1 | (old.a <> new.a) | ROW | BEFORE | | - modified_any | UPDATE | public | main_table | 2 | (old.* IS DISTINCT FROM new.*) | ROW | BEFORE | | -(10 rows) - -INSERT INTO main_table (a) VALUES (123), (456); -NOTICE: trigger_func(before_ins_stmt) called: action = INSERT, when = BEFORE, level = STATEMENT -NOTICE: trigger_func(insert_when) called: action = INSERT, when = BEFORE, level = STATEMENT -NOTICE: trigger_func(insert_a) called: action = INSERT, when = AFTER, level = ROW -NOTICE: trigger_func(after_ins_stmt) called: action = INSERT, when = AFTER, level = STATEMENT -COPY main_table FROM stdin; -NOTICE: trigger_func(before_ins_stmt) called: action = INSERT, when = BEFORE, level = STATEMENT -NOTICE: trigger_func(insert_when) called: action = INSERT, when = BEFORE, level = STATEMENT -NOTICE: trigger_func(insert_a) called: action = INSERT, when = AFTER, level = ROW -NOTICE: trigger_func(after_ins_stmt) called: action = INSERT, when = AFTER, level = STATEMENT -DELETE FROM main_table WHERE a IN (123, 456); -NOTICE: trigger_func(delete_a) called: action = DELETE, when = AFTER, level = ROW -NOTICE: trigger_func(delete_a) called: action = DELETE, when = AFTER, level = ROW -NOTICE: trigger_func(delete_when) called: action = DELETE, when = AFTER, level = STATEMENT -UPDATE main_table SET a = 50, b = 60; -NOTICE: trigger_func(modified_any) called: action = UPDATE, when = BEFORE, level = ROW -NOTICE: trigger_func(modified_any) called: action = UPDATE, when = BEFORE, level = ROW -NOTICE: trigger_func(modified_a) called: action = UPDATE, when = BEFORE, level = ROW -NOTICE: trigger_func(modified_a) called: action = UPDATE, when = BEFORE, level = ROW -NOTICE: trigger_func(modified_a) called: action = UPDATE, when = BEFORE, level = ROW -NOTICE: trigger_func(modified_a) called: action = UPDATE, when = BEFORE, level = ROW -NOTICE: trigger_func(modified_a) called: action = UPDATE, when = BEFORE, level = ROW -NOTICE: trigger_func(after_upd_row) called: action = UPDATE, when = AFTER, level = ROW -NOTICE: trigger_func(after_upd_stmt) called: action = UPDATE, when = AFTER, level = STATEMENT -SELECT * FROM main_table ORDER BY a, b; - a | b -----+---- - 6 | 10 - 21 | 20 - 30 | 40 - 31 | 10 - 50 | 35 - 50 | 60 - 81 | 15 - | -(8 rows) - -SELECT pg_get_triggerdef(oid, true) FROM pg_trigger WHERE tgrelid = 'main_table'::regclass AND tgname = 'modified_a'; - pg_get_triggerdef -------------------------------------------------------------------------------------------------------------------------------------------- - CREATE TRIGGER modified_a BEFORE UPDATE OF a ON main_table FOR EACH ROW WHEN (old.a <> new.a) EXECUTE FUNCTION trigger_func('modified_a') -(1 row) - -SELECT pg_get_triggerdef(oid, false) FROM pg_trigger WHERE tgrelid = 'main_table'::regclass AND tgname = 'modified_a'; - pg_get_triggerdef ----------------------------------------------------------------------------------------------------------------------------------------------------- - CREATE TRIGGER modified_a BEFORE UPDATE OF a ON public.main_table FOR EACH ROW WHEN ((old.a <> new.a)) EXECUTE FUNCTION trigger_func('modified_a') -(1 row) - -SELECT pg_get_triggerdef(oid, true) FROM pg_trigger WHERE tgrelid = 'main_table'::regclass AND tgname = 'modified_any'; - pg_get_triggerdef -------------------------------------------------------------------------------------------------------------------------------------------------------------- - CREATE TRIGGER modified_any BEFORE UPDATE OF a ON main_table FOR EACH ROW WHEN (old.* IS DISTINCT FROM new.*) EXECUTE FUNCTION trigger_func('modified_any') -(1 row) - --- Test RENAME TRIGGER -ALTER TRIGGER modified_a ON main_table RENAME TO modified_modified_a; -SELECT count(*) FROM pg_trigger WHERE tgrelid = 'main_table'::regclass AND tgname = 'modified_a'; - count -------- - 0 -(1 row) - -SELECT count(*) FROM pg_trigger WHERE tgrelid = 'main_table'::regclass AND tgname = 'modified_modified_a'; - count -------- - 1 -(1 row) - -DROP TRIGGER modified_modified_a ON main_table; -DROP TRIGGER modified_any ON main_table; -DROP TRIGGER insert_a ON main_table; -DROP TRIGGER delete_a ON main_table; -DROP TRIGGER insert_when ON main_table; -DROP TRIGGER delete_when ON main_table; --- Test WHEN condition accessing system columns. -create table table_with_oids(a int); -insert into table_with_oids values (1); -create trigger oid_unchanged_trig after update on table_with_oids - for each row - when (new.tableoid = old.tableoid AND new.tableoid <> 0) - execute procedure trigger_func('after_upd_oid_unchanged'); -update table_with_oids set a = a + 1; -NOTICE: trigger_func(after_upd_oid_unchanged) called: action = UPDATE, when = AFTER, level = ROW -drop table table_with_oids; --- Test column-level triggers -DROP TRIGGER after_upd_row_trig ON main_table; -CREATE TRIGGER before_upd_a_row_trig BEFORE UPDATE OF a ON main_table -FOR EACH ROW EXECUTE PROCEDURE trigger_func('before_upd_a_row'); -CREATE TRIGGER after_upd_b_row_trig AFTER UPDATE OF b ON main_table -FOR EACH ROW EXECUTE PROCEDURE trigger_func('after_upd_b_row'); -CREATE TRIGGER after_upd_a_b_row_trig AFTER UPDATE OF a, b ON main_table -FOR EACH ROW EXECUTE PROCEDURE trigger_func('after_upd_a_b_row'); -CREATE TRIGGER before_upd_a_stmt_trig BEFORE UPDATE OF a ON main_table -FOR EACH STATEMENT EXECUTE PROCEDURE trigger_func('before_upd_a_stmt'); -CREATE TRIGGER after_upd_b_stmt_trig AFTER UPDATE OF b ON main_table -FOR EACH STATEMENT EXECUTE PROCEDURE trigger_func('after_upd_b_stmt'); -SELECT pg_get_triggerdef(oid) FROM pg_trigger WHERE tgrelid = 'main_table'::regclass AND tgname = 'after_upd_a_b_row_trig'; - pg_get_triggerdef -------------------------------------------------------------------------------------------------------------------------------------------------- - CREATE TRIGGER after_upd_a_b_row_trig AFTER UPDATE OF a, b ON public.main_table FOR EACH ROW EXECUTE FUNCTION trigger_func('after_upd_a_b_row') -(1 row) - -UPDATE main_table SET a = 50; -NOTICE: trigger_func(before_upd_a_stmt) called: action = UPDATE, when = BEFORE, level = STATEMENT -NOTICE: trigger_func(before_upd_a_row) called: action = UPDATE, when = BEFORE, level = ROW -NOTICE: trigger_func(before_upd_a_row) called: action = UPDATE, when = BEFORE, level = ROW -NOTICE: trigger_func(before_upd_a_row) called: action = UPDATE, when = BEFORE, level = ROW -NOTICE: trigger_func(before_upd_a_row) called: action = UPDATE, when = BEFORE, level = ROW -NOTICE: trigger_func(before_upd_a_row) called: action = UPDATE, when = BEFORE, level = ROW -NOTICE: trigger_func(before_upd_a_row) called: action = UPDATE, when = BEFORE, level = ROW -NOTICE: trigger_func(before_upd_a_row) called: action = UPDATE, when = BEFORE, level = ROW -NOTICE: trigger_func(before_upd_a_row) called: action = UPDATE, when = BEFORE, level = ROW -NOTICE: trigger_func(after_upd_stmt) called: action = UPDATE, when = AFTER, level = STATEMENT -UPDATE main_table SET b = 10; -NOTICE: trigger_func(after_upd_a_b_row) called: action = UPDATE, when = AFTER, level = ROW -NOTICE: trigger_func(after_upd_b_row) called: action = UPDATE, when = AFTER, level = ROW -NOTICE: trigger_func(after_upd_a_b_row) called: action = UPDATE, when = AFTER, level = ROW -NOTICE: trigger_func(after_upd_b_row) called: action = UPDATE, when = AFTER, level = ROW -NOTICE: trigger_func(after_upd_a_b_row) called: action = UPDATE, when = AFTER, level = ROW -NOTICE: trigger_func(after_upd_b_row) called: action = UPDATE, when = AFTER, level = ROW -NOTICE: trigger_func(after_upd_a_b_row) called: action = UPDATE, when = AFTER, level = ROW -NOTICE: trigger_func(after_upd_b_row) called: action = UPDATE, when = AFTER, level = ROW -NOTICE: trigger_func(after_upd_a_b_row) called: action = UPDATE, when = AFTER, level = ROW -NOTICE: trigger_func(after_upd_b_row) called: action = UPDATE, when = AFTER, level = ROW -NOTICE: trigger_func(after_upd_a_b_row) called: action = UPDATE, when = AFTER, level = ROW -NOTICE: trigger_func(after_upd_b_row) called: action = UPDATE, when = AFTER, level = ROW -NOTICE: trigger_func(after_upd_a_b_row) called: action = UPDATE, when = AFTER, level = ROW -NOTICE: trigger_func(after_upd_b_row) called: action = UPDATE, when = AFTER, level = ROW -NOTICE: trigger_func(after_upd_a_b_row) called: action = UPDATE, when = AFTER, level = ROW -NOTICE: trigger_func(after_upd_b_row) called: action = UPDATE, when = AFTER, level = ROW -NOTICE: trigger_func(after_upd_b_stmt) called: action = UPDATE, when = AFTER, level = STATEMENT -NOTICE: trigger_func(after_upd_stmt) called: action = UPDATE, when = AFTER, level = STATEMENT --- --- Test case for bug with BEFORE trigger followed by AFTER trigger with WHEN --- -CREATE TABLE some_t (some_col boolean NOT NULL); -CREATE FUNCTION dummy_update_func() RETURNS trigger AS $$ -BEGIN - RAISE NOTICE 'dummy_update_func(%) called: action = %, old = %, new = %', - TG_ARGV[0], TG_OP, OLD, NEW; - RETURN NEW; -END; -$$ LANGUAGE plpgsql; -CREATE TRIGGER some_trig_before BEFORE UPDATE ON some_t FOR EACH ROW - EXECUTE PROCEDURE dummy_update_func('before'); -CREATE TRIGGER some_trig_aftera AFTER UPDATE ON some_t FOR EACH ROW - WHEN (NOT OLD.some_col AND NEW.some_col) - EXECUTE PROCEDURE dummy_update_func('aftera'); -CREATE TRIGGER some_trig_afterb AFTER UPDATE ON some_t FOR EACH ROW - WHEN (NOT NEW.some_col) - EXECUTE PROCEDURE dummy_update_func('afterb'); -INSERT INTO some_t VALUES (TRUE); -UPDATE some_t SET some_col = TRUE; -NOTICE: dummy_update_func(before) called: action = UPDATE, old = (t), new = (t) -UPDATE some_t SET some_col = FALSE; -NOTICE: dummy_update_func(before) called: action = UPDATE, old = (t), new = (f) -NOTICE: dummy_update_func(afterb) called: action = UPDATE, old = (t), new = (f) -UPDATE some_t SET some_col = TRUE; -NOTICE: dummy_update_func(before) called: action = UPDATE, old = (f), new = (t) -NOTICE: dummy_update_func(aftera) called: action = UPDATE, old = (f), new = (t) -DROP TABLE some_t; --- bogus cases -CREATE TRIGGER error_upd_and_col BEFORE UPDATE OR UPDATE OF a ON main_table -FOR EACH ROW EXECUTE PROCEDURE trigger_func('error_upd_and_col'); -ERROR: duplicate trigger events specified at or near "ON" -LINE 1: ...ER error_upd_and_col BEFORE UPDATE OR UPDATE OF a ON main_ta... - ^ -CREATE TRIGGER error_upd_a_a BEFORE UPDATE OF a, a ON main_table -FOR EACH ROW EXECUTE PROCEDURE trigger_func('error_upd_a_a'); -ERROR: column "a" specified more than once -CREATE TRIGGER error_ins_a BEFORE INSERT OF a ON main_table -FOR EACH ROW EXECUTE PROCEDURE trigger_func('error_ins_a'); -ERROR: syntax error at or near "OF" -LINE 1: CREATE TRIGGER error_ins_a BEFORE INSERT OF a ON main_table - ^ -CREATE TRIGGER error_ins_when BEFORE INSERT OR UPDATE ON main_table -FOR EACH ROW WHEN (OLD.a <> NEW.a) -EXECUTE PROCEDURE trigger_func('error_ins_old'); -ERROR: INSERT trigger's WHEN condition cannot reference OLD values -LINE 2: FOR EACH ROW WHEN (OLD.a <> NEW.a) - ^ -CREATE TRIGGER error_del_when BEFORE DELETE OR UPDATE ON main_table -FOR EACH ROW WHEN (OLD.a <> NEW.a) -EXECUTE PROCEDURE trigger_func('error_del_new'); -ERROR: DELETE trigger's WHEN condition cannot reference NEW values -LINE 2: FOR EACH ROW WHEN (OLD.a <> NEW.a) - ^ -CREATE TRIGGER error_del_when BEFORE INSERT OR UPDATE ON main_table -FOR EACH ROW WHEN (NEW.tableoid <> 0) -EXECUTE PROCEDURE trigger_func('error_when_sys_column'); -ERROR: BEFORE trigger's WHEN condition cannot reference NEW system columns -LINE 2: FOR EACH ROW WHEN (NEW.tableoid <> 0) - ^ -CREATE TRIGGER error_stmt_when BEFORE UPDATE OF a ON main_table -FOR EACH STATEMENT WHEN (OLD.* IS DISTINCT FROM NEW.*) -EXECUTE PROCEDURE trigger_func('error_stmt_when'); -ERROR: statement trigger's WHEN condition cannot reference column values -LINE 2: FOR EACH STATEMENT WHEN (OLD.* IS DISTINCT FROM NEW.*) - ^ --- check dependency restrictions -ALTER TABLE main_table DROP COLUMN b; -ERROR: cannot drop column b of table main_table because other objects depend on it -DETAIL: trigger after_upd_b_row_trig on table main_table depends on column b of table main_table -trigger after_upd_a_b_row_trig on table main_table depends on column b of table main_table -trigger after_upd_b_stmt_trig on table main_table depends on column b of table main_table -HINT: Use DROP ... CASCADE to drop the dependent objects too. --- this should succeed, but we'll roll it back to keep the triggers around -begin; -DROP TRIGGER after_upd_a_b_row_trig ON main_table; -DROP TRIGGER after_upd_b_row_trig ON main_table; -DROP TRIGGER after_upd_b_stmt_trig ON main_table; -ALTER TABLE main_table DROP COLUMN b; -rollback; --- Test enable/disable triggers -create table trigtest (i serial primary key); --- test that disabling RI triggers works -create table trigtest2 (i int references trigtest(i) on delete cascade); -create function trigtest() returns trigger as $$ -begin - raise notice '% % % %', TG_TABLE_NAME, TG_OP, TG_WHEN, TG_LEVEL; - return new; -end;$$ language plpgsql; -create trigger trigtest_b_row_tg before insert or update or delete on trigtest -for each row execute procedure trigtest(); -create trigger trigtest_a_row_tg after insert or update or delete on trigtest -for each row execute procedure trigtest(); -create trigger trigtest_b_stmt_tg before insert or update or delete on trigtest -for each statement execute procedure trigtest(); -create trigger trigtest_a_stmt_tg after insert or update or delete on trigtest -for each statement execute procedure trigtest(); -insert into trigtest default values; -NOTICE: trigtest INSERT BEFORE STATEMENT -NOTICE: trigtest INSERT BEFORE ROW -NOTICE: trigtest INSERT AFTER ROW -NOTICE: trigtest INSERT AFTER STATEMENT -alter table trigtest disable trigger trigtest_b_row_tg; -insert into trigtest default values; -NOTICE: trigtest INSERT BEFORE STATEMENT -NOTICE: trigtest INSERT AFTER ROW -NOTICE: trigtest INSERT AFTER STATEMENT -alter table trigtest disable trigger user; -insert into trigtest default values; -alter table trigtest enable trigger trigtest_a_stmt_tg; -insert into trigtest default values; -NOTICE: trigtest INSERT AFTER STATEMENT -set session_replication_role = replica; -insert into trigtest default values; -- does not trigger -alter table trigtest enable always trigger trigtest_a_stmt_tg; -insert into trigtest default values; -- now it does -NOTICE: trigtest INSERT AFTER STATEMENT -reset session_replication_role; -insert into trigtest2 values(1); -insert into trigtest2 values(2); -delete from trigtest where i=2; -NOTICE: trigtest DELETE AFTER STATEMENT -select * from trigtest2; - i ---- - 1 -(1 row) - -alter table trigtest disable trigger all; -delete from trigtest where i=1; -select * from trigtest2; - i ---- - 1 -(1 row) - --- ensure we still insert, even when all triggers are disabled -insert into trigtest default values; -select * from trigtest; - i ---- - 3 - 4 - 5 - 6 - 7 -(5 rows) - -drop table trigtest2; -drop table trigtest; --- dump trigger data -CREATE TABLE trigger_test ( - i int, - v varchar -); -CREATE OR REPLACE FUNCTION trigger_data() RETURNS trigger -LANGUAGE plpgsql AS $$ - -declare - - argstr text; - relid text; - -begin - - relid := TG_relid::regclass; - - -- plpgsql can't discover its trigger data in a hash like perl and python - -- can, or by a sort of reflection like tcl can, - -- so we have to hard code the names. - raise NOTICE 'TG_NAME: %', TG_name; - raise NOTICE 'TG_WHEN: %', TG_when; - raise NOTICE 'TG_LEVEL: %', TG_level; - raise NOTICE 'TG_OP: %', TG_op; - raise NOTICE 'TG_RELID::regclass: %', relid; - raise NOTICE 'TG_RELNAME: %', TG_relname; - raise NOTICE 'TG_TABLE_NAME: %', TG_table_name; - raise NOTICE 'TG_TABLE_SCHEMA: %', TG_table_schema; - raise NOTICE 'TG_NARGS: %', TG_nargs; - - argstr := '['; - for i in 0 .. TG_nargs - 1 loop - if i > 0 then - argstr := argstr || ', '; - end if; - argstr := argstr || TG_argv[i]; - end loop; - argstr := argstr || ']'; - raise NOTICE 'TG_ARGV: %', argstr; - - if TG_OP != 'INSERT' then - raise NOTICE 'OLD: %', OLD; - end if; - - if TG_OP != 'DELETE' then - raise NOTICE 'NEW: %', NEW; - end if; - - if TG_OP = 'DELETE' then - return OLD; - else - return NEW; - end if; - -end; -$$; -CREATE TRIGGER show_trigger_data_trig -BEFORE INSERT OR UPDATE OR DELETE ON trigger_test -FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); -insert into trigger_test values(1,'insert'); -NOTICE: TG_NAME: show_trigger_data_trig -NOTICE: TG_WHEN: BEFORE -NOTICE: TG_LEVEL: ROW -NOTICE: TG_OP: INSERT -NOTICE: TG_RELID::regclass: trigger_test -NOTICE: TG_RELNAME: trigger_test -NOTICE: TG_TABLE_NAME: trigger_test -NOTICE: TG_TABLE_SCHEMA: public -NOTICE: TG_NARGS: 2 -NOTICE: TG_ARGV: [23, skidoo] -NOTICE: NEW: (1,insert) -update trigger_test set v = 'update' where i = 1; -NOTICE: TG_NAME: show_trigger_data_trig -NOTICE: TG_WHEN: BEFORE -NOTICE: TG_LEVEL: ROW -NOTICE: TG_OP: UPDATE -NOTICE: TG_RELID::regclass: trigger_test -NOTICE: TG_RELNAME: trigger_test -NOTICE: TG_TABLE_NAME: trigger_test -NOTICE: TG_TABLE_SCHEMA: public -NOTICE: TG_NARGS: 2 -NOTICE: TG_ARGV: [23, skidoo] -NOTICE: OLD: (1,insert) -NOTICE: NEW: (1,update) -delete from trigger_test; -NOTICE: TG_NAME: show_trigger_data_trig -NOTICE: TG_WHEN: BEFORE -NOTICE: TG_LEVEL: ROW -NOTICE: TG_OP: DELETE -NOTICE: TG_RELID::regclass: trigger_test -NOTICE: TG_RELNAME: trigger_test -NOTICE: TG_TABLE_NAME: trigger_test -NOTICE: TG_TABLE_SCHEMA: public -NOTICE: TG_NARGS: 2 -NOTICE: TG_ARGV: [23, skidoo] -NOTICE: OLD: (1,update) -DROP TRIGGER show_trigger_data_trig on trigger_test; -DROP FUNCTION trigger_data(); -DROP TABLE trigger_test; --- --- Test use of row comparisons on OLD/NEW --- -CREATE TABLE trigger_test (f1 int, f2 text, f3 text); --- this is the obvious (and wrong...) way to compare rows -CREATE FUNCTION mytrigger() RETURNS trigger LANGUAGE plpgsql as $$ -begin - if row(old.*) = row(new.*) then - raise notice 'row % not changed', new.f1; - else - raise notice 'row % changed', new.f1; - end if; - return new; -end$$; -CREATE TRIGGER t -BEFORE UPDATE ON trigger_test -FOR EACH ROW EXECUTE PROCEDURE mytrigger(); -INSERT INTO trigger_test VALUES(1, 'foo', 'bar'); -INSERT INTO trigger_test VALUES(2, 'baz', 'quux'); -UPDATE trigger_test SET f3 = 'bar'; -NOTICE: row 1 not changed -NOTICE: row 2 changed -UPDATE trigger_test SET f3 = NULL; -NOTICE: row 1 changed -NOTICE: row 2 changed --- this demonstrates that the above isn't really working as desired: -UPDATE trigger_test SET f3 = NULL; -NOTICE: row 1 changed -NOTICE: row 2 changed --- the right way when considering nulls is -CREATE OR REPLACE FUNCTION mytrigger() RETURNS trigger LANGUAGE plpgsql as $$ -begin - if row(old.*) is distinct from row(new.*) then - raise notice 'row % changed', new.f1; - else - raise notice 'row % not changed', new.f1; - end if; - return new; -end$$; -UPDATE trigger_test SET f3 = 'bar'; -NOTICE: row 1 changed -NOTICE: row 2 changed -UPDATE trigger_test SET f3 = NULL; -NOTICE: row 1 changed -NOTICE: row 2 changed -UPDATE trigger_test SET f3 = NULL; -NOTICE: row 1 not changed -NOTICE: row 2 not changed -DROP TABLE trigger_test; -DROP FUNCTION mytrigger(); --- Test snapshot management in serializable transactions involving triggers --- per bug report in 6bc73d4c0910042358k3d1adff3qa36f8df75198ecea@mail.gmail.com -CREATE FUNCTION serializable_update_trig() RETURNS trigger LANGUAGE plpgsql AS -$$ -declare - rec record; -begin - new.description = 'updated in trigger'; - return new; -end; -$$; -CREATE TABLE serializable_update_tab ( - id int, - filler text, - description text -); -CREATE TRIGGER serializable_update_trig BEFORE UPDATE ON serializable_update_tab - FOR EACH ROW EXECUTE PROCEDURE serializable_update_trig(); -INSERT INTO serializable_update_tab SELECT a, repeat('xyzxz', 100), 'new' - FROM generate_series(1, 50) a; -BEGIN; -SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; -UPDATE serializable_update_tab SET description = 'no no', id = 1 WHERE id = 1; -COMMIT; -SELECT description FROM serializable_update_tab WHERE id = 1; - description --------------------- - updated in trigger -(1 row) - -DROP TABLE serializable_update_tab; --- minimal update trigger -CREATE TABLE min_updates_test ( - f1 text, - f2 int, - f3 int); -INSERT INTO min_updates_test VALUES ('a',1,2),('b','2',null); -CREATE TRIGGER z_min_update -BEFORE UPDATE ON min_updates_test -FOR EACH ROW EXECUTE PROCEDURE suppress_redundant_updates_trigger(); -\set QUIET false -UPDATE min_updates_test SET f1 = f1; -UPDATE 0 -UPDATE min_updates_test SET f2 = f2 + 1; -UPDATE 2 -UPDATE min_updates_test SET f3 = 2 WHERE f3 is null; -UPDATE 1 -\set QUIET true -SELECT * FROM min_updates_test; - f1 | f2 | f3 -----+----+---- - a | 2 | 2 - b | 3 | 2 -(2 rows) - -DROP TABLE min_updates_test; --- --- Test triggers on views --- -CREATE VIEW main_view AS SELECT a, b FROM main_table; --- VIEW trigger function -CREATE OR REPLACE FUNCTION view_trigger() RETURNS trigger -LANGUAGE plpgsql AS $$ -declare - argstr text := ''; -begin - for i in 0 .. TG_nargs - 1 loop - if i > 0 then - argstr := argstr || ', '; - end if; - argstr := argstr || TG_argv[i]; - end loop; - - raise notice '% % % % (%)', TG_TABLE_NAME, TG_WHEN, TG_OP, TG_LEVEL, argstr; - - if TG_LEVEL = 'ROW' then - if TG_OP = 'INSERT' then - raise NOTICE 'NEW: %', NEW; - INSERT INTO main_table VALUES (NEW.a, NEW.b); - RETURN NEW; - end if; - - if TG_OP = 'UPDATE' then - raise NOTICE 'OLD: %, NEW: %', OLD, NEW; - UPDATE main_table SET a = NEW.a, b = NEW.b WHERE a = OLD.a AND b = OLD.b; - if NOT FOUND then RETURN NULL; end if; - RETURN NEW; - end if; - - if TG_OP = 'DELETE' then - raise NOTICE 'OLD: %', OLD; - DELETE FROM main_table WHERE a = OLD.a AND b = OLD.b; - if NOT FOUND then RETURN NULL; end if; - RETURN OLD; - end if; - end if; - - RETURN NULL; -end; -$$; --- Before row triggers aren't allowed on views -CREATE TRIGGER invalid_trig BEFORE INSERT ON main_view -FOR EACH ROW EXECUTE PROCEDURE trigger_func('before_ins_row'); -ERROR: "main_view" is a view -DETAIL: Views cannot have row-level BEFORE or AFTER triggers. -CREATE TRIGGER invalid_trig BEFORE UPDATE ON main_view -FOR EACH ROW EXECUTE PROCEDURE trigger_func('before_upd_row'); -ERROR: "main_view" is a view -DETAIL: Views cannot have row-level BEFORE or AFTER triggers. -CREATE TRIGGER invalid_trig BEFORE DELETE ON main_view -FOR EACH ROW EXECUTE PROCEDURE trigger_func('before_del_row'); -ERROR: "main_view" is a view -DETAIL: Views cannot have row-level BEFORE or AFTER triggers. --- After row triggers aren't allowed on views -CREATE TRIGGER invalid_trig AFTER INSERT ON main_view -FOR EACH ROW EXECUTE PROCEDURE trigger_func('before_ins_row'); -ERROR: "main_view" is a view -DETAIL: Views cannot have row-level BEFORE or AFTER triggers. -CREATE TRIGGER invalid_trig AFTER UPDATE ON main_view -FOR EACH ROW EXECUTE PROCEDURE trigger_func('before_upd_row'); -ERROR: "main_view" is a view -DETAIL: Views cannot have row-level BEFORE or AFTER triggers. -CREATE TRIGGER invalid_trig AFTER DELETE ON main_view -FOR EACH ROW EXECUTE PROCEDURE trigger_func('before_del_row'); -ERROR: "main_view" is a view -DETAIL: Views cannot have row-level BEFORE or AFTER triggers. --- Truncate triggers aren't allowed on views -CREATE TRIGGER invalid_trig BEFORE TRUNCATE ON main_view -EXECUTE PROCEDURE trigger_func('before_tru_row'); -ERROR: "main_view" is a view -DETAIL: Views cannot have TRUNCATE triggers. -CREATE TRIGGER invalid_trig AFTER TRUNCATE ON main_view -EXECUTE PROCEDURE trigger_func('before_tru_row'); -ERROR: "main_view" is a view -DETAIL: Views cannot have TRUNCATE triggers. --- INSTEAD OF triggers aren't allowed on tables -CREATE TRIGGER invalid_trig INSTEAD OF INSERT ON main_table -FOR EACH ROW EXECUTE PROCEDURE view_trigger('instead_of_ins'); -ERROR: "main_table" is a table -DETAIL: Tables cannot have INSTEAD OF triggers. -CREATE TRIGGER invalid_trig INSTEAD OF UPDATE ON main_table -FOR EACH ROW EXECUTE PROCEDURE view_trigger('instead_of_upd'); -ERROR: "main_table" is a table -DETAIL: Tables cannot have INSTEAD OF triggers. -CREATE TRIGGER invalid_trig INSTEAD OF DELETE ON main_table -FOR EACH ROW EXECUTE PROCEDURE view_trigger('instead_of_del'); -ERROR: "main_table" is a table -DETAIL: Tables cannot have INSTEAD OF triggers. --- Don't support WHEN clauses with INSTEAD OF triggers -CREATE TRIGGER invalid_trig INSTEAD OF UPDATE ON main_view -FOR EACH ROW WHEN (OLD.a <> NEW.a) EXECUTE PROCEDURE view_trigger('instead_of_upd'); -ERROR: INSTEAD OF triggers cannot have WHEN conditions --- Don't support column-level INSTEAD OF triggers -CREATE TRIGGER invalid_trig INSTEAD OF UPDATE OF a ON main_view -FOR EACH ROW EXECUTE PROCEDURE view_trigger('instead_of_upd'); -ERROR: INSTEAD OF triggers cannot have column lists --- Don't support statement-level INSTEAD OF triggers -CREATE TRIGGER invalid_trig INSTEAD OF UPDATE ON main_view -EXECUTE PROCEDURE view_trigger('instead_of_upd'); -ERROR: INSTEAD OF triggers must be FOR EACH ROW --- Valid INSTEAD OF triggers -CREATE TRIGGER instead_of_insert_trig INSTEAD OF INSERT ON main_view -FOR EACH ROW EXECUTE PROCEDURE view_trigger('instead_of_ins'); -CREATE TRIGGER instead_of_update_trig INSTEAD OF UPDATE ON main_view -FOR EACH ROW EXECUTE PROCEDURE view_trigger('instead_of_upd'); -CREATE TRIGGER instead_of_delete_trig INSTEAD OF DELETE ON main_view -FOR EACH ROW EXECUTE PROCEDURE view_trigger('instead_of_del'); --- Valid BEFORE statement VIEW triggers -CREATE TRIGGER before_ins_stmt_trig BEFORE INSERT ON main_view -FOR EACH STATEMENT EXECUTE PROCEDURE view_trigger('before_view_ins_stmt'); -CREATE TRIGGER before_upd_stmt_trig BEFORE UPDATE ON main_view -FOR EACH STATEMENT EXECUTE PROCEDURE view_trigger('before_view_upd_stmt'); -CREATE TRIGGER before_del_stmt_trig BEFORE DELETE ON main_view -FOR EACH STATEMENT EXECUTE PROCEDURE view_trigger('before_view_del_stmt'); --- Valid AFTER statement VIEW triggers -CREATE TRIGGER after_ins_stmt_trig AFTER INSERT ON main_view -FOR EACH STATEMENT EXECUTE PROCEDURE view_trigger('after_view_ins_stmt'); -CREATE TRIGGER after_upd_stmt_trig AFTER UPDATE ON main_view -FOR EACH STATEMENT EXECUTE PROCEDURE view_trigger('after_view_upd_stmt'); -CREATE TRIGGER after_del_stmt_trig AFTER DELETE ON main_view -FOR EACH STATEMENT EXECUTE PROCEDURE view_trigger('after_view_del_stmt'); -\set QUIET false --- Insert into view using trigger -INSERT INTO main_view VALUES (20, 30); -NOTICE: main_view BEFORE INSERT STATEMENT (before_view_ins_stmt) -NOTICE: main_view INSTEAD OF INSERT ROW (instead_of_ins) -NOTICE: NEW: (20,30) -NOTICE: trigger_func(before_ins_stmt) called: action = INSERT, when = BEFORE, level = STATEMENT -NOTICE: trigger_func(after_ins_stmt) called: action = INSERT, when = AFTER, level = STATEMENT -NOTICE: main_view AFTER INSERT STATEMENT (after_view_ins_stmt) -INSERT 0 1 -INSERT INTO main_view VALUES (21, 31) RETURNING a, b; -NOTICE: main_view BEFORE INSERT STATEMENT (before_view_ins_stmt) -NOTICE: main_view INSTEAD OF INSERT ROW (instead_of_ins) -NOTICE: NEW: (21,31) -NOTICE: trigger_func(before_ins_stmt) called: action = INSERT, when = BEFORE, level = STATEMENT -NOTICE: trigger_func(after_ins_stmt) called: action = INSERT, when = AFTER, level = STATEMENT -NOTICE: main_view AFTER INSERT STATEMENT (after_view_ins_stmt) - a | b -----+---- - 21 | 31 -(1 row) - -INSERT 0 1 --- Table trigger will prevent updates -UPDATE main_view SET b = 31 WHERE a = 20; -NOTICE: main_view BEFORE UPDATE STATEMENT (before_view_upd_stmt) -NOTICE: main_view INSTEAD OF UPDATE ROW (instead_of_upd) -NOTICE: OLD: (20,30), NEW: (20,31) -NOTICE: trigger_func(before_upd_a_stmt) called: action = UPDATE, when = BEFORE, level = STATEMENT -NOTICE: trigger_func(before_upd_a_row) called: action = UPDATE, when = BEFORE, level = ROW -NOTICE: trigger_func(after_upd_b_stmt) called: action = UPDATE, when = AFTER, level = STATEMENT -NOTICE: trigger_func(after_upd_stmt) called: action = UPDATE, when = AFTER, level = STATEMENT -NOTICE: main_view AFTER UPDATE STATEMENT (after_view_upd_stmt) -UPDATE 0 -UPDATE main_view SET b = 32 WHERE a = 21 AND b = 31 RETURNING a, b; -NOTICE: main_view BEFORE UPDATE STATEMENT (before_view_upd_stmt) -NOTICE: main_view INSTEAD OF UPDATE ROW (instead_of_upd) -NOTICE: OLD: (21,31), NEW: (21,32) -NOTICE: trigger_func(before_upd_a_stmt) called: action = UPDATE, when = BEFORE, level = STATEMENT -NOTICE: trigger_func(before_upd_a_row) called: action = UPDATE, when = BEFORE, level = ROW -NOTICE: trigger_func(after_upd_b_stmt) called: action = UPDATE, when = AFTER, level = STATEMENT -NOTICE: trigger_func(after_upd_stmt) called: action = UPDATE, when = AFTER, level = STATEMENT -NOTICE: main_view AFTER UPDATE STATEMENT (after_view_upd_stmt) - a | b ----+--- -(0 rows) - -UPDATE 0 --- Remove table trigger to allow updates -DROP TRIGGER before_upd_a_row_trig ON main_table; -DROP TRIGGER -UPDATE main_view SET b = 31 WHERE a = 20; -NOTICE: main_view BEFORE UPDATE STATEMENT (before_view_upd_stmt) -NOTICE: main_view INSTEAD OF UPDATE ROW (instead_of_upd) -NOTICE: OLD: (20,30), NEW: (20,31) -NOTICE: trigger_func(before_upd_a_stmt) called: action = UPDATE, when = BEFORE, level = STATEMENT -NOTICE: trigger_func(after_upd_a_b_row) called: action = UPDATE, when = AFTER, level = ROW -NOTICE: trigger_func(after_upd_b_row) called: action = UPDATE, when = AFTER, level = ROW -NOTICE: trigger_func(after_upd_b_stmt) called: action = UPDATE, when = AFTER, level = STATEMENT -NOTICE: trigger_func(after_upd_stmt) called: action = UPDATE, when = AFTER, level = STATEMENT -NOTICE: main_view AFTER UPDATE STATEMENT (after_view_upd_stmt) -UPDATE 1 -UPDATE main_view SET b = 32 WHERE a = 21 AND b = 31 RETURNING a, b; -NOTICE: main_view BEFORE UPDATE STATEMENT (before_view_upd_stmt) -NOTICE: main_view INSTEAD OF UPDATE ROW (instead_of_upd) -NOTICE: OLD: (21,31), NEW: (21,32) -NOTICE: trigger_func(before_upd_a_stmt) called: action = UPDATE, when = BEFORE, level = STATEMENT -NOTICE: trigger_func(after_upd_a_b_row) called: action = UPDATE, when = AFTER, level = ROW -NOTICE: trigger_func(after_upd_b_row) called: action = UPDATE, when = AFTER, level = ROW -NOTICE: trigger_func(after_upd_b_stmt) called: action = UPDATE, when = AFTER, level = STATEMENT -NOTICE: trigger_func(after_upd_stmt) called: action = UPDATE, when = AFTER, level = STATEMENT -NOTICE: main_view AFTER UPDATE STATEMENT (after_view_upd_stmt) - a | b -----+---- - 21 | 32 -(1 row) - -UPDATE 1 --- Before and after stmt triggers should fire even when no rows are affected -UPDATE main_view SET b = 0 WHERE false; -NOTICE: main_view BEFORE UPDATE STATEMENT (before_view_upd_stmt) -NOTICE: main_view AFTER UPDATE STATEMENT (after_view_upd_stmt) -UPDATE 0 --- Delete from view using trigger -DELETE FROM main_view WHERE a IN (20,21); -NOTICE: main_view BEFORE DELETE STATEMENT (before_view_del_stmt) -NOTICE: main_view INSTEAD OF DELETE ROW (instead_of_del) -NOTICE: OLD: (21,10) -NOTICE: main_view INSTEAD OF DELETE ROW (instead_of_del) -NOTICE: OLD: (20,31) -NOTICE: main_view INSTEAD OF DELETE ROW (instead_of_del) -NOTICE: OLD: (21,32) -NOTICE: main_view AFTER DELETE STATEMENT (after_view_del_stmt) -DELETE 3 -DELETE FROM main_view WHERE a = 31 RETURNING a, b; -NOTICE: main_view BEFORE DELETE STATEMENT (before_view_del_stmt) -NOTICE: main_view INSTEAD OF DELETE ROW (instead_of_del) -NOTICE: OLD: (31,10) -NOTICE: main_view AFTER DELETE STATEMENT (after_view_del_stmt) - a | b -----+---- - 31 | 10 -(1 row) - -DELETE 1 -\set QUIET true --- Describe view should list triggers -\d main_view - View "public.main_view" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | - b | integer | | | -Triggers: - after_del_stmt_trig AFTER DELETE ON main_view FOR EACH STATEMENT EXECUTE FUNCTION view_trigger('after_view_del_stmt') - after_ins_stmt_trig AFTER INSERT ON main_view FOR EACH STATEMENT EXECUTE FUNCTION view_trigger('after_view_ins_stmt') - after_upd_stmt_trig AFTER UPDATE ON main_view FOR EACH STATEMENT EXECUTE FUNCTION view_trigger('after_view_upd_stmt') - before_del_stmt_trig BEFORE DELETE ON main_view FOR EACH STATEMENT EXECUTE FUNCTION view_trigger('before_view_del_stmt') - before_ins_stmt_trig BEFORE INSERT ON main_view FOR EACH STATEMENT EXECUTE FUNCTION view_trigger('before_view_ins_stmt') - before_upd_stmt_trig BEFORE UPDATE ON main_view FOR EACH STATEMENT EXECUTE FUNCTION view_trigger('before_view_upd_stmt') - instead_of_delete_trig INSTEAD OF DELETE ON main_view FOR EACH ROW EXECUTE FUNCTION view_trigger('instead_of_del') - instead_of_insert_trig INSTEAD OF INSERT ON main_view FOR EACH ROW EXECUTE FUNCTION view_trigger('instead_of_ins') - instead_of_update_trig INSTEAD OF UPDATE ON main_view FOR EACH ROW EXECUTE FUNCTION view_trigger('instead_of_upd') - --- Test dropping view triggers -DROP TRIGGER instead_of_insert_trig ON main_view; -DROP TRIGGER instead_of_delete_trig ON main_view; -\d+ main_view - View "public.main_view" - Column | Type | Collation | Nullable | Default | Storage | Description ---------+---------+-----------+----------+---------+---------+------------- - a | integer | | | | plain | - b | integer | | | | plain | -View definition: - SELECT main_table.a, - main_table.b - FROM main_table; -Triggers: - after_del_stmt_trig AFTER DELETE ON main_view FOR EACH STATEMENT EXECUTE FUNCTION view_trigger('after_view_del_stmt') - after_ins_stmt_trig AFTER INSERT ON main_view FOR EACH STATEMENT EXECUTE FUNCTION view_trigger('after_view_ins_stmt') - after_upd_stmt_trig AFTER UPDATE ON main_view FOR EACH STATEMENT EXECUTE FUNCTION view_trigger('after_view_upd_stmt') - before_del_stmt_trig BEFORE DELETE ON main_view FOR EACH STATEMENT EXECUTE FUNCTION view_trigger('before_view_del_stmt') - before_ins_stmt_trig BEFORE INSERT ON main_view FOR EACH STATEMENT EXECUTE FUNCTION view_trigger('before_view_ins_stmt') - before_upd_stmt_trig BEFORE UPDATE ON main_view FOR EACH STATEMENT EXECUTE FUNCTION view_trigger('before_view_upd_stmt') - instead_of_update_trig INSTEAD OF UPDATE ON main_view FOR EACH ROW EXECUTE FUNCTION view_trigger('instead_of_upd') - -DROP VIEW main_view; --- --- Test triggers on a join view --- -CREATE TABLE country_table ( - country_id serial primary key, - country_name text unique not null, - continent text not null -); -INSERT INTO country_table (country_name, continent) - VALUES ('Japan', 'Asia'), - ('UK', 'Europe'), - ('USA', 'North America') - RETURNING *; - country_id | country_name | continent -------------+--------------+--------------- - 1 | Japan | Asia - 2 | UK | Europe - 3 | USA | North America -(3 rows) - -CREATE TABLE city_table ( - city_id serial primary key, - city_name text not null, - population bigint, - country_id int references country_table -); -CREATE VIEW city_view AS - SELECT city_id, city_name, population, country_name, continent - FROM city_table ci - LEFT JOIN country_table co ON co.country_id = ci.country_id; -CREATE FUNCTION city_insert() RETURNS trigger LANGUAGE plpgsql AS $$ -declare - ctry_id int; -begin - if NEW.country_name IS NOT NULL then - SELECT country_id, continent INTO ctry_id, NEW.continent - FROM country_table WHERE country_name = NEW.country_name; - if NOT FOUND then - raise exception 'No such country: "%"', NEW.country_name; - end if; - else - NEW.continent := NULL; - end if; - - if NEW.city_id IS NOT NULL then - INSERT INTO city_table - VALUES(NEW.city_id, NEW.city_name, NEW.population, ctry_id); - else - INSERT INTO city_table(city_name, population, country_id) - VALUES(NEW.city_name, NEW.population, ctry_id) - RETURNING city_id INTO NEW.city_id; - end if; - - RETURN NEW; -end; -$$; -CREATE TRIGGER city_insert_trig INSTEAD OF INSERT ON city_view -FOR EACH ROW EXECUTE PROCEDURE city_insert(); -CREATE FUNCTION city_delete() RETURNS trigger LANGUAGE plpgsql AS $$ -begin - DELETE FROM city_table WHERE city_id = OLD.city_id; - if NOT FOUND then RETURN NULL; end if; - RETURN OLD; -end; -$$; -CREATE TRIGGER city_delete_trig INSTEAD OF DELETE ON city_view -FOR EACH ROW EXECUTE PROCEDURE city_delete(); -CREATE FUNCTION city_update() RETURNS trigger LANGUAGE plpgsql AS $$ -declare - ctry_id int; -begin - if NEW.country_name IS DISTINCT FROM OLD.country_name then - SELECT country_id, continent INTO ctry_id, NEW.continent - FROM country_table WHERE country_name = NEW.country_name; - if NOT FOUND then - raise exception 'No such country: "%"', NEW.country_name; - end if; - - UPDATE city_table SET city_name = NEW.city_name, - population = NEW.population, - country_id = ctry_id - WHERE city_id = OLD.city_id; - else - UPDATE city_table SET city_name = NEW.city_name, - population = NEW.population - WHERE city_id = OLD.city_id; - NEW.continent := OLD.continent; - end if; - - if NOT FOUND then RETURN NULL; end if; - RETURN NEW; -end; -$$; -CREATE TRIGGER city_update_trig INSTEAD OF UPDATE ON city_view -FOR EACH ROW EXECUTE PROCEDURE city_update(); -\set QUIET false --- INSERT .. RETURNING -INSERT INTO city_view(city_name) VALUES('Tokyo') RETURNING *; - city_id | city_name | population | country_name | continent ----------+-----------+------------+--------------+----------- - 1 | Tokyo | | | -(1 row) - -INSERT 0 1 -INSERT INTO city_view(city_name, population) VALUES('London', 7556900) RETURNING *; - city_id | city_name | population | country_name | continent ----------+-----------+------------+--------------+----------- - 2 | London | 7556900 | | -(1 row) - -INSERT 0 1 -INSERT INTO city_view(city_name, country_name) VALUES('Washington DC', 'USA') RETURNING *; - city_id | city_name | population | country_name | continent ----------+---------------+------------+--------------+--------------- - 3 | Washington DC | | USA | North America -(1 row) - -INSERT 0 1 -INSERT INTO city_view(city_id, city_name) VALUES(123456, 'New York') RETURNING *; - city_id | city_name | population | country_name | continent ----------+-----------+------------+--------------+----------- - 123456 | New York | | | -(1 row) - -INSERT 0 1 -INSERT INTO city_view VALUES(234567, 'Birmingham', 1016800, 'UK', 'EU') RETURNING *; - city_id | city_name | population | country_name | continent ----------+------------+------------+--------------+----------- - 234567 | Birmingham | 1016800 | UK | Europe -(1 row) - -INSERT 0 1 --- UPDATE .. RETURNING -UPDATE city_view SET country_name = 'Japon' WHERE city_name = 'Tokyo'; -- error -ERROR: No such country: "Japon" -CONTEXT: PL/pgSQL function city_update() line 9 at RAISE -UPDATE city_view SET country_name = 'Japan' WHERE city_name = 'Takyo'; -- no match -UPDATE 0 -UPDATE city_view SET country_name = 'Japan' WHERE city_name = 'Tokyo' RETURNING *; -- OK - city_id | city_name | population | country_name | continent ----------+-----------+------------+--------------+----------- - 1 | Tokyo | | Japan | Asia -(1 row) - -UPDATE 1 -UPDATE city_view SET population = 13010279 WHERE city_name = 'Tokyo' RETURNING *; - city_id | city_name | population | country_name | continent ----------+-----------+------------+--------------+----------- - 1 | Tokyo | 13010279 | Japan | Asia -(1 row) - -UPDATE 1 -UPDATE city_view SET country_name = 'UK' WHERE city_name = 'New York' RETURNING *; - city_id | city_name | population | country_name | continent ----------+-----------+------------+--------------+----------- - 123456 | New York | | UK | Europe -(1 row) - -UPDATE 1 -UPDATE city_view SET country_name = 'USA', population = 8391881 WHERE city_name = 'New York' RETURNING *; - city_id | city_name | population | country_name | continent ----------+-----------+------------+--------------+--------------- - 123456 | New York | 8391881 | USA | North America -(1 row) - -UPDATE 1 -UPDATE city_view SET continent = 'EU' WHERE continent = 'Europe' RETURNING *; - city_id | city_name | population | country_name | continent ----------+------------+------------+--------------+----------- - 234567 | Birmingham | 1016800 | UK | Europe -(1 row) - -UPDATE 1 -UPDATE city_view v1 SET country_name = v2.country_name FROM city_view v2 - WHERE v2.city_name = 'Birmingham' AND v1.city_name = 'London' RETURNING *; - city_id | city_name | population | country_name | continent | city_id | city_name | population | country_name | continent ----------+-----------+------------+--------------+-----------+---------+------------+------------+--------------+----------- - 2 | London | 7556900 | UK | Europe | 234567 | Birmingham | 1016800 | UK | Europe -(1 row) - -UPDATE 1 --- DELETE .. RETURNING -DELETE FROM city_view WHERE city_name = 'Birmingham' RETURNING *; - city_id | city_name | population | country_name | continent ----------+------------+------------+--------------+----------- - 234567 | Birmingham | 1016800 | UK | Europe -(1 row) - -DELETE 1 -\set QUIET true --- read-only view with WHERE clause -CREATE VIEW european_city_view AS - SELECT * FROM city_view WHERE continent = 'Europe'; -SELECT count(*) FROM european_city_view; - count -------- - 1 -(1 row) - -CREATE FUNCTION no_op_trig_fn() RETURNS trigger LANGUAGE plpgsql -AS 'begin RETURN NULL; end'; -CREATE TRIGGER no_op_trig INSTEAD OF INSERT OR UPDATE OR DELETE -ON european_city_view FOR EACH ROW EXECUTE PROCEDURE no_op_trig_fn(); -\set QUIET false -INSERT INTO european_city_view VALUES (0, 'x', 10000, 'y', 'z'); -INSERT 0 0 -UPDATE european_city_view SET population = 10000; -UPDATE 0 -DELETE FROM european_city_view; -DELETE 0 -\set QUIET true --- rules bypassing no-op triggers -CREATE RULE european_city_insert_rule AS ON INSERT TO european_city_view -DO INSTEAD INSERT INTO city_view -VALUES (NEW.city_id, NEW.city_name, NEW.population, NEW.country_name, NEW.continent) -RETURNING *; -CREATE RULE european_city_update_rule AS ON UPDATE TO european_city_view -DO INSTEAD UPDATE city_view SET - city_name = NEW.city_name, - population = NEW.population, - country_name = NEW.country_name -WHERE city_id = OLD.city_id -RETURNING NEW.*; -CREATE RULE european_city_delete_rule AS ON DELETE TO european_city_view -DO INSTEAD DELETE FROM city_view WHERE city_id = OLD.city_id RETURNING *; -\set QUIET false --- INSERT not limited by view's WHERE clause, but UPDATE AND DELETE are -INSERT INTO european_city_view(city_name, country_name) - VALUES ('Cambridge', 'USA') RETURNING *; - city_id | city_name | population | country_name | continent ----------+-----------+------------+--------------+--------------- - 4 | Cambridge | | USA | North America -(1 row) - -INSERT 0 1 -UPDATE european_city_view SET country_name = 'UK' - WHERE city_name = 'Cambridge'; -UPDATE 0 -DELETE FROM european_city_view WHERE city_name = 'Cambridge'; -DELETE 0 --- UPDATE and DELETE via rule and trigger -UPDATE city_view SET country_name = 'UK' - WHERE city_name = 'Cambridge' RETURNING *; - city_id | city_name | population | country_name | continent ----------+-----------+------------+--------------+----------- - 4 | Cambridge | | UK | Europe -(1 row) - -UPDATE 1 -UPDATE european_city_view SET population = 122800 - WHERE city_name = 'Cambridge' RETURNING *; - city_id | city_name | population | country_name | continent ----------+-----------+------------+--------------+----------- - 4 | Cambridge | 122800 | UK | Europe -(1 row) - -UPDATE 1 -DELETE FROM european_city_view WHERE city_name = 'Cambridge' RETURNING *; - city_id | city_name | population | country_name | continent ----------+-----------+------------+--------------+----------- - 4 | Cambridge | 122800 | UK | Europe -(1 row) - -DELETE 1 --- join UPDATE test -UPDATE city_view v SET population = 599657 - FROM city_table ci, country_table co - WHERE ci.city_name = 'Washington DC' and co.country_name = 'USA' - AND v.city_id = ci.city_id AND v.country_name = co.country_name - RETURNING co.country_id, v.country_name, - v.city_id, v.city_name, v.population; - country_id | country_name | city_id | city_name | population -------------+--------------+---------+---------------+------------ - 3 | USA | 3 | Washington DC | 599657 -(1 row) - -UPDATE 1 -\set QUIET true -SELECT * FROM city_view; - city_id | city_name | population | country_name | continent ----------+---------------+------------+--------------+--------------- - 1 | Tokyo | 13010279 | Japan | Asia - 123456 | New York | 8391881 | USA | North America - 2 | London | 7556900 | UK | Europe - 3 | Washington DC | 599657 | USA | North America -(4 rows) - -DROP TABLE city_table CASCADE; -NOTICE: drop cascades to 2 other objects -DETAIL: drop cascades to view city_view -drop cascades to view european_city_view -DROP TABLE country_table; --- Test pg_trigger_depth() -create table depth_a (id int not null primary key); -create table depth_b (id int not null primary key); -create table depth_c (id int not null primary key); -create function depth_a_tf() returns trigger - language plpgsql as $$ -begin - raise notice '%: depth = %', tg_name, pg_trigger_depth(); - insert into depth_b values (new.id); - raise notice '%: depth = %', tg_name, pg_trigger_depth(); - return new; -end; -$$; -create trigger depth_a_tr before insert on depth_a - for each row execute procedure depth_a_tf(); -create function depth_b_tf() returns trigger - language plpgsql as $$ -begin - raise notice '%: depth = %', tg_name, pg_trigger_depth(); - begin - execute 'insert into depth_c values (' || new.id::text || ')'; - exception - when sqlstate 'U9999' then - raise notice 'SQLSTATE = U9999: depth = %', pg_trigger_depth(); - end; - raise notice '%: depth = %', tg_name, pg_trigger_depth(); - if new.id = 1 then - execute 'insert into depth_c values (' || new.id::text || ')'; - end if; - return new; -end; -$$; -create trigger depth_b_tr before insert on depth_b - for each row execute procedure depth_b_tf(); -create function depth_c_tf() returns trigger - language plpgsql as $$ -begin - raise notice '%: depth = %', tg_name, pg_trigger_depth(); - if new.id = 1 then - raise exception sqlstate 'U9999'; - end if; - raise notice '%: depth = %', tg_name, pg_trigger_depth(); - return new; -end; -$$; -create trigger depth_c_tr before insert on depth_c - for each row execute procedure depth_c_tf(); -select pg_trigger_depth(); - pg_trigger_depth ------------------- - 0 -(1 row) - -insert into depth_a values (1); -NOTICE: depth_a_tr: depth = 1 -NOTICE: depth_b_tr: depth = 2 -NOTICE: depth_c_tr: depth = 3 -NOTICE: SQLSTATE = U9999: depth = 2 -NOTICE: depth_b_tr: depth = 2 -NOTICE: depth_c_tr: depth = 3 -ERROR: U9999 -CONTEXT: PL/pgSQL function depth_c_tf() line 5 at RAISE -SQL statement "insert into depth_c values (1)" -PL/pgSQL function depth_b_tf() line 12 at EXECUTE -SQL statement "insert into depth_b values (new.id)" -PL/pgSQL function depth_a_tf() line 4 at SQL statement -select pg_trigger_depth(); - pg_trigger_depth ------------------- - 0 -(1 row) - -insert into depth_a values (2); -NOTICE: depth_a_tr: depth = 1 -NOTICE: depth_b_tr: depth = 2 -NOTICE: depth_c_tr: depth = 3 -NOTICE: depth_c_tr: depth = 3 -NOTICE: depth_b_tr: depth = 2 -NOTICE: depth_a_tr: depth = 1 -select pg_trigger_depth(); - pg_trigger_depth ------------------- - 0 -(1 row) - -drop table depth_a, depth_b, depth_c; -drop function depth_a_tf(); -drop function depth_b_tf(); -drop function depth_c_tf(); --- --- Test updates to rows during firing of BEFORE ROW triggers. --- As of 9.2, such cases should be rejected (see bug #6123). --- -create temp table parent ( - aid int not null primary key, - val1 text, - val2 text, - val3 text, - val4 text, - bcnt int not null default 0); -create temp table child ( - bid int not null primary key, - aid int not null, - val1 text); -create function parent_upd_func() - returns trigger language plpgsql as -$$ -begin - if old.val1 <> new.val1 then - new.val2 = new.val1; - delete from child where child.aid = new.aid and child.val1 = new.val1; - end if; - return new; -end; -$$; -create trigger parent_upd_trig before update on parent - for each row execute procedure parent_upd_func(); -create function parent_del_func() - returns trigger language plpgsql as -$$ -begin - delete from child where aid = old.aid; - return old; -end; -$$; -create trigger parent_del_trig before delete on parent - for each row execute procedure parent_del_func(); -create function child_ins_func() - returns trigger language plpgsql as -$$ -begin - update parent set bcnt = bcnt + 1 where aid = new.aid; - return new; -end; -$$; -create trigger child_ins_trig after insert on child - for each row execute procedure child_ins_func(); -create function child_del_func() - returns trigger language plpgsql as -$$ -begin - update parent set bcnt = bcnt - 1 where aid = old.aid; - return old; -end; -$$; -create trigger child_del_trig after delete on child - for each row execute procedure child_del_func(); -insert into parent values (1, 'a', 'a', 'a', 'a', 0); -insert into child values (10, 1, 'b'); -select * from parent; select * from child; - aid | val1 | val2 | val3 | val4 | bcnt ------+------+------+------+------+------ - 1 | a | a | a | a | 1 -(1 row) - - bid | aid | val1 ------+-----+------ - 10 | 1 | b -(1 row) - -update parent set val1 = 'b' where aid = 1; -- should fail -ERROR: tuple to be updated was already modified by an operation triggered by the current command -HINT: Consider using an AFTER trigger instead of a BEFORE trigger to propagate changes to other rows. -select * from parent; select * from child; - aid | val1 | val2 | val3 | val4 | bcnt ------+------+------+------+------+------ - 1 | a | a | a | a | 1 -(1 row) - - bid | aid | val1 ------+-----+------ - 10 | 1 | b -(1 row) - -delete from parent where aid = 1; -- should fail -ERROR: tuple to be deleted was already modified by an operation triggered by the current command -HINT: Consider using an AFTER trigger instead of a BEFORE trigger to propagate changes to other rows. -select * from parent; select * from child; - aid | val1 | val2 | val3 | val4 | bcnt ------+------+------+------+------+------ - 1 | a | a | a | a | 1 -(1 row) - - bid | aid | val1 ------+-----+------ - 10 | 1 | b -(1 row) - --- replace the trigger function with one that restarts the deletion after --- having modified a child -create or replace function parent_del_func() - returns trigger language plpgsql as -$$ -begin - delete from child where aid = old.aid; - if found then - delete from parent where aid = old.aid; - return null; -- cancel outer deletion - end if; - return old; -end; -$$; -delete from parent where aid = 1; -select * from parent; select * from child; - aid | val1 | val2 | val3 | val4 | bcnt ------+------+------+------+------+------ -(0 rows) - - bid | aid | val1 ------+-----+------ -(0 rows) - -drop table parent, child; -drop function parent_upd_func(); -drop function parent_del_func(); -drop function child_ins_func(); -drop function child_del_func(); --- similar case, but with a self-referencing FK so that parent and child --- rows can be affected by a single operation -create temp table self_ref_trigger ( - id int primary key, - parent int references self_ref_trigger, - data text, - nchildren int not null default 0 -); -create function self_ref_trigger_ins_func() - returns trigger language plpgsql as -$$ -begin - if new.parent is not null then - update self_ref_trigger set nchildren = nchildren + 1 - where id = new.parent; - end if; - return new; -end; -$$; -create trigger self_ref_trigger_ins_trig before insert on self_ref_trigger - for each row execute procedure self_ref_trigger_ins_func(); -create function self_ref_trigger_del_func() - returns trigger language plpgsql as -$$ -begin - if old.parent is not null then - update self_ref_trigger set nchildren = nchildren - 1 - where id = old.parent; - end if; - return old; -end; -$$; -create trigger self_ref_trigger_del_trig before delete on self_ref_trigger - for each row execute procedure self_ref_trigger_del_func(); -insert into self_ref_trigger values (1, null, 'root'); -insert into self_ref_trigger values (2, 1, 'root child A'); -insert into self_ref_trigger values (3, 1, 'root child B'); -insert into self_ref_trigger values (4, 2, 'grandchild 1'); -insert into self_ref_trigger values (5, 3, 'grandchild 2'); -update self_ref_trigger set data = 'root!' where id = 1; -select * from self_ref_trigger; - id | parent | data | nchildren -----+--------+--------------+----------- - 2 | 1 | root child A | 1 - 4 | 2 | grandchild 1 | 0 - 3 | 1 | root child B | 1 - 5 | 3 | grandchild 2 | 0 - 1 | | root! | 2 -(5 rows) - -delete from self_ref_trigger; -ERROR: tuple to be updated was already modified by an operation triggered by the current command -HINT: Consider using an AFTER trigger instead of a BEFORE trigger to propagate changes to other rows. -select * from self_ref_trigger; - id | parent | data | nchildren -----+--------+--------------+----------- - 2 | 1 | root child A | 1 - 4 | 2 | grandchild 1 | 0 - 3 | 1 | root child B | 1 - 5 | 3 | grandchild 2 | 0 - 1 | | root! | 2 -(5 rows) - -drop table self_ref_trigger; -drop function self_ref_trigger_ins_func(); -drop function self_ref_trigger_del_func(); --- --- Check that statement triggers work correctly even with all children excluded --- -create table stmt_trig_on_empty_upd (a int); -create table stmt_trig_on_empty_upd1 () inherits (stmt_trig_on_empty_upd); -create function update_stmt_notice() returns trigger as $$ -begin - raise notice 'updating %', TG_TABLE_NAME; - return null; -end; -$$ language plpgsql; -create trigger before_stmt_trigger - before update on stmt_trig_on_empty_upd - execute procedure update_stmt_notice(); -create trigger before_stmt_trigger - before update on stmt_trig_on_empty_upd1 - execute procedure update_stmt_notice(); --- inherited no-op update -update stmt_trig_on_empty_upd set a = a where false returning a+1 as aa; -NOTICE: updating stmt_trig_on_empty_upd - aa ----- -(0 rows) - --- simple no-op update -update stmt_trig_on_empty_upd1 set a = a where false returning a+1 as aa; -NOTICE: updating stmt_trig_on_empty_upd1 - aa ----- -(0 rows) - -drop table stmt_trig_on_empty_upd cascade; -NOTICE: drop cascades to table stmt_trig_on_empty_upd1 -drop function update_stmt_notice(); --- --- Check that index creation (or DDL in general) is prohibited in a trigger --- -create table trigger_ddl_table ( - col1 integer, - col2 integer -); -create function trigger_ddl_func() returns trigger as $$ -begin - alter table trigger_ddl_table add primary key (col1); - return new; -end$$ language plpgsql; -create trigger trigger_ddl_func before insert on trigger_ddl_table for each row - execute procedure trigger_ddl_func(); -insert into trigger_ddl_table values (1, 42); -- fail -ERROR: cannot ALTER TABLE "trigger_ddl_table" because it is being used by active queries in this session -CONTEXT: SQL statement "alter table trigger_ddl_table add primary key (col1)" -PL/pgSQL function trigger_ddl_func() line 3 at SQL statement -create or replace function trigger_ddl_func() returns trigger as $$ -begin - create index on trigger_ddl_table (col2); - return new; -end$$ language plpgsql; -insert into trigger_ddl_table values (1, 42); -- fail -ERROR: cannot CREATE INDEX "trigger_ddl_table" because it is being used by active queries in this session -CONTEXT: SQL statement "create index on trigger_ddl_table (col2)" -PL/pgSQL function trigger_ddl_func() line 3 at SQL statement -drop table trigger_ddl_table; -drop function trigger_ddl_func(); --- --- Verify behavior of before and after triggers with INSERT...ON CONFLICT --- DO UPDATE --- -create table upsert (key int4 primary key, color text); -create function upsert_before_func() - returns trigger language plpgsql as -$$ -begin - if (TG_OP = 'UPDATE') then - raise warning 'before update (old): %', old.*::text; - raise warning 'before update (new): %', new.*::text; - elsif (TG_OP = 'INSERT') then - raise warning 'before insert (new): %', new.*::text; - if new.key % 2 = 0 then - new.key := new.key + 1; - new.color := new.color || ' trig modified'; - raise warning 'before insert (new, modified): %', new.*::text; - end if; - end if; - return new; -end; -$$; -create trigger upsert_before_trig before insert or update on upsert - for each row execute procedure upsert_before_func(); -create function upsert_after_func() - returns trigger language plpgsql as -$$ -begin - if (TG_OP = 'UPDATE') then - raise warning 'after update (old): %', old.*::text; - raise warning 'after update (new): %', new.*::text; - elsif (TG_OP = 'INSERT') then - raise warning 'after insert (new): %', new.*::text; - end if; - return null; -end; -$$; -create trigger upsert_after_trig after insert or update on upsert - for each row execute procedure upsert_after_func(); -insert into upsert values(1, 'black') on conflict (key) do update set color = 'updated ' || upsert.color; -WARNING: before insert (new): (1,black) -WARNING: after insert (new): (1,black) -insert into upsert values(2, 'red') on conflict (key) do update set color = 'updated ' || upsert.color; -WARNING: before insert (new): (2,red) -WARNING: before insert (new, modified): (3,"red trig modified") -WARNING: after insert (new): (3,"red trig modified") -insert into upsert values(3, 'orange') on conflict (key) do update set color = 'updated ' || upsert.color; -WARNING: before insert (new): (3,orange) -WARNING: before update (old): (3,"red trig modified") -WARNING: before update (new): (3,"updated red trig modified") -WARNING: after update (old): (3,"red trig modified") -WARNING: after update (new): (3,"updated red trig modified") -insert into upsert values(4, 'green') on conflict (key) do update set color = 'updated ' || upsert.color; -WARNING: before insert (new): (4,green) -WARNING: before insert (new, modified): (5,"green trig modified") -WARNING: after insert (new): (5,"green trig modified") -insert into upsert values(5, 'purple') on conflict (key) do update set color = 'updated ' || upsert.color; -WARNING: before insert (new): (5,purple) -WARNING: before update (old): (5,"green trig modified") -WARNING: before update (new): (5,"updated green trig modified") -WARNING: after update (old): (5,"green trig modified") -WARNING: after update (new): (5,"updated green trig modified") -insert into upsert values(6, 'white') on conflict (key) do update set color = 'updated ' || upsert.color; -WARNING: before insert (new): (6,white) -WARNING: before insert (new, modified): (7,"white trig modified") -WARNING: after insert (new): (7,"white trig modified") -insert into upsert values(7, 'pink') on conflict (key) do update set color = 'updated ' || upsert.color; -WARNING: before insert (new): (7,pink) -WARNING: before update (old): (7,"white trig modified") -WARNING: before update (new): (7,"updated white trig modified") -WARNING: after update (old): (7,"white trig modified") -WARNING: after update (new): (7,"updated white trig modified") -insert into upsert values(8, 'yellow') on conflict (key) do update set color = 'updated ' || upsert.color; -WARNING: before insert (new): (8,yellow) -WARNING: before insert (new, modified): (9,"yellow trig modified") -WARNING: after insert (new): (9,"yellow trig modified") -select * from upsert; - key | color ------+----------------------------- - 1 | black - 3 | updated red trig modified - 5 | updated green trig modified - 7 | updated white trig modified - 9 | yellow trig modified -(5 rows) - -drop table upsert; -drop function upsert_before_func(); -drop function upsert_after_func(); --- --- Verify that triggers with transition tables are not allowed on --- views --- -create table my_table (i int); -create view my_view as select * from my_table; -create function my_trigger_function() returns trigger as $$ begin end; $$ language plpgsql; -create trigger my_trigger after update on my_view referencing old table as old_table - for each statement execute procedure my_trigger_function(); -ERROR: "my_view" is a view -DETAIL: Triggers on views cannot have transition tables. -drop function my_trigger_function(); -drop view my_view; -drop table my_table; --- --- Verify cases that are unsupported with partitioned tables --- -create table parted_trig (a int) partition by list (a); -create function trigger_nothing() returns trigger - language plpgsql as $$ begin end; $$; -create trigger failed instead of update on parted_trig - for each row execute procedure trigger_nothing(); -ERROR: "parted_trig" is a table -DETAIL: Tables cannot have INSTEAD OF triggers. -create trigger failed after update on parted_trig - referencing old table as old_table - for each row execute procedure trigger_nothing(); -ERROR: "parted_trig" is a partitioned table -DETAIL: Triggers on partitioned tables cannot have transition tables. -drop table parted_trig; --- --- Verify trigger creation for partitioned tables, and drop behavior --- -create table trigpart (a int, b int) partition by range (a); -create table trigpart1 partition of trigpart for values from (0) to (1000); -create trigger trg1 after insert on trigpart for each row execute procedure trigger_nothing(); -create table trigpart2 partition of trigpart for values from (1000) to (2000); -create table trigpart3 (like trigpart); -alter table trigpart attach partition trigpart3 for values from (2000) to (3000); -create table trigpart4 partition of trigpart for values from (3000) to (4000) partition by range (a); -create table trigpart41 partition of trigpart4 for values from (3000) to (3500); -create table trigpart42 (like trigpart); -alter table trigpart4 attach partition trigpart42 for values from (3500) to (4000); -select tgrelid::regclass, tgname, tgfoid::regproc from pg_trigger - where tgrelid::regclass::text like 'trigpart%' order by tgrelid::regclass::text; - tgrelid | tgname | tgfoid -------------+--------+----------------- - trigpart | trg1 | trigger_nothing - trigpart1 | trg1 | trigger_nothing - trigpart2 | trg1 | trigger_nothing - trigpart3 | trg1 | trigger_nothing - trigpart4 | trg1 | trigger_nothing - trigpart41 | trg1 | trigger_nothing - trigpart42 | trg1 | trigger_nothing -(7 rows) - -drop trigger trg1 on trigpart1; -- fail -ERROR: cannot drop trigger trg1 on table trigpart1 because trigger trg1 on table trigpart requires it -HINT: You can drop trigger trg1 on table trigpart instead. -drop trigger trg1 on trigpart2; -- fail -ERROR: cannot drop trigger trg1 on table trigpart2 because trigger trg1 on table trigpart requires it -HINT: You can drop trigger trg1 on table trigpart instead. -drop trigger trg1 on trigpart3; -- fail -ERROR: cannot drop trigger trg1 on table trigpart3 because trigger trg1 on table trigpart requires it -HINT: You can drop trigger trg1 on table trigpart instead. -drop table trigpart2; -- ok, trigger should be gone in that partition -select tgrelid::regclass, tgname, tgfoid::regproc from pg_trigger - where tgrelid::regclass::text like 'trigpart%' order by tgrelid::regclass::text; - tgrelid | tgname | tgfoid -------------+--------+----------------- - trigpart | trg1 | trigger_nothing - trigpart1 | trg1 | trigger_nothing - trigpart3 | trg1 | trigger_nothing - trigpart4 | trg1 | trigger_nothing - trigpart41 | trg1 | trigger_nothing - trigpart42 | trg1 | trigger_nothing -(6 rows) - -drop trigger trg1 on trigpart; -- ok, all gone -select tgrelid::regclass, tgname, tgfoid::regproc from pg_trigger - where tgrelid::regclass::text like 'trigpart%' order by tgrelid::regclass::text; - tgrelid | tgname | tgfoid ----------+--------+-------- -(0 rows) - --- check detach behavior -create trigger trg1 after insert on trigpart for each row execute procedure trigger_nothing(); -\d trigpart3 - Table "public.trigpart3" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | - b | integer | | | -Partition of: trigpart FOR VALUES FROM (2000) TO (3000) -Triggers: - trg1 AFTER INSERT ON trigpart3 FOR EACH ROW EXECUTE FUNCTION trigger_nothing(), ON TABLE trigpart - -alter table trigpart detach partition trigpart3; -drop trigger trg1 on trigpart3; -- fail due to "does not exist" -ERROR: trigger "trg1" for table "trigpart3" does not exist -alter table trigpart detach partition trigpart4; -drop trigger trg1 on trigpart41; -- fail due to "does not exist" -ERROR: trigger "trg1" for table "trigpart41" does not exist -drop table trigpart4; -alter table trigpart attach partition trigpart3 for values from (2000) to (3000); -alter table trigpart detach partition trigpart3; -alter table trigpart attach partition trigpart3 for values from (2000) to (3000); -drop table trigpart3; -select tgrelid::regclass::text, tgname, tgfoid::regproc, tgenabled, tgisinternal from pg_trigger - where tgname ~ '^trg1' order by 1; - tgrelid | tgname | tgfoid | tgenabled | tgisinternal ------------+--------+-----------------+-----------+-------------- - trigpart | trg1 | trigger_nothing | O | f - trigpart1 | trg1 | trigger_nothing | O | t -(2 rows) - -create table trigpart3 (like trigpart); -create trigger trg1 after insert on trigpart3 for each row execute procedure trigger_nothing(); -\d trigpart3 - Table "public.trigpart3" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | - b | integer | | | -Triggers: - trg1 AFTER INSERT ON trigpart3 FOR EACH ROW EXECUTE FUNCTION trigger_nothing() - -alter table trigpart attach partition trigpart3 FOR VALUES FROM (2000) to (3000); -- fail -ERROR: trigger "trg1" for relation "trigpart3" already exists -drop table trigpart3; --- check display of unrelated triggers -create trigger samename after delete on trigpart execute function trigger_nothing(); -create trigger samename after delete on trigpart1 execute function trigger_nothing(); -\d trigpart1 - Table "public.trigpart1" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | - b | integer | | | -Partition of: trigpart FOR VALUES FROM (0) TO (1000) -Triggers: - samename AFTER DELETE ON trigpart1 FOR EACH STATEMENT EXECUTE FUNCTION trigger_nothing() - trg1 AFTER INSERT ON trigpart1 FOR EACH ROW EXECUTE FUNCTION trigger_nothing(), ON TABLE trigpart - -drop table trigpart; -drop function trigger_nothing(); --- --- Verify that triggers are fired for partitioned tables --- -create table parted_stmt_trig (a int) partition by list (a); -create table parted_stmt_trig1 partition of parted_stmt_trig for values in (1); -create table parted_stmt_trig2 partition of parted_stmt_trig for values in (2); -create table parted2_stmt_trig (a int) partition by list (a); -create table parted2_stmt_trig1 partition of parted2_stmt_trig for values in (1); -create table parted2_stmt_trig2 partition of parted2_stmt_trig for values in (2); -create or replace function trigger_notice() returns trigger as $$ - begin - raise notice 'trigger % on % % % for %', TG_NAME, TG_TABLE_NAME, TG_WHEN, TG_OP, TG_LEVEL; - if TG_LEVEL = 'ROW' then - return NEW; - end if; - return null; - end; - $$ language plpgsql; --- insert/update/delete statement-level triggers on the parent -create trigger trig_ins_before before insert on parted_stmt_trig - for each statement execute procedure trigger_notice(); -create trigger trig_ins_after after insert on parted_stmt_trig - for each statement execute procedure trigger_notice(); -create trigger trig_upd_before before update on parted_stmt_trig - for each statement execute procedure trigger_notice(); -create trigger trig_upd_after after update on parted_stmt_trig - for each statement execute procedure trigger_notice(); -create trigger trig_del_before before delete on parted_stmt_trig - for each statement execute procedure trigger_notice(); -create trigger trig_del_after after delete on parted_stmt_trig - for each statement execute procedure trigger_notice(); --- insert/update/delete row-level triggers on the parent -create trigger trig_ins_after_parent after insert on parted_stmt_trig - for each row execute procedure trigger_notice(); -create trigger trig_upd_after_parent after update on parted_stmt_trig - for each row execute procedure trigger_notice(); -create trigger trig_del_after_parent after delete on parted_stmt_trig - for each row execute procedure trigger_notice(); --- insert/update/delete row-level triggers on the first partition -create trigger trig_ins_before_child before insert on parted_stmt_trig1 - for each row execute procedure trigger_notice(); -create trigger trig_ins_after_child after insert on parted_stmt_trig1 - for each row execute procedure trigger_notice(); -create trigger trig_upd_before_child before update on parted_stmt_trig1 - for each row execute procedure trigger_notice(); -create trigger trig_upd_after_child after update on parted_stmt_trig1 - for each row execute procedure trigger_notice(); -create trigger trig_del_before_child before delete on parted_stmt_trig1 - for each row execute procedure trigger_notice(); -create trigger trig_del_after_child after delete on parted_stmt_trig1 - for each row execute procedure trigger_notice(); --- insert/update/delete statement-level triggers on the parent -create trigger trig_ins_before_3 before insert on parted2_stmt_trig - for each statement execute procedure trigger_notice(); -create trigger trig_ins_after_3 after insert on parted2_stmt_trig - for each statement execute procedure trigger_notice(); -create trigger trig_upd_before_3 before update on parted2_stmt_trig - for each statement execute procedure trigger_notice(); -create trigger trig_upd_after_3 after update on parted2_stmt_trig - for each statement execute procedure trigger_notice(); -create trigger trig_del_before_3 before delete on parted2_stmt_trig - for each statement execute procedure trigger_notice(); -create trigger trig_del_after_3 after delete on parted2_stmt_trig - for each statement execute procedure trigger_notice(); -with ins (a) as ( - insert into parted2_stmt_trig values (1), (2) returning a -) insert into parted_stmt_trig select a from ins returning tableoid::regclass, a; -NOTICE: trigger trig_ins_before on parted_stmt_trig BEFORE INSERT for STATEMENT -NOTICE: trigger trig_ins_before_3 on parted2_stmt_trig BEFORE INSERT for STATEMENT -NOTICE: trigger trig_ins_before_child on parted_stmt_trig1 BEFORE INSERT for ROW -NOTICE: trigger trig_ins_after_child on parted_stmt_trig1 AFTER INSERT for ROW -NOTICE: trigger trig_ins_after_parent on parted_stmt_trig1 AFTER INSERT for ROW -NOTICE: trigger trig_ins_after_parent on parted_stmt_trig2 AFTER INSERT for ROW -NOTICE: trigger trig_ins_after_3 on parted2_stmt_trig AFTER INSERT for STATEMENT -NOTICE: trigger trig_ins_after on parted_stmt_trig AFTER INSERT for STATEMENT - tableoid | a --------------------+--- - parted_stmt_trig1 | 1 - parted_stmt_trig2 | 2 -(2 rows) - -with upd as ( - update parted2_stmt_trig set a = a -) update parted_stmt_trig set a = a; -NOTICE: trigger trig_upd_before on parted_stmt_trig BEFORE UPDATE for STATEMENT -NOTICE: trigger trig_upd_before_child on parted_stmt_trig1 BEFORE UPDATE for ROW -NOTICE: trigger trig_upd_before_3 on parted2_stmt_trig BEFORE UPDATE for STATEMENT -NOTICE: trigger trig_upd_after_child on parted_stmt_trig1 AFTER UPDATE for ROW -NOTICE: trigger trig_upd_after_parent on parted_stmt_trig1 AFTER UPDATE for ROW -NOTICE: trigger trig_upd_after_parent on parted_stmt_trig2 AFTER UPDATE for ROW -NOTICE: trigger trig_upd_after on parted_stmt_trig AFTER UPDATE for STATEMENT -NOTICE: trigger trig_upd_after_3 on parted2_stmt_trig AFTER UPDATE for STATEMENT -delete from parted_stmt_trig; -NOTICE: trigger trig_del_before on parted_stmt_trig BEFORE DELETE for STATEMENT -NOTICE: trigger trig_del_before_child on parted_stmt_trig1 BEFORE DELETE for ROW -NOTICE: trigger trig_del_after_parent on parted_stmt_trig2 AFTER DELETE for ROW -NOTICE: trigger trig_del_after on parted_stmt_trig AFTER DELETE for STATEMENT --- insert via copy on the parent -copy parted_stmt_trig(a) from stdin; -NOTICE: trigger trig_ins_before on parted_stmt_trig BEFORE INSERT for STATEMENT -NOTICE: trigger trig_ins_before_child on parted_stmt_trig1 BEFORE INSERT for ROW -NOTICE: trigger trig_ins_after_child on parted_stmt_trig1 AFTER INSERT for ROW -NOTICE: trigger trig_ins_after_parent on parted_stmt_trig1 AFTER INSERT for ROW -NOTICE: trigger trig_ins_after_parent on parted_stmt_trig2 AFTER INSERT for ROW -NOTICE: trigger trig_ins_after on parted_stmt_trig AFTER INSERT for STATEMENT --- insert via copy on the first partition -copy parted_stmt_trig1(a) from stdin; -NOTICE: trigger trig_ins_before_child on parted_stmt_trig1 BEFORE INSERT for ROW -NOTICE: trigger trig_ins_after_child on parted_stmt_trig1 AFTER INSERT for ROW -NOTICE: trigger trig_ins_after_parent on parted_stmt_trig1 AFTER INSERT for ROW --- Disabling a trigger in the parent table should disable children triggers too -alter table parted_stmt_trig disable trigger trig_ins_after_parent; -insert into parted_stmt_trig values (1); -NOTICE: trigger trig_ins_before on parted_stmt_trig BEFORE INSERT for STATEMENT -NOTICE: trigger trig_ins_before_child on parted_stmt_trig1 BEFORE INSERT for ROW -NOTICE: trigger trig_ins_after_child on parted_stmt_trig1 AFTER INSERT for ROW -NOTICE: trigger trig_ins_after on parted_stmt_trig AFTER INSERT for STATEMENT -alter table parted_stmt_trig enable trigger trig_ins_after_parent; -insert into parted_stmt_trig values (1); -NOTICE: trigger trig_ins_before on parted_stmt_trig BEFORE INSERT for STATEMENT -NOTICE: trigger trig_ins_before_child on parted_stmt_trig1 BEFORE INSERT for ROW -NOTICE: trigger trig_ins_after_child on parted_stmt_trig1 AFTER INSERT for ROW -NOTICE: trigger trig_ins_after_parent on parted_stmt_trig1 AFTER INSERT for ROW -NOTICE: trigger trig_ins_after on parted_stmt_trig AFTER INSERT for STATEMENT -drop table parted_stmt_trig, parted2_stmt_trig; --- Verify that triggers fire in alphabetical order -create table parted_trig (a int) partition by range (a); -create table parted_trig_1 partition of parted_trig for values from (0) to (1000) - partition by range (a); -create table parted_trig_1_1 partition of parted_trig_1 for values from (0) to (100); -create table parted_trig_2 partition of parted_trig for values from (1000) to (2000); -create trigger zzz after insert on parted_trig for each row execute procedure trigger_notice(); -create trigger mmm after insert on parted_trig_1_1 for each row execute procedure trigger_notice(); -create trigger aaa after insert on parted_trig_1 for each row execute procedure trigger_notice(); -create trigger bbb after insert on parted_trig for each row execute procedure trigger_notice(); -create trigger qqq after insert on parted_trig_1_1 for each row execute procedure trigger_notice(); -insert into parted_trig values (50), (1500); -NOTICE: trigger aaa on parted_trig_1_1 AFTER INSERT for ROW -NOTICE: trigger bbb on parted_trig_1_1 AFTER INSERT for ROW -NOTICE: trigger mmm on parted_trig_1_1 AFTER INSERT for ROW -NOTICE: trigger qqq on parted_trig_1_1 AFTER INSERT for ROW -NOTICE: trigger zzz on parted_trig_1_1 AFTER INSERT for ROW -NOTICE: trigger bbb on parted_trig_2 AFTER INSERT for ROW -NOTICE: trigger zzz on parted_trig_2 AFTER INSERT for ROW -drop table parted_trig; --- Verify propagation of trigger arguments to partitions -create table parted_trig (a int) partition by list (a); -create table parted_trig1 partition of parted_trig for values in (1); -create or replace function trigger_notice() returns trigger as $$ - declare - arg1 text = TG_ARGV[0]; - arg2 integer = TG_ARGV[1]; - begin - raise notice 'trigger % on % % % for % args % %', - TG_NAME, TG_TABLE_NAME, TG_WHEN, TG_OP, TG_LEVEL, arg1, arg2; - return null; - end; - $$ language plpgsql; -create trigger aaa after insert on parted_trig - for each row execute procedure trigger_notice('quirky', 1); --- Verify propagation of trigger arguments to partitions attached after creating trigger -create table parted_trig2 partition of parted_trig for values in (2); -create table parted_trig3 (like parted_trig); -alter table parted_trig attach partition parted_trig3 for values in (3); -insert into parted_trig values (1), (2), (3); -NOTICE: trigger aaa on parted_trig1 AFTER INSERT for ROW args quirky 1 -NOTICE: trigger aaa on parted_trig2 AFTER INSERT for ROW args quirky 1 -NOTICE: trigger aaa on parted_trig3 AFTER INSERT for ROW args quirky 1 -drop table parted_trig; --- test irregular partitions (i.e., different column definitions), --- including that the WHEN clause works -create function bark(text) returns bool language plpgsql immutable - as $$ begin raise notice '% <- woof!', $1; return true; end; $$; -create or replace function trigger_notice_ab() returns trigger as $$ - begin - raise notice 'trigger % on % % % for %: (a,b)=(%,%)', - TG_NAME, TG_TABLE_NAME, TG_WHEN, TG_OP, TG_LEVEL, - NEW.a, NEW.b; - if TG_LEVEL = 'ROW' then - return NEW; - end if; - return null; - end; - $$ language plpgsql; -create table parted_irreg_ancestor (fd text, b text, fd2 int, fd3 int, a int) - partition by range (b); -alter table parted_irreg_ancestor drop column fd, - drop column fd2, drop column fd3; -create table parted_irreg (fd int, a int, fd2 int, b text) - partition by range (b); -alter table parted_irreg drop column fd, drop column fd2; -alter table parted_irreg_ancestor attach partition parted_irreg - for values from ('aaaa') to ('zzzz'); -create table parted1_irreg (b text, fd int, a int); -alter table parted1_irreg drop column fd; -alter table parted_irreg attach partition parted1_irreg - for values from ('aaaa') to ('bbbb'); -create trigger parted_trig after insert on parted_irreg - for each row execute procedure trigger_notice_ab(); -create trigger parted_trig_odd after insert on parted_irreg for each row - when (bark(new.b) AND new.a % 2 = 1) execute procedure trigger_notice_ab(); --- we should hear barking for every insert, but parted_trig_odd only emits --- noise for odd values of a. parted_trig does it for all inserts. -insert into parted_irreg values (1, 'aardvark'), (2, 'aanimals'); -NOTICE: aardvark <- woof! -NOTICE: aanimals <- woof! -NOTICE: trigger parted_trig on parted1_irreg AFTER INSERT for ROW: (a,b)=(1,aardvark) -NOTICE: trigger parted_trig_odd on parted1_irreg AFTER INSERT for ROW: (a,b)=(1,aardvark) -NOTICE: trigger parted_trig on parted1_irreg AFTER INSERT for ROW: (a,b)=(2,aanimals) -insert into parted1_irreg values ('aardwolf', 2); -NOTICE: aardwolf <- woof! -NOTICE: trigger parted_trig on parted1_irreg AFTER INSERT for ROW: (a,b)=(2,aardwolf) -insert into parted_irreg_ancestor values ('aasvogel', 3); -NOTICE: aasvogel <- woof! -NOTICE: trigger parted_trig on parted1_irreg AFTER INSERT for ROW: (a,b)=(3,aasvogel) -NOTICE: trigger parted_trig_odd on parted1_irreg AFTER INSERT for ROW: (a,b)=(3,aasvogel) -drop table parted_irreg_ancestor; --- Before triggers and partitions -create table parted (a int, b int, c text) partition by list (a); -create table parted_1 partition of parted for values in (1) - partition by list (b); -create table parted_1_1 partition of parted_1 for values in (1); -create function parted_trigfunc() returns trigger language plpgsql as $$ -begin - new.a = new.a + 1; - return new; -end; -$$; -insert into parted values (1, 1, 'uno uno v1'); -- works -create trigger t before insert or update or delete on parted - for each row execute function parted_trigfunc(); -insert into parted values (1, 1, 'uno uno v2'); -- fail -ERROR: moving row to another partition during a BEFORE FOR EACH ROW trigger is not supported -DETAIL: Before executing trigger "t", the row was to be in partition "public.parted_1_1". -update parted set c = c || 'v3'; -- fail -ERROR: no partition of relation "parted" found for row -DETAIL: Partition key of the failing row contains (a) = (2). -create or replace function parted_trigfunc() returns trigger language plpgsql as $$ -begin - new.b = new.b + 1; - return new; -end; -$$; -insert into parted values (1, 1, 'uno uno v4'); -- fail -ERROR: moving row to another partition during a BEFORE FOR EACH ROW trigger is not supported -DETAIL: Before executing trigger "t", the row was to be in partition "public.parted_1_1". -update parted set c = c || 'v5'; -- fail -ERROR: no partition of relation "parted_1" found for row -DETAIL: Partition key of the failing row contains (b) = (2). -create or replace function parted_trigfunc() returns trigger language plpgsql as $$ -begin - new.c = new.c || ' did '|| TG_OP; - return new; -end; -$$; -insert into parted values (1, 1, 'uno uno'); -- works -update parted set c = c || ' v6'; -- works -select tableoid::regclass, * from parted; - tableoid | a | b | c -------------+---+---+---------------------------------- - parted_1_1 | 1 | 1 | uno uno v1 v6 did UPDATE - parted_1_1 | 1 | 1 | uno uno did INSERT v6 did UPDATE -(2 rows) - --- update itself moves tuple to new partition; trigger still works -truncate table parted; -create table parted_2 partition of parted for values in (2); -insert into parted values (1, 1, 'uno uno v5'); -update parted set a = 2; -select tableoid::regclass, * from parted; - tableoid | a | b | c -----------+---+---+--------------------------------------------- - parted_2 | 2 | 1 | uno uno v5 did INSERT did UPDATE did INSERT -(1 row) - --- both trigger and update change the partition -create or replace function parted_trigfunc2() returns trigger language plpgsql as $$ -begin - new.a = new.a + 1; - return new; -end; -$$; -create trigger t2 before update on parted - for each row execute function parted_trigfunc2(); -truncate table parted; -insert into parted values (1, 1, 'uno uno v6'); -create table parted_3 partition of parted for values in (3); -update parted set a = a + 1; -select tableoid::regclass, * from parted; - tableoid | a | b | c -----------+---+---+--------------------------------------------- - parted_3 | 3 | 1 | uno uno v6 did INSERT did UPDATE did INSERT -(1 row) - --- there's no partition for a=0, but this update works anyway because --- the trigger causes the tuple to be routed to another partition -update parted set a = 0; -select tableoid::regclass, * from parted; - tableoid | a | b | c -------------+---+---+------------------------------------------------------------------- - parted_1_1 | 1 | 1 | uno uno v6 did INSERT did UPDATE did INSERT did UPDATE did INSERT -(1 row) - -drop table parted; -create table parted (a int, b int, c text) partition by list ((a + b)); -create or replace function parted_trigfunc() returns trigger language plpgsql as $$ -begin - new.a = new.a + new.b; - return new; -end; -$$; -create table parted_1 partition of parted for values in (1, 2); -create table parted_2 partition of parted for values in (3, 4); -create trigger t before insert or update on parted - for each row execute function parted_trigfunc(); -insert into parted values (0, 1, 'zero win'); -insert into parted values (1, 1, 'one fail'); -ERROR: moving row to another partition during a BEFORE FOR EACH ROW trigger is not supported -DETAIL: Before executing trigger "t", the row was to be in partition "public.parted_1". -insert into parted values (1, 2, 'two fail'); -ERROR: moving row to another partition during a BEFORE FOR EACH ROW trigger is not supported -DETAIL: Before executing trigger "t", the row was to be in partition "public.parted_2". -select * from parted; - a | b | c ----+---+---------- - 1 | 1 | zero win -(1 row) - -drop table parted; -drop function parted_trigfunc(); --- --- Constraint triggers and partitioned tables -create table parted_constr_ancestor (a int, b text) - partition by range (b); -create table parted_constr (a int, b text) - partition by range (b); -alter table parted_constr_ancestor attach partition parted_constr - for values from ('aaaa') to ('zzzz'); -create table parted1_constr (a int, b text); -alter table parted_constr attach partition parted1_constr - for values from ('aaaa') to ('bbbb'); -create constraint trigger parted_trig after insert on parted_constr_ancestor - deferrable - for each row execute procedure trigger_notice_ab(); -create constraint trigger parted_trig_two after insert on parted_constr - deferrable initially deferred - for each row when (bark(new.b) AND new.a % 2 = 1) - execute procedure trigger_notice_ab(); --- The immediate constraint is fired immediately; the WHEN clause of the --- deferred constraint is also called immediately. The deferred constraint --- is fired at commit time. -begin; -insert into parted_constr values (1, 'aardvark'); -NOTICE: aardvark <- woof! -NOTICE: trigger parted_trig on parted1_constr AFTER INSERT for ROW: (a,b)=(1,aardvark) -insert into parted1_constr values (2, 'aardwolf'); -NOTICE: aardwolf <- woof! -NOTICE: trigger parted_trig on parted1_constr AFTER INSERT for ROW: (a,b)=(2,aardwolf) -insert into parted_constr_ancestor values (3, 'aasvogel'); -NOTICE: aasvogel <- woof! -NOTICE: trigger parted_trig on parted1_constr AFTER INSERT for ROW: (a,b)=(3,aasvogel) -commit; -NOTICE: trigger parted_trig_two on parted1_constr AFTER INSERT for ROW: (a,b)=(1,aardvark) -NOTICE: trigger parted_trig_two on parted1_constr AFTER INSERT for ROW: (a,b)=(3,aasvogel) --- The WHEN clause is immediate, and both constraint triggers are fired at --- commit time. -begin; -set constraints parted_trig deferred; -insert into parted_constr values (1, 'aardvark'); -NOTICE: aardvark <- woof! -insert into parted1_constr values (2, 'aardwolf'), (3, 'aasvogel'); -NOTICE: aardwolf <- woof! -NOTICE: aasvogel <- woof! -commit; -NOTICE: trigger parted_trig on parted1_constr AFTER INSERT for ROW: (a,b)=(1,aardvark) -NOTICE: trigger parted_trig_two on parted1_constr AFTER INSERT for ROW: (a,b)=(1,aardvark) -NOTICE: trigger parted_trig on parted1_constr AFTER INSERT for ROW: (a,b)=(2,aardwolf) -NOTICE: trigger parted_trig on parted1_constr AFTER INSERT for ROW: (a,b)=(3,aasvogel) -NOTICE: trigger parted_trig_two on parted1_constr AFTER INSERT for ROW: (a,b)=(3,aasvogel) -drop table parted_constr_ancestor; -drop function bark(text); --- Test that the WHEN clause is set properly to partitions -create table parted_trigger (a int, b text) partition by range (a); -create table parted_trigger_1 partition of parted_trigger for values from (0) to (1000); -create table parted_trigger_2 (drp int, a int, b text); -alter table parted_trigger_2 drop column drp; -alter table parted_trigger attach partition parted_trigger_2 for values from (1000) to (2000); -create trigger parted_trigger after update on parted_trigger - for each row when (new.a % 2 = 1 and length(old.b) >= 2) execute procedure trigger_notice_ab(); -create table parted_trigger_3 (b text, a int) partition by range (length(b)); -create table parted_trigger_3_1 partition of parted_trigger_3 for values from (1) to (3); -create table parted_trigger_3_2 partition of parted_trigger_3 for values from (3) to (5); -alter table parted_trigger attach partition parted_trigger_3 for values from (2000) to (3000); -insert into parted_trigger values - (0, 'a'), (1, 'bbb'), (2, 'bcd'), (3, 'c'), - (1000, 'c'), (1001, 'ddd'), (1002, 'efg'), (1003, 'f'), - (2000, 'e'), (2001, 'fff'), (2002, 'ghi'), (2003, 'h'); -update parted_trigger set a = a + 2; -- notice for odd 'a' values, long 'b' values -NOTICE: trigger parted_trigger on parted_trigger_1 AFTER UPDATE for ROW: (a,b)=(3,bbb) -NOTICE: trigger parted_trigger on parted_trigger_2 AFTER UPDATE for ROW: (a,b)=(1003,ddd) -NOTICE: trigger parted_trigger on parted_trigger_3_2 AFTER UPDATE for ROW: (a,b)=(2003,fff) -drop table parted_trigger; --- try a constraint trigger, also -create table parted_referenced (a int); -create table unparted_trigger (a int, b text); -- for comparison purposes -create table parted_trigger (a int, b text) partition by range (a); -create table parted_trigger_1 partition of parted_trigger for values from (0) to (1000); -create table parted_trigger_2 (drp int, a int, b text); -alter table parted_trigger_2 drop column drp; -alter table parted_trigger attach partition parted_trigger_2 for values from (1000) to (2000); -create constraint trigger parted_trigger after update on parted_trigger - from parted_referenced - for each row execute procedure trigger_notice_ab(); -create constraint trigger parted_trigger after update on unparted_trigger - from parted_referenced - for each row execute procedure trigger_notice_ab(); -create table parted_trigger_3 (b text, a int) partition by range (length(b)); -create table parted_trigger_3_1 partition of parted_trigger_3 for values from (1) to (3); -create table parted_trigger_3_2 partition of parted_trigger_3 for values from (3) to (5); -alter table parted_trigger attach partition parted_trigger_3 for values from (2000) to (3000); -select tgname, conname, t.tgrelid::regclass, t.tgconstrrelid::regclass, - c.conrelid::regclass, c.confrelid::regclass - from pg_trigger t join pg_constraint c on (t.tgconstraint = c.oid) - where tgname = 'parted_trigger' - order by t.tgrelid::regclass::text; - tgname | conname | tgrelid | tgconstrrelid | conrelid | confrelid -----------------+----------------+--------------------+-------------------+--------------------+----------- - parted_trigger | parted_trigger | parted_trigger | parted_referenced | parted_trigger | - - parted_trigger | parted_trigger | parted_trigger_1 | parted_referenced | parted_trigger_1 | - - parted_trigger | parted_trigger | parted_trigger_2 | parted_referenced | parted_trigger_2 | - - parted_trigger | parted_trigger | parted_trigger_3 | parted_referenced | parted_trigger_3 | - - parted_trigger | parted_trigger | parted_trigger_3_1 | parted_referenced | parted_trigger_3_1 | - - parted_trigger | parted_trigger | parted_trigger_3_2 | parted_referenced | parted_trigger_3_2 | - - parted_trigger | parted_trigger | unparted_trigger | parted_referenced | unparted_trigger | - -(7 rows) - -drop table parted_referenced, parted_trigger, unparted_trigger; --- verify that the "AFTER UPDATE OF columns" event is propagated correctly -create table parted_trigger (a int, b text) partition by range (a); -create table parted_trigger_1 partition of parted_trigger for values from (0) to (1000); -create table parted_trigger_2 (drp int, a int, b text); -alter table parted_trigger_2 drop column drp; -alter table parted_trigger attach partition parted_trigger_2 for values from (1000) to (2000); -create trigger parted_trigger after update of b on parted_trigger - for each row execute procedure trigger_notice_ab(); -create table parted_trigger_3 (b text, a int) partition by range (length(b)); -create table parted_trigger_3_1 partition of parted_trigger_3 for values from (1) to (4); -create table parted_trigger_3_2 partition of parted_trigger_3 for values from (4) to (8); -alter table parted_trigger attach partition parted_trigger_3 for values from (2000) to (3000); -insert into parted_trigger values (0, 'a'), (1000, 'c'), (2000, 'e'), (2001, 'eeee'); -update parted_trigger set a = a + 2; -- no notices here -update parted_trigger set b = b || 'b'; -- all triggers should fire -NOTICE: trigger parted_trigger on parted_trigger_1 AFTER UPDATE for ROW: (a,b)=(2,ab) -NOTICE: trigger parted_trigger on parted_trigger_2 AFTER UPDATE for ROW: (a,b)=(1002,cb) -NOTICE: trigger parted_trigger on parted_trigger_3_1 AFTER UPDATE for ROW: (a,b)=(2002,eb) -NOTICE: trigger parted_trigger on parted_trigger_3_2 AFTER UPDATE for ROW: (a,b)=(2003,eeeeb) -drop table parted_trigger; -drop function trigger_notice_ab(); --- Make sure we don't end up with unnecessary copies of triggers, when --- cloning them. -create table trg_clone (a int) partition by range (a); -create table trg_clone1 partition of trg_clone for values from (0) to (1000); -alter table trg_clone add constraint uniq unique (a) deferrable; -create table trg_clone2 partition of trg_clone for values from (1000) to (2000); -create table trg_clone3 partition of trg_clone for values from (2000) to (3000) - partition by range (a); -create table trg_clone_3_3 partition of trg_clone3 for values from (2000) to (2100); -select tgrelid::regclass, count(*) from pg_trigger - where tgrelid::regclass in ('trg_clone', 'trg_clone1', 'trg_clone2', - 'trg_clone3', 'trg_clone_3_3') - group by tgrelid::regclass order by tgrelid::regclass; - tgrelid | count ----------------+------- - trg_clone | 1 - trg_clone1 | 1 - trg_clone2 | 1 - trg_clone3 | 1 - trg_clone_3_3 | 1 -(5 rows) - -drop table trg_clone; --- Test the interaction between ALTER TABLE .. DISABLE TRIGGER and --- both kinds of inheritance. Historically, legacy inheritance has --- not recursed to children, so that behavior is preserved. -create table parent (a int); -create table child1 () inherits (parent); -create function trig_nothing() returns trigger language plpgsql - as $$ begin return null; end $$; -create trigger tg after insert on parent - for each row execute function trig_nothing(); -create trigger tg after insert on child1 - for each row execute function trig_nothing(); -alter table parent disable trigger tg; -select tgrelid::regclass, tgname, tgenabled from pg_trigger - where tgrelid in ('parent'::regclass, 'child1'::regclass) - order by tgrelid::regclass::text; - tgrelid | tgname | tgenabled ----------+--------+----------- - child1 | tg | O - parent | tg | D -(2 rows) - -alter table only parent enable always trigger tg; -select tgrelid::regclass, tgname, tgenabled from pg_trigger - where tgrelid in ('parent'::regclass, 'child1'::regclass) - order by tgrelid::regclass::text; - tgrelid | tgname | tgenabled ----------+--------+----------- - child1 | tg | O - parent | tg | A -(2 rows) - -drop table parent, child1; -create table parent (a int) partition by list (a); -create table child1 partition of parent for values in (1); -create trigger tg after insert on parent - for each row execute procedure trig_nothing(); -select tgrelid::regclass, tgname, tgenabled from pg_trigger - where tgrelid in ('parent'::regclass, 'child1'::regclass) - order by tgrelid::regclass::text; - tgrelid | tgname | tgenabled ----------+--------+----------- - child1 | tg | O - parent | tg | O -(2 rows) - -alter table only parent enable always trigger tg; -select tgrelid::regclass, tgname, tgenabled from pg_trigger - where tgrelid in ('parent'::regclass, 'child1'::regclass) - order by tgrelid::regclass::text; - tgrelid | tgname | tgenabled ----------+--------+----------- - child1 | tg | O - parent | tg | A -(2 rows) - -drop table parent, child1; --- Verify that firing state propagates correctly on creation, too -CREATE TABLE trgfire (i int) PARTITION BY RANGE (i); -CREATE TABLE trgfire1 PARTITION OF trgfire FOR VALUES FROM (1) TO (10); -CREATE OR REPLACE FUNCTION tgf() RETURNS trigger LANGUAGE plpgsql - AS $$ begin raise exception 'except'; end $$; -CREATE TRIGGER tg AFTER INSERT ON trgfire FOR EACH ROW EXECUTE FUNCTION tgf(); -INSERT INTO trgfire VALUES (1); -ERROR: except -CONTEXT: PL/pgSQL function tgf() line 1 at RAISE -ALTER TABLE trgfire DISABLE TRIGGER tg; -INSERT INTO trgfire VALUES (1); -CREATE TABLE trgfire2 PARTITION OF trgfire FOR VALUES FROM (10) TO (20); -INSERT INTO trgfire VALUES (11); -CREATE TABLE trgfire3 (LIKE trgfire); -ALTER TABLE trgfire ATTACH PARTITION trgfire3 FOR VALUES FROM (20) TO (30); -INSERT INTO trgfire VALUES (21); -CREATE TABLE trgfire4 PARTITION OF trgfire FOR VALUES FROM (30) TO (40) PARTITION BY LIST (i); -CREATE TABLE trgfire4_30 PARTITION OF trgfire4 FOR VALUES IN (30); -INSERT INTO trgfire VALUES (30); -CREATE TABLE trgfire5 (LIKE trgfire) PARTITION BY LIST (i); -CREATE TABLE trgfire5_40 PARTITION OF trgfire5 FOR VALUES IN (40); -ALTER TABLE trgfire ATTACH PARTITION trgfire5 FOR VALUES FROM (40) TO (50); -INSERT INTO trgfire VALUES (40); -SELECT tgrelid::regclass, tgenabled FROM pg_trigger - WHERE tgrelid::regclass IN (SELECT oid from pg_class where relname LIKE 'trgfire%') - ORDER BY tgrelid::regclass::text; - tgrelid | tgenabled --------------+----------- - trgfire | D - trgfire1 | D - trgfire2 | D - trgfire3 | D - trgfire4 | D - trgfire4_30 | D - trgfire5 | D - trgfire5_40 | D -(8 rows) - -ALTER TABLE trgfire ENABLE TRIGGER tg; -INSERT INTO trgfire VALUES (1); -ERROR: except -CONTEXT: PL/pgSQL function tgf() line 1 at RAISE -INSERT INTO trgfire VALUES (11); -ERROR: except -CONTEXT: PL/pgSQL function tgf() line 1 at RAISE -INSERT INTO trgfire VALUES (21); -ERROR: except -CONTEXT: PL/pgSQL function tgf() line 1 at RAISE -INSERT INTO trgfire VALUES (30); -ERROR: except -CONTEXT: PL/pgSQL function tgf() line 1 at RAISE -INSERT INTO trgfire VALUES (40); -ERROR: except -CONTEXT: PL/pgSQL function tgf() line 1 at RAISE -DROP TABLE trgfire; -DROP FUNCTION tgf(); --- --- Test the interaction between transition tables and both kinds of --- inheritance. We'll dump the contents of the transition tables in a --- format that shows the attribute order, so that we can distinguish --- tuple formats (though not dropped attributes). --- -create or replace function dump_insert() returns trigger language plpgsql as -$$ - begin - raise notice 'trigger = %, new table = %', - TG_NAME, - (select string_agg(new_table::text, ', ' order by a) from new_table); - return null; - end; -$$; -create or replace function dump_update() returns trigger language plpgsql as -$$ - begin - raise notice 'trigger = %, old table = %, new table = %', - TG_NAME, - (select string_agg(old_table::text, ', ' order by a) from old_table), - (select string_agg(new_table::text, ', ' order by a) from new_table); - return null; - end; -$$; -create or replace function dump_delete() returns trigger language plpgsql as -$$ - begin - raise notice 'trigger = %, old table = %', - TG_NAME, - (select string_agg(old_table::text, ', ' order by a) from old_table); - return null; - end; -$$; --- --- Verify behavior of statement triggers on partition hierarchy with --- transition tables. Tuples should appear to each trigger in the --- format of the relation the trigger is attached to. --- --- set up a partition hierarchy with some different TupleDescriptors -create table parent (a text, b int) partition by list (a); --- a child matching parent -create table child1 partition of parent for values in ('AAA'); --- a child with a dropped column -create table child2 (x int, a text, b int); -alter table child2 drop column x; -alter table parent attach partition child2 for values in ('BBB'); --- a child with a different column order -create table child3 (b int, a text); -alter table parent attach partition child3 for values in ('CCC'); -create trigger parent_insert_trig - after insert on parent referencing new table as new_table - for each statement execute procedure dump_insert(); -create trigger parent_update_trig - after update on parent referencing old table as old_table new table as new_table - for each statement execute procedure dump_update(); -create trigger parent_delete_trig - after delete on parent referencing old table as old_table - for each statement execute procedure dump_delete(); -create trigger child1_insert_trig - after insert on child1 referencing new table as new_table - for each statement execute procedure dump_insert(); -create trigger child1_update_trig - after update on child1 referencing old table as old_table new table as new_table - for each statement execute procedure dump_update(); -create trigger child1_delete_trig - after delete on child1 referencing old table as old_table - for each statement execute procedure dump_delete(); -create trigger child2_insert_trig - after insert on child2 referencing new table as new_table - for each statement execute procedure dump_insert(); -create trigger child2_update_trig - after update on child2 referencing old table as old_table new table as new_table - for each statement execute procedure dump_update(); -create trigger child2_delete_trig - after delete on child2 referencing old table as old_table - for each statement execute procedure dump_delete(); -create trigger child3_insert_trig - after insert on child3 referencing new table as new_table - for each statement execute procedure dump_insert(); -create trigger child3_update_trig - after update on child3 referencing old table as old_table new table as new_table - for each statement execute procedure dump_update(); -create trigger child3_delete_trig - after delete on child3 referencing old table as old_table - for each statement execute procedure dump_delete(); -SELECT trigger_name, event_manipulation, event_object_schema, event_object_table, - action_order, action_condition, action_orientation, action_timing, - action_reference_old_table, action_reference_new_table - FROM information_schema.triggers - WHERE event_object_table IN ('parent', 'child1', 'child2', 'child3') - ORDER BY trigger_name COLLATE "C", 2; - trigger_name | event_manipulation | event_object_schema | event_object_table | action_order | action_condition | action_orientation | action_timing | action_reference_old_table | action_reference_new_table ---------------------+--------------------+---------------------+--------------------+--------------+------------------+--------------------+---------------+----------------------------+---------------------------- - child1_delete_trig | DELETE | public | child1 | 1 | | STATEMENT | AFTER | old_table | - child1_insert_trig | INSERT | public | child1 | 1 | | STATEMENT | AFTER | | new_table - child1_update_trig | UPDATE | public | child1 | 1 | | STATEMENT | AFTER | old_table | new_table - child2_delete_trig | DELETE | public | child2 | 1 | | STATEMENT | AFTER | old_table | - child2_insert_trig | INSERT | public | child2 | 1 | | STATEMENT | AFTER | | new_table - child2_update_trig | UPDATE | public | child2 | 1 | | STATEMENT | AFTER | old_table | new_table - child3_delete_trig | DELETE | public | child3 | 1 | | STATEMENT | AFTER | old_table | - child3_insert_trig | INSERT | public | child3 | 1 | | STATEMENT | AFTER | | new_table - child3_update_trig | UPDATE | public | child3 | 1 | | STATEMENT | AFTER | old_table | new_table - parent_delete_trig | DELETE | public | parent | 1 | | STATEMENT | AFTER | old_table | - parent_insert_trig | INSERT | public | parent | 1 | | STATEMENT | AFTER | | new_table - parent_update_trig | UPDATE | public | parent | 1 | | STATEMENT | AFTER | old_table | new_table -(12 rows) - --- insert directly into children sees respective child-format tuples -insert into child1 values ('AAA', 42); -NOTICE: trigger = child1_insert_trig, new table = (AAA,42) -insert into child2 values ('BBB', 42); -NOTICE: trigger = child2_insert_trig, new table = (BBB,42) -insert into child3 values (42, 'CCC'); -NOTICE: trigger = child3_insert_trig, new table = (42,CCC) --- update via parent sees parent-format tuples -update parent set b = b + 1; -NOTICE: trigger = parent_update_trig, old table = (AAA,42), (BBB,42), (CCC,42), new table = (AAA,43), (BBB,43), (CCC,43) --- delete via parent sees parent-format tuples -delete from parent; -NOTICE: trigger = parent_delete_trig, old table = (AAA,43), (BBB,43), (CCC,43) --- insert into parent sees parent-format tuples -insert into parent values ('AAA', 42); -NOTICE: trigger = parent_insert_trig, new table = (AAA,42) -insert into parent values ('BBB', 42); -NOTICE: trigger = parent_insert_trig, new table = (BBB,42) -insert into parent values ('CCC', 42); -NOTICE: trigger = parent_insert_trig, new table = (CCC,42) --- delete from children sees respective child-format tuples -delete from child1; -NOTICE: trigger = child1_delete_trig, old table = (AAA,42) -delete from child2; -NOTICE: trigger = child2_delete_trig, old table = (BBB,42) -delete from child3; -NOTICE: trigger = child3_delete_trig, old table = (42,CCC) --- copy into parent sees parent-format tuples -copy parent (a, b) from stdin; -NOTICE: trigger = parent_insert_trig, new table = (AAA,42), (BBB,42), (CCC,42) --- DML affecting parent sees tuples collected from children even if --- there is no transition table trigger on the children -drop trigger child1_insert_trig on child1; -drop trigger child1_update_trig on child1; -drop trigger child1_delete_trig on child1; -drop trigger child2_insert_trig on child2; -drop trigger child2_update_trig on child2; -drop trigger child2_delete_trig on child2; -drop trigger child3_insert_trig on child3; -drop trigger child3_update_trig on child3; -drop trigger child3_delete_trig on child3; -delete from parent; -NOTICE: trigger = parent_delete_trig, old table = (AAA,42), (BBB,42), (CCC,42) --- copy into parent sees tuples collected from children even if there --- is no transition-table trigger on the children -copy parent (a, b) from stdin; -NOTICE: trigger = parent_insert_trig, new table = (AAA,42), (BBB,42), (CCC,42) --- insert into parent with a before trigger on a child tuple before --- insertion, and we capture the newly modified row in parent format -create or replace function intercept_insert() returns trigger language plpgsql as -$$ - begin - new.b = new.b + 1000; - return new; - end; -$$; -create trigger intercept_insert_child3 - before insert on child3 - for each row execute procedure intercept_insert(); --- insert, parent trigger sees post-modification parent-format tuple -insert into parent values ('AAA', 42), ('BBB', 42), ('CCC', 66); -NOTICE: trigger = parent_insert_trig, new table = (AAA,42), (BBB,42), (CCC,1066) --- copy, parent trigger sees post-modification parent-format tuple -copy parent (a, b) from stdin; -NOTICE: trigger = parent_insert_trig, new table = (AAA,42), (BBB,42), (CCC,1234) -drop table child1, child2, child3, parent; -drop function intercept_insert(); --- --- Verify prohibition of row triggers with transition triggers on --- partitions --- -create table parent (a text, b int) partition by list (a); -create table child partition of parent for values in ('AAA'); --- adding row trigger with transition table fails -create trigger child_row_trig - after insert on child referencing new table as new_table - for each row execute procedure dump_insert(); -ERROR: ROW triggers with transition tables are not supported on partitions --- detaching it first works -alter table parent detach partition child; -create trigger child_row_trig - after insert on child referencing new table as new_table - for each row execute procedure dump_insert(); --- but now we're not allowed to reattach it -alter table parent attach partition child for values in ('AAA'); -ERROR: trigger "child_row_trig" prevents table "child" from becoming a partition -DETAIL: ROW triggers with transition tables are not supported on partitions --- drop the trigger, and now we're allowed to attach it again -drop trigger child_row_trig on child; -alter table parent attach partition child for values in ('AAA'); -drop table child, parent; --- --- Verify behavior of statement triggers on (non-partition) --- inheritance hierarchy with transition tables; similar to the --- partition case, except there is no rerouting on insertion and child --- tables can have extra columns --- --- set up inheritance hierarchy with different TupleDescriptors -create table parent (a text, b int); --- a child matching parent -create table child1 () inherits (parent); --- a child with a different column order -create table child2 (b int, a text); -alter table child2 inherit parent; --- a child with an extra column -create table child3 (c text) inherits (parent); -create trigger parent_insert_trig - after insert on parent referencing new table as new_table - for each statement execute procedure dump_insert(); -create trigger parent_update_trig - after update on parent referencing old table as old_table new table as new_table - for each statement execute procedure dump_update(); -create trigger parent_delete_trig - after delete on parent referencing old table as old_table - for each statement execute procedure dump_delete(); -create trigger child1_insert_trig - after insert on child1 referencing new table as new_table - for each statement execute procedure dump_insert(); -create trigger child1_update_trig - after update on child1 referencing old table as old_table new table as new_table - for each statement execute procedure dump_update(); -create trigger child1_delete_trig - after delete on child1 referencing old table as old_table - for each statement execute procedure dump_delete(); -create trigger child2_insert_trig - after insert on child2 referencing new table as new_table - for each statement execute procedure dump_insert(); -create trigger child2_update_trig - after update on child2 referencing old table as old_table new table as new_table - for each statement execute procedure dump_update(); -create trigger child2_delete_trig - after delete on child2 referencing old table as old_table - for each statement execute procedure dump_delete(); -create trigger child3_insert_trig - after insert on child3 referencing new table as new_table - for each statement execute procedure dump_insert(); -create trigger child3_update_trig - after update on child3 referencing old table as old_table new table as new_table - for each statement execute procedure dump_update(); -create trigger child3_delete_trig - after delete on child3 referencing old table as old_table - for each statement execute procedure dump_delete(); --- insert directly into children sees respective child-format tuples -insert into child1 values ('AAA', 42); -NOTICE: trigger = child1_insert_trig, new table = (AAA,42) -insert into child2 values (42, 'BBB'); -NOTICE: trigger = child2_insert_trig, new table = (42,BBB) -insert into child3 values ('CCC', 42, 'foo'); -NOTICE: trigger = child3_insert_trig, new table = (CCC,42,foo) --- update via parent sees parent-format tuples -update parent set b = b + 1; -NOTICE: trigger = parent_update_trig, old table = (AAA,42), (BBB,42), (CCC,42), new table = (AAA,43), (BBB,43), (CCC,43) --- delete via parent sees parent-format tuples -delete from parent; -NOTICE: trigger = parent_delete_trig, old table = (AAA,43), (BBB,43), (CCC,43) --- reinsert values into children for next test... -insert into child1 values ('AAA', 42); -NOTICE: trigger = child1_insert_trig, new table = (AAA,42) -insert into child2 values (42, 'BBB'); -NOTICE: trigger = child2_insert_trig, new table = (42,BBB) -insert into child3 values ('CCC', 42, 'foo'); -NOTICE: trigger = child3_insert_trig, new table = (CCC,42,foo) --- delete from children sees respective child-format tuples -delete from child1; -NOTICE: trigger = child1_delete_trig, old table = (AAA,42) -delete from child2; -NOTICE: trigger = child2_delete_trig, old table = (42,BBB) -delete from child3; -NOTICE: trigger = child3_delete_trig, old table = (CCC,42,foo) --- copy into parent sees parent-format tuples (no rerouting, so these --- are really inserted into the parent) -copy parent (a, b) from stdin; -NOTICE: trigger = parent_insert_trig, new table = (AAA,42), (BBB,42), (CCC,42) --- same behavior for copy if there is an index (interesting because rows are --- captured by a different code path in copyfrom.c if there are indexes) -create index on parent(b); -copy parent (a, b) from stdin; -NOTICE: trigger = parent_insert_trig, new table = (DDD,42) --- DML affecting parent sees tuples collected from children even if --- there is no transition table trigger on the children -drop trigger child1_insert_trig on child1; -drop trigger child1_update_trig on child1; -drop trigger child1_delete_trig on child1; -drop trigger child2_insert_trig on child2; -drop trigger child2_update_trig on child2; -drop trigger child2_delete_trig on child2; -drop trigger child3_insert_trig on child3; -drop trigger child3_update_trig on child3; -drop trigger child3_delete_trig on child3; -delete from parent; -NOTICE: trigger = parent_delete_trig, old table = (AAA,42), (BBB,42), (CCC,42), (DDD,42) -drop table child1, child2, child3, parent; --- --- Verify prohibition of row triggers with transition triggers on --- inheritance children --- -create table parent (a text, b int); -create table child () inherits (parent); --- adding row trigger with transition table fails -create trigger child_row_trig - after insert on child referencing new table as new_table - for each row execute procedure dump_insert(); -ERROR: ROW triggers with transition tables are not supported on inheritance children --- disinheriting it first works -alter table child no inherit parent; -create trigger child_row_trig - after insert on child referencing new table as new_table - for each row execute procedure dump_insert(); --- but now we're not allowed to make it inherit anymore -alter table child inherit parent; -ERROR: trigger "child_row_trig" prevents table "child" from becoming an inheritance child -DETAIL: ROW triggers with transition tables are not supported in inheritance hierarchies. --- drop the trigger, and now we're allowed to make it inherit again -drop trigger child_row_trig on child; -alter table child inherit parent; -drop table child, parent; --- --- Verify behavior of queries with wCTEs, where multiple transition --- tuplestores can be active at the same time because there are --- multiple DML statements that might fire triggers with transition --- tables --- -create table table1 (a int); -create table table2 (a text); -create trigger table1_trig - after insert on table1 referencing new table as new_table - for each statement execute procedure dump_insert(); -create trigger table2_trig - after insert on table2 referencing new table as new_table - for each statement execute procedure dump_insert(); -with wcte as (insert into table1 values (42)) - insert into table2 values ('hello world'); -NOTICE: trigger = table2_trig, new table = ("hello world") -NOTICE: trigger = table1_trig, new table = (42) -with wcte as (insert into table1 values (43)) - insert into table1 values (44); -NOTICE: trigger = table1_trig, new table = (43), (44) -select * from table1; - a ----- - 42 - 44 - 43 -(3 rows) - -select * from table2; - a -------------- - hello world -(1 row) - -drop table table1; -drop table table2; --- --- Verify behavior of INSERT ... ON CONFLICT DO UPDATE ... with --- transition tables. --- -create table my_table (a int primary key, b text); -create trigger my_table_insert_trig - after insert on my_table referencing new table as new_table - for each statement execute procedure dump_insert(); -create trigger my_table_update_trig - after update on my_table referencing old table as old_table new table as new_table - for each statement execute procedure dump_update(); --- inserts only -insert into my_table values (1, 'AAA'), (2, 'BBB') - on conflict (a) do - update set b = my_table.b || ':' || excluded.b; -NOTICE: trigger = my_table_update_trig, old table = , new table = -NOTICE: trigger = my_table_insert_trig, new table = (1,AAA), (2,BBB) --- mixture of inserts and updates -insert into my_table values (1, 'AAA'), (2, 'BBB'), (3, 'CCC'), (4, 'DDD') - on conflict (a) do - update set b = my_table.b || ':' || excluded.b; -NOTICE: trigger = my_table_update_trig, old table = (1,AAA), (2,BBB), new table = (1,AAA:AAA), (2,BBB:BBB) -NOTICE: trigger = my_table_insert_trig, new table = (3,CCC), (4,DDD) --- updates only -insert into my_table values (3, 'CCC'), (4, 'DDD') - on conflict (a) do - update set b = my_table.b || ':' || excluded.b; -NOTICE: trigger = my_table_update_trig, old table = (3,CCC), (4,DDD), new table = (3,CCC:CCC), (4,DDD:DDD) -NOTICE: trigger = my_table_insert_trig, new table = --- --- now using a partitioned table --- -create table iocdu_tt_parted (a int primary key, b text) partition by list (a); -create table iocdu_tt_parted1 partition of iocdu_tt_parted for values in (1); -create table iocdu_tt_parted2 partition of iocdu_tt_parted for values in (2); -create table iocdu_tt_parted3 partition of iocdu_tt_parted for values in (3); -create table iocdu_tt_parted4 partition of iocdu_tt_parted for values in (4); -create trigger iocdu_tt_parted_insert_trig - after insert on iocdu_tt_parted referencing new table as new_table - for each statement execute procedure dump_insert(); -create trigger iocdu_tt_parted_update_trig - after update on iocdu_tt_parted referencing old table as old_table new table as new_table - for each statement execute procedure dump_update(); --- inserts only -insert into iocdu_tt_parted values (1, 'AAA'), (2, 'BBB') - on conflict (a) do - update set b = iocdu_tt_parted.b || ':' || excluded.b; -NOTICE: trigger = iocdu_tt_parted_update_trig, old table = , new table = -NOTICE: trigger = iocdu_tt_parted_insert_trig, new table = (1,AAA), (2,BBB) --- mixture of inserts and updates -insert into iocdu_tt_parted values (1, 'AAA'), (2, 'BBB'), (3, 'CCC'), (4, 'DDD') - on conflict (a) do - update set b = iocdu_tt_parted.b || ':' || excluded.b; -NOTICE: trigger = iocdu_tt_parted_update_trig, old table = (1,AAA), (2,BBB), new table = (1,AAA:AAA), (2,BBB:BBB) -NOTICE: trigger = iocdu_tt_parted_insert_trig, new table = (3,CCC), (4,DDD) --- updates only -insert into iocdu_tt_parted values (3, 'CCC'), (4, 'DDD') - on conflict (a) do - update set b = iocdu_tt_parted.b || ':' || excluded.b; -NOTICE: trigger = iocdu_tt_parted_update_trig, old table = (3,CCC), (4,DDD), new table = (3,CCC:CCC), (4,DDD:DDD) -NOTICE: trigger = iocdu_tt_parted_insert_trig, new table = -drop table iocdu_tt_parted; --- --- Verify that you can't create a trigger with transition tables for --- more than one event. --- -create trigger my_table_multievent_trig - after insert or update on my_table referencing new table as new_table - for each statement execute procedure dump_insert(); -ERROR: transition tables cannot be specified for triggers with more than one event --- --- Verify that you can't create a trigger with transition tables with --- a column list. --- -create trigger my_table_col_update_trig - after update of b on my_table referencing new table as new_table - for each statement execute procedure dump_insert(); -ERROR: transition tables cannot be specified for triggers with column lists -drop table my_table; --- --- Test firing of triggers with transition tables by foreign key cascades --- -create table refd_table (a int primary key, b text); -create table trig_table (a int, b text, - foreign key (a) references refd_table on update cascade on delete cascade -); -create trigger trig_table_before_trig - before insert or update or delete on trig_table - for each statement execute procedure trigger_func('trig_table'); -create trigger trig_table_insert_trig - after insert on trig_table referencing new table as new_table - for each statement execute procedure dump_insert(); -create trigger trig_table_update_trig - after update on trig_table referencing old table as old_table new table as new_table - for each statement execute procedure dump_update(); -create trigger trig_table_delete_trig - after delete on trig_table referencing old table as old_table - for each statement execute procedure dump_delete(); -insert into refd_table values - (1, 'one'), - (2, 'two'), - (3, 'three'); -insert into trig_table values - (1, 'one a'), - (1, 'one b'), - (2, 'two a'), - (2, 'two b'), - (3, 'three a'), - (3, 'three b'); -NOTICE: trigger_func(trig_table) called: action = INSERT, when = BEFORE, level = STATEMENT -NOTICE: trigger = trig_table_insert_trig, new table = (1,"one a"), (1,"one b"), (2,"two a"), (2,"two b"), (3,"three a"), (3,"three b") -update refd_table set a = 11 where b = 'one'; -NOTICE: trigger_func(trig_table) called: action = UPDATE, when = BEFORE, level = STATEMENT -NOTICE: trigger = trig_table_update_trig, old table = (1,"one a"), (1,"one b"), new table = (11,"one a"), (11,"one b") -select * from trig_table; - a | b -----+--------- - 2 | two a - 2 | two b - 3 | three a - 3 | three b - 11 | one a - 11 | one b -(6 rows) - -delete from refd_table where length(b) = 3; -NOTICE: trigger_func(trig_table) called: action = DELETE, when = BEFORE, level = STATEMENT -NOTICE: trigger = trig_table_delete_trig, old table = (2,"two a"), (2,"two b"), (11,"one a"), (11,"one b") -select * from trig_table; - a | b ----+--------- - 3 | three a - 3 | three b -(2 rows) - -drop table refd_table, trig_table; --- --- self-referential FKs are even more fun --- -create table self_ref (a int primary key, - b int references self_ref(a) on delete cascade); -create trigger self_ref_before_trig - before delete on self_ref - for each statement execute procedure trigger_func('self_ref'); -create trigger self_ref_r_trig - after delete on self_ref referencing old table as old_table - for each row execute procedure dump_delete(); -create trigger self_ref_s_trig - after delete on self_ref referencing old table as old_table - for each statement execute procedure dump_delete(); -insert into self_ref values (1, null), (2, 1), (3, 2); -delete from self_ref where a = 1; -NOTICE: trigger_func(self_ref) called: action = DELETE, when = BEFORE, level = STATEMENT -NOTICE: trigger = self_ref_r_trig, old table = (1,), (2,1) -NOTICE: trigger_func(self_ref) called: action = DELETE, when = BEFORE, level = STATEMENT -NOTICE: trigger = self_ref_r_trig, old table = (1,), (2,1) -NOTICE: trigger = self_ref_s_trig, old table = (1,), (2,1) -NOTICE: trigger = self_ref_r_trig, old table = (3,2) -NOTICE: trigger = self_ref_s_trig, old table = (3,2) --- without AR trigger, cascaded deletes all end up in one transition table -drop trigger self_ref_r_trig on self_ref; -insert into self_ref values (1, null), (2, 1), (3, 2), (4, 3); -delete from self_ref where a = 1; -NOTICE: trigger_func(self_ref) called: action = DELETE, when = BEFORE, level = STATEMENT -NOTICE: trigger = self_ref_s_trig, old table = (1,), (2,1), (3,2), (4,3) -drop table self_ref; --- cleanup -drop function dump_insert(); -drop function dump_update(); -drop function dump_delete(); --- --- Tests for CREATE OR REPLACE TRIGGER --- -create table my_table (id integer); -create function funcA() returns trigger as $$ -begin - raise notice 'hello from funcA'; - return null; -end; $$ language plpgsql; -create function funcB() returns trigger as $$ -begin - raise notice 'hello from funcB'; - return null; -end; $$ language plpgsql; -create trigger my_trig - after insert on my_table - for each row execute procedure funcA(); -create trigger my_trig - before insert on my_table - for each row execute procedure funcB(); -- should fail -ERROR: trigger "my_trig" for relation "my_table" already exists -insert into my_table values (1); -NOTICE: hello from funcA -create or replace trigger my_trig - before insert on my_table - for each row execute procedure funcB(); -- OK -insert into my_table values (2); -- this insert should become a no-op -NOTICE: hello from funcB -table my_table; - id ----- - 1 -(1 row) - -drop table my_table; --- test CREATE OR REPLACE TRIGGER on partition table -create table parted_trig (a int) partition by range (a); -create table parted_trig_1 partition of parted_trig - for values from (0) to (1000) partition by range (a); -create table parted_trig_1_1 partition of parted_trig_1 for values from (0) to (100); -create table parted_trig_2 partition of parted_trig for values from (1000) to (2000); -create table default_parted_trig partition of parted_trig default; --- test that trigger can be replaced by another one --- at the same level of partition table -create or replace trigger my_trig - after insert on parted_trig - for each row execute procedure funcA(); -insert into parted_trig (a) values (50); -NOTICE: hello from funcA -create or replace trigger my_trig - after insert on parted_trig - for each row execute procedure funcB(); -insert into parted_trig (a) values (50); -NOTICE: hello from funcB --- test that child trigger cannot be replaced directly -create or replace trigger my_trig - after insert on parted_trig - for each row execute procedure funcA(); -insert into parted_trig (a) values (50); -NOTICE: hello from funcA -create or replace trigger my_trig - after insert on parted_trig_1 - for each row execute procedure funcB(); -- should fail -ERROR: trigger "my_trig" for relation "parted_trig_1" is an internal trigger -insert into parted_trig (a) values (50); -NOTICE: hello from funcA -drop trigger my_trig on parted_trig; -insert into parted_trig (a) values (50); --- test that user trigger can be overwritten by one defined at upper level -create trigger my_trig - after insert on parted_trig_1 - for each row execute procedure funcA(); -insert into parted_trig (a) values (50); -NOTICE: hello from funcA -create trigger my_trig - after insert on parted_trig - for each row execute procedure funcB(); -- should fail -ERROR: trigger "my_trig" for relation "parted_trig_1" already exists -insert into parted_trig (a) values (50); -NOTICE: hello from funcA -create or replace trigger my_trig - after insert on parted_trig - for each row execute procedure funcB(); -insert into parted_trig (a) values (50); -NOTICE: hello from funcB --- cleanup -drop table parted_trig; -drop function funcA(); -drop function funcB(); --- Leave around some objects for other tests -create table trigger_parted (a int primary key) partition by list (a); -create function trigger_parted_trigfunc() returns trigger language plpgsql as - $$ begin end; $$; -create trigger aft_row after insert or update on trigger_parted - for each row execute function trigger_parted_trigfunc(); -create table trigger_parted_p1 partition of trigger_parted for values in (1) - partition by list (a); -create table trigger_parted_p1_1 partition of trigger_parted_p1 for values in (1); -create table trigger_parted_p2 partition of trigger_parted for values in (2) - partition by list (a); -create table trigger_parted_p2_2 partition of trigger_parted_p2 for values in (2); -alter table only trigger_parted_p2 disable trigger aft_row; -alter table trigger_parted_p2_2 enable always trigger aft_row; --- verify transition table conversion slot's lifetime --- https://postgr.es/m/39a71864-b120-5a5c-8cc5-c632b6f16761@amazon.com -create table convslot_test_parent (col1 text primary key); -create table convslot_test_child (col1 text primary key, - foreign key (col1) references convslot_test_parent(col1) on delete cascade on update cascade -); -alter table convslot_test_child add column col2 text not null default 'tutu'; -insert into convslot_test_parent(col1) values ('1'); -insert into convslot_test_child(col1) values ('1'); -insert into convslot_test_parent(col1) values ('3'); -insert into convslot_test_child(col1) values ('3'); -create or replace function trigger_function1() -returns trigger -language plpgsql -AS $$ -begin -raise notice 'trigger = %, old_table = %', - TG_NAME, - (select string_agg(old_table::text, ', ' order by col1) from old_table); -return null; -end; $$; -create or replace function trigger_function2() -returns trigger -language plpgsql -AS $$ -begin -raise notice 'trigger = %, new table = %', - TG_NAME, - (select string_agg(new_table::text, ', ' order by col1) from new_table); -return null; -end; $$; -create trigger but_trigger after update on convslot_test_child -referencing new table as new_table -for each statement execute function trigger_function2(); -update convslot_test_parent set col1 = col1 || '1'; -NOTICE: trigger = but_trigger, new table = (11,tutu), (31,tutu) -create or replace function trigger_function3() -returns trigger -language plpgsql -AS $$ -begin -raise notice 'trigger = %, old_table = %, new table = %', - TG_NAME, - (select string_agg(old_table::text, ', ' order by col1) from old_table), - (select string_agg(new_table::text, ', ' order by col1) from new_table); -return null; -end; $$; -create trigger but_trigger2 after update on convslot_test_child -referencing old table as old_table new table as new_table -for each statement execute function trigger_function3(); -update convslot_test_parent set col1 = col1 || '1'; -NOTICE: trigger = but_trigger, new table = (111,tutu), (311,tutu) -NOTICE: trigger = but_trigger2, old_table = (11,tutu), (31,tutu), new table = (111,tutu), (311,tutu) -create trigger bdt_trigger after delete on convslot_test_child -referencing old table as old_table -for each statement execute function trigger_function1(); -delete from convslot_test_parent; -NOTICE: trigger = bdt_trigger, old_table = (111,tutu), (311,tutu) -drop table convslot_test_child, convslot_test_parent; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/select.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/select.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/select.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/select.out 2023-02-20 19:45:21.759209988 -0500 @@ -1,973 +1 @@ --- --- SELECT --- --- btree index --- awk '{if($1<10){print;}else{next;}}' onek.data | sort +0n -1 --- -SELECT * FROM onek - WHERE onek.unique1 < 10 - ORDER BY onek.unique1; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 0 | 998 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | AAAAAA | KMBAAA | OOOOxx - 1 | 214 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 2 | 3 | BAAAAA | GIAAAA | OOOOxx - 2 | 326 | 0 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 4 | 5 | CAAAAA | OMAAAA | OOOOxx - 3 | 431 | 1 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 6 | 7 | DAAAAA | PQAAAA | VVVVxx - 4 | 833 | 0 | 0 | 4 | 4 | 4 | 4 | 4 | 4 | 4 | 8 | 9 | EAAAAA | BGBAAA | HHHHxx - 5 | 541 | 1 | 1 | 5 | 5 | 5 | 5 | 5 | 5 | 5 | 10 | 11 | FAAAAA | VUAAAA | HHHHxx - 6 | 978 | 0 | 2 | 6 | 6 | 6 | 6 | 6 | 6 | 6 | 12 | 13 | GAAAAA | QLBAAA | OOOOxx - 7 | 647 | 1 | 3 | 7 | 7 | 7 | 7 | 7 | 7 | 7 | 14 | 15 | HAAAAA | XYAAAA | VVVVxx - 8 | 653 | 0 | 0 | 8 | 8 | 8 | 8 | 8 | 8 | 8 | 16 | 17 | IAAAAA | DZAAAA | HHHHxx - 9 | 49 | 1 | 1 | 9 | 9 | 9 | 9 | 9 | 9 | 9 | 18 | 19 | JAAAAA | XBAAAA | HHHHxx -(10 rows) - --- --- awk '{if($1<20){print $1,$14;}else{next;}}' onek.data | sort +0nr -1 --- -SELECT onek.unique1, onek.stringu1 FROM onek - WHERE onek.unique1 < 20 - ORDER BY unique1 using >; - unique1 | stringu1 ----------+---------- - 19 | TAAAAA - 18 | SAAAAA - 17 | RAAAAA - 16 | QAAAAA - 15 | PAAAAA - 14 | OAAAAA - 13 | NAAAAA - 12 | MAAAAA - 11 | LAAAAA - 10 | KAAAAA - 9 | JAAAAA - 8 | IAAAAA - 7 | HAAAAA - 6 | GAAAAA - 5 | FAAAAA - 4 | EAAAAA - 3 | DAAAAA - 2 | CAAAAA - 1 | BAAAAA - 0 | AAAAAA -(20 rows) - --- --- awk '{if($1>980){print $1,$14;}else{next;}}' onek.data | sort +1d -2 --- -SELECT onek.unique1, onek.stringu1 FROM onek - WHERE onek.unique1 > 980 - ORDER BY stringu1 using <; - unique1 | stringu1 ----------+---------- - 988 | AMAAAA - 989 | BMAAAA - 990 | CMAAAA - 991 | DMAAAA - 992 | EMAAAA - 993 | FMAAAA - 994 | GMAAAA - 995 | HMAAAA - 996 | IMAAAA - 997 | JMAAAA - 998 | KMAAAA - 999 | LMAAAA - 981 | TLAAAA - 982 | ULAAAA - 983 | VLAAAA - 984 | WLAAAA - 985 | XLAAAA - 986 | YLAAAA - 987 | ZLAAAA -(19 rows) - --- --- awk '{if($1>980){print $1,$16;}else{next;}}' onek.data | --- sort +1d -2 +0nr -1 --- -SELECT onek.unique1, onek.string4 FROM onek - WHERE onek.unique1 > 980 - ORDER BY string4 using <, unique1 using >; - unique1 | string4 ----------+--------- - 999 | AAAAxx - 995 | AAAAxx - 983 | AAAAxx - 982 | AAAAxx - 981 | AAAAxx - 998 | HHHHxx - 997 | HHHHxx - 993 | HHHHxx - 990 | HHHHxx - 986 | HHHHxx - 996 | OOOOxx - 991 | OOOOxx - 988 | OOOOxx - 987 | OOOOxx - 985 | OOOOxx - 994 | VVVVxx - 992 | VVVVxx - 989 | VVVVxx - 984 | VVVVxx -(19 rows) - --- --- awk '{if($1>980){print $1,$16;}else{next;}}' onek.data | --- sort +1dr -2 +0n -1 --- -SELECT onek.unique1, onek.string4 FROM onek - WHERE onek.unique1 > 980 - ORDER BY string4 using >, unique1 using <; - unique1 | string4 ----------+--------- - 984 | VVVVxx - 989 | VVVVxx - 992 | VVVVxx - 994 | VVVVxx - 985 | OOOOxx - 987 | OOOOxx - 988 | OOOOxx - 991 | OOOOxx - 996 | OOOOxx - 986 | HHHHxx - 990 | HHHHxx - 993 | HHHHxx - 997 | HHHHxx - 998 | HHHHxx - 981 | AAAAxx - 982 | AAAAxx - 983 | AAAAxx - 995 | AAAAxx - 999 | AAAAxx -(19 rows) - --- --- awk '{if($1<20){print $1,$16;}else{next;}}' onek.data | --- sort +0nr -1 +1d -2 --- -SELECT onek.unique1, onek.string4 FROM onek - WHERE onek.unique1 < 20 - ORDER BY unique1 using >, string4 using <; - unique1 | string4 ----------+--------- - 19 | OOOOxx - 18 | VVVVxx - 17 | HHHHxx - 16 | OOOOxx - 15 | VVVVxx - 14 | AAAAxx - 13 | OOOOxx - 12 | AAAAxx - 11 | OOOOxx - 10 | AAAAxx - 9 | HHHHxx - 8 | HHHHxx - 7 | VVVVxx - 6 | OOOOxx - 5 | HHHHxx - 4 | HHHHxx - 3 | VVVVxx - 2 | OOOOxx - 1 | OOOOxx - 0 | OOOOxx -(20 rows) - --- --- awk '{if($1<20){print $1,$16;}else{next;}}' onek.data | --- sort +0n -1 +1dr -2 --- -SELECT onek.unique1, onek.string4 FROM onek - WHERE onek.unique1 < 20 - ORDER BY unique1 using <, string4 using >; - unique1 | string4 ----------+--------- - 0 | OOOOxx - 1 | OOOOxx - 2 | OOOOxx - 3 | VVVVxx - 4 | HHHHxx - 5 | HHHHxx - 6 | OOOOxx - 7 | VVVVxx - 8 | HHHHxx - 9 | HHHHxx - 10 | AAAAxx - 11 | OOOOxx - 12 | AAAAxx - 13 | OOOOxx - 14 | AAAAxx - 15 | VVVVxx - 16 | OOOOxx - 17 | HHHHxx - 18 | VVVVxx - 19 | OOOOxx -(20 rows) - --- --- test partial btree indexes --- --- As of 7.2, planner probably won't pick an indexscan without stats, --- so ANALYZE first. Also, we want to prevent it from picking a bitmapscan --- followed by sort, because that could hide index ordering problems. --- -ANALYZE onek2; -SET enable_seqscan TO off; -SET enable_bitmapscan TO off; -SET enable_sort TO off; --- --- awk '{if($1<10){print $0;}else{next;}}' onek.data | sort +0n -1 --- -SELECT onek2.* FROM onek2 WHERE onek2.unique1 < 10; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 0 | 998 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | AAAAAA | KMBAAA | OOOOxx - 1 | 214 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 2 | 3 | BAAAAA | GIAAAA | OOOOxx - 2 | 326 | 0 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 4 | 5 | CAAAAA | OMAAAA | OOOOxx - 3 | 431 | 1 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 6 | 7 | DAAAAA | PQAAAA | VVVVxx - 4 | 833 | 0 | 0 | 4 | 4 | 4 | 4 | 4 | 4 | 4 | 8 | 9 | EAAAAA | BGBAAA | HHHHxx - 5 | 541 | 1 | 1 | 5 | 5 | 5 | 5 | 5 | 5 | 5 | 10 | 11 | FAAAAA | VUAAAA | HHHHxx - 6 | 978 | 0 | 2 | 6 | 6 | 6 | 6 | 6 | 6 | 6 | 12 | 13 | GAAAAA | QLBAAA | OOOOxx - 7 | 647 | 1 | 3 | 7 | 7 | 7 | 7 | 7 | 7 | 7 | 14 | 15 | HAAAAA | XYAAAA | VVVVxx - 8 | 653 | 0 | 0 | 8 | 8 | 8 | 8 | 8 | 8 | 8 | 16 | 17 | IAAAAA | DZAAAA | HHHHxx - 9 | 49 | 1 | 1 | 9 | 9 | 9 | 9 | 9 | 9 | 9 | 18 | 19 | JAAAAA | XBAAAA | HHHHxx -(10 rows) - --- --- awk '{if($1<20){print $1,$14;}else{next;}}' onek.data | sort +0nr -1 --- -SELECT onek2.unique1, onek2.stringu1 FROM onek2 - WHERE onek2.unique1 < 20 - ORDER BY unique1 using >; - unique1 | stringu1 ----------+---------- - 19 | TAAAAA - 18 | SAAAAA - 17 | RAAAAA - 16 | QAAAAA - 15 | PAAAAA - 14 | OAAAAA - 13 | NAAAAA - 12 | MAAAAA - 11 | LAAAAA - 10 | KAAAAA - 9 | JAAAAA - 8 | IAAAAA - 7 | HAAAAA - 6 | GAAAAA - 5 | FAAAAA - 4 | EAAAAA - 3 | DAAAAA - 2 | CAAAAA - 1 | BAAAAA - 0 | AAAAAA -(20 rows) - --- --- awk '{if($1>980){print $1,$14;}else{next;}}' onek.data | sort +1d -2 --- -SELECT onek2.unique1, onek2.stringu1 FROM onek2 - WHERE onek2.unique1 > 980; - unique1 | stringu1 ----------+---------- - 981 | TLAAAA - 982 | ULAAAA - 983 | VLAAAA - 984 | WLAAAA - 985 | XLAAAA - 986 | YLAAAA - 987 | ZLAAAA - 988 | AMAAAA - 989 | BMAAAA - 990 | CMAAAA - 991 | DMAAAA - 992 | EMAAAA - 993 | FMAAAA - 994 | GMAAAA - 995 | HMAAAA - 996 | IMAAAA - 997 | JMAAAA - 998 | KMAAAA - 999 | LMAAAA -(19 rows) - -RESET enable_seqscan; -RESET enable_bitmapscan; -RESET enable_sort; -SELECT two, stringu1, ten, string4 - INTO TABLE tmp - FROM onek; --- --- awk '{print $1,$2;}' person.data | --- awk '{if(NF!=2){print $3,$2;}else{print;}}' - emp.data | --- awk '{if(NF!=2){print $3,$2;}else{print;}}' - student.data | --- awk 'BEGIN{FS=" ";}{if(NF!=2){print $4,$5;}else{print;}}' - stud_emp.data --- --- SELECT name, age FROM person*; ??? check if different -SELECT p.name, p.age FROM person* p; - name | age ----------+----- - mike | 40 - joe | 20 - sally | 34 - sandra | 19 - alex | 30 - sue | 50 - denise | 24 - sarah | 88 - teresa | 38 - nan | 28 - leah | 68 - wendy | 78 - melissa | 28 - joan | 18 - mary | 8 - jane | 58 - liza | 38 - jean | 28 - jenifer | 38 - juanita | 58 - susan | 78 - zena | 98 - martie | 88 - chris | 78 - pat | 18 - zola | 58 - louise | 98 - edna | 18 - bertha | 88 - sumi | 38 - koko | 88 - gina | 18 - rean | 48 - sharon | 78 - paula | 68 - julie | 68 - belinda | 38 - karen | 48 - carina | 58 - diane | 18 - esther | 98 - trudy | 88 - fanny | 8 - carmen | 78 - lita | 25 - pamela | 48 - sandy | 38 - trisha | 88 - uma | 78 - velma | 68 - sharon | 25 - sam | 30 - bill | 20 - fred | 28 - larry | 60 - jeff | 23 - cim | 30 - linda | 19 -(58 rows) - --- --- awk '{print $1,$2;}' person.data | --- awk '{if(NF!=2){print $3,$2;}else{print;}}' - emp.data | --- awk '{if(NF!=2){print $3,$2;}else{print;}}' - student.data | --- awk 'BEGIN{FS=" ";}{if(NF!=1){print $4,$5;}else{print;}}' - stud_emp.data | --- sort +1nr -2 --- -SELECT p.name, p.age FROM person* p ORDER BY age using >, name; - name | age ----------+----- - esther | 98 - louise | 98 - zena | 98 - bertha | 88 - koko | 88 - martie | 88 - sarah | 88 - trisha | 88 - trudy | 88 - carmen | 78 - chris | 78 - sharon | 78 - susan | 78 - uma | 78 - wendy | 78 - julie | 68 - leah | 68 - paula | 68 - velma | 68 - larry | 60 - carina | 58 - jane | 58 - juanita | 58 - zola | 58 - sue | 50 - karen | 48 - pamela | 48 - rean | 48 - mike | 40 - belinda | 38 - jenifer | 38 - liza | 38 - sandy | 38 - sumi | 38 - teresa | 38 - sally | 34 - alex | 30 - cim | 30 - sam | 30 - fred | 28 - jean | 28 - melissa | 28 - nan | 28 - lita | 25 - sharon | 25 - denise | 24 - jeff | 23 - bill | 20 - joe | 20 - linda | 19 - sandra | 19 - diane | 18 - edna | 18 - gina | 18 - joan | 18 - pat | 18 - fanny | 8 - mary | 8 -(58 rows) - --- --- Test some cases involving whole-row Var referencing a subquery --- -select foo from (select 1 offset 0) as foo; - foo ------ - (1) -(1 row) - -select foo from (select null offset 0) as foo; - foo ------ - () -(1 row) - -select foo from (select 'xyzzy',1,null offset 0) as foo; - foo ------------- - (xyzzy,1,) -(1 row) - --- --- Test VALUES lists --- -select * from onek, (values(147, 'RFAAAA'), (931, 'VJAAAA')) as v (i, j) - WHERE onek.unique1 = v.i and onek.stringu1 = v.j; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 | i | j ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------+-----+-------- - 147 | 0 | 1 | 3 | 7 | 7 | 7 | 47 | 147 | 147 | 147 | 14 | 15 | RFAAAA | AAAAAA | AAAAxx | 147 | RFAAAA - 931 | 1 | 1 | 3 | 1 | 11 | 1 | 31 | 131 | 431 | 931 | 2 | 3 | VJAAAA | BAAAAA | HHHHxx | 931 | VJAAAA -(2 rows) - --- a more complex case --- looks like we're coding lisp :-) -select * from onek, - (values ((select i from - (values(10000), (2), (389), (1000), (2000), ((select 10029))) as foo(i) - order by i asc limit 1))) bar (i) - where onek.unique1 = bar.i; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 | i ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------+--- - 2 | 326 | 0 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 4 | 5 | CAAAAA | OMAAAA | OOOOxx | 2 -(1 row) - --- try VALUES in a subquery -select * from onek - where (unique1,ten) in (values (1,1), (20,0), (99,9), (17,99)) - order by unique1; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 1 | 214 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 2 | 3 | BAAAAA | GIAAAA | OOOOxx - 20 | 306 | 0 | 0 | 0 | 0 | 0 | 20 | 20 | 20 | 20 | 0 | 1 | UAAAAA | ULAAAA | OOOOxx - 99 | 101 | 1 | 3 | 9 | 19 | 9 | 99 | 99 | 99 | 99 | 18 | 19 | VDAAAA | XDAAAA | HHHHxx -(3 rows) - --- VALUES is also legal as a standalone query or a set-operation member -VALUES (1,2), (3,4+4), (7,77.7); - column1 | column2 ----------+--------- - 1 | 2 - 3 | 8 - 7 | 77.7 -(3 rows) - -VALUES (1,2), (3,4+4), (7,77.7) -UNION ALL -SELECT 2+2, 57 -UNION ALL -TABLE int8_tbl; - column1 | column2 -------------------+------------------- - 1 | 2 - 3 | 8 - 7 | 77.7 - 4 | 57 - 123 | 456 - 123 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(9 rows) - --- corner case: VALUES with no columns -CREATE TEMP TABLE nocols(); -INSERT INTO nocols DEFAULT VALUES; -SELECT * FROM nocols n, LATERAL (VALUES(n.*)) v; --- -(1 row) - --- --- Test ORDER BY options --- -CREATE TEMP TABLE foo (f1 int); -INSERT INTO foo VALUES (42),(3),(10),(7),(null),(null),(1); -SELECT * FROM foo ORDER BY f1; - f1 ----- - 1 - 3 - 7 - 10 - 42 - - -(7 rows) - -SELECT * FROM foo ORDER BY f1 ASC; -- same thing - f1 ----- - 1 - 3 - 7 - 10 - 42 - - -(7 rows) - -SELECT * FROM foo ORDER BY f1 NULLS FIRST; - f1 ----- - - - 1 - 3 - 7 - 10 - 42 -(7 rows) - -SELECT * FROM foo ORDER BY f1 DESC; - f1 ----- - - - 42 - 10 - 7 - 3 - 1 -(7 rows) - -SELECT * FROM foo ORDER BY f1 DESC NULLS LAST; - f1 ----- - 42 - 10 - 7 - 3 - 1 - - -(7 rows) - --- check if indexscans do the right things -CREATE INDEX fooi ON foo (f1); -SET enable_sort = false; -SELECT * FROM foo ORDER BY f1; - f1 ----- - 1 - 3 - 7 - 10 - 42 - - -(7 rows) - -SELECT * FROM foo ORDER BY f1 NULLS FIRST; - f1 ----- - - - 1 - 3 - 7 - 10 - 42 -(7 rows) - -SELECT * FROM foo ORDER BY f1 DESC; - f1 ----- - - - 42 - 10 - 7 - 3 - 1 -(7 rows) - -SELECT * FROM foo ORDER BY f1 DESC NULLS LAST; - f1 ----- - 42 - 10 - 7 - 3 - 1 - - -(7 rows) - -DROP INDEX fooi; -CREATE INDEX fooi ON foo (f1 DESC); -SELECT * FROM foo ORDER BY f1; - f1 ----- - 1 - 3 - 7 - 10 - 42 - - -(7 rows) - -SELECT * FROM foo ORDER BY f1 NULLS FIRST; - f1 ----- - - - 1 - 3 - 7 - 10 - 42 -(7 rows) - -SELECT * FROM foo ORDER BY f1 DESC; - f1 ----- - - - 42 - 10 - 7 - 3 - 1 -(7 rows) - -SELECT * FROM foo ORDER BY f1 DESC NULLS LAST; - f1 ----- - 42 - 10 - 7 - 3 - 1 - - -(7 rows) - -DROP INDEX fooi; -CREATE INDEX fooi ON foo (f1 DESC NULLS LAST); -SELECT * FROM foo ORDER BY f1; - f1 ----- - 1 - 3 - 7 - 10 - 42 - - -(7 rows) - -SELECT * FROM foo ORDER BY f1 NULLS FIRST; - f1 ----- - - - 1 - 3 - 7 - 10 - 42 -(7 rows) - -SELECT * FROM foo ORDER BY f1 DESC; - f1 ----- - - - 42 - 10 - 7 - 3 - 1 -(7 rows) - -SELECT * FROM foo ORDER BY f1 DESC NULLS LAST; - f1 ----- - 42 - 10 - 7 - 3 - 1 - - -(7 rows) - --- --- Test planning of some cases with partial indexes --- --- partial index is usable -explain (costs off) -select * from onek2 where unique2 = 11 and stringu1 = 'ATAAAA'; - QUERY PLAN ------------------------------------------ - Index Scan using onek2_u2_prtl on onek2 - Index Cond: (unique2 = 11) - Filter: (stringu1 = 'ATAAAA'::name) -(3 rows) - -select * from onek2 where unique2 = 11 and stringu1 = 'ATAAAA'; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 494 | 11 | 0 | 2 | 4 | 14 | 4 | 94 | 94 | 494 | 494 | 8 | 9 | ATAAAA | LAAAAA | VVVVxx -(1 row) - --- actually run the query with an analyze to use the partial index -explain (costs off, analyze on, timing off, summary off) -select * from onek2 where unique2 = 11 and stringu1 = 'ATAAAA'; - QUERY PLAN ------------------------------------------------------------------ - Index Scan using onek2_u2_prtl on onek2 (actual rows=1 loops=1) - Index Cond: (unique2 = 11) - Filter: (stringu1 = 'ATAAAA'::name) -(3 rows) - -explain (costs off) -select unique2 from onek2 where unique2 = 11 and stringu1 = 'ATAAAA'; - QUERY PLAN ------------------------------------------ - Index Scan using onek2_u2_prtl on onek2 - Index Cond: (unique2 = 11) - Filter: (stringu1 = 'ATAAAA'::name) -(3 rows) - -select unique2 from onek2 where unique2 = 11 and stringu1 = 'ATAAAA'; - unique2 ---------- - 11 -(1 row) - --- partial index predicate implies clause, so no need for retest -explain (costs off) -select * from onek2 where unique2 = 11 and stringu1 < 'B'; - QUERY PLAN ------------------------------------------ - Index Scan using onek2_u2_prtl on onek2 - Index Cond: (unique2 = 11) -(2 rows) - -select * from onek2 where unique2 = 11 and stringu1 < 'B'; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 494 | 11 | 0 | 2 | 4 | 14 | 4 | 94 | 94 | 494 | 494 | 8 | 9 | ATAAAA | LAAAAA | VVVVxx -(1 row) - -explain (costs off) -select unique2 from onek2 where unique2 = 11 and stringu1 < 'B'; - QUERY PLAN ----------------------------------------------- - Index Only Scan using onek2_u2_prtl on onek2 - Index Cond: (unique2 = 11) -(2 rows) - -select unique2 from onek2 where unique2 = 11 and stringu1 < 'B'; - unique2 ---------- - 11 -(1 row) - --- but if it's an update target, must retest anyway -explain (costs off) -select unique2 from onek2 where unique2 = 11 and stringu1 < 'B' for update; - QUERY PLAN ------------------------------------------------ - LockRows - -> Index Scan using onek2_u2_prtl on onek2 - Index Cond: (unique2 = 11) - Filter: (stringu1 < 'B'::name) -(4 rows) - -select unique2 from onek2 where unique2 = 11 and stringu1 < 'B' for update; - unique2 ---------- - 11 -(1 row) - --- partial index is not applicable -explain (costs off) -select unique2 from onek2 where unique2 = 11 and stringu1 < 'C'; - QUERY PLAN -------------------------------------------------------- - Seq Scan on onek2 - Filter: ((stringu1 < 'C'::name) AND (unique2 = 11)) -(2 rows) - -select unique2 from onek2 where unique2 = 11 and stringu1 < 'C'; - unique2 ---------- - 11 -(1 row) - --- partial index implies clause, but bitmap scan must recheck predicate anyway -SET enable_indexscan TO off; -explain (costs off) -select unique2 from onek2 where unique2 = 11 and stringu1 < 'B'; - QUERY PLAN -------------------------------------------------------------- - Bitmap Heap Scan on onek2 - Recheck Cond: ((unique2 = 11) AND (stringu1 < 'B'::name)) - -> Bitmap Index Scan on onek2_u2_prtl - Index Cond: (unique2 = 11) -(4 rows) - -select unique2 from onek2 where unique2 = 11 and stringu1 < 'B'; - unique2 ---------- - 11 -(1 row) - -RESET enable_indexscan; --- check multi-index cases too -explain (costs off) -select unique1, unique2 from onek2 - where (unique2 = 11 or unique1 = 0) and stringu1 < 'B'; - QUERY PLAN --------------------------------------------------------------------------------- - Bitmap Heap Scan on onek2 - Recheck Cond: (((unique2 = 11) AND (stringu1 < 'B'::name)) OR (unique1 = 0)) - Filter: (stringu1 < 'B'::name) - -> BitmapOr - -> Bitmap Index Scan on onek2_u2_prtl - Index Cond: (unique2 = 11) - -> Bitmap Index Scan on onek2_u1_prtl - Index Cond: (unique1 = 0) -(8 rows) - -select unique1, unique2 from onek2 - where (unique2 = 11 or unique1 = 0) and stringu1 < 'B'; - unique1 | unique2 ----------+--------- - 494 | 11 - 0 | 998 -(2 rows) - -explain (costs off) -select unique1, unique2 from onek2 - where (unique2 = 11 and stringu1 < 'B') or unique1 = 0; - QUERY PLAN --------------------------------------------------------------------------------- - Bitmap Heap Scan on onek2 - Recheck Cond: (((unique2 = 11) AND (stringu1 < 'B'::name)) OR (unique1 = 0)) - -> BitmapOr - -> Bitmap Index Scan on onek2_u2_prtl - Index Cond: (unique2 = 11) - -> Bitmap Index Scan on onek2_u1_prtl - Index Cond: (unique1 = 0) -(7 rows) - -select unique1, unique2 from onek2 - where (unique2 = 11 and stringu1 < 'B') or unique1 = 0; - unique1 | unique2 ----------+--------- - 494 | 11 - 0 | 998 -(2 rows) - --- --- Test some corner cases that have been known to confuse the planner --- --- ORDER BY on a constant doesn't really need any sorting -SELECT 1 AS x ORDER BY x; - x ---- - 1 -(1 row) - --- But ORDER BY on a set-valued expression does -create function sillysrf(int) returns setof int as - 'values (1),(10),(2),($1)' language sql immutable; -select sillysrf(42); - sillysrf ----------- - 1 - 10 - 2 - 42 -(4 rows) - -select sillysrf(-1) order by 1; - sillysrf ----------- - -1 - 1 - 2 - 10 -(4 rows) - -drop function sillysrf(int); --- X = X isn't a no-op, it's effectively X IS NOT NULL assuming = is strict --- (see bug #5084) -select * from (values (2),(null),(1)) v(k) where k = k order by k; - k ---- - 1 - 2 -(2 rows) - -select * from (values (2),(null),(1)) v(k) where k = k; - k ---- - 2 - 1 -(2 rows) - --- Test partitioned tables with no partitions, which should be handled the --- same as the non-inheritance case when expanding its RTE. -create table list_parted_tbl (a int,b int) partition by list (a); -create table list_parted_tbl1 partition of list_parted_tbl - for values in (1) partition by list(b); -explain (costs off) select * from list_parted_tbl; - QUERY PLAN --------------------------- - Result - One-Time Filter: false -(2 rows) - -drop table list_parted_tbl; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/inherit.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/inherit.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/inherit.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/inherit.out 2023-02-20 19:45:21.829209991 -0500 @@ -1,2532 +1 @@ --- --- Test inheritance features --- -CREATE TABLE a (aa TEXT); -CREATE TABLE b (bb TEXT) INHERITS (a); -CREATE TABLE c (cc TEXT) INHERITS (a); -CREATE TABLE d (dd TEXT) INHERITS (b,c,a); -NOTICE: merging multiple inherited definitions of column "aa" -NOTICE: merging multiple inherited definitions of column "aa" -INSERT INTO a(aa) VALUES('aaa'); -INSERT INTO a(aa) VALUES('aaaa'); -INSERT INTO a(aa) VALUES('aaaaa'); -INSERT INTO a(aa) VALUES('aaaaaa'); -INSERT INTO a(aa) VALUES('aaaaaaa'); -INSERT INTO a(aa) VALUES('aaaaaaaa'); -INSERT INTO b(aa) VALUES('bbb'); -INSERT INTO b(aa) VALUES('bbbb'); -INSERT INTO b(aa) VALUES('bbbbb'); -INSERT INTO b(aa) VALUES('bbbbbb'); -INSERT INTO b(aa) VALUES('bbbbbbb'); -INSERT INTO b(aa) VALUES('bbbbbbbb'); -INSERT INTO c(aa) VALUES('ccc'); -INSERT INTO c(aa) VALUES('cccc'); -INSERT INTO c(aa) VALUES('ccccc'); -INSERT INTO c(aa) VALUES('cccccc'); -INSERT INTO c(aa) VALUES('ccccccc'); -INSERT INTO c(aa) VALUES('cccccccc'); -INSERT INTO d(aa) VALUES('ddd'); -INSERT INTO d(aa) VALUES('dddd'); -INSERT INTO d(aa) VALUES('ddddd'); -INSERT INTO d(aa) VALUES('dddddd'); -INSERT INTO d(aa) VALUES('ddddddd'); -INSERT INTO d(aa) VALUES('dddddddd'); -SELECT relname, a.* FROM a, pg_class where a.tableoid = pg_class.oid; - relname | aa ----------+---------- - a | aaa - a | aaaa - a | aaaaa - a | aaaaaa - a | aaaaaaa - a | aaaaaaaa - b | bbb - b | bbbb - b | bbbbb - b | bbbbbb - b | bbbbbbb - b | bbbbbbbb - c | ccc - c | cccc - c | ccccc - c | cccccc - c | ccccccc - c | cccccccc - d | ddd - d | dddd - d | ddddd - d | dddddd - d | ddddddd - d | dddddddd -(24 rows) - -SELECT relname, b.* FROM b, pg_class where b.tableoid = pg_class.oid; - relname | aa | bb ----------+----------+---- - b | bbb | - b | bbbb | - b | bbbbb | - b | bbbbbb | - b | bbbbbbb | - b | bbbbbbbb | - d | ddd | - d | dddd | - d | ddddd | - d | dddddd | - d | ddddddd | - d | dddddddd | -(12 rows) - -SELECT relname, c.* FROM c, pg_class where c.tableoid = pg_class.oid; - relname | aa | cc ----------+----------+---- - c | ccc | - c | cccc | - c | ccccc | - c | cccccc | - c | ccccccc | - c | cccccccc | - d | ddd | - d | dddd | - d | ddddd | - d | dddddd | - d | ddddddd | - d | dddddddd | -(12 rows) - -SELECT relname, d.* FROM d, pg_class where d.tableoid = pg_class.oid; - relname | aa | bb | cc | dd ----------+----------+----+----+---- - d | ddd | | | - d | dddd | | | - d | ddddd | | | - d | dddddd | | | - d | ddddddd | | | - d | dddddddd | | | -(6 rows) - -SELECT relname, a.* FROM ONLY a, pg_class where a.tableoid = pg_class.oid; - relname | aa ----------+---------- - a | aaa - a | aaaa - a | aaaaa - a | aaaaaa - a | aaaaaaa - a | aaaaaaaa -(6 rows) - -SELECT relname, b.* FROM ONLY b, pg_class where b.tableoid = pg_class.oid; - relname | aa | bb ----------+----------+---- - b | bbb | - b | bbbb | - b | bbbbb | - b | bbbbbb | - b | bbbbbbb | - b | bbbbbbbb | -(6 rows) - -SELECT relname, c.* FROM ONLY c, pg_class where c.tableoid = pg_class.oid; - relname | aa | cc ----------+----------+---- - c | ccc | - c | cccc | - c | ccccc | - c | cccccc | - c | ccccccc | - c | cccccccc | -(6 rows) - -SELECT relname, d.* FROM ONLY d, pg_class where d.tableoid = pg_class.oid; - relname | aa | bb | cc | dd ----------+----------+----+----+---- - d | ddd | | | - d | dddd | | | - d | ddddd | | | - d | dddddd | | | - d | ddddddd | | | - d | dddddddd | | | -(6 rows) - -UPDATE a SET aa='zzzz' WHERE aa='aaaa'; -UPDATE ONLY a SET aa='zzzzz' WHERE aa='aaaaa'; -UPDATE b SET aa='zzz' WHERE aa='aaa'; -UPDATE ONLY b SET aa='zzz' WHERE aa='aaa'; -UPDATE a SET aa='zzzzzz' WHERE aa LIKE 'aaa%'; -SELECT relname, a.* FROM a, pg_class where a.tableoid = pg_class.oid; - relname | aa ----------+---------- - a | zzzz - a | zzzzz - a | zzzzzz - a | zzzzzz - a | zzzzzz - a | zzzzzz - b | bbb - b | bbbb - b | bbbbb - b | bbbbbb - b | bbbbbbb - b | bbbbbbbb - c | ccc - c | cccc - c | ccccc - c | cccccc - c | ccccccc - c | cccccccc - d | ddd - d | dddd - d | ddddd - d | dddddd - d | ddddddd - d | dddddddd -(24 rows) - -SELECT relname, b.* FROM b, pg_class where b.tableoid = pg_class.oid; - relname | aa | bb ----------+----------+---- - b | bbb | - b | bbbb | - b | bbbbb | - b | bbbbbb | - b | bbbbbbb | - b | bbbbbbbb | - d | ddd | - d | dddd | - d | ddddd | - d | dddddd | - d | ddddddd | - d | dddddddd | -(12 rows) - -SELECT relname, c.* FROM c, pg_class where c.tableoid = pg_class.oid; - relname | aa | cc ----------+----------+---- - c | ccc | - c | cccc | - c | ccccc | - c | cccccc | - c | ccccccc | - c | cccccccc | - d | ddd | - d | dddd | - d | ddddd | - d | dddddd | - d | ddddddd | - d | dddddddd | -(12 rows) - -SELECT relname, d.* FROM d, pg_class where d.tableoid = pg_class.oid; - relname | aa | bb | cc | dd ----------+----------+----+----+---- - d | ddd | | | - d | dddd | | | - d | ddddd | | | - d | dddddd | | | - d | ddddddd | | | - d | dddddddd | | | -(6 rows) - -SELECT relname, a.* FROM ONLY a, pg_class where a.tableoid = pg_class.oid; - relname | aa ----------+-------- - a | zzzz - a | zzzzz - a | zzzzzz - a | zzzzzz - a | zzzzzz - a | zzzzzz -(6 rows) - -SELECT relname, b.* FROM ONLY b, pg_class where b.tableoid = pg_class.oid; - relname | aa | bb ----------+----------+---- - b | bbb | - b | bbbb | - b | bbbbb | - b | bbbbbb | - b | bbbbbbb | - b | bbbbbbbb | -(6 rows) - -SELECT relname, c.* FROM ONLY c, pg_class where c.tableoid = pg_class.oid; - relname | aa | cc ----------+----------+---- - c | ccc | - c | cccc | - c | ccccc | - c | cccccc | - c | ccccccc | - c | cccccccc | -(6 rows) - -SELECT relname, d.* FROM ONLY d, pg_class where d.tableoid = pg_class.oid; - relname | aa | bb | cc | dd ----------+----------+----+----+---- - d | ddd | | | - d | dddd | | | - d | ddddd | | | - d | dddddd | | | - d | ddddddd | | | - d | dddddddd | | | -(6 rows) - -UPDATE b SET aa='new'; -SELECT relname, a.* FROM a, pg_class where a.tableoid = pg_class.oid; - relname | aa ----------+---------- - a | zzzz - a | zzzzz - a | zzzzzz - a | zzzzzz - a | zzzzzz - a | zzzzzz - b | new - b | new - b | new - b | new - b | new - b | new - c | ccc - c | cccc - c | ccccc - c | cccccc - c | ccccccc - c | cccccccc - d | new - d | new - d | new - d | new - d | new - d | new -(24 rows) - -SELECT relname, b.* FROM b, pg_class where b.tableoid = pg_class.oid; - relname | aa | bb ----------+-----+---- - b | new | - b | new | - b | new | - b | new | - b | new | - b | new | - d | new | - d | new | - d | new | - d | new | - d | new | - d | new | -(12 rows) - -SELECT relname, c.* FROM c, pg_class where c.tableoid = pg_class.oid; - relname | aa | cc ----------+----------+---- - c | ccc | - c | cccc | - c | ccccc | - c | cccccc | - c | ccccccc | - c | cccccccc | - d | new | - d | new | - d | new | - d | new | - d | new | - d | new | -(12 rows) - -SELECT relname, d.* FROM d, pg_class where d.tableoid = pg_class.oid; - relname | aa | bb | cc | dd ----------+-----+----+----+---- - d | new | | | - d | new | | | - d | new | | | - d | new | | | - d | new | | | - d | new | | | -(6 rows) - -SELECT relname, a.* FROM ONLY a, pg_class where a.tableoid = pg_class.oid; - relname | aa ----------+-------- - a | zzzz - a | zzzzz - a | zzzzzz - a | zzzzzz - a | zzzzzz - a | zzzzzz -(6 rows) - -SELECT relname, b.* FROM ONLY b, pg_class where b.tableoid = pg_class.oid; - relname | aa | bb ----------+-----+---- - b | new | - b | new | - b | new | - b | new | - b | new | - b | new | -(6 rows) - -SELECT relname, c.* FROM ONLY c, pg_class where c.tableoid = pg_class.oid; - relname | aa | cc ----------+----------+---- - c | ccc | - c | cccc | - c | ccccc | - c | cccccc | - c | ccccccc | - c | cccccccc | -(6 rows) - -SELECT relname, d.* FROM ONLY d, pg_class where d.tableoid = pg_class.oid; - relname | aa | bb | cc | dd ----------+-----+----+----+---- - d | new | | | - d | new | | | - d | new | | | - d | new | | | - d | new | | | - d | new | | | -(6 rows) - -UPDATE a SET aa='new'; -DELETE FROM ONLY c WHERE aa='new'; -SELECT relname, a.* FROM a, pg_class where a.tableoid = pg_class.oid; - relname | aa ----------+----- - a | new - a | new - a | new - a | new - a | new - a | new - b | new - b | new - b | new - b | new - b | new - b | new - d | new - d | new - d | new - d | new - d | new - d | new -(18 rows) - -SELECT relname, b.* FROM b, pg_class where b.tableoid = pg_class.oid; - relname | aa | bb ----------+-----+---- - b | new | - b | new | - b | new | - b | new | - b | new | - b | new | - d | new | - d | new | - d | new | - d | new | - d | new | - d | new | -(12 rows) - -SELECT relname, c.* FROM c, pg_class where c.tableoid = pg_class.oid; - relname | aa | cc ----------+-----+---- - d | new | - d | new | - d | new | - d | new | - d | new | - d | new | -(6 rows) - -SELECT relname, d.* FROM d, pg_class where d.tableoid = pg_class.oid; - relname | aa | bb | cc | dd ----------+-----+----+----+---- - d | new | | | - d | new | | | - d | new | | | - d | new | | | - d | new | | | - d | new | | | -(6 rows) - -SELECT relname, a.* FROM ONLY a, pg_class where a.tableoid = pg_class.oid; - relname | aa ----------+----- - a | new - a | new - a | new - a | new - a | new - a | new -(6 rows) - -SELECT relname, b.* FROM ONLY b, pg_class where b.tableoid = pg_class.oid; - relname | aa | bb ----------+-----+---- - b | new | - b | new | - b | new | - b | new | - b | new | - b | new | -(6 rows) - -SELECT relname, c.* FROM ONLY c, pg_class where c.tableoid = pg_class.oid; - relname | aa | cc ----------+----+---- -(0 rows) - -SELECT relname, d.* FROM ONLY d, pg_class where d.tableoid = pg_class.oid; - relname | aa | bb | cc | dd ----------+-----+----+----+---- - d | new | | | - d | new | | | - d | new | | | - d | new | | | - d | new | | | - d | new | | | -(6 rows) - -DELETE FROM a; -SELECT relname, a.* FROM a, pg_class where a.tableoid = pg_class.oid; - relname | aa ----------+---- -(0 rows) - -SELECT relname, b.* FROM b, pg_class where b.tableoid = pg_class.oid; - relname | aa | bb ----------+----+---- -(0 rows) - -SELECT relname, c.* FROM c, pg_class where c.tableoid = pg_class.oid; - relname | aa | cc ----------+----+---- -(0 rows) - -SELECT relname, d.* FROM d, pg_class where d.tableoid = pg_class.oid; - relname | aa | bb | cc | dd ----------+----+----+----+---- -(0 rows) - -SELECT relname, a.* FROM ONLY a, pg_class where a.tableoid = pg_class.oid; - relname | aa ----------+---- -(0 rows) - -SELECT relname, b.* FROM ONLY b, pg_class where b.tableoid = pg_class.oid; - relname | aa | bb ----------+----+---- -(0 rows) - -SELECT relname, c.* FROM ONLY c, pg_class where c.tableoid = pg_class.oid; - relname | aa | cc ----------+----+---- -(0 rows) - -SELECT relname, d.* FROM ONLY d, pg_class where d.tableoid = pg_class.oid; - relname | aa | bb | cc | dd ----------+----+----+----+---- -(0 rows) - --- Confirm PRIMARY KEY adds NOT NULL constraint to child table -CREATE TEMP TABLE z (b TEXT, PRIMARY KEY(aa, b)) inherits (a); -INSERT INTO z VALUES (NULL, 'text'); -- should fail -ERROR: null value in column "aa" of relation "z" violates not-null constraint -DETAIL: Failing row contains (null, text). --- Check inherited UPDATE with all children excluded -create table some_tab (a int, b int); -create table some_tab_child () inherits (some_tab); -insert into some_tab_child values(1,2); -explain (verbose, costs off) -update some_tab set a = a + 1 where false; - QUERY PLAN --------------------------------------------------------- - Update on public.some_tab - -> Result - Output: (some_tab.a + 1), NULL::oid, NULL::tid - One-Time Filter: false -(4 rows) - -update some_tab set a = a + 1 where false; -explain (verbose, costs off) -update some_tab set a = a + 1 where false returning b, a; - QUERY PLAN --------------------------------------------------------- - Update on public.some_tab - Output: some_tab.b, some_tab.a - -> Result - Output: (some_tab.a + 1), NULL::oid, NULL::tid - One-Time Filter: false -(5 rows) - -update some_tab set a = a + 1 where false returning b, a; - b | a ----+--- -(0 rows) - -table some_tab; - a | b ----+--- - 1 | 2 -(1 row) - -drop table some_tab cascade; -NOTICE: drop cascades to table some_tab_child --- Check UPDATE with inherited target and an inherited source table -create temp table foo(f1 int, f2 int); -create temp table foo2(f3 int) inherits (foo); -create temp table bar(f1 int, f2 int); -create temp table bar2(f3 int) inherits (bar); -insert into foo values(1,1); -insert into foo values(3,3); -insert into foo2 values(2,2,2); -insert into foo2 values(3,3,3); -insert into bar values(1,1); -insert into bar values(2,2); -insert into bar values(3,3); -insert into bar values(4,4); -insert into bar2 values(1,1,1); -insert into bar2 values(2,2,2); -insert into bar2 values(3,3,3); -insert into bar2 values(4,4,4); -update bar set f2 = f2 + 100 where f1 in (select f1 from foo); -select tableoid::regclass::text as relname, bar.* from bar order by 1,2; - relname | f1 | f2 ----------+----+----- - bar | 1 | 101 - bar | 2 | 102 - bar | 3 | 103 - bar | 4 | 4 - bar2 | 1 | 101 - bar2 | 2 | 102 - bar2 | 3 | 103 - bar2 | 4 | 4 -(8 rows) - --- Check UPDATE with inherited target and an appendrel subquery -update bar set f2 = f2 + 100 -from - ( select f1 from foo union all select f1+3 from foo ) ss -where bar.f1 = ss.f1; -select tableoid::regclass::text as relname, bar.* from bar order by 1,2; - relname | f1 | f2 ----------+----+----- - bar | 1 | 201 - bar | 2 | 202 - bar | 3 | 203 - bar | 4 | 104 - bar2 | 1 | 201 - bar2 | 2 | 202 - bar2 | 3 | 203 - bar2 | 4 | 104 -(8 rows) - --- Check UPDATE with *partitioned* inherited target and an appendrel subquery -create table some_tab (a int); -insert into some_tab values (0); -create table some_tab_child () inherits (some_tab); -insert into some_tab_child values (1); -create table parted_tab (a int, b char) partition by list (a); -create table parted_tab_part1 partition of parted_tab for values in (1); -create table parted_tab_part2 partition of parted_tab for values in (2); -create table parted_tab_part3 partition of parted_tab for values in (3); -insert into parted_tab values (1, 'a'), (2, 'a'), (3, 'a'); -update parted_tab set b = 'b' -from - (select a from some_tab union all select a+1 from some_tab) ss (a) -where parted_tab.a = ss.a; -select tableoid::regclass::text as relname, parted_tab.* from parted_tab order by 1,2; - relname | a | b -------------------+---+--- - parted_tab_part1 | 1 | b - parted_tab_part2 | 2 | b - parted_tab_part3 | 3 | a -(3 rows) - -truncate parted_tab; -insert into parted_tab values (1, 'a'), (2, 'a'), (3, 'a'); -update parted_tab set b = 'b' -from - (select 0 from parted_tab union all select 1 from parted_tab) ss (a) -where parted_tab.a = ss.a; -select tableoid::regclass::text as relname, parted_tab.* from parted_tab order by 1,2; - relname | a | b -------------------+---+--- - parted_tab_part1 | 1 | b - parted_tab_part2 | 2 | a - parted_tab_part3 | 3 | a -(3 rows) - --- modifies partition key, but no rows will actually be updated -explain update parted_tab set a = 2 where false; - QUERY PLAN --------------------------------------------------------- - Update on parted_tab (cost=0.00..0.00 rows=0 width=0) - -> Result (cost=0.00..0.00 rows=0 width=10) - One-Time Filter: false -(3 rows) - -drop table parted_tab; --- Check UPDATE with multi-level partitioned inherited target -create table mlparted_tab (a int, b char, c text) partition by list (a); -create table mlparted_tab_part1 partition of mlparted_tab for values in (1); -create table mlparted_tab_part2 partition of mlparted_tab for values in (2) partition by list (b); -create table mlparted_tab_part3 partition of mlparted_tab for values in (3); -create table mlparted_tab_part2a partition of mlparted_tab_part2 for values in ('a'); -create table mlparted_tab_part2b partition of mlparted_tab_part2 for values in ('b'); -insert into mlparted_tab values (1, 'a'), (2, 'a'), (2, 'b'), (3, 'a'); -update mlparted_tab mlp set c = 'xxx' -from - (select a from some_tab union all select a+1 from some_tab) ss (a) -where (mlp.a = ss.a and mlp.b = 'b') or mlp.a = 3; -select tableoid::regclass::text as relname, mlparted_tab.* from mlparted_tab order by 1,2; - relname | a | b | c ----------------------+---+---+----- - mlparted_tab_part1 | 1 | a | - mlparted_tab_part2a | 2 | a | - mlparted_tab_part2b | 2 | b | xxx - mlparted_tab_part3 | 3 | a | xxx -(4 rows) - -drop table mlparted_tab; -drop table some_tab cascade; -NOTICE: drop cascades to table some_tab_child -/* Test multiple inheritance of column defaults */ -CREATE TABLE firstparent (tomorrow date default now()::date + 1); -CREATE TABLE secondparent (tomorrow date default now() :: date + 1); -CREATE TABLE jointchild () INHERITS (firstparent, secondparent); -- ok -NOTICE: merging multiple inherited definitions of column "tomorrow" -CREATE TABLE thirdparent (tomorrow date default now()::date - 1); -CREATE TABLE otherchild () INHERITS (firstparent, thirdparent); -- not ok -NOTICE: merging multiple inherited definitions of column "tomorrow" -ERROR: column "tomorrow" inherits conflicting default values -HINT: To resolve the conflict, specify a default explicitly. -CREATE TABLE otherchild (tomorrow date default now()) - INHERITS (firstparent, thirdparent); -- ok, child resolves ambiguous default -NOTICE: merging multiple inherited definitions of column "tomorrow" -NOTICE: merging column "tomorrow" with inherited definition -DROP TABLE firstparent, secondparent, jointchild, thirdparent, otherchild; --- Test changing the type of inherited columns -insert into d values('test','one','two','three'); -alter table a alter column aa type integer using bit_length(aa); -select * from d; - aa | bb | cc | dd -----+-----+-----+------- - 32 | one | two | three -(1 row) - --- The above verified that we can change the type of a multiply-inherited --- column; but we should reject that if any definition was inherited from --- an unrelated parent. -create temp table parent1(f1 int, f2 int); -create temp table parent2(f1 int, f3 bigint); -create temp table childtab(f4 int) inherits(parent1, parent2); -NOTICE: merging multiple inherited definitions of column "f1" -alter table parent1 alter column f1 type bigint; -- fail, conflict w/parent2 -ERROR: cannot alter inherited column "f1" of relation "childtab" -alter table parent1 alter column f2 type bigint; -- ok --- Test non-inheritable parent constraints -create table p1(ff1 int); -alter table p1 add constraint p1chk check (ff1 > 0) no inherit; -alter table p1 add constraint p2chk check (ff1 > 10); --- connoinherit should be true for NO INHERIT constraint -select pc.relname, pgc.conname, pgc.contype, pgc.conislocal, pgc.coninhcount, pgc.connoinherit from pg_class as pc inner join pg_constraint as pgc on (pgc.conrelid = pc.oid) where pc.relname = 'p1' order by 1,2; - relname | conname | contype | conislocal | coninhcount | connoinherit ----------+---------+---------+------------+-------------+-------------- - p1 | p1chk | c | t | 0 | t - p1 | p2chk | c | t | 0 | f -(2 rows) - --- Test that child does not inherit NO INHERIT constraints -create table c1 () inherits (p1); -\d p1 - Table "public.p1" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - ff1 | integer | | | -Check constraints: - "p1chk" CHECK (ff1 > 0) NO INHERIT - "p2chk" CHECK (ff1 > 10) -Number of child tables: 1 (Use \d+ to list them.) - -\d c1 - Table "public.c1" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - ff1 | integer | | | -Check constraints: - "p2chk" CHECK (ff1 > 10) -Inherits: p1 - --- Test that child does not override inheritable constraints of the parent -create table c2 (constraint p2chk check (ff1 > 10) no inherit) inherits (p1); --fails -ERROR: constraint "p2chk" conflicts with inherited constraint on relation "c2" -drop table p1 cascade; -NOTICE: drop cascades to table c1 --- Tests for casting between the rowtypes of parent and child --- tables. See the pgsql-hackers thread beginning Dec. 4/04 -create table base (i integer); -create table derived () inherits (base); -create table more_derived (like derived, b int) inherits (derived); -NOTICE: merging column "i" with inherited definition -insert into derived (i) values (0); -select derived::base from derived; - derived ---------- - (0) -(1 row) - -select NULL::derived::base; - base ------- - -(1 row) - --- remove redundant conversions. -explain (verbose on, costs off) select row(i, b)::more_derived::derived::base from more_derived; - QUERY PLAN -------------------------------------------- - Seq Scan on public.more_derived - Output: (ROW(i, b)::more_derived)::base -(2 rows) - -explain (verbose on, costs off) select (1, 2)::more_derived::derived::base; - QUERY PLAN ------------------------ - Result - Output: '(1)'::base -(2 rows) - -drop table more_derived; -drop table derived; -drop table base; -create table p1(ff1 int); -create table p2(f1 text); -create function p2text(p2) returns text as 'select $1.f1' language sql; -create table c1(f3 int) inherits(p1,p2); -insert into c1 values(123456789, 'hi', 42); -select p2text(c1.*) from c1; - p2text --------- - hi -(1 row) - -drop function p2text(p2); -drop table c1; -drop table p2; -drop table p1; -CREATE TABLE ac (aa TEXT); -alter table ac add constraint ac_check check (aa is not null); -CREATE TABLE bc (bb TEXT) INHERITS (ac); -select pc.relname, pgc.conname, pgc.contype, pgc.conislocal, pgc.coninhcount, pg_get_expr(pgc.conbin, pc.oid) as consrc from pg_class as pc inner join pg_constraint as pgc on (pgc.conrelid = pc.oid) where pc.relname in ('ac', 'bc') order by 1,2; - relname | conname | contype | conislocal | coninhcount | consrc ----------+----------+---------+------------+-------------+------------------ - ac | ac_check | c | t | 0 | (aa IS NOT NULL) - bc | ac_check | c | f | 1 | (aa IS NOT NULL) -(2 rows) - -insert into ac (aa) values (NULL); -ERROR: new row for relation "ac" violates check constraint "ac_check" -DETAIL: Failing row contains (null). -insert into bc (aa) values (NULL); -ERROR: new row for relation "bc" violates check constraint "ac_check" -DETAIL: Failing row contains (null, null). -alter table bc drop constraint ac_check; -- fail, disallowed -ERROR: cannot drop inherited constraint "ac_check" of relation "bc" -alter table ac drop constraint ac_check; -select pc.relname, pgc.conname, pgc.contype, pgc.conislocal, pgc.coninhcount, pg_get_expr(pgc.conbin, pc.oid) as consrc from pg_class as pc inner join pg_constraint as pgc on (pgc.conrelid = pc.oid) where pc.relname in ('ac', 'bc') order by 1,2; - relname | conname | contype | conislocal | coninhcount | consrc ----------+---------+---------+------------+-------------+-------- -(0 rows) - --- try the unnamed-constraint case -alter table ac add check (aa is not null); -select pc.relname, pgc.conname, pgc.contype, pgc.conislocal, pgc.coninhcount, pg_get_expr(pgc.conbin, pc.oid) as consrc from pg_class as pc inner join pg_constraint as pgc on (pgc.conrelid = pc.oid) where pc.relname in ('ac', 'bc') order by 1,2; - relname | conname | contype | conislocal | coninhcount | consrc ----------+-------------+---------+------------+-------------+------------------ - ac | ac_aa_check | c | t | 0 | (aa IS NOT NULL) - bc | ac_aa_check | c | f | 1 | (aa IS NOT NULL) -(2 rows) - -insert into ac (aa) values (NULL); -ERROR: new row for relation "ac" violates check constraint "ac_aa_check" -DETAIL: Failing row contains (null). -insert into bc (aa) values (NULL); -ERROR: new row for relation "bc" violates check constraint "ac_aa_check" -DETAIL: Failing row contains (null, null). -alter table bc drop constraint ac_aa_check; -- fail, disallowed -ERROR: cannot drop inherited constraint "ac_aa_check" of relation "bc" -alter table ac drop constraint ac_aa_check; -select pc.relname, pgc.conname, pgc.contype, pgc.conislocal, pgc.coninhcount, pg_get_expr(pgc.conbin, pc.oid) as consrc from pg_class as pc inner join pg_constraint as pgc on (pgc.conrelid = pc.oid) where pc.relname in ('ac', 'bc') order by 1,2; - relname | conname | contype | conislocal | coninhcount | consrc ----------+---------+---------+------------+-------------+-------- -(0 rows) - -alter table ac add constraint ac_check check (aa is not null); -alter table bc no inherit ac; -select pc.relname, pgc.conname, pgc.contype, pgc.conislocal, pgc.coninhcount, pg_get_expr(pgc.conbin, pc.oid) as consrc from pg_class as pc inner join pg_constraint as pgc on (pgc.conrelid = pc.oid) where pc.relname in ('ac', 'bc') order by 1,2; - relname | conname | contype | conislocal | coninhcount | consrc ----------+----------+---------+------------+-------------+------------------ - ac | ac_check | c | t | 0 | (aa IS NOT NULL) - bc | ac_check | c | t | 0 | (aa IS NOT NULL) -(2 rows) - -alter table bc drop constraint ac_check; -select pc.relname, pgc.conname, pgc.contype, pgc.conislocal, pgc.coninhcount, pg_get_expr(pgc.conbin, pc.oid) as consrc from pg_class as pc inner join pg_constraint as pgc on (pgc.conrelid = pc.oid) where pc.relname in ('ac', 'bc') order by 1,2; - relname | conname | contype | conislocal | coninhcount | consrc ----------+----------+---------+------------+-------------+------------------ - ac | ac_check | c | t | 0 | (aa IS NOT NULL) -(1 row) - -alter table ac drop constraint ac_check; -select pc.relname, pgc.conname, pgc.contype, pgc.conislocal, pgc.coninhcount, pg_get_expr(pgc.conbin, pc.oid) as consrc from pg_class as pc inner join pg_constraint as pgc on (pgc.conrelid = pc.oid) where pc.relname in ('ac', 'bc') order by 1,2; - relname | conname | contype | conislocal | coninhcount | consrc ----------+---------+---------+------------+-------------+-------- -(0 rows) - -drop table bc; -drop table ac; -create table ac (a int constraint check_a check (a <> 0)); -create table bc (a int constraint check_a check (a <> 0), b int constraint check_b check (b <> 0)) inherits (ac); -NOTICE: merging column "a" with inherited definition -NOTICE: merging constraint "check_a" with inherited definition -select pc.relname, pgc.conname, pgc.contype, pgc.conislocal, pgc.coninhcount, pg_get_expr(pgc.conbin, pc.oid) as consrc from pg_class as pc inner join pg_constraint as pgc on (pgc.conrelid = pc.oid) where pc.relname in ('ac', 'bc') order by 1,2; - relname | conname | contype | conislocal | coninhcount | consrc ----------+---------+---------+------------+-------------+---------- - ac | check_a | c | t | 0 | (a <> 0) - bc | check_a | c | t | 1 | (a <> 0) - bc | check_b | c | t | 0 | (b <> 0) -(3 rows) - -drop table bc; -drop table ac; -create table ac (a int constraint check_a check (a <> 0)); -create table bc (b int constraint check_b check (b <> 0)); -create table cc (c int constraint check_c check (c <> 0)) inherits (ac, bc); -select pc.relname, pgc.conname, pgc.contype, pgc.conislocal, pgc.coninhcount, pg_get_expr(pgc.conbin, pc.oid) as consrc from pg_class as pc inner join pg_constraint as pgc on (pgc.conrelid = pc.oid) where pc.relname in ('ac', 'bc', 'cc') order by 1,2; - relname | conname | contype | conislocal | coninhcount | consrc ----------+---------+---------+------------+-------------+---------- - ac | check_a | c | t | 0 | (a <> 0) - bc | check_b | c | t | 0 | (b <> 0) - cc | check_a | c | f | 1 | (a <> 0) - cc | check_b | c | f | 1 | (b <> 0) - cc | check_c | c | t | 0 | (c <> 0) -(5 rows) - -alter table cc no inherit bc; -select pc.relname, pgc.conname, pgc.contype, pgc.conislocal, pgc.coninhcount, pg_get_expr(pgc.conbin, pc.oid) as consrc from pg_class as pc inner join pg_constraint as pgc on (pgc.conrelid = pc.oid) where pc.relname in ('ac', 'bc', 'cc') order by 1,2; - relname | conname | contype | conislocal | coninhcount | consrc ----------+---------+---------+------------+-------------+---------- - ac | check_a | c | t | 0 | (a <> 0) - bc | check_b | c | t | 0 | (b <> 0) - cc | check_a | c | f | 1 | (a <> 0) - cc | check_b | c | t | 0 | (b <> 0) - cc | check_c | c | t | 0 | (c <> 0) -(5 rows) - -drop table cc; -drop table bc; -drop table ac; -create table p1(f1 int); -create table p2(f2 int); -create table c1(f3 int) inherits(p1,p2); -insert into c1 values(1,-1,2); -alter table p2 add constraint cc check (f2>0); -- fail -ERROR: check constraint "cc" of relation "c1" is violated by some row -alter table p2 add check (f2>0); -- check it without a name, too -ERROR: check constraint "p2_f2_check" of relation "c1" is violated by some row -delete from c1; -insert into c1 values(1,1,2); -alter table p2 add check (f2>0); -insert into c1 values(1,-1,2); -- fail -ERROR: new row for relation "c1" violates check constraint "p2_f2_check" -DETAIL: Failing row contains (1, -1, 2). -create table c2(f3 int) inherits(p1,p2); -\d c2 - Table "public.c2" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - f1 | integer | | | - f2 | integer | | | - f3 | integer | | | -Check constraints: - "p2_f2_check" CHECK (f2 > 0) -Inherits: p1, - p2 - -create table c3 (f4 int) inherits(c1,c2); -NOTICE: merging multiple inherited definitions of column "f1" -NOTICE: merging multiple inherited definitions of column "f2" -NOTICE: merging multiple inherited definitions of column "f3" -\d c3 - Table "public.c3" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - f1 | integer | | | - f2 | integer | | | - f3 | integer | | | - f4 | integer | | | -Check constraints: - "p2_f2_check" CHECK (f2 > 0) -Inherits: c1, - c2 - -drop table p1 cascade; -NOTICE: drop cascades to 3 other objects -DETAIL: drop cascades to table c1 -drop cascades to table c2 -drop cascades to table c3 -drop table p2 cascade; -create table pp1 (f1 int); -create table cc1 (f2 text, f3 int) inherits (pp1); -alter table pp1 add column a1 int check (a1 > 0); -\d cc1 - Table "public.cc1" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - f1 | integer | | | - f2 | text | | | - f3 | integer | | | - a1 | integer | | | -Check constraints: - "pp1_a1_check" CHECK (a1 > 0) -Inherits: pp1 - -create table cc2(f4 float) inherits(pp1,cc1); -NOTICE: merging multiple inherited definitions of column "f1" -NOTICE: merging multiple inherited definitions of column "a1" -\d cc2 - Table "public.cc2" - Column | Type | Collation | Nullable | Default ---------+------------------+-----------+----------+--------- - f1 | integer | | | - a1 | integer | | | - f2 | text | | | - f3 | integer | | | - f4 | double precision | | | -Check constraints: - "pp1_a1_check" CHECK (a1 > 0) -Inherits: pp1, - cc1 - -alter table pp1 add column a2 int check (a2 > 0); -NOTICE: merging definition of column "a2" for child "cc2" -NOTICE: merging constraint "pp1_a2_check" with inherited definition -\d cc2 - Table "public.cc2" - Column | Type | Collation | Nullable | Default ---------+------------------+-----------+----------+--------- - f1 | integer | | | - a1 | integer | | | - f2 | text | | | - f3 | integer | | | - f4 | double precision | | | - a2 | integer | | | -Check constraints: - "pp1_a1_check" CHECK (a1 > 0) - "pp1_a2_check" CHECK (a2 > 0) -Inherits: pp1, - cc1 - -drop table pp1 cascade; -NOTICE: drop cascades to 2 other objects -DETAIL: drop cascades to table cc1 -drop cascades to table cc2 --- Test for renaming in simple multiple inheritance -CREATE TABLE inht1 (a int, b int); -CREATE TABLE inhs1 (b int, c int); -CREATE TABLE inhts (d int) INHERITS (inht1, inhs1); -NOTICE: merging multiple inherited definitions of column "b" -ALTER TABLE inht1 RENAME a TO aa; -ALTER TABLE inht1 RENAME b TO bb; -- to be failed -ERROR: cannot rename inherited column "b" -ALTER TABLE inhts RENAME aa TO aaa; -- to be failed -ERROR: cannot rename inherited column "aa" -ALTER TABLE inhts RENAME d TO dd; -\d+ inhts - Table "public.inhts" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+---------+---------+--------------+------------- - aa | integer | | | | plain | | - b | integer | | | | plain | | - c | integer | | | | plain | | - dd | integer | | | | plain | | -Inherits: inht1, - inhs1 - -DROP TABLE inhts; --- Test for renaming in diamond inheritance -CREATE TABLE inht2 (x int) INHERITS (inht1); -CREATE TABLE inht3 (y int) INHERITS (inht1); -CREATE TABLE inht4 (z int) INHERITS (inht2, inht3); -NOTICE: merging multiple inherited definitions of column "aa" -NOTICE: merging multiple inherited definitions of column "b" -ALTER TABLE inht1 RENAME aa TO aaa; -\d+ inht4 - Table "public.inht4" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+---------+---------+--------------+------------- - aaa | integer | | | | plain | | - b | integer | | | | plain | | - x | integer | | | | plain | | - y | integer | | | | plain | | - z | integer | | | | plain | | -Inherits: inht2, - inht3 - -CREATE TABLE inhts (d int) INHERITS (inht2, inhs1); -NOTICE: merging multiple inherited definitions of column "b" -ALTER TABLE inht1 RENAME aaa TO aaaa; -ALTER TABLE inht1 RENAME b TO bb; -- to be failed -ERROR: cannot rename inherited column "b" -\d+ inhts - Table "public.inhts" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+---------+---------+--------------+------------- - aaaa | integer | | | | plain | | - b | integer | | | | plain | | - x | integer | | | | plain | | - c | integer | | | | plain | | - d | integer | | | | plain | | -Inherits: inht2, - inhs1 - -WITH RECURSIVE r AS ( - SELECT 'inht1'::regclass AS inhrelid -UNION ALL - SELECT c.inhrelid FROM pg_inherits c, r WHERE r.inhrelid = c.inhparent -) -SELECT a.attrelid::regclass, a.attname, a.attinhcount, e.expected - FROM (SELECT inhrelid, count(*) AS expected FROM pg_inherits - WHERE inhparent IN (SELECT inhrelid FROM r) GROUP BY inhrelid) e - JOIN pg_attribute a ON e.inhrelid = a.attrelid WHERE NOT attislocal - ORDER BY a.attrelid::regclass::name, a.attnum; - attrelid | attname | attinhcount | expected -----------+---------+-------------+---------- - inht2 | aaaa | 1 | 1 - inht2 | b | 1 | 1 - inht3 | aaaa | 1 | 1 - inht3 | b | 1 | 1 - inht4 | aaaa | 2 | 2 - inht4 | b | 2 | 2 - inht4 | x | 1 | 2 - inht4 | y | 1 | 2 - inhts | aaaa | 1 | 1 - inhts | b | 2 | 1 - inhts | x | 1 | 1 - inhts | c | 1 | 1 -(12 rows) - -DROP TABLE inht1, inhs1 CASCADE; -NOTICE: drop cascades to 4 other objects -DETAIL: drop cascades to table inht2 -drop cascades to table inhts -drop cascades to table inht3 -drop cascades to table inht4 --- Test non-inheritable indices [UNIQUE, EXCLUDE] constraints -CREATE TABLE test_constraints (id int, val1 varchar, val2 int, UNIQUE(val1, val2)); -CREATE TABLE test_constraints_inh () INHERITS (test_constraints); -\d+ test_constraints - Table "public.test_constraints" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+-------------------+-----------+----------+---------+----------+--------------+------------- - id | integer | | | | plain | | - val1 | character varying | | | | extended | | - val2 | integer | | | | plain | | -Indexes: - "test_constraints_val1_val2_key" UNIQUE CONSTRAINT, btree (val1, val2) -Child tables: test_constraints_inh - -ALTER TABLE ONLY test_constraints DROP CONSTRAINT test_constraints_val1_val2_key; -\d+ test_constraints - Table "public.test_constraints" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+-------------------+-----------+----------+---------+----------+--------------+------------- - id | integer | | | | plain | | - val1 | character varying | | | | extended | | - val2 | integer | | | | plain | | -Child tables: test_constraints_inh - -\d+ test_constraints_inh - Table "public.test_constraints_inh" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+-------------------+-----------+----------+---------+----------+--------------+------------- - id | integer | | | | plain | | - val1 | character varying | | | | extended | | - val2 | integer | | | | plain | | -Inherits: test_constraints - -DROP TABLE test_constraints_inh; -DROP TABLE test_constraints; -CREATE TABLE test_ex_constraints ( - c circle, - EXCLUDE USING gist (c WITH &&) -); -CREATE TABLE test_ex_constraints_inh () INHERITS (test_ex_constraints); -\d+ test_ex_constraints - Table "public.test_ex_constraints" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+--------+-----------+----------+---------+---------+--------------+------------- - c | circle | | | | plain | | -Indexes: - "test_ex_constraints_c_excl" EXCLUDE USING gist (c WITH &&) -Child tables: test_ex_constraints_inh - -ALTER TABLE test_ex_constraints DROP CONSTRAINT test_ex_constraints_c_excl; -\d+ test_ex_constraints - Table "public.test_ex_constraints" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+--------+-----------+----------+---------+---------+--------------+------------- - c | circle | | | | plain | | -Child tables: test_ex_constraints_inh - -\d+ test_ex_constraints_inh - Table "public.test_ex_constraints_inh" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+--------+-----------+----------+---------+---------+--------------+------------- - c | circle | | | | plain | | -Inherits: test_ex_constraints - -DROP TABLE test_ex_constraints_inh; -DROP TABLE test_ex_constraints; --- Test non-inheritable foreign key constraints -CREATE TABLE test_primary_constraints(id int PRIMARY KEY); -CREATE TABLE test_foreign_constraints(id1 int REFERENCES test_primary_constraints(id)); -CREATE TABLE test_foreign_constraints_inh () INHERITS (test_foreign_constraints); -\d+ test_primary_constraints - Table "public.test_primary_constraints" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+---------+---------+--------------+------------- - id | integer | | not null | | plain | | -Indexes: - "test_primary_constraints_pkey" PRIMARY KEY, btree (id) -Referenced by: - TABLE "test_foreign_constraints" CONSTRAINT "test_foreign_constraints_id1_fkey" FOREIGN KEY (id1) REFERENCES test_primary_constraints(id) - -\d+ test_foreign_constraints - Table "public.test_foreign_constraints" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+---------+---------+--------------+------------- - id1 | integer | | | | plain | | -Foreign-key constraints: - "test_foreign_constraints_id1_fkey" FOREIGN KEY (id1) REFERENCES test_primary_constraints(id) -Child tables: test_foreign_constraints_inh - -ALTER TABLE test_foreign_constraints DROP CONSTRAINT test_foreign_constraints_id1_fkey; -\d+ test_foreign_constraints - Table "public.test_foreign_constraints" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+---------+---------+--------------+------------- - id1 | integer | | | | plain | | -Child tables: test_foreign_constraints_inh - -\d+ test_foreign_constraints_inh - Table "public.test_foreign_constraints_inh" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+---------+---------+--------------+------------- - id1 | integer | | | | plain | | -Inherits: test_foreign_constraints - -DROP TABLE test_foreign_constraints_inh; -DROP TABLE test_foreign_constraints; -DROP TABLE test_primary_constraints; --- Test foreign key behavior -create table inh_fk_1 (a int primary key); -insert into inh_fk_1 values (1), (2), (3); -create table inh_fk_2 (x int primary key, y int references inh_fk_1 on delete cascade); -insert into inh_fk_2 values (11, 1), (22, 2), (33, 3); -create table inh_fk_2_child () inherits (inh_fk_2); -insert into inh_fk_2_child values (111, 1), (222, 2); -delete from inh_fk_1 where a = 1; -select * from inh_fk_1 order by 1; - a ---- - 2 - 3 -(2 rows) - -select * from inh_fk_2 order by 1, 2; - x | y ------+--- - 22 | 2 - 33 | 3 - 111 | 1 - 222 | 2 -(4 rows) - -drop table inh_fk_1, inh_fk_2, inh_fk_2_child; --- Test that parent and child CHECK constraints can be created in either order -create table p1(f1 int); -create table p1_c1() inherits(p1); -alter table p1 add constraint inh_check_constraint1 check (f1 > 0); -alter table p1_c1 add constraint inh_check_constraint1 check (f1 > 0); -NOTICE: merging constraint "inh_check_constraint1" with inherited definition -alter table p1_c1 add constraint inh_check_constraint2 check (f1 < 10); -alter table p1 add constraint inh_check_constraint2 check (f1 < 10); -NOTICE: merging constraint "inh_check_constraint2" with inherited definition -select conrelid::regclass::text as relname, conname, conislocal, coninhcount -from pg_constraint where conname like 'inh\_check\_constraint%' -order by 1, 2; - relname | conname | conislocal | coninhcount ----------+-----------------------+------------+------------- - p1 | inh_check_constraint1 | t | 0 - p1 | inh_check_constraint2 | t | 0 - p1_c1 | inh_check_constraint1 | t | 1 - p1_c1 | inh_check_constraint2 | t | 1 -(4 rows) - -drop table p1 cascade; -NOTICE: drop cascades to table p1_c1 --- Test that a valid child can have not-valid parent, but not vice versa -create table invalid_check_con(f1 int); -create table invalid_check_con_child() inherits(invalid_check_con); -alter table invalid_check_con_child add constraint inh_check_constraint check(f1 > 0) not valid; -alter table invalid_check_con add constraint inh_check_constraint check(f1 > 0); -- fail -ERROR: constraint "inh_check_constraint" conflicts with NOT VALID constraint on relation "invalid_check_con_child" -alter table invalid_check_con_child drop constraint inh_check_constraint; -insert into invalid_check_con values(0); -alter table invalid_check_con_child add constraint inh_check_constraint check(f1 > 0); -alter table invalid_check_con add constraint inh_check_constraint check(f1 > 0) not valid; -NOTICE: merging constraint "inh_check_constraint" with inherited definition -insert into invalid_check_con values(0); -- fail -ERROR: new row for relation "invalid_check_con" violates check constraint "inh_check_constraint" -DETAIL: Failing row contains (0). -insert into invalid_check_con_child values(0); -- fail -ERROR: new row for relation "invalid_check_con_child" violates check constraint "inh_check_constraint" -DETAIL: Failing row contains (0). -select conrelid::regclass::text as relname, conname, - convalidated, conislocal, coninhcount, connoinherit -from pg_constraint where conname like 'inh\_check\_constraint%' -order by 1, 2; - relname | conname | convalidated | conislocal | coninhcount | connoinherit --------------------------+----------------------+--------------+------------+-------------+-------------- - invalid_check_con | inh_check_constraint | f | t | 0 | f - invalid_check_con_child | inh_check_constraint | t | t | 1 | f -(2 rows) - --- We don't drop the invalid_check_con* tables, to test dump/reload with --- --- Test parameterized append plans for inheritance trees --- -create temp table patest0 (id, x) as - select x, x from generate_series(0,1000) x; -create temp table patest1() inherits (patest0); -insert into patest1 - select x, x from generate_series(0,1000) x; -create temp table patest2() inherits (patest0); -insert into patest2 - select x, x from generate_series(0,1000) x; -create index patest0i on patest0(id); -create index patest1i on patest1(id); -create index patest2i on patest2(id); -analyze patest0; -analyze patest1; -analyze patest2; -explain (costs off) -select * from patest0 join (select f1 from int4_tbl limit 1) ss on id = f1; - QUERY PLAN ------------------------------------------------------------- - Nested Loop - -> Limit - -> Seq Scan on int4_tbl - -> Append - -> Index Scan using patest0i on patest0 patest0_1 - Index Cond: (id = int4_tbl.f1) - -> Index Scan using patest1i on patest1 patest0_2 - Index Cond: (id = int4_tbl.f1) - -> Index Scan using patest2i on patest2 patest0_3 - Index Cond: (id = int4_tbl.f1) -(10 rows) - -select * from patest0 join (select f1 from int4_tbl limit 1) ss on id = f1; - id | x | f1 -----+---+---- - 0 | 0 | 0 - 0 | 0 | 0 - 0 | 0 | 0 -(3 rows) - -drop index patest2i; -explain (costs off) -select * from patest0 join (select f1 from int4_tbl limit 1) ss on id = f1; - QUERY PLAN ------------------------------------------------------------- - Nested Loop - -> Limit - -> Seq Scan on int4_tbl - -> Append - -> Index Scan using patest0i on patest0 patest0_1 - Index Cond: (id = int4_tbl.f1) - -> Index Scan using patest1i on patest1 patest0_2 - Index Cond: (id = int4_tbl.f1) - -> Seq Scan on patest2 patest0_3 - Filter: (int4_tbl.f1 = id) -(10 rows) - -select * from patest0 join (select f1 from int4_tbl limit 1) ss on id = f1; - id | x | f1 -----+---+---- - 0 | 0 | 0 - 0 | 0 | 0 - 0 | 0 | 0 -(3 rows) - -drop table patest0 cascade; -NOTICE: drop cascades to 2 other objects -DETAIL: drop cascades to table patest1 -drop cascades to table patest2 --- --- Test merge-append plans for inheritance trees --- -create table matest0 (id serial primary key, name text); -create table matest1 (id integer primary key) inherits (matest0); -NOTICE: merging column "id" with inherited definition -create table matest2 (id integer primary key) inherits (matest0); -NOTICE: merging column "id" with inherited definition -create table matest3 (id integer primary key) inherits (matest0); -NOTICE: merging column "id" with inherited definition -create index matest0i on matest0 ((1-id)); -create index matest1i on matest1 ((1-id)); --- create index matest2i on matest2 ((1-id)); -- intentionally missing -create index matest3i on matest3 ((1-id)); -insert into matest1 (name) values ('Test 1'); -insert into matest1 (name) values ('Test 2'); -insert into matest2 (name) values ('Test 3'); -insert into matest2 (name) values ('Test 4'); -insert into matest3 (name) values ('Test 5'); -insert into matest3 (name) values ('Test 6'); -set enable_indexscan = off; -- force use of seqscan/sort, so no merge -explain (verbose, costs off) select * from matest0 order by 1-id; - QUERY PLAN ------------------------------------------------------------- - Sort - Output: matest0.id, matest0.name, ((1 - matest0.id)) - Sort Key: ((1 - matest0.id)) - -> Result - Output: matest0.id, matest0.name, (1 - matest0.id) - -> Append - -> Seq Scan on public.matest0 matest0_1 - Output: matest0_1.id, matest0_1.name - -> Seq Scan on public.matest1 matest0_2 - Output: matest0_2.id, matest0_2.name - -> Seq Scan on public.matest2 matest0_3 - Output: matest0_3.id, matest0_3.name - -> Seq Scan on public.matest3 matest0_4 - Output: matest0_4.id, matest0_4.name -(14 rows) - -select * from matest0 order by 1-id; - id | name -----+-------- - 6 | Test 6 - 5 | Test 5 - 4 | Test 4 - 3 | Test 3 - 2 | Test 2 - 1 | Test 1 -(6 rows) - -explain (verbose, costs off) select min(1-id) from matest0; - QUERY PLAN --------------------------------------------------- - Aggregate - Output: min((1 - matest0.id)) - -> Append - -> Seq Scan on public.matest0 matest0_1 - Output: matest0_1.id - -> Seq Scan on public.matest1 matest0_2 - Output: matest0_2.id - -> Seq Scan on public.matest2 matest0_3 - Output: matest0_3.id - -> Seq Scan on public.matest3 matest0_4 - Output: matest0_4.id -(11 rows) - -select min(1-id) from matest0; - min ------ - -5 -(1 row) - -reset enable_indexscan; -set enable_seqscan = off; -- plan with fewest seqscans should be merge -set enable_parallel_append = off; -- Don't let parallel-append interfere -explain (verbose, costs off) select * from matest0 order by 1-id; - QUERY PLAN ------------------------------------------------------------------------- - Merge Append - Sort Key: ((1 - matest0.id)) - -> Index Scan using matest0i on public.matest0 matest0_1 - Output: matest0_1.id, matest0_1.name, (1 - matest0_1.id) - -> Index Scan using matest1i on public.matest1 matest0_2 - Output: matest0_2.id, matest0_2.name, (1 - matest0_2.id) - -> Sort - Output: matest0_3.id, matest0_3.name, ((1 - matest0_3.id)) - Sort Key: ((1 - matest0_3.id)) - -> Seq Scan on public.matest2 matest0_3 - Output: matest0_3.id, matest0_3.name, (1 - matest0_3.id) - -> Index Scan using matest3i on public.matest3 matest0_4 - Output: matest0_4.id, matest0_4.name, (1 - matest0_4.id) -(13 rows) - -select * from matest0 order by 1-id; - id | name -----+-------- - 6 | Test 6 - 5 | Test 5 - 4 | Test 4 - 3 | Test 3 - 2 | Test 2 - 1 | Test 1 -(6 rows) - -explain (verbose, costs off) select min(1-id) from matest0; - QUERY PLAN ---------------------------------------------------------------------------------- - Result - Output: $0 - InitPlan 1 (returns $0) - -> Limit - Output: ((1 - matest0.id)) - -> Result - Output: ((1 - matest0.id)) - -> Merge Append - Sort Key: ((1 - matest0.id)) - -> Index Scan using matest0i on public.matest0 matest0_1 - Output: matest0_1.id, (1 - matest0_1.id) - Index Cond: ((1 - matest0_1.id) IS NOT NULL) - -> Index Scan using matest1i on public.matest1 matest0_2 - Output: matest0_2.id, (1 - matest0_2.id) - Index Cond: ((1 - matest0_2.id) IS NOT NULL) - -> Sort - Output: matest0_3.id, ((1 - matest0_3.id)) - Sort Key: ((1 - matest0_3.id)) - -> Bitmap Heap Scan on public.matest2 matest0_3 - Output: matest0_3.id, (1 - matest0_3.id) - Filter: ((1 - matest0_3.id) IS NOT NULL) - -> Bitmap Index Scan on matest2_pkey - -> Index Scan using matest3i on public.matest3 matest0_4 - Output: matest0_4.id, (1 - matest0_4.id) - Index Cond: ((1 - matest0_4.id) IS NOT NULL) -(25 rows) - -select min(1-id) from matest0; - min ------ - -5 -(1 row) - -reset enable_seqscan; -reset enable_parallel_append; -drop table matest0 cascade; -NOTICE: drop cascades to 3 other objects -DETAIL: drop cascades to table matest1 -drop cascades to table matest2 -drop cascades to table matest3 --- --- Check that use of an index with an extraneous column doesn't produce --- a plan with extraneous sorting --- -create table matest0 (a int, b int, c int, d int); -create table matest1 () inherits(matest0); -create index matest0i on matest0 (b, c); -create index matest1i on matest1 (b, c); -set enable_nestloop = off; -- we want a plan with two MergeAppends -explain (costs off) -select t1.* from matest0 t1, matest0 t2 -where t1.b = t2.b and t2.c = t2.d -order by t1.b limit 10; - QUERY PLAN -------------------------------------------------------------------- - Limit - -> Merge Join - Merge Cond: (t1.b = t2.b) - -> Merge Append - Sort Key: t1.b - -> Index Scan using matest0i on matest0 t1_1 - -> Index Scan using matest1i on matest1 t1_2 - -> Materialize - -> Merge Append - Sort Key: t2.b - -> Index Scan using matest0i on matest0 t2_1 - Filter: (c = d) - -> Index Scan using matest1i on matest1 t2_2 - Filter: (c = d) -(14 rows) - -reset enable_nestloop; -drop table matest0 cascade; -NOTICE: drop cascades to table matest1 --- --- Test merge-append for UNION ALL append relations --- -set enable_seqscan = off; -set enable_indexscan = on; -set enable_bitmapscan = off; --- Check handling of duplicated, constant, or volatile targetlist items -explain (costs off) -SELECT thousand, tenthous FROM tenk1 -UNION ALL -SELECT thousand, thousand FROM tenk1 -ORDER BY thousand, tenthous; - QUERY PLAN -------------------------------------------------------------------------- - Merge Append - Sort Key: tenk1.thousand, tenk1.tenthous - -> Index Only Scan using tenk1_thous_tenthous on tenk1 - -> Sort - Sort Key: tenk1_1.thousand, tenk1_1.thousand - -> Index Only Scan using tenk1_thous_tenthous on tenk1 tenk1_1 -(6 rows) - -explain (costs off) -SELECT thousand, tenthous, thousand+tenthous AS x FROM tenk1 -UNION ALL -SELECT 42, 42, hundred FROM tenk1 -ORDER BY thousand, tenthous; - QUERY PLAN ------------------------------------------------------------------- - Merge Append - Sort Key: tenk1.thousand, tenk1.tenthous - -> Index Only Scan using tenk1_thous_tenthous on tenk1 - -> Sort - Sort Key: 42, 42 - -> Index Only Scan using tenk1_hundred on tenk1 tenk1_1 -(6 rows) - -explain (costs off) -SELECT thousand, tenthous FROM tenk1 -UNION ALL -SELECT thousand, random()::integer FROM tenk1 -ORDER BY thousand, tenthous; - QUERY PLAN -------------------------------------------------------------------------- - Merge Append - Sort Key: tenk1.thousand, tenk1.tenthous - -> Index Only Scan using tenk1_thous_tenthous on tenk1 - -> Sort - Sort Key: tenk1_1.thousand, ((random())::integer) - -> Index Only Scan using tenk1_thous_tenthous on tenk1 tenk1_1 -(6 rows) - --- Check min/max aggregate optimization -explain (costs off) -SELECT min(x) FROM - (SELECT unique1 AS x FROM tenk1 a - UNION ALL - SELECT unique2 AS x FROM tenk1 b) s; - QUERY PLAN --------------------------------------------------------------------- - Result - InitPlan 1 (returns $0) - -> Limit - -> Merge Append - Sort Key: a.unique1 - -> Index Only Scan using tenk1_unique1 on tenk1 a - Index Cond: (unique1 IS NOT NULL) - -> Index Only Scan using tenk1_unique2 on tenk1 b - Index Cond: (unique2 IS NOT NULL) -(9 rows) - -explain (costs off) -SELECT min(y) FROM - (SELECT unique1 AS x, unique1 AS y FROM tenk1 a - UNION ALL - SELECT unique2 AS x, unique2 AS y FROM tenk1 b) s; - QUERY PLAN --------------------------------------------------------------------- - Result - InitPlan 1 (returns $0) - -> Limit - -> Merge Append - Sort Key: a.unique1 - -> Index Only Scan using tenk1_unique1 on tenk1 a - Index Cond: (unique1 IS NOT NULL) - -> Index Only Scan using tenk1_unique2 on tenk1 b - Index Cond: (unique2 IS NOT NULL) -(9 rows) - --- XXX planner doesn't recognize that index on unique2 is sufficiently sorted -explain (costs off) -SELECT x, y FROM - (SELECT thousand AS x, tenthous AS y FROM tenk1 a - UNION ALL - SELECT unique2 AS x, unique2 AS y FROM tenk1 b) s -ORDER BY x, y; - QUERY PLAN -------------------------------------------------------------- - Merge Append - Sort Key: a.thousand, a.tenthous - -> Index Only Scan using tenk1_thous_tenthous on tenk1 a - -> Sort - Sort Key: b.unique2, b.unique2 - -> Index Only Scan using tenk1_unique2 on tenk1 b -(6 rows) - --- exercise rescan code path via a repeatedly-evaluated subquery -explain (costs off) -SELECT - ARRAY(SELECT f.i FROM ( - (SELECT d + g.i FROM generate_series(4, 30, 3) d ORDER BY 1) - UNION ALL - (SELECT d + g.i FROM generate_series(0, 30, 5) d ORDER BY 1) - ) f(i) - ORDER BY f.i LIMIT 10) -FROM generate_series(1, 3) g(i); - QUERY PLAN ----------------------------------------------------------------- - Function Scan on generate_series g - SubPlan 1 - -> Limit - -> Merge Append - Sort Key: ((d.d + g.i)) - -> Sort - Sort Key: ((d.d + g.i)) - -> Function Scan on generate_series d - -> Sort - Sort Key: ((d_1.d + g.i)) - -> Function Scan on generate_series d_1 -(11 rows) - -SELECT - ARRAY(SELECT f.i FROM ( - (SELECT d + g.i FROM generate_series(4, 30, 3) d ORDER BY 1) - UNION ALL - (SELECT d + g.i FROM generate_series(0, 30, 5) d ORDER BY 1) - ) f(i) - ORDER BY f.i LIMIT 10) -FROM generate_series(1, 3) g(i); - array ------------------------------- - {1,5,6,8,11,11,14,16,17,20} - {2,6,7,9,12,12,15,17,18,21} - {3,7,8,10,13,13,16,18,19,22} -(3 rows) - -reset enable_seqscan; -reset enable_indexscan; -reset enable_bitmapscan; --- --- Check handling of a constant-null CHECK constraint --- -create table cnullparent (f1 int); -create table cnullchild (check (f1 = 1 or f1 = null)) inherits(cnullparent); -insert into cnullchild values(1); -insert into cnullchild values(2); -insert into cnullchild values(null); -select * from cnullparent; - f1 ----- - 1 - 2 - -(3 rows) - -select * from cnullparent where f1 = 2; - f1 ----- - 2 -(1 row) - -drop table cnullparent cascade; -NOTICE: drop cascades to table cnullchild --- --- Check use of temporary tables with inheritance trees --- -create table inh_perm_parent (a1 int); -create temp table inh_temp_parent (a1 int); -create temp table inh_temp_child () inherits (inh_perm_parent); -- ok -create table inh_perm_child () inherits (inh_temp_parent); -- error -ERROR: cannot inherit from temporary relation "inh_temp_parent" -create temp table inh_temp_child_2 () inherits (inh_temp_parent); -- ok -insert into inh_perm_parent values (1); -insert into inh_temp_parent values (2); -insert into inh_temp_child values (3); -insert into inh_temp_child_2 values (4); -select tableoid::regclass, a1 from inh_perm_parent; - tableoid | a1 ------------------+---- - inh_perm_parent | 1 - inh_temp_child | 3 -(2 rows) - -select tableoid::regclass, a1 from inh_temp_parent; - tableoid | a1 -------------------+---- - inh_temp_parent | 2 - inh_temp_child_2 | 4 -(2 rows) - -drop table inh_perm_parent cascade; -NOTICE: drop cascades to table inh_temp_child -drop table inh_temp_parent cascade; -NOTICE: drop cascades to table inh_temp_child_2 --- --- Check that constraint exclusion works correctly with partitions using --- implicit constraints generated from the partition bound information. --- -create table list_parted ( - a varchar -) partition by list (a); -create table part_ab_cd partition of list_parted for values in ('ab', 'cd'); -create table part_ef_gh partition of list_parted for values in ('ef', 'gh'); -create table part_null_xy partition of list_parted for values in (null, 'xy'); -explain (costs off) select * from list_parted; - QUERY PLAN ----------------------------------------------- - Append - -> Seq Scan on part_ab_cd list_parted_1 - -> Seq Scan on part_ef_gh list_parted_2 - -> Seq Scan on part_null_xy list_parted_3 -(4 rows) - -explain (costs off) select * from list_parted where a is null; - QUERY PLAN --------------------------------------- - Seq Scan on part_null_xy list_parted - Filter: (a IS NULL) -(2 rows) - -explain (costs off) select * from list_parted where a is not null; - QUERY PLAN ----------------------------------------------- - Append - -> Seq Scan on part_ab_cd list_parted_1 - Filter: (a IS NOT NULL) - -> Seq Scan on part_ef_gh list_parted_2 - Filter: (a IS NOT NULL) - -> Seq Scan on part_null_xy list_parted_3 - Filter: (a IS NOT NULL) -(7 rows) - -explain (costs off) select * from list_parted where a in ('ab', 'cd', 'ef'); - QUERY PLAN ----------------------------------------------------------- - Append - -> Seq Scan on part_ab_cd list_parted_1 - Filter: ((a)::text = ANY ('{ab,cd,ef}'::text[])) - -> Seq Scan on part_ef_gh list_parted_2 - Filter: ((a)::text = ANY ('{ab,cd,ef}'::text[])) -(5 rows) - -explain (costs off) select * from list_parted where a = 'ab' or a in (null, 'cd'); - QUERY PLAN ---------------------------------------------------------------------------------- - Seq Scan on part_ab_cd list_parted - Filter: (((a)::text = 'ab'::text) OR ((a)::text = ANY ('{NULL,cd}'::text[]))) -(2 rows) - -explain (costs off) select * from list_parted where a = 'ab'; - QUERY PLAN ------------------------------------- - Seq Scan on part_ab_cd list_parted - Filter: ((a)::text = 'ab'::text) -(2 rows) - -create table range_list_parted ( - a int, - b char(2) -) partition by range (a); -create table part_1_10 partition of range_list_parted for values from (1) to (10) partition by list (b); -create table part_1_10_ab partition of part_1_10 for values in ('ab'); -create table part_1_10_cd partition of part_1_10 for values in ('cd'); -create table part_10_20 partition of range_list_parted for values from (10) to (20) partition by list (b); -create table part_10_20_ab partition of part_10_20 for values in ('ab'); -create table part_10_20_cd partition of part_10_20 for values in ('cd'); -create table part_21_30 partition of range_list_parted for values from (21) to (30) partition by list (b); -create table part_21_30_ab partition of part_21_30 for values in ('ab'); -create table part_21_30_cd partition of part_21_30 for values in ('cd'); -create table part_40_inf partition of range_list_parted for values from (40) to (maxvalue) partition by list (b); -create table part_40_inf_ab partition of part_40_inf for values in ('ab'); -create table part_40_inf_cd partition of part_40_inf for values in ('cd'); -create table part_40_inf_null partition of part_40_inf for values in (null); -explain (costs off) select * from range_list_parted; - QUERY PLAN --------------------------------------------------------- - Append - -> Seq Scan on part_1_10_ab range_list_parted_1 - -> Seq Scan on part_1_10_cd range_list_parted_2 - -> Seq Scan on part_10_20_ab range_list_parted_3 - -> Seq Scan on part_10_20_cd range_list_parted_4 - -> Seq Scan on part_21_30_ab range_list_parted_5 - -> Seq Scan on part_21_30_cd range_list_parted_6 - -> Seq Scan on part_40_inf_ab range_list_parted_7 - -> Seq Scan on part_40_inf_cd range_list_parted_8 - -> Seq Scan on part_40_inf_null range_list_parted_9 -(10 rows) - -explain (costs off) select * from range_list_parted where a = 5; - QUERY PLAN ----------------------------------------------------- - Append - -> Seq Scan on part_1_10_ab range_list_parted_1 - Filter: (a = 5) - -> Seq Scan on part_1_10_cd range_list_parted_2 - Filter: (a = 5) -(5 rows) - -explain (costs off) select * from range_list_parted where b = 'ab'; - QUERY PLAN ------------------------------------------------------- - Append - -> Seq Scan on part_1_10_ab range_list_parted_1 - Filter: (b = 'ab'::bpchar) - -> Seq Scan on part_10_20_ab range_list_parted_2 - Filter: (b = 'ab'::bpchar) - -> Seq Scan on part_21_30_ab range_list_parted_3 - Filter: (b = 'ab'::bpchar) - -> Seq Scan on part_40_inf_ab range_list_parted_4 - Filter: (b = 'ab'::bpchar) -(9 rows) - -explain (costs off) select * from range_list_parted where a between 3 and 23 and b in ('ab'); - QUERY PLAN ------------------------------------------------------------------ - Append - -> Seq Scan on part_1_10_ab range_list_parted_1 - Filter: ((a >= 3) AND (a <= 23) AND (b = 'ab'::bpchar)) - -> Seq Scan on part_10_20_ab range_list_parted_2 - Filter: ((a >= 3) AND (a <= 23) AND (b = 'ab'::bpchar)) - -> Seq Scan on part_21_30_ab range_list_parted_3 - Filter: ((a >= 3) AND (a <= 23) AND (b = 'ab'::bpchar)) -(7 rows) - -/* Should select no rows because range partition key cannot be null */ -explain (costs off) select * from range_list_parted where a is null; - QUERY PLAN --------------------------- - Result - One-Time Filter: false -(2 rows) - -/* Should only select rows from the null-accepting partition */ -explain (costs off) select * from range_list_parted where b is null; - QUERY PLAN ------------------------------------------------- - Seq Scan on part_40_inf_null range_list_parted - Filter: (b IS NULL) -(2 rows) - -explain (costs off) select * from range_list_parted where a is not null and a < 67; - QUERY PLAN --------------------------------------------------------- - Append - -> Seq Scan on part_1_10_ab range_list_parted_1 - Filter: ((a IS NOT NULL) AND (a < 67)) - -> Seq Scan on part_1_10_cd range_list_parted_2 - Filter: ((a IS NOT NULL) AND (a < 67)) - -> Seq Scan on part_10_20_ab range_list_parted_3 - Filter: ((a IS NOT NULL) AND (a < 67)) - -> Seq Scan on part_10_20_cd range_list_parted_4 - Filter: ((a IS NOT NULL) AND (a < 67)) - -> Seq Scan on part_21_30_ab range_list_parted_5 - Filter: ((a IS NOT NULL) AND (a < 67)) - -> Seq Scan on part_21_30_cd range_list_parted_6 - Filter: ((a IS NOT NULL) AND (a < 67)) - -> Seq Scan on part_40_inf_ab range_list_parted_7 - Filter: ((a IS NOT NULL) AND (a < 67)) - -> Seq Scan on part_40_inf_cd range_list_parted_8 - Filter: ((a IS NOT NULL) AND (a < 67)) - -> Seq Scan on part_40_inf_null range_list_parted_9 - Filter: ((a IS NOT NULL) AND (a < 67)) -(19 rows) - -explain (costs off) select * from range_list_parted where a >= 30; - QUERY PLAN --------------------------------------------------------- - Append - -> Seq Scan on part_40_inf_ab range_list_parted_1 - Filter: (a >= 30) - -> Seq Scan on part_40_inf_cd range_list_parted_2 - Filter: (a >= 30) - -> Seq Scan on part_40_inf_null range_list_parted_3 - Filter: (a >= 30) -(7 rows) - -drop table list_parted; -drop table range_list_parted; --- check that constraint exclusion is able to cope with the partition --- constraint emitted for multi-column range partitioned tables -create table mcrparted (a int, b int, c int) partition by range (a, abs(b), c); -create table mcrparted_def partition of mcrparted default; -create table mcrparted0 partition of mcrparted for values from (minvalue, minvalue, minvalue) to (1, 1, 1); -create table mcrparted1 partition of mcrparted for values from (1, 1, 1) to (10, 5, 10); -create table mcrparted2 partition of mcrparted for values from (10, 5, 10) to (10, 10, 10); -create table mcrparted3 partition of mcrparted for values from (11, 1, 1) to (20, 10, 10); -create table mcrparted4 partition of mcrparted for values from (20, 10, 10) to (20, 20, 20); -create table mcrparted5 partition of mcrparted for values from (20, 20, 20) to (maxvalue, maxvalue, maxvalue); -explain (costs off) select * from mcrparted where a = 0; -- scans mcrparted0, mcrparted_def - QUERY PLAN ---------------------------------------------- - Append - -> Seq Scan on mcrparted0 mcrparted_1 - Filter: (a = 0) - -> Seq Scan on mcrparted_def mcrparted_2 - Filter: (a = 0) -(5 rows) - -explain (costs off) select * from mcrparted where a = 10 and abs(b) < 5; -- scans mcrparted1, mcrparted_def - QUERY PLAN ---------------------------------------------- - Append - -> Seq Scan on mcrparted1 mcrparted_1 - Filter: ((a = 10) AND (abs(b) < 5)) - -> Seq Scan on mcrparted_def mcrparted_2 - Filter: ((a = 10) AND (abs(b) < 5)) -(5 rows) - -explain (costs off) select * from mcrparted where a = 10 and abs(b) = 5; -- scans mcrparted1, mcrparted2, mcrparted_def - QUERY PLAN ---------------------------------------------- - Append - -> Seq Scan on mcrparted1 mcrparted_1 - Filter: ((a = 10) AND (abs(b) = 5)) - -> Seq Scan on mcrparted2 mcrparted_2 - Filter: ((a = 10) AND (abs(b) = 5)) - -> Seq Scan on mcrparted_def mcrparted_3 - Filter: ((a = 10) AND (abs(b) = 5)) -(7 rows) - -explain (costs off) select * from mcrparted where abs(b) = 5; -- scans all partitions - QUERY PLAN ---------------------------------------------- - Append - -> Seq Scan on mcrparted0 mcrparted_1 - Filter: (abs(b) = 5) - -> Seq Scan on mcrparted1 mcrparted_2 - Filter: (abs(b) = 5) - -> Seq Scan on mcrparted2 mcrparted_3 - Filter: (abs(b) = 5) - -> Seq Scan on mcrparted3 mcrparted_4 - Filter: (abs(b) = 5) - -> Seq Scan on mcrparted4 mcrparted_5 - Filter: (abs(b) = 5) - -> Seq Scan on mcrparted5 mcrparted_6 - Filter: (abs(b) = 5) - -> Seq Scan on mcrparted_def mcrparted_7 - Filter: (abs(b) = 5) -(15 rows) - -explain (costs off) select * from mcrparted where a > -1; -- scans all partitions - QUERY PLAN ---------------------------------------------- - Append - -> Seq Scan on mcrparted0 mcrparted_1 - Filter: (a > '-1'::integer) - -> Seq Scan on mcrparted1 mcrparted_2 - Filter: (a > '-1'::integer) - -> Seq Scan on mcrparted2 mcrparted_3 - Filter: (a > '-1'::integer) - -> Seq Scan on mcrparted3 mcrparted_4 - Filter: (a > '-1'::integer) - -> Seq Scan on mcrparted4 mcrparted_5 - Filter: (a > '-1'::integer) - -> Seq Scan on mcrparted5 mcrparted_6 - Filter: (a > '-1'::integer) - -> Seq Scan on mcrparted_def mcrparted_7 - Filter: (a > '-1'::integer) -(15 rows) - -explain (costs off) select * from mcrparted where a = 20 and abs(b) = 10 and c > 10; -- scans mcrparted4 - QUERY PLAN ------------------------------------------------------ - Seq Scan on mcrparted4 mcrparted - Filter: ((c > 10) AND (a = 20) AND (abs(b) = 10)) -(2 rows) - -explain (costs off) select * from mcrparted where a = 20 and c > 20; -- scans mcrparted3, mcrparte4, mcrparte5, mcrparted_def - QUERY PLAN ---------------------------------------------- - Append - -> Seq Scan on mcrparted3 mcrparted_1 - Filter: ((c > 20) AND (a = 20)) - -> Seq Scan on mcrparted4 mcrparted_2 - Filter: ((c > 20) AND (a = 20)) - -> Seq Scan on mcrparted5 mcrparted_3 - Filter: ((c > 20) AND (a = 20)) - -> Seq Scan on mcrparted_def mcrparted_4 - Filter: ((c > 20) AND (a = 20)) -(9 rows) - --- check that partitioned table Appends cope with being referenced in --- subplans -create table parted_minmax (a int, b varchar(16)) partition by range (a); -create table parted_minmax1 partition of parted_minmax for values from (1) to (10); -create index parted_minmax1i on parted_minmax1 (a, b); -insert into parted_minmax values (1,'12345'); -explain (costs off) select min(a), max(a) from parted_minmax where b = '12345'; - QUERY PLAN ------------------------------------------------------------------------------------------------- - Result - InitPlan 1 (returns $0) - -> Limit - -> Index Only Scan using parted_minmax1i on parted_minmax1 parted_minmax - Index Cond: ((a IS NOT NULL) AND (b = '12345'::text)) - InitPlan 2 (returns $1) - -> Limit - -> Index Only Scan Backward using parted_minmax1i on parted_minmax1 parted_minmax_1 - Index Cond: ((a IS NOT NULL) AND (b = '12345'::text)) -(9 rows) - -select min(a), max(a) from parted_minmax where b = '12345'; - min | max ------+----- - 1 | 1 -(1 row) - -drop table parted_minmax; --- Test code that uses Append nodes in place of MergeAppend when the --- partition ordering matches the desired ordering. -create index mcrparted_a_abs_c_idx on mcrparted (a, abs(b), c); --- MergeAppend must be used when a default partition exists -explain (costs off) select * from mcrparted order by a, abs(b), c; - QUERY PLAN -------------------------------------------------------------------------------- - Merge Append - Sort Key: mcrparted.a, (abs(mcrparted.b)), mcrparted.c - -> Index Scan using mcrparted0_a_abs_c_idx on mcrparted0 mcrparted_1 - -> Index Scan using mcrparted1_a_abs_c_idx on mcrparted1 mcrparted_2 - -> Index Scan using mcrparted2_a_abs_c_idx on mcrparted2 mcrparted_3 - -> Index Scan using mcrparted3_a_abs_c_idx on mcrparted3 mcrparted_4 - -> Index Scan using mcrparted4_a_abs_c_idx on mcrparted4 mcrparted_5 - -> Index Scan using mcrparted5_a_abs_c_idx on mcrparted5 mcrparted_6 - -> Index Scan using mcrparted_def_a_abs_c_idx on mcrparted_def mcrparted_7 -(9 rows) - -drop table mcrparted_def; --- Append is used for a RANGE partitioned table with no default --- and no subpartitions -explain (costs off) select * from mcrparted order by a, abs(b), c; - QUERY PLAN -------------------------------------------------------------------------- - Append - -> Index Scan using mcrparted0_a_abs_c_idx on mcrparted0 mcrparted_1 - -> Index Scan using mcrparted1_a_abs_c_idx on mcrparted1 mcrparted_2 - -> Index Scan using mcrparted2_a_abs_c_idx on mcrparted2 mcrparted_3 - -> Index Scan using mcrparted3_a_abs_c_idx on mcrparted3 mcrparted_4 - -> Index Scan using mcrparted4_a_abs_c_idx on mcrparted4 mcrparted_5 - -> Index Scan using mcrparted5_a_abs_c_idx on mcrparted5 mcrparted_6 -(7 rows) - --- Append is used with subpaths in reverse order with backwards index scans -explain (costs off) select * from mcrparted order by a desc, abs(b) desc, c desc; - QUERY PLAN ----------------------------------------------------------------------------------- - Append - -> Index Scan Backward using mcrparted5_a_abs_c_idx on mcrparted5 mcrparted_6 - -> Index Scan Backward using mcrparted4_a_abs_c_idx on mcrparted4 mcrparted_5 - -> Index Scan Backward using mcrparted3_a_abs_c_idx on mcrparted3 mcrparted_4 - -> Index Scan Backward using mcrparted2_a_abs_c_idx on mcrparted2 mcrparted_3 - -> Index Scan Backward using mcrparted1_a_abs_c_idx on mcrparted1 mcrparted_2 - -> Index Scan Backward using mcrparted0_a_abs_c_idx on mcrparted0 mcrparted_1 -(7 rows) - --- check that Append plan is used containing a MergeAppend for sub-partitions --- that are unordered. -drop table mcrparted5; -create table mcrparted5 partition of mcrparted for values from (20, 20, 20) to (maxvalue, maxvalue, maxvalue) partition by list (a); -create table mcrparted5a partition of mcrparted5 for values in(20); -create table mcrparted5_def partition of mcrparted5 default; -explain (costs off) select * from mcrparted order by a, abs(b), c; - QUERY PLAN ---------------------------------------------------------------------------------------- - Append - -> Index Scan using mcrparted0_a_abs_c_idx on mcrparted0 mcrparted_1 - -> Index Scan using mcrparted1_a_abs_c_idx on mcrparted1 mcrparted_2 - -> Index Scan using mcrparted2_a_abs_c_idx on mcrparted2 mcrparted_3 - -> Index Scan using mcrparted3_a_abs_c_idx on mcrparted3 mcrparted_4 - -> Index Scan using mcrparted4_a_abs_c_idx on mcrparted4 mcrparted_5 - -> Merge Append - Sort Key: mcrparted_7.a, (abs(mcrparted_7.b)), mcrparted_7.c - -> Index Scan using mcrparted5a_a_abs_c_idx on mcrparted5a mcrparted_7 - -> Index Scan using mcrparted5_def_a_abs_c_idx on mcrparted5_def mcrparted_8 -(10 rows) - -drop table mcrparted5_def; --- check that an Append plan is used and the sub-partitions are flattened --- into the main Append when the sub-partition is unordered but contains --- just a single sub-partition. -explain (costs off) select a, abs(b) from mcrparted order by a, abs(b), c; - QUERY PLAN ---------------------------------------------------------------------------- - Append - -> Index Scan using mcrparted0_a_abs_c_idx on mcrparted0 mcrparted_1 - -> Index Scan using mcrparted1_a_abs_c_idx on mcrparted1 mcrparted_2 - -> Index Scan using mcrparted2_a_abs_c_idx on mcrparted2 mcrparted_3 - -> Index Scan using mcrparted3_a_abs_c_idx on mcrparted3 mcrparted_4 - -> Index Scan using mcrparted4_a_abs_c_idx on mcrparted4 mcrparted_5 - -> Index Scan using mcrparted5a_a_abs_c_idx on mcrparted5a mcrparted_6 -(7 rows) - --- check that Append is used when the sub-partitioned tables are pruned --- during planning. -explain (costs off) select * from mcrparted where a < 20 order by a, abs(b), c; - QUERY PLAN -------------------------------------------------------------------------- - Append - -> Index Scan using mcrparted0_a_abs_c_idx on mcrparted0 mcrparted_1 - Index Cond: (a < 20) - -> Index Scan using mcrparted1_a_abs_c_idx on mcrparted1 mcrparted_2 - Index Cond: (a < 20) - -> Index Scan using mcrparted2_a_abs_c_idx on mcrparted2 mcrparted_3 - Index Cond: (a < 20) - -> Index Scan using mcrparted3_a_abs_c_idx on mcrparted3 mcrparted_4 - Index Cond: (a < 20) -(9 rows) - -create table mclparted (a int) partition by list(a); -create table mclparted1 partition of mclparted for values in(1); -create table mclparted2 partition of mclparted for values in(2); -create index on mclparted (a); --- Ensure an Append is used for a list partition with an order by. -explain (costs off) select * from mclparted order by a; - QUERY PLAN ------------------------------------------------------------------------- - Append - -> Index Only Scan using mclparted1_a_idx on mclparted1 mclparted_1 - -> Index Only Scan using mclparted2_a_idx on mclparted2 mclparted_2 -(3 rows) - --- Ensure a MergeAppend is used when a partition exists with interleaved --- datums in the partition bound. -create table mclparted3_5 partition of mclparted for values in(3,5); -create table mclparted4 partition of mclparted for values in(4); -explain (costs off) select * from mclparted order by a; - QUERY PLAN ----------------------------------------------------------------------------- - Merge Append - Sort Key: mclparted.a - -> Index Only Scan using mclparted1_a_idx on mclparted1 mclparted_1 - -> Index Only Scan using mclparted2_a_idx on mclparted2 mclparted_2 - -> Index Only Scan using mclparted3_5_a_idx on mclparted3_5 mclparted_3 - -> Index Only Scan using mclparted4_a_idx on mclparted4 mclparted_4 -(6 rows) - -drop table mclparted; --- Ensure subplans which don't have a path with the correct pathkeys get --- sorted correctly. -drop index mcrparted_a_abs_c_idx; -create index on mcrparted1 (a, abs(b), c); -create index on mcrparted2 (a, abs(b), c); -create index on mcrparted3 (a, abs(b), c); -create index on mcrparted4 (a, abs(b), c); -explain (costs off) select * from mcrparted where a < 20 order by a, abs(b), c limit 1; - QUERY PLAN -------------------------------------------------------------------------------- - Limit - -> Append - -> Sort - Sort Key: mcrparted_1.a, (abs(mcrparted_1.b)), mcrparted_1.c - -> Seq Scan on mcrparted0 mcrparted_1 - Filter: (a < 20) - -> Index Scan using mcrparted1_a_abs_c_idx on mcrparted1 mcrparted_2 - Index Cond: (a < 20) - -> Index Scan using mcrparted2_a_abs_c_idx on mcrparted2 mcrparted_3 - Index Cond: (a < 20) - -> Index Scan using mcrparted3_a_abs_c_idx on mcrparted3 mcrparted_4 - Index Cond: (a < 20) -(12 rows) - -set enable_bitmapscan = 0; --- Ensure Append node can be used when the partition is ordered by some --- pathkeys which were deemed redundant. -explain (costs off) select * from mcrparted where a = 10 order by a, abs(b), c; - QUERY PLAN -------------------------------------------------------------------------- - Append - -> Index Scan using mcrparted1_a_abs_c_idx on mcrparted1 mcrparted_1 - Index Cond: (a = 10) - -> Index Scan using mcrparted2_a_abs_c_idx on mcrparted2 mcrparted_2 - Index Cond: (a = 10) -(5 rows) - -reset enable_bitmapscan; -drop table mcrparted; --- Ensure LIST partitions allow an Append to be used instead of a MergeAppend -create table bool_lp (b bool) partition by list(b); -create table bool_lp_true partition of bool_lp for values in(true); -create table bool_lp_false partition of bool_lp for values in(false); -create index on bool_lp (b); -explain (costs off) select * from bool_lp order by b; - QUERY PLAN ----------------------------------------------------------------------------- - Append - -> Index Only Scan using bool_lp_false_b_idx on bool_lp_false bool_lp_1 - -> Index Only Scan using bool_lp_true_b_idx on bool_lp_true bool_lp_2 -(3 rows) - -drop table bool_lp; --- Ensure const bool quals can be properly detected as redundant -create table bool_rp (b bool, a int) partition by range(b,a); -create table bool_rp_false_1k partition of bool_rp for values from (false,0) to (false,1000); -create table bool_rp_true_1k partition of bool_rp for values from (true,0) to (true,1000); -create table bool_rp_false_2k partition of bool_rp for values from (false,1000) to (false,2000); -create table bool_rp_true_2k partition of bool_rp for values from (true,1000) to (true,2000); -create index on bool_rp (b,a); -explain (costs off) select * from bool_rp where b = true order by b,a; - QUERY PLAN ----------------------------------------------------------------------------------- - Append - -> Index Only Scan using bool_rp_true_1k_b_a_idx on bool_rp_true_1k bool_rp_1 - Index Cond: (b = true) - -> Index Only Scan using bool_rp_true_2k_b_a_idx on bool_rp_true_2k bool_rp_2 - Index Cond: (b = true) -(5 rows) - -explain (costs off) select * from bool_rp where b = false order by b,a; - QUERY PLAN ------------------------------------------------------------------------------------- - Append - -> Index Only Scan using bool_rp_false_1k_b_a_idx on bool_rp_false_1k bool_rp_1 - Index Cond: (b = false) - -> Index Only Scan using bool_rp_false_2k_b_a_idx on bool_rp_false_2k bool_rp_2 - Index Cond: (b = false) -(5 rows) - -explain (costs off) select * from bool_rp where b = true order by a; - QUERY PLAN ----------------------------------------------------------------------------------- - Append - -> Index Only Scan using bool_rp_true_1k_b_a_idx on bool_rp_true_1k bool_rp_1 - Index Cond: (b = true) - -> Index Only Scan using bool_rp_true_2k_b_a_idx on bool_rp_true_2k bool_rp_2 - Index Cond: (b = true) -(5 rows) - -explain (costs off) select * from bool_rp where b = false order by a; - QUERY PLAN ------------------------------------------------------------------------------------- - Append - -> Index Only Scan using bool_rp_false_1k_b_a_idx on bool_rp_false_1k bool_rp_1 - Index Cond: (b = false) - -> Index Only Scan using bool_rp_false_2k_b_a_idx on bool_rp_false_2k bool_rp_2 - Index Cond: (b = false) -(5 rows) - -drop table bool_rp; --- Ensure an Append scan is chosen when the partition order is a subset of --- the required order. -create table range_parted (a int, b int, c int) partition by range(a, b); -create table range_parted1 partition of range_parted for values from (0,0) to (10,10); -create table range_parted2 partition of range_parted for values from (10,10) to (20,20); -create index on range_parted (a,b,c); -explain (costs off) select * from range_parted order by a,b,c; - QUERY PLAN -------------------------------------------------------------------------------------- - Append - -> Index Only Scan using range_parted1_a_b_c_idx on range_parted1 range_parted_1 - -> Index Only Scan using range_parted2_a_b_c_idx on range_parted2 range_parted_2 -(3 rows) - -explain (costs off) select * from range_parted order by a desc,b desc,c desc; - QUERY PLAN ----------------------------------------------------------------------------------------------- - Append - -> Index Only Scan Backward using range_parted2_a_b_c_idx on range_parted2 range_parted_2 - -> Index Only Scan Backward using range_parted1_a_b_c_idx on range_parted1 range_parted_1 -(3 rows) - -drop table range_parted; --- Check that we allow access to a child table's statistics when the user --- has permissions only for the parent table. -create table permtest_parent (a int, b text, c text) partition by list (a); -create table permtest_child (b text, c text, a int) partition by list (b); -create table permtest_grandchild (c text, b text, a int); -alter table permtest_child attach partition permtest_grandchild for values in ('a'); -alter table permtest_parent attach partition permtest_child for values in (1); -create index on permtest_parent (left(c, 3)); -insert into permtest_parent - select 1, 'a', left(md5(i::text), 5) from generate_series(0, 100) i; -analyze permtest_parent; -create role regress_no_child_access; -revoke all on permtest_grandchild from regress_no_child_access; -grant select on permtest_parent to regress_no_child_access; -set session authorization regress_no_child_access; --- without stats access, these queries would produce hash join plans: -explain (costs off) - select * from permtest_parent p1 inner join permtest_parent p2 - on p1.a = p2.a and p1.c ~ 'a1$'; - QUERY PLAN ------------------------------------------- - Nested Loop - Join Filter: (p1.a = p2.a) - -> Seq Scan on permtest_grandchild p1 - Filter: (c ~ 'a1$'::text) - -> Seq Scan on permtest_grandchild p2 -(5 rows) - -explain (costs off) - select * from permtest_parent p1 inner join permtest_parent p2 - on p1.a = p2.a and left(p1.c, 3) ~ 'a1$'; - QUERY PLAN ----------------------------------------------- - Nested Loop - Join Filter: (p1.a = p2.a) - -> Seq Scan on permtest_grandchild p1 - Filter: ("left"(c, 3) ~ 'a1$'::text) - -> Seq Scan on permtest_grandchild p2 -(5 rows) - -reset session authorization; -revoke all on permtest_parent from regress_no_child_access; -grant select(a,c) on permtest_parent to regress_no_child_access; -set session authorization regress_no_child_access; -explain (costs off) - select p2.a, p1.c from permtest_parent p1 inner join permtest_parent p2 - on p1.a = p2.a and p1.c ~ 'a1$'; - QUERY PLAN ------------------------------------------- - Nested Loop - Join Filter: (p1.a = p2.a) - -> Seq Scan on permtest_grandchild p1 - Filter: (c ~ 'a1$'::text) - -> Seq Scan on permtest_grandchild p2 -(5 rows) - --- we will not have access to the expression index's stats here: -explain (costs off) - select p2.a, p1.c from permtest_parent p1 inner join permtest_parent p2 - on p1.a = p2.a and left(p1.c, 3) ~ 'a1$'; - QUERY PLAN ----------------------------------------------------- - Hash Join - Hash Cond: (p2.a = p1.a) - -> Seq Scan on permtest_grandchild p2 - -> Hash - -> Seq Scan on permtest_grandchild p1 - Filter: ("left"(c, 3) ~ 'a1$'::text) -(6 rows) - -reset session authorization; -revoke all on permtest_parent from regress_no_child_access; -drop role regress_no_child_access; -drop table permtest_parent; --- Verify that constraint errors across partition root / child are --- handled correctly (Bug #16293) -CREATE TABLE errtst_parent ( - partid int not null, - shdata int not null, - data int NOT NULL DEFAULT 0, - CONSTRAINT shdata_small CHECK(shdata < 3) -) PARTITION BY RANGE (partid); --- fast defaults lead to attribute mapping being used in one --- direction, but not the other -CREATE TABLE errtst_child_fastdef ( - partid int not null, - shdata int not null, - CONSTRAINT shdata_small CHECK(shdata < 3) -); --- no remapping in either direction necessary -CREATE TABLE errtst_child_plaindef ( - partid int not null, - shdata int not null, - data int NOT NULL DEFAULT 0, - CONSTRAINT shdata_small CHECK(shdata < 3), - CHECK(data < 10) -); --- remapping in both direction -CREATE TABLE errtst_child_reorder ( - data int NOT NULL DEFAULT 0, - shdata int not null, - partid int not null, - CONSTRAINT shdata_small CHECK(shdata < 3), - CHECK(data < 10) -); -ALTER TABLE errtst_child_fastdef ADD COLUMN data int NOT NULL DEFAULT 0; -ALTER TABLE errtst_child_fastdef ADD CONSTRAINT errtest_child_fastdef_data_check CHECK (data < 10); -ALTER TABLE errtst_parent ATTACH PARTITION errtst_child_fastdef FOR VALUES FROM (0) TO (10); -ALTER TABLE errtst_parent ATTACH PARTITION errtst_child_plaindef FOR VALUES FROM (10) TO (20); -ALTER TABLE errtst_parent ATTACH PARTITION errtst_child_reorder FOR VALUES FROM (20) TO (30); --- insert without child check constraint error -INSERT INTO errtst_parent(partid, shdata, data) VALUES ( '0', '1', '5'); -INSERT INTO errtst_parent(partid, shdata, data) VALUES ('10', '1', '5'); -INSERT INTO errtst_parent(partid, shdata, data) VALUES ('20', '1', '5'); --- insert with child check constraint error -INSERT INTO errtst_parent(partid, shdata, data) VALUES ( '0', '1', '10'); -ERROR: new row for relation "errtst_child_fastdef" violates check constraint "errtest_child_fastdef_data_check" -DETAIL: Failing row contains (0, 1, 10). -INSERT INTO errtst_parent(partid, shdata, data) VALUES ('10', '1', '10'); -ERROR: new row for relation "errtst_child_plaindef" violates check constraint "errtst_child_plaindef_data_check" -DETAIL: Failing row contains (10, 1, 10). -INSERT INTO errtst_parent(partid, shdata, data) VALUES ('20', '1', '10'); -ERROR: new row for relation "errtst_child_reorder" violates check constraint "errtst_child_reorder_data_check" -DETAIL: Failing row contains (20, 1, 10). --- insert with child not null constraint error -INSERT INTO errtst_parent(partid, shdata, data) VALUES ( '0', '1', NULL); -ERROR: null value in column "data" of relation "errtst_child_fastdef" violates not-null constraint -DETAIL: Failing row contains (0, 1, null). -INSERT INTO errtst_parent(partid, shdata, data) VALUES ('10', '1', NULL); -ERROR: null value in column "data" of relation "errtst_child_plaindef" violates not-null constraint -DETAIL: Failing row contains (10, 1, null). -INSERT INTO errtst_parent(partid, shdata, data) VALUES ('20', '1', NULL); -ERROR: null value in column "data" of relation "errtst_child_reorder" violates not-null constraint -DETAIL: Failing row contains (20, 1, null). --- insert with shared check constraint error -INSERT INTO errtst_parent(partid, shdata, data) VALUES ( '0', '5', '5'); -ERROR: new row for relation "errtst_child_fastdef" violates check constraint "shdata_small" -DETAIL: Failing row contains (0, 5, 5). -INSERT INTO errtst_parent(partid, shdata, data) VALUES ('10', '5', '5'); -ERROR: new row for relation "errtst_child_plaindef" violates check constraint "shdata_small" -DETAIL: Failing row contains (10, 5, 5). -INSERT INTO errtst_parent(partid, shdata, data) VALUES ('20', '5', '5'); -ERROR: new row for relation "errtst_child_reorder" violates check constraint "shdata_small" -DETAIL: Failing row contains (20, 5, 5). --- within partition update without child check constraint violation -BEGIN; -UPDATE errtst_parent SET data = data + 1 WHERE partid = 0; -UPDATE errtst_parent SET data = data + 1 WHERE partid = 10; -UPDATE errtst_parent SET data = data + 1 WHERE partid = 20; -ROLLBACK; --- within partition update with child check constraint violation -UPDATE errtst_parent SET data = data + 10 WHERE partid = 0; -ERROR: new row for relation "errtst_child_fastdef" violates check constraint "errtest_child_fastdef_data_check" -DETAIL: Failing row contains (0, 1, 15). -UPDATE errtst_parent SET data = data + 10 WHERE partid = 10; -ERROR: new row for relation "errtst_child_plaindef" violates check constraint "errtst_child_plaindef_data_check" -DETAIL: Failing row contains (10, 1, 15). -UPDATE errtst_parent SET data = data + 10 WHERE partid = 20; -ERROR: new row for relation "errtst_child_reorder" violates check constraint "errtst_child_reorder_data_check" -DETAIL: Failing row contains (20, 1, 15). --- direct leaf partition update, without partition id violation -BEGIN; -UPDATE errtst_child_fastdef SET partid = 1 WHERE partid = 0; -UPDATE errtst_child_plaindef SET partid = 11 WHERE partid = 10; -UPDATE errtst_child_reorder SET partid = 21 WHERE partid = 20; -ROLLBACK; --- direct leaf partition update, with partition id violation -UPDATE errtst_child_fastdef SET partid = partid + 10 WHERE partid = 0; -ERROR: new row for relation "errtst_child_fastdef" violates partition constraint -DETAIL: Failing row contains (10, 1, 5). -UPDATE errtst_child_plaindef SET partid = partid + 10 WHERE partid = 10; -ERROR: new row for relation "errtst_child_plaindef" violates partition constraint -DETAIL: Failing row contains (20, 1, 5). -UPDATE errtst_child_reorder SET partid = partid + 10 WHERE partid = 20; -ERROR: new row for relation "errtst_child_reorder" violates partition constraint -DETAIL: Failing row contains (5, 1, 30). --- partition move, without child check constraint violation -BEGIN; -UPDATE errtst_parent SET partid = 10, data = data + 1 WHERE partid = 0; -UPDATE errtst_parent SET partid = 20, data = data + 1 WHERE partid = 10; -UPDATE errtst_parent SET partid = 0, data = data + 1 WHERE partid = 20; -ROLLBACK; --- partition move, with child check constraint violation -UPDATE errtst_parent SET partid = 10, data = data + 10 WHERE partid = 0; -ERROR: new row for relation "errtst_child_plaindef" violates check constraint "errtst_child_plaindef_data_check" -DETAIL: Failing row contains (10, 1, 15). -UPDATE errtst_parent SET partid = 20, data = data + 10 WHERE partid = 10; -ERROR: new row for relation "errtst_child_reorder" violates check constraint "errtst_child_reorder_data_check" -DETAIL: Failing row contains (20, 1, 15). -UPDATE errtst_parent SET partid = 0, data = data + 10 WHERE partid = 20; -ERROR: new row for relation "errtst_child_fastdef" violates check constraint "errtest_child_fastdef_data_check" -DETAIL: Failing row contains (0, 1, 15). --- partition move, without target partition -UPDATE errtst_parent SET partid = 30, data = data + 10 WHERE partid = 20; -ERROR: no partition of relation "errtst_parent" found for row -DETAIL: Partition key of the failing row contains (partid) = (30). -DROP TABLE errtst_parent; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/typed_table.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/typed_table.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/typed_table.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/typed_table.out 2023-02-20 19:45:21.749209988 -0500 @@ -1,133 +1 @@ -CREATE TABLE ttable1 OF nothing; -ERROR: type "nothing" does not exist -CREATE TYPE person_type AS (id int, name text); -CREATE TABLE persons OF person_type; -CREATE TABLE IF NOT EXISTS persons OF person_type; -NOTICE: relation "persons" already exists, skipping -SELECT * FROM persons; - id | name -----+------ -(0 rows) - -\d persons - Table "public.persons" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - id | integer | | | - name | text | | | -Typed table of type: person_type - -CREATE FUNCTION get_all_persons() RETURNS SETOF person_type -LANGUAGE SQL -AS $$ - SELECT * FROM persons; -$$; -SELECT * FROM get_all_persons(); - id | name -----+------ -(0 rows) - --- certain ALTER TABLE operations on typed tables are not allowed -ALTER TABLE persons ADD COLUMN comment text; -ERROR: cannot add column to typed table -ALTER TABLE persons DROP COLUMN name; -ERROR: cannot drop column from typed table -ALTER TABLE persons RENAME COLUMN id TO num; -ERROR: cannot rename column of typed table -ALTER TABLE persons ALTER COLUMN name TYPE varchar; -ERROR: cannot alter column type of typed table -CREATE TABLE stuff (id int); -ALTER TABLE persons INHERIT stuff; -ERROR: cannot change inheritance of typed table -CREATE TABLE personsx OF person_type (myname WITH OPTIONS NOT NULL); -- error -ERROR: column "myname" does not exist -CREATE TABLE persons2 OF person_type ( - id WITH OPTIONS PRIMARY KEY, - UNIQUE (name) -); -\d persons2 - Table "public.persons2" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - id | integer | | not null | - name | text | | | -Indexes: - "persons2_pkey" PRIMARY KEY, btree (id) - "persons2_name_key" UNIQUE CONSTRAINT, btree (name) -Typed table of type: person_type - -CREATE TABLE persons3 OF person_type ( - PRIMARY KEY (id), - name WITH OPTIONS DEFAULT '' -); -\d persons3 - Table "public.persons3" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+---------- - id | integer | | not null | - name | text | | | ''::text -Indexes: - "persons3_pkey" PRIMARY KEY, btree (id) -Typed table of type: person_type - -CREATE TABLE persons4 OF person_type ( - name WITH OPTIONS NOT NULL, - name WITH OPTIONS DEFAULT '' -- error, specified more than once -); -ERROR: column "name" specified more than once -DROP TYPE person_type RESTRICT; -ERROR: cannot drop type person_type because other objects depend on it -DETAIL: table persons depends on type person_type -function get_all_persons() depends on type person_type -table persons2 depends on type person_type -table persons3 depends on type person_type -HINT: Use DROP ... CASCADE to drop the dependent objects too. -DROP TYPE person_type CASCADE; -NOTICE: drop cascades to 4 other objects -DETAIL: drop cascades to table persons -drop cascades to function get_all_persons() -drop cascades to table persons2 -drop cascades to table persons3 -CREATE TABLE persons5 OF stuff; -- only CREATE TYPE AS types may be used -ERROR: type stuff is not a composite type -DROP TABLE stuff; --- implicit casting -CREATE TYPE person_type AS (id int, name text); -CREATE TABLE persons OF person_type; -INSERT INTO persons VALUES (1, 'test'); -CREATE FUNCTION namelen(person_type) RETURNS int LANGUAGE SQL AS $$ SELECT length($1.name) $$; -SELECT id, namelen(persons) FROM persons; - id | namelen -----+--------- - 1 | 4 -(1 row) - -CREATE TABLE persons2 OF person_type ( - id WITH OPTIONS PRIMARY KEY, - UNIQUE (name) -); -\d persons2 - Table "public.persons2" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - id | integer | | not null | - name | text | | | -Indexes: - "persons2_pkey" PRIMARY KEY, btree (id) - "persons2_name_key" UNIQUE CONSTRAINT, btree (name) -Typed table of type: person_type - -CREATE TABLE persons3 OF person_type ( - PRIMARY KEY (id), - name NOT NULL DEFAULT '' -); -\d persons3 - Table "public.persons3" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+---------- - id | integer | | not null | - name | text | | not null | ''::text -Indexes: - "persons3_pkey" PRIMARY KEY, btree (id) -Typed table of type: person_type - +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/vacuum.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/vacuum.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/vacuum.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/vacuum.out 2023-02-20 19:45:21.899209994 -0500 @@ -1,415 +1 @@ --- --- VACUUM --- -CREATE TABLE vactst (i INT); -INSERT INTO vactst VALUES (1); -INSERT INTO vactst SELECT * FROM vactst; -INSERT INTO vactst SELECT * FROM vactst; -INSERT INTO vactst SELECT * FROM vactst; -INSERT INTO vactst SELECT * FROM vactst; -INSERT INTO vactst SELECT * FROM vactst; -INSERT INTO vactst SELECT * FROM vactst; -INSERT INTO vactst SELECT * FROM vactst; -INSERT INTO vactst SELECT * FROM vactst; -INSERT INTO vactst SELECT * FROM vactst; -INSERT INTO vactst SELECT * FROM vactst; -INSERT INTO vactst SELECT * FROM vactst; -INSERT INTO vactst VALUES (0); -SELECT count(*) FROM vactst; - count -------- - 2049 -(1 row) - -DELETE FROM vactst WHERE i != 0; -SELECT * FROM vactst; - i ---- - 0 -(1 row) - -VACUUM FULL vactst; -UPDATE vactst SET i = i + 1; -INSERT INTO vactst SELECT * FROM vactst; -INSERT INTO vactst SELECT * FROM vactst; -INSERT INTO vactst SELECT * FROM vactst; -INSERT INTO vactst SELECT * FROM vactst; -INSERT INTO vactst SELECT * FROM vactst; -INSERT INTO vactst SELECT * FROM vactst; -INSERT INTO vactst SELECT * FROM vactst; -INSERT INTO vactst SELECT * FROM vactst; -INSERT INTO vactst SELECT * FROM vactst; -INSERT INTO vactst SELECT * FROM vactst; -INSERT INTO vactst SELECT * FROM vactst; -INSERT INTO vactst VALUES (0); -SELECT count(*) FROM vactst; - count -------- - 2049 -(1 row) - -DELETE FROM vactst WHERE i != 0; -VACUUM (FULL) vactst; -DELETE FROM vactst; -SELECT * FROM vactst; - i ---- -(0 rows) - -VACUUM (FULL, FREEZE) vactst; -VACUUM (ANALYZE, FULL) vactst; -CREATE TABLE vaccluster (i INT PRIMARY KEY); -ALTER TABLE vaccluster CLUSTER ON vaccluster_pkey; -CLUSTER vaccluster; -CREATE FUNCTION do_analyze() RETURNS VOID VOLATILE LANGUAGE SQL - AS 'ANALYZE pg_am'; -CREATE FUNCTION wrap_do_analyze(c INT) RETURNS INT IMMUTABLE LANGUAGE SQL - AS 'SELECT $1 FROM do_analyze()'; -CREATE INDEX ON vaccluster(wrap_do_analyze(i)); -INSERT INTO vaccluster VALUES (1), (2); -ANALYZE vaccluster; -ERROR: ANALYZE cannot be executed from VACUUM or ANALYZE -CONTEXT: SQL function "do_analyze" statement 1 -SQL function "wrap_do_analyze" statement 1 --- Test ANALYZE in transaction, where the transaction surrounding --- analyze performed modifications. This tests for the bug at --- https://postgr.es/m/c7988239-d42c-ddc4-41db-171b23b35e4f%40ssinger.info --- (which hopefully is unlikely to be reintroduced), but also seems --- independently worthwhile to cover. -INSERT INTO vactst SELECT generate_series(1, 300); -DELETE FROM vactst WHERE i % 7 = 0; -- delete a few rows outside -BEGIN; -INSERT INTO vactst SELECT generate_series(301, 400); -DELETE FROM vactst WHERE i % 5 <> 0; -- delete a few rows inside -ANALYZE vactst; -COMMIT; -VACUUM FULL pg_am; -VACUUM FULL pg_class; -VACUUM FULL pg_database; -VACUUM FULL vaccluster; -ERROR: ANALYZE cannot be executed from VACUUM or ANALYZE -CONTEXT: SQL function "do_analyze" statement 1 -SQL function "wrap_do_analyze" statement 1 -VACUUM FULL vactst; -VACUUM (DISABLE_PAGE_SKIPPING) vaccluster; --- PARALLEL option -CREATE TABLE pvactst (i INT, a INT[], p POINT) with (autovacuum_enabled = off); -INSERT INTO pvactst SELECT i, array[1,2,3], point(i, i+1) FROM generate_series(1,1000) i; -CREATE INDEX btree_pvactst ON pvactst USING btree (i); -CREATE INDEX hash_pvactst ON pvactst USING hash (i); -CREATE INDEX brin_pvactst ON pvactst USING brin (i); -CREATE INDEX gin_pvactst ON pvactst USING gin (a); -CREATE INDEX gist_pvactst ON pvactst USING gist (p); -CREATE INDEX spgist_pvactst ON pvactst USING spgist (p); --- VACUUM invokes parallel index cleanup -SET min_parallel_index_scan_size to 0; -VACUUM (PARALLEL 2) pvactst; --- VACUUM invokes parallel bulk-deletion -UPDATE pvactst SET i = i WHERE i < 1000; -VACUUM (PARALLEL 2) pvactst; -UPDATE pvactst SET i = i WHERE i < 1000; -VACUUM (PARALLEL 0) pvactst; -- disable parallel vacuum -VACUUM (PARALLEL -1) pvactst; -- error -ERROR: parallel workers for vacuum must be between 0 and 1024 -LINE 1: VACUUM (PARALLEL -1) pvactst; - ^ -VACUUM (PARALLEL 2, INDEX_CLEANUP FALSE) pvactst; -VACUUM (PARALLEL 2, FULL TRUE) pvactst; -- error, cannot use both PARALLEL and FULL -ERROR: VACUUM FULL cannot be performed in parallel -VACUUM (PARALLEL) pvactst; -- error, cannot use PARALLEL option without parallel degree -ERROR: parallel option requires a value between 0 and 1024 -LINE 1: VACUUM (PARALLEL) pvactst; - ^ --- Test different combinations of parallel and full options for temporary tables -CREATE TEMPORARY TABLE tmp (a int PRIMARY KEY); -CREATE INDEX tmp_idx1 ON tmp (a); -VACUUM (PARALLEL 1, FULL FALSE) tmp; -- parallel vacuum disabled for temp tables -WARNING: disabling parallel option of vacuum on "tmp" --- cannot vacuum temporary tables in parallel -VACUUM (PARALLEL 0, FULL TRUE) tmp; -- can specify parallel disabled (even though that's implied by FULL) -RESET min_parallel_index_scan_size; -DROP TABLE pvactst; --- INDEX_CLEANUP option -CREATE TABLE no_index_cleanup (i INT PRIMARY KEY, t TEXT); --- Use uncompressed data stored in toast. -CREATE INDEX no_index_cleanup_idx ON no_index_cleanup(t); -ALTER TABLE no_index_cleanup ALTER COLUMN t SET STORAGE EXTERNAL; -INSERT INTO no_index_cleanup(i, t) VALUES (generate_series(1,30), - repeat('1234567890',269)); --- index cleanup option is ignored if VACUUM FULL -VACUUM (INDEX_CLEANUP TRUE, FULL TRUE) no_index_cleanup; -VACUUM (FULL TRUE) no_index_cleanup; --- Toast inherits the value from its parent table. -ALTER TABLE no_index_cleanup SET (vacuum_index_cleanup = false); -DELETE FROM no_index_cleanup WHERE i < 15; --- Nothing is cleaned up. -VACUUM no_index_cleanup; --- Both parent relation and toast are cleaned up. -ALTER TABLE no_index_cleanup SET (vacuum_index_cleanup = true); -VACUUM no_index_cleanup; -ALTER TABLE no_index_cleanup SET (vacuum_index_cleanup = auto); -VACUUM no_index_cleanup; --- Parameter is set for both the parent table and its toast relation. -INSERT INTO no_index_cleanup(i, t) VALUES (generate_series(31,60), - repeat('1234567890',269)); -DELETE FROM no_index_cleanup WHERE i < 45; --- Only toast index is cleaned up. -ALTER TABLE no_index_cleanup SET (vacuum_index_cleanup = off, - toast.vacuum_index_cleanup = yes); -VACUUM no_index_cleanup; --- Only parent is cleaned up. -ALTER TABLE no_index_cleanup SET (vacuum_index_cleanup = true, - toast.vacuum_index_cleanup = false); -VACUUM no_index_cleanup; --- Test some extra relations. -VACUUM (INDEX_CLEANUP FALSE) vaccluster; -VACUUM (INDEX_CLEANUP AUTO) vactst; -- index cleanup option is ignored if no indexes -VACUUM (INDEX_CLEANUP FALSE, FREEZE TRUE) vaccluster; --- TRUNCATE option -CREATE TEMP TABLE vac_truncate_test(i INT NOT NULL, j text) - WITH (vacuum_truncate=true, autovacuum_enabled=false); -INSERT INTO vac_truncate_test VALUES (1, NULL), (NULL, NULL); -ERROR: null value in column "i" of relation "vac_truncate_test" violates not-null constraint -DETAIL: Failing row contains (null, null). -VACUUM (TRUNCATE FALSE, DISABLE_PAGE_SKIPPING) vac_truncate_test; -SELECT pg_relation_size('vac_truncate_test') > 0; - ?column? ----------- - t -(1 row) - -VACUUM (DISABLE_PAGE_SKIPPING) vac_truncate_test; -SELECT pg_relation_size('vac_truncate_test') = 0; - ?column? ----------- - t -(1 row) - -VACUUM (TRUNCATE FALSE, FULL TRUE) vac_truncate_test; -DROP TABLE vac_truncate_test; --- partitioned table -CREATE TABLE vacparted (a int, b char) PARTITION BY LIST (a); -CREATE TABLE vacparted1 PARTITION OF vacparted FOR VALUES IN (1); -INSERT INTO vacparted VALUES (1, 'a'); -UPDATE vacparted SET b = 'b'; -VACUUM (ANALYZE) vacparted; -VACUUM (FULL) vacparted; -VACUUM (FREEZE) vacparted; --- check behavior with duplicate column mentions -VACUUM ANALYZE vacparted(a,b,a); -ERROR: column "a" of relation "vacparted" appears more than once -ANALYZE vacparted(a,b,b); -ERROR: column "b" of relation "vacparted" appears more than once --- partitioned table with index -CREATE TABLE vacparted_i (a int primary key, b varchar(100)) - PARTITION BY HASH (a); -CREATE TABLE vacparted_i1 PARTITION OF vacparted_i - FOR VALUES WITH (MODULUS 2, REMAINDER 0); -CREATE TABLE vacparted_i2 PARTITION OF vacparted_i - FOR VALUES WITH (MODULUS 2, REMAINDER 1); -INSERT INTO vacparted_i SELECT i, 'test_'|| i from generate_series(1,10) i; -VACUUM (ANALYZE) vacparted_i; -VACUUM (FULL) vacparted_i; -VACUUM (FREEZE) vacparted_i; -SELECT relname, relhasindex FROM pg_class - WHERE relname LIKE 'vacparted_i%' AND relkind IN ('p','r') - ORDER BY relname; - relname | relhasindex ---------------+------------- - vacparted_i | t - vacparted_i1 | t - vacparted_i2 | t -(3 rows) - -DROP TABLE vacparted_i; --- multiple tables specified -VACUUM vaccluster, vactst; -VACUUM vacparted, does_not_exist; -ERROR: relation "does_not_exist" does not exist -VACUUM (FREEZE) vacparted, vaccluster, vactst; -VACUUM (FREEZE) does_not_exist, vaccluster; -ERROR: relation "does_not_exist" does not exist -VACUUM ANALYZE vactst, vacparted (a); -VACUUM ANALYZE vactst (does_not_exist), vacparted (b); -ERROR: column "does_not_exist" of relation "vactst" does not exist -VACUUM FULL vacparted, vactst; -VACUUM FULL vactst, vacparted (a, b), vaccluster (i); -ERROR: ANALYZE option must be specified when a column list is provided -ANALYZE vactst, vacparted; -ANALYZE vacparted (b), vactst; -ANALYZE vactst, does_not_exist, vacparted; -ERROR: relation "does_not_exist" does not exist -ANALYZE vactst (i), vacparted (does_not_exist); -ERROR: column "does_not_exist" of relation "vacparted" does not exist -ANALYZE vactst, vactst; -BEGIN; -- ANALYZE behaves differently inside a transaction block -ANALYZE vactst, vactst; -COMMIT; --- parenthesized syntax for ANALYZE -ANALYZE (VERBOSE) does_not_exist; -ERROR: relation "does_not_exist" does not exist -ANALYZE (nonexistent-arg) does_not_exist; -ERROR: syntax error at or near "arg" -LINE 1: ANALYZE (nonexistent-arg) does_not_exist; - ^ -ANALYZE (nonexistentarg) does_not_exit; -ERROR: unrecognized ANALYZE option "nonexistentarg" -LINE 1: ANALYZE (nonexistentarg) does_not_exit; - ^ --- ensure argument order independence, and that SKIP_LOCKED on non-existing --- relation still errors out. Suppress WARNING messages caused by concurrent --- autovacuums. -SET client_min_messages TO 'ERROR'; -ANALYZE (SKIP_LOCKED, VERBOSE) does_not_exist; -ERROR: relation "does_not_exist" does not exist -ANALYZE (VERBOSE, SKIP_LOCKED) does_not_exist; -ERROR: relation "does_not_exist" does not exist --- SKIP_LOCKED option -VACUUM (SKIP_LOCKED) vactst; -VACUUM (SKIP_LOCKED, FULL) vactst; -ANALYZE (SKIP_LOCKED) vactst; -RESET client_min_messages; --- ensure VACUUM and ANALYZE don't have a problem with serializable -SET default_transaction_isolation = serializable; -VACUUM vactst; -ANALYZE vactst; -RESET default_transaction_isolation; -BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; -ANALYZE vactst; -COMMIT; --- PROCESS_TOAST option -ALTER TABLE vactst ADD COLUMN t TEXT; -ALTER TABLE vactst ALTER COLUMN t SET STORAGE EXTERNAL; -VACUUM (PROCESS_TOAST FALSE) vactst; -VACUUM (PROCESS_TOAST FALSE, FULL) vactst; -ERROR: PROCESS_TOAST required with VACUUM FULL -DROP TABLE vaccluster; -DROP TABLE vactst; -DROP TABLE vacparted; -DROP TABLE no_index_cleanup; --- relation ownership, WARNING logs generated as all are skipped. -CREATE TABLE vacowned (a int); -CREATE TABLE vacowned_parted (a int) PARTITION BY LIST (a); -CREATE TABLE vacowned_part1 PARTITION OF vacowned_parted FOR VALUES IN (1); -CREATE TABLE vacowned_part2 PARTITION OF vacowned_parted FOR VALUES IN (2); -CREATE ROLE regress_vacuum; -SET ROLE regress_vacuum; --- Simple table -VACUUM vacowned; -WARNING: skipping "vacowned" --- only table or database owner can vacuum it -ANALYZE vacowned; -WARNING: skipping "vacowned" --- only table or database owner can analyze it -VACUUM (ANALYZE) vacowned; -WARNING: skipping "vacowned" --- only table or database owner can vacuum it --- Catalog -VACUUM pg_catalog.pg_class; -WARNING: skipping "pg_class" --- only superuser or database owner can vacuum it -ANALYZE pg_catalog.pg_class; -WARNING: skipping "pg_class" --- only superuser or database owner can analyze it -VACUUM (ANALYZE) pg_catalog.pg_class; -WARNING: skipping "pg_class" --- only superuser or database owner can vacuum it --- Shared catalog -VACUUM pg_catalog.pg_authid; -WARNING: skipping "pg_authid" --- only superuser can vacuum it -ANALYZE pg_catalog.pg_authid; -WARNING: skipping "pg_authid" --- only superuser can analyze it -VACUUM (ANALYZE) pg_catalog.pg_authid; -WARNING: skipping "pg_authid" --- only superuser can vacuum it --- Partitioned table and its partitions, nothing owned by other user. --- Relations are not listed in a single command to test ownership --- independently. -VACUUM vacowned_parted; -WARNING: skipping "vacowned_parted" --- only table or database owner can vacuum it -WARNING: skipping "vacowned_part1" --- only table or database owner can vacuum it -WARNING: skipping "vacowned_part2" --- only table or database owner can vacuum it -VACUUM vacowned_part1; -WARNING: skipping "vacowned_part1" --- only table or database owner can vacuum it -VACUUM vacowned_part2; -WARNING: skipping "vacowned_part2" --- only table or database owner can vacuum it -ANALYZE vacowned_parted; -WARNING: skipping "vacowned_parted" --- only table or database owner can analyze it -WARNING: skipping "vacowned_part1" --- only table or database owner can analyze it -WARNING: skipping "vacowned_part2" --- only table or database owner can analyze it -ANALYZE vacowned_part1; -WARNING: skipping "vacowned_part1" --- only table or database owner can analyze it -ANALYZE vacowned_part2; -WARNING: skipping "vacowned_part2" --- only table or database owner can analyze it -VACUUM (ANALYZE) vacowned_parted; -WARNING: skipping "vacowned_parted" --- only table or database owner can vacuum it -WARNING: skipping "vacowned_part1" --- only table or database owner can vacuum it -WARNING: skipping "vacowned_part2" --- only table or database owner can vacuum it -VACUUM (ANALYZE) vacowned_part1; -WARNING: skipping "vacowned_part1" --- only table or database owner can vacuum it -VACUUM (ANALYZE) vacowned_part2; -WARNING: skipping "vacowned_part2" --- only table or database owner can vacuum it -RESET ROLE; --- Partitioned table and one partition owned by other user. -ALTER TABLE vacowned_parted OWNER TO regress_vacuum; -ALTER TABLE vacowned_part1 OWNER TO regress_vacuum; -SET ROLE regress_vacuum; -VACUUM vacowned_parted; -WARNING: skipping "vacowned_part2" --- only table or database owner can vacuum it -VACUUM vacowned_part1; -VACUUM vacowned_part2; -WARNING: skipping "vacowned_part2" --- only table or database owner can vacuum it -ANALYZE vacowned_parted; -WARNING: skipping "vacowned_part2" --- only table or database owner can analyze it -ANALYZE vacowned_part1; -ANALYZE vacowned_part2; -WARNING: skipping "vacowned_part2" --- only table or database owner can analyze it -VACUUM (ANALYZE) vacowned_parted; -WARNING: skipping "vacowned_part2" --- only table or database owner can vacuum it -VACUUM (ANALYZE) vacowned_part1; -VACUUM (ANALYZE) vacowned_part2; -WARNING: skipping "vacowned_part2" --- only table or database owner can vacuum it -RESET ROLE; --- Only one partition owned by other user. -ALTER TABLE vacowned_parted OWNER TO CURRENT_USER; -SET ROLE regress_vacuum; -VACUUM vacowned_parted; -WARNING: skipping "vacowned_parted" --- only table or database owner can vacuum it -WARNING: skipping "vacowned_part2" --- only table or database owner can vacuum it -VACUUM vacowned_part1; -VACUUM vacowned_part2; -WARNING: skipping "vacowned_part2" --- only table or database owner can vacuum it -ANALYZE vacowned_parted; -WARNING: skipping "vacowned_parted" --- only table or database owner can analyze it -WARNING: skipping "vacowned_part2" --- only table or database owner can analyze it -ANALYZE vacowned_part1; -ANALYZE vacowned_part2; -WARNING: skipping "vacowned_part2" --- only table or database owner can analyze it -VACUUM (ANALYZE) vacowned_parted; -WARNING: skipping "vacowned_parted" --- only table or database owner can vacuum it -WARNING: skipping "vacowned_part2" --- only table or database owner can vacuum it -VACUUM (ANALYZE) vacowned_part1; -VACUUM (ANALYZE) vacowned_part2; -WARNING: skipping "vacowned_part2" --- only table or database owner can vacuum it -RESET ROLE; --- Only partitioned table owned by other user. -ALTER TABLE vacowned_parted OWNER TO regress_vacuum; -ALTER TABLE vacowned_part1 OWNER TO CURRENT_USER; -SET ROLE regress_vacuum; -VACUUM vacowned_parted; -WARNING: skipping "vacowned_part1" --- only table or database owner can vacuum it -WARNING: skipping "vacowned_part2" --- only table or database owner can vacuum it -VACUUM vacowned_part1; -WARNING: skipping "vacowned_part1" --- only table or database owner can vacuum it -VACUUM vacowned_part2; -WARNING: skipping "vacowned_part2" --- only table or database owner can vacuum it -ANALYZE vacowned_parted; -WARNING: skipping "vacowned_part1" --- only table or database owner can analyze it -WARNING: skipping "vacowned_part2" --- only table or database owner can analyze it -ANALYZE vacowned_part1; -WARNING: skipping "vacowned_part1" --- only table or database owner can analyze it -ANALYZE vacowned_part2; -WARNING: skipping "vacowned_part2" --- only table or database owner can analyze it -VACUUM (ANALYZE) vacowned_parted; -WARNING: skipping "vacowned_part1" --- only table or database owner can vacuum it -WARNING: skipping "vacowned_part2" --- only table or database owner can vacuum it -VACUUM (ANALYZE) vacowned_part1; -WARNING: skipping "vacowned_part1" --- only table or database owner can vacuum it -VACUUM (ANALYZE) vacowned_part2; -WARNING: skipping "vacowned_part2" --- only table or database owner can vacuum it -RESET ROLE; -DROP TABLE vacowned; -DROP TABLE vacowned_parted; -DROP ROLE regress_vacuum; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/drop_if_exists.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/drop_if_exists.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/drop_if_exists.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/drop_if_exists.out 2023-02-20 19:45:21.779209989 -0500 @@ -1,342 +1 @@ --- --- IF EXISTS tests --- --- table (will be really dropped at the end) -DROP TABLE test_exists; -ERROR: table "test_exists" does not exist -DROP TABLE IF EXISTS test_exists; -NOTICE: table "test_exists" does not exist, skipping -CREATE TABLE test_exists (a int, b text); --- view -DROP VIEW test_view_exists; -ERROR: view "test_view_exists" does not exist -DROP VIEW IF EXISTS test_view_exists; -NOTICE: view "test_view_exists" does not exist, skipping -CREATE VIEW test_view_exists AS select * from test_exists; -DROP VIEW IF EXISTS test_view_exists; -DROP VIEW test_view_exists; -ERROR: view "test_view_exists" does not exist --- index -DROP INDEX test_index_exists; -ERROR: index "test_index_exists" does not exist -DROP INDEX IF EXISTS test_index_exists; -NOTICE: index "test_index_exists" does not exist, skipping -CREATE INDEX test_index_exists on test_exists(a); -DROP INDEX IF EXISTS test_index_exists; -DROP INDEX test_index_exists; -ERROR: index "test_index_exists" does not exist --- sequence -DROP SEQUENCE test_sequence_exists; -ERROR: sequence "test_sequence_exists" does not exist -DROP SEQUENCE IF EXISTS test_sequence_exists; -NOTICE: sequence "test_sequence_exists" does not exist, skipping -CREATE SEQUENCE test_sequence_exists; -DROP SEQUENCE IF EXISTS test_sequence_exists; -DROP SEQUENCE test_sequence_exists; -ERROR: sequence "test_sequence_exists" does not exist --- schema -DROP SCHEMA test_schema_exists; -ERROR: schema "test_schema_exists" does not exist -DROP SCHEMA IF EXISTS test_schema_exists; -NOTICE: schema "test_schema_exists" does not exist, skipping -CREATE SCHEMA test_schema_exists; -DROP SCHEMA IF EXISTS test_schema_exists; -DROP SCHEMA test_schema_exists; -ERROR: schema "test_schema_exists" does not exist --- type -DROP TYPE test_type_exists; -ERROR: type "test_type_exists" does not exist -DROP TYPE IF EXISTS test_type_exists; -NOTICE: type "test_type_exists" does not exist, skipping -CREATE type test_type_exists as (a int, b text); -DROP TYPE IF EXISTS test_type_exists; -DROP TYPE test_type_exists; -ERROR: type "test_type_exists" does not exist --- domain -DROP DOMAIN test_domain_exists; -ERROR: type "test_domain_exists" does not exist -DROP DOMAIN IF EXISTS test_domain_exists; -NOTICE: type "test_domain_exists" does not exist, skipping -CREATE domain test_domain_exists as int not null check (value > 0); -DROP DOMAIN IF EXISTS test_domain_exists; -DROP DOMAIN test_domain_exists; -ERROR: type "test_domain_exists" does not exist ---- ---- role/user/group ---- -CREATE USER regress_test_u1; -CREATE ROLE regress_test_r1; -CREATE GROUP regress_test_g1; -DROP USER regress_test_u2; -ERROR: role "regress_test_u2" does not exist -DROP USER IF EXISTS regress_test_u1, regress_test_u2; -NOTICE: role "regress_test_u2" does not exist, skipping -DROP USER regress_test_u1; -ERROR: role "regress_test_u1" does not exist -DROP ROLE regress_test_r2; -ERROR: role "regress_test_r2" does not exist -DROP ROLE IF EXISTS regress_test_r1, regress_test_r2; -NOTICE: role "regress_test_r2" does not exist, skipping -DROP ROLE regress_test_r1; -ERROR: role "regress_test_r1" does not exist -DROP GROUP regress_test_g2; -ERROR: role "regress_test_g2" does not exist -DROP GROUP IF EXISTS regress_test_g1, regress_test_g2; -NOTICE: role "regress_test_g2" does not exist, skipping -DROP GROUP regress_test_g1; -ERROR: role "regress_test_g1" does not exist --- collation -DROP COLLATION IF EXISTS test_collation_exists; -NOTICE: collation "test_collation_exists" does not exist, skipping --- conversion -DROP CONVERSION test_conversion_exists; -ERROR: conversion "test_conversion_exists" does not exist -DROP CONVERSION IF EXISTS test_conversion_exists; -NOTICE: conversion "test_conversion_exists" does not exist, skipping -CREATE CONVERSION test_conversion_exists - FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8; -DROP CONVERSION test_conversion_exists; --- text search parser -DROP TEXT SEARCH PARSER test_tsparser_exists; -ERROR: text search parser "test_tsparser_exists" does not exist -DROP TEXT SEARCH PARSER IF EXISTS test_tsparser_exists; -NOTICE: text search parser "test_tsparser_exists" does not exist, skipping --- text search dictionary -DROP TEXT SEARCH DICTIONARY test_tsdict_exists; -ERROR: text search dictionary "test_tsdict_exists" does not exist -DROP TEXT SEARCH DICTIONARY IF EXISTS test_tsdict_exists; -NOTICE: text search dictionary "test_tsdict_exists" does not exist, skipping -CREATE TEXT SEARCH DICTIONARY test_tsdict_exists ( - Template=ispell, - DictFile=ispell_sample, - AffFile=ispell_sample -); -DROP TEXT SEARCH DICTIONARY test_tsdict_exists; --- test search template -DROP TEXT SEARCH TEMPLATE test_tstemplate_exists; -ERROR: text search template "test_tstemplate_exists" does not exist -DROP TEXT SEARCH TEMPLATE IF EXISTS test_tstemplate_exists; -NOTICE: text search template "test_tstemplate_exists" does not exist, skipping --- text search configuration -DROP TEXT SEARCH CONFIGURATION test_tsconfig_exists; -ERROR: text search configuration "test_tsconfig_exists" does not exist -DROP TEXT SEARCH CONFIGURATION IF EXISTS test_tsconfig_exists; -NOTICE: text search configuration "test_tsconfig_exists" does not exist, skipping -CREATE TEXT SEARCH CONFIGURATION test_tsconfig_exists (COPY=english); -DROP TEXT SEARCH CONFIGURATION test_tsconfig_exists; --- extension -DROP EXTENSION test_extension_exists; -ERROR: extension "test_extension_exists" does not exist -DROP EXTENSION IF EXISTS test_extension_exists; -NOTICE: extension "test_extension_exists" does not exist, skipping --- functions -DROP FUNCTION test_function_exists(); -ERROR: function test_function_exists() does not exist -DROP FUNCTION IF EXISTS test_function_exists(); -NOTICE: function test_function_exists() does not exist, skipping -DROP FUNCTION test_function_exists(int, text, int[]); -ERROR: function test_function_exists(integer, text, integer[]) does not exist -DROP FUNCTION IF EXISTS test_function_exists(int, text, int[]); -NOTICE: function test_function_exists(pg_catalog.int4,text,pg_catalog.int4[]) does not exist, skipping --- aggregate -DROP AGGREGATE test_aggregate_exists(*); -ERROR: aggregate test_aggregate_exists(*) does not exist -DROP AGGREGATE IF EXISTS test_aggregate_exists(*); -NOTICE: aggregate test_aggregate_exists() does not exist, skipping -DROP AGGREGATE test_aggregate_exists(int); -ERROR: aggregate test_aggregate_exists(integer) does not exist -DROP AGGREGATE IF EXISTS test_aggregate_exists(int); -NOTICE: aggregate test_aggregate_exists(pg_catalog.int4) does not exist, skipping --- operator -DROP OPERATOR @#@ (int, int); -ERROR: operator does not exist: integer @#@ integer -DROP OPERATOR IF EXISTS @#@ (int, int); -NOTICE: operator @#@ does not exist, skipping -CREATE OPERATOR @#@ - (leftarg = int8, rightarg = int8, procedure = int8xor); -DROP OPERATOR @#@ (int8, int8); --- language -DROP LANGUAGE test_language_exists; -ERROR: language "test_language_exists" does not exist -DROP LANGUAGE IF EXISTS test_language_exists; -NOTICE: language "test_language_exists" does not exist, skipping --- cast -DROP CAST (text AS text); -ERROR: cast from type text to type text does not exist -DROP CAST IF EXISTS (text AS text); -NOTICE: cast from type text to type text does not exist, skipping --- trigger -DROP TRIGGER test_trigger_exists ON test_exists; -ERROR: trigger "test_trigger_exists" for table "test_exists" does not exist -DROP TRIGGER IF EXISTS test_trigger_exists ON test_exists; -NOTICE: trigger "test_trigger_exists" for relation "test_exists" does not exist, skipping -DROP TRIGGER test_trigger_exists ON no_such_table; -ERROR: relation "no_such_table" does not exist -DROP TRIGGER IF EXISTS test_trigger_exists ON no_such_table; -NOTICE: relation "no_such_table" does not exist, skipping -DROP TRIGGER test_trigger_exists ON no_such_schema.no_such_table; -ERROR: schema "no_such_schema" does not exist -DROP TRIGGER IF EXISTS test_trigger_exists ON no_such_schema.no_such_table; -NOTICE: schema "no_such_schema" does not exist, skipping -CREATE TRIGGER test_trigger_exists - BEFORE UPDATE ON test_exists - FOR EACH ROW EXECUTE PROCEDURE suppress_redundant_updates_trigger(); -DROP TRIGGER test_trigger_exists ON test_exists; --- rule -DROP RULE test_rule_exists ON test_exists; -ERROR: rule "test_rule_exists" for relation "test_exists" does not exist -DROP RULE IF EXISTS test_rule_exists ON test_exists; -NOTICE: rule "test_rule_exists" for relation "test_exists" does not exist, skipping -DROP RULE test_rule_exists ON no_such_table; -ERROR: relation "no_such_table" does not exist -DROP RULE IF EXISTS test_rule_exists ON no_such_table; -NOTICE: relation "no_such_table" does not exist, skipping -DROP RULE test_rule_exists ON no_such_schema.no_such_table; -ERROR: schema "no_such_schema" does not exist -DROP RULE IF EXISTS test_rule_exists ON no_such_schema.no_such_table; -NOTICE: schema "no_such_schema" does not exist, skipping -CREATE RULE test_rule_exists AS ON INSERT TO test_exists - DO INSTEAD - INSERT INTO test_exists VALUES (NEW.a, NEW.b || NEW.a::text); -DROP RULE test_rule_exists ON test_exists; --- foreign data wrapper -DROP FOREIGN DATA WRAPPER test_fdw_exists; -ERROR: foreign-data wrapper "test_fdw_exists" does not exist -DROP FOREIGN DATA WRAPPER IF EXISTS test_fdw_exists; -NOTICE: foreign-data wrapper "test_fdw_exists" does not exist, skipping --- foreign server -DROP SERVER test_server_exists; -ERROR: server "test_server_exists" does not exist -DROP SERVER IF EXISTS test_server_exists; -NOTICE: server "test_server_exists" does not exist, skipping --- operator class -DROP OPERATOR CLASS test_operator_class USING btree; -ERROR: operator class "test_operator_class" does not exist for access method "btree" -DROP OPERATOR CLASS IF EXISTS test_operator_class USING btree; -NOTICE: operator class "test_operator_class" does not exist for access method "btree", skipping -DROP OPERATOR CLASS test_operator_class USING no_such_am; -ERROR: access method "no_such_am" does not exist -DROP OPERATOR CLASS IF EXISTS test_operator_class USING no_such_am; -ERROR: access method "no_such_am" does not exist --- operator family -DROP OPERATOR FAMILY test_operator_family USING btree; -ERROR: operator family "test_operator_family" does not exist for access method "btree" -DROP OPERATOR FAMILY IF EXISTS test_operator_family USING btree; -NOTICE: operator family "test_operator_family" does not exist for access method "btree", skipping -DROP OPERATOR FAMILY test_operator_family USING no_such_am; -ERROR: access method "no_such_am" does not exist -DROP OPERATOR FAMILY IF EXISTS test_operator_family USING no_such_am; -ERROR: access method "no_such_am" does not exist --- access method -DROP ACCESS METHOD no_such_am; -ERROR: access method "no_such_am" does not exist -DROP ACCESS METHOD IF EXISTS no_such_am; -NOTICE: access method "no_such_am" does not exist, skipping --- drop the table -DROP TABLE IF EXISTS test_exists; -DROP TABLE test_exists; -ERROR: table "test_exists" does not exist --- be tolerant with missing schemas, types, etc -DROP AGGREGATE IF EXISTS no_such_schema.foo(int); -NOTICE: schema "no_such_schema" does not exist, skipping -DROP AGGREGATE IF EXISTS foo(no_such_type); -NOTICE: type "no_such_type" does not exist, skipping -DROP AGGREGATE IF EXISTS foo(no_such_schema.no_such_type); -NOTICE: schema "no_such_schema" does not exist, skipping -DROP CAST IF EXISTS (INTEGER AS no_such_type2); -NOTICE: type "no_such_type2" does not exist, skipping -DROP CAST IF EXISTS (no_such_type1 AS INTEGER); -NOTICE: type "no_such_type1" does not exist, skipping -DROP CAST IF EXISTS (INTEGER AS no_such_schema.bar); -NOTICE: schema "no_such_schema" does not exist, skipping -DROP CAST IF EXISTS (no_such_schema.foo AS INTEGER); -NOTICE: schema "no_such_schema" does not exist, skipping -DROP COLLATION IF EXISTS no_such_schema.foo; -NOTICE: schema "no_such_schema" does not exist, skipping -DROP CONVERSION IF EXISTS no_such_schema.foo; -NOTICE: schema "no_such_schema" does not exist, skipping -DROP DOMAIN IF EXISTS no_such_schema.foo; -NOTICE: schema "no_such_schema" does not exist, skipping -DROP FOREIGN TABLE IF EXISTS no_such_schema.foo; -NOTICE: schema "no_such_schema" does not exist, skipping -DROP FUNCTION IF EXISTS no_such_schema.foo(); -NOTICE: schema "no_such_schema" does not exist, skipping -DROP FUNCTION IF EXISTS foo(no_such_type); -NOTICE: type "no_such_type" does not exist, skipping -DROP FUNCTION IF EXISTS foo(no_such_schema.no_such_type); -NOTICE: schema "no_such_schema" does not exist, skipping -DROP INDEX IF EXISTS no_such_schema.foo; -NOTICE: schema "no_such_schema" does not exist, skipping -DROP MATERIALIZED VIEW IF EXISTS no_such_schema.foo; -NOTICE: schema "no_such_schema" does not exist, skipping -DROP OPERATOR IF EXISTS no_such_schema.+ (int, int); -NOTICE: schema "no_such_schema" does not exist, skipping -DROP OPERATOR IF EXISTS + (no_such_type, no_such_type); -NOTICE: type "no_such_type" does not exist, skipping -DROP OPERATOR IF EXISTS + (no_such_schema.no_such_type, no_such_schema.no_such_type); -NOTICE: schema "no_such_schema" does not exist, skipping -DROP OPERATOR IF EXISTS # (NONE, no_such_schema.no_such_type); -NOTICE: schema "no_such_schema" does not exist, skipping -DROP OPERATOR CLASS IF EXISTS no_such_schema.widget_ops USING btree; -NOTICE: schema "no_such_schema" does not exist, skipping -DROP OPERATOR FAMILY IF EXISTS no_such_schema.float_ops USING btree; -NOTICE: schema "no_such_schema" does not exist, skipping -DROP RULE IF EXISTS foo ON no_such_schema.bar; -NOTICE: schema "no_such_schema" does not exist, skipping -DROP SEQUENCE IF EXISTS no_such_schema.foo; -NOTICE: schema "no_such_schema" does not exist, skipping -DROP TABLE IF EXISTS no_such_schema.foo; -NOTICE: schema "no_such_schema" does not exist, skipping -DROP TEXT SEARCH CONFIGURATION IF EXISTS no_such_schema.foo; -NOTICE: schema "no_such_schema" does not exist, skipping -DROP TEXT SEARCH DICTIONARY IF EXISTS no_such_schema.foo; -NOTICE: schema "no_such_schema" does not exist, skipping -DROP TEXT SEARCH PARSER IF EXISTS no_such_schema.foo; -NOTICE: schema "no_such_schema" does not exist, skipping -DROP TEXT SEARCH TEMPLATE IF EXISTS no_such_schema.foo; -NOTICE: schema "no_such_schema" does not exist, skipping -DROP TRIGGER IF EXISTS foo ON no_such_schema.bar; -NOTICE: schema "no_such_schema" does not exist, skipping -DROP TYPE IF EXISTS no_such_schema.foo; -NOTICE: schema "no_such_schema" does not exist, skipping -DROP VIEW IF EXISTS no_such_schema.foo; -NOTICE: schema "no_such_schema" does not exist, skipping --- Check we receive an ambiguous function error when there are --- multiple matching functions. -CREATE FUNCTION test_ambiguous_funcname(int) returns int as $$ select $1; $$ language sql; -CREATE FUNCTION test_ambiguous_funcname(text) returns text as $$ select $1; $$ language sql; -DROP FUNCTION test_ambiguous_funcname; -ERROR: function name "test_ambiguous_funcname" is not unique -HINT: Specify the argument list to select the function unambiguously. -DROP FUNCTION IF EXISTS test_ambiguous_funcname; -ERROR: function name "test_ambiguous_funcname" is not unique -HINT: Specify the argument list to select the function unambiguously. --- cleanup -DROP FUNCTION test_ambiguous_funcname(int); -DROP FUNCTION test_ambiguous_funcname(text); --- Likewise for procedures. -CREATE PROCEDURE test_ambiguous_procname(int) as $$ begin end; $$ language plpgsql; -CREATE PROCEDURE test_ambiguous_procname(text) as $$ begin end; $$ language plpgsql; -DROP PROCEDURE test_ambiguous_procname; -ERROR: procedure name "test_ambiguous_procname" is not unique -HINT: Specify the argument list to select the procedure unambiguously. -DROP PROCEDURE IF EXISTS test_ambiguous_procname; -ERROR: procedure name "test_ambiguous_procname" is not unique -HINT: Specify the argument list to select the procedure unambiguously. --- Check we get a similar error if we use ROUTINE instead of PROCEDURE. -DROP ROUTINE IF EXISTS test_ambiguous_procname; -ERROR: routine name "test_ambiguous_procname" is not unique -HINT: Specify the argument list to select the routine unambiguously. --- cleanup -DROP PROCEDURE test_ambiguous_procname(int); -DROP PROCEDURE test_ambiguous_procname(text); --- This test checks both the functionality of 'if exists' and the syntax --- of the drop database command. -drop database test_database_exists (force); -ERROR: database "test_database_exists" does not exist -drop database test_database_exists with (force); -ERROR: database "test_database_exists" does not exist -drop database if exists test_database_exists (force); -NOTICE: database "test_database_exists" does not exist, skipping -drop database if exists test_database_exists with (force); -NOTICE: database "test_database_exists" does not exist, skipping +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/updatable_views.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/updatable_views.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/updatable_views.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/updatable_views.out 2023-02-20 19:45:22.179210006 -0500 @@ -1,3056 +1 @@ --- --- UPDATABLE VIEWS --- --- avoid bit-exact output here because operations may not be bit-exact. -SET extra_float_digits = 0; --- check that non-updatable views and columns are rejected with useful error --- messages -CREATE TABLE base_tbl (a int PRIMARY KEY, b text DEFAULT 'Unspecified'); -INSERT INTO base_tbl SELECT i, 'Row ' || i FROM generate_series(-2, 2) g(i); -CREATE VIEW ro_view1 AS SELECT DISTINCT a, b FROM base_tbl; -- DISTINCT not supported -CREATE VIEW ro_view2 AS SELECT a, b FROM base_tbl GROUP BY a, b; -- GROUP BY not supported -CREATE VIEW ro_view3 AS SELECT 1 FROM base_tbl HAVING max(a) > 0; -- HAVING not supported -CREATE VIEW ro_view4 AS SELECT count(*) FROM base_tbl; -- Aggregate functions not supported -CREATE VIEW ro_view5 AS SELECT a, rank() OVER() FROM base_tbl; -- Window functions not supported -CREATE VIEW ro_view6 AS SELECT a, b FROM base_tbl UNION SELECT -a, b FROM base_tbl; -- Set ops not supported -CREATE VIEW ro_view7 AS WITH t AS (SELECT a, b FROM base_tbl) SELECT * FROM t; -- WITH not supported -CREATE VIEW ro_view8 AS SELECT a, b FROM base_tbl ORDER BY a OFFSET 1; -- OFFSET not supported -CREATE VIEW ro_view9 AS SELECT a, b FROM base_tbl ORDER BY a LIMIT 1; -- LIMIT not supported -CREATE VIEW ro_view10 AS SELECT 1 AS a; -- No base relations -CREATE VIEW ro_view11 AS SELECT b1.a, b2.b FROM base_tbl b1, base_tbl b2; -- Multiple base relations -CREATE VIEW ro_view12 AS SELECT * FROM generate_series(1, 10) AS g(a); -- SRF in rangetable -CREATE VIEW ro_view13 AS SELECT a, b FROM (SELECT * FROM base_tbl) AS t; -- Subselect in rangetable -CREATE VIEW rw_view14 AS SELECT ctid, a, b FROM base_tbl; -- System columns may be part of an updatable view -CREATE VIEW rw_view15 AS SELECT a, upper(b) FROM base_tbl; -- Expression/function may be part of an updatable view -CREATE VIEW rw_view16 AS SELECT a, b, a AS aa FROM base_tbl; -- Repeated column may be part of an updatable view -CREATE VIEW ro_view17 AS SELECT * FROM ro_view1; -- Base relation not updatable -CREATE VIEW ro_view18 AS SELECT * FROM (VALUES(1)) AS tmp(a); -- VALUES in rangetable -CREATE SEQUENCE uv_seq; -CREATE VIEW ro_view19 AS SELECT * FROM uv_seq; -- View based on a sequence -CREATE VIEW ro_view20 AS SELECT a, b, generate_series(1, a) g FROM base_tbl; -- SRF in targetlist not supported -SELECT table_name, is_insertable_into - FROM information_schema.tables - WHERE table_name LIKE E'r_\\_view%' - ORDER BY table_name; - table_name | is_insertable_into -------------+-------------------- - ro_view1 | NO - ro_view10 | NO - ro_view11 | NO - ro_view12 | NO - ro_view13 | NO - ro_view17 | NO - ro_view18 | NO - ro_view19 | NO - ro_view2 | NO - ro_view20 | NO - ro_view3 | NO - ro_view4 | NO - ro_view5 | NO - ro_view6 | NO - ro_view7 | NO - ro_view8 | NO - ro_view9 | NO - rw_view14 | YES - rw_view15 | YES - rw_view16 | YES -(20 rows) - -SELECT table_name, is_updatable, is_insertable_into - FROM information_schema.views - WHERE table_name LIKE E'r_\\_view%' - ORDER BY table_name; - table_name | is_updatable | is_insertable_into -------------+--------------+-------------------- - ro_view1 | NO | NO - ro_view10 | NO | NO - ro_view11 | NO | NO - ro_view12 | NO | NO - ro_view13 | NO | NO - ro_view17 | NO | NO - ro_view18 | NO | NO - ro_view19 | NO | NO - ro_view2 | NO | NO - ro_view20 | NO | NO - ro_view3 | NO | NO - ro_view4 | NO | NO - ro_view5 | NO | NO - ro_view6 | NO | NO - ro_view7 | NO | NO - ro_view8 | NO | NO - ro_view9 | NO | NO - rw_view14 | YES | YES - rw_view15 | YES | YES - rw_view16 | YES | YES -(20 rows) - -SELECT table_name, column_name, is_updatable - FROM information_schema.columns - WHERE table_name LIKE E'r_\\_view%' - ORDER BY table_name, ordinal_position; - table_name | column_name | is_updatable -------------+-------------+-------------- - ro_view1 | a | NO - ro_view1 | b | NO - ro_view10 | a | NO - ro_view11 | a | NO - ro_view11 | b | NO - ro_view12 | a | NO - ro_view13 | a | NO - ro_view13 | b | NO - ro_view17 | a | NO - ro_view17 | b | NO - ro_view18 | a | NO - ro_view19 | last_value | NO - ro_view19 | log_cnt | NO - ro_view19 | is_called | NO - ro_view2 | a | NO - ro_view2 | b | NO - ro_view20 | a | NO - ro_view20 | b | NO - ro_view20 | g | NO - ro_view3 | ?column? | NO - ro_view4 | count | NO - ro_view5 | a | NO - ro_view5 | rank | NO - ro_view6 | a | NO - ro_view6 | b | NO - ro_view7 | a | NO - ro_view7 | b | NO - ro_view8 | a | NO - ro_view8 | b | NO - ro_view9 | a | NO - ro_view9 | b | NO - rw_view14 | ctid | NO - rw_view14 | a | YES - rw_view14 | b | YES - rw_view15 | a | YES - rw_view15 | upper | NO - rw_view16 | a | YES - rw_view16 | b | YES - rw_view16 | aa | YES -(39 rows) - --- Read-only views -DELETE FROM ro_view1; -ERROR: cannot delete from view "ro_view1" -DETAIL: Views containing DISTINCT are not automatically updatable. -HINT: To enable deleting from the view, provide an INSTEAD OF DELETE trigger or an unconditional ON DELETE DO INSTEAD rule. -DELETE FROM ro_view2; -ERROR: cannot delete from view "ro_view2" -DETAIL: Views containing GROUP BY are not automatically updatable. -HINT: To enable deleting from the view, provide an INSTEAD OF DELETE trigger or an unconditional ON DELETE DO INSTEAD rule. -DELETE FROM ro_view3; -ERROR: cannot delete from view "ro_view3" -DETAIL: Views containing HAVING are not automatically updatable. -HINT: To enable deleting from the view, provide an INSTEAD OF DELETE trigger or an unconditional ON DELETE DO INSTEAD rule. -DELETE FROM ro_view4; -ERROR: cannot delete from view "ro_view4" -DETAIL: Views that return aggregate functions are not automatically updatable. -HINT: To enable deleting from the view, provide an INSTEAD OF DELETE trigger or an unconditional ON DELETE DO INSTEAD rule. -DELETE FROM ro_view5; -ERROR: cannot delete from view "ro_view5" -DETAIL: Views that return window functions are not automatically updatable. -HINT: To enable deleting from the view, provide an INSTEAD OF DELETE trigger or an unconditional ON DELETE DO INSTEAD rule. -DELETE FROM ro_view6; -ERROR: cannot delete from view "ro_view6" -DETAIL: Views containing UNION, INTERSECT, or EXCEPT are not automatically updatable. -HINT: To enable deleting from the view, provide an INSTEAD OF DELETE trigger or an unconditional ON DELETE DO INSTEAD rule. -UPDATE ro_view7 SET a=a+1; -ERROR: cannot update view "ro_view7" -DETAIL: Views containing WITH are not automatically updatable. -HINT: To enable updating the view, provide an INSTEAD OF UPDATE trigger or an unconditional ON UPDATE DO INSTEAD rule. -UPDATE ro_view8 SET a=a+1; -ERROR: cannot update view "ro_view8" -DETAIL: Views containing LIMIT or OFFSET are not automatically updatable. -HINT: To enable updating the view, provide an INSTEAD OF UPDATE trigger or an unconditional ON UPDATE DO INSTEAD rule. -UPDATE ro_view9 SET a=a+1; -ERROR: cannot update view "ro_view9" -DETAIL: Views containing LIMIT or OFFSET are not automatically updatable. -HINT: To enable updating the view, provide an INSTEAD OF UPDATE trigger or an unconditional ON UPDATE DO INSTEAD rule. -UPDATE ro_view10 SET a=a+1; -ERROR: cannot update view "ro_view10" -DETAIL: Views that do not select from a single table or view are not automatically updatable. -HINT: To enable updating the view, provide an INSTEAD OF UPDATE trigger or an unconditional ON UPDATE DO INSTEAD rule. -UPDATE ro_view11 SET a=a+1; -ERROR: cannot update view "ro_view11" -DETAIL: Views that do not select from a single table or view are not automatically updatable. -HINT: To enable updating the view, provide an INSTEAD OF UPDATE trigger or an unconditional ON UPDATE DO INSTEAD rule. -UPDATE ro_view12 SET a=a+1; -ERROR: cannot update view "ro_view12" -DETAIL: Views that do not select from a single table or view are not automatically updatable. -HINT: To enable updating the view, provide an INSTEAD OF UPDATE trigger or an unconditional ON UPDATE DO INSTEAD rule. -INSERT INTO ro_view13 VALUES (3, 'Row 3'); -ERROR: cannot insert into view "ro_view13" -DETAIL: Views that do not select from a single table or view are not automatically updatable. -HINT: To enable inserting into the view, provide an INSTEAD OF INSERT trigger or an unconditional ON INSERT DO INSTEAD rule. --- Partially updatable view -INSERT INTO rw_view14 VALUES (null, 3, 'Row 3'); -- should fail -ERROR: cannot insert into column "ctid" of view "rw_view14" -DETAIL: View columns that refer to system columns are not updatable. -INSERT INTO rw_view14 (a, b) VALUES (3, 'Row 3'); -- should be OK -UPDATE rw_view14 SET ctid=null WHERE a=3; -- should fail -ERROR: cannot update column "ctid" of view "rw_view14" -DETAIL: View columns that refer to system columns are not updatable. -UPDATE rw_view14 SET b='ROW 3' WHERE a=3; -- should be OK -SELECT * FROM base_tbl; - a | b -----+-------- - -2 | Row -2 - -1 | Row -1 - 0 | Row 0 - 1 | Row 1 - 2 | Row 2 - 3 | ROW 3 -(6 rows) - -DELETE FROM rw_view14 WHERE a=3; -- should be OK --- Partially updatable view -INSERT INTO rw_view15 VALUES (3, 'ROW 3'); -- should fail -ERROR: cannot insert into column "upper" of view "rw_view15" -DETAIL: View columns that are not columns of their base relation are not updatable. -INSERT INTO rw_view15 (a) VALUES (3); -- should be OK -INSERT INTO rw_view15 (a) VALUES (3) ON CONFLICT DO NOTHING; -- succeeds -SELECT * FROM rw_view15; - a | upper -----+------------- - -2 | ROW -2 - -1 | ROW -1 - 0 | ROW 0 - 1 | ROW 1 - 2 | ROW 2 - 3 | UNSPECIFIED -(6 rows) - -INSERT INTO rw_view15 (a) VALUES (3) ON CONFLICT (a) DO NOTHING; -- succeeds -SELECT * FROM rw_view15; - a | upper -----+------------- - -2 | ROW -2 - -1 | ROW -1 - 0 | ROW 0 - 1 | ROW 1 - 2 | ROW 2 - 3 | UNSPECIFIED -(6 rows) - -INSERT INTO rw_view15 (a) VALUES (3) ON CONFLICT (a) DO UPDATE set a = excluded.a; -- succeeds -SELECT * FROM rw_view15; - a | upper -----+------------- - -2 | ROW -2 - -1 | ROW -1 - 0 | ROW 0 - 1 | ROW 1 - 2 | ROW 2 - 3 | UNSPECIFIED -(6 rows) - -INSERT INTO rw_view15 (a) VALUES (3) ON CONFLICT (a) DO UPDATE set upper = 'blarg'; -- fails -ERROR: cannot insert into column "upper" of view "rw_view15" -DETAIL: View columns that are not columns of their base relation are not updatable. -SELECT * FROM rw_view15; - a | upper -----+------------- - -2 | ROW -2 - -1 | ROW -1 - 0 | ROW 0 - 1 | ROW 1 - 2 | ROW 2 - 3 | UNSPECIFIED -(6 rows) - -SELECT * FROM rw_view15; - a | upper -----+------------- - -2 | ROW -2 - -1 | ROW -1 - 0 | ROW 0 - 1 | ROW 1 - 2 | ROW 2 - 3 | UNSPECIFIED -(6 rows) - -ALTER VIEW rw_view15 ALTER COLUMN upper SET DEFAULT 'NOT SET'; -INSERT INTO rw_view15 (a) VALUES (4); -- should fail -ERROR: cannot insert into column "upper" of view "rw_view15" -DETAIL: View columns that are not columns of their base relation are not updatable. -UPDATE rw_view15 SET upper='ROW 3' WHERE a=3; -- should fail -ERROR: cannot update column "upper" of view "rw_view15" -DETAIL: View columns that are not columns of their base relation are not updatable. -UPDATE rw_view15 SET upper=DEFAULT WHERE a=3; -- should fail -ERROR: cannot update column "upper" of view "rw_view15" -DETAIL: View columns that are not columns of their base relation are not updatable. -UPDATE rw_view15 SET a=4 WHERE a=3; -- should be OK -SELECT * FROM base_tbl; - a | b -----+------------- - -2 | Row -2 - -1 | Row -1 - 0 | Row 0 - 1 | Row 1 - 2 | Row 2 - 4 | Unspecified -(6 rows) - -DELETE FROM rw_view15 WHERE a=4; -- should be OK --- Partially updatable view -INSERT INTO rw_view16 VALUES (3, 'Row 3', 3); -- should fail -ERROR: multiple assignments to same column "a" -INSERT INTO rw_view16 (a, b) VALUES (3, 'Row 3'); -- should be OK -UPDATE rw_view16 SET a=3, aa=-3 WHERE a=3; -- should fail -ERROR: multiple assignments to same column "a" -UPDATE rw_view16 SET aa=-3 WHERE a=3; -- should be OK -SELECT * FROM base_tbl; - a | b -----+-------- - -2 | Row -2 - -1 | Row -1 - 0 | Row 0 - 1 | Row 1 - 2 | Row 2 - -3 | Row 3 -(6 rows) - -DELETE FROM rw_view16 WHERE a=-3; -- should be OK --- Read-only views -INSERT INTO ro_view17 VALUES (3, 'ROW 3'); -ERROR: cannot insert into view "ro_view1" -DETAIL: Views containing DISTINCT are not automatically updatable. -HINT: To enable inserting into the view, provide an INSTEAD OF INSERT trigger or an unconditional ON INSERT DO INSTEAD rule. -DELETE FROM ro_view18; -ERROR: cannot delete from view "ro_view18" -DETAIL: Views that do not select from a single table or view are not automatically updatable. -HINT: To enable deleting from the view, provide an INSTEAD OF DELETE trigger or an unconditional ON DELETE DO INSTEAD rule. -UPDATE ro_view19 SET last_value=1000; -ERROR: cannot update view "ro_view19" -DETAIL: Views that do not select from a single table or view are not automatically updatable. -HINT: To enable updating the view, provide an INSTEAD OF UPDATE trigger or an unconditional ON UPDATE DO INSTEAD rule. -UPDATE ro_view20 SET b=upper(b); -ERROR: cannot update view "ro_view20" -DETAIL: Views that return set-returning functions are not automatically updatable. -HINT: To enable updating the view, provide an INSTEAD OF UPDATE trigger or an unconditional ON UPDATE DO INSTEAD rule. --- A view with a conditional INSTEAD rule but no unconditional INSTEAD rules --- or INSTEAD OF triggers should be non-updatable and generate useful error --- messages with appropriate detail -CREATE RULE rw_view16_ins_rule AS ON INSERT TO rw_view16 - WHERE NEW.a > 0 DO INSTEAD INSERT INTO base_tbl VALUES (NEW.a, NEW.b); -CREATE RULE rw_view16_upd_rule AS ON UPDATE TO rw_view16 - WHERE OLD.a > 0 DO INSTEAD UPDATE base_tbl SET b=NEW.b WHERE a=OLD.a; -CREATE RULE rw_view16_del_rule AS ON DELETE TO rw_view16 - WHERE OLD.a > 0 DO INSTEAD DELETE FROM base_tbl WHERE a=OLD.a; -INSERT INTO rw_view16 (a, b) VALUES (3, 'Row 3'); -- should fail -ERROR: cannot insert into view "rw_view16" -DETAIL: Views with conditional DO INSTEAD rules are not automatically updatable. -HINT: To enable inserting into the view, provide an INSTEAD OF INSERT trigger or an unconditional ON INSERT DO INSTEAD rule. -UPDATE rw_view16 SET b='ROW 2' WHERE a=2; -- should fail -ERROR: cannot update view "rw_view16" -DETAIL: Views with conditional DO INSTEAD rules are not automatically updatable. -HINT: To enable updating the view, provide an INSTEAD OF UPDATE trigger or an unconditional ON UPDATE DO INSTEAD rule. -DELETE FROM rw_view16 WHERE a=2; -- should fail -ERROR: cannot delete from view "rw_view16" -DETAIL: Views with conditional DO INSTEAD rules are not automatically updatable. -HINT: To enable deleting from the view, provide an INSTEAD OF DELETE trigger or an unconditional ON DELETE DO INSTEAD rule. -DROP TABLE base_tbl CASCADE; -NOTICE: drop cascades to 16 other objects -DETAIL: drop cascades to view ro_view1 -drop cascades to view ro_view17 -drop cascades to view ro_view2 -drop cascades to view ro_view3 -drop cascades to view ro_view4 -drop cascades to view ro_view5 -drop cascades to view ro_view6 -drop cascades to view ro_view7 -drop cascades to view ro_view8 -drop cascades to view ro_view9 -drop cascades to view ro_view11 -drop cascades to view ro_view13 -drop cascades to view rw_view14 -drop cascades to view rw_view15 -drop cascades to view rw_view16 -drop cascades to view ro_view20 -DROP VIEW ro_view10, ro_view12, ro_view18; -DROP SEQUENCE uv_seq CASCADE; -NOTICE: drop cascades to view ro_view19 --- simple updatable view -CREATE TABLE base_tbl (a int PRIMARY KEY, b text DEFAULT 'Unspecified'); -INSERT INTO base_tbl SELECT i, 'Row ' || i FROM generate_series(-2, 2) g(i); -CREATE VIEW rw_view1 AS SELECT * FROM base_tbl WHERE a>0; -SELECT table_name, is_insertable_into - FROM information_schema.tables - WHERE table_name = 'rw_view1'; - table_name | is_insertable_into -------------+-------------------- - rw_view1 | YES -(1 row) - -SELECT table_name, is_updatable, is_insertable_into - FROM information_schema.views - WHERE table_name = 'rw_view1'; - table_name | is_updatable | is_insertable_into -------------+--------------+-------------------- - rw_view1 | YES | YES -(1 row) - -SELECT table_name, column_name, is_updatable - FROM information_schema.columns - WHERE table_name = 'rw_view1' - ORDER BY ordinal_position; - table_name | column_name | is_updatable -------------+-------------+-------------- - rw_view1 | a | YES - rw_view1 | b | YES -(2 rows) - -INSERT INTO rw_view1 VALUES (3, 'Row 3'); -INSERT INTO rw_view1 (a) VALUES (4); -UPDATE rw_view1 SET a=5 WHERE a=4; -DELETE FROM rw_view1 WHERE b='Row 2'; -SELECT * FROM base_tbl; - a | b -----+------------- - -2 | Row -2 - -1 | Row -1 - 0 | Row 0 - 1 | Row 1 - 3 | Row 3 - 5 | Unspecified -(6 rows) - -EXPLAIN (costs off) UPDATE rw_view1 SET a=6 WHERE a=5; - QUERY PLAN --------------------------------------------------- - Update on base_tbl - -> Index Scan using base_tbl_pkey on base_tbl - Index Cond: ((a > 0) AND (a = 5)) -(3 rows) - -EXPLAIN (costs off) DELETE FROM rw_view1 WHERE a=5; - QUERY PLAN --------------------------------------------------- - Delete on base_tbl - -> Index Scan using base_tbl_pkey on base_tbl - Index Cond: ((a > 0) AND (a = 5)) -(3 rows) - -DROP TABLE base_tbl CASCADE; -NOTICE: drop cascades to view rw_view1 --- view on top of view -CREATE TABLE base_tbl (a int PRIMARY KEY, b text DEFAULT 'Unspecified'); -INSERT INTO base_tbl SELECT i, 'Row ' || i FROM generate_series(-2, 2) g(i); -CREATE VIEW rw_view1 AS SELECT b AS bb, a AS aa FROM base_tbl WHERE a>0; -CREATE VIEW rw_view2 AS SELECT aa AS aaa, bb AS bbb FROM rw_view1 WHERE aa<10; -SELECT table_name, is_insertable_into - FROM information_schema.tables - WHERE table_name = 'rw_view2'; - table_name | is_insertable_into -------------+-------------------- - rw_view2 | YES -(1 row) - -SELECT table_name, is_updatable, is_insertable_into - FROM information_schema.views - WHERE table_name = 'rw_view2'; - table_name | is_updatable | is_insertable_into -------------+--------------+-------------------- - rw_view2 | YES | YES -(1 row) - -SELECT table_name, column_name, is_updatable - FROM information_schema.columns - WHERE table_name = 'rw_view2' - ORDER BY ordinal_position; - table_name | column_name | is_updatable -------------+-------------+-------------- - rw_view2 | aaa | YES - rw_view2 | bbb | YES -(2 rows) - -INSERT INTO rw_view2 VALUES (3, 'Row 3'); -INSERT INTO rw_view2 (aaa) VALUES (4); -SELECT * FROM rw_view2; - aaa | bbb ------+------------- - 1 | Row 1 - 2 | Row 2 - 3 | Row 3 - 4 | Unspecified -(4 rows) - -UPDATE rw_view2 SET bbb='Row 4' WHERE aaa=4; -DELETE FROM rw_view2 WHERE aaa=2; -SELECT * FROM rw_view2; - aaa | bbb ------+------- - 1 | Row 1 - 3 | Row 3 - 4 | Row 4 -(3 rows) - -EXPLAIN (costs off) UPDATE rw_view2 SET aaa=5 WHERE aaa=4; - QUERY PLAN --------------------------------------------------------- - Update on base_tbl - -> Index Scan using base_tbl_pkey on base_tbl - Index Cond: ((a < 10) AND (a > 0) AND (a = 4)) -(3 rows) - -EXPLAIN (costs off) DELETE FROM rw_view2 WHERE aaa=4; - QUERY PLAN --------------------------------------------------------- - Delete on base_tbl - -> Index Scan using base_tbl_pkey on base_tbl - Index Cond: ((a < 10) AND (a > 0) AND (a = 4)) -(3 rows) - -DROP TABLE base_tbl CASCADE; -NOTICE: drop cascades to 2 other objects -DETAIL: drop cascades to view rw_view1 -drop cascades to view rw_view2 --- view on top of view with rules -CREATE TABLE base_tbl (a int PRIMARY KEY, b text DEFAULT 'Unspecified'); -INSERT INTO base_tbl SELECT i, 'Row ' || i FROM generate_series(-2, 2) g(i); -CREATE VIEW rw_view1 AS SELECT * FROM base_tbl WHERE a>0 OFFSET 0; -- not updatable without rules/triggers -CREATE VIEW rw_view2 AS SELECT * FROM rw_view1 WHERE a<10; -SELECT table_name, is_insertable_into - FROM information_schema.tables - WHERE table_name LIKE 'rw_view%' - ORDER BY table_name; - table_name | is_insertable_into -------------+-------------------- - rw_view1 | NO - rw_view2 | NO -(2 rows) - -SELECT table_name, is_updatable, is_insertable_into - FROM information_schema.views - WHERE table_name LIKE 'rw_view%' - ORDER BY table_name; - table_name | is_updatable | is_insertable_into -------------+--------------+-------------------- - rw_view1 | NO | NO - rw_view2 | NO | NO -(2 rows) - -SELECT table_name, column_name, is_updatable - FROM information_schema.columns - WHERE table_name LIKE 'rw_view%' - ORDER BY table_name, ordinal_position; - table_name | column_name | is_updatable -------------+-------------+-------------- - rw_view1 | a | NO - rw_view1 | b | NO - rw_view2 | a | NO - rw_view2 | b | NO -(4 rows) - -CREATE RULE rw_view1_ins_rule AS ON INSERT TO rw_view1 - DO INSTEAD INSERT INTO base_tbl VALUES (NEW.a, NEW.b) RETURNING *; -SELECT table_name, is_insertable_into - FROM information_schema.tables - WHERE table_name LIKE 'rw_view%' - ORDER BY table_name; - table_name | is_insertable_into -------------+-------------------- - rw_view1 | YES - rw_view2 | YES -(2 rows) - -SELECT table_name, is_updatable, is_insertable_into - FROM information_schema.views - WHERE table_name LIKE 'rw_view%' - ORDER BY table_name; - table_name | is_updatable | is_insertable_into -------------+--------------+-------------------- - rw_view1 | NO | YES - rw_view2 | NO | YES -(2 rows) - -SELECT table_name, column_name, is_updatable - FROM information_schema.columns - WHERE table_name LIKE 'rw_view%' - ORDER BY table_name, ordinal_position; - table_name | column_name | is_updatable -------------+-------------+-------------- - rw_view1 | a | NO - rw_view1 | b | NO - rw_view2 | a | NO - rw_view2 | b | NO -(4 rows) - -CREATE RULE rw_view1_upd_rule AS ON UPDATE TO rw_view1 - DO INSTEAD UPDATE base_tbl SET b=NEW.b WHERE a=OLD.a RETURNING NEW.*; -SELECT table_name, is_insertable_into - FROM information_schema.tables - WHERE table_name LIKE 'rw_view%' - ORDER BY table_name; - table_name | is_insertable_into -------------+-------------------- - rw_view1 | YES - rw_view2 | YES -(2 rows) - -SELECT table_name, is_updatable, is_insertable_into - FROM information_schema.views - WHERE table_name LIKE 'rw_view%' - ORDER BY table_name; - table_name | is_updatable | is_insertable_into -------------+--------------+-------------------- - rw_view1 | NO | YES - rw_view2 | NO | YES -(2 rows) - -SELECT table_name, column_name, is_updatable - FROM information_schema.columns - WHERE table_name LIKE 'rw_view%' - ORDER BY table_name, ordinal_position; - table_name | column_name | is_updatable -------------+-------------+-------------- - rw_view1 | a | NO - rw_view1 | b | NO - rw_view2 | a | NO - rw_view2 | b | NO -(4 rows) - -CREATE RULE rw_view1_del_rule AS ON DELETE TO rw_view1 - DO INSTEAD DELETE FROM base_tbl WHERE a=OLD.a RETURNING OLD.*; -SELECT table_name, is_insertable_into - FROM information_schema.tables - WHERE table_name LIKE 'rw_view%' - ORDER BY table_name; - table_name | is_insertable_into -------------+-------------------- - rw_view1 | YES - rw_view2 | YES -(2 rows) - -SELECT table_name, is_updatable, is_insertable_into - FROM information_schema.views - WHERE table_name LIKE 'rw_view%' - ORDER BY table_name; - table_name | is_updatable | is_insertable_into -------------+--------------+-------------------- - rw_view1 | YES | YES - rw_view2 | YES | YES -(2 rows) - -SELECT table_name, column_name, is_updatable - FROM information_schema.columns - WHERE table_name LIKE 'rw_view%' - ORDER BY table_name, ordinal_position; - table_name | column_name | is_updatable -------------+-------------+-------------- - rw_view1 | a | YES - rw_view1 | b | YES - rw_view2 | a | YES - rw_view2 | b | YES -(4 rows) - -INSERT INTO rw_view2 VALUES (3, 'Row 3') RETURNING *; - a | b ----+------- - 3 | Row 3 -(1 row) - -UPDATE rw_view2 SET b='Row three' WHERE a=3 RETURNING *; - a | b ----+----------- - 3 | Row three -(1 row) - -SELECT * FROM rw_view2; - a | b ----+----------- - 1 | Row 1 - 2 | Row 2 - 3 | Row three -(3 rows) - -DELETE FROM rw_view2 WHERE a=3 RETURNING *; - a | b ----+----------- - 3 | Row three -(1 row) - -SELECT * FROM rw_view2; - a | b ----+------- - 1 | Row 1 - 2 | Row 2 -(2 rows) - -EXPLAIN (costs off) UPDATE rw_view2 SET a=3 WHERE a=2; - QUERY PLAN ----------------------------------------------------------------- - Update on base_tbl - -> Nested Loop - -> Index Scan using base_tbl_pkey on base_tbl - Index Cond: (a = 2) - -> Subquery Scan on rw_view1 - Filter: ((rw_view1.a < 10) AND (rw_view1.a = 2)) - -> Bitmap Heap Scan on base_tbl base_tbl_1 - Recheck Cond: (a > 0) - -> Bitmap Index Scan on base_tbl_pkey - Index Cond: (a > 0) -(10 rows) - -EXPLAIN (costs off) DELETE FROM rw_view2 WHERE a=2; - QUERY PLAN ----------------------------------------------------------------- - Delete on base_tbl - -> Nested Loop - -> Index Scan using base_tbl_pkey on base_tbl - Index Cond: (a = 2) - -> Subquery Scan on rw_view1 - Filter: ((rw_view1.a < 10) AND (rw_view1.a = 2)) - -> Bitmap Heap Scan on base_tbl base_tbl_1 - Recheck Cond: (a > 0) - -> Bitmap Index Scan on base_tbl_pkey - Index Cond: (a > 0) -(10 rows) - -DROP TABLE base_tbl CASCADE; -NOTICE: drop cascades to 2 other objects -DETAIL: drop cascades to view rw_view1 -drop cascades to view rw_view2 --- view on top of view with triggers -CREATE TABLE base_tbl (a int PRIMARY KEY, b text DEFAULT 'Unspecified'); -INSERT INTO base_tbl SELECT i, 'Row ' || i FROM generate_series(-2, 2) g(i); -CREATE VIEW rw_view1 AS SELECT * FROM base_tbl WHERE a>0 OFFSET 0; -- not updatable without rules/triggers -CREATE VIEW rw_view2 AS SELECT * FROM rw_view1 WHERE a<10; -SELECT table_name, is_insertable_into - FROM information_schema.tables - WHERE table_name LIKE 'rw_view%' - ORDER BY table_name; - table_name | is_insertable_into -------------+-------------------- - rw_view1 | NO - rw_view2 | NO -(2 rows) - -SELECT table_name, is_updatable, is_insertable_into, - is_trigger_updatable, is_trigger_deletable, - is_trigger_insertable_into - FROM information_schema.views - WHERE table_name LIKE 'rw_view%' - ORDER BY table_name; - table_name | is_updatable | is_insertable_into | is_trigger_updatable | is_trigger_deletable | is_trigger_insertable_into -------------+--------------+--------------------+----------------------+----------------------+---------------------------- - rw_view1 | NO | NO | NO | NO | NO - rw_view2 | NO | NO | NO | NO | NO -(2 rows) - -SELECT table_name, column_name, is_updatable - FROM information_schema.columns - WHERE table_name LIKE 'rw_view%' - ORDER BY table_name, ordinal_position; - table_name | column_name | is_updatable -------------+-------------+-------------- - rw_view1 | a | NO - rw_view1 | b | NO - rw_view2 | a | NO - rw_view2 | b | NO -(4 rows) - -CREATE FUNCTION rw_view1_trig_fn() -RETURNS trigger AS -$$ -BEGIN - IF TG_OP = 'INSERT' THEN - INSERT INTO base_tbl VALUES (NEW.a, NEW.b); - RETURN NEW; - ELSIF TG_OP = 'UPDATE' THEN - UPDATE base_tbl SET b=NEW.b WHERE a=OLD.a; - RETURN NEW; - ELSIF TG_OP = 'DELETE' THEN - DELETE FROM base_tbl WHERE a=OLD.a; - RETURN OLD; - END IF; -END; -$$ -LANGUAGE plpgsql; -CREATE TRIGGER rw_view1_ins_trig INSTEAD OF INSERT ON rw_view1 - FOR EACH ROW EXECUTE PROCEDURE rw_view1_trig_fn(); -SELECT table_name, is_insertable_into - FROM information_schema.tables - WHERE table_name LIKE 'rw_view%' - ORDER BY table_name; - table_name | is_insertable_into -------------+-------------------- - rw_view1 | NO - rw_view2 | NO -(2 rows) - -SELECT table_name, is_updatable, is_insertable_into, - is_trigger_updatable, is_trigger_deletable, - is_trigger_insertable_into - FROM information_schema.views - WHERE table_name LIKE 'rw_view%' - ORDER BY table_name; - table_name | is_updatable | is_insertable_into | is_trigger_updatable | is_trigger_deletable | is_trigger_insertable_into -------------+--------------+--------------------+----------------------+----------------------+---------------------------- - rw_view1 | NO | NO | NO | NO | YES - rw_view2 | NO | NO | NO | NO | NO -(2 rows) - -SELECT table_name, column_name, is_updatable - FROM information_schema.columns - WHERE table_name LIKE 'rw_view%' - ORDER BY table_name, ordinal_position; - table_name | column_name | is_updatable -------------+-------------+-------------- - rw_view1 | a | NO - rw_view1 | b | NO - rw_view2 | a | NO - rw_view2 | b | NO -(4 rows) - -CREATE TRIGGER rw_view1_upd_trig INSTEAD OF UPDATE ON rw_view1 - FOR EACH ROW EXECUTE PROCEDURE rw_view1_trig_fn(); -SELECT table_name, is_insertable_into - FROM information_schema.tables - WHERE table_name LIKE 'rw_view%' - ORDER BY table_name; - table_name | is_insertable_into -------------+-------------------- - rw_view1 | NO - rw_view2 | NO -(2 rows) - -SELECT table_name, is_updatable, is_insertable_into, - is_trigger_updatable, is_trigger_deletable, - is_trigger_insertable_into - FROM information_schema.views - WHERE table_name LIKE 'rw_view%' - ORDER BY table_name; - table_name | is_updatable | is_insertable_into | is_trigger_updatable | is_trigger_deletable | is_trigger_insertable_into -------------+--------------+--------------------+----------------------+----------------------+---------------------------- - rw_view1 | NO | NO | YES | NO | YES - rw_view2 | NO | NO | NO | NO | NO -(2 rows) - -SELECT table_name, column_name, is_updatable - FROM information_schema.columns - WHERE table_name LIKE 'rw_view%' - ORDER BY table_name, ordinal_position; - table_name | column_name | is_updatable -------------+-------------+-------------- - rw_view1 | a | NO - rw_view1 | b | NO - rw_view2 | a | NO - rw_view2 | b | NO -(4 rows) - -CREATE TRIGGER rw_view1_del_trig INSTEAD OF DELETE ON rw_view1 - FOR EACH ROW EXECUTE PROCEDURE rw_view1_trig_fn(); -SELECT table_name, is_insertable_into - FROM information_schema.tables - WHERE table_name LIKE 'rw_view%' - ORDER BY table_name; - table_name | is_insertable_into -------------+-------------------- - rw_view1 | NO - rw_view2 | NO -(2 rows) - -SELECT table_name, is_updatable, is_insertable_into, - is_trigger_updatable, is_trigger_deletable, - is_trigger_insertable_into - FROM information_schema.views - WHERE table_name LIKE 'rw_view%' - ORDER BY table_name; - table_name | is_updatable | is_insertable_into | is_trigger_updatable | is_trigger_deletable | is_trigger_insertable_into -------------+--------------+--------------------+----------------------+----------------------+---------------------------- - rw_view1 | NO | NO | YES | YES | YES - rw_view2 | NO | NO | NO | NO | NO -(2 rows) - -SELECT table_name, column_name, is_updatable - FROM information_schema.columns - WHERE table_name LIKE 'rw_view%' - ORDER BY table_name, ordinal_position; - table_name | column_name | is_updatable -------------+-------------+-------------- - rw_view1 | a | NO - rw_view1 | b | NO - rw_view2 | a | NO - rw_view2 | b | NO -(4 rows) - -INSERT INTO rw_view2 VALUES (3, 'Row 3') RETURNING *; - a | b ----+------- - 3 | Row 3 -(1 row) - -UPDATE rw_view2 SET b='Row three' WHERE a=3 RETURNING *; - a | b ----+----------- - 3 | Row three -(1 row) - -SELECT * FROM rw_view2; - a | b ----+----------- - 1 | Row 1 - 2 | Row 2 - 3 | Row three -(3 rows) - -DELETE FROM rw_view2 WHERE a=3 RETURNING *; - a | b ----+----------- - 3 | Row three -(1 row) - -SELECT * FROM rw_view2; - a | b ----+------- - 1 | Row 1 - 2 | Row 2 -(2 rows) - -EXPLAIN (costs off) UPDATE rw_view2 SET a=3 WHERE a=2; - QUERY PLAN ----------------------------------------------------------- - Update on rw_view1 rw_view1_1 - -> Subquery Scan on rw_view1 - Filter: ((rw_view1.a < 10) AND (rw_view1.a = 2)) - -> Bitmap Heap Scan on base_tbl - Recheck Cond: (a > 0) - -> Bitmap Index Scan on base_tbl_pkey - Index Cond: (a > 0) -(7 rows) - -EXPLAIN (costs off) DELETE FROM rw_view2 WHERE a=2; - QUERY PLAN ----------------------------------------------------------- - Delete on rw_view1 rw_view1_1 - -> Subquery Scan on rw_view1 - Filter: ((rw_view1.a < 10) AND (rw_view1.a = 2)) - -> Bitmap Heap Scan on base_tbl - Recheck Cond: (a > 0) - -> Bitmap Index Scan on base_tbl_pkey - Index Cond: (a > 0) -(7 rows) - -DROP TABLE base_tbl CASCADE; -NOTICE: drop cascades to 2 other objects -DETAIL: drop cascades to view rw_view1 -drop cascades to view rw_view2 -DROP FUNCTION rw_view1_trig_fn(); --- update using whole row from view -CREATE TABLE base_tbl (a int PRIMARY KEY, b text DEFAULT 'Unspecified'); -INSERT INTO base_tbl SELECT i, 'Row ' || i FROM generate_series(-2, 2) g(i); -CREATE VIEW rw_view1 AS SELECT b AS bb, a AS aa FROM base_tbl; -CREATE FUNCTION rw_view1_aa(x rw_view1) - RETURNS int AS $$ SELECT x.aa $$ LANGUAGE sql; -UPDATE rw_view1 v SET bb='Updated row 2' WHERE rw_view1_aa(v)=2 - RETURNING rw_view1_aa(v), v.bb; - rw_view1_aa | bb --------------+--------------- - 2 | Updated row 2 -(1 row) - -SELECT * FROM base_tbl; - a | b -----+--------------- - -2 | Row -2 - -1 | Row -1 - 0 | Row 0 - 1 | Row 1 - 2 | Updated row 2 -(5 rows) - -EXPLAIN (costs off) -UPDATE rw_view1 v SET bb='Updated row 2' WHERE rw_view1_aa(v)=2 - RETURNING rw_view1_aa(v), v.bb; - QUERY PLAN --------------------------------------------------- - Update on base_tbl - -> Index Scan using base_tbl_pkey on base_tbl - Index Cond: (a = 2) -(3 rows) - -DROP TABLE base_tbl CASCADE; -NOTICE: drop cascades to 2 other objects -DETAIL: drop cascades to view rw_view1 -drop cascades to function rw_view1_aa(rw_view1) --- permissions checks -CREATE USER regress_view_user1; -CREATE USER regress_view_user2; -SET SESSION AUTHORIZATION regress_view_user1; -CREATE TABLE base_tbl(a int, b text, c float); -INSERT INTO base_tbl VALUES (1, 'Row 1', 1.0); -CREATE VIEW rw_view1 AS SELECT b AS bb, c AS cc, a AS aa FROM base_tbl; -INSERT INTO rw_view1 VALUES ('Row 2', 2.0, 2); -GRANT SELECT ON base_tbl TO regress_view_user2; -GRANT SELECT ON rw_view1 TO regress_view_user2; -GRANT UPDATE (a,c) ON base_tbl TO regress_view_user2; -GRANT UPDATE (bb,cc) ON rw_view1 TO regress_view_user2; -RESET SESSION AUTHORIZATION; -SET SESSION AUTHORIZATION regress_view_user2; -CREATE VIEW rw_view2 AS SELECT b AS bb, c AS cc, a AS aa FROM base_tbl; -SELECT * FROM base_tbl; -- ok - a | b | c ----+-------+--- - 1 | Row 1 | 1 - 2 | Row 2 | 2 -(2 rows) - -SELECT * FROM rw_view1; -- ok - bb | cc | aa --------+----+---- - Row 1 | 1 | 1 - Row 2 | 2 | 2 -(2 rows) - -SELECT * FROM rw_view2; -- ok - bb | cc | aa --------+----+---- - Row 1 | 1 | 1 - Row 2 | 2 | 2 -(2 rows) - -INSERT INTO base_tbl VALUES (3, 'Row 3', 3.0); -- not allowed -ERROR: permission denied for table base_tbl -INSERT INTO rw_view1 VALUES ('Row 3', 3.0, 3); -- not allowed -ERROR: permission denied for view rw_view1 -INSERT INTO rw_view2 VALUES ('Row 3', 3.0, 3); -- not allowed -ERROR: permission denied for table base_tbl -UPDATE base_tbl SET a=a, c=c; -- ok -UPDATE base_tbl SET b=b; -- not allowed -ERROR: permission denied for table base_tbl -UPDATE rw_view1 SET bb=bb, cc=cc; -- ok -UPDATE rw_view1 SET aa=aa; -- not allowed -ERROR: permission denied for view rw_view1 -UPDATE rw_view2 SET aa=aa, cc=cc; -- ok -UPDATE rw_view2 SET bb=bb; -- not allowed -ERROR: permission denied for table base_tbl -DELETE FROM base_tbl; -- not allowed -ERROR: permission denied for table base_tbl -DELETE FROM rw_view1; -- not allowed -ERROR: permission denied for view rw_view1 -DELETE FROM rw_view2; -- not allowed -ERROR: permission denied for table base_tbl -RESET SESSION AUTHORIZATION; -SET SESSION AUTHORIZATION regress_view_user1; -GRANT INSERT, DELETE ON base_tbl TO regress_view_user2; -RESET SESSION AUTHORIZATION; -SET SESSION AUTHORIZATION regress_view_user2; -INSERT INTO base_tbl VALUES (3, 'Row 3', 3.0); -- ok -INSERT INTO rw_view1 VALUES ('Row 4', 4.0, 4); -- not allowed -ERROR: permission denied for view rw_view1 -INSERT INTO rw_view2 VALUES ('Row 4', 4.0, 4); -- ok -DELETE FROM base_tbl WHERE a=1; -- ok -DELETE FROM rw_view1 WHERE aa=2; -- not allowed -ERROR: permission denied for view rw_view1 -DELETE FROM rw_view2 WHERE aa=2; -- ok -SELECT * FROM base_tbl; - a | b | c ----+-------+--- - 3 | Row 3 | 3 - 4 | Row 4 | 4 -(2 rows) - -RESET SESSION AUTHORIZATION; -SET SESSION AUTHORIZATION regress_view_user1; -REVOKE INSERT, DELETE ON base_tbl FROM regress_view_user2; -GRANT INSERT, DELETE ON rw_view1 TO regress_view_user2; -RESET SESSION AUTHORIZATION; -SET SESSION AUTHORIZATION regress_view_user2; -INSERT INTO base_tbl VALUES (5, 'Row 5', 5.0); -- not allowed -ERROR: permission denied for table base_tbl -INSERT INTO rw_view1 VALUES ('Row 5', 5.0, 5); -- ok -INSERT INTO rw_view2 VALUES ('Row 6', 6.0, 6); -- not allowed -ERROR: permission denied for table base_tbl -DELETE FROM base_tbl WHERE a=3; -- not allowed -ERROR: permission denied for table base_tbl -DELETE FROM rw_view1 WHERE aa=3; -- ok -DELETE FROM rw_view2 WHERE aa=4; -- not allowed -ERROR: permission denied for table base_tbl -SELECT * FROM base_tbl; - a | b | c ----+-------+--- - 4 | Row 4 | 4 - 5 | Row 5 | 5 -(2 rows) - -RESET SESSION AUTHORIZATION; -DROP TABLE base_tbl CASCADE; -NOTICE: drop cascades to 2 other objects -DETAIL: drop cascades to view rw_view1 -drop cascades to view rw_view2 --- nested-view permissions -CREATE TABLE base_tbl(a int, b text, c float); -INSERT INTO base_tbl VALUES (1, 'Row 1', 1.0); -SET SESSION AUTHORIZATION regress_view_user1; -CREATE VIEW rw_view1 AS SELECT * FROM base_tbl; -SELECT * FROM rw_view1; -- not allowed -ERROR: permission denied for table base_tbl -SELECT * FROM rw_view1 FOR UPDATE; -- not allowed -ERROR: permission denied for table base_tbl -UPDATE rw_view1 SET b = 'foo' WHERE a = 1; -- not allowed -ERROR: permission denied for table base_tbl -SET SESSION AUTHORIZATION regress_view_user2; -CREATE VIEW rw_view2 AS SELECT * FROM rw_view1; -SELECT * FROM rw_view2; -- not allowed -ERROR: permission denied for view rw_view1 -SELECT * FROM rw_view2 FOR UPDATE; -- not allowed -ERROR: permission denied for view rw_view1 -UPDATE rw_view2 SET b = 'bar' WHERE a = 1; -- not allowed -ERROR: permission denied for view rw_view1 -RESET SESSION AUTHORIZATION; -GRANT SELECT ON base_tbl TO regress_view_user1; -SET SESSION AUTHORIZATION regress_view_user1; -SELECT * FROM rw_view1; - a | b | c ----+-------+--- - 1 | Row 1 | 1 -(1 row) - -SELECT * FROM rw_view1 FOR UPDATE; -- not allowed -ERROR: permission denied for table base_tbl -UPDATE rw_view1 SET b = 'foo' WHERE a = 1; -- not allowed -ERROR: permission denied for table base_tbl -SET SESSION AUTHORIZATION regress_view_user2; -SELECT * FROM rw_view2; -- not allowed -ERROR: permission denied for view rw_view1 -SELECT * FROM rw_view2 FOR UPDATE; -- not allowed -ERROR: permission denied for view rw_view1 -UPDATE rw_view2 SET b = 'bar' WHERE a = 1; -- not allowed -ERROR: permission denied for view rw_view1 -SET SESSION AUTHORIZATION regress_view_user1; -GRANT SELECT ON rw_view1 TO regress_view_user2; -SET SESSION AUTHORIZATION regress_view_user2; -SELECT * FROM rw_view2; - a | b | c ----+-------+--- - 1 | Row 1 | 1 -(1 row) - -SELECT * FROM rw_view2 FOR UPDATE; -- not allowed -ERROR: permission denied for view rw_view1 -UPDATE rw_view2 SET b = 'bar' WHERE a = 1; -- not allowed -ERROR: permission denied for view rw_view1 -RESET SESSION AUTHORIZATION; -GRANT UPDATE ON base_tbl TO regress_view_user1; -SET SESSION AUTHORIZATION regress_view_user1; -SELECT * FROM rw_view1; - a | b | c ----+-------+--- - 1 | Row 1 | 1 -(1 row) - -SELECT * FROM rw_view1 FOR UPDATE; - a | b | c ----+-------+--- - 1 | Row 1 | 1 -(1 row) - -UPDATE rw_view1 SET b = 'foo' WHERE a = 1; -SET SESSION AUTHORIZATION regress_view_user2; -SELECT * FROM rw_view2; - a | b | c ----+-----+--- - 1 | foo | 1 -(1 row) - -SELECT * FROM rw_view2 FOR UPDATE; -- not allowed -ERROR: permission denied for view rw_view1 -UPDATE rw_view2 SET b = 'bar' WHERE a = 1; -- not allowed -ERROR: permission denied for view rw_view1 -SET SESSION AUTHORIZATION regress_view_user1; -GRANT UPDATE ON rw_view1 TO regress_view_user2; -SET SESSION AUTHORIZATION regress_view_user2; -SELECT * FROM rw_view2; - a | b | c ----+-----+--- - 1 | foo | 1 -(1 row) - -SELECT * FROM rw_view2 FOR UPDATE; - a | b | c ----+-----+--- - 1 | foo | 1 -(1 row) - -UPDATE rw_view2 SET b = 'bar' WHERE a = 1; -RESET SESSION AUTHORIZATION; -REVOKE UPDATE ON base_tbl FROM regress_view_user1; -SET SESSION AUTHORIZATION regress_view_user1; -SELECT * FROM rw_view1; - a | b | c ----+-----+--- - 1 | bar | 1 -(1 row) - -SELECT * FROM rw_view1 FOR UPDATE; -- not allowed -ERROR: permission denied for table base_tbl -UPDATE rw_view1 SET b = 'foo' WHERE a = 1; -- not allowed -ERROR: permission denied for table base_tbl -SET SESSION AUTHORIZATION regress_view_user2; -SELECT * FROM rw_view2; - a | b | c ----+-----+--- - 1 | bar | 1 -(1 row) - -SELECT * FROM rw_view2 FOR UPDATE; -- not allowed -ERROR: permission denied for table base_tbl -UPDATE rw_view2 SET b = 'bar' WHERE a = 1; -- not allowed -ERROR: permission denied for table base_tbl -RESET SESSION AUTHORIZATION; -DROP TABLE base_tbl CASCADE; -NOTICE: drop cascades to 2 other objects -DETAIL: drop cascades to view rw_view1 -drop cascades to view rw_view2 -DROP USER regress_view_user1; -DROP USER regress_view_user2; --- column defaults -CREATE TABLE base_tbl (a int PRIMARY KEY, b text DEFAULT 'Unspecified', c serial); -INSERT INTO base_tbl VALUES (1, 'Row 1'); -INSERT INTO base_tbl VALUES (2, 'Row 2'); -INSERT INTO base_tbl VALUES (3); -CREATE VIEW rw_view1 AS SELECT a AS aa, b AS bb FROM base_tbl; -ALTER VIEW rw_view1 ALTER COLUMN bb SET DEFAULT 'View default'; -INSERT INTO rw_view1 VALUES (4, 'Row 4'); -INSERT INTO rw_view1 (aa) VALUES (5); -SELECT * FROM base_tbl; - a | b | c ----+--------------+--- - 1 | Row 1 | 1 - 2 | Row 2 | 2 - 3 | Unspecified | 3 - 4 | Row 4 | 4 - 5 | View default | 5 -(5 rows) - -DROP TABLE base_tbl CASCADE; -NOTICE: drop cascades to view rw_view1 --- Table having triggers -CREATE TABLE base_tbl (a int PRIMARY KEY, b text DEFAULT 'Unspecified'); -INSERT INTO base_tbl VALUES (1, 'Row 1'); -INSERT INTO base_tbl VALUES (2, 'Row 2'); -CREATE FUNCTION rw_view1_trig_fn() -RETURNS trigger AS -$$ -BEGIN - IF TG_OP = 'INSERT' THEN - UPDATE base_tbl SET b=NEW.b WHERE a=1; - RETURN NULL; - END IF; - RETURN NULL; -END; -$$ -LANGUAGE plpgsql; -CREATE TRIGGER rw_view1_ins_trig AFTER INSERT ON base_tbl - FOR EACH ROW EXECUTE PROCEDURE rw_view1_trig_fn(); -CREATE VIEW rw_view1 AS SELECT a AS aa, b AS bb FROM base_tbl; -INSERT INTO rw_view1 VALUES (3, 'Row 3'); -select * from base_tbl; - a | b ----+------- - 2 | Row 2 - 3 | Row 3 - 1 | Row 3 -(3 rows) - -DROP VIEW rw_view1; -DROP TRIGGER rw_view1_ins_trig on base_tbl; -DROP FUNCTION rw_view1_trig_fn(); -DROP TABLE base_tbl; --- view with ORDER BY -CREATE TABLE base_tbl (a int, b int); -INSERT INTO base_tbl VALUES (1,2), (4,5), (3,-3); -CREATE VIEW rw_view1 AS SELECT * FROM base_tbl ORDER BY a+b; -SELECT * FROM rw_view1; - a | b ----+---- - 3 | -3 - 1 | 2 - 4 | 5 -(3 rows) - -INSERT INTO rw_view1 VALUES (7,-8); -SELECT * FROM rw_view1; - a | b ----+---- - 7 | -8 - 3 | -3 - 1 | 2 - 4 | 5 -(4 rows) - -EXPLAIN (verbose, costs off) UPDATE rw_view1 SET b = b + 1 RETURNING *; - QUERY PLAN -------------------------------------------------- - Update on public.base_tbl - Output: base_tbl.a, base_tbl.b - -> Seq Scan on public.base_tbl - Output: (base_tbl.b + 1), base_tbl.ctid -(4 rows) - -UPDATE rw_view1 SET b = b + 1 RETURNING *; - a | b ----+---- - 1 | 3 - 4 | 6 - 3 | -2 - 7 | -7 -(4 rows) - -SELECT * FROM rw_view1; - a | b ----+---- - 7 | -7 - 3 | -2 - 1 | 3 - 4 | 6 -(4 rows) - -DROP TABLE base_tbl CASCADE; -NOTICE: drop cascades to view rw_view1 --- multiple array-column updates -CREATE TABLE base_tbl (a int, arr int[]); -INSERT INTO base_tbl VALUES (1,ARRAY[2]), (3,ARRAY[4]); -CREATE VIEW rw_view1 AS SELECT * FROM base_tbl; -UPDATE rw_view1 SET arr[1] = 42, arr[2] = 77 WHERE a = 3; -SELECT * FROM rw_view1; - a | arr ----+--------- - 1 | {2} - 3 | {42,77} -(2 rows) - -DROP TABLE base_tbl CASCADE; -NOTICE: drop cascades to view rw_view1 --- views with updatable and non-updatable columns -CREATE TABLE base_tbl(a float); -INSERT INTO base_tbl SELECT i/10.0 FROM generate_series(1,10) g(i); -CREATE VIEW rw_view1 AS - SELECT ctid, sin(a) s, a, cos(a) c - FROM base_tbl - WHERE a != 0 - ORDER BY abs(a); -INSERT INTO rw_view1 VALUES (null, null, 1.1, null); -- should fail -ERROR: cannot insert into column "ctid" of view "rw_view1" -DETAIL: View columns that refer to system columns are not updatable. -INSERT INTO rw_view1 (s, c, a) VALUES (null, null, 1.1); -- should fail -ERROR: cannot insert into column "s" of view "rw_view1" -DETAIL: View columns that are not columns of their base relation are not updatable. -INSERT INTO rw_view1 (a) VALUES (1.1) RETURNING a, s, c; -- OK - a | s | c ------+-------------------+------------------- - 1.1 | 0.891207360061435 | 0.453596121425577 -(1 row) - -UPDATE rw_view1 SET s = s WHERE a = 1.1; -- should fail -ERROR: cannot update column "s" of view "rw_view1" -DETAIL: View columns that are not columns of their base relation are not updatable. -UPDATE rw_view1 SET a = 1.05 WHERE a = 1.1 RETURNING s; -- OK - s -------------------- - 0.867423225594017 -(1 row) - -DELETE FROM rw_view1 WHERE a = 1.05; -- OK -CREATE VIEW rw_view2 AS - SELECT s, c, s/c t, a base_a, ctid - FROM rw_view1; -INSERT INTO rw_view2 VALUES (null, null, null, 1.1, null); -- should fail -ERROR: cannot insert into column "t" of view "rw_view2" -DETAIL: View columns that are not columns of their base relation are not updatable. -INSERT INTO rw_view2(s, c, base_a) VALUES (null, null, 1.1); -- should fail -ERROR: cannot insert into column "s" of view "rw_view1" -DETAIL: View columns that are not columns of their base relation are not updatable. -INSERT INTO rw_view2(base_a) VALUES (1.1) RETURNING t; -- OK - t ------------------- - 1.96475965724865 -(1 row) - -UPDATE rw_view2 SET s = s WHERE base_a = 1.1; -- should fail -ERROR: cannot update column "s" of view "rw_view1" -DETAIL: View columns that are not columns of their base relation are not updatable. -UPDATE rw_view2 SET t = t WHERE base_a = 1.1; -- should fail -ERROR: cannot update column "t" of view "rw_view2" -DETAIL: View columns that are not columns of their base relation are not updatable. -UPDATE rw_view2 SET base_a = 1.05 WHERE base_a = 1.1; -- OK -DELETE FROM rw_view2 WHERE base_a = 1.05 RETURNING base_a, s, c, t; -- OK - base_a | s | c | t ---------+-------------------+-------------------+------------------ - 1.05 | 0.867423225594017 | 0.497571047891727 | 1.74331530998317 -(1 row) - -CREATE VIEW rw_view3 AS - SELECT s, c, s/c t, ctid - FROM rw_view1; -INSERT INTO rw_view3 VALUES (null, null, null, null); -- should fail -ERROR: cannot insert into column "t" of view "rw_view3" -DETAIL: View columns that are not columns of their base relation are not updatable. -INSERT INTO rw_view3(s) VALUES (null); -- should fail -ERROR: cannot insert into column "s" of view "rw_view1" -DETAIL: View columns that are not columns of their base relation are not updatable. -UPDATE rw_view3 SET s = s; -- should fail -ERROR: cannot update column "s" of view "rw_view1" -DETAIL: View columns that are not columns of their base relation are not updatable. -DELETE FROM rw_view3 WHERE s = sin(0.1); -- should be OK -SELECT * FROM base_tbl ORDER BY a; - a ------ - 0.2 - 0.3 - 0.4 - 0.5 - 0.6 - 0.7 - 0.8 - 0.9 - 1 -(9 rows) - -SELECT table_name, is_insertable_into - FROM information_schema.tables - WHERE table_name LIKE E'r_\\_view%' - ORDER BY table_name; - table_name | is_insertable_into -------------+-------------------- - rw_view1 | YES - rw_view2 | YES - rw_view3 | NO -(3 rows) - -SELECT table_name, is_updatable, is_insertable_into - FROM information_schema.views - WHERE table_name LIKE E'r_\\_view%' - ORDER BY table_name; - table_name | is_updatable | is_insertable_into -------------+--------------+-------------------- - rw_view1 | YES | YES - rw_view2 | YES | YES - rw_view3 | NO | NO -(3 rows) - -SELECT table_name, column_name, is_updatable - FROM information_schema.columns - WHERE table_name LIKE E'r_\\_view%' - ORDER BY table_name, ordinal_position; - table_name | column_name | is_updatable -------------+-------------+-------------- - rw_view1 | ctid | NO - rw_view1 | s | NO - rw_view1 | a | YES - rw_view1 | c | NO - rw_view2 | s | NO - rw_view2 | c | NO - rw_view2 | t | NO - rw_view2 | base_a | YES - rw_view2 | ctid | NO - rw_view3 | s | NO - rw_view3 | c | NO - rw_view3 | t | NO - rw_view3 | ctid | NO -(13 rows) - -SELECT events & 4 != 0 AS upd, - events & 8 != 0 AS ins, - events & 16 != 0 AS del - FROM pg_catalog.pg_relation_is_updatable('rw_view3'::regclass, false) t(events); - upd | ins | del ------+-----+----- - f | f | t -(1 row) - -DROP TABLE base_tbl CASCADE; -NOTICE: drop cascades to 3 other objects -DETAIL: drop cascades to view rw_view1 -drop cascades to view rw_view2 -drop cascades to view rw_view3 --- view on table with GENERATED columns -CREATE TABLE base_tbl (id int, idplus1 int GENERATED ALWAYS AS (id + 1) STORED); -CREATE VIEW rw_view1 AS SELECT * FROM base_tbl; -INSERT INTO base_tbl (id) VALUES (1); -INSERT INTO rw_view1 (id) VALUES (2); -INSERT INTO base_tbl (id, idplus1) VALUES (3, DEFAULT); -INSERT INTO rw_view1 (id, idplus1) VALUES (4, DEFAULT); -INSERT INTO base_tbl (id, idplus1) VALUES (5, 6); -- error -ERROR: cannot insert a non-DEFAULT value into column "idplus1" -DETAIL: Column "idplus1" is a generated column. -INSERT INTO rw_view1 (id, idplus1) VALUES (6, 7); -- error -ERROR: cannot insert a non-DEFAULT value into column "idplus1" -DETAIL: Column "idplus1" is a generated column. -SELECT * FROM base_tbl; - id | idplus1 -----+--------- - 1 | 2 - 2 | 3 - 3 | 4 - 4 | 5 -(4 rows) - -UPDATE base_tbl SET id = 2000 WHERE id = 2; -UPDATE rw_view1 SET id = 3000 WHERE id = 3; -SELECT * FROM base_tbl; - id | idplus1 -------+--------- - 1 | 2 - 4 | 5 - 2000 | 2001 - 3000 | 3001 -(4 rows) - -DROP TABLE base_tbl CASCADE; -NOTICE: drop cascades to view rw_view1 --- inheritance tests -CREATE TABLE base_tbl_parent (a int); -CREATE TABLE base_tbl_child (CHECK (a > 0)) INHERITS (base_tbl_parent); -INSERT INTO base_tbl_parent SELECT * FROM generate_series(-8, -1); -INSERT INTO base_tbl_child SELECT * FROM generate_series(1, 8); -CREATE VIEW rw_view1 AS SELECT * FROM base_tbl_parent; -CREATE VIEW rw_view2 AS SELECT * FROM ONLY base_tbl_parent; -SELECT * FROM rw_view1 ORDER BY a; - a ----- - -8 - -7 - -6 - -5 - -4 - -3 - -2 - -1 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 -(16 rows) - -SELECT * FROM ONLY rw_view1 ORDER BY a; - a ----- - -8 - -7 - -6 - -5 - -4 - -3 - -2 - -1 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 -(16 rows) - -SELECT * FROM rw_view2 ORDER BY a; - a ----- - -8 - -7 - -6 - -5 - -4 - -3 - -2 - -1 -(8 rows) - -INSERT INTO rw_view1 VALUES (-100), (100); -INSERT INTO rw_view2 VALUES (-200), (200); -UPDATE rw_view1 SET a = a*10 WHERE a IN (-1, 1); -- Should produce -10 and 10 -UPDATE ONLY rw_view1 SET a = a*10 WHERE a IN (-2, 2); -- Should produce -20 and 20 -UPDATE rw_view2 SET a = a*10 WHERE a IN (-3, 3); -- Should produce -30 only -UPDATE ONLY rw_view2 SET a = a*10 WHERE a IN (-4, 4); -- Should produce -40 only -DELETE FROM rw_view1 WHERE a IN (-5, 5); -- Should delete -5 and 5 -DELETE FROM ONLY rw_view1 WHERE a IN (-6, 6); -- Should delete -6 and 6 -DELETE FROM rw_view2 WHERE a IN (-7, 7); -- Should delete -7 only -DELETE FROM ONLY rw_view2 WHERE a IN (-8, 8); -- Should delete -8 only -SELECT * FROM ONLY base_tbl_parent ORDER BY a; - a ------- - -200 - -100 - -40 - -30 - -20 - -10 - 100 - 200 -(8 rows) - -SELECT * FROM base_tbl_child ORDER BY a; - a ----- - 3 - 4 - 7 - 8 - 10 - 20 -(6 rows) - -CREATE TABLE other_tbl_parent (id int); -CREATE TABLE other_tbl_child () INHERITS (other_tbl_parent); -INSERT INTO other_tbl_parent VALUES (7),(200); -INSERT INTO other_tbl_child VALUES (8),(100); -EXPLAIN (costs off) -UPDATE rw_view1 SET a = a + 1000 FROM other_tbl_parent WHERE a = id; - QUERY PLAN -------------------------------------------------------------------------- - Update on base_tbl_parent - Update on base_tbl_parent base_tbl_parent_1 - Update on base_tbl_child base_tbl_parent_2 - -> Merge Join - Merge Cond: (base_tbl_parent.a = other_tbl_parent.id) - -> Sort - Sort Key: base_tbl_parent.a - -> Append - -> Seq Scan on base_tbl_parent base_tbl_parent_1 - -> Seq Scan on base_tbl_child base_tbl_parent_2 - -> Sort - Sort Key: other_tbl_parent.id - -> Append - -> Seq Scan on other_tbl_parent other_tbl_parent_1 - -> Seq Scan on other_tbl_child other_tbl_parent_2 -(15 rows) - -UPDATE rw_view1 SET a = a + 1000 FROM other_tbl_parent WHERE a = id; -SELECT * FROM ONLY base_tbl_parent ORDER BY a; - a ------- - -200 - -100 - -40 - -30 - -20 - -10 - 1100 - 1200 -(8 rows) - -SELECT * FROM base_tbl_child ORDER BY a; - a ------- - 3 - 4 - 10 - 20 - 1007 - 1008 -(6 rows) - -DROP TABLE base_tbl_parent, base_tbl_child CASCADE; -NOTICE: drop cascades to 2 other objects -DETAIL: drop cascades to view rw_view1 -drop cascades to view rw_view2 -DROP TABLE other_tbl_parent CASCADE; -NOTICE: drop cascades to table other_tbl_child --- simple WITH CHECK OPTION -CREATE TABLE base_tbl (a int, b int DEFAULT 10); -INSERT INTO base_tbl VALUES (1,2), (2,3), (1,-1); -CREATE VIEW rw_view1 AS SELECT * FROM base_tbl WHERE a < b - WITH LOCAL CHECK OPTION; -\d+ rw_view1 - View "public.rw_view1" - Column | Type | Collation | Nullable | Default | Storage | Description ---------+---------+-----------+----------+---------+---------+------------- - a | integer | | | | plain | - b | integer | | | | plain | -View definition: - SELECT base_tbl.a, - base_tbl.b - FROM base_tbl - WHERE base_tbl.a < base_tbl.b; -Options: check_option=local - -SELECT * FROM information_schema.views WHERE table_name = 'rw_view1'; - table_catalog | table_schema | table_name | view_definition | check_option | is_updatable | is_insertable_into | is_trigger_updatable | is_trigger_deletable | is_trigger_insertable_into ----------------+--------------+------------+------------------------------------+--------------+--------------+--------------------+----------------------+----------------------+---------------------------- - regression | public | rw_view1 | SELECT base_tbl.a, +| LOCAL | YES | YES | NO | NO | NO - | | | base_tbl.b +| | | | | | - | | | FROM base_tbl +| | | | | | - | | | WHERE (base_tbl.a < base_tbl.b); | | | | | | -(1 row) - -INSERT INTO rw_view1 VALUES(3,4); -- ok -INSERT INTO rw_view1 VALUES(4,3); -- should fail -ERROR: new row violates check option for view "rw_view1" -DETAIL: Failing row contains (4, 3). -INSERT INTO rw_view1 VALUES(5,null); -- should fail -ERROR: new row violates check option for view "rw_view1" -DETAIL: Failing row contains (5, null). -UPDATE rw_view1 SET b = 5 WHERE a = 3; -- ok -UPDATE rw_view1 SET b = -5 WHERE a = 3; -- should fail -ERROR: new row violates check option for view "rw_view1" -DETAIL: Failing row contains (3, -5). -INSERT INTO rw_view1(a) VALUES (9); -- ok -INSERT INTO rw_view1(a) VALUES (10); -- should fail -ERROR: new row violates check option for view "rw_view1" -DETAIL: Failing row contains (10, 10). -SELECT * FROM base_tbl; - a | b ----+---- - 1 | 2 - 2 | 3 - 1 | -1 - 3 | 5 - 9 | 10 -(5 rows) - -DROP TABLE base_tbl CASCADE; -NOTICE: drop cascades to view rw_view1 --- WITH LOCAL/CASCADED CHECK OPTION -CREATE TABLE base_tbl (a int); -CREATE VIEW rw_view1 AS SELECT * FROM base_tbl WHERE a > 0; -CREATE VIEW rw_view2 AS SELECT * FROM rw_view1 WHERE a < 10 - WITH CHECK OPTION; -- implicitly cascaded -\d+ rw_view2 - View "public.rw_view2" - Column | Type | Collation | Nullable | Default | Storage | Description ---------+---------+-----------+----------+---------+---------+------------- - a | integer | | | | plain | -View definition: - SELECT rw_view1.a - FROM rw_view1 - WHERE rw_view1.a < 10; -Options: check_option=cascaded - -SELECT * FROM information_schema.views WHERE table_name = 'rw_view2'; - table_catalog | table_schema | table_name | view_definition | check_option | is_updatable | is_insertable_into | is_trigger_updatable | is_trigger_deletable | is_trigger_insertable_into ----------------+--------------+------------+----------------------------+--------------+--------------+--------------------+----------------------+----------------------+---------------------------- - regression | public | rw_view2 | SELECT rw_view1.a +| CASCADED | YES | YES | NO | NO | NO - | | | FROM rw_view1 +| | | | | | - | | | WHERE (rw_view1.a < 10); | | | | | | -(1 row) - -INSERT INTO rw_view2 VALUES (-5); -- should fail -ERROR: new row violates check option for view "rw_view1" -DETAIL: Failing row contains (-5). -INSERT INTO rw_view2 VALUES (5); -- ok -INSERT INTO rw_view2 VALUES (15); -- should fail -ERROR: new row violates check option for view "rw_view2" -DETAIL: Failing row contains (15). -SELECT * FROM base_tbl; - a ---- - 5 -(1 row) - -UPDATE rw_view2 SET a = a - 10; -- should fail -ERROR: new row violates check option for view "rw_view1" -DETAIL: Failing row contains (-5). -UPDATE rw_view2 SET a = a + 10; -- should fail -ERROR: new row violates check option for view "rw_view2" -DETAIL: Failing row contains (15). -CREATE OR REPLACE VIEW rw_view2 AS SELECT * FROM rw_view1 WHERE a < 10 - WITH LOCAL CHECK OPTION; -\d+ rw_view2 - View "public.rw_view2" - Column | Type | Collation | Nullable | Default | Storage | Description ---------+---------+-----------+----------+---------+---------+------------- - a | integer | | | | plain | -View definition: - SELECT rw_view1.a - FROM rw_view1 - WHERE rw_view1.a < 10; -Options: check_option=local - -SELECT * FROM information_schema.views WHERE table_name = 'rw_view2'; - table_catalog | table_schema | table_name | view_definition | check_option | is_updatable | is_insertable_into | is_trigger_updatable | is_trigger_deletable | is_trigger_insertable_into ----------------+--------------+------------+----------------------------+--------------+--------------+--------------------+----------------------+----------------------+---------------------------- - regression | public | rw_view2 | SELECT rw_view1.a +| LOCAL | YES | YES | NO | NO | NO - | | | FROM rw_view1 +| | | | | | - | | | WHERE (rw_view1.a < 10); | | | | | | -(1 row) - -INSERT INTO rw_view2 VALUES (-10); -- ok, but not in view -INSERT INTO rw_view2 VALUES (20); -- should fail -ERROR: new row violates check option for view "rw_view2" -DETAIL: Failing row contains (20). -SELECT * FROM base_tbl; - a ------ - 5 - -10 -(2 rows) - -ALTER VIEW rw_view1 SET (check_option=here); -- invalid -ERROR: invalid value for enum option "check_option": here -DETAIL: Valid values are "local" and "cascaded". -ALTER VIEW rw_view1 SET (check_option=local); -INSERT INTO rw_view2 VALUES (-20); -- should fail -ERROR: new row violates check option for view "rw_view1" -DETAIL: Failing row contains (-20). -INSERT INTO rw_view2 VALUES (30); -- should fail -ERROR: new row violates check option for view "rw_view2" -DETAIL: Failing row contains (30). -ALTER VIEW rw_view2 RESET (check_option); -\d+ rw_view2 - View "public.rw_view2" - Column | Type | Collation | Nullable | Default | Storage | Description ---------+---------+-----------+----------+---------+---------+------------- - a | integer | | | | plain | -View definition: - SELECT rw_view1.a - FROM rw_view1 - WHERE rw_view1.a < 10; - -SELECT * FROM information_schema.views WHERE table_name = 'rw_view2'; - table_catalog | table_schema | table_name | view_definition | check_option | is_updatable | is_insertable_into | is_trigger_updatable | is_trigger_deletable | is_trigger_insertable_into ----------------+--------------+------------+----------------------------+--------------+--------------+--------------------+----------------------+----------------------+---------------------------- - regression | public | rw_view2 | SELECT rw_view1.a +| NONE | YES | YES | NO | NO | NO - | | | FROM rw_view1 +| | | | | | - | | | WHERE (rw_view1.a < 10); | | | | | | -(1 row) - -INSERT INTO rw_view2 VALUES (30); -- ok, but not in view -SELECT * FROM base_tbl; - a ------ - 5 - -10 - 30 -(3 rows) - -DROP TABLE base_tbl CASCADE; -NOTICE: drop cascades to 2 other objects -DETAIL: drop cascades to view rw_view1 -drop cascades to view rw_view2 --- WITH CHECK OPTION with no local view qual -CREATE TABLE base_tbl (a int); -CREATE VIEW rw_view1 AS SELECT * FROM base_tbl WITH CHECK OPTION; -CREATE VIEW rw_view2 AS SELECT * FROM rw_view1 WHERE a > 0; -CREATE VIEW rw_view3 AS SELECT * FROM rw_view2 WITH CHECK OPTION; -SELECT * FROM information_schema.views WHERE table_name LIKE E'rw\\_view_' ORDER BY table_name; - table_catalog | table_schema | table_name | view_definition | check_option | is_updatable | is_insertable_into | is_trigger_updatable | is_trigger_deletable | is_trigger_insertable_into ----------------+--------------+------------+---------------------------+--------------+--------------+--------------------+----------------------+----------------------+---------------------------- - regression | public | rw_view1 | SELECT base_tbl.a +| CASCADED | YES | YES | NO | NO | NO - | | | FROM base_tbl; | | | | | | - regression | public | rw_view2 | SELECT rw_view1.a +| NONE | YES | YES | NO | NO | NO - | | | FROM rw_view1 +| | | | | | - | | | WHERE (rw_view1.a > 0); | | | | | | - regression | public | rw_view3 | SELECT rw_view2.a +| CASCADED | YES | YES | NO | NO | NO - | | | FROM rw_view2; | | | | | | -(3 rows) - -INSERT INTO rw_view1 VALUES (-1); -- ok -INSERT INTO rw_view1 VALUES (1); -- ok -INSERT INTO rw_view2 VALUES (-2); -- ok, but not in view -INSERT INTO rw_view2 VALUES (2); -- ok -INSERT INTO rw_view3 VALUES (-3); -- should fail -ERROR: new row violates check option for view "rw_view2" -DETAIL: Failing row contains (-3). -INSERT INTO rw_view3 VALUES (3); -- ok -DROP TABLE base_tbl CASCADE; -NOTICE: drop cascades to 3 other objects -DETAIL: drop cascades to view rw_view1 -drop cascades to view rw_view2 -drop cascades to view rw_view3 --- WITH CHECK OPTION with scalar array ops -CREATE TABLE base_tbl (a int, b int[]); -CREATE VIEW rw_view1 AS SELECT * FROM base_tbl WHERE a = ANY (b) - WITH CHECK OPTION; -INSERT INTO rw_view1 VALUES (1, ARRAY[1,2,3]); -- ok -INSERT INTO rw_view1 VALUES (10, ARRAY[4,5]); -- should fail -ERROR: new row violates check option for view "rw_view1" -DETAIL: Failing row contains (10, {4,5}). -UPDATE rw_view1 SET b[2] = -b[2] WHERE a = 1; -- ok -UPDATE rw_view1 SET b[1] = -b[1] WHERE a = 1; -- should fail -ERROR: new row violates check option for view "rw_view1" -DETAIL: Failing row contains (1, {-1,-2,3}). -PREPARE ins(int, int[]) AS INSERT INTO rw_view1 VALUES($1, $2); -EXECUTE ins(2, ARRAY[1,2,3]); -- ok -EXECUTE ins(10, ARRAY[4,5]); -- should fail -ERROR: new row violates check option for view "rw_view1" -DETAIL: Failing row contains (10, {4,5}). -DEALLOCATE PREPARE ins; -DROP TABLE base_tbl CASCADE; -NOTICE: drop cascades to view rw_view1 --- WITH CHECK OPTION with subquery -CREATE TABLE base_tbl (a int); -CREATE TABLE ref_tbl (a int PRIMARY KEY); -INSERT INTO ref_tbl SELECT * FROM generate_series(1,10); -CREATE VIEW rw_view1 AS - SELECT * FROM base_tbl b - WHERE EXISTS(SELECT 1 FROM ref_tbl r WHERE r.a = b.a) - WITH CHECK OPTION; -INSERT INTO rw_view1 VALUES (5); -- ok -INSERT INTO rw_view1 VALUES (15); -- should fail -ERROR: new row violates check option for view "rw_view1" -DETAIL: Failing row contains (15). -UPDATE rw_view1 SET a = a + 5; -- ok -UPDATE rw_view1 SET a = a + 5; -- should fail -ERROR: new row violates check option for view "rw_view1" -DETAIL: Failing row contains (15). -EXPLAIN (costs off) INSERT INTO rw_view1 VALUES (5); - QUERY PLAN ---------------------------------------------------------- - Insert on base_tbl b - -> Result - SubPlan 1 - -> Index Only Scan using ref_tbl_pkey on ref_tbl r - Index Cond: (a = b.a) -(5 rows) - -EXPLAIN (costs off) UPDATE rw_view1 SET a = a + 5; - QUERY PLAN ------------------------------------------------------------ - Update on base_tbl b - -> Hash Join - Hash Cond: (b.a = r.a) - -> Seq Scan on base_tbl b - -> Hash - -> Seq Scan on ref_tbl r - SubPlan 1 - -> Index Only Scan using ref_tbl_pkey on ref_tbl r_1 - Index Cond: (a = b.a) -(9 rows) - -DROP TABLE base_tbl, ref_tbl CASCADE; -NOTICE: drop cascades to view rw_view1 --- WITH CHECK OPTION with BEFORE trigger on base table -CREATE TABLE base_tbl (a int, b int); -CREATE FUNCTION base_tbl_trig_fn() -RETURNS trigger AS -$$ -BEGIN - NEW.b := 10; - RETURN NEW; -END; -$$ -LANGUAGE plpgsql; -CREATE TRIGGER base_tbl_trig BEFORE INSERT OR UPDATE ON base_tbl - FOR EACH ROW EXECUTE PROCEDURE base_tbl_trig_fn(); -CREATE VIEW rw_view1 AS SELECT * FROM base_tbl WHERE a < b WITH CHECK OPTION; -INSERT INTO rw_view1 VALUES (5,0); -- ok -INSERT INTO rw_view1 VALUES (15, 20); -- should fail -ERROR: new row violates check option for view "rw_view1" -DETAIL: Failing row contains (15, 10). -UPDATE rw_view1 SET a = 20, b = 30; -- should fail -ERROR: new row violates check option for view "rw_view1" -DETAIL: Failing row contains (20, 10). -DROP TABLE base_tbl CASCADE; -NOTICE: drop cascades to view rw_view1 -DROP FUNCTION base_tbl_trig_fn(); --- WITH LOCAL CHECK OPTION with INSTEAD OF trigger on base view -CREATE TABLE base_tbl (a int, b int); -CREATE VIEW rw_view1 AS SELECT a FROM base_tbl WHERE a < b; -CREATE FUNCTION rw_view1_trig_fn() -RETURNS trigger AS -$$ -BEGIN - IF TG_OP = 'INSERT' THEN - INSERT INTO base_tbl VALUES (NEW.a, 10); - RETURN NEW; - ELSIF TG_OP = 'UPDATE' THEN - UPDATE base_tbl SET a=NEW.a WHERE a=OLD.a; - RETURN NEW; - ELSIF TG_OP = 'DELETE' THEN - DELETE FROM base_tbl WHERE a=OLD.a; - RETURN OLD; - END IF; -END; -$$ -LANGUAGE plpgsql; -CREATE TRIGGER rw_view1_trig - INSTEAD OF INSERT OR UPDATE OR DELETE ON rw_view1 - FOR EACH ROW EXECUTE PROCEDURE rw_view1_trig_fn(); -CREATE VIEW rw_view2 AS - SELECT * FROM rw_view1 WHERE a > 0 WITH LOCAL CHECK OPTION; -INSERT INTO rw_view2 VALUES (-5); -- should fail -ERROR: new row violates check option for view "rw_view2" -DETAIL: Failing row contains (-5). -INSERT INTO rw_view2 VALUES (5); -- ok -INSERT INTO rw_view2 VALUES (50); -- ok, but not in view -UPDATE rw_view2 SET a = a - 10; -- should fail -ERROR: new row violates check option for view "rw_view2" -DETAIL: Failing row contains (-5). -SELECT * FROM base_tbl; - a | b -----+---- - 5 | 10 - 50 | 10 -(2 rows) - --- Check option won't cascade down to base view with INSTEAD OF triggers -ALTER VIEW rw_view2 SET (check_option=cascaded); -INSERT INTO rw_view2 VALUES (100); -- ok, but not in view (doesn't fail rw_view1's check) -UPDATE rw_view2 SET a = 200 WHERE a = 5; -- ok, but not in view (doesn't fail rw_view1's check) -SELECT * FROM base_tbl; - a | b ------+---- - 50 | 10 - 100 | 10 - 200 | 10 -(3 rows) - --- Neither local nor cascaded check options work with INSTEAD rules -DROP TRIGGER rw_view1_trig ON rw_view1; -CREATE RULE rw_view1_ins_rule AS ON INSERT TO rw_view1 - DO INSTEAD INSERT INTO base_tbl VALUES (NEW.a, 10); -CREATE RULE rw_view1_upd_rule AS ON UPDATE TO rw_view1 - DO INSTEAD UPDATE base_tbl SET a=NEW.a WHERE a=OLD.a; -INSERT INTO rw_view2 VALUES (-10); -- ok, but not in view (doesn't fail rw_view2's check) -INSERT INTO rw_view2 VALUES (5); -- ok -INSERT INTO rw_view2 VALUES (20); -- ok, but not in view (doesn't fail rw_view1's check) -UPDATE rw_view2 SET a = 30 WHERE a = 5; -- ok, but not in view (doesn't fail rw_view1's check) -INSERT INTO rw_view2 VALUES (5); -- ok -UPDATE rw_view2 SET a = -5 WHERE a = 5; -- ok, but not in view (doesn't fail rw_view2's check) -SELECT * FROM base_tbl; - a | b ------+---- - 50 | 10 - 100 | 10 - 200 | 10 - -10 | 10 - 20 | 10 - 30 | 10 - -5 | 10 -(7 rows) - -DROP TABLE base_tbl CASCADE; -NOTICE: drop cascades to 2 other objects -DETAIL: drop cascades to view rw_view1 -drop cascades to view rw_view2 -DROP FUNCTION rw_view1_trig_fn(); -CREATE TABLE base_tbl (a int); -CREATE VIEW rw_view1 AS SELECT a,10 AS b FROM base_tbl; -CREATE RULE rw_view1_ins_rule AS ON INSERT TO rw_view1 - DO INSTEAD INSERT INTO base_tbl VALUES (NEW.a); -CREATE VIEW rw_view2 AS - SELECT * FROM rw_view1 WHERE a > b WITH LOCAL CHECK OPTION; -INSERT INTO rw_view2 VALUES (2,3); -- ok, but not in view (doesn't fail rw_view2's check) -DROP TABLE base_tbl CASCADE; -NOTICE: drop cascades to 2 other objects -DETAIL: drop cascades to view rw_view1 -drop cascades to view rw_view2 --- security barrier view -CREATE TABLE base_tbl (person text, visibility text); -INSERT INTO base_tbl VALUES ('Tom', 'public'), - ('Dick', 'private'), - ('Harry', 'public'); -CREATE VIEW rw_view1 AS - SELECT person FROM base_tbl WHERE visibility = 'public'; -CREATE FUNCTION snoop(anyelement) -RETURNS boolean AS -$$ -BEGIN - RAISE NOTICE 'snooped value: %', $1; - RETURN true; -END; -$$ -LANGUAGE plpgsql COST 0.000001; -CREATE OR REPLACE FUNCTION leakproof(anyelement) -RETURNS boolean AS -$$ -BEGIN - RETURN true; -END; -$$ -LANGUAGE plpgsql STRICT IMMUTABLE LEAKPROOF; -SELECT * FROM rw_view1 WHERE snoop(person); -NOTICE: snooped value: Tom -NOTICE: snooped value: Dick -NOTICE: snooped value: Harry - person --------- - Tom - Harry -(2 rows) - -UPDATE rw_view1 SET person=person WHERE snoop(person); -NOTICE: snooped value: Tom -NOTICE: snooped value: Dick -NOTICE: snooped value: Harry -DELETE FROM rw_view1 WHERE NOT snoop(person); -NOTICE: snooped value: Dick -NOTICE: snooped value: Tom -NOTICE: snooped value: Harry -ALTER VIEW rw_view1 SET (security_barrier = true); -SELECT table_name, is_insertable_into - FROM information_schema.tables - WHERE table_name = 'rw_view1'; - table_name | is_insertable_into -------------+-------------------- - rw_view1 | YES -(1 row) - -SELECT table_name, is_updatable, is_insertable_into - FROM information_schema.views - WHERE table_name = 'rw_view1'; - table_name | is_updatable | is_insertable_into -------------+--------------+-------------------- - rw_view1 | YES | YES -(1 row) - -SELECT table_name, column_name, is_updatable - FROM information_schema.columns - WHERE table_name = 'rw_view1' - ORDER BY ordinal_position; - table_name | column_name | is_updatable -------------+-------------+-------------- - rw_view1 | person | YES -(1 row) - -SELECT * FROM rw_view1 WHERE snoop(person); -NOTICE: snooped value: Tom -NOTICE: snooped value: Harry - person --------- - Tom - Harry -(2 rows) - -UPDATE rw_view1 SET person=person WHERE snoop(person); -NOTICE: snooped value: Tom -NOTICE: snooped value: Harry -DELETE FROM rw_view1 WHERE NOT snoop(person); -NOTICE: snooped value: Tom -NOTICE: snooped value: Harry -EXPLAIN (costs off) SELECT * FROM rw_view1 WHERE snoop(person); - QUERY PLAN ------------------------------------------------ - Subquery Scan on rw_view1 - Filter: snoop(rw_view1.person) - -> Seq Scan on base_tbl - Filter: (visibility = 'public'::text) -(4 rows) - -EXPLAIN (costs off) UPDATE rw_view1 SET person=person WHERE snoop(person); - QUERY PLAN -------------------------------------------------------------------- - Update on base_tbl - -> Seq Scan on base_tbl - Filter: ((visibility = 'public'::text) AND snoop(person)) -(3 rows) - -EXPLAIN (costs off) DELETE FROM rw_view1 WHERE NOT snoop(person); - QUERY PLAN -------------------------------------------------------------------------- - Delete on base_tbl - -> Seq Scan on base_tbl - Filter: ((visibility = 'public'::text) AND (NOT snoop(person))) -(3 rows) - --- security barrier view on top of security barrier view -CREATE VIEW rw_view2 WITH (security_barrier = true) AS - SELECT * FROM rw_view1 WHERE snoop(person); -SELECT table_name, is_insertable_into - FROM information_schema.tables - WHERE table_name = 'rw_view2'; - table_name | is_insertable_into -------------+-------------------- - rw_view2 | YES -(1 row) - -SELECT table_name, is_updatable, is_insertable_into - FROM information_schema.views - WHERE table_name = 'rw_view2'; - table_name | is_updatable | is_insertable_into -------------+--------------+-------------------- - rw_view2 | YES | YES -(1 row) - -SELECT table_name, column_name, is_updatable - FROM information_schema.columns - WHERE table_name = 'rw_view2' - ORDER BY ordinal_position; - table_name | column_name | is_updatable -------------+-------------+-------------- - rw_view2 | person | YES -(1 row) - -SELECT * FROM rw_view2 WHERE snoop(person); -NOTICE: snooped value: Tom -NOTICE: snooped value: Tom -NOTICE: snooped value: Harry -NOTICE: snooped value: Harry - person --------- - Tom - Harry -(2 rows) - -UPDATE rw_view2 SET person=person WHERE snoop(person); -NOTICE: snooped value: Tom -NOTICE: snooped value: Tom -NOTICE: snooped value: Harry -NOTICE: snooped value: Harry -DELETE FROM rw_view2 WHERE NOT snoop(person); -NOTICE: snooped value: Tom -NOTICE: snooped value: Tom -NOTICE: snooped value: Harry -NOTICE: snooped value: Harry -EXPLAIN (costs off) SELECT * FROM rw_view2 WHERE snoop(person); - QUERY PLAN ------------------------------------------------------ - Subquery Scan on rw_view2 - Filter: snoop(rw_view2.person) - -> Subquery Scan on rw_view1 - Filter: snoop(rw_view1.person) - -> Seq Scan on base_tbl - Filter: (visibility = 'public'::text) -(6 rows) - -EXPLAIN (costs off) UPDATE rw_view2 SET person=person WHERE snoop(person); - QUERY PLAN -------------------------------------------------------------------------------------- - Update on base_tbl - -> Seq Scan on base_tbl - Filter: ((visibility = 'public'::text) AND snoop(person) AND snoop(person)) -(3 rows) - -EXPLAIN (costs off) DELETE FROM rw_view2 WHERE NOT snoop(person); - QUERY PLAN -------------------------------------------------------------------------------------------- - Delete on base_tbl - -> Seq Scan on base_tbl - Filter: ((visibility = 'public'::text) AND snoop(person) AND (NOT snoop(person))) -(3 rows) - -DROP TABLE base_tbl CASCADE; -NOTICE: drop cascades to 2 other objects -DETAIL: drop cascades to view rw_view1 -drop cascades to view rw_view2 --- security barrier view on top of table with rules -CREATE TABLE base_tbl(id int PRIMARY KEY, data text, deleted boolean); -INSERT INTO base_tbl VALUES (1, 'Row 1', false), (2, 'Row 2', true); -CREATE RULE base_tbl_ins_rule AS ON INSERT TO base_tbl - WHERE EXISTS (SELECT 1 FROM base_tbl t WHERE t.id = new.id) - DO INSTEAD - UPDATE base_tbl SET data = new.data, deleted = false WHERE id = new.id; -CREATE RULE base_tbl_del_rule AS ON DELETE TO base_tbl - DO INSTEAD - UPDATE base_tbl SET deleted = true WHERE id = old.id; -CREATE VIEW rw_view1 WITH (security_barrier=true) AS - SELECT id, data FROM base_tbl WHERE NOT deleted; -SELECT * FROM rw_view1; - id | data -----+------- - 1 | Row 1 -(1 row) - -EXPLAIN (costs off) DELETE FROM rw_view1 WHERE id = 1 AND snoop(data); - QUERY PLAN -------------------------------------------------------------------- - Update on base_tbl base_tbl_1 - -> Nested Loop - -> Index Scan using base_tbl_pkey on base_tbl base_tbl_1 - Index Cond: (id = 1) - -> Index Scan using base_tbl_pkey on base_tbl - Index Cond: (id = 1) - Filter: ((NOT deleted) AND snoop(data)) -(7 rows) - -DELETE FROM rw_view1 WHERE id = 1 AND snoop(data); -NOTICE: snooped value: Row 1 -EXPLAIN (costs off) INSERT INTO rw_view1 VALUES (2, 'New row 2'); - QUERY PLAN ------------------------------------------------------------ - Insert on base_tbl - InitPlan 1 (returns $0) - -> Index Only Scan using base_tbl_pkey on base_tbl t - Index Cond: (id = 2) - -> Result - One-Time Filter: ($0 IS NOT TRUE) - - Update on base_tbl - InitPlan 1 (returns $0) - -> Index Only Scan using base_tbl_pkey on base_tbl t - Index Cond: (id = 2) - -> Result - One-Time Filter: $0 - -> Index Scan using base_tbl_pkey on base_tbl - Index Cond: (id = 2) -(15 rows) - -INSERT INTO rw_view1 VALUES (2, 'New row 2'); -SELECT * FROM base_tbl; - id | data | deleted -----+-----------+--------- - 1 | Row 1 | t - 2 | New row 2 | f -(2 rows) - -DROP TABLE base_tbl CASCADE; -NOTICE: drop cascades to view rw_view1 --- security barrier view based on inheritance set -CREATE TABLE t1 (a int, b float, c text); -CREATE INDEX t1_a_idx ON t1(a); -INSERT INTO t1 -SELECT i,i,'t1' FROM generate_series(1,10) g(i); -ANALYZE t1; -CREATE TABLE t11 (d text) INHERITS (t1); -CREATE INDEX t11_a_idx ON t11(a); -INSERT INTO t11 -SELECT i,i,'t11','t11d' FROM generate_series(1,10) g(i); -ANALYZE t11; -CREATE TABLE t12 (e int[]) INHERITS (t1); -CREATE INDEX t12_a_idx ON t12(a); -INSERT INTO t12 -SELECT i,i,'t12','{1,2}'::int[] FROM generate_series(1,10) g(i); -ANALYZE t12; -CREATE TABLE t111 () INHERITS (t11, t12); -NOTICE: merging multiple inherited definitions of column "a" -NOTICE: merging multiple inherited definitions of column "b" -NOTICE: merging multiple inherited definitions of column "c" -CREATE INDEX t111_a_idx ON t111(a); -INSERT INTO t111 -SELECT i,i,'t111','t111d','{1,1,1}'::int[] FROM generate_series(1,10) g(i); -ANALYZE t111; -CREATE VIEW v1 WITH (security_barrier=true) AS -SELECT *, (SELECT d FROM t11 WHERE t11.a = t1.a LIMIT 1) AS d -FROM t1 -WHERE a > 5 AND EXISTS(SELECT 1 FROM t12 WHERE t12.a = t1.a); -SELECT * FROM v1 WHERE a=3; -- should not see anything - a | b | c | d ----+---+---+--- -(0 rows) - -SELECT * FROM v1 WHERE a=8; - a | b | c | d ----+---+------+------ - 8 | 8 | t1 | t11d - 8 | 8 | t11 | t11d - 8 | 8 | t12 | t11d - 8 | 8 | t111 | t11d -(4 rows) - -EXPLAIN (VERBOSE, COSTS OFF) -UPDATE v1 SET a=100 WHERE snoop(a) AND leakproof(a) AND a < 7 AND a != 6; - QUERY PLAN ------------------------------------------------------------------------------------------------------ - Update on public.t1 - Update on public.t1 t1_1 - Update on public.t11 t1_2 - Update on public.t12 t1_3 - Update on public.t111 t1_4 - -> Result - Output: 100, t1.tableoid, t1.ctid - -> Append - -> Index Scan using t1_a_idx on public.t1 t1_1 - Output: t1_1.tableoid, t1_1.ctid - Index Cond: ((t1_1.a > 5) AND (t1_1.a < 7)) - Filter: ((t1_1.a <> 6) AND (SubPlan 1) AND snoop(t1_1.a) AND leakproof(t1_1.a)) - SubPlan 1 - -> Append - -> Seq Scan on public.t12 t12_1 - Filter: (t12_1.a = t1_1.a) - -> Seq Scan on public.t111 t12_2 - Filter: (t12_2.a = t1_1.a) - -> Index Scan using t11_a_idx on public.t11 t1_2 - Output: t1_2.tableoid, t1_2.ctid - Index Cond: ((t1_2.a > 5) AND (t1_2.a < 7)) - Filter: ((t1_2.a <> 6) AND (SubPlan 1) AND snoop(t1_2.a) AND leakproof(t1_2.a)) - -> Index Scan using t12_a_idx on public.t12 t1_3 - Output: t1_3.tableoid, t1_3.ctid - Index Cond: ((t1_3.a > 5) AND (t1_3.a < 7)) - Filter: ((t1_3.a <> 6) AND (SubPlan 1) AND snoop(t1_3.a) AND leakproof(t1_3.a)) - -> Index Scan using t111_a_idx on public.t111 t1_4 - Output: t1_4.tableoid, t1_4.ctid - Index Cond: ((t1_4.a > 5) AND (t1_4.a < 7)) - Filter: ((t1_4.a <> 6) AND (SubPlan 1) AND snoop(t1_4.a) AND leakproof(t1_4.a)) -(30 rows) - -UPDATE v1 SET a=100 WHERE snoop(a) AND leakproof(a) AND a < 7 AND a != 6; -SELECT * FROM v1 WHERE a=100; -- Nothing should have been changed to 100 - a | b | c | d ----+---+---+--- -(0 rows) - -SELECT * FROM t1 WHERE a=100; -- Nothing should have been changed to 100 - a | b | c ----+---+--- -(0 rows) - -EXPLAIN (VERBOSE, COSTS OFF) -UPDATE v1 SET a=a+1 WHERE snoop(a) AND leakproof(a) AND a = 8; - QUERY PLAN ------------------------------------------------------------------------------------ - Update on public.t1 - Update on public.t1 t1_1 - Update on public.t11 t1_2 - Update on public.t12 t1_3 - Update on public.t111 t1_4 - -> Result - Output: (t1.a + 1), t1.tableoid, t1.ctid - -> Append - -> Index Scan using t1_a_idx on public.t1 t1_1 - Output: t1_1.a, t1_1.tableoid, t1_1.ctid - Index Cond: ((t1_1.a > 5) AND (t1_1.a = 8)) - Filter: ((SubPlan 1) AND snoop(t1_1.a) AND leakproof(t1_1.a)) - SubPlan 1 - -> Append - -> Seq Scan on public.t12 t12_1 - Filter: (t12_1.a = t1_1.a) - -> Seq Scan on public.t111 t12_2 - Filter: (t12_2.a = t1_1.a) - -> Index Scan using t11_a_idx on public.t11 t1_2 - Output: t1_2.a, t1_2.tableoid, t1_2.ctid - Index Cond: ((t1_2.a > 5) AND (t1_2.a = 8)) - Filter: ((SubPlan 1) AND snoop(t1_2.a) AND leakproof(t1_2.a)) - -> Index Scan using t12_a_idx on public.t12 t1_3 - Output: t1_3.a, t1_3.tableoid, t1_3.ctid - Index Cond: ((t1_3.a > 5) AND (t1_3.a = 8)) - Filter: ((SubPlan 1) AND snoop(t1_3.a) AND leakproof(t1_3.a)) - -> Index Scan using t111_a_idx on public.t111 t1_4 - Output: t1_4.a, t1_4.tableoid, t1_4.ctid - Index Cond: ((t1_4.a > 5) AND (t1_4.a = 8)) - Filter: ((SubPlan 1) AND snoop(t1_4.a) AND leakproof(t1_4.a)) -(30 rows) - -UPDATE v1 SET a=a+1 WHERE snoop(a) AND leakproof(a) AND a = 8; -NOTICE: snooped value: 8 -NOTICE: snooped value: 8 -NOTICE: snooped value: 8 -NOTICE: snooped value: 8 -SELECT * FROM v1 WHERE b=8; - a | b | c | d ----+---+------+------ - 9 | 8 | t1 | t11d - 9 | 8 | t11 | t11d - 9 | 8 | t12 | t11d - 9 | 8 | t111 | t11d -(4 rows) - -DELETE FROM v1 WHERE snoop(a) AND leakproof(a); -- should not delete everything, just where a>5 -NOTICE: snooped value: 6 -NOTICE: snooped value: 7 -NOTICE: snooped value: 9 -NOTICE: snooped value: 10 -NOTICE: snooped value: 9 -NOTICE: snooped value: 6 -NOTICE: snooped value: 7 -NOTICE: snooped value: 9 -NOTICE: snooped value: 10 -NOTICE: snooped value: 9 -NOTICE: snooped value: 6 -NOTICE: snooped value: 7 -NOTICE: snooped value: 9 -NOTICE: snooped value: 10 -NOTICE: snooped value: 9 -NOTICE: snooped value: 6 -NOTICE: snooped value: 7 -NOTICE: snooped value: 9 -NOTICE: snooped value: 10 -NOTICE: snooped value: 9 -TABLE t1; -- verify all a<=5 are intact - a | b | c ----+---+------ - 1 | 1 | t1 - 2 | 2 | t1 - 3 | 3 | t1 - 4 | 4 | t1 - 5 | 5 | t1 - 1 | 1 | t11 - 2 | 2 | t11 - 3 | 3 | t11 - 4 | 4 | t11 - 5 | 5 | t11 - 1 | 1 | t12 - 2 | 2 | t12 - 3 | 3 | t12 - 4 | 4 | t12 - 5 | 5 | t12 - 1 | 1 | t111 - 2 | 2 | t111 - 3 | 3 | t111 - 4 | 4 | t111 - 5 | 5 | t111 -(20 rows) - -DROP TABLE t1, t11, t12, t111 CASCADE; -NOTICE: drop cascades to view v1 -DROP FUNCTION snoop(anyelement); -DROP FUNCTION leakproof(anyelement); -CREATE TABLE tx1 (a integer); -CREATE TABLE tx2 (b integer); -CREATE TABLE tx3 (c integer); -CREATE VIEW vx1 AS SELECT a FROM tx1 WHERE EXISTS(SELECT 1 FROM tx2 JOIN tx3 ON b=c); -INSERT INTO vx1 values (1); -SELECT * FROM tx1; - a ---- - 1 -(1 row) - -SELECT * FROM vx1; - a ---- -(0 rows) - -DROP VIEW vx1; -DROP TABLE tx1; -DROP TABLE tx2; -DROP TABLE tx3; -CREATE TABLE tx1 (a integer); -CREATE TABLE tx2 (b integer); -CREATE TABLE tx3 (c integer); -CREATE VIEW vx1 AS SELECT a FROM tx1 WHERE EXISTS(SELECT 1 FROM tx2 JOIN tx3 ON b=c); -INSERT INTO vx1 VALUES (1); -INSERT INTO vx1 VALUES (1); -SELECT * FROM tx1; - a ---- - 1 - 1 -(2 rows) - -SELECT * FROM vx1; - a ---- -(0 rows) - -DROP VIEW vx1; -DROP TABLE tx1; -DROP TABLE tx2; -DROP TABLE tx3; -CREATE TABLE tx1 (a integer, b integer); -CREATE TABLE tx2 (b integer, c integer); -CREATE TABLE tx3 (c integer, d integer); -ALTER TABLE tx1 DROP COLUMN b; -ALTER TABLE tx2 DROP COLUMN c; -ALTER TABLE tx3 DROP COLUMN d; -CREATE VIEW vx1 AS SELECT a FROM tx1 WHERE EXISTS(SELECT 1 FROM tx2 JOIN tx3 ON b=c); -INSERT INTO vx1 VALUES (1); -INSERT INTO vx1 VALUES (1); -SELECT * FROM tx1; - a ---- - 1 - 1 -(2 rows) - -SELECT * FROM vx1; - a ---- -(0 rows) - -DROP VIEW vx1; -DROP TABLE tx1; -DROP TABLE tx2; -DROP TABLE tx3; --- --- Test handling of vars from correlated subqueries in quals from outer --- security barrier views, per bug #13988 --- -CREATE TABLE t1 (a int, b text, c int); -INSERT INTO t1 VALUES (1, 'one', 10); -CREATE TABLE t2 (cc int); -INSERT INTO t2 VALUES (10), (20); -CREATE VIEW v1 WITH (security_barrier = true) AS - SELECT * FROM t1 WHERE (a > 0) - WITH CHECK OPTION; -CREATE VIEW v2 WITH (security_barrier = true) AS - SELECT * FROM v1 WHERE EXISTS (SELECT 1 FROM t2 WHERE t2.cc = v1.c) - WITH CHECK OPTION; -INSERT INTO v2 VALUES (2, 'two', 20); -- ok -INSERT INTO v2 VALUES (-2, 'minus two', 20); -- not allowed -ERROR: new row violates check option for view "v1" -DETAIL: Failing row contains (-2, minus two, 20). -INSERT INTO v2 VALUES (3, 'three', 30); -- not allowed -ERROR: new row violates check option for view "v2" -DETAIL: Failing row contains (3, three, 30). -UPDATE v2 SET b = 'ONE' WHERE a = 1; -- ok -UPDATE v2 SET a = -1 WHERE a = 1; -- not allowed -ERROR: new row violates check option for view "v1" -DETAIL: Failing row contains (-1, ONE, 10). -UPDATE v2 SET c = 30 WHERE a = 1; -- not allowed -ERROR: new row violates check option for view "v2" -DETAIL: Failing row contains (1, ONE, 30). -DELETE FROM v2 WHERE a = 2; -- ok -SELECT * FROM v2; - a | b | c ----+-----+---- - 1 | ONE | 10 -(1 row) - -DROP VIEW v2; -DROP VIEW v1; -DROP TABLE t2; -DROP TABLE t1; --- --- Test CREATE OR REPLACE VIEW turning a non-updatable view into an --- auto-updatable view and adding check options in a single step --- -CREATE TABLE t1 (a int, b text); -CREATE VIEW v1 AS SELECT null::int AS a; -CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1 WHERE a > 0 WITH CHECK OPTION; -INSERT INTO v1 VALUES (1, 'ok'); -- ok -INSERT INTO v1 VALUES (-1, 'invalid'); -- should fail -ERROR: new row violates check option for view "v1" -DETAIL: Failing row contains (-1, invalid). -DROP VIEW v1; -DROP TABLE t1; --- check that an auto-updatable view on a partitioned table works correctly -create table uv_pt (a int, b int, v varchar) partition by range (a, b); -create table uv_pt1 (b int not null, v varchar, a int not null) partition by range (b); -create table uv_pt11 (like uv_pt1); -alter table uv_pt11 drop a; -alter table uv_pt11 add a int; -alter table uv_pt11 drop a; -alter table uv_pt11 add a int not null; -alter table uv_pt1 attach partition uv_pt11 for values from (2) to (5); -alter table uv_pt attach partition uv_pt1 for values from (1, 2) to (1, 10); -create view uv_ptv as select * from uv_pt; -select events & 4 != 0 AS upd, - events & 8 != 0 AS ins, - events & 16 != 0 AS del - from pg_catalog.pg_relation_is_updatable('uv_pt'::regclass, false) t(events); - upd | ins | del ------+-----+----- - t | t | t -(1 row) - -select pg_catalog.pg_column_is_updatable('uv_pt'::regclass, 1::smallint, false); - pg_column_is_updatable ------------------------- - t -(1 row) - -select pg_catalog.pg_column_is_updatable('uv_pt'::regclass, 2::smallint, false); - pg_column_is_updatable ------------------------- - t -(1 row) - -select table_name, is_updatable, is_insertable_into - from information_schema.views where table_name = 'uv_ptv'; - table_name | is_updatable | is_insertable_into -------------+--------------+-------------------- - uv_ptv | YES | YES -(1 row) - -select table_name, column_name, is_updatable - from information_schema.columns where table_name = 'uv_ptv' order by column_name; - table_name | column_name | is_updatable -------------+-------------+-------------- - uv_ptv | a | YES - uv_ptv | b | YES - uv_ptv | v | YES -(3 rows) - -insert into uv_ptv values (1, 2); -select tableoid::regclass, * from uv_pt; - tableoid | a | b | v -----------+---+---+--- - uv_pt11 | 1 | 2 | -(1 row) - -create view uv_ptv_wco as select * from uv_pt where a = 0 with check option; -insert into uv_ptv_wco values (1, 2); -ERROR: new row violates check option for view "uv_ptv_wco" -DETAIL: Failing row contains (1, 2, null). -drop view uv_ptv, uv_ptv_wco; -drop table uv_pt, uv_pt1, uv_pt11; --- check that wholerow vars appearing in WITH CHECK OPTION constraint expressions --- work fine with partitioned tables -create table wcowrtest (a int) partition by list (a); -create table wcowrtest1 partition of wcowrtest for values in (1); -create view wcowrtest_v as select * from wcowrtest where wcowrtest = '(2)'::wcowrtest with check option; -insert into wcowrtest_v values (1); -ERROR: new row violates check option for view "wcowrtest_v" -DETAIL: Failing row contains (1). -alter table wcowrtest add b text; -create table wcowrtest2 (b text, c int, a int); -alter table wcowrtest2 drop c; -alter table wcowrtest attach partition wcowrtest2 for values in (2); -create table sometable (a int, b text); -insert into sometable values (1, 'a'), (2, 'b'); -create view wcowrtest_v2 as - select * - from wcowrtest r - where r in (select s from sometable s where r.a = s.a) -with check option; --- WITH CHECK qual will be processed with wcowrtest2's --- rowtype after tuple-routing -insert into wcowrtest_v2 values (2, 'no such row in sometable'); -ERROR: new row violates check option for view "wcowrtest_v2" -DETAIL: Failing row contains (2, no such row in sometable). -drop view wcowrtest_v, wcowrtest_v2; -drop table wcowrtest, sometable; --- Check INSERT .. ON CONFLICT DO UPDATE works correctly when the view's --- columns are named and ordered differently than the underlying table's. -create table uv_iocu_tab (a text unique, b float); -insert into uv_iocu_tab values ('xyxyxy', 0); -create view uv_iocu_view as - select b, b+1 as c, a, '2.0'::text as two from uv_iocu_tab; -insert into uv_iocu_view (a, b) values ('xyxyxy', 1) - on conflict (a) do update set b = uv_iocu_view.b; -select * from uv_iocu_tab; - a | b ---------+--- - xyxyxy | 0 -(1 row) - -insert into uv_iocu_view (a, b) values ('xyxyxy', 1) - on conflict (a) do update set b = excluded.b; -select * from uv_iocu_tab; - a | b ---------+--- - xyxyxy | 1 -(1 row) - --- OK to access view columns that are not present in underlying base --- relation in the ON CONFLICT portion of the query -insert into uv_iocu_view (a, b) values ('xyxyxy', 3) - on conflict (a) do update set b = cast(excluded.two as float); -select * from uv_iocu_tab; - a | b ---------+--- - xyxyxy | 2 -(1 row) - -explain (costs off) -insert into uv_iocu_view (a, b) values ('xyxyxy', 3) - on conflict (a) do update set b = excluded.b where excluded.c > 0; - QUERY PLAN ------------------------------------------------------------------------------------ - Insert on uv_iocu_tab - Conflict Resolution: UPDATE - Conflict Arbiter Indexes: uv_iocu_tab_a_key - Conflict Filter: ((excluded.b + '1'::double precision) > '0'::double precision) - -> Result -(5 rows) - -insert into uv_iocu_view (a, b) values ('xyxyxy', 3) - on conflict (a) do update set b = excluded.b where excluded.c > 0; -select * from uv_iocu_tab; - a | b ---------+--- - xyxyxy | 3 -(1 row) - -drop view uv_iocu_view; -drop table uv_iocu_tab; --- Test whole-row references to the view -create table uv_iocu_tab (a int unique, b text); -create view uv_iocu_view as - select b as bb, a as aa, uv_iocu_tab::text as cc from uv_iocu_tab; -insert into uv_iocu_view (aa,bb) values (1,'x'); -explain (costs off) -insert into uv_iocu_view (aa,bb) values (1,'y') - on conflict (aa) do update set bb = 'Rejected: '||excluded.* - where excluded.aa > 0 - and excluded.bb != '' - and excluded.cc is not null; - QUERY PLAN ---------------------------------------------------------------------------------------------------------- - Insert on uv_iocu_tab - Conflict Resolution: UPDATE - Conflict Arbiter Indexes: uv_iocu_tab_a_key - Conflict Filter: ((excluded.a > 0) AND (excluded.b <> ''::text) AND ((excluded.*)::text IS NOT NULL)) - -> Result -(5 rows) - -insert into uv_iocu_view (aa,bb) values (1,'y') - on conflict (aa) do update set bb = 'Rejected: '||excluded.* - where excluded.aa > 0 - and excluded.bb != '' - and excluded.cc is not null; -select * from uv_iocu_view; - bb | aa | cc --------------------------+----+--------------------------------- - Rejected: (y,1,"(1,y)") | 1 | (1,"Rejected: (y,1,""(1,y)"")") -(1 row) - --- Test omitting a column of the base relation -delete from uv_iocu_view; -insert into uv_iocu_view (aa,bb) values (1,'x'); -insert into uv_iocu_view (aa) values (1) - on conflict (aa) do update set bb = 'Rejected: '||excluded.*; -select * from uv_iocu_view; - bb | aa | cc ------------------------+----+------------------------------- - Rejected: (,1,"(1,)") | 1 | (1,"Rejected: (,1,""(1,)"")") -(1 row) - -alter table uv_iocu_tab alter column b set default 'table default'; -insert into uv_iocu_view (aa) values (1) - on conflict (aa) do update set bb = 'Rejected: '||excluded.*; -select * from uv_iocu_view; - bb | aa | cc --------------------------------------------------------+----+--------------------------------------------------------------------- - Rejected: ("table default",1,"(1,""table default"")") | 1 | (1,"Rejected: (""table default"",1,""(1,""""table default"""")"")") -(1 row) - -alter view uv_iocu_view alter column bb set default 'view default'; -insert into uv_iocu_view (aa) values (1) - on conflict (aa) do update set bb = 'Rejected: '||excluded.*; -select * from uv_iocu_view; - bb | aa | cc ------------------------------------------------------+----+------------------------------------------------------------------- - Rejected: ("view default",1,"(1,""view default"")") | 1 | (1,"Rejected: (""view default"",1,""(1,""""view default"""")"")") -(1 row) - --- Should fail to update non-updatable columns -insert into uv_iocu_view (aa) values (1) - on conflict (aa) do update set cc = 'XXX'; -ERROR: cannot insert into column "cc" of view "uv_iocu_view" -DETAIL: View columns that are not columns of their base relation are not updatable. -drop view uv_iocu_view; -drop table uv_iocu_tab; --- ON CONFLICT DO UPDATE permissions checks -create user regress_view_user1; -create user regress_view_user2; -set session authorization regress_view_user1; -create table base_tbl(a int unique, b text, c float); -insert into base_tbl values (1,'xxx',1.0); -create view rw_view1 as select b as bb, c as cc, a as aa from base_tbl; -grant select (aa,bb) on rw_view1 to regress_view_user2; -grant insert on rw_view1 to regress_view_user2; -grant update (bb) on rw_view1 to regress_view_user2; -set session authorization regress_view_user2; -insert into rw_view1 values ('yyy',2.0,1) - on conflict (aa) do update set bb = excluded.cc; -- Not allowed -ERROR: permission denied for view rw_view1 -insert into rw_view1 values ('yyy',2.0,1) - on conflict (aa) do update set bb = rw_view1.cc; -- Not allowed -ERROR: permission denied for view rw_view1 -insert into rw_view1 values ('yyy',2.0,1) - on conflict (aa) do update set bb = excluded.bb; -- OK -insert into rw_view1 values ('zzz',2.0,1) - on conflict (aa) do update set bb = rw_view1.bb||'xxx'; -- OK -insert into rw_view1 values ('zzz',2.0,1) - on conflict (aa) do update set cc = 3.0; -- Not allowed -ERROR: permission denied for view rw_view1 -reset session authorization; -select * from base_tbl; - a | b | c ----+--------+--- - 1 | yyyxxx | 1 -(1 row) - -set session authorization regress_view_user1; -grant select (a,b) on base_tbl to regress_view_user2; -grant insert (a,b) on base_tbl to regress_view_user2; -grant update (a,b) on base_tbl to regress_view_user2; -set session authorization regress_view_user2; -create view rw_view2 as select b as bb, c as cc, a as aa from base_tbl; -insert into rw_view2 (aa,bb) values (1,'xxx') - on conflict (aa) do update set bb = excluded.bb; -- Not allowed -ERROR: permission denied for table base_tbl -create view rw_view3 as select b as bb, a as aa from base_tbl; -insert into rw_view3 (aa,bb) values (1,'xxx') - on conflict (aa) do update set bb = excluded.bb; -- OK -reset session authorization; -select * from base_tbl; - a | b | c ----+-----+--- - 1 | xxx | 1 -(1 row) - -set session authorization regress_view_user2; -create view rw_view4 as select aa, bb, cc FROM rw_view1; -insert into rw_view4 (aa,bb) values (1,'yyy') - on conflict (aa) do update set bb = excluded.bb; -- Not allowed -ERROR: permission denied for view rw_view1 -create view rw_view5 as select aa, bb FROM rw_view1; -insert into rw_view5 (aa,bb) values (1,'yyy') - on conflict (aa) do update set bb = excluded.bb; -- OK -reset session authorization; -select * from base_tbl; - a | b | c ----+-----+--- - 1 | yyy | 1 -(1 row) - -drop view rw_view5; -drop view rw_view4; -drop view rw_view3; -drop view rw_view2; -drop view rw_view1; -drop table base_tbl; -drop user regress_view_user1; -drop user regress_view_user2; --- Test single- and multi-row inserts with table and view defaults. --- Table defaults should be used, unless overridden by view defaults. -create table base_tab_def (a int, b text default 'Table default', - c text default 'Table default', d text, e text); -create view base_tab_def_view as select * from base_tab_def; -alter view base_tab_def_view alter b set default 'View default'; -alter view base_tab_def_view alter d set default 'View default'; -insert into base_tab_def values (1); -insert into base_tab_def values (2), (3); -insert into base_tab_def values (4, default, default, default, default); -insert into base_tab_def values (5, default, default, default, default), - (6, default, default, default, default); -insert into base_tab_def_view values (11); -insert into base_tab_def_view values (12), (13); -insert into base_tab_def_view values (14, default, default, default, default); -insert into base_tab_def_view values (15, default, default, default, default), - (16, default, default, default, default); -insert into base_tab_def_view values (17), (default); -select * from base_tab_def order by a; - a | b | c | d | e -----+---------------+---------------+--------------+--- - 1 | Table default | Table default | | - 2 | Table default | Table default | | - 3 | Table default | Table default | | - 4 | Table default | Table default | | - 5 | Table default | Table default | | - 6 | Table default | Table default | | - 11 | View default | Table default | View default | - 12 | View default | Table default | View default | - 13 | View default | Table default | View default | - 14 | View default | Table default | View default | - 15 | View default | Table default | View default | - 16 | View default | Table default | View default | - 17 | View default | Table default | View default | - | View default | Table default | View default | -(14 rows) - --- Adding an INSTEAD OF trigger should cause NULLs to be inserted instead of --- table defaults, where there are no view defaults. -create function base_tab_def_view_instrig_func() returns trigger -as -$$ -begin - insert into base_tab_def values (new.a, new.b, new.c, new.d, new.e); - return new; -end; -$$ -language plpgsql; -create trigger base_tab_def_view_instrig instead of insert on base_tab_def_view - for each row execute function base_tab_def_view_instrig_func(); -truncate base_tab_def; -insert into base_tab_def values (1); -insert into base_tab_def values (2), (3); -insert into base_tab_def values (4, default, default, default, default); -insert into base_tab_def values (5, default, default, default, default), - (6, default, default, default, default); -insert into base_tab_def_view values (11); -insert into base_tab_def_view values (12), (13); -insert into base_tab_def_view values (14, default, default, default, default); -insert into base_tab_def_view values (15, default, default, default, default), - (16, default, default, default, default); -insert into base_tab_def_view values (17), (default); -select * from base_tab_def order by a; - a | b | c | d | e -----+---------------+---------------+--------------+--- - 1 | Table default | Table default | | - 2 | Table default | Table default | | - 3 | Table default | Table default | | - 4 | Table default | Table default | | - 5 | Table default | Table default | | - 6 | Table default | Table default | | - 11 | View default | | View default | - 12 | View default | | View default | - 13 | View default | | View default | - 14 | View default | | View default | - 15 | View default | | View default | - 16 | View default | | View default | - 17 | View default | | View default | - | View default | | View default | -(14 rows) - --- Using an unconditional DO INSTEAD rule should also cause NULLs to be --- inserted where there are no view defaults. -drop trigger base_tab_def_view_instrig on base_tab_def_view; -drop function base_tab_def_view_instrig_func; -create rule base_tab_def_view_ins_rule as on insert to base_tab_def_view - do instead insert into base_tab_def values (new.a, new.b, new.c, new.d, new.e); -truncate base_tab_def; -insert into base_tab_def values (1); -insert into base_tab_def values (2), (3); -insert into base_tab_def values (4, default, default, default, default); -insert into base_tab_def values (5, default, default, default, default), - (6, default, default, default, default); -insert into base_tab_def_view values (11); -insert into base_tab_def_view values (12), (13); -insert into base_tab_def_view values (14, default, default, default, default); -insert into base_tab_def_view values (15, default, default, default, default), - (16, default, default, default, default); -insert into base_tab_def_view values (17), (default); -select * from base_tab_def order by a; - a | b | c | d | e -----+---------------+---------------+--------------+--- - 1 | Table default | Table default | | - 2 | Table default | Table default | | - 3 | Table default | Table default | | - 4 | Table default | Table default | | - 5 | Table default | Table default | | - 6 | Table default | Table default | | - 11 | View default | | View default | - 12 | View default | | View default | - 13 | View default | | View default | - 14 | View default | | View default | - 15 | View default | | View default | - 16 | View default | | View default | - 17 | View default | | View default | - | View default | | View default | -(14 rows) - --- A DO ALSO rule should cause each row to be inserted twice. The first --- insert should behave the same as an auto-updatable view (using table --- defaults, unless overridden by view defaults). The second insert should --- behave the same as a rule-updatable view (inserting NULLs where there are --- no view defaults). -drop rule base_tab_def_view_ins_rule on base_tab_def_view; -create rule base_tab_def_view_ins_rule as on insert to base_tab_def_view - do also insert into base_tab_def values (new.a, new.b, new.c, new.d, new.e); -truncate base_tab_def; -insert into base_tab_def values (1); -insert into base_tab_def values (2), (3); -insert into base_tab_def values (4, default, default, default, default); -insert into base_tab_def values (5, default, default, default, default), - (6, default, default, default, default); -insert into base_tab_def_view values (11); -insert into base_tab_def_view values (12), (13); -insert into base_tab_def_view values (14, default, default, default, default); -insert into base_tab_def_view values (15, default, default, default, default), - (16, default, default, default, default); -insert into base_tab_def_view values (17), (default); -select * from base_tab_def order by a, c NULLS LAST; - a | b | c | d | e -----+---------------+---------------+--------------+--- - 1 | Table default | Table default | | - 2 | Table default | Table default | | - 3 | Table default | Table default | | - 4 | Table default | Table default | | - 5 | Table default | Table default | | - 6 | Table default | Table default | | - 11 | View default | Table default | View default | - 11 | View default | | View default | - 12 | View default | Table default | View default | - 12 | View default | | View default | - 13 | View default | Table default | View default | - 13 | View default | | View default | - 14 | View default | Table default | View default | - 14 | View default | | View default | - 15 | View default | Table default | View default | - 15 | View default | | View default | - 16 | View default | Table default | View default | - 16 | View default | | View default | - 17 | View default | Table default | View default | - 17 | View default | | View default | - | View default | Table default | View default | - | View default | | View default | -(22 rows) - -drop view base_tab_def_view; -drop table base_tab_def; --- Test defaults with array assignments -create table base_tab (a serial, b int[], c text, d text default 'Table default'); -create view base_tab_view as select c, a, b from base_tab; -alter view base_tab_view alter column c set default 'View default'; -insert into base_tab_view (b[1], b[2], c, b[5], b[4], a, b[3]) -values (1, 2, default, 5, 4, default, 3), (10, 11, 'C value', 14, 13, 100, 12); -select * from base_tab order by a; - a | b | c | d ------+------------------+--------------+--------------- - 1 | {1,2,3,4,5} | View default | Table default - 100 | {10,11,12,13,14} | C value | Table default -(2 rows) - -drop view base_tab_view; -drop table base_tab; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/roleattributes.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/roleattributes.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/roleattributes.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/roleattributes.out 2023-02-20 19:45:22.169210006 -0500 @@ -1,249 +1 @@ --- default for superuser is false -CREATE ROLE regress_test_def_superuser; -SELECT rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, rolvaliduntil FROM pg_authid WHERE rolname = 'regress_test_def_superuser'; - rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcanlogin | rolreplication | rolbypassrls | rolconnlimit | rolpassword | rolvaliduntil -----------------------------+----------+------------+---------------+-------------+-------------+----------------+--------------+--------------+-------------+--------------- - regress_test_def_superuser | f | t | f | f | f | f | f | -1 | | -(1 row) - -CREATE ROLE regress_test_superuser WITH SUPERUSER; -SELECT rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, rolvaliduntil FROM pg_authid WHERE rolname = 'regress_test_superuser'; - rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcanlogin | rolreplication | rolbypassrls | rolconnlimit | rolpassword | rolvaliduntil -------------------------+----------+------------+---------------+-------------+-------------+----------------+--------------+--------------+-------------+--------------- - regress_test_superuser | t | t | f | f | f | f | f | -1 | | -(1 row) - -ALTER ROLE regress_test_superuser WITH NOSUPERUSER; -SELECT rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, rolvaliduntil FROM pg_authid WHERE rolname = 'regress_test_superuser'; - rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcanlogin | rolreplication | rolbypassrls | rolconnlimit | rolpassword | rolvaliduntil -------------------------+----------+------------+---------------+-------------+-------------+----------------+--------------+--------------+-------------+--------------- - regress_test_superuser | f | t | f | f | f | f | f | -1 | | -(1 row) - -ALTER ROLE regress_test_superuser WITH SUPERUSER; -SELECT rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, rolvaliduntil FROM pg_authid WHERE rolname = 'regress_test_superuser'; - rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcanlogin | rolreplication | rolbypassrls | rolconnlimit | rolpassword | rolvaliduntil -------------------------+----------+------------+---------------+-------------+-------------+----------------+--------------+--------------+-------------+--------------- - regress_test_superuser | t | t | f | f | f | f | f | -1 | | -(1 row) - --- default for inherit is true -CREATE ROLE regress_test_def_inherit; -SELECT rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, rolvaliduntil FROM pg_authid WHERE rolname = 'regress_test_def_inherit'; - rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcanlogin | rolreplication | rolbypassrls | rolconnlimit | rolpassword | rolvaliduntil ---------------------------+----------+------------+---------------+-------------+-------------+----------------+--------------+--------------+-------------+--------------- - regress_test_def_inherit | f | t | f | f | f | f | f | -1 | | -(1 row) - -CREATE ROLE regress_test_inherit WITH NOINHERIT; -SELECT rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, rolvaliduntil FROM pg_authid WHERE rolname = 'regress_test_inherit'; - rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcanlogin | rolreplication | rolbypassrls | rolconnlimit | rolpassword | rolvaliduntil -----------------------+----------+------------+---------------+-------------+-------------+----------------+--------------+--------------+-------------+--------------- - regress_test_inherit | f | f | f | f | f | f | f | -1 | | -(1 row) - -ALTER ROLE regress_test_inherit WITH INHERIT; -SELECT rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, rolvaliduntil FROM pg_authid WHERE rolname = 'regress_test_inherit'; - rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcanlogin | rolreplication | rolbypassrls | rolconnlimit | rolpassword | rolvaliduntil -----------------------+----------+------------+---------------+-------------+-------------+----------------+--------------+--------------+-------------+--------------- - regress_test_inherit | f | t | f | f | f | f | f | -1 | | -(1 row) - -ALTER ROLE regress_test_inherit WITH NOINHERIT; -SELECT rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, rolvaliduntil FROM pg_authid WHERE rolname = 'regress_test_inherit'; - rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcanlogin | rolreplication | rolbypassrls | rolconnlimit | rolpassword | rolvaliduntil -----------------------+----------+------------+---------------+-------------+-------------+----------------+--------------+--------------+-------------+--------------- - regress_test_inherit | f | f | f | f | f | f | f | -1 | | -(1 row) - --- default for create role is false -CREATE ROLE regress_test_def_createrole; -SELECT rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, rolvaliduntil FROM pg_authid WHERE rolname = 'regress_test_def_createrole'; - rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcanlogin | rolreplication | rolbypassrls | rolconnlimit | rolpassword | rolvaliduntil ------------------------------+----------+------------+---------------+-------------+-------------+----------------+--------------+--------------+-------------+--------------- - regress_test_def_createrole | f | t | f | f | f | f | f | -1 | | -(1 row) - -CREATE ROLE regress_test_createrole WITH CREATEROLE; -SELECT rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, rolvaliduntil FROM pg_authid WHERE rolname = 'regress_test_createrole'; - rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcanlogin | rolreplication | rolbypassrls | rolconnlimit | rolpassword | rolvaliduntil --------------------------+----------+------------+---------------+-------------+-------------+----------------+--------------+--------------+-------------+--------------- - regress_test_createrole | f | t | t | f | f | f | f | -1 | | -(1 row) - -ALTER ROLE regress_test_createrole WITH NOCREATEROLE; -SELECT rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, rolvaliduntil FROM pg_authid WHERE rolname = 'regress_test_createrole'; - rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcanlogin | rolreplication | rolbypassrls | rolconnlimit | rolpassword | rolvaliduntil --------------------------+----------+------------+---------------+-------------+-------------+----------------+--------------+--------------+-------------+--------------- - regress_test_createrole | f | t | f | f | f | f | f | -1 | | -(1 row) - -ALTER ROLE regress_test_createrole WITH CREATEROLE; -SELECT rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, rolvaliduntil FROM pg_authid WHERE rolname = 'regress_test_createrole'; - rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcanlogin | rolreplication | rolbypassrls | rolconnlimit | rolpassword | rolvaliduntil --------------------------+----------+------------+---------------+-------------+-------------+----------------+--------------+--------------+-------------+--------------- - regress_test_createrole | f | t | t | f | f | f | f | -1 | | -(1 row) - --- default for create database is false -CREATE ROLE regress_test_def_createdb; -SELECT rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, rolvaliduntil FROM pg_authid WHERE rolname = 'regress_test_def_createdb'; - rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcanlogin | rolreplication | rolbypassrls | rolconnlimit | rolpassword | rolvaliduntil ----------------------------+----------+------------+---------------+-------------+-------------+----------------+--------------+--------------+-------------+--------------- - regress_test_def_createdb | f | t | f | f | f | f | f | -1 | | -(1 row) - -CREATE ROLE regress_test_createdb WITH CREATEDB; -SELECT rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, rolvaliduntil FROM pg_authid WHERE rolname = 'regress_test_createdb'; - rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcanlogin | rolreplication | rolbypassrls | rolconnlimit | rolpassword | rolvaliduntil ------------------------+----------+------------+---------------+-------------+-------------+----------------+--------------+--------------+-------------+--------------- - regress_test_createdb | f | t | f | t | f | f | f | -1 | | -(1 row) - -ALTER ROLE regress_test_createdb WITH NOCREATEDB; -SELECT rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, rolvaliduntil FROM pg_authid WHERE rolname = 'regress_test_createdb'; - rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcanlogin | rolreplication | rolbypassrls | rolconnlimit | rolpassword | rolvaliduntil ------------------------+----------+------------+---------------+-------------+-------------+----------------+--------------+--------------+-------------+--------------- - regress_test_createdb | f | t | f | f | f | f | f | -1 | | -(1 row) - -ALTER ROLE regress_test_createdb WITH CREATEDB; -SELECT rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, rolvaliduntil FROM pg_authid WHERE rolname = 'regress_test_createdb'; - rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcanlogin | rolreplication | rolbypassrls | rolconnlimit | rolpassword | rolvaliduntil ------------------------+----------+------------+---------------+-------------+-------------+----------------+--------------+--------------+-------------+--------------- - regress_test_createdb | f | t | f | t | f | f | f | -1 | | -(1 row) - --- default for can login is false for role -CREATE ROLE regress_test_def_role_canlogin; -SELECT rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, rolvaliduntil FROM pg_authid WHERE rolname = 'regress_test_def_role_canlogin'; - rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcanlogin | rolreplication | rolbypassrls | rolconnlimit | rolpassword | rolvaliduntil ---------------------------------+----------+------------+---------------+-------------+-------------+----------------+--------------+--------------+-------------+--------------- - regress_test_def_role_canlogin | f | t | f | f | f | f | f | -1 | | -(1 row) - -CREATE ROLE regress_test_role_canlogin WITH LOGIN; -SELECT rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, rolvaliduntil FROM pg_authid WHERE rolname = 'regress_test_role_canlogin'; - rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcanlogin | rolreplication | rolbypassrls | rolconnlimit | rolpassword | rolvaliduntil -----------------------------+----------+------------+---------------+-------------+-------------+----------------+--------------+--------------+-------------+--------------- - regress_test_role_canlogin | f | t | f | f | t | f | f | -1 | | -(1 row) - -ALTER ROLE regress_test_role_canlogin WITH NOLOGIN; -SELECT rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, rolvaliduntil FROM pg_authid WHERE rolname = 'regress_test_role_canlogin'; - rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcanlogin | rolreplication | rolbypassrls | rolconnlimit | rolpassword | rolvaliduntil -----------------------------+----------+------------+---------------+-------------+-------------+----------------+--------------+--------------+-------------+--------------- - regress_test_role_canlogin | f | t | f | f | f | f | f | -1 | | -(1 row) - -ALTER ROLE regress_test_role_canlogin WITH LOGIN; -SELECT rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, rolvaliduntil FROM pg_authid WHERE rolname = 'regress_test_role_canlogin'; - rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcanlogin | rolreplication | rolbypassrls | rolconnlimit | rolpassword | rolvaliduntil -----------------------------+----------+------------+---------------+-------------+-------------+----------------+--------------+--------------+-------------+--------------- - regress_test_role_canlogin | f | t | f | f | t | f | f | -1 | | -(1 row) - --- default for can login is true for user -CREATE USER regress_test_def_user_canlogin; -SELECT rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, rolvaliduntil FROM pg_authid WHERE rolname = 'regress_test_def_user_canlogin'; - rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcanlogin | rolreplication | rolbypassrls | rolconnlimit | rolpassword | rolvaliduntil ---------------------------------+----------+------------+---------------+-------------+-------------+----------------+--------------+--------------+-------------+--------------- - regress_test_def_user_canlogin | f | t | f | f | t | f | f | -1 | | -(1 row) - -CREATE USER regress_test_user_canlogin WITH NOLOGIN; -SELECT rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, rolvaliduntil FROM pg_authid WHERE rolname = 'regress_test_user_canlogin'; - rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcanlogin | rolreplication | rolbypassrls | rolconnlimit | rolpassword | rolvaliduntil -----------------------------+----------+------------+---------------+-------------+-------------+----------------+--------------+--------------+-------------+--------------- - regress_test_user_canlogin | f | t | f | f | f | f | f | -1 | | -(1 row) - -ALTER USER regress_test_user_canlogin WITH LOGIN; -SELECT rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, rolvaliduntil FROM pg_authid WHERE rolname = 'regress_test_user_canlogin'; - rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcanlogin | rolreplication | rolbypassrls | rolconnlimit | rolpassword | rolvaliduntil -----------------------------+----------+------------+---------------+-------------+-------------+----------------+--------------+--------------+-------------+--------------- - regress_test_user_canlogin | f | t | f | f | t | f | f | -1 | | -(1 row) - -ALTER USER regress_test_user_canlogin WITH NOLOGIN; -SELECT rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, rolvaliduntil FROM pg_authid WHERE rolname = 'regress_test_user_canlogin'; - rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcanlogin | rolreplication | rolbypassrls | rolconnlimit | rolpassword | rolvaliduntil -----------------------------+----------+------------+---------------+-------------+-------------+----------------+--------------+--------------+-------------+--------------- - regress_test_user_canlogin | f | t | f | f | f | f | f | -1 | | -(1 row) - --- default for replication is false -CREATE ROLE regress_test_def_replication; -SELECT rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, rolvaliduntil FROM pg_authid WHERE rolname = 'regress_test_def_replication'; - rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcanlogin | rolreplication | rolbypassrls | rolconnlimit | rolpassword | rolvaliduntil -------------------------------+----------+------------+---------------+-------------+-------------+----------------+--------------+--------------+-------------+--------------- - regress_test_def_replication | f | t | f | f | f | f | f | -1 | | -(1 row) - -CREATE ROLE regress_test_replication WITH REPLICATION; -SELECT rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, rolvaliduntil FROM pg_authid WHERE rolname = 'regress_test_replication'; - rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcanlogin | rolreplication | rolbypassrls | rolconnlimit | rolpassword | rolvaliduntil ---------------------------+----------+------------+---------------+-------------+-------------+----------------+--------------+--------------+-------------+--------------- - regress_test_replication | f | t | f | f | f | t | f | -1 | | -(1 row) - -ALTER ROLE regress_test_replication WITH NOREPLICATION; -SELECT rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, rolvaliduntil FROM pg_authid WHERE rolname = 'regress_test_replication'; - rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcanlogin | rolreplication | rolbypassrls | rolconnlimit | rolpassword | rolvaliduntil ---------------------------+----------+------------+---------------+-------------+-------------+----------------+--------------+--------------+-------------+--------------- - regress_test_replication | f | t | f | f | f | f | f | -1 | | -(1 row) - -ALTER ROLE regress_test_replication WITH REPLICATION; -SELECT rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, rolvaliduntil FROM pg_authid WHERE rolname = 'regress_test_replication'; - rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcanlogin | rolreplication | rolbypassrls | rolconnlimit | rolpassword | rolvaliduntil ---------------------------+----------+------------+---------------+-------------+-------------+----------------+--------------+--------------+-------------+--------------- - regress_test_replication | f | t | f | f | f | t | f | -1 | | -(1 row) - --- default for bypassrls is false -CREATE ROLE regress_test_def_bypassrls; -SELECT rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, rolvaliduntil FROM pg_authid WHERE rolname = 'regress_test_def_bypassrls'; - rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcanlogin | rolreplication | rolbypassrls | rolconnlimit | rolpassword | rolvaliduntil -----------------------------+----------+------------+---------------+-------------+-------------+----------------+--------------+--------------+-------------+--------------- - regress_test_def_bypassrls | f | t | f | f | f | f | f | -1 | | -(1 row) - -CREATE ROLE regress_test_bypassrls WITH BYPASSRLS; -SELECT rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, rolvaliduntil FROM pg_authid WHERE rolname = 'regress_test_bypassrls'; - rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcanlogin | rolreplication | rolbypassrls | rolconnlimit | rolpassword | rolvaliduntil -------------------------+----------+------------+---------------+-------------+-------------+----------------+--------------+--------------+-------------+--------------- - regress_test_bypassrls | f | t | f | f | f | f | t | -1 | | -(1 row) - -ALTER ROLE regress_test_bypassrls WITH NOBYPASSRLS; -SELECT rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, rolvaliduntil FROM pg_authid WHERE rolname = 'regress_test_bypassrls'; - rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcanlogin | rolreplication | rolbypassrls | rolconnlimit | rolpassword | rolvaliduntil -------------------------+----------+------------+---------------+-------------+-------------+----------------+--------------+--------------+-------------+--------------- - regress_test_bypassrls | f | t | f | f | f | f | f | -1 | | -(1 row) - -ALTER ROLE regress_test_bypassrls WITH BYPASSRLS; -SELECT rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, rolvaliduntil FROM pg_authid WHERE rolname = 'regress_test_bypassrls'; - rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcanlogin | rolreplication | rolbypassrls | rolconnlimit | rolpassword | rolvaliduntil -------------------------+----------+------------+---------------+-------------+-------------+----------------+--------------+--------------+-------------+--------------- - regress_test_bypassrls | f | t | f | f | f | f | t | -1 | | -(1 row) - --- clean up roles -DROP ROLE regress_test_def_superuser; -DROP ROLE regress_test_superuser; -DROP ROLE regress_test_def_inherit; -DROP ROLE regress_test_inherit; -DROP ROLE regress_test_def_createrole; -DROP ROLE regress_test_createrole; -DROP ROLE regress_test_def_createdb; -DROP ROLE regress_test_createdb; -DROP ROLE regress_test_def_role_canlogin; -DROP ROLE regress_test_role_canlogin; -DROP USER regress_test_def_user_canlogin; -DROP USER regress_test_user_canlogin; -DROP ROLE regress_test_def_replication; -DROP ROLE regress_test_replication; -DROP ROLE regress_test_def_bypassrls; -DROP ROLE regress_test_bypassrls; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/create_am.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/create_am.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/create_am.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/create_am.out 2023-02-20 19:45:22.149210005 -0500 @@ -1,301 +1 @@ --- --- Create access method tests --- --- Make gist2 over gisthandler. In fact, it would be a synonym to gist. -CREATE ACCESS METHOD gist2 TYPE INDEX HANDLER gisthandler; --- Verify return type checks for handlers -CREATE ACCESS METHOD bogus TYPE INDEX HANDLER int4in; -ERROR: function int4in(internal) does not exist -CREATE ACCESS METHOD bogus TYPE INDEX HANDLER heap_tableam_handler; -ERROR: function heap_tableam_handler must return type index_am_handler --- Try to create gist2 index on fast_emp4000: fail because opclass doesn't exist -CREATE INDEX grect2ind2 ON fast_emp4000 USING gist2 (home_base); -ERROR: data type box has no default operator class for access method "gist2" -HINT: You must specify an operator class for the index or define a default operator class for the data type. --- Make operator class for boxes using gist2 -CREATE OPERATOR CLASS box_ops DEFAULT - FOR TYPE box USING gist2 AS - OPERATOR 1 <<, - OPERATOR 2 &<, - OPERATOR 3 &&, - OPERATOR 4 &>, - OPERATOR 5 >>, - OPERATOR 6 ~=, - OPERATOR 7 @>, - OPERATOR 8 <@, - OPERATOR 9 &<|, - OPERATOR 10 <<|, - OPERATOR 11 |>>, - OPERATOR 12 |&>, - FUNCTION 1 gist_box_consistent(internal, box, smallint, oid, internal), - FUNCTION 2 gist_box_union(internal, internal), - -- don't need compress, decompress, or fetch functions - FUNCTION 5 gist_box_penalty(internal, internal, internal), - FUNCTION 6 gist_box_picksplit(internal, internal), - FUNCTION 7 gist_box_same(box, box, internal); --- Create gist2 index on fast_emp4000 -CREATE INDEX grect2ind2 ON fast_emp4000 USING gist2 (home_base); --- Now check the results from plain indexscan; temporarily drop existing --- index grect2ind to ensure it doesn't capture the plan -BEGIN; -DROP INDEX grect2ind; -SET enable_seqscan = OFF; -SET enable_indexscan = ON; -SET enable_bitmapscan = OFF; -EXPLAIN (COSTS OFF) -SELECT * FROM fast_emp4000 - WHERE home_base <@ '(200,200),(2000,1000)'::box - ORDER BY (home_base[0])[0]; - QUERY PLAN ------------------------------------------------------------------ - Sort - Sort Key: ((home_base[0])[0]) - -> Index Only Scan using grect2ind2 on fast_emp4000 - Index Cond: (home_base <@ '(2000,1000),(200,200)'::box) -(4 rows) - -SELECT * FROM fast_emp4000 - WHERE home_base <@ '(200,200),(2000,1000)'::box - ORDER BY (home_base[0])[0]; - home_base ------------------------ - (337,455),(240,359) - (1444,403),(1346,344) -(2 rows) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM fast_emp4000 WHERE home_base && '(1000,1000,0,0)'::box; - QUERY PLAN -------------------------------------------------------------- - Aggregate - -> Index Only Scan using grect2ind2 on fast_emp4000 - Index Cond: (home_base && '(1000,1000),(0,0)'::box) -(3 rows) - -SELECT count(*) FROM fast_emp4000 WHERE home_base && '(1000,1000,0,0)'::box; - count -------- - 2 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM fast_emp4000 WHERE home_base IS NULL; - QUERY PLAN --------------------------------------------------------- - Aggregate - -> Index Only Scan using grect2ind2 on fast_emp4000 - Index Cond: (home_base IS NULL) -(3 rows) - -SELECT count(*) FROM fast_emp4000 WHERE home_base IS NULL; - count -------- - 278 -(1 row) - -ROLLBACK; --- Try to drop access method: fail because of dependent objects -DROP ACCESS METHOD gist2; -ERROR: cannot drop access method gist2 because other objects depend on it -DETAIL: index grect2ind2 depends on operator class box_ops for access method gist2 -HINT: Use DROP ... CASCADE to drop the dependent objects too. --- Drop access method cascade --- To prevent a (rare) deadlock against autovacuum, --- we must lock the table that owns the index that will be dropped -BEGIN; -LOCK TABLE fast_emp4000; -DROP ACCESS METHOD gist2 CASCADE; -NOTICE: drop cascades to index grect2ind2 -COMMIT; --- --- Test table access methods --- --- prevent empty values -SET default_table_access_method = ''; -ERROR: invalid value for parameter "default_table_access_method": "" -DETAIL: default_table_access_method cannot be empty. --- prevent nonexistent values -SET default_table_access_method = 'I do not exist AM'; -ERROR: invalid value for parameter "default_table_access_method": "I do not exist AM" -DETAIL: Table access method "I do not exist AM" does not exist. --- prevent setting it to an index AM -SET default_table_access_method = 'btree'; -ERROR: access method "btree" is not of type TABLE --- Create a heap2 table am handler with heapam handler -CREATE ACCESS METHOD heap2 TYPE TABLE HANDLER heap_tableam_handler; --- Verify return type checks for handlers -CREATE ACCESS METHOD bogus TYPE TABLE HANDLER int4in; -ERROR: function int4in(internal) does not exist -CREATE ACCESS METHOD bogus TYPE TABLE HANDLER bthandler; -ERROR: function bthandler must return type table_am_handler -SELECT amname, amhandler, amtype FROM pg_am where amtype = 't' ORDER BY 1, 2; - amname | amhandler | amtype ---------+----------------------+-------- - heap | heap_tableam_handler | t - heap2 | heap_tableam_handler | t -(2 rows) - --- First create tables employing the new AM using USING --- plain CREATE TABLE -CREATE TABLE tableam_tbl_heap2(f1 int) USING heap2; -INSERT INTO tableam_tbl_heap2 VALUES(1); -SELECT f1 FROM tableam_tbl_heap2 ORDER BY f1; - f1 ----- - 1 -(1 row) - --- CREATE TABLE AS -CREATE TABLE tableam_tblas_heap2 USING heap2 AS SELECT * FROM tableam_tbl_heap2; -SELECT f1 FROM tableam_tbl_heap2 ORDER BY f1; - f1 ----- - 1 -(1 row) - --- SELECT INTO doesn't support USING -SELECT INTO tableam_tblselectinto_heap2 USING heap2 FROM tableam_tbl_heap2; -ERROR: syntax error at or near "USING" -LINE 1: SELECT INTO tableam_tblselectinto_heap2 USING heap2 FROM tab... - ^ --- CREATE VIEW doesn't support USING -CREATE VIEW tableam_view_heap2 USING heap2 AS SELECT * FROM tableam_tbl_heap2; -ERROR: syntax error at or near "USING" -LINE 1: CREATE VIEW tableam_view_heap2 USING heap2 AS SELECT * FROM ... - ^ --- CREATE SEQUENCE doesn't support USING -CREATE SEQUENCE tableam_seq_heap2 USING heap2; -ERROR: syntax error at or near "USING" -LINE 1: CREATE SEQUENCE tableam_seq_heap2 USING heap2; - ^ --- CREATE MATERIALIZED VIEW does support USING -CREATE MATERIALIZED VIEW tableam_tblmv_heap2 USING heap2 AS SELECT * FROM tableam_tbl_heap2; -SELECT f1 FROM tableam_tblmv_heap2 ORDER BY f1; - f1 ----- - 1 -(1 row) - --- CREATE TABLE .. PARTITION BY doesn't not support USING -CREATE TABLE tableam_parted_heap2 (a text, b int) PARTITION BY list (a) USING heap2; -ERROR: specifying a table access method is not supported on a partitioned table -CREATE TABLE tableam_parted_heap2 (a text, b int) PARTITION BY list (a); --- new partitions will inherit from the current default, rather the partition root -SET default_table_access_method = 'heap'; -CREATE TABLE tableam_parted_a_heap2 PARTITION OF tableam_parted_heap2 FOR VALUES IN ('a'); -SET default_table_access_method = 'heap2'; -CREATE TABLE tableam_parted_b_heap2 PARTITION OF tableam_parted_heap2 FOR VALUES IN ('b'); -RESET default_table_access_method; --- but the method can be explicitly specified -CREATE TABLE tableam_parted_c_heap2 PARTITION OF tableam_parted_heap2 FOR VALUES IN ('c') USING heap; -CREATE TABLE tableam_parted_d_heap2 PARTITION OF tableam_parted_heap2 FOR VALUES IN ('d') USING heap2; --- List all objects in AM -SELECT - pc.relkind, - pa.amname, - CASE WHEN relkind = 't' THEN - (SELECT 'toast for ' || relname::regclass FROM pg_class pcm WHERE pcm.reltoastrelid = pc.oid) - ELSE - relname::regclass::text - END COLLATE "C" AS relname -FROM pg_class AS pc, - pg_am AS pa -WHERE pa.oid = pc.relam - AND pa.amname = 'heap2' -ORDER BY 3, 1, 2; - relkind | amname | relname ----------+--------+---------------------------------- - r | heap2 | tableam_parted_b_heap2 - r | heap2 | tableam_parted_d_heap2 - r | heap2 | tableam_tbl_heap2 - r | heap2 | tableam_tblas_heap2 - m | heap2 | tableam_tblmv_heap2 - t | heap2 | toast for tableam_parted_b_heap2 - t | heap2 | toast for tableam_parted_d_heap2 -(7 rows) - --- Show dependencies onto AM - there shouldn't be any for toast -SELECT pg_describe_object(classid,objid,objsubid) AS obj -FROM pg_depend, pg_am -WHERE pg_depend.refclassid = 'pg_am'::regclass - AND pg_am.oid = pg_depend.refobjid - AND pg_am.amname = 'heap2' -ORDER BY classid, objid, objsubid; - obj ---------------------------------------- - table tableam_tbl_heap2 - table tableam_tblas_heap2 - materialized view tableam_tblmv_heap2 - table tableam_parted_b_heap2 - table tableam_parted_d_heap2 -(5 rows) - --- Second, create objects in the new AM by changing the default AM -BEGIN; -SET LOCAL default_table_access_method = 'heap2'; --- following tests should all respect the default AM -CREATE TABLE tableam_tbl_heapx(f1 int); -CREATE TABLE tableam_tblas_heapx AS SELECT * FROM tableam_tbl_heapx; -SELECT INTO tableam_tblselectinto_heapx FROM tableam_tbl_heapx; -CREATE MATERIALIZED VIEW tableam_tblmv_heapx USING heap2 AS SELECT * FROM tableam_tbl_heapx; -CREATE TABLE tableam_parted_heapx (a text, b int) PARTITION BY list (a); -CREATE TABLE tableam_parted_1_heapx PARTITION OF tableam_parted_heapx FOR VALUES IN ('a', 'b'); --- but an explicitly set AM overrides it -CREATE TABLE tableam_parted_2_heapx PARTITION OF tableam_parted_heapx FOR VALUES IN ('c', 'd') USING heap; --- sequences, views and foreign servers shouldn't have an AM -CREATE VIEW tableam_view_heapx AS SELECT * FROM tableam_tbl_heapx; -CREATE SEQUENCE tableam_seq_heapx; -CREATE FOREIGN DATA WRAPPER fdw_heap2 VALIDATOR postgresql_fdw_validator; -CREATE SERVER fs_heap2 FOREIGN DATA WRAPPER fdw_heap2 ; -CREATE FOREIGN table tableam_fdw_heapx () SERVER fs_heap2; --- Verify that new AM was used for tables, matviews, but not for sequences, views and fdws -SELECT - pc.relkind, - pa.amname, - CASE WHEN relkind = 't' THEN - (SELECT 'toast for ' || relname::regclass FROM pg_class pcm WHERE pcm.reltoastrelid = pc.oid) - ELSE - relname::regclass::text - END COLLATE "C" AS relname -FROM pg_class AS pc - LEFT JOIN pg_am AS pa ON (pa.oid = pc.relam) -WHERE pc.relname LIKE 'tableam_%_heapx' -ORDER BY 3, 1, 2; - relkind | amname | relname ----------+--------+----------------------------- - f | | tableam_fdw_heapx - r | heap2 | tableam_parted_1_heapx - r | heap | tableam_parted_2_heapx - p | | tableam_parted_heapx - S | | tableam_seq_heapx - r | heap2 | tableam_tbl_heapx - r | heap2 | tableam_tblas_heapx - m | heap2 | tableam_tblmv_heapx - r | heap2 | tableam_tblselectinto_heapx - v | | tableam_view_heapx -(10 rows) - --- don't want to keep those tables, nor the default -ROLLBACK; --- Third, check that we can neither create a table using a nonexistent --- AM, nor using an index AM -CREATE TABLE i_am_a_failure() USING ""; -ERROR: zero-length delimited identifier at or near """" -LINE 1: CREATE TABLE i_am_a_failure() USING ""; - ^ -CREATE TABLE i_am_a_failure() USING i_do_not_exist_am; -ERROR: access method "i_do_not_exist_am" does not exist -CREATE TABLE i_am_a_failure() USING "I do not exist AM"; -ERROR: access method "I do not exist AM" does not exist -CREATE TABLE i_am_a_failure() USING "btree"; -ERROR: access method "btree" is not of type TABLE --- Drop table access method, which fails as objects depends on it -DROP ACCESS METHOD heap2; -ERROR: cannot drop access method heap2 because other objects depend on it -DETAIL: table tableam_tbl_heap2 depends on access method heap2 -table tableam_tblas_heap2 depends on access method heap2 -materialized view tableam_tblmv_heap2 depends on access method heap2 -table tableam_parted_b_heap2 depends on access method heap2 -table tableam_parted_d_heap2 depends on access method heap2 -HINT: Use DROP ... CASCADE to drop the dependent objects too. --- we intentionally leave the objects created above alive, to verify pg_dump support +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/hash_func.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/hash_func.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/hash_func.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/hash_func.out 2023-02-20 19:45:22.179210006 -0500 @@ -1,374 +1 @@ --- --- Test hash functions --- --- When the salt is 0, the extended hash function should produce a result --- whose low 32 bits match the standard hash function. When the salt is --- not 0, we should get a different result. --- -SELECT v as value, hashint2(v)::bit(32) as standard, - hashint2extended(v, 0)::bit(32) as extended0, - hashint2extended(v, 1)::bit(32) as extended1 -FROM (VALUES (0::int2), (1::int2), (17::int2), (42::int2)) x(v) -WHERE hashint2(v)::bit(32) != hashint2extended(v, 0)::bit(32) - OR hashint2(v)::bit(32) = hashint2extended(v, 1)::bit(32); - value | standard | extended0 | extended1 --------+----------+-----------+----------- -(0 rows) - -SELECT v as value, hashint4(v)::bit(32) as standard, - hashint4extended(v, 0)::bit(32) as extended0, - hashint4extended(v, 1)::bit(32) as extended1 -FROM (VALUES (0), (1), (17), (42), (550273), (207112489)) x(v) -WHERE hashint4(v)::bit(32) != hashint4extended(v, 0)::bit(32) - OR hashint4(v)::bit(32) = hashint4extended(v, 1)::bit(32); - value | standard | extended0 | extended1 --------+----------+-----------+----------- -(0 rows) - -SELECT v as value, hashint8(v)::bit(32) as standard, - hashint8extended(v, 0)::bit(32) as extended0, - hashint8extended(v, 1)::bit(32) as extended1 -FROM (VALUES (0), (1), (17), (42), (550273), (207112489)) x(v) -WHERE hashint8(v)::bit(32) != hashint8extended(v, 0)::bit(32) - OR hashint8(v)::bit(32) = hashint8extended(v, 1)::bit(32); - value | standard | extended0 | extended1 --------+----------+-----------+----------- -(0 rows) - -SELECT v as value, hashfloat4(v)::bit(32) as standard, - hashfloat4extended(v, 0)::bit(32) as extended0, - hashfloat4extended(v, 1)::bit(32) as extended1 -FROM (VALUES (0), (1), (17), (42), (550273), (207112489)) x(v) -WHERE hashfloat4(v)::bit(32) != hashfloat4extended(v, 0)::bit(32) - OR hashfloat4(v)::bit(32) = hashfloat4extended(v, 1)::bit(32); - value | standard | extended0 | extended1 --------+----------+-----------+----------- -(0 rows) - -SELECT v as value, hashfloat8(v)::bit(32) as standard, - hashfloat8extended(v, 0)::bit(32) as extended0, - hashfloat8extended(v, 1)::bit(32) as extended1 -FROM (VALUES (0), (1), (17), (42), (550273), (207112489)) x(v) -WHERE hashfloat8(v)::bit(32) != hashfloat8extended(v, 0)::bit(32) - OR hashfloat8(v)::bit(32) = hashfloat8extended(v, 1)::bit(32); - value | standard | extended0 | extended1 --------+----------+-----------+----------- -(0 rows) - -SELECT v as value, hashoid(v)::bit(32) as standard, - hashoidextended(v, 0)::bit(32) as extended0, - hashoidextended(v, 1)::bit(32) as extended1 -FROM (VALUES (0), (1), (17), (42), (550273), (207112489)) x(v) -WHERE hashoid(v)::bit(32) != hashoidextended(v, 0)::bit(32) - OR hashoid(v)::bit(32) = hashoidextended(v, 1)::bit(32); - value | standard | extended0 | extended1 --------+----------+-----------+----------- -(0 rows) - -SELECT v as value, hashchar(v)::bit(32) as standard, - hashcharextended(v, 0)::bit(32) as extended0, - hashcharextended(v, 1)::bit(32) as extended1 -FROM (VALUES (NULL::"char"), ('1'), ('x'), ('X'), ('p'), ('N')) x(v) -WHERE hashchar(v)::bit(32) != hashcharextended(v, 0)::bit(32) - OR hashchar(v)::bit(32) = hashcharextended(v, 1)::bit(32); - value | standard | extended0 | extended1 --------+----------+-----------+----------- -(0 rows) - -SELECT v as value, hashname(v)::bit(32) as standard, - hashnameextended(v, 0)::bit(32) as extended0, - hashnameextended(v, 1)::bit(32) as extended1 -FROM (VALUES (NULL), ('PostgreSQL'), ('eIpUEtqmY89'), ('AXKEJBTK'), - ('muop28x03'), ('yi3nm0d73')) x(v) -WHERE hashname(v)::bit(32) != hashnameextended(v, 0)::bit(32) - OR hashname(v)::bit(32) = hashnameextended(v, 1)::bit(32); - value | standard | extended0 | extended1 --------+----------+-----------+----------- -(0 rows) - -SELECT v as value, hashtext(v)::bit(32) as standard, - hashtextextended(v, 0)::bit(32) as extended0, - hashtextextended(v, 1)::bit(32) as extended1 -FROM (VALUES (NULL), ('PostgreSQL'), ('eIpUEtqmY89'), ('AXKEJBTK'), - ('muop28x03'), ('yi3nm0d73')) x(v) -WHERE hashtext(v)::bit(32) != hashtextextended(v, 0)::bit(32) - OR hashtext(v)::bit(32) = hashtextextended(v, 1)::bit(32); - value | standard | extended0 | extended1 --------+----------+-----------+----------- -(0 rows) - -SELECT v as value, hashoidvector(v)::bit(32) as standard, - hashoidvectorextended(v, 0)::bit(32) as extended0, - hashoidvectorextended(v, 1)::bit(32) as extended1 -FROM (VALUES (NULL::oidvector), ('0 1 2 3 4'), ('17 18 19 20'), - ('42 43 42 45'), ('550273 550273 570274'), - ('207112489 207112499 21512 2155 372325 1363252')) x(v) -WHERE hashoidvector(v)::bit(32) != hashoidvectorextended(v, 0)::bit(32) - OR hashoidvector(v)::bit(32) = hashoidvectorextended(v, 1)::bit(32); - value | standard | extended0 | extended1 --------+----------+-----------+----------- -(0 rows) - -SELECT v as value, hash_aclitem(v)::bit(32) as standard, - hash_aclitem_extended(v, 0)::bit(32) as extended0, - hash_aclitem_extended(v, 1)::bit(32) as extended1 -FROM (SELECT DISTINCT(relacl[1]) FROM pg_class LIMIT 10) x(v) -WHERE hash_aclitem(v)::bit(32) != hash_aclitem_extended(v, 0)::bit(32) - OR hash_aclitem(v)::bit(32) = hash_aclitem_extended(v, 1)::bit(32); - value | standard | extended0 | extended1 --------+----------+-----------+----------- -(0 rows) - -SELECT v as value, hashmacaddr(v)::bit(32) as standard, - hashmacaddrextended(v, 0)::bit(32) as extended0, - hashmacaddrextended(v, 1)::bit(32) as extended1 -FROM (VALUES (NULL::macaddr), ('08:00:2b:01:02:04'), ('08:00:2b:01:02:04'), - ('e2:7f:51:3e:70:49'), ('d6:a9:4a:78:1c:d5'), - ('ea:29:b1:5e:1f:a5')) x(v) -WHERE hashmacaddr(v)::bit(32) != hashmacaddrextended(v, 0)::bit(32) - OR hashmacaddr(v)::bit(32) = hashmacaddrextended(v, 1)::bit(32); - value | standard | extended0 | extended1 --------+----------+-----------+----------- -(0 rows) - -SELECT v as value, hashinet(v)::bit(32) as standard, - hashinetextended(v, 0)::bit(32) as extended0, - hashinetextended(v, 1)::bit(32) as extended1 -FROM (VALUES (NULL::inet), ('192.168.100.128/25'), ('192.168.100.0/8'), - ('172.168.10.126/16'), ('172.18.103.126/24'), ('192.188.13.16/32')) x(v) -WHERE hashinet(v)::bit(32) != hashinetextended(v, 0)::bit(32) - OR hashinet(v)::bit(32) = hashinetextended(v, 1)::bit(32); - value | standard | extended0 | extended1 --------+----------+-----------+----------- -(0 rows) - -SELECT v as value, hash_numeric(v)::bit(32) as standard, - hash_numeric_extended(v, 0)::bit(32) as extended0, - hash_numeric_extended(v, 1)::bit(32) as extended1 -FROM (VALUES (0), (1.149484958), (17.149484958), (42.149484958), - (149484958.550273), (2071124898672)) x(v) -WHERE hash_numeric(v)::bit(32) != hash_numeric_extended(v, 0)::bit(32) - OR hash_numeric(v)::bit(32) = hash_numeric_extended(v, 1)::bit(32); - value | standard | extended0 | extended1 --------+----------+-----------+----------- -(0 rows) - -SELECT v as value, hashmacaddr8(v)::bit(32) as standard, - hashmacaddr8extended(v, 0)::bit(32) as extended0, - hashmacaddr8extended(v, 1)::bit(32) as extended1 -FROM (VALUES (NULL::macaddr8), ('08:00:2b:01:02:04:36:49'), - ('08:00:2b:01:02:04:f0:e8'), ('e2:7f:51:3e:70:49:16:29'), - ('d6:a9:4a:78:1c:d5:47:32'), ('ea:29:b1:5e:1f:a5')) x(v) -WHERE hashmacaddr8(v)::bit(32) != hashmacaddr8extended(v, 0)::bit(32) - OR hashmacaddr8(v)::bit(32) = hashmacaddr8extended(v, 1)::bit(32); - value | standard | extended0 | extended1 --------+----------+-----------+----------- -(0 rows) - -SELECT v as value, hash_array(v)::bit(32) as standard, - hash_array_extended(v, 0)::bit(32) as extended0, - hash_array_extended(v, 1)::bit(32) as extended1 -FROM (VALUES ('{0}'::int4[]), ('{0,1,2,3,4}'), ('{17,18,19,20}'), - ('{42,34,65,98}'), ('{550273,590027, 870273}'), - ('{207112489, 807112489}')) x(v) -WHERE hash_array(v)::bit(32) != hash_array_extended(v, 0)::bit(32) - OR hash_array(v)::bit(32) = hash_array_extended(v, 1)::bit(32); - value | standard | extended0 | extended1 --------+----------+-----------+----------- -(0 rows) - --- array hashing with non-hashable element type -SELECT v as value, hash_array(v)::bit(32) as standard -FROM (VALUES ('{0}'::money[])) x(v); -ERROR: could not identify a hash function for type money -SELECT v as value, hash_array_extended(v, 0)::bit(32) as extended0 -FROM (VALUES ('{0}'::money[])) x(v); -ERROR: could not identify an extended hash function for type money -SELECT v as value, hashbpchar(v)::bit(32) as standard, - hashbpcharextended(v, 0)::bit(32) as extended0, - hashbpcharextended(v, 1)::bit(32) as extended1 -FROM (VALUES (NULL), ('PostgreSQL'), ('eIpUEtqmY89'), ('AXKEJBTK'), - ('muop28x03'), ('yi3nm0d73')) x(v) -WHERE hashbpchar(v)::bit(32) != hashbpcharextended(v, 0)::bit(32) - OR hashbpchar(v)::bit(32) = hashbpcharextended(v, 1)::bit(32); - value | standard | extended0 | extended1 --------+----------+-----------+----------- -(0 rows) - -SELECT v as value, time_hash(v)::bit(32) as standard, - time_hash_extended(v, 0)::bit(32) as extended0, - time_hash_extended(v, 1)::bit(32) as extended1 -FROM (VALUES (NULL::time), ('11:09:59'), ('1:09:59'), ('11:59:59'), - ('7:9:59'), ('5:15:59')) x(v) -WHERE time_hash(v)::bit(32) != time_hash_extended(v, 0)::bit(32) - OR time_hash(v)::bit(32) = time_hash_extended(v, 1)::bit(32); - value | standard | extended0 | extended1 --------+----------+-----------+----------- -(0 rows) - -SELECT v as value, timetz_hash(v)::bit(32) as standard, - timetz_hash_extended(v, 0)::bit(32) as extended0, - timetz_hash_extended(v, 1)::bit(32) as extended1 -FROM (VALUES (NULL::timetz), ('00:11:52.518762-07'), ('00:11:52.51762-08'), - ('00:11:52.62-01'), ('00:11:52.62+01'), ('11:59:59+04')) x(v) -WHERE timetz_hash(v)::bit(32) != timetz_hash_extended(v, 0)::bit(32) - OR timetz_hash(v)::bit(32) = timetz_hash_extended(v, 1)::bit(32); - value | standard | extended0 | extended1 --------+----------+-----------+----------- -(0 rows) - -SELECT v as value, interval_hash(v)::bit(32) as standard, - interval_hash_extended(v, 0)::bit(32) as extended0, - interval_hash_extended(v, 1)::bit(32) as extended1 -FROM (VALUES (NULL::interval), - ('5 month 7 day 46 minutes'), ('1 year 7 day 46 minutes'), - ('1 year 7 month 20 day 46 minutes'), ('5 month'), - ('17 year 11 month 7 day 9 hours 46 minutes 5 seconds')) x(v) -WHERE interval_hash(v)::bit(32) != interval_hash_extended(v, 0)::bit(32) - OR interval_hash(v)::bit(32) = interval_hash_extended(v, 1)::bit(32); - value | standard | extended0 | extended1 --------+----------+-----------+----------- -(0 rows) - -SELECT v as value, timestamp_hash(v)::bit(32) as standard, - timestamp_hash_extended(v, 0)::bit(32) as extended0, - timestamp_hash_extended(v, 1)::bit(32) as extended1 -FROM (VALUES (NULL::timestamp), ('2017-08-22 00:09:59.518762'), - ('2015-08-20 00:11:52.51762-08'), - ('2017-05-22 00:11:52.62-01'), - ('2013-08-22 00:11:52.62+01'), ('2013-08-22 11:59:59+04')) x(v) -WHERE timestamp_hash(v)::bit(32) != timestamp_hash_extended(v, 0)::bit(32) - OR timestamp_hash(v)::bit(32) = timestamp_hash_extended(v, 1)::bit(32); - value | standard | extended0 | extended1 --------+----------+-----------+----------- -(0 rows) - -SELECT v as value, uuid_hash(v)::bit(32) as standard, - uuid_hash_extended(v, 0)::bit(32) as extended0, - uuid_hash_extended(v, 1)::bit(32) as extended1 -FROM (VALUES (NULL::uuid), ('a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'), - ('5a9ba4ac-8d6f-11e7-bb31-be2e44b06b34'), - ('99c6705c-d939-461c-a3c9-1690ad64ed7b'), - ('7deed3ca-8d6f-11e7-bb31-be2e44b06b34'), - ('9ad46d4f-6f2a-4edd-aadb-745993928e1e')) x(v) -WHERE uuid_hash(v)::bit(32) != uuid_hash_extended(v, 0)::bit(32) - OR uuid_hash(v)::bit(32) = uuid_hash_extended(v, 1)::bit(32); - value | standard | extended0 | extended1 --------+----------+-----------+----------- -(0 rows) - -SELECT v as value, pg_lsn_hash(v)::bit(32) as standard, - pg_lsn_hash_extended(v, 0)::bit(32) as extended0, - pg_lsn_hash_extended(v, 1)::bit(32) as extended1 -FROM (VALUES (NULL::pg_lsn), ('16/B374D84'), ('30/B374D84'), - ('255/B374D84'), ('25/B379D90'), ('900/F37FD90')) x(v) -WHERE pg_lsn_hash(v)::bit(32) != pg_lsn_hash_extended(v, 0)::bit(32) - OR pg_lsn_hash(v)::bit(32) = pg_lsn_hash_extended(v, 1)::bit(32); - value | standard | extended0 | extended1 --------+----------+-----------+----------- -(0 rows) - -CREATE TYPE mood AS ENUM ('sad', 'ok', 'happy'); -SELECT v as value, hashenum(v)::bit(32) as standard, - hashenumextended(v, 0)::bit(32) as extended0, - hashenumextended(v, 1)::bit(32) as extended1 -FROM (VALUES ('sad'::mood), ('ok'), ('happy')) x(v) -WHERE hashenum(v)::bit(32) != hashenumextended(v, 0)::bit(32) - OR hashenum(v)::bit(32) = hashenumextended(v, 1)::bit(32); - value | standard | extended0 | extended1 --------+----------+-----------+----------- -(0 rows) - -DROP TYPE mood; -SELECT v as value, jsonb_hash(v)::bit(32) as standard, - jsonb_hash_extended(v, 0)::bit(32) as extended0, - jsonb_hash_extended(v, 1)::bit(32) as extended1 -FROM (VALUES (NULL::jsonb), - ('{"a": "aaa bbb ddd ccc", "b": ["eee fff ggg"], "c": {"d": "hhh iii"}}'), - ('{"foo": [true, "bar"], "tags": {"e": 1, "f": null}}'), - ('{"g": {"h": "value"}}')) x(v) -WHERE jsonb_hash(v)::bit(32) != jsonb_hash_extended(v, 0)::bit(32) - OR jsonb_hash(v)::bit(32) = jsonb_hash_extended(v, 1)::bit(32); - value | standard | extended0 | extended1 --------+----------+-----------+----------- -(0 rows) - -SELECT v as value, hash_range(v)::bit(32) as standard, - hash_range_extended(v, 0)::bit(32) as extended0, - hash_range_extended(v, 1)::bit(32) as extended1 -FROM (VALUES (int4range(10, 20)), (int4range(23, 43)), - (int4range(5675, 550273)), - (int4range(550274, 1550274)), (int4range(1550275, 208112489))) x(v) -WHERE hash_range(v)::bit(32) != hash_range_extended(v, 0)::bit(32) - OR hash_range(v)::bit(32) = hash_range_extended(v, 1)::bit(32); - value | standard | extended0 | extended1 --------+----------+-----------+----------- -(0 rows) - -SELECT v as value, hash_multirange(v)::bit(32) as standard, - hash_multirange_extended(v, 0)::bit(32) as extended0, - hash_multirange_extended(v, 1)::bit(32) as extended1 -FROM (VALUES ('{[10,20)}'::int4multirange), ('{[23, 43]}'::int4multirange), - ('{[5675, 550273)}'::int4multirange), - ('{[550274, 1550274)}'::int4multirange), - ('{[1550275, 208112489)}'::int4multirange)) x(v) -WHERE hash_multirange(v)::bit(32) != hash_multirange_extended(v, 0)::bit(32) - OR hash_multirange(v)::bit(32) = hash_multirange_extended(v, 1)::bit(32); - value | standard | extended0 | extended1 --------+----------+-----------+----------- -(0 rows) - -CREATE TYPE hash_test_t1 AS (a int, b text); -SELECT v as value, hash_record(v)::bit(32) as standard, - hash_record_extended(v, 0)::bit(32) as extended0, - hash_record_extended(v, 1)::bit(32) as extended1 -FROM (VALUES (row(1, 'aaa')::hash_test_t1, row(2, 'bbb'), row(-1, 'ccc'))) x(v) -WHERE hash_record(v)::bit(32) != hash_record_extended(v, 0)::bit(32) - OR hash_record(v)::bit(32) = hash_record_extended(v, 1)::bit(32); - value | standard | extended0 | extended1 --------+----------+-----------+----------- -(0 rows) - -DROP TYPE hash_test_t1; --- record hashing with non-hashable field type -CREATE TYPE hash_test_t2 AS (a money, b text); -SELECT v as value, hash_record(v)::bit(32) as standard -FROM (VALUES (row(1, 'aaa')::hash_test_t2)) x(v); -ERROR: could not identify a hash function for type money -SELECT v as value, hash_record_extended(v, 0)::bit(32) as extended0 -FROM (VALUES (row(1, 'aaa')::hash_test_t2)) x(v); -ERROR: could not identify an extended hash function for type money -DROP TYPE hash_test_t2; --- --- Check special cases for specific data types --- -SELECT hashfloat4('0'::float4) = hashfloat4('-0'::float4) AS t; - t ---- - t -(1 row) - -SELECT hashfloat4('NaN'::float4) = hashfloat4(-'NaN'::float4) AS t; - t ---- - t -(1 row) - -SELECT hashfloat8('0'::float8) = hashfloat8('-0'::float8) AS t; - t ---- - t -(1 row) - -SELECT hashfloat8('NaN'::float8) = hashfloat8(-'NaN'::float8) AS t; - t ---- - t -(1 row) - -SELECT hashfloat4('NaN'::float4) = hashfloat8('NaN'::float8) AS t; - t ---- - t -(1 row) - +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/errors.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/errors.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/errors.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/errors.out 2023-02-20 19:45:22.279210011 -0500 @@ -1,447 +1 @@ --- --- ERRORS --- --- bad in postquel, but ok in PostgreSQL -select 1; - ?column? ----------- - 1 -(1 row) - --- --- UNSUPPORTED STUFF --- doesn't work --- notify pg_class --- --- --- SELECT --- this used to be a syntax error, but now we allow an empty target list -select; --- -(1 row) - --- no such relation -select * from nonesuch; -ERROR: relation "nonesuch" does not exist -LINE 1: select * from nonesuch; - ^ --- bad name in target list -select nonesuch from pg_database; -ERROR: column "nonesuch" does not exist -LINE 1: select nonesuch from pg_database; - ^ --- empty distinct list isn't OK -select distinct from pg_database; -ERROR: syntax error at or near "from" -LINE 1: select distinct from pg_database; - ^ --- bad attribute name on lhs of operator -select * from pg_database where nonesuch = pg_database.datname; -ERROR: column "nonesuch" does not exist -LINE 1: select * from pg_database where nonesuch = pg_database.datna... - ^ --- bad attribute name on rhs of operator -select * from pg_database where pg_database.datname = nonesuch; -ERROR: column "nonesuch" does not exist -LINE 1: ...ect * from pg_database where pg_database.datname = nonesuch; - ^ --- bad attribute name in select distinct on -select distinct on (foobar) * from pg_database; -ERROR: column "foobar" does not exist -LINE 1: select distinct on (foobar) * from pg_database; - ^ --- grouping with FOR UPDATE -select null from pg_database group by datname for update; -ERROR: FOR UPDATE is not allowed with GROUP BY clause -select null from pg_database group by grouping sets (()) for update; -ERROR: FOR UPDATE is not allowed with GROUP BY clause --- --- DELETE --- missing relation name (this had better not wildcard!) -delete from; -ERROR: syntax error at or near ";" -LINE 1: delete from; - ^ --- no such relation -delete from nonesuch; -ERROR: relation "nonesuch" does not exist -LINE 1: delete from nonesuch; - ^ --- --- DROP --- missing relation name (this had better not wildcard!) -drop table; -ERROR: syntax error at or near ";" -LINE 1: drop table; - ^ --- no such relation -drop table nonesuch; -ERROR: table "nonesuch" does not exist --- --- ALTER TABLE --- relation renaming --- missing relation name -alter table rename; -ERROR: syntax error at or near ";" -LINE 1: alter table rename; - ^ --- no such relation -alter table nonesuch rename to newnonesuch; -ERROR: relation "nonesuch" does not exist --- no such relation -alter table nonesuch rename to stud_emp; -ERROR: relation "nonesuch" does not exist --- conflict -alter table stud_emp rename to aggtest; -ERROR: relation "aggtest" already exists --- self-conflict -alter table stud_emp rename to stud_emp; -ERROR: relation "stud_emp" already exists --- attribute renaming --- no such relation -alter table nonesuchrel rename column nonesuchatt to newnonesuchatt; -ERROR: relation "nonesuchrel" does not exist --- no such attribute -alter table emp rename column nonesuchatt to newnonesuchatt; -ERROR: column "nonesuchatt" does not exist --- conflict -alter table emp rename column salary to manager; -ERROR: column "manager" of relation "stud_emp" already exists --- conflict -alter table emp rename column salary to ctid; -ERROR: column name "ctid" conflicts with a system column name --- --- TRANSACTION STUFF --- not in a xact -abort; -WARNING: there is no transaction in progress --- not in a xact -end; -WARNING: there is no transaction in progress --- --- CREATE AGGREGATE --- sfunc/finalfunc type disagreement -create aggregate newavg2 (sfunc = int4pl, - basetype = int4, - stype = int4, - finalfunc = int2um, - initcond = '0'); -ERROR: function int2um(integer) does not exist --- left out basetype -create aggregate newcnt1 (sfunc = int4inc, - stype = int4, - initcond = '0'); -ERROR: aggregate input type must be specified --- --- DROP INDEX --- missing index name -drop index; -ERROR: syntax error at or near ";" -LINE 1: drop index; - ^ --- bad index name -drop index 314159; -ERROR: syntax error at or near "314159" -LINE 1: drop index 314159; - ^ --- no such index -drop index nonesuch; -ERROR: index "nonesuch" does not exist --- --- DROP AGGREGATE --- missing aggregate name -drop aggregate; -ERROR: syntax error at or near ";" -LINE 1: drop aggregate; - ^ --- missing aggregate type -drop aggregate newcnt1; -ERROR: syntax error at or near ";" -LINE 1: drop aggregate newcnt1; - ^ --- bad aggregate name -drop aggregate 314159 (int); -ERROR: syntax error at or near "314159" -LINE 1: drop aggregate 314159 (int); - ^ --- bad aggregate type -drop aggregate newcnt (nonesuch); -ERROR: type "nonesuch" does not exist --- no such aggregate -drop aggregate nonesuch (int4); -ERROR: aggregate nonesuch(integer) does not exist --- no such aggregate for type -drop aggregate newcnt (float4); -ERROR: aggregate newcnt(real) does not exist --- --- DROP FUNCTION --- missing function name -drop function (); -ERROR: syntax error at or near "(" -LINE 1: drop function (); - ^ --- bad function name -drop function 314159(); -ERROR: syntax error at or near "314159" -LINE 1: drop function 314159(); - ^ --- no such function -drop function nonesuch(); -ERROR: function nonesuch() does not exist --- --- DROP TYPE --- missing type name -drop type; -ERROR: syntax error at or near ";" -LINE 1: drop type; - ^ --- bad type name -drop type 314159; -ERROR: syntax error at or near "314159" -LINE 1: drop type 314159; - ^ --- no such type -drop type nonesuch; -ERROR: type "nonesuch" does not exist --- --- DROP OPERATOR --- missing everything -drop operator; -ERROR: syntax error at or near ";" -LINE 1: drop operator; - ^ --- bad operator name -drop operator equals; -ERROR: syntax error at or near ";" -LINE 1: drop operator equals; - ^ --- missing type list -drop operator ===; -ERROR: syntax error at or near ";" -LINE 1: drop operator ===; - ^ --- missing parentheses -drop operator int4, int4; -ERROR: syntax error at or near "," -LINE 1: drop operator int4, int4; - ^ --- missing operator name -drop operator (int4, int4); -ERROR: syntax error at or near "(" -LINE 1: drop operator (int4, int4); - ^ --- missing type list contents -drop operator === (); -ERROR: syntax error at or near ")" -LINE 1: drop operator === (); - ^ --- no such operator -drop operator === (int4); -ERROR: missing argument -LINE 1: drop operator === (int4); - ^ -HINT: Use NONE to denote the missing argument of a unary operator. --- no such operator by that name -drop operator === (int4, int4); -ERROR: operator does not exist: integer === integer --- no such type1 -drop operator = (nonesuch); -ERROR: missing argument -LINE 1: drop operator = (nonesuch); - ^ -HINT: Use NONE to denote the missing argument of a unary operator. --- no such type1 -drop operator = ( , int4); -ERROR: syntax error at or near "," -LINE 1: drop operator = ( , int4); - ^ --- no such type1 -drop operator = (nonesuch, int4); -ERROR: type "nonesuch" does not exist --- no such type2 -drop operator = (int4, nonesuch); -ERROR: type "nonesuch" does not exist --- no such type2 -drop operator = (int4, ); -ERROR: syntax error at or near ")" -LINE 1: drop operator = (int4, ); - ^ --- --- DROP RULE --- missing rule name -drop rule; -ERROR: syntax error at or near ";" -LINE 1: drop rule; - ^ --- bad rule name -drop rule 314159; -ERROR: syntax error at or near "314159" -LINE 1: drop rule 314159; - ^ --- no such rule -drop rule nonesuch on noplace; -ERROR: relation "noplace" does not exist --- these postquel variants are no longer supported -drop tuple rule nonesuch; -ERROR: syntax error at or near "tuple" -LINE 1: drop tuple rule nonesuch; - ^ -drop instance rule nonesuch on noplace; -ERROR: syntax error at or near "instance" -LINE 1: drop instance rule nonesuch on noplace; - ^ -drop rewrite rule nonesuch; -ERROR: syntax error at or near "rewrite" -LINE 1: drop rewrite rule nonesuch; - ^ --- --- Check that division-by-zero is properly caught. --- -select 1/0; -ERROR: division by zero -select 1::int8/0; -ERROR: division by zero -select 1/0::int8; -ERROR: division by zero -select 1::int2/0; -ERROR: division by zero -select 1/0::int2; -ERROR: division by zero -select 1::numeric/0; -ERROR: division by zero -select 1/0::numeric; -ERROR: division by zero -select 1::float8/0; -ERROR: division by zero -select 1/0::float8; -ERROR: division by zero -select 1::float4/0; -ERROR: division by zero -select 1/0::float4; -ERROR: division by zero --- --- Test psql's reporting of syntax error location --- -xxx; -ERROR: syntax error at or near "xxx" -LINE 1: xxx; - ^ -CREATE foo; -ERROR: syntax error at or near "foo" -LINE 1: CREATE foo; - ^ -CREATE TABLE ; -ERROR: syntax error at or near ";" -LINE 1: CREATE TABLE ; - ^ -CREATE TABLE -\g -ERROR: syntax error at end of input -LINE 1: CREATE TABLE - ^ -INSERT INTO foo VALUES(123) foo; -ERROR: syntax error at or near "foo" -LINE 1: INSERT INTO foo VALUES(123) foo; - ^ -INSERT INTO 123 -VALUES(123); -ERROR: syntax error at or near "123" -LINE 1: INSERT INTO 123 - ^ -INSERT INTO foo -VALUES(123) 123 -; -ERROR: syntax error at or near "123" -LINE 2: VALUES(123) 123 - ^ --- with a tab -CREATE TABLE foo - (id INT4 UNIQUE NOT NULL, id2 TEXT NOT NULL PRIMARY KEY, - id3 INTEGER NOT NUL, - id4 INT4 UNIQUE NOT NULL, id5 TEXT UNIQUE NOT NULL); -ERROR: syntax error at or near "NUL" -LINE 3: id3 INTEGER NOT NUL, - ^ --- long line to be truncated on the left -CREATE TABLE foo(id INT4 UNIQUE NOT NULL, id2 TEXT NOT NULL PRIMARY KEY, id3 INTEGER NOT NUL, -id4 INT4 UNIQUE NOT NULL, id5 TEXT UNIQUE NOT NULL); -ERROR: syntax error at or near "NUL" -LINE 1: ...OT NULL, id2 TEXT NOT NULL PRIMARY KEY, id3 INTEGER NOT NUL, - ^ --- long line to be truncated on the right -CREATE TABLE foo( -id3 INTEGER NOT NUL, id4 INT4 UNIQUE NOT NULL, id5 TEXT UNIQUE NOT NULL, id INT4 UNIQUE NOT NULL, id2 TEXT NOT NULL PRIMARY KEY); -ERROR: syntax error at or near "NUL" -LINE 2: id3 INTEGER NOT NUL, id4 INT4 UNIQUE NOT NULL, id5 TEXT UNIQ... - ^ --- long line to be truncated both ways -CREATE TABLE foo(id INT4 UNIQUE NOT NULL, id2 TEXT NOT NULL PRIMARY KEY, id3 INTEGER NOT NUL, id4 INT4 UNIQUE NOT NULL, id5 TEXT UNIQUE NOT NULL); -ERROR: syntax error at or near "NUL" -LINE 1: ...L, id2 TEXT NOT NULL PRIMARY KEY, id3 INTEGER NOT NUL, id4 I... - ^ --- long line to be truncated on the left, many lines -CREATE -TEMPORARY -TABLE -foo(id INT4 UNIQUE NOT NULL, id2 TEXT NOT NULL PRIMARY KEY, id3 INTEGER NOT NUL, -id4 INT4 -UNIQUE -NOT -NULL, -id5 TEXT -UNIQUE -NOT -NULL) -; -ERROR: syntax error at or near "NUL" -LINE 4: ...OT NULL, id2 TEXT NOT NULL PRIMARY KEY, id3 INTEGER NOT NUL, - ^ --- long line to be truncated on the right, many lines -CREATE -TEMPORARY -TABLE -foo( -id3 INTEGER NOT NUL, id4 INT4 UNIQUE NOT NULL, id5 TEXT UNIQUE NOT NULL, id INT4 UNIQUE NOT NULL, id2 TEXT NOT NULL PRIMARY KEY) -; -ERROR: syntax error at or near "NUL" -LINE 5: id3 INTEGER NOT NUL, id4 INT4 UNIQUE NOT NULL, id5 TEXT UNIQ... - ^ --- long line to be truncated both ways, many lines -CREATE -TEMPORARY -TABLE -foo -(id -INT4 -UNIQUE NOT NULL, idx INT4 UNIQUE NOT NULL, idy INT4 UNIQUE NOT NULL, id2 TEXT NOT NULL PRIMARY KEY, id3 INTEGER NOT NUL, id4 INT4 UNIQUE NOT NULL, id5 TEXT UNIQUE NOT NULL, -idz INT4 UNIQUE NOT NULL, -idv INT4 UNIQUE NOT NULL); -ERROR: syntax error at or near "NUL" -LINE 7: ...L, id2 TEXT NOT NULL PRIMARY KEY, id3 INTEGER NOT NUL, id4 I... - ^ --- more than 10 lines... -CREATE -TEMPORARY -TABLE -foo -(id -INT4 -UNIQUE -NOT -NULL -, -idm -INT4 -UNIQUE -NOT -NULL, -idx INT4 UNIQUE NOT NULL, idy INT4 UNIQUE NOT NULL, id2 TEXT NOT NULL PRIMARY KEY, id3 INTEGER NOT NUL, id4 INT4 UNIQUE NOT NULL, id5 TEXT UNIQUE NOT NULL, -idz INT4 UNIQUE NOT NULL, -idv -INT4 -UNIQUE -NOT -NULL); -ERROR: syntax error at or near "NUL" -LINE 16: ...L, id2 TEXT NOT NULL PRIMARY KEY, id3 INTEGER NOT NUL, id4 I... - ^ +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/infinite_recurse_1.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/infinite_recurse.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/infinite_recurse_1.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/infinite_recurse.out 2023-02-20 19:45:22.589210024 -0500 @@ -1,16 +1 @@ --- Check that stack depth detection mechanism works and --- max_stack_depth is not set too high. -create function infinite_recurse() returns int as -'select infinite_recurse()' language sql; --- Unfortunately, up till mid 2020 the Linux kernel had a bug in PPC64 --- signal handling that would cause this test to crash if it happened --- to receive an sinval catchup interrupt while the stack is deep: --- https://bugzilla.kernel.org/show_bug.cgi?id=205183 --- It is likely to be many years before that bug disappears from all --- production kernels, so disable this test on such platforms. --- (We still create the function, so as not to have a cross-platform --- difference in the end state of the regression database.) -SELECT version() ~ 'powerpc64[^,]*-linux-gnu' - AS skip_test \gset -\if :skip_test -\quit +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/sanity_check.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/sanity_check.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/sanity_check.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/sanity_check.out 2023-02-20 19:45:32.289210440 -0500 @@ -11,64 +11,40 @@ FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = relnamespace WHERE relkind IN ('r', 'p') AND (nspname ~ '^pg_temp_') IS NOT TRUE ORDER BY relname; -a|f a_star|f aggtest|f array_index_op_test|t array_op_test|f -b|f b_star|f -bit_defaults|f -box_tbl|f +booltbl1|f +booltbl2|f bprime|f bt_f8_heap|t bt_i4_heap|t bt_name_heap|t bt_txt_heap|t -c|f c_star|f char_tbl|f -check2_tbl|f -check_tbl|f -circle_tbl|t city|f -copy_tbl|f -d|f d_star|f -date_tbl|f -default_tbl|f -defaultexpr_tbl|f dept|f -dupindexcols|t e_star|f emp|f equipment_r|f extra_wide_table|f f_star|f fast_emp4000|t -float4_tbl|f float8_tbl|f -func_index_heap|t -hash_f8_heap|t -hash_i4_heap|t -hash_name_heap|t -hash_txt_heap|t +hash_f8_heap|f +hash_i4_heap|f +hash_name_heap|f +hash_txt_heap|f hobbies_r|f ihighway|t -inet_tbl|f -insert_tbl|f -int2_tbl|f -int4_tbl|f -int8_tbl|f -interval_tbl|f -invalid_check_con|f -invalid_check_con_child|f iportaltest|f kd_point_tbl|t line_tbl|f -log_table|f lseg_tbl|f -main_table|f mlparted|f mlparted1|f mlparted11|f @@ -81,26 +57,10 @@ mlparted_def2|f mlparted_defd|f money_data|f -num_data|f -num_exp_add|t -num_exp_div|t -num_exp_ln|t -num_exp_log10|t -num_exp_mul|t -num_exp_power_10_ln|t -num_exp_sqrt|t -num_exp_sub|t -num_input_test|f -num_result|f -nummultirange_test|t numrange_test|t onek|t onek2|t -path_tbl|f person|f -persons|f -persons2|t -persons3|t pg_aggregate|t pg_am|t pg_amop|t @@ -164,16 +124,10 @@ pg_type|t pg_user_mapping|t point_tbl|t -polygon_tbl|t -quad_box_tbl|t -quad_box_tbl_ord_seq1|f -quad_box_tbl_ord_seq2|f quad_point_tbl|t -quad_poly_tbl|t radix_text_tbl|t ramp|f real_city|f -reservations|f road|t shighway|t slow_emp4000|f @@ -184,13 +138,7 @@ stud_emp|f student|f tab_core_types|f -tableam_parted_a_heap2|f -tableam_parted_b_heap2|f -tableam_parted_c_heap2|f -tableam_parted_d_heap2|f -tableam_parted_heap2|f -tableam_tbl_heap2|f -tableam_tblas_heap2|f +tbl_gist|t tbl_include_box|t tbl_include_box_pk|f tbl_include_pk|t @@ -206,16 +154,6 @@ testjsonb|f text_tbl|f textrange_test|t -time_tbl|f -timestamp_tbl|f -timestamptz_tbl|f -timetz_tbl|f -tmp|f -trigger_parted|t -trigger_parted_p1|t -trigger_parted_p1_1|t -trigger_parted_p2|t -trigger_parted_p2_2|t varchar_tbl|f view_base_table|t -- restore normal output mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/select_into.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/select_into.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/select_into.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/select_into.out 2023-02-20 19:45:33.689210500 -0500 @@ -134,22 +134,18 @@ AS $$ CREATE TABLE created_table AS SELECT * FROM int8_tbl; $$ LANGUAGE SQL; +ERROR: relation "int8_tbl" does not exist +LINE 3: CREATE TABLE created_table AS SELECT * FROM int8_tbl; + ^ SELECT make_table(); - make_table ------------- - -(1 row) - +ERROR: function make_table() does not exist +LINE 1: SELECT make_table(); + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. SELECT * FROM created_table; - q1 | q2 -------------------+------------------- - 123 | 456 - 123 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(5 rows) - +ERROR: relation "created_table" does not exist +LINE 1: SELECT * FROM created_table; + ^ -- Try EXPLAIN ANALYZE SELECT INTO and EXPLAIN ANALYZE CREATE TABLE AS -- WITH NO DATA, but hide the outputs since they won't be stable. DO $$ @@ -157,8 +153,15 @@ EXECUTE 'EXPLAIN ANALYZE SELECT * INTO TABLE easi FROM int8_tbl'; EXECUTE 'EXPLAIN ANALYZE CREATE TABLE easi2 AS SELECT * FROM int8_tbl WITH NO DATA'; END$$; +ERROR: relation "int8_tbl" does not exist +LINE 1: EXPLAIN ANALYZE SELECT * INTO TABLE easi FROM int8_tbl + ^ +QUERY: EXPLAIN ANALYZE SELECT * INTO TABLE easi FROM int8_tbl +CONTEXT: PL/pgSQL function inline_code_block line 3 at EXECUTE DROP TABLE created_table; +ERROR: table "created_table" does not exist DROP TABLE easi, easi2; +ERROR: table "easi" does not exist -- -- Disallowed uses of SELECT ... INTO. All should fail -- @@ -175,9 +178,9 @@ CREATE VIEW foo AS SELECT 1 INTO b; ERROR: views must not contain SELECT INTO INSERT INTO b SELECT 1 INTO f; -ERROR: SELECT ... INTO is not allowed here +ERROR: relation "b" does not exist LINE 1: INSERT INTO b SELECT 1 INTO f; - ^ + ^ -- Test CREATE TABLE AS ... IF NOT EXISTS CREATE TABLE ctas_ine_tbl AS SELECT 1; CREATE TABLE ctas_ine_tbl AS SELECT 1 / 0; -- error diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/select_distinct.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/select_distinct.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/select_distinct.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/select_distinct.out 2023-02-20 19:45:45.649211014 -0500 @@ -5,42 +5,23 @@ -- awk '{print $3;}' onek.data | sort -n | uniq -- SELECT DISTINCT two FROM tmp ORDER BY 1; - two ------ - 0 - 1 -(2 rows) - +ERROR: relation "tmp" does not exist +LINE 1: SELECT DISTINCT two FROM tmp ORDER BY 1; + ^ -- -- awk '{print $5;}' onek.data | sort -n | uniq -- SELECT DISTINCT ten FROM tmp ORDER BY 1; - ten ------ - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 -(10 rows) - +ERROR: relation "tmp" does not exist +LINE 1: SELECT DISTINCT ten FROM tmp ORDER BY 1; + ^ -- -- awk '{print $16;}' onek.data | sort -d | uniq -- SELECT DISTINCT string4 FROM tmp ORDER BY 1; - string4 ---------- - AAAAxx - HHHHxx - OOOOxx - VVVVxx -(4 rows) - +ERROR: relation "tmp" does not exist +LINE 1: SELECT DISTINCT string4 FROM tmp ORDER BY 1; + ^ -- -- awk '{print $3,$16,$5;}' onek.data | sort -d | uniq | -- sort +0n -1 +1d -2 +2n -3 @@ -48,50 +29,9 @@ SELECT DISTINCT two, string4, ten FROM tmp ORDER BY two using <, string4 using <, ten using <; - two | string4 | ten ------+---------+----- - 0 | AAAAxx | 0 - 0 | AAAAxx | 2 - 0 | AAAAxx | 4 - 0 | AAAAxx | 6 - 0 | AAAAxx | 8 - 0 | HHHHxx | 0 - 0 | HHHHxx | 2 - 0 | HHHHxx | 4 - 0 | HHHHxx | 6 - 0 | HHHHxx | 8 - 0 | OOOOxx | 0 - 0 | OOOOxx | 2 - 0 | OOOOxx | 4 - 0 | OOOOxx | 6 - 0 | OOOOxx | 8 - 0 | VVVVxx | 0 - 0 | VVVVxx | 2 - 0 | VVVVxx | 4 - 0 | VVVVxx | 6 - 0 | VVVVxx | 8 - 1 | AAAAxx | 1 - 1 | AAAAxx | 3 - 1 | AAAAxx | 5 - 1 | AAAAxx | 7 - 1 | AAAAxx | 9 - 1 | HHHHxx | 1 - 1 | HHHHxx | 3 - 1 | HHHHxx | 5 - 1 | HHHHxx | 7 - 1 | HHHHxx | 9 - 1 | OOOOxx | 1 - 1 | OOOOxx | 3 - 1 | OOOOxx | 5 - 1 | OOOOxx | 7 - 1 | OOOOxx | 9 - 1 | VVVVxx | 1 - 1 | VVVVxx | 3 - 1 | VVVVxx | 5 - 1 | VVVVxx | 7 - 1 | VVVVxx | 9 -(40 rows) - +ERROR: relation "tmp" does not exist +LINE 2: FROM tmp + ^ -- -- awk '{print $2;}' person.data | -- awk '{if(NF!=1){print $2;}else{print;}}' - emp.data | @@ -168,141 +108,7 @@ CREATE TABLE distinct_group_1 AS SELECT DISTINCT g%1000 FROM generate_series(0,9999) g; -SET jit_above_cost TO DEFAULT; -CREATE TABLE distinct_group_2 AS -SELECT DISTINCT (g%1000)::text FROM generate_series(0,9999) g; -SET enable_hashagg=TRUE; --- Produce results with hash aggregation. -SET enable_sort=FALSE; -SET jit_above_cost=0; -EXPLAIN (costs off) -SELECT DISTINCT g%1000 FROM generate_series(0,9999) g; - QUERY PLAN ------------------------------------------- - HashAggregate - Group Key: (g % 1000) - -> Function Scan on generate_series g -(3 rows) - -CREATE TABLE distinct_hash_1 AS -SELECT DISTINCT g%1000 FROM generate_series(0,9999) g; -SET jit_above_cost TO DEFAULT; -CREATE TABLE distinct_hash_2 AS -SELECT DISTINCT (g%1000)::text FROM generate_series(0,9999) g; -SET enable_sort=TRUE; -SET work_mem TO DEFAULT; --- Compare results -(SELECT * FROM distinct_hash_1 EXCEPT SELECT * FROM distinct_group_1) - UNION ALL -(SELECT * FROM distinct_group_1 EXCEPT SELECT * FROM distinct_hash_1); - ?column? ----------- -(0 rows) - -(SELECT * FROM distinct_hash_1 EXCEPT SELECT * FROM distinct_group_1) - UNION ALL -(SELECT * FROM distinct_group_1 EXCEPT SELECT * FROM distinct_hash_1); - ?column? ----------- -(0 rows) - -DROP TABLE distinct_hash_1; -DROP TABLE distinct_hash_2; -DROP TABLE distinct_group_1; -DROP TABLE distinct_group_2; --- --- Also, some tests of IS DISTINCT FROM, which doesn't quite deserve its --- very own regression file. --- -CREATE TEMP TABLE disttable (f1 integer); -INSERT INTO DISTTABLE VALUES(1); -INSERT INTO DISTTABLE VALUES(2); -INSERT INTO DISTTABLE VALUES(3); -INSERT INTO DISTTABLE VALUES(NULL); --- basic cases -SELECT f1, f1 IS DISTINCT FROM 2 as "not 2" FROM disttable; - f1 | not 2 -----+------- - 1 | t - 2 | f - 3 | t - | t -(4 rows) - -SELECT f1, f1 IS DISTINCT FROM NULL as "not null" FROM disttable; - f1 | not null -----+---------- - 1 | t - 2 | t - 3 | t - | f -(4 rows) - -SELECT f1, f1 IS DISTINCT FROM f1 as "false" FROM disttable; - f1 | false -----+------- - 1 | f - 2 | f - 3 | f - | f -(4 rows) - -SELECT f1, f1 IS DISTINCT FROM f1+1 as "not null" FROM disttable; - f1 | not null -----+---------- - 1 | t - 2 | t - 3 | t - | f -(4 rows) - --- check that optimizer constant-folds it properly -SELECT 1 IS DISTINCT FROM 2 as "yes"; - yes ------ - t -(1 row) - -SELECT 2 IS DISTINCT FROM 2 as "no"; - no ----- - f -(1 row) - -SELECT 2 IS DISTINCT FROM null as "yes"; - yes ------ - t -(1 row) - -SELECT null IS DISTINCT FROM null as "no"; - no ----- - f -(1 row) - --- negated form -SELECT 1 IS NOT DISTINCT FROM 2 as "no"; - no ----- - f -(1 row) - -SELECT 2 IS NOT DISTINCT FROM 2 as "yes"; - yes ------ - t -(1 row) - -SELECT 2 IS NOT DISTINCT FROM null as "no"; - no ----- - f -(1 row) - -SELECT null IS NOT DISTINCT FROM null as "yes"; - yes ------ - t -(1 row) - +server closed the connection unexpectedly + This probably means the server terminated abnormally + before or while processing the request. +connection to server was lost diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/select_distinct_on.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/select_distinct_on.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/select_distinct_on.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/select_distinct_on.out 2023-02-20 19:45:33.119210476 -0500 @@ -4,72 +4,24 @@ SELECT DISTINCT ON (string4) string4, two, ten FROM tmp ORDER BY string4 using <, two using >, ten using <; - string4 | two | ten ----------+-----+----- - AAAAxx | 1 | 1 - HHHHxx | 1 | 1 - OOOOxx | 1 | 1 - VVVVxx | 1 | 1 -(4 rows) - +ERROR: relation "tmp" does not exist +LINE 2: FROM tmp + ^ -- this will fail due to conflict of ordering requirements SELECT DISTINCT ON (string4, ten) string4, two, ten FROM tmp ORDER BY string4 using <, two using <, ten using <; -ERROR: SELECT DISTINCT ON expressions must match initial ORDER BY expressions -LINE 1: SELECT DISTINCT ON (string4, ten) string4, two, ten - ^ +ERROR: relation "tmp" does not exist +LINE 2: FROM tmp + ^ SELECT DISTINCT ON (string4, ten) string4, ten, two FROM tmp ORDER BY string4 using <, ten using >, two using <; - string4 | ten | two ----------+-----+----- - AAAAxx | 9 | 1 - AAAAxx | 8 | 0 - AAAAxx | 7 | 1 - AAAAxx | 6 | 0 - AAAAxx | 5 | 1 - AAAAxx | 4 | 0 - AAAAxx | 3 | 1 - AAAAxx | 2 | 0 - AAAAxx | 1 | 1 - AAAAxx | 0 | 0 - HHHHxx | 9 | 1 - HHHHxx | 8 | 0 - HHHHxx | 7 | 1 - HHHHxx | 6 | 0 - HHHHxx | 5 | 1 - HHHHxx | 4 | 0 - HHHHxx | 3 | 1 - HHHHxx | 2 | 0 - HHHHxx | 1 | 1 - HHHHxx | 0 | 0 - OOOOxx | 9 | 1 - OOOOxx | 8 | 0 - OOOOxx | 7 | 1 - OOOOxx | 6 | 0 - OOOOxx | 5 | 1 - OOOOxx | 4 | 0 - OOOOxx | 3 | 1 - OOOOxx | 2 | 0 - OOOOxx | 1 | 1 - OOOOxx | 0 | 0 - VVVVxx | 9 | 1 - VVVVxx | 8 | 0 - VVVVxx | 7 | 1 - VVVVxx | 6 | 0 - VVVVxx | 5 | 1 - VVVVxx | 4 | 0 - VVVVxx | 3 | 1 - VVVVxx | 2 | 0 - VVVVxx | 1 | 1 - VVVVxx | 0 | 0 -(40 rows) - +ERROR: relation "tmp" does not exist +LINE 2: FROM tmp + ^ -- bug #5049: early 8.4.x chokes on volatile DISTINCT ON clauses select distinct on (1) floor(random()) as r, f1 from int4_tbl order by 1,2; - r | f1 ----+------------- - 0 | -2147483647 -(1 row) - +ERROR: relation "int4_tbl" does not exist +LINE 1: ...ect distinct on (1) floor(random()) as r, f1 from int4_tbl o... + ^ diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/subselect.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/subselect.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/subselect.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/subselect.out 2023-02-20 19:45:46.279211041 -0500 @@ -1,1859 +1 @@ --- --- SUBSELECT --- -SELECT 1 AS one WHERE 1 IN (SELECT 1); - one ------ - 1 -(1 row) - -SELECT 1 AS zero WHERE 1 NOT IN (SELECT 1); - zero ------- -(0 rows) - -SELECT 1 AS zero WHERE 1 IN (SELECT 2); - zero ------- -(0 rows) - --- Check grammar's handling of extra parens in assorted contexts -SELECT * FROM (SELECT 1 AS x) ss; - x ---- - 1 -(1 row) - -SELECT * FROM ((SELECT 1 AS x)) ss; - x ---- - 1 -(1 row) - -(SELECT 2) UNION SELECT 2; - ?column? ----------- - 2 -(1 row) - -((SELECT 2)) UNION SELECT 2; - ?column? ----------- - 2 -(1 row) - -SELECT ((SELECT 2) UNION SELECT 2); - ?column? ----------- - 2 -(1 row) - -SELECT (((SELECT 2)) UNION SELECT 2); - ?column? ----------- - 2 -(1 row) - -SELECT (SELECT ARRAY[1,2,3])[1]; - array -------- - 1 -(1 row) - -SELECT ((SELECT ARRAY[1,2,3]))[2]; - array -------- - 2 -(1 row) - -SELECT (((SELECT ARRAY[1,2,3])))[3]; - array -------- - 3 -(1 row) - --- Set up some simple test tables -CREATE TABLE SUBSELECT_TBL ( - f1 integer, - f2 integer, - f3 float -); -INSERT INTO SUBSELECT_TBL VALUES (1, 2, 3); -INSERT INTO SUBSELECT_TBL VALUES (2, 3, 4); -INSERT INTO SUBSELECT_TBL VALUES (3, 4, 5); -INSERT INTO SUBSELECT_TBL VALUES (1, 1, 1); -INSERT INTO SUBSELECT_TBL VALUES (2, 2, 2); -INSERT INTO SUBSELECT_TBL VALUES (3, 3, 3); -INSERT INTO SUBSELECT_TBL VALUES (6, 7, 8); -INSERT INTO SUBSELECT_TBL VALUES (8, 9, NULL); -SELECT * FROM SUBSELECT_TBL; - f1 | f2 | f3 -----+----+---- - 1 | 2 | 3 - 2 | 3 | 4 - 3 | 4 | 5 - 1 | 1 | 1 - 2 | 2 | 2 - 3 | 3 | 3 - 6 | 7 | 8 - 8 | 9 | -(8 rows) - --- Uncorrelated subselects -SELECT f1 AS "Constant Select" FROM SUBSELECT_TBL - WHERE f1 IN (SELECT 1); - Constant Select ------------------ - 1 - 1 -(2 rows) - -SELECT f1 AS "Uncorrelated Field" FROM SUBSELECT_TBL - WHERE f1 IN (SELECT f2 FROM SUBSELECT_TBL); - Uncorrelated Field --------------------- - 1 - 2 - 3 - 1 - 2 - 3 -(6 rows) - -SELECT f1 AS "Uncorrelated Field" FROM SUBSELECT_TBL - WHERE f1 IN (SELECT f2 FROM SUBSELECT_TBL WHERE - f2 IN (SELECT f1 FROM SUBSELECT_TBL)); - Uncorrelated Field --------------------- - 1 - 2 - 3 - 1 - 2 - 3 -(6 rows) - -SELECT f1, f2 - FROM SUBSELECT_TBL - WHERE (f1, f2) NOT IN (SELECT f2, CAST(f3 AS int4) FROM SUBSELECT_TBL - WHERE f3 IS NOT NULL); - f1 | f2 -----+---- - 1 | 2 - 6 | 7 - 8 | 9 -(3 rows) - --- Correlated subselects -SELECT f1 AS "Correlated Field", f2 AS "Second Field" - FROM SUBSELECT_TBL upper - WHERE f1 IN (SELECT f2 FROM SUBSELECT_TBL WHERE f1 = upper.f1); - Correlated Field | Second Field -------------------+-------------- - 1 | 2 - 2 | 3 - 3 | 4 - 1 | 1 - 2 | 2 - 3 | 3 -(6 rows) - -SELECT f1 AS "Correlated Field", f3 AS "Second Field" - FROM SUBSELECT_TBL upper - WHERE f1 IN - (SELECT f2 FROM SUBSELECT_TBL WHERE CAST(upper.f2 AS float) = f3); - Correlated Field | Second Field -------------------+-------------- - 2 | 4 - 3 | 5 - 1 | 1 - 2 | 2 - 3 | 3 -(5 rows) - -SELECT f1 AS "Correlated Field", f3 AS "Second Field" - FROM SUBSELECT_TBL upper - WHERE f3 IN (SELECT upper.f1 + f2 FROM SUBSELECT_TBL - WHERE f2 = CAST(f3 AS integer)); - Correlated Field | Second Field -------------------+-------------- - 1 | 3 - 2 | 4 - 3 | 5 - 6 | 8 -(4 rows) - -SELECT f1 AS "Correlated Field" - FROM SUBSELECT_TBL - WHERE (f1, f2) IN (SELECT f2, CAST(f3 AS int4) FROM SUBSELECT_TBL - WHERE f3 IS NOT NULL); - Correlated Field ------------------- - 2 - 3 - 1 - 2 - 3 -(5 rows) - --- --- Use some existing tables in the regression test --- -SELECT ss.f1 AS "Correlated Field", ss.f3 AS "Second Field" - FROM SUBSELECT_TBL ss - WHERE f1 NOT IN (SELECT f1+1 FROM INT4_TBL - WHERE f1 != ss.f1 AND f1 < 2147483647); - Correlated Field | Second Field -------------------+-------------- - 2 | 4 - 3 | 5 - 2 | 2 - 3 | 3 - 6 | 8 - 8 | -(6 rows) - -select q1, float8(count(*)) / (select count(*) from int8_tbl) -from int8_tbl group by q1 order by q1; - q1 | ?column? -------------------+---------- - 123 | 0.4 - 4567890123456789 | 0.6 -(2 rows) - --- Unspecified-type literals in output columns should resolve as text -SELECT *, pg_typeof(f1) FROM - (SELECT 'foo' AS f1 FROM generate_series(1,3)) ss ORDER BY 1; - f1 | pg_typeof ------+----------- - foo | text - foo | text - foo | text -(3 rows) - --- ... unless there's context to suggest differently -explain (verbose, costs off) select '42' union all select '43'; - QUERY PLAN ----------------------------- - Append - -> Result - Output: '42'::text - -> Result - Output: '43'::text -(5 rows) - -explain (verbose, costs off) select '42' union all select 43; - QUERY PLAN --------------------- - Append - -> Result - Output: 42 - -> Result - Output: 43 -(5 rows) - --- check materialization of an initplan reference (bug #14524) -explain (verbose, costs off) -select 1 = all (select (select 1)); - QUERY PLAN ------------------------------------ - Result - Output: (SubPlan 2) - SubPlan 2 - -> Materialize - Output: ($0) - InitPlan 1 (returns $0) - -> Result - Output: 1 - -> Result - Output: $0 -(10 rows) - -select 1 = all (select (select 1)); - ?column? ----------- - t -(1 row) - --- --- Check EXISTS simplification with LIMIT --- -explain (costs off) -select * from int4_tbl o where exists - (select 1 from int4_tbl i where i.f1=o.f1 limit null); - QUERY PLAN ------------------------------------- - Hash Semi Join - Hash Cond: (o.f1 = i.f1) - -> Seq Scan on int4_tbl o - -> Hash - -> Seq Scan on int4_tbl i -(5 rows) - -explain (costs off) -select * from int4_tbl o where not exists - (select 1 from int4_tbl i where i.f1=o.f1 limit 1); - QUERY PLAN ------------------------------------- - Hash Anti Join - Hash Cond: (o.f1 = i.f1) - -> Seq Scan on int4_tbl o - -> Hash - -> Seq Scan on int4_tbl i -(5 rows) - -explain (costs off) -select * from int4_tbl o where exists - (select 1 from int4_tbl i where i.f1=o.f1 limit 0); - QUERY PLAN --------------------------------------- - Seq Scan on int4_tbl o - Filter: (SubPlan 1) - SubPlan 1 - -> Limit - -> Seq Scan on int4_tbl i - Filter: (f1 = o.f1) -(6 rows) - --- --- Test cases to catch unpleasant interactions between IN-join processing --- and subquery pullup. --- -select count(*) from - (select 1 from tenk1 a - where unique1 IN (select hundred from tenk1 b)) ss; - count -------- - 100 -(1 row) - -select count(distinct ss.ten) from - (select ten from tenk1 a - where unique1 IN (select hundred from tenk1 b)) ss; - count -------- - 10 -(1 row) - -select count(*) from - (select 1 from tenk1 a - where unique1 IN (select distinct hundred from tenk1 b)) ss; - count -------- - 100 -(1 row) - -select count(distinct ss.ten) from - (select ten from tenk1 a - where unique1 IN (select distinct hundred from tenk1 b)) ss; - count -------- - 10 -(1 row) - --- --- Test cases to check for overenthusiastic optimization of --- "IN (SELECT DISTINCT ...)" and related cases. Per example from --- Luca Pireddu and Michael Fuhr. --- -CREATE TEMP TABLE foo (id integer); -CREATE TEMP TABLE bar (id1 integer, id2 integer); -INSERT INTO foo VALUES (1); -INSERT INTO bar VALUES (1, 1); -INSERT INTO bar VALUES (2, 2); -INSERT INTO bar VALUES (3, 1); --- These cases require an extra level of distinct-ing above subquery s -SELECT * FROM foo WHERE id IN - (SELECT id2 FROM (SELECT DISTINCT id1, id2 FROM bar) AS s); - id ----- - 1 -(1 row) - -SELECT * FROM foo WHERE id IN - (SELECT id2 FROM (SELECT id1,id2 FROM bar GROUP BY id1,id2) AS s); - id ----- - 1 -(1 row) - -SELECT * FROM foo WHERE id IN - (SELECT id2 FROM (SELECT id1, id2 FROM bar UNION - SELECT id1, id2 FROM bar) AS s); - id ----- - 1 -(1 row) - --- These cases do not -SELECT * FROM foo WHERE id IN - (SELECT id2 FROM (SELECT DISTINCT ON (id2) id1, id2 FROM bar) AS s); - id ----- - 1 -(1 row) - -SELECT * FROM foo WHERE id IN - (SELECT id2 FROM (SELECT id2 FROM bar GROUP BY id2) AS s); - id ----- - 1 -(1 row) - -SELECT * FROM foo WHERE id IN - (SELECT id2 FROM (SELECT id2 FROM bar UNION - SELECT id2 FROM bar) AS s); - id ----- - 1 -(1 row) - --- --- Test case to catch problems with multiply nested sub-SELECTs not getting --- recalculated properly. Per bug report from Didier Moens. --- -CREATE TABLE orderstest ( - approver_ref integer, - po_ref integer, - ordercanceled boolean -); -INSERT INTO orderstest VALUES (1, 1, false); -INSERT INTO orderstest VALUES (66, 5, false); -INSERT INTO orderstest VALUES (66, 6, false); -INSERT INTO orderstest VALUES (66, 7, false); -INSERT INTO orderstest VALUES (66, 1, true); -INSERT INTO orderstest VALUES (66, 8, false); -INSERT INTO orderstest VALUES (66, 1, false); -INSERT INTO orderstest VALUES (77, 1, false); -INSERT INTO orderstest VALUES (1, 1, false); -INSERT INTO orderstest VALUES (66, 1, false); -INSERT INTO orderstest VALUES (1, 1, false); -CREATE VIEW orders_view AS -SELECT *, -(SELECT CASE - WHEN ord.approver_ref=1 THEN '---' ELSE 'Approved' - END) AS "Approved", -(SELECT CASE - WHEN ord.ordercanceled - THEN 'Canceled' - ELSE - (SELECT CASE - WHEN ord.po_ref=1 - THEN - (SELECT CASE - WHEN ord.approver_ref=1 - THEN '---' - ELSE 'Approved' - END) - ELSE 'PO' - END) -END) AS "Status", -(CASE - WHEN ord.ordercanceled - THEN 'Canceled' - ELSE - (CASE - WHEN ord.po_ref=1 - THEN - (CASE - WHEN ord.approver_ref=1 - THEN '---' - ELSE 'Approved' - END) - ELSE 'PO' - END) -END) AS "Status_OK" -FROM orderstest ord; -SELECT * FROM orders_view; - approver_ref | po_ref | ordercanceled | Approved | Status | Status_OK ---------------+--------+---------------+----------+----------+----------- - 1 | 1 | f | --- | --- | --- - 66 | 5 | f | Approved | PO | PO - 66 | 6 | f | Approved | PO | PO - 66 | 7 | f | Approved | PO | PO - 66 | 1 | t | Approved | Canceled | Canceled - 66 | 8 | f | Approved | PO | PO - 66 | 1 | f | Approved | Approved | Approved - 77 | 1 | f | Approved | Approved | Approved - 1 | 1 | f | --- | --- | --- - 66 | 1 | f | Approved | Approved | Approved - 1 | 1 | f | --- | --- | --- -(11 rows) - -DROP TABLE orderstest cascade; -NOTICE: drop cascades to view orders_view --- --- Test cases to catch situations where rule rewriter fails to propagate --- hasSubLinks flag correctly. Per example from Kyle Bateman. --- -create temp table parts ( - partnum text, - cost float8 -); -create temp table shipped ( - ttype char(2), - ordnum int4, - partnum text, - value float8 -); -create temp view shipped_view as - select * from shipped where ttype = 'wt'; -create rule shipped_view_insert as on insert to shipped_view do instead - insert into shipped values('wt', new.ordnum, new.partnum, new.value); -insert into parts (partnum, cost) values (1, 1234.56); -insert into shipped_view (ordnum, partnum, value) - values (0, 1, (select cost from parts where partnum = '1')); -select * from shipped_view; - ttype | ordnum | partnum | value --------+--------+---------+--------- - wt | 0 | 1 | 1234.56 -(1 row) - -create rule shipped_view_update as on update to shipped_view do instead - update shipped set partnum = new.partnum, value = new.value - where ttype = new.ttype and ordnum = new.ordnum; -update shipped_view set value = 11 - from int4_tbl a join int4_tbl b - on (a.f1 = (select f1 from int4_tbl c where c.f1=b.f1)) - where ordnum = a.f1; -select * from shipped_view; - ttype | ordnum | partnum | value --------+--------+---------+------- - wt | 0 | 1 | 11 -(1 row) - -select f1, ss1 as relabel from - (select *, (select sum(f1) from int4_tbl b where f1 >= a.f1) as ss1 - from int4_tbl a) ss; - f1 | relabel --------------+------------ - 0 | 2147607103 - 123456 | 2147607103 - -123456 | 2147483647 - 2147483647 | 2147483647 - -2147483647 | 0 -(5 rows) - --- --- Test cases involving PARAM_EXEC parameters and min/max index optimizations. --- Per bug report from David Sanchez i Gregori. --- -select * from ( - select max(unique1) from tenk1 as a - where exists (select 1 from tenk1 as b where b.thousand = a.unique2) -) ss; - max ------- - 9997 -(1 row) - -select * from ( - select min(unique1) from tenk1 as a - where not exists (select 1 from tenk1 as b where b.unique2 = 10000) -) ss; - min ------ - 0 -(1 row) - --- --- Test that an IN implemented using a UniquePath does unique-ification --- with the right semantics, as per bug #4113. (Unfortunately we have --- no simple way to ensure that this test case actually chooses that type --- of plan, but it does in releases 7.4-8.3. Note that an ordering difference --- here might mean that some other plan type is being used, rendering the test --- pointless.) --- -create temp table numeric_table (num_col numeric); -insert into numeric_table values (1), (1.000000000000000000001), (2), (3); -create temp table float_table (float_col float8); -insert into float_table values (1), (2), (3); -select * from float_table - where float_col in (select num_col from numeric_table); - float_col ------------ - 1 - 2 - 3 -(3 rows) - -select * from numeric_table - where num_col in (select float_col from float_table); - num_col -------------------------- - 1 - 1.000000000000000000001 - 2 - 3 -(4 rows) - --- --- Test case for bug #4290: bogus calculation of subplan param sets --- -create temp table ta (id int primary key, val int); -insert into ta values(1,1); -insert into ta values(2,2); -create temp table tb (id int primary key, aval int); -insert into tb values(1,1); -insert into tb values(2,1); -insert into tb values(3,2); -insert into tb values(4,2); -create temp table tc (id int primary key, aid int); -insert into tc values(1,1); -insert into tc values(2,2); -select - ( select min(tb.id) from tb - where tb.aval = (select ta.val from ta where ta.id = tc.aid) ) as min_tb_id -from tc; - min_tb_id ------------ - 1 - 3 -(2 rows) - --- --- Test case for 8.3 "failed to locate grouping columns" bug --- -create temp table t1 (f1 numeric(14,0), f2 varchar(30)); -select * from - (select distinct f1, f2, (select f2 from t1 x where x.f1 = up.f1) as fs - from t1 up) ss -group by f1,f2,fs; - f1 | f2 | fs -----+----+---- -(0 rows) - --- --- Test case for bug #5514 (mishandling of whole-row Vars in subselects) --- -create temp table table_a(id integer); -insert into table_a values (42); -create temp view view_a as select * from table_a; -select view_a from view_a; - view_a --------- - (42) -(1 row) - -select (select view_a) from view_a; - view_a --------- - (42) -(1 row) - -select (select (select view_a)) from view_a; - view_a --------- - (42) -(1 row) - -select (select (a.*)::text) from view_a a; - a ------- - (42) -(1 row) - --- --- Check that whole-row Vars reading the result of a subselect don't include --- any junk columns therein --- -select q from (select max(f1) from int4_tbl group by f1 order by f1) q; - q ---------------- - (-2147483647) - (-123456) - (0) - (123456) - (2147483647) -(5 rows) - -with q as (select max(f1) from int4_tbl group by f1 order by f1) - select q from q; - q ---------------- - (-2147483647) - (-123456) - (0) - (123456) - (2147483647) -(5 rows) - --- --- Test case for sublinks pulled up into joinaliasvars lists in an --- inherited update/delete query --- -begin; -- this shouldn't delete anything, but be safe -delete from road -where exists ( - select 1 - from - int4_tbl cross join - ( select f1, array(select q1 from int8_tbl) as arr - from text_tbl ) ss - where road.name = ss.f1 ); -rollback; --- --- Test case for sublinks pushed down into subselects via join alias expansion --- -select - (select sq1) as qq1 -from - (select exists(select 1 from int4_tbl where f1 = q2) as sq1, 42 as dummy - from int8_tbl) sq0 - join - int4_tbl i4 on dummy = i4.f1; - qq1 ------ -(0 rows) - --- --- Test case for subselect within UPDATE of INSERT...ON CONFLICT DO UPDATE --- -create temp table upsert(key int4 primary key, val text); -insert into upsert values(1, 'val') on conflict (key) do update set val = 'not seen'; -insert into upsert values(1, 'val') on conflict (key) do update set val = 'seen with subselect ' || (select f1 from int4_tbl where f1 != 0 limit 1)::text; -select * from upsert; - key | val ------+---------------------------- - 1 | seen with subselect 123456 -(1 row) - -with aa as (select 'int4_tbl' u from int4_tbl limit 1) -insert into upsert values (1, 'x'), (999, 'y') -on conflict (key) do update set val = (select u from aa) -returning *; - key | val ------+---------- - 1 | int4_tbl - 999 | y -(2 rows) - --- --- Test case for cross-type partial matching in hashed subplan (bug #7597) --- -create temp table outer_7597 (f1 int4, f2 int4); -insert into outer_7597 values (0, 0); -insert into outer_7597 values (1, 0); -insert into outer_7597 values (0, null); -insert into outer_7597 values (1, null); -create temp table inner_7597(c1 int8, c2 int8); -insert into inner_7597 values(0, null); -select * from outer_7597 where (f1, f2) not in (select * from inner_7597); - f1 | f2 -----+---- - 1 | 0 - 1 | -(2 rows) - --- --- Similar test case using text that verifies that collation --- information is passed through by execTuplesEqual() in nodeSubplan.c --- (otherwise it would error in texteq()) --- -create temp table outer_text (f1 text, f2 text); -insert into outer_text values ('a', 'a'); -insert into outer_text values ('b', 'a'); -insert into outer_text values ('a', null); -insert into outer_text values ('b', null); -create temp table inner_text (c1 text, c2 text); -insert into inner_text values ('a', null); -insert into inner_text values ('123', '456'); -select * from outer_text where (f1, f2) not in (select * from inner_text); - f1 | f2 -----+---- - b | a - b | -(2 rows) - --- --- Another test case for cross-type hashed subplans: comparison of --- inner-side values must be done with appropriate operator --- -explain (verbose, costs off) -select 'foo'::text in (select 'bar'::name union all select 'bar'::name); - QUERY PLAN -------------------------------------- - Result - Output: (hashed SubPlan 1) - SubPlan 1 - -> Append - -> Result - Output: 'bar'::name - -> Result - Output: 'bar'::name -(8 rows) - -select 'foo'::text in (select 'bar'::name union all select 'bar'::name); - ?column? ----------- - f -(1 row) - --- --- Test that we don't try to hash nested records (bug #17363) --- (Hashing could be supported, but for now we don't) --- -explain (verbose, costs off) -select row(row(row(1))) = any (select row(row(1))); - QUERY PLAN -------------------------------------------- - Result - Output: (SubPlan 1) - SubPlan 1 - -> Materialize - Output: '("(1)")'::record - -> Result - Output: '("(1)")'::record -(7 rows) - -select row(row(row(1))) = any (select row(row(1))); - ?column? ----------- - t -(1 row) - --- --- Test case for premature memory release during hashing of subplan output --- -select '1'::text in (select '1'::name union all select '1'::name); - ?column? ----------- - t -(1 row) - --- --- Test that we don't try to use a hashed subplan if the simplified --- testexpr isn't of the right shape --- --- this fails by default, of course -select * from int8_tbl where q1 in (select c1 from inner_text); -ERROR: operator does not exist: bigint = text -LINE 1: select * from int8_tbl where q1 in (select c1 from inner_tex... - ^ -HINT: No operator matches the given name and argument types. You might need to add explicit type casts. -begin; --- make an operator to allow it to succeed -create function bogus_int8_text_eq(int8, text) returns boolean -language sql as 'select $1::text = $2'; -create operator = (procedure=bogus_int8_text_eq, leftarg=int8, rightarg=text); -explain (costs off) -select * from int8_tbl where q1 in (select c1 from inner_text); - QUERY PLAN --------------------------------- - Seq Scan on int8_tbl - Filter: (hashed SubPlan 1) - SubPlan 1 - -> Seq Scan on inner_text -(4 rows) - -select * from int8_tbl where q1 in (select c1 from inner_text); - q1 | q2 ------+------------------ - 123 | 456 - 123 | 4567890123456789 -(2 rows) - --- inlining of this function results in unusual number of hash clauses, --- which we can still cope with -create or replace function bogus_int8_text_eq(int8, text) returns boolean -language sql as 'select $1::text = $2 and $1::text = $2'; -explain (costs off) -select * from int8_tbl where q1 in (select c1 from inner_text); - QUERY PLAN --------------------------------- - Seq Scan on int8_tbl - Filter: (hashed SubPlan 1) - SubPlan 1 - -> Seq Scan on inner_text -(4 rows) - -select * from int8_tbl where q1 in (select c1 from inner_text); - q1 | q2 ------+------------------ - 123 | 456 - 123 | 4567890123456789 -(2 rows) - --- inlining of this function causes LHS and RHS to be switched, --- which we can't cope with, so hashing should be abandoned -create or replace function bogus_int8_text_eq(int8, text) returns boolean -language sql as 'select $2 = $1::text'; -explain (costs off) -select * from int8_tbl where q1 in (select c1 from inner_text); - QUERY PLAN --------------------------------------- - Seq Scan on int8_tbl - Filter: (SubPlan 1) - SubPlan 1 - -> Materialize - -> Seq Scan on inner_text -(5 rows) - -select * from int8_tbl where q1 in (select c1 from inner_text); - q1 | q2 ------+------------------ - 123 | 456 - 123 | 4567890123456789 -(2 rows) - -rollback; -- to get rid of the bogus operator --- --- Test resolution of hashed vs non-hashed implementation of EXISTS subplan --- -explain (costs off) -select count(*) from tenk1 t -where (exists(select 1 from tenk1 k where k.unique1 = t.unique2) or ten < 0); - QUERY PLAN --------------------------------------------------------------- - Aggregate - -> Seq Scan on tenk1 t - Filter: ((hashed SubPlan 2) OR (ten < 0)) - SubPlan 2 - -> Index Only Scan using tenk1_unique1 on tenk1 k -(5 rows) - -select count(*) from tenk1 t -where (exists(select 1 from tenk1 k where k.unique1 = t.unique2) or ten < 0); - count -------- - 10000 -(1 row) - -explain (costs off) -select count(*) from tenk1 t -where (exists(select 1 from tenk1 k where k.unique1 = t.unique2) or ten < 0) - and thousand = 1; - QUERY PLAN --------------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on tenk1 t - Recheck Cond: (thousand = 1) - Filter: ((SubPlan 1) OR (ten < 0)) - -> Bitmap Index Scan on tenk1_thous_tenthous - Index Cond: (thousand = 1) - SubPlan 1 - -> Index Only Scan using tenk1_unique1 on tenk1 k - Index Cond: (unique1 = t.unique2) -(9 rows) - -select count(*) from tenk1 t -where (exists(select 1 from tenk1 k where k.unique1 = t.unique2) or ten < 0) - and thousand = 1; - count -------- - 10 -(1 row) - --- It's possible for the same EXISTS to get resolved both ways -create temp table exists_tbl (c1 int, c2 int, c3 int) partition by list (c1); -create temp table exists_tbl_null partition of exists_tbl for values in (null); -create temp table exists_tbl_def partition of exists_tbl default; -insert into exists_tbl select x, x/2, x+1 from generate_series(0,10) x; -analyze exists_tbl; -explain (costs off) -select * from exists_tbl t1 - where (exists(select 1 from exists_tbl t2 where t1.c1 = t2.c2) or c3 < 0); - QUERY PLAN ------------------------------------------------------- - Append - -> Seq Scan on exists_tbl_null t1_1 - Filter: ((SubPlan 1) OR (c3 < 0)) - SubPlan 1 - -> Append - -> Seq Scan on exists_tbl_null t2_1 - Filter: (t1_1.c1 = c2) - -> Seq Scan on exists_tbl_def t2_2 - Filter: (t1_1.c1 = c2) - -> Seq Scan on exists_tbl_def t1_2 - Filter: ((hashed SubPlan 2) OR (c3 < 0)) - SubPlan 2 - -> Append - -> Seq Scan on exists_tbl_null t2_4 - -> Seq Scan on exists_tbl_def t2_5 -(15 rows) - -select * from exists_tbl t1 - where (exists(select 1 from exists_tbl t2 where t1.c1 = t2.c2) or c3 < 0); - c1 | c2 | c3 -----+----+---- - 0 | 0 | 1 - 1 | 0 | 2 - 2 | 1 | 3 - 3 | 1 | 4 - 4 | 2 | 5 - 5 | 2 | 6 -(6 rows) - --- --- Test case for planner bug with nested EXISTS handling --- -select a.thousand from tenk1 a, tenk1 b -where a.thousand = b.thousand - and exists ( select 1 from tenk1 c where b.hundred = c.hundred - and not exists ( select 1 from tenk1 d - where a.thousand = d.thousand ) ); - thousand ----------- -(0 rows) - --- --- Check that nested sub-selects are not pulled up if they contain volatiles --- -explain (verbose, costs off) - select x, x from - (select (select now()) as x from (values(1),(2)) v(y)) ss; - QUERY PLAN ---------------------------- - Values Scan on "*VALUES*" - Output: $0, $1 - InitPlan 1 (returns $0) - -> Result - Output: now() - InitPlan 2 (returns $1) - -> Result - Output: now() -(8 rows) - -explain (verbose, costs off) - select x, x from - (select (select random()) as x from (values(1),(2)) v(y)) ss; - QUERY PLAN ----------------------------------- - Subquery Scan on ss - Output: ss.x, ss.x - -> Values Scan on "*VALUES*" - Output: $0 - InitPlan 1 (returns $0) - -> Result - Output: random() -(7 rows) - -explain (verbose, costs off) - select x, x from - (select (select now() where y=y) as x from (values(1),(2)) v(y)) ss; - QUERY PLAN ----------------------------------------------------------------------- - Values Scan on "*VALUES*" - Output: (SubPlan 1), (SubPlan 2) - SubPlan 1 - -> Result - Output: now() - One-Time Filter: ("*VALUES*".column1 = "*VALUES*".column1) - SubPlan 2 - -> Result - Output: now() - One-Time Filter: ("*VALUES*".column1 = "*VALUES*".column1) -(10 rows) - -explain (verbose, costs off) - select x, x from - (select (select random() where y=y) as x from (values(1),(2)) v(y)) ss; - QUERY PLAN ----------------------------------------------------------------------------- - Subquery Scan on ss - Output: ss.x, ss.x - -> Values Scan on "*VALUES*" - Output: (SubPlan 1) - SubPlan 1 - -> Result - Output: random() - One-Time Filter: ("*VALUES*".column1 = "*VALUES*".column1) -(8 rows) - --- --- Test rescan of a hashed subplan (the use of random() is to prevent the --- sub-select from being pulled up, which would result in not hashing) --- -explain (verbose, costs off) -select sum(ss.tst::int) from - onek o cross join lateral ( - select i.ten in (select f1 from int4_tbl where f1 <= o.hundred) as tst, - random() as r - from onek i where i.unique1 = o.unique1 ) ss -where o.ten = 0; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Aggregate - Output: sum((((hashed SubPlan 1)))::integer) - -> Nested Loop - Output: ((hashed SubPlan 1)) - -> Seq Scan on public.onek o - Output: o.unique1, o.unique2, o.two, o.four, o.ten, o.twenty, o.hundred, o.thousand, o.twothousand, o.fivethous, o.tenthous, o.odd, o.even, o.stringu1, o.stringu2, o.string4 - Filter: (o.ten = 0) - -> Index Scan using onek_unique1 on public.onek i - Output: (hashed SubPlan 1), random() - Index Cond: (i.unique1 = o.unique1) - SubPlan 1 - -> Seq Scan on public.int4_tbl - Output: int4_tbl.f1 - Filter: (int4_tbl.f1 <= $0) -(14 rows) - -select sum(ss.tst::int) from - onek o cross join lateral ( - select i.ten in (select f1 from int4_tbl where f1 <= o.hundred) as tst, - random() as r - from onek i where i.unique1 = o.unique1 ) ss -where o.ten = 0; - sum ------ - 100 -(1 row) - --- --- Test rescan of a SetOp node --- -explain (costs off) -select count(*) from - onek o cross join lateral ( - select * from onek i1 where i1.unique1 = o.unique1 - except - select * from onek i2 where i2.unique1 = o.unique2 - ) ss -where o.ten = 1; - QUERY PLAN ------------------------------------------------------------------------------- - Aggregate - -> Nested Loop - -> Seq Scan on onek o - Filter: (ten = 1) - -> Subquery Scan on ss - -> HashSetOp Except - -> Append - -> Subquery Scan on "*SELECT* 1" - -> Index Scan using onek_unique1 on onek i1 - Index Cond: (unique1 = o.unique1) - -> Subquery Scan on "*SELECT* 2" - -> Index Scan using onek_unique1 on onek i2 - Index Cond: (unique1 = o.unique2) -(13 rows) - -select count(*) from - onek o cross join lateral ( - select * from onek i1 where i1.unique1 = o.unique1 - except - select * from onek i2 where i2.unique1 = o.unique2 - ) ss -where o.ten = 1; - count -------- - 100 -(1 row) - --- --- Test rescan of a RecursiveUnion node --- -explain (costs off) -select sum(o.four), sum(ss.a) from - onek o cross join lateral ( - with recursive x(a) as - (select o.four as a - union - select a + 1 from x - where a < 10) - select * from x - ) ss -where o.ten = 1; - QUERY PLAN ---------------------------------------------------------- - Aggregate - -> Nested Loop - -> Seq Scan on onek o - Filter: (ten = 1) - -> Memoize - Cache Key: o.four - Cache Mode: binary - -> CTE Scan on x - CTE x - -> Recursive Union - -> Result - -> WorkTable Scan on x x_1 - Filter: (a < 10) -(13 rows) - -select sum(o.four), sum(ss.a) from - onek o cross join lateral ( - with recursive x(a) as - (select o.four as a - union - select a + 1 from x - where a < 10) - select * from x - ) ss -where o.ten = 1; - sum | sum -------+------ - 1700 | 5350 -(1 row) - --- --- Check we don't misoptimize a NOT IN where the subquery returns no rows. --- -create temp table notinouter (a int); -create temp table notininner (b int not null); -insert into notinouter values (null), (1); -select * from notinouter where a not in (select b from notininner); - a ---- - - 1 -(2 rows) - --- --- Check we behave sanely in corner case of empty SELECT list (bug #8648) --- -create temp table nocolumns(); -select exists(select * from nocolumns); - exists --------- - f -(1 row) - --- --- Check behavior with a SubPlan in VALUES (bug #14924) --- -select val.x - from generate_series(1,10) as s(i), - lateral ( - values ((select s.i + 1)), (s.i + 101) - ) as val(x) -where s.i < 10 and (select val.x) < 110; - x ------ - 2 - 102 - 3 - 103 - 4 - 104 - 5 - 105 - 6 - 106 - 7 - 107 - 8 - 108 - 9 - 109 - 10 -(17 rows) - --- another variant of that (bug #16213) -explain (verbose, costs off) -select * from -(values - (3 not in (select * from (values (1), (2)) ss1)), - (false) -) ss; - QUERY PLAN ----------------------------------------- - Values Scan on "*VALUES*" - Output: "*VALUES*".column1 - SubPlan 1 - -> Values Scan on "*VALUES*_1" - Output: "*VALUES*_1".column1 -(5 rows) - -select * from -(values - (3 not in (select * from (values (1), (2)) ss1)), - (false) -) ss; - column1 ---------- - t - f -(2 rows) - --- --- Check sane behavior with nested IN SubLinks --- -explain (verbose, costs off) -select * from int4_tbl where - (case when f1 in (select unique1 from tenk1 a) then f1 else null end) in - (select ten from tenk1 b); - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Nested Loop Semi Join - Output: int4_tbl.f1 - Join Filter: (CASE WHEN (hashed SubPlan 1) THEN int4_tbl.f1 ELSE NULL::integer END = b.ten) - -> Seq Scan on public.int4_tbl - Output: int4_tbl.f1 - -> Seq Scan on public.tenk1 b - Output: b.unique1, b.unique2, b.two, b.four, b.ten, b.twenty, b.hundred, b.thousand, b.twothousand, b.fivethous, b.tenthous, b.odd, b.even, b.stringu1, b.stringu2, b.string4 - SubPlan 1 - -> Index Only Scan using tenk1_unique1 on public.tenk1 a - Output: a.unique1 -(10 rows) - -select * from int4_tbl where - (case when f1 in (select unique1 from tenk1 a) then f1 else null end) in - (select ten from tenk1 b); - f1 ----- - 0 -(1 row) - --- --- Check for incorrect optimization when IN subquery contains a SRF --- -explain (verbose, costs off) -select * from int4_tbl o where (f1, f1) in - (select f1, generate_series(1,50) / 10 g from int4_tbl i group by f1); - QUERY PLAN -------------------------------------------------------------------- - Nested Loop Semi Join - Output: o.f1 - Join Filter: (o.f1 = "ANY_subquery".f1) - -> Seq Scan on public.int4_tbl o - Output: o.f1 - -> Materialize - Output: "ANY_subquery".f1, "ANY_subquery".g - -> Subquery Scan on "ANY_subquery" - Output: "ANY_subquery".f1, "ANY_subquery".g - Filter: ("ANY_subquery".f1 = "ANY_subquery".g) - -> Result - Output: i.f1, ((generate_series(1, 50)) / 10) - -> ProjectSet - Output: generate_series(1, 50), i.f1 - -> HashAggregate - Output: i.f1 - Group Key: i.f1 - -> Seq Scan on public.int4_tbl i - Output: i.f1 -(19 rows) - -select * from int4_tbl o where (f1, f1) in - (select f1, generate_series(1,50) / 10 g from int4_tbl i group by f1); - f1 ----- - 0 -(1 row) - --- --- check for over-optimization of whole-row Var referencing an Append plan --- -select (select q from - (select 1,2,3 where f1 > 0 - union all - select 4,5,6.0 where f1 <= 0 - ) q ) -from int4_tbl; - q ------------ - (4,5,6.0) - (1,2,3) - (4,5,6.0) - (1,2,3) - (4,5,6.0) -(5 rows) - --- --- Check for sane handling of a lateral reference in a subquery's quals --- (most of the complication here is to prevent the test case from being --- flattened too much) --- -explain (verbose, costs off) -select * from - int4_tbl i4, - lateral ( - select i4.f1 > 1 as b, 1 as id - from (select random() order by 1) as t1 - union all - select true as b, 2 as id - ) as t2 -where b and f1 >= 0; - QUERY PLAN --------------------------------------------- - Nested Loop - Output: i4.f1, ((i4.f1 > 1)), (1) - -> Seq Scan on public.int4_tbl i4 - Output: i4.f1 - Filter: (i4.f1 >= 0) - -> Append - -> Subquery Scan on t1 - Output: (i4.f1 > 1), 1 - Filter: (i4.f1 > 1) - -> Sort - Output: (random()) - Sort Key: (random()) - -> Result - Output: random() - -> Result - Output: true, 2 -(16 rows) - -select * from - int4_tbl i4, - lateral ( - select i4.f1 > 1 as b, 1 as id - from (select random() order by 1) as t1 - union all - select true as b, 2 as id - ) as t2 -where b and f1 >= 0; - f1 | b | id -------------+---+---- - 0 | t | 2 - 123456 | t | 1 - 123456 | t | 2 - 2147483647 | t | 1 - 2147483647 | t | 2 -(5 rows) - --- --- Check that volatile quals aren't pushed down past a DISTINCT: --- nextval() should not be called more than the nominal number of times --- -create temp sequence ts1; -select * from - (select distinct ten from tenk1) ss - where ten < 10 + nextval('ts1') - order by 1; - ten ------ - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 -(10 rows) - -select nextval('ts1'); - nextval ---------- - 11 -(1 row) - --- --- Check that volatile quals aren't pushed down past a set-returning function; --- while a nonvolatile qual can be, if it doesn't reference the SRF. --- -create function tattle(x int, y int) returns bool -volatile language plpgsql as $$ -begin - raise notice 'x = %, y = %', x, y; - return x > y; -end$$; -explain (verbose, costs off) -select * from - (select 9 as x, unnest(array[1,2,3,11,12,13]) as u) ss - where tattle(x, 8); - QUERY PLAN ----------------------------------------------------------- - Subquery Scan on ss - Output: ss.x, ss.u - Filter: tattle(ss.x, 8) - -> ProjectSet - Output: 9, unnest('{1,2,3,11,12,13}'::integer[]) - -> Result -(6 rows) - -select * from - (select 9 as x, unnest(array[1,2,3,11,12,13]) as u) ss - where tattle(x, 8); -NOTICE: x = 9, y = 8 -NOTICE: x = 9, y = 8 -NOTICE: x = 9, y = 8 -NOTICE: x = 9, y = 8 -NOTICE: x = 9, y = 8 -NOTICE: x = 9, y = 8 - x | u ----+---- - 9 | 1 - 9 | 2 - 9 | 3 - 9 | 11 - 9 | 12 - 9 | 13 -(6 rows) - --- if we pretend it's stable, we get different results: -alter function tattle(x int, y int) stable; -explain (verbose, costs off) -select * from - (select 9 as x, unnest(array[1,2,3,11,12,13]) as u) ss - where tattle(x, 8); - QUERY PLAN ----------------------------------------------------- - ProjectSet - Output: 9, unnest('{1,2,3,11,12,13}'::integer[]) - -> Result - One-Time Filter: tattle(9, 8) -(4 rows) - -select * from - (select 9 as x, unnest(array[1,2,3,11,12,13]) as u) ss - where tattle(x, 8); -NOTICE: x = 9, y = 8 - x | u ----+---- - 9 | 1 - 9 | 2 - 9 | 3 - 9 | 11 - 9 | 12 - 9 | 13 -(6 rows) - --- although even a stable qual should not be pushed down if it references SRF -explain (verbose, costs off) -select * from - (select 9 as x, unnest(array[1,2,3,11,12,13]) as u) ss - where tattle(x, u); - QUERY PLAN ----------------------------------------------------------- - Subquery Scan on ss - Output: ss.x, ss.u - Filter: tattle(ss.x, ss.u) - -> ProjectSet - Output: 9, unnest('{1,2,3,11,12,13}'::integer[]) - -> Result -(6 rows) - -select * from - (select 9 as x, unnest(array[1,2,3,11,12,13]) as u) ss - where tattle(x, u); -NOTICE: x = 9, y = 1 -NOTICE: x = 9, y = 2 -NOTICE: x = 9, y = 3 -NOTICE: x = 9, y = 11 -NOTICE: x = 9, y = 12 -NOTICE: x = 9, y = 13 - x | u ----+--- - 9 | 1 - 9 | 2 - 9 | 3 -(3 rows) - -drop function tattle(x int, y int); --- --- Test that LIMIT can be pushed to SORT through a subquery that just projects --- columns. We check for that having happened by looking to see if EXPLAIN --- ANALYZE shows that a top-N sort was used. We must suppress or filter away --- all the non-invariant parts of the EXPLAIN ANALYZE output. --- -create table sq_limit (pk int primary key, c1 int, c2 int); -insert into sq_limit values - (1, 1, 1), - (2, 2, 2), - (3, 3, 3), - (4, 4, 4), - (5, 1, 1), - (6, 2, 2), - (7, 3, 3), - (8, 4, 4); -create function explain_sq_limit() returns setof text language plpgsql as -$$ -declare ln text; -begin - for ln in - explain (analyze, summary off, timing off, costs off) - select * from (select pk,c2 from sq_limit order by c1,pk) as x limit 3 - loop - ln := regexp_replace(ln, 'Memory: \S*', 'Memory: xxx'); - return next ln; - end loop; -end; -$$; -select * from explain_sq_limit(); - explain_sq_limit ----------------------------------------------------------------- - Limit (actual rows=3 loops=1) - -> Subquery Scan on x (actual rows=3 loops=1) - -> Sort (actual rows=3 loops=1) - Sort Key: sq_limit.c1, sq_limit.pk - Sort Method: top-N heapsort Memory: xxx - -> Seq Scan on sq_limit (actual rows=8 loops=1) -(6 rows) - -select * from (select pk,c2 from sq_limit order by c1,pk) as x limit 3; - pk | c2 -----+---- - 1 | 1 - 5 | 1 - 2 | 2 -(3 rows) - -drop function explain_sq_limit(); -drop table sq_limit; --- --- Ensure that backward scan direction isn't propagated into --- expression subqueries (bug #15336) --- -begin; -declare c1 scroll cursor for - select * from generate_series(1,4) i - where i <> all (values (2),(3)); -move forward all in c1; -fetch backward all in c1; - i ---- - 4 - 1 -(2 rows) - -commit; --- --- Tests for CTE inlining behavior --- --- Basic subquery that can be inlined -explain (verbose, costs off) -with x as (select * from (select f1 from subselect_tbl) ss) -select * from x where f1 = 1; - QUERY PLAN ----------------------------------- - Seq Scan on public.subselect_tbl - Output: subselect_tbl.f1 - Filter: (subselect_tbl.f1 = 1) -(3 rows) - --- Explicitly request materialization -explain (verbose, costs off) -with x as materialized (select * from (select f1 from subselect_tbl) ss) -select * from x where f1 = 1; - QUERY PLAN ------------------------------------------- - CTE Scan on x - Output: x.f1 - Filter: (x.f1 = 1) - CTE x - -> Seq Scan on public.subselect_tbl - Output: subselect_tbl.f1 -(6 rows) - --- Stable functions are safe to inline -explain (verbose, costs off) -with x as (select * from (select f1, now() from subselect_tbl) ss) -select * from x where f1 = 1; - QUERY PLAN ------------------------------------ - Seq Scan on public.subselect_tbl - Output: subselect_tbl.f1, now() - Filter: (subselect_tbl.f1 = 1) -(3 rows) - --- Volatile functions prevent inlining -explain (verbose, costs off) -with x as (select * from (select f1, random() from subselect_tbl) ss) -select * from x where f1 = 1; - QUERY PLAN ----------------------------------------------- - CTE Scan on x - Output: x.f1, x.random - Filter: (x.f1 = 1) - CTE x - -> Seq Scan on public.subselect_tbl - Output: subselect_tbl.f1, random() -(6 rows) - --- SELECT FOR UPDATE cannot be inlined -explain (verbose, costs off) -with x as (select * from (select f1 from subselect_tbl for update) ss) -select * from x where f1 = 1; - QUERY PLAN --------------------------------------------------------------------- - CTE Scan on x - Output: x.f1 - Filter: (x.f1 = 1) - CTE x - -> Subquery Scan on ss - Output: ss.f1 - -> LockRows - Output: subselect_tbl.f1, subselect_tbl.ctid - -> Seq Scan on public.subselect_tbl - Output: subselect_tbl.f1, subselect_tbl.ctid -(10 rows) - --- Multiply-referenced CTEs are inlined only when requested -explain (verbose, costs off) -with x as (select * from (select f1, now() as n from subselect_tbl) ss) -select * from x, x x2 where x.n = x2.n; - QUERY PLAN -------------------------------------------- - Merge Join - Output: x.f1, x.n, x2.f1, x2.n - Merge Cond: (x.n = x2.n) - CTE x - -> Seq Scan on public.subselect_tbl - Output: subselect_tbl.f1, now() - -> Sort - Output: x.f1, x.n - Sort Key: x.n - -> CTE Scan on x - Output: x.f1, x.n - -> Sort - Output: x2.f1, x2.n - Sort Key: x2.n - -> CTE Scan on x x2 - Output: x2.f1, x2.n -(16 rows) - -explain (verbose, costs off) -with x as not materialized (select * from (select f1, now() as n from subselect_tbl) ss) -select * from x, x x2 where x.n = x2.n; - QUERY PLAN ----------------------------------------------------------------------------- - Result - Output: subselect_tbl.f1, now(), subselect_tbl_1.f1, now() - One-Time Filter: (now() = now()) - -> Nested Loop - Output: subselect_tbl.f1, subselect_tbl_1.f1 - -> Seq Scan on public.subselect_tbl - Output: subselect_tbl.f1, subselect_tbl.f2, subselect_tbl.f3 - -> Materialize - Output: subselect_tbl_1.f1 - -> Seq Scan on public.subselect_tbl subselect_tbl_1 - Output: subselect_tbl_1.f1 -(11 rows) - --- Multiply-referenced CTEs can't be inlined if they contain outer self-refs -explain (verbose, costs off) -with recursive x(a) as - ((values ('a'), ('b')) - union all - (with z as not materialized (select * from x) - select z.a || z1.a as a from z cross join z as z1 - where length(z.a || z1.a) < 5)) -select * from x; - QUERY PLAN ----------------------------------------------------------- - CTE Scan on x - Output: x.a - CTE x - -> Recursive Union - -> Values Scan on "*VALUES*" - Output: "*VALUES*".column1 - -> Nested Loop - Output: (z.a || z1.a) - Join Filter: (length((z.a || z1.a)) < 5) - CTE z - -> WorkTable Scan on x x_1 - Output: x_1.a - -> CTE Scan on z - Output: z.a - -> CTE Scan on z z1 - Output: z1.a -(16 rows) - -with recursive x(a) as - ((values ('a'), ('b')) - union all - (with z as not materialized (select * from x) - select z.a || z1.a as a from z cross join z as z1 - where length(z.a || z1.a) < 5)) -select * from x; - a ------- - a - b - aa - ab - ba - bb - aaaa - aaab - aaba - aabb - abaa - abab - abba - abbb - baaa - baab - baba - babb - bbaa - bbab - bbba - bbbb -(22 rows) - -explain (verbose, costs off) -with recursive x(a) as - ((values ('a'), ('b')) - union all - (with z as not materialized (select * from x) - select z.a || z.a as a from z - where length(z.a || z.a) < 5)) -select * from x; - QUERY PLAN --------------------------------------------------------- - CTE Scan on x - Output: x.a - CTE x - -> Recursive Union - -> Values Scan on "*VALUES*" - Output: "*VALUES*".column1 - -> WorkTable Scan on x x_1 - Output: (x_1.a || x_1.a) - Filter: (length((x_1.a || x_1.a)) < 5) -(9 rows) - -with recursive x(a) as - ((values ('a'), ('b')) - union all - (with z as not materialized (select * from x) - select z.a || z.a as a from z - where length(z.a || z.a) < 5)) -select * from x; - a ------- - a - b - aa - bb - aaaa - bbbb -(6 rows) - --- Check handling of outer references -explain (verbose, costs off) -with x as (select * from int4_tbl) -select * from (with y as (select * from x) select * from y) ss; - QUERY PLAN ------------------------------ - Seq Scan on public.int4_tbl - Output: int4_tbl.f1 -(2 rows) - -explain (verbose, costs off) -with x as materialized (select * from int4_tbl) -select * from (with y as (select * from x) select * from y) ss; - QUERY PLAN -------------------------------------- - CTE Scan on x - Output: x.f1 - CTE x - -> Seq Scan on public.int4_tbl - Output: int4_tbl.f1 -(5 rows) - --- Ensure that we inline the currect CTE when there are --- multiple CTEs with the same name -explain (verbose, costs off) -with x as (select 1 as y) -select * from (with x as (select 2 as y) select * from x) ss; - QUERY PLAN -------------- - Result - Output: 2 -(2 rows) - --- Row marks are not pushed into CTEs -explain (verbose, costs off) -with x as (select * from subselect_tbl) -select * from x for update; - QUERY PLAN ----------------------------------------------------------------- - Seq Scan on public.subselect_tbl - Output: subselect_tbl.f1, subselect_tbl.f2, subselect_tbl.f3 -(2 rows) - +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/union.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/union.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/union.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/union.out 2023-02-20 19:45:46.269211040 -0500 @@ -1,1434 +1 @@ --- --- UNION (also INTERSECT, EXCEPT) --- --- Simple UNION constructs -SELECT 1 AS two UNION SELECT 2 ORDER BY 1; - two ------ - 1 - 2 -(2 rows) - -SELECT 1 AS one UNION SELECT 1 ORDER BY 1; - one ------ - 1 -(1 row) - -SELECT 1 AS two UNION ALL SELECT 2; - two ------ - 1 - 2 -(2 rows) - -SELECT 1 AS two UNION ALL SELECT 1; - two ------ - 1 - 1 -(2 rows) - -SELECT 1 AS three UNION SELECT 2 UNION SELECT 3 ORDER BY 1; - three -------- - 1 - 2 - 3 -(3 rows) - -SELECT 1 AS two UNION SELECT 2 UNION SELECT 2 ORDER BY 1; - two ------ - 1 - 2 -(2 rows) - -SELECT 1 AS three UNION SELECT 2 UNION ALL SELECT 2 ORDER BY 1; - three -------- - 1 - 2 - 2 -(3 rows) - -SELECT 1.1 AS two UNION SELECT 2.2 ORDER BY 1; - two ------ - 1.1 - 2.2 -(2 rows) - --- Mixed types -SELECT 1.1 AS two UNION SELECT 2 ORDER BY 1; - two ------ - 1.1 - 2 -(2 rows) - -SELECT 1 AS two UNION SELECT 2.2 ORDER BY 1; - two ------ - 1 - 2.2 -(2 rows) - -SELECT 1 AS one UNION SELECT 1.0::float8 ORDER BY 1; - one ------ - 1 -(1 row) - -SELECT 1.1 AS two UNION ALL SELECT 2 ORDER BY 1; - two ------ - 1.1 - 2 -(2 rows) - -SELECT 1.0::float8 AS two UNION ALL SELECT 1 ORDER BY 1; - two ------ - 1 - 1 -(2 rows) - -SELECT 1.1 AS three UNION SELECT 2 UNION SELECT 3 ORDER BY 1; - three -------- - 1.1 - 2 - 3 -(3 rows) - -SELECT 1.1::float8 AS two UNION SELECT 2 UNION SELECT 2.0::float8 ORDER BY 1; - two ------ - 1.1 - 2 -(2 rows) - -SELECT 1.1 AS three UNION SELECT 2 UNION ALL SELECT 2 ORDER BY 1; - three -------- - 1.1 - 2 - 2 -(3 rows) - -SELECT 1.1 AS two UNION (SELECT 2 UNION ALL SELECT 2) ORDER BY 1; - two ------ - 1.1 - 2 -(2 rows) - --- --- Try testing from tables... --- -SELECT f1 AS five FROM FLOAT8_TBL -UNION -SELECT f1 FROM FLOAT8_TBL -ORDER BY 1; - five ------------------------ - -1.2345678901234e+200 - -1004.3 - -34.84 - -1.2345678901234e-200 - 0 -(5 rows) - -SELECT f1 AS ten FROM FLOAT8_TBL -UNION ALL -SELECT f1 FROM FLOAT8_TBL; - ten ------------------------ - 0 - -34.84 - -1004.3 - -1.2345678901234e+200 - -1.2345678901234e-200 - 0 - -34.84 - -1004.3 - -1.2345678901234e+200 - -1.2345678901234e-200 -(10 rows) - -SELECT f1 AS nine FROM FLOAT8_TBL -UNION -SELECT f1 FROM INT4_TBL -ORDER BY 1; - nine ------------------------ - -1.2345678901234e+200 - -2147483647 - -123456 - -1004.3 - -34.84 - -1.2345678901234e-200 - 0 - 123456 - 2147483647 -(9 rows) - -SELECT f1 AS ten FROM FLOAT8_TBL -UNION ALL -SELECT f1 FROM INT4_TBL; - ten ------------------------ - 0 - -34.84 - -1004.3 - -1.2345678901234e+200 - -1.2345678901234e-200 - 0 - 123456 - -123456 - 2147483647 - -2147483647 -(10 rows) - -SELECT f1 AS five FROM FLOAT8_TBL - WHERE f1 BETWEEN -1e6 AND 1e6 -UNION -SELECT f1 FROM INT4_TBL - WHERE f1 BETWEEN 0 AND 1000000 -ORDER BY 1; - five ------------------------ - -1004.3 - -34.84 - -1.2345678901234e-200 - 0 - 123456 -(5 rows) - -SELECT CAST(f1 AS char(4)) AS three FROM VARCHAR_TBL -UNION -SELECT f1 FROM CHAR_TBL -ORDER BY 1; - three -------- - a - ab - abcd -(3 rows) - -SELECT f1 AS three FROM VARCHAR_TBL -UNION -SELECT CAST(f1 AS varchar) FROM CHAR_TBL -ORDER BY 1; - three -------- - a - ab - abcd -(3 rows) - -SELECT f1 AS eight FROM VARCHAR_TBL -UNION ALL -SELECT f1 FROM CHAR_TBL; - eight -------- - a - ab - abcd - abcd - a - ab - abcd - abcd -(8 rows) - -SELECT f1 AS five FROM TEXT_TBL -UNION -SELECT f1 FROM VARCHAR_TBL -UNION -SELECT TRIM(TRAILING FROM f1) FROM CHAR_TBL -ORDER BY 1; - five -------------------- - a - ab - abcd - doh! - hi de ho neighbor -(5 rows) - --- --- INTERSECT and EXCEPT --- -SELECT q2 FROM int8_tbl INTERSECT SELECT q1 FROM int8_tbl ORDER BY 1; - q2 ------------------- - 123 - 4567890123456789 -(2 rows) - -SELECT q2 FROM int8_tbl INTERSECT ALL SELECT q1 FROM int8_tbl ORDER BY 1; - q2 ------------------- - 123 - 4567890123456789 - 4567890123456789 -(3 rows) - -SELECT q2 FROM int8_tbl EXCEPT SELECT q1 FROM int8_tbl ORDER BY 1; - q2 -------------------- - -4567890123456789 - 456 -(2 rows) - -SELECT q2 FROM int8_tbl EXCEPT ALL SELECT q1 FROM int8_tbl ORDER BY 1; - q2 -------------------- - -4567890123456789 - 456 -(2 rows) - -SELECT q2 FROM int8_tbl EXCEPT ALL SELECT DISTINCT q1 FROM int8_tbl ORDER BY 1; - q2 -------------------- - -4567890123456789 - 456 - 4567890123456789 -(3 rows) - -SELECT q1 FROM int8_tbl EXCEPT SELECT q2 FROM int8_tbl ORDER BY 1; - q1 ----- -(0 rows) - -SELECT q1 FROM int8_tbl EXCEPT ALL SELECT q2 FROM int8_tbl ORDER BY 1; - q1 ------------------- - 123 - 4567890123456789 -(2 rows) - -SELECT q1 FROM int8_tbl EXCEPT ALL SELECT DISTINCT q2 FROM int8_tbl ORDER BY 1; - q1 ------------------- - 123 - 4567890123456789 - 4567890123456789 -(3 rows) - -SELECT q1 FROM int8_tbl EXCEPT ALL SELECT q1 FROM int8_tbl FOR NO KEY UPDATE; -ERROR: FOR NO KEY UPDATE is not allowed with UNION/INTERSECT/EXCEPT --- nested cases -(SELECT 1,2,3 UNION SELECT 4,5,6) INTERSECT SELECT 4,5,6; - ?column? | ?column? | ?column? -----------+----------+---------- - 4 | 5 | 6 -(1 row) - -(SELECT 1,2,3 UNION SELECT 4,5,6 ORDER BY 1,2) INTERSECT SELECT 4,5,6; - ?column? | ?column? | ?column? -----------+----------+---------- - 4 | 5 | 6 -(1 row) - -(SELECT 1,2,3 UNION SELECT 4,5,6) EXCEPT SELECT 4,5,6; - ?column? | ?column? | ?column? -----------+----------+---------- - 1 | 2 | 3 -(1 row) - -(SELECT 1,2,3 UNION SELECT 4,5,6 ORDER BY 1,2) EXCEPT SELECT 4,5,6; - ?column? | ?column? | ?column? -----------+----------+---------- - 1 | 2 | 3 -(1 row) - --- exercise both hashed and sorted implementations of UNION/INTERSECT/EXCEPT -set enable_hashagg to on; -explain (costs off) -select count(*) from - ( select unique1 from tenk1 union select fivethous from tenk1 ) ss; - QUERY PLAN ----------------------------------------------------------------- - Aggregate - -> HashAggregate - Group Key: tenk1.unique1 - -> Append - -> Index Only Scan using tenk1_unique1 on tenk1 - -> Seq Scan on tenk1 tenk1_1 -(6 rows) - -select count(*) from - ( select unique1 from tenk1 union select fivethous from tenk1 ) ss; - count -------- - 10000 -(1 row) - -explain (costs off) -select count(*) from - ( select unique1 from tenk1 intersect select fivethous from tenk1 ) ss; - QUERY PLAN ------------------------------------------------------------------------------------- - Aggregate - -> Subquery Scan on ss - -> HashSetOp Intersect - -> Append - -> Subquery Scan on "*SELECT* 2" - -> Seq Scan on tenk1 - -> Subquery Scan on "*SELECT* 1" - -> Index Only Scan using tenk1_unique1 on tenk1 tenk1_1 -(8 rows) - -select count(*) from - ( select unique1 from tenk1 intersect select fivethous from tenk1 ) ss; - count -------- - 5000 -(1 row) - -explain (costs off) -select unique1 from tenk1 except select unique2 from tenk1 where unique2 != 10; - QUERY PLAN ------------------------------------------------------------------------- - HashSetOp Except - -> Append - -> Subquery Scan on "*SELECT* 1" - -> Index Only Scan using tenk1_unique1 on tenk1 - -> Subquery Scan on "*SELECT* 2" - -> Index Only Scan using tenk1_unique2 on tenk1 tenk1_1 - Filter: (unique2 <> 10) -(7 rows) - -select unique1 from tenk1 except select unique2 from tenk1 where unique2 != 10; - unique1 ---------- - 10 -(1 row) - -set enable_hashagg to off; -explain (costs off) -select count(*) from - ( select unique1 from tenk1 union select fivethous from tenk1 ) ss; - QUERY PLAN ----------------------------------------------------------------------- - Aggregate - -> Unique - -> Sort - Sort Key: tenk1.unique1 - -> Append - -> Index Only Scan using tenk1_unique1 on tenk1 - -> Seq Scan on tenk1 tenk1_1 -(7 rows) - -select count(*) from - ( select unique1 from tenk1 union select fivethous from tenk1 ) ss; - count -------- - 10000 -(1 row) - -explain (costs off) -select count(*) from - ( select unique1 from tenk1 intersect select fivethous from tenk1 ) ss; - QUERY PLAN ------------------------------------------------------------------------------------------- - Aggregate - -> Subquery Scan on ss - -> SetOp Intersect - -> Sort - Sort Key: "*SELECT* 2".fivethous - -> Append - -> Subquery Scan on "*SELECT* 2" - -> Seq Scan on tenk1 - -> Subquery Scan on "*SELECT* 1" - -> Index Only Scan using tenk1_unique1 on tenk1 tenk1_1 -(10 rows) - -select count(*) from - ( select unique1 from tenk1 intersect select fivethous from tenk1 ) ss; - count -------- - 5000 -(1 row) - -explain (costs off) -select unique1 from tenk1 except select unique2 from tenk1 where unique2 != 10; - QUERY PLAN ------------------------------------------------------------------------------- - SetOp Except - -> Sort - Sort Key: "*SELECT* 1".unique1 - -> Append - -> Subquery Scan on "*SELECT* 1" - -> Index Only Scan using tenk1_unique1 on tenk1 - -> Subquery Scan on "*SELECT* 2" - -> Index Only Scan using tenk1_unique2 on tenk1 tenk1_1 - Filter: (unique2 <> 10) -(9 rows) - -select unique1 from tenk1 except select unique2 from tenk1 where unique2 != 10; - unique1 ---------- - 10 -(1 row) - -reset enable_hashagg; --- non-hashable type -set enable_hashagg to on; -explain (costs off) -select x from (values (100::money), (200::money)) _(x) union select x from (values (100::money), (300::money)) _(x); - QUERY PLAN ------------------------------------------------ - Unique - -> Sort - Sort Key: "*VALUES*".column1 - -> Append - -> Values Scan on "*VALUES*" - -> Values Scan on "*VALUES*_1" -(6 rows) - -set enable_hashagg to off; -explain (costs off) -select x from (values (100::money), (200::money)) _(x) union select x from (values (100::money), (300::money)) _(x); - QUERY PLAN ------------------------------------------------ - Unique - -> Sort - Sort Key: "*VALUES*".column1 - -> Append - -> Values Scan on "*VALUES*" - -> Values Scan on "*VALUES*_1" -(6 rows) - -reset enable_hashagg; --- arrays -set enable_hashagg to on; -explain (costs off) -select x from (values (array[1, 2]), (array[1, 3])) _(x) union select x from (values (array[1, 2]), (array[1, 4])) _(x); - QUERY PLAN ------------------------------------------ - HashAggregate - Group Key: "*VALUES*".column1 - -> Append - -> Values Scan on "*VALUES*" - -> Values Scan on "*VALUES*_1" -(5 rows) - -select x from (values (array[1, 2]), (array[1, 3])) _(x) union select x from (values (array[1, 2]), (array[1, 4])) _(x); - x -------- - {1,4} - {1,2} - {1,3} -(3 rows) - -explain (costs off) -select x from (values (array[1, 2]), (array[1, 3])) _(x) intersect select x from (values (array[1, 2]), (array[1, 4])) _(x); - QUERY PLAN ------------------------------------------------ - HashSetOp Intersect - -> Append - -> Subquery Scan on "*SELECT* 1" - -> Values Scan on "*VALUES*" - -> Subquery Scan on "*SELECT* 2" - -> Values Scan on "*VALUES*_1" -(6 rows) - -select x from (values (array[1, 2]), (array[1, 3])) _(x) intersect select x from (values (array[1, 2]), (array[1, 4])) _(x); - x -------- - {1,2} -(1 row) - -explain (costs off) -select x from (values (array[1, 2]), (array[1, 3])) _(x) except select x from (values (array[1, 2]), (array[1, 4])) _(x); - QUERY PLAN ------------------------------------------------ - HashSetOp Except - -> Append - -> Subquery Scan on "*SELECT* 1" - -> Values Scan on "*VALUES*" - -> Subquery Scan on "*SELECT* 2" - -> Values Scan on "*VALUES*_1" -(6 rows) - -select x from (values (array[1, 2]), (array[1, 3])) _(x) except select x from (values (array[1, 2]), (array[1, 4])) _(x); - x -------- - {1,3} -(1 row) - --- non-hashable type -explain (costs off) -select x from (values (array[100::money]), (array[200::money])) _(x) union select x from (values (array[100::money]), (array[300::money])) _(x); - QUERY PLAN ------------------------------------------------ - Unique - -> Sort - Sort Key: "*VALUES*".column1 - -> Append - -> Values Scan on "*VALUES*" - -> Values Scan on "*VALUES*_1" -(6 rows) - -select x from (values (array[100::money]), (array[200::money])) _(x) union select x from (values (array[100::money]), (array[300::money])) _(x); - x ------------ - {$100.00} - {$200.00} - {$300.00} -(3 rows) - -set enable_hashagg to off; -explain (costs off) -select x from (values (array[1, 2]), (array[1, 3])) _(x) union select x from (values (array[1, 2]), (array[1, 4])) _(x); - QUERY PLAN ------------------------------------------------ - Unique - -> Sort - Sort Key: "*VALUES*".column1 - -> Append - -> Values Scan on "*VALUES*" - -> Values Scan on "*VALUES*_1" -(6 rows) - -select x from (values (array[1, 2]), (array[1, 3])) _(x) union select x from (values (array[1, 2]), (array[1, 4])) _(x); - x -------- - {1,2} - {1,3} - {1,4} -(3 rows) - -explain (costs off) -select x from (values (array[1, 2]), (array[1, 3])) _(x) intersect select x from (values (array[1, 2]), (array[1, 4])) _(x); - QUERY PLAN ------------------------------------------------------ - SetOp Intersect - -> Sort - Sort Key: "*SELECT* 1".x - -> Append - -> Subquery Scan on "*SELECT* 1" - -> Values Scan on "*VALUES*" - -> Subquery Scan on "*SELECT* 2" - -> Values Scan on "*VALUES*_1" -(8 rows) - -select x from (values (array[1, 2]), (array[1, 3])) _(x) intersect select x from (values (array[1, 2]), (array[1, 4])) _(x); - x -------- - {1,2} -(1 row) - -explain (costs off) -select x from (values (array[1, 2]), (array[1, 3])) _(x) except select x from (values (array[1, 2]), (array[1, 4])) _(x); - QUERY PLAN ------------------------------------------------------ - SetOp Except - -> Sort - Sort Key: "*SELECT* 1".x - -> Append - -> Subquery Scan on "*SELECT* 1" - -> Values Scan on "*VALUES*" - -> Subquery Scan on "*SELECT* 2" - -> Values Scan on "*VALUES*_1" -(8 rows) - -select x from (values (array[1, 2]), (array[1, 3])) _(x) except select x from (values (array[1, 2]), (array[1, 4])) _(x); - x -------- - {1,3} -(1 row) - -reset enable_hashagg; --- records -set enable_hashagg to on; -explain (costs off) -select x from (values (row(1, 2)), (row(1, 3))) _(x) union select x from (values (row(1, 2)), (row(1, 4))) _(x); - QUERY PLAN ------------------------------------------------ - Unique - -> Sort - Sort Key: "*VALUES*".column1 - -> Append - -> Values Scan on "*VALUES*" - -> Values Scan on "*VALUES*_1" -(6 rows) - -select x from (values (row(1, 2)), (row(1, 3))) _(x) union select x from (values (row(1, 2)), (row(1, 4))) _(x); - x -------- - (1,2) - (1,3) - (1,4) -(3 rows) - -explain (costs off) -select x from (values (row(1, 2)), (row(1, 3))) _(x) intersect select x from (values (row(1, 2)), (row(1, 4))) _(x); - QUERY PLAN ------------------------------------------------------ - SetOp Intersect - -> Sort - Sort Key: "*SELECT* 1".x - -> Append - -> Subquery Scan on "*SELECT* 1" - -> Values Scan on "*VALUES*" - -> Subquery Scan on "*SELECT* 2" - -> Values Scan on "*VALUES*_1" -(8 rows) - -select x from (values (row(1, 2)), (row(1, 3))) _(x) intersect select x from (values (row(1, 2)), (row(1, 4))) _(x); - x -------- - (1,2) -(1 row) - -explain (costs off) -select x from (values (row(1, 2)), (row(1, 3))) _(x) except select x from (values (row(1, 2)), (row(1, 4))) _(x); - QUERY PLAN ------------------------------------------------------ - SetOp Except - -> Sort - Sort Key: "*SELECT* 1".x - -> Append - -> Subquery Scan on "*SELECT* 1" - -> Values Scan on "*VALUES*" - -> Subquery Scan on "*SELECT* 2" - -> Values Scan on "*VALUES*_1" -(8 rows) - -select x from (values (row(1, 2)), (row(1, 3))) _(x) except select x from (values (row(1, 2)), (row(1, 4))) _(x); - x -------- - (1,3) -(1 row) - --- non-hashable type --- With an anonymous row type, the typcache does not report that the --- type is hashable. (Otherwise, this would fail at execution time.) -explain (costs off) -select x from (values (row(100::money)), (row(200::money))) _(x) union select x from (values (row(100::money)), (row(300::money))) _(x); - QUERY PLAN ------------------------------------------------ - Unique - -> Sort - Sort Key: "*VALUES*".column1 - -> Append - -> Values Scan on "*VALUES*" - -> Values Scan on "*VALUES*_1" -(6 rows) - -select x from (values (row(100::money)), (row(200::money))) _(x) union select x from (values (row(100::money)), (row(300::money))) _(x); - x ------------ - ($100.00) - ($200.00) - ($300.00) -(3 rows) - --- With a defined row type, the typcache can inspect the type's fields --- for hashability. -create type ct1 as (f1 money); -explain (costs off) -select x from (values (row(100::money)::ct1), (row(200::money)::ct1)) _(x) union select x from (values (row(100::money)::ct1), (row(300::money)::ct1)) _(x); - QUERY PLAN ------------------------------------------------ - Unique - -> Sort - Sort Key: "*VALUES*".column1 - -> Append - -> Values Scan on "*VALUES*" - -> Values Scan on "*VALUES*_1" -(6 rows) - -select x from (values (row(100::money)::ct1), (row(200::money)::ct1)) _(x) union select x from (values (row(100::money)::ct1), (row(300::money)::ct1)) _(x); - x ------------ - ($100.00) - ($200.00) - ($300.00) -(3 rows) - -drop type ct1; -set enable_hashagg to off; -explain (costs off) -select x from (values (row(1, 2)), (row(1, 3))) _(x) union select x from (values (row(1, 2)), (row(1, 4))) _(x); - QUERY PLAN ------------------------------------------------ - Unique - -> Sort - Sort Key: "*VALUES*".column1 - -> Append - -> Values Scan on "*VALUES*" - -> Values Scan on "*VALUES*_1" -(6 rows) - -select x from (values (row(1, 2)), (row(1, 3))) _(x) union select x from (values (row(1, 2)), (row(1, 4))) _(x); - x -------- - (1,2) - (1,3) - (1,4) -(3 rows) - -explain (costs off) -select x from (values (row(1, 2)), (row(1, 3))) _(x) intersect select x from (values (row(1, 2)), (row(1, 4))) _(x); - QUERY PLAN ------------------------------------------------------ - SetOp Intersect - -> Sort - Sort Key: "*SELECT* 1".x - -> Append - -> Subquery Scan on "*SELECT* 1" - -> Values Scan on "*VALUES*" - -> Subquery Scan on "*SELECT* 2" - -> Values Scan on "*VALUES*_1" -(8 rows) - -select x from (values (row(1, 2)), (row(1, 3))) _(x) intersect select x from (values (row(1, 2)), (row(1, 4))) _(x); - x -------- - (1,2) -(1 row) - -explain (costs off) -select x from (values (row(1, 2)), (row(1, 3))) _(x) except select x from (values (row(1, 2)), (row(1, 4))) _(x); - QUERY PLAN ------------------------------------------------------ - SetOp Except - -> Sort - Sort Key: "*SELECT* 1".x - -> Append - -> Subquery Scan on "*SELECT* 1" - -> Values Scan on "*VALUES*" - -> Subquery Scan on "*SELECT* 2" - -> Values Scan on "*VALUES*_1" -(8 rows) - -select x from (values (row(1, 2)), (row(1, 3))) _(x) except select x from (values (row(1, 2)), (row(1, 4))) _(x); - x -------- - (1,3) -(1 row) - -reset enable_hashagg; --- --- Mixed types --- -SELECT f1 FROM float8_tbl INTERSECT SELECT f1 FROM int4_tbl ORDER BY 1; - f1 ----- - 0 -(1 row) - -SELECT f1 FROM float8_tbl EXCEPT SELECT f1 FROM int4_tbl ORDER BY 1; - f1 ------------------------ - -1.2345678901234e+200 - -1004.3 - -34.84 - -1.2345678901234e-200 -(4 rows) - --- --- Operator precedence and (((((extra))))) parentheses --- -SELECT q1 FROM int8_tbl INTERSECT SELECT q2 FROM int8_tbl UNION ALL SELECT q2 FROM int8_tbl ORDER BY 1; - q1 -------------------- - -4567890123456789 - 123 - 123 - 456 - 4567890123456789 - 4567890123456789 - 4567890123456789 -(7 rows) - -SELECT q1 FROM int8_tbl INTERSECT (((SELECT q2 FROM int8_tbl UNION ALL SELECT q2 FROM int8_tbl))) ORDER BY 1; - q1 ------------------- - 123 - 4567890123456789 -(2 rows) - -(((SELECT q1 FROM int8_tbl INTERSECT SELECT q2 FROM int8_tbl ORDER BY 1))) UNION ALL SELECT q2 FROM int8_tbl; - q1 -------------------- - 123 - 4567890123456789 - 456 - 4567890123456789 - 123 - 4567890123456789 - -4567890123456789 -(7 rows) - -SELECT q1 FROM int8_tbl UNION ALL SELECT q2 FROM int8_tbl EXCEPT SELECT q1 FROM int8_tbl ORDER BY 1; - q1 -------------------- - -4567890123456789 - 456 -(2 rows) - -SELECT q1 FROM int8_tbl UNION ALL (((SELECT q2 FROM int8_tbl EXCEPT SELECT q1 FROM int8_tbl ORDER BY 1))); - q1 -------------------- - 123 - 123 - 4567890123456789 - 4567890123456789 - 4567890123456789 - -4567890123456789 - 456 -(7 rows) - -(((SELECT q1 FROM int8_tbl UNION ALL SELECT q2 FROM int8_tbl))) EXCEPT SELECT q1 FROM int8_tbl ORDER BY 1; - q1 -------------------- - -4567890123456789 - 456 -(2 rows) - --- --- Subqueries with ORDER BY & LIMIT clauses --- --- In this syntax, ORDER BY/LIMIT apply to the result of the EXCEPT -SELECT q1,q2 FROM int8_tbl EXCEPT SELECT q2,q1 FROM int8_tbl -ORDER BY q2,q1; - q1 | q2 -------------------+------------------- - 4567890123456789 | -4567890123456789 - 123 | 456 -(2 rows) - --- This should fail, because q2 isn't a name of an EXCEPT output column -SELECT q1 FROM int8_tbl EXCEPT SELECT q2 FROM int8_tbl ORDER BY q2 LIMIT 1; -ERROR: column "q2" does not exist -LINE 1: ... int8_tbl EXCEPT SELECT q2 FROM int8_tbl ORDER BY q2 LIMIT 1... - ^ -HINT: There is a column named "q2" in table "*SELECT* 2", but it cannot be referenced from this part of the query. --- But this should work: -SELECT q1 FROM int8_tbl EXCEPT (((SELECT q2 FROM int8_tbl ORDER BY q2 LIMIT 1))) ORDER BY 1; - q1 ------------------- - 123 - 4567890123456789 -(2 rows) - --- --- New syntaxes (7.1) permit new tests --- -(((((select * from int8_tbl))))); - q1 | q2 -------------------+------------------- - 123 | 456 - 123 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(5 rows) - --- --- Check behavior with empty select list (allowed since 9.4) --- -select union select; --- -(1 row) - -select intersect select; --- -(1 row) - -select except select; --- -(0 rows) - --- check hashed implementation -set enable_hashagg = true; -set enable_sort = false; -explain (costs off) -select from generate_series(1,5) union select from generate_series(1,3); - QUERY PLAN ----------------------------------------------------------------- - HashAggregate - -> Append - -> Function Scan on generate_series - -> Function Scan on generate_series generate_series_1 -(4 rows) - -explain (costs off) -select from generate_series(1,5) intersect select from generate_series(1,3); - QUERY PLAN ----------------------------------------------------------------------- - HashSetOp Intersect - -> Append - -> Subquery Scan on "*SELECT* 1" - -> Function Scan on generate_series - -> Subquery Scan on "*SELECT* 2" - -> Function Scan on generate_series generate_series_1 -(6 rows) - -select from generate_series(1,5) union select from generate_series(1,3); --- -(1 row) - -select from generate_series(1,5) union all select from generate_series(1,3); --- -(8 rows) - -select from generate_series(1,5) intersect select from generate_series(1,3); --- -(1 row) - -select from generate_series(1,5) intersect all select from generate_series(1,3); --- -(3 rows) - -select from generate_series(1,5) except select from generate_series(1,3); --- -(0 rows) - -select from generate_series(1,5) except all select from generate_series(1,3); --- -(2 rows) - --- check sorted implementation -set enable_hashagg = false; -set enable_sort = true; -explain (costs off) -select from generate_series(1,5) union select from generate_series(1,3); - QUERY PLAN ----------------------------------------------------------------- - Unique - -> Append - -> Function Scan on generate_series - -> Function Scan on generate_series generate_series_1 -(4 rows) - -explain (costs off) -select from generate_series(1,5) intersect select from generate_series(1,3); - QUERY PLAN ----------------------------------------------------------------------- - SetOp Intersect - -> Append - -> Subquery Scan on "*SELECT* 1" - -> Function Scan on generate_series - -> Subquery Scan on "*SELECT* 2" - -> Function Scan on generate_series generate_series_1 -(6 rows) - -select from generate_series(1,5) union select from generate_series(1,3); --- -(1 row) - -select from generate_series(1,5) union all select from generate_series(1,3); --- -(8 rows) - -select from generate_series(1,5) intersect select from generate_series(1,3); --- -(1 row) - -select from generate_series(1,5) intersect all select from generate_series(1,3); --- -(3 rows) - -select from generate_series(1,5) except select from generate_series(1,3); --- -(0 rows) - -select from generate_series(1,5) except all select from generate_series(1,3); --- -(2 rows) - -reset enable_hashagg; -reset enable_sort; --- --- Check handling of a case with unknown constants. We don't guarantee --- an undecorated constant will work in all cases, but historically this --- usage has worked, so test we don't break it. --- -SELECT a.f1 FROM (SELECT 'test' AS f1 FROM varchar_tbl) a -UNION -SELECT b.f1 FROM (SELECT f1 FROM varchar_tbl) b -ORDER BY 1; - f1 ------- - a - ab - abcd - test -(4 rows) - --- This should fail, but it should produce an error cursor -SELECT '3.4'::numeric UNION SELECT 'foo'; -ERROR: invalid input syntax for type numeric: "foo" -LINE 1: SELECT '3.4'::numeric UNION SELECT 'foo'; - ^ --- --- Test that expression-index constraints can be pushed down through --- UNION or UNION ALL --- -CREATE TEMP TABLE t1 (a text, b text); -CREATE INDEX t1_ab_idx on t1 ((a || b)); -CREATE TEMP TABLE t2 (ab text primary key); -INSERT INTO t1 VALUES ('a', 'b'), ('x', 'y'); -INSERT INTO t2 VALUES ('ab'), ('xy'); -set enable_seqscan = off; -set enable_indexscan = on; -set enable_bitmapscan = off; -explain (costs off) - SELECT * FROM - (SELECT a || b AS ab FROM t1 - UNION ALL - SELECT * FROM t2) t - WHERE ab = 'ab'; - QUERY PLAN ---------------------------------------------- - Append - -> Index Scan using t1_ab_idx on t1 - Index Cond: ((a || b) = 'ab'::text) - -> Index Only Scan using t2_pkey on t2 - Index Cond: (ab = 'ab'::text) -(5 rows) - -explain (costs off) - SELECT * FROM - (SELECT a || b AS ab FROM t1 - UNION - SELECT * FROM t2) t - WHERE ab = 'ab'; - QUERY PLAN ---------------------------------------------------- - HashAggregate - Group Key: ((t1.a || t1.b)) - -> Append - -> Index Scan using t1_ab_idx on t1 - Index Cond: ((a || b) = 'ab'::text) - -> Index Only Scan using t2_pkey on t2 - Index Cond: (ab = 'ab'::text) -(7 rows) - --- --- Test that ORDER BY for UNION ALL can be pushed down to inheritance --- children. --- -CREATE TEMP TABLE t1c (b text, a text); -ALTER TABLE t1c INHERIT t1; -CREATE TEMP TABLE t2c (primary key (ab)) INHERITS (t2); -INSERT INTO t1c VALUES ('v', 'w'), ('c', 'd'), ('m', 'n'), ('e', 'f'); -INSERT INTO t2c VALUES ('vw'), ('cd'), ('mn'), ('ef'); -CREATE INDEX t1c_ab_idx on t1c ((a || b)); -set enable_seqscan = on; -set enable_indexonlyscan = off; -explain (costs off) - SELECT * FROM - (SELECT a || b AS ab FROM t1 - UNION ALL - SELECT ab FROM t2) t - ORDER BY 1 LIMIT 8; - QUERY PLAN ------------------------------------------------------ - Limit - -> Merge Append - Sort Key: ((t1.a || t1.b)) - -> Index Scan using t1_ab_idx on t1 - -> Index Scan using t1c_ab_idx on t1c t1_1 - -> Index Scan using t2_pkey on t2 - -> Index Scan using t2c_pkey on t2c t2_1 -(7 rows) - - SELECT * FROM - (SELECT a || b AS ab FROM t1 - UNION ALL - SELECT ab FROM t2) t - ORDER BY 1 LIMIT 8; - ab ----- - ab - ab - cd - dc - ef - fe - mn - nm -(8 rows) - -reset enable_seqscan; -reset enable_indexscan; -reset enable_bitmapscan; --- This simpler variant of the above test has been observed to fail differently -create table events (event_id int primary key); -create table other_events (event_id int primary key); -create table events_child () inherits (events); -explain (costs off) -select event_id - from (select event_id from events - union all - select event_id from other_events) ss - order by event_id; - QUERY PLAN ----------------------------------------------------------- - Merge Append - Sort Key: events.event_id - -> Index Scan using events_pkey on events - -> Sort - Sort Key: events_1.event_id - -> Seq Scan on events_child events_1 - -> Index Scan using other_events_pkey on other_events -(7 rows) - -drop table events_child, events, other_events; -reset enable_indexonlyscan; --- Test constraint exclusion of UNION ALL subqueries -explain (costs off) - SELECT * FROM - (SELECT 1 AS t, * FROM tenk1 a - UNION ALL - SELECT 2 AS t, * FROM tenk1 b) c - WHERE t = 2; - QUERY PLAN ---------------------- - Seq Scan on tenk1 b -(1 row) - --- Test that we push quals into UNION sub-selects only when it's safe -explain (costs off) -SELECT * FROM - (SELECT 1 AS t, 2 AS x - UNION - SELECT 2 AS t, 4 AS x) ss -WHERE x < 4 -ORDER BY x; - QUERY PLAN --------------------------------------------------- - Sort - Sort Key: (2) - -> Unique - -> Sort - Sort Key: (1), (2) - -> Append - -> Result - -> Result - One-Time Filter: false -(9 rows) - -SELECT * FROM - (SELECT 1 AS t, 2 AS x - UNION - SELECT 2 AS t, 4 AS x) ss -WHERE x < 4 -ORDER BY x; - t | x ----+--- - 1 | 2 -(1 row) - -explain (costs off) -SELECT * FROM - (SELECT 1 AS t, generate_series(1,10) AS x - UNION - SELECT 2 AS t, 4 AS x) ss -WHERE x < 4 -ORDER BY x; - QUERY PLAN --------------------------------------------------------- - Sort - Sort Key: ss.x - -> Subquery Scan on ss - Filter: (ss.x < 4) - -> HashAggregate - Group Key: (1), (generate_series(1, 10)) - -> Append - -> ProjectSet - -> Result - -> Result -(10 rows) - -SELECT * FROM - (SELECT 1 AS t, generate_series(1,10) AS x - UNION - SELECT 2 AS t, 4 AS x) ss -WHERE x < 4 -ORDER BY x; - t | x ----+--- - 1 | 1 - 1 | 2 - 1 | 3 -(3 rows) - -explain (costs off) -SELECT * FROM - (SELECT 1 AS t, (random()*3)::int AS x - UNION - SELECT 2 AS t, 4 AS x) ss -WHERE x > 3 -ORDER BY x; - QUERY PLAN ------------------------------------------------------------------------------------- - Sort - Sort Key: ss.x - -> Subquery Scan on ss - Filter: (ss.x > 3) - -> Unique - -> Sort - Sort Key: (1), (((random() * '3'::double precision))::integer) - -> Append - -> Result - -> Result -(10 rows) - -SELECT * FROM - (SELECT 1 AS t, (random()*3)::int AS x - UNION - SELECT 2 AS t, 4 AS x) ss -WHERE x > 3 -ORDER BY x; - t | x ----+--- - 2 | 4 -(1 row) - --- Test cases where the native ordering of a sub-select has more pathkeys --- than the outer query cares about -explain (costs off) -select distinct q1 from - (select distinct * from int8_tbl i81 - union all - select distinct * from int8_tbl i82) ss -where q2 = q2; - QUERY PLAN ----------------------------------------------------------- - Unique - -> Merge Append - Sort Key: "*SELECT* 1".q1 - -> Subquery Scan on "*SELECT* 1" - -> Unique - -> Sort - Sort Key: i81.q1, i81.q2 - -> Seq Scan on int8_tbl i81 - Filter: (q2 IS NOT NULL) - -> Subquery Scan on "*SELECT* 2" - -> Unique - -> Sort - Sort Key: i82.q1, i82.q2 - -> Seq Scan on int8_tbl i82 - Filter: (q2 IS NOT NULL) -(15 rows) - -select distinct q1 from - (select distinct * from int8_tbl i81 - union all - select distinct * from int8_tbl i82) ss -where q2 = q2; - q1 ------------------- - 123 - 4567890123456789 -(2 rows) - -explain (costs off) -select distinct q1 from - (select distinct * from int8_tbl i81 - union all - select distinct * from int8_tbl i82) ss -where -q1 = q2; - QUERY PLAN --------------------------------------------------------- - Unique - -> Merge Append - Sort Key: "*SELECT* 1".q1 - -> Subquery Scan on "*SELECT* 1" - -> Unique - -> Sort - Sort Key: i81.q1, i81.q2 - -> Seq Scan on int8_tbl i81 - Filter: ((- q1) = q2) - -> Subquery Scan on "*SELECT* 2" - -> Unique - -> Sort - Sort Key: i82.q1, i82.q2 - -> Seq Scan on int8_tbl i82 - Filter: ((- q1) = q2) -(15 rows) - -select distinct q1 from - (select distinct * from int8_tbl i81 - union all - select distinct * from int8_tbl i82) ss -where -q1 = q2; - q1 ------------------- - 4567890123456789 -(1 row) - --- Test proper handling of parameterized appendrel paths when the --- potential join qual is expensive -create function expensivefunc(int) returns int -language plpgsql immutable strict cost 10000 -as $$begin return $1; end$$; -create temp table t3 as select generate_series(-1000,1000) as x; -create index t3i on t3 (expensivefunc(x)); -analyze t3; -explain (costs off) -select * from - (select * from t3 a union all select * from t3 b) ss - join int4_tbl on f1 = expensivefunc(x); - QUERY PLAN ------------------------------------------------------------- - Nested Loop - -> Seq Scan on int4_tbl - -> Append - -> Index Scan using t3i on t3 a - Index Cond: (expensivefunc(x) = int4_tbl.f1) - -> Index Scan using t3i on t3 b - Index Cond: (expensivefunc(x) = int4_tbl.f1) -(7 rows) - -select * from - (select * from t3 a union all select * from t3 b) ss - join int4_tbl on f1 = expensivefunc(x); - x | f1 ----+---- - 0 | 0 - 0 | 0 -(2 rows) - -drop table t3; -drop function expensivefunc(int); --- Test handling of appendrel quals that const-simplify into an AND -explain (costs off) -select * from - (select *, 0 as x from int8_tbl a - union all - select *, 1 as x from int8_tbl b) ss -where (x = 0) or (q1 >= q2 and q1 <= q2); - QUERY PLAN ---------------------------------------------- - Append - -> Seq Scan on int8_tbl a - -> Seq Scan on int8_tbl b - Filter: ((q1 >= q2) AND (q1 <= q2)) -(4 rows) - -select * from - (select *, 0 as x from int8_tbl a - union all - select *, 1 as x from int8_tbl b) ss -where (x = 0) or (q1 >= q2 and q1 <= q2); - q1 | q2 | x -------------------+-------------------+--- - 123 | 456 | 0 - 123 | 4567890123456789 | 0 - 4567890123456789 | 123 | 0 - 4567890123456789 | 4567890123456789 | 0 - 4567890123456789 | -4567890123456789 | 0 - 4567890123456789 | 4567890123456789 | 1 -(6 rows) - +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/case.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/case.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/case.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/case.out 2023-02-20 19:45:46.309211042 -0500 @@ -1,419 +1 @@ --- --- CASE --- Test the case statement --- -CREATE TABLE CASE_TBL ( - i integer, - f double precision -); -CREATE TABLE CASE2_TBL ( - i integer, - j integer -); -INSERT INTO CASE_TBL VALUES (1, 10.1); -INSERT INTO CASE_TBL VALUES (2, 20.2); -INSERT INTO CASE_TBL VALUES (3, -30.3); -INSERT INTO CASE_TBL VALUES (4, NULL); -INSERT INTO CASE2_TBL VALUES (1, -1); -INSERT INTO CASE2_TBL VALUES (2, -2); -INSERT INTO CASE2_TBL VALUES (3, -3); -INSERT INTO CASE2_TBL VALUES (2, -4); -INSERT INTO CASE2_TBL VALUES (1, NULL); -INSERT INTO CASE2_TBL VALUES (NULL, -6); --- --- Simplest examples without tables --- -SELECT '3' AS "One", - CASE - WHEN 1 < 2 THEN 3 - END AS "Simple WHEN"; - One | Simple WHEN ------+------------- - 3 | 3 -(1 row) - -SELECT '' AS "One", - CASE - WHEN 1 > 2 THEN 3 - END AS "Simple default"; - One | Simple default ---------+---------------- - | -(1 row) - -SELECT '3' AS "One", - CASE - WHEN 1 < 2 THEN 3 - ELSE 4 - END AS "Simple ELSE"; - One | Simple ELSE ------+------------- - 3 | 3 -(1 row) - -SELECT '4' AS "One", - CASE - WHEN 1 > 2 THEN 3 - ELSE 4 - END AS "ELSE default"; - One | ELSE default ------+-------------- - 4 | 4 -(1 row) - -SELECT '6' AS "One", - CASE - WHEN 1 > 2 THEN 3 - WHEN 4 < 5 THEN 6 - ELSE 7 - END AS "Two WHEN with default"; - One | Two WHEN with default ------+----------------------- - 6 | 6 -(1 row) - -SELECT '7' AS "None", - CASE WHEN random() < 0 THEN 1 - END AS "NULL on no matches"; - None | NULL on no matches -------+-------------------- - 7 | -(1 row) - --- Constant-expression folding shouldn't evaluate unreachable subexpressions -SELECT CASE WHEN 1=0 THEN 1/0 WHEN 1=1 THEN 1 ELSE 2/0 END; - case ------- - 1 -(1 row) - -SELECT CASE 1 WHEN 0 THEN 1/0 WHEN 1 THEN 1 ELSE 2/0 END; - case ------- - 1 -(1 row) - --- However we do not currently suppress folding of potentially --- reachable subexpressions -SELECT CASE WHEN i > 100 THEN 1/0 ELSE 0 END FROM case_tbl; -ERROR: division by zero --- Test for cases involving untyped literals in test expression -SELECT CASE 'a' WHEN 'a' THEN 1 ELSE 2 END; - case ------- - 1 -(1 row) - --- --- Examples of targets involving tables --- -SELECT - CASE - WHEN i >= 3 THEN i - END AS ">= 3 or Null" - FROM CASE_TBL; - >= 3 or Null --------------- - - - 3 - 4 -(4 rows) - -SELECT - CASE WHEN i >= 3 THEN (i + i) - ELSE i - END AS "Simplest Math" - FROM CASE_TBL; - Simplest Math ---------------- - 1 - 2 - 6 - 8 -(4 rows) - -SELECT i AS "Value", - CASE WHEN (i < 0) THEN 'small' - WHEN (i = 0) THEN 'zero' - WHEN (i = 1) THEN 'one' - WHEN (i = 2) THEN 'two' - ELSE 'big' - END AS "Category" - FROM CASE_TBL; - Value | Category --------+---------- - 1 | one - 2 | two - 3 | big - 4 | big -(4 rows) - -SELECT - CASE WHEN ((i < 0) or (i < 0)) THEN 'small' - WHEN ((i = 0) or (i = 0)) THEN 'zero' - WHEN ((i = 1) or (i = 1)) THEN 'one' - WHEN ((i = 2) or (i = 2)) THEN 'two' - ELSE 'big' - END AS "Category" - FROM CASE_TBL; - Category ----------- - one - two - big - big -(4 rows) - --- --- Examples of qualifications involving tables --- --- --- NULLIF() and COALESCE() --- Shorthand forms for typical CASE constructs --- defined in the SQL standard. --- -SELECT * FROM CASE_TBL WHERE COALESCE(f,i) = 4; - i | f ----+--- - 4 | -(1 row) - -SELECT * FROM CASE_TBL WHERE NULLIF(f,i) = 2; - i | f ----+--- -(0 rows) - -SELECT COALESCE(a.f, b.i, b.j) - FROM CASE_TBL a, CASE2_TBL b; - coalesce ----------- - 10.1 - 20.2 - -30.3 - 1 - 10.1 - 20.2 - -30.3 - 2 - 10.1 - 20.2 - -30.3 - 3 - 10.1 - 20.2 - -30.3 - 2 - 10.1 - 20.2 - -30.3 - 1 - 10.1 - 20.2 - -30.3 - -6 -(24 rows) - -SELECT * - FROM CASE_TBL a, CASE2_TBL b - WHERE COALESCE(a.f, b.i, b.j) = 2; - i | f | i | j ----+---+---+---- - 4 | | 2 | -2 - 4 | | 2 | -4 -(2 rows) - -SELECT NULLIF(a.i,b.i) AS "NULLIF(a.i,b.i)", - NULLIF(b.i, 4) AS "NULLIF(b.i,4)" - FROM CASE_TBL a, CASE2_TBL b; - NULLIF(a.i,b.i) | NULLIF(b.i,4) ------------------+--------------- - | 1 - 2 | 1 - 3 | 1 - 4 | 1 - 1 | 2 - | 2 - 3 | 2 - 4 | 2 - 1 | 3 - 2 | 3 - | 3 - 4 | 3 - 1 | 2 - | 2 - 3 | 2 - 4 | 2 - | 1 - 2 | 1 - 3 | 1 - 4 | 1 - 1 | - 2 | - 3 | - 4 | -(24 rows) - -SELECT * - FROM CASE_TBL a, CASE2_TBL b - WHERE COALESCE(f,b.i) = 2; - i | f | i | j ----+---+---+---- - 4 | | 2 | -2 - 4 | | 2 | -4 -(2 rows) - --- Tests for constant subexpression simplification -explain (costs off) -SELECT * FROM CASE_TBL WHERE NULLIF(1, 2) = 2; - QUERY PLAN --------------------------- - Result - One-Time Filter: false -(2 rows) - -explain (costs off) -SELECT * FROM CASE_TBL WHERE NULLIF(1, 1) IS NOT NULL; - QUERY PLAN --------------------------- - Result - One-Time Filter: false -(2 rows) - -explain (costs off) -SELECT * FROM CASE_TBL WHERE NULLIF(1, null) = 2; - QUERY PLAN --------------------------- - Result - One-Time Filter: false -(2 rows) - --- --- Examples of updates involving tables --- -UPDATE CASE_TBL - SET i = CASE WHEN i >= 3 THEN (- i) - ELSE (2 * i) END; -SELECT * FROM CASE_TBL; - i | f -----+------- - 2 | 10.1 - 4 | 20.2 - -3 | -30.3 - -4 | -(4 rows) - -UPDATE CASE_TBL - SET i = CASE WHEN i >= 2 THEN (2 * i) - ELSE (3 * i) END; -SELECT * FROM CASE_TBL; - i | f ------+------- - 4 | 10.1 - 8 | 20.2 - -9 | -30.3 - -12 | -(4 rows) - -UPDATE CASE_TBL - SET i = CASE WHEN b.i >= 2 THEN (2 * j) - ELSE (3 * j) END - FROM CASE2_TBL b - WHERE j = -CASE_TBL.i; -SELECT * FROM CASE_TBL; - i | f ------+------- - 8 | 20.2 - -9 | -30.3 - -12 | - -8 | 10.1 -(4 rows) - --- --- Nested CASE expressions --- --- This test exercises a bug caused by aliasing econtext->caseValue_isNull --- with the isNull argument of the inner CASE's CaseExpr evaluation. After --- evaluating the vol(null) expression in the inner CASE's second WHEN-clause, --- the isNull flag for the case test value incorrectly became true, causing --- the third WHEN-clause not to match. The volatile function calls are needed --- to prevent constant-folding in the planner, which would hide the bug. --- Wrap this in a single transaction so the transient '=' operator doesn't --- cause problems in concurrent sessions -BEGIN; -CREATE FUNCTION vol(text) returns text as - 'begin return $1; end' language plpgsql volatile; -SELECT CASE - (CASE vol('bar') - WHEN 'foo' THEN 'it was foo!' - WHEN vol(null) THEN 'null input' - WHEN 'bar' THEN 'it was bar!' END - ) - WHEN 'it was foo!' THEN 'foo recognized' - WHEN 'it was bar!' THEN 'bar recognized' - ELSE 'unrecognized' END; - case ----------------- - bar recognized -(1 row) - --- In this case, we can't inline the SQL function without confusing things. -CREATE DOMAIN foodomain AS text; -CREATE FUNCTION volfoo(text) returns foodomain as - 'begin return $1::foodomain; end' language plpgsql volatile; -CREATE FUNCTION inline_eq(foodomain, foodomain) returns boolean as - 'SELECT CASE $2::text WHEN $1::text THEN true ELSE false END' language sql; -CREATE OPERATOR = (procedure = inline_eq, - leftarg = foodomain, rightarg = foodomain); -SELECT CASE volfoo('bar') WHEN 'foo'::foodomain THEN 'is foo' ELSE 'is not foo' END; - case ------------- - is not foo -(1 row) - -ROLLBACK; --- Test multiple evaluation of a CASE arg that is a read/write object (#14472) --- Wrap this in a single transaction so the transient '=' operator doesn't --- cause problems in concurrent sessions -BEGIN; -CREATE DOMAIN arrdomain AS int[]; -CREATE FUNCTION make_ad(int,int) returns arrdomain as - 'declare x arrdomain; - begin - x := array[$1,$2]; - return x; - end' language plpgsql volatile; -CREATE FUNCTION ad_eq(arrdomain, arrdomain) returns boolean as - 'begin return array_eq($1, $2); end' language plpgsql; -CREATE OPERATOR = (procedure = ad_eq, - leftarg = arrdomain, rightarg = arrdomain); -SELECT CASE make_ad(1,2) - WHEN array[2,4]::arrdomain THEN 'wrong' - WHEN array[2,5]::arrdomain THEN 'still wrong' - WHEN array[1,2]::arrdomain THEN 'right' - END; - case -------- - right -(1 row) - -ROLLBACK; --- Test interaction of CASE with ArrayCoerceExpr (bug #15471) -BEGIN; -CREATE TYPE casetestenum AS ENUM ('e', 'f', 'g'); -SELECT - CASE 'foo'::text - WHEN 'foo' THEN ARRAY['a', 'b', 'c', 'd'] || enum_range(NULL::casetestenum)::text[] - ELSE ARRAY['x', 'y'] - END; - array ------------------ - {a,b,c,d,e,f,g} -(1 row) - -ROLLBACK; --- --- Clean up --- -DROP TABLE CASE_TBL; -DROP TABLE CASE2_TBL; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/join.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/join.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/join.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/join.out 2023-02-20 19:45:46.299211041 -0500 @@ -1,6598 +1 @@ --- --- JOIN --- Test JOIN clauses --- -CREATE TABLE J1_TBL ( - i integer, - j integer, - t text -); -CREATE TABLE J2_TBL ( - i integer, - k integer -); -INSERT INTO J1_TBL VALUES (1, 4, 'one'); -INSERT INTO J1_TBL VALUES (2, 3, 'two'); -INSERT INTO J1_TBL VALUES (3, 2, 'three'); -INSERT INTO J1_TBL VALUES (4, 1, 'four'); -INSERT INTO J1_TBL VALUES (5, 0, 'five'); -INSERT INTO J1_TBL VALUES (6, 6, 'six'); -INSERT INTO J1_TBL VALUES (7, 7, 'seven'); -INSERT INTO J1_TBL VALUES (8, 8, 'eight'); -INSERT INTO J1_TBL VALUES (0, NULL, 'zero'); -INSERT INTO J1_TBL VALUES (NULL, NULL, 'null'); -INSERT INTO J1_TBL VALUES (NULL, 0, 'zero'); -INSERT INTO J2_TBL VALUES (1, -1); -INSERT INTO J2_TBL VALUES (2, 2); -INSERT INTO J2_TBL VALUES (3, -3); -INSERT INTO J2_TBL VALUES (2, 4); -INSERT INTO J2_TBL VALUES (5, -5); -INSERT INTO J2_TBL VALUES (5, -5); -INSERT INTO J2_TBL VALUES (0, NULL); -INSERT INTO J2_TBL VALUES (NULL, NULL); -INSERT INTO J2_TBL VALUES (NULL, 0); --- useful in some tests below -create temp table onerow(); -insert into onerow default values; -analyze onerow; --- --- CORRELATION NAMES --- Make sure that table/column aliases are supported --- before diving into more complex join syntax. --- -SELECT * - FROM J1_TBL AS tx; - i | j | t ----+---+------- - 1 | 4 | one - 2 | 3 | two - 3 | 2 | three - 4 | 1 | four - 5 | 0 | five - 6 | 6 | six - 7 | 7 | seven - 8 | 8 | eight - 0 | | zero - | | null - | 0 | zero -(11 rows) - -SELECT * - FROM J1_TBL tx; - i | j | t ----+---+------- - 1 | 4 | one - 2 | 3 | two - 3 | 2 | three - 4 | 1 | four - 5 | 0 | five - 6 | 6 | six - 7 | 7 | seven - 8 | 8 | eight - 0 | | zero - | | null - | 0 | zero -(11 rows) - -SELECT * - FROM J1_TBL AS t1 (a, b, c); - a | b | c ----+---+------- - 1 | 4 | one - 2 | 3 | two - 3 | 2 | three - 4 | 1 | four - 5 | 0 | five - 6 | 6 | six - 7 | 7 | seven - 8 | 8 | eight - 0 | | zero - | | null - | 0 | zero -(11 rows) - -SELECT * - FROM J1_TBL t1 (a, b, c); - a | b | c ----+---+------- - 1 | 4 | one - 2 | 3 | two - 3 | 2 | three - 4 | 1 | four - 5 | 0 | five - 6 | 6 | six - 7 | 7 | seven - 8 | 8 | eight - 0 | | zero - | | null - | 0 | zero -(11 rows) - -SELECT * - FROM J1_TBL t1 (a, b, c), J2_TBL t2 (d, e); - a | b | c | d | e ----+---+-------+---+---- - 1 | 4 | one | 1 | -1 - 2 | 3 | two | 1 | -1 - 3 | 2 | three | 1 | -1 - 4 | 1 | four | 1 | -1 - 5 | 0 | five | 1 | -1 - 6 | 6 | six | 1 | -1 - 7 | 7 | seven | 1 | -1 - 8 | 8 | eight | 1 | -1 - 0 | | zero | 1 | -1 - | | null | 1 | -1 - | 0 | zero | 1 | -1 - 1 | 4 | one | 2 | 2 - 2 | 3 | two | 2 | 2 - 3 | 2 | three | 2 | 2 - 4 | 1 | four | 2 | 2 - 5 | 0 | five | 2 | 2 - 6 | 6 | six | 2 | 2 - 7 | 7 | seven | 2 | 2 - 8 | 8 | eight | 2 | 2 - 0 | | zero | 2 | 2 - | | null | 2 | 2 - | 0 | zero | 2 | 2 - 1 | 4 | one | 3 | -3 - 2 | 3 | two | 3 | -3 - 3 | 2 | three | 3 | -3 - 4 | 1 | four | 3 | -3 - 5 | 0 | five | 3 | -3 - 6 | 6 | six | 3 | -3 - 7 | 7 | seven | 3 | -3 - 8 | 8 | eight | 3 | -3 - 0 | | zero | 3 | -3 - | | null | 3 | -3 - | 0 | zero | 3 | -3 - 1 | 4 | one | 2 | 4 - 2 | 3 | two | 2 | 4 - 3 | 2 | three | 2 | 4 - 4 | 1 | four | 2 | 4 - 5 | 0 | five | 2 | 4 - 6 | 6 | six | 2 | 4 - 7 | 7 | seven | 2 | 4 - 8 | 8 | eight | 2 | 4 - 0 | | zero | 2 | 4 - | | null | 2 | 4 - | 0 | zero | 2 | 4 - 1 | 4 | one | 5 | -5 - 2 | 3 | two | 5 | -5 - 3 | 2 | three | 5 | -5 - 4 | 1 | four | 5 | -5 - 5 | 0 | five | 5 | -5 - 6 | 6 | six | 5 | -5 - 7 | 7 | seven | 5 | -5 - 8 | 8 | eight | 5 | -5 - 0 | | zero | 5 | -5 - | | null | 5 | -5 - | 0 | zero | 5 | -5 - 1 | 4 | one | 5 | -5 - 2 | 3 | two | 5 | -5 - 3 | 2 | three | 5 | -5 - 4 | 1 | four | 5 | -5 - 5 | 0 | five | 5 | -5 - 6 | 6 | six | 5 | -5 - 7 | 7 | seven | 5 | -5 - 8 | 8 | eight | 5 | -5 - 0 | | zero | 5 | -5 - | | null | 5 | -5 - | 0 | zero | 5 | -5 - 1 | 4 | one | 0 | - 2 | 3 | two | 0 | - 3 | 2 | three | 0 | - 4 | 1 | four | 0 | - 5 | 0 | five | 0 | - 6 | 6 | six | 0 | - 7 | 7 | seven | 0 | - 8 | 8 | eight | 0 | - 0 | | zero | 0 | - | | null | 0 | - | 0 | zero | 0 | - 1 | 4 | one | | - 2 | 3 | two | | - 3 | 2 | three | | - 4 | 1 | four | | - 5 | 0 | five | | - 6 | 6 | six | | - 7 | 7 | seven | | - 8 | 8 | eight | | - 0 | | zero | | - | | null | | - | 0 | zero | | - 1 | 4 | one | | 0 - 2 | 3 | two | | 0 - 3 | 2 | three | | 0 - 4 | 1 | four | | 0 - 5 | 0 | five | | 0 - 6 | 6 | six | | 0 - 7 | 7 | seven | | 0 - 8 | 8 | eight | | 0 - 0 | | zero | | 0 - | | null | | 0 - | 0 | zero | | 0 -(99 rows) - -SELECT t1.a, t2.e - FROM J1_TBL t1 (a, b, c), J2_TBL t2 (d, e) - WHERE t1.a = t2.d; - a | e ----+---- - 0 | - 1 | -1 - 2 | 2 - 2 | 4 - 3 | -3 - 5 | -5 - 5 | -5 -(7 rows) - --- --- CROSS JOIN --- Qualifications are not allowed on cross joins, --- which degenerate into a standard unqualified inner join. --- -SELECT * - FROM J1_TBL CROSS JOIN J2_TBL; - i | j | t | i | k ----+---+-------+---+---- - 1 | 4 | one | 1 | -1 - 2 | 3 | two | 1 | -1 - 3 | 2 | three | 1 | -1 - 4 | 1 | four | 1 | -1 - 5 | 0 | five | 1 | -1 - 6 | 6 | six | 1 | -1 - 7 | 7 | seven | 1 | -1 - 8 | 8 | eight | 1 | -1 - 0 | | zero | 1 | -1 - | | null | 1 | -1 - | 0 | zero | 1 | -1 - 1 | 4 | one | 2 | 2 - 2 | 3 | two | 2 | 2 - 3 | 2 | three | 2 | 2 - 4 | 1 | four | 2 | 2 - 5 | 0 | five | 2 | 2 - 6 | 6 | six | 2 | 2 - 7 | 7 | seven | 2 | 2 - 8 | 8 | eight | 2 | 2 - 0 | | zero | 2 | 2 - | | null | 2 | 2 - | 0 | zero | 2 | 2 - 1 | 4 | one | 3 | -3 - 2 | 3 | two | 3 | -3 - 3 | 2 | three | 3 | -3 - 4 | 1 | four | 3 | -3 - 5 | 0 | five | 3 | -3 - 6 | 6 | six | 3 | -3 - 7 | 7 | seven | 3 | -3 - 8 | 8 | eight | 3 | -3 - 0 | | zero | 3 | -3 - | | null | 3 | -3 - | 0 | zero | 3 | -3 - 1 | 4 | one | 2 | 4 - 2 | 3 | two | 2 | 4 - 3 | 2 | three | 2 | 4 - 4 | 1 | four | 2 | 4 - 5 | 0 | five | 2 | 4 - 6 | 6 | six | 2 | 4 - 7 | 7 | seven | 2 | 4 - 8 | 8 | eight | 2 | 4 - 0 | | zero | 2 | 4 - | | null | 2 | 4 - | 0 | zero | 2 | 4 - 1 | 4 | one | 5 | -5 - 2 | 3 | two | 5 | -5 - 3 | 2 | three | 5 | -5 - 4 | 1 | four | 5 | -5 - 5 | 0 | five | 5 | -5 - 6 | 6 | six | 5 | -5 - 7 | 7 | seven | 5 | -5 - 8 | 8 | eight | 5 | -5 - 0 | | zero | 5 | -5 - | | null | 5 | -5 - | 0 | zero | 5 | -5 - 1 | 4 | one | 5 | -5 - 2 | 3 | two | 5 | -5 - 3 | 2 | three | 5 | -5 - 4 | 1 | four | 5 | -5 - 5 | 0 | five | 5 | -5 - 6 | 6 | six | 5 | -5 - 7 | 7 | seven | 5 | -5 - 8 | 8 | eight | 5 | -5 - 0 | | zero | 5 | -5 - | | null | 5 | -5 - | 0 | zero | 5 | -5 - 1 | 4 | one | 0 | - 2 | 3 | two | 0 | - 3 | 2 | three | 0 | - 4 | 1 | four | 0 | - 5 | 0 | five | 0 | - 6 | 6 | six | 0 | - 7 | 7 | seven | 0 | - 8 | 8 | eight | 0 | - 0 | | zero | 0 | - | | null | 0 | - | 0 | zero | 0 | - 1 | 4 | one | | - 2 | 3 | two | | - 3 | 2 | three | | - 4 | 1 | four | | - 5 | 0 | five | | - 6 | 6 | six | | - 7 | 7 | seven | | - 8 | 8 | eight | | - 0 | | zero | | - | | null | | - | 0 | zero | | - 1 | 4 | one | | 0 - 2 | 3 | two | | 0 - 3 | 2 | three | | 0 - 4 | 1 | four | | 0 - 5 | 0 | five | | 0 - 6 | 6 | six | | 0 - 7 | 7 | seven | | 0 - 8 | 8 | eight | | 0 - 0 | | zero | | 0 - | | null | | 0 - | 0 | zero | | 0 -(99 rows) - --- ambiguous column -SELECT i, k, t - FROM J1_TBL CROSS JOIN J2_TBL; -ERROR: column reference "i" is ambiguous -LINE 1: SELECT i, k, t - ^ --- resolve previous ambiguity by specifying the table name -SELECT t1.i, k, t - FROM J1_TBL t1 CROSS JOIN J2_TBL t2; - i | k | t ----+----+------- - 1 | -1 | one - 2 | -1 | two - 3 | -1 | three - 4 | -1 | four - 5 | -1 | five - 6 | -1 | six - 7 | -1 | seven - 8 | -1 | eight - 0 | -1 | zero - | -1 | null - | -1 | zero - 1 | 2 | one - 2 | 2 | two - 3 | 2 | three - 4 | 2 | four - 5 | 2 | five - 6 | 2 | six - 7 | 2 | seven - 8 | 2 | eight - 0 | 2 | zero - | 2 | null - | 2 | zero - 1 | -3 | one - 2 | -3 | two - 3 | -3 | three - 4 | -3 | four - 5 | -3 | five - 6 | -3 | six - 7 | -3 | seven - 8 | -3 | eight - 0 | -3 | zero - | -3 | null - | -3 | zero - 1 | 4 | one - 2 | 4 | two - 3 | 4 | three - 4 | 4 | four - 5 | 4 | five - 6 | 4 | six - 7 | 4 | seven - 8 | 4 | eight - 0 | 4 | zero - | 4 | null - | 4 | zero - 1 | -5 | one - 2 | -5 | two - 3 | -5 | three - 4 | -5 | four - 5 | -5 | five - 6 | -5 | six - 7 | -5 | seven - 8 | -5 | eight - 0 | -5 | zero - | -5 | null - | -5 | zero - 1 | -5 | one - 2 | -5 | two - 3 | -5 | three - 4 | -5 | four - 5 | -5 | five - 6 | -5 | six - 7 | -5 | seven - 8 | -5 | eight - 0 | -5 | zero - | -5 | null - | -5 | zero - 1 | | one - 2 | | two - 3 | | three - 4 | | four - 5 | | five - 6 | | six - 7 | | seven - 8 | | eight - 0 | | zero - | | null - | | zero - 1 | | one - 2 | | two - 3 | | three - 4 | | four - 5 | | five - 6 | | six - 7 | | seven - 8 | | eight - 0 | | zero - | | null - | | zero - 1 | 0 | one - 2 | 0 | two - 3 | 0 | three - 4 | 0 | four - 5 | 0 | five - 6 | 0 | six - 7 | 0 | seven - 8 | 0 | eight - 0 | 0 | zero - | 0 | null - | 0 | zero -(99 rows) - -SELECT ii, tt, kk - FROM (J1_TBL CROSS JOIN J2_TBL) - AS tx (ii, jj, tt, ii2, kk); - ii | tt | kk -----+-------+---- - 1 | one | -1 - 2 | two | -1 - 3 | three | -1 - 4 | four | -1 - 5 | five | -1 - 6 | six | -1 - 7 | seven | -1 - 8 | eight | -1 - 0 | zero | -1 - | null | -1 - | zero | -1 - 1 | one | 2 - 2 | two | 2 - 3 | three | 2 - 4 | four | 2 - 5 | five | 2 - 6 | six | 2 - 7 | seven | 2 - 8 | eight | 2 - 0 | zero | 2 - | null | 2 - | zero | 2 - 1 | one | -3 - 2 | two | -3 - 3 | three | -3 - 4 | four | -3 - 5 | five | -3 - 6 | six | -3 - 7 | seven | -3 - 8 | eight | -3 - 0 | zero | -3 - | null | -3 - | zero | -3 - 1 | one | 4 - 2 | two | 4 - 3 | three | 4 - 4 | four | 4 - 5 | five | 4 - 6 | six | 4 - 7 | seven | 4 - 8 | eight | 4 - 0 | zero | 4 - | null | 4 - | zero | 4 - 1 | one | -5 - 2 | two | -5 - 3 | three | -5 - 4 | four | -5 - 5 | five | -5 - 6 | six | -5 - 7 | seven | -5 - 8 | eight | -5 - 0 | zero | -5 - | null | -5 - | zero | -5 - 1 | one | -5 - 2 | two | -5 - 3 | three | -5 - 4 | four | -5 - 5 | five | -5 - 6 | six | -5 - 7 | seven | -5 - 8 | eight | -5 - 0 | zero | -5 - | null | -5 - | zero | -5 - 1 | one | - 2 | two | - 3 | three | - 4 | four | - 5 | five | - 6 | six | - 7 | seven | - 8 | eight | - 0 | zero | - | null | - | zero | - 1 | one | - 2 | two | - 3 | three | - 4 | four | - 5 | five | - 6 | six | - 7 | seven | - 8 | eight | - 0 | zero | - | null | - | zero | - 1 | one | 0 - 2 | two | 0 - 3 | three | 0 - 4 | four | 0 - 5 | five | 0 - 6 | six | 0 - 7 | seven | 0 - 8 | eight | 0 - 0 | zero | 0 - | null | 0 - | zero | 0 -(99 rows) - -SELECT tx.ii, tx.jj, tx.kk - FROM (J1_TBL t1 (a, b, c) CROSS JOIN J2_TBL t2 (d, e)) - AS tx (ii, jj, tt, ii2, kk); - ii | jj | kk -----+----+---- - 1 | 4 | -1 - 2 | 3 | -1 - 3 | 2 | -1 - 4 | 1 | -1 - 5 | 0 | -1 - 6 | 6 | -1 - 7 | 7 | -1 - 8 | 8 | -1 - 0 | | -1 - | | -1 - | 0 | -1 - 1 | 4 | 2 - 2 | 3 | 2 - 3 | 2 | 2 - 4 | 1 | 2 - 5 | 0 | 2 - 6 | 6 | 2 - 7 | 7 | 2 - 8 | 8 | 2 - 0 | | 2 - | | 2 - | 0 | 2 - 1 | 4 | -3 - 2 | 3 | -3 - 3 | 2 | -3 - 4 | 1 | -3 - 5 | 0 | -3 - 6 | 6 | -3 - 7 | 7 | -3 - 8 | 8 | -3 - 0 | | -3 - | | -3 - | 0 | -3 - 1 | 4 | 4 - 2 | 3 | 4 - 3 | 2 | 4 - 4 | 1 | 4 - 5 | 0 | 4 - 6 | 6 | 4 - 7 | 7 | 4 - 8 | 8 | 4 - 0 | | 4 - | | 4 - | 0 | 4 - 1 | 4 | -5 - 2 | 3 | -5 - 3 | 2 | -5 - 4 | 1 | -5 - 5 | 0 | -5 - 6 | 6 | -5 - 7 | 7 | -5 - 8 | 8 | -5 - 0 | | -5 - | | -5 - | 0 | -5 - 1 | 4 | -5 - 2 | 3 | -5 - 3 | 2 | -5 - 4 | 1 | -5 - 5 | 0 | -5 - 6 | 6 | -5 - 7 | 7 | -5 - 8 | 8 | -5 - 0 | | -5 - | | -5 - | 0 | -5 - 1 | 4 | - 2 | 3 | - 3 | 2 | - 4 | 1 | - 5 | 0 | - 6 | 6 | - 7 | 7 | - 8 | 8 | - 0 | | - | | - | 0 | - 1 | 4 | - 2 | 3 | - 3 | 2 | - 4 | 1 | - 5 | 0 | - 6 | 6 | - 7 | 7 | - 8 | 8 | - 0 | | - | | - | 0 | - 1 | 4 | 0 - 2 | 3 | 0 - 3 | 2 | 0 - 4 | 1 | 0 - 5 | 0 | 0 - 6 | 6 | 0 - 7 | 7 | 0 - 8 | 8 | 0 - 0 | | 0 - | | 0 - | 0 | 0 -(99 rows) - -SELECT * - FROM J1_TBL CROSS JOIN J2_TBL a CROSS JOIN J2_TBL b; - i | j | t | i | k | i | k ----+---+-------+---+----+---+---- - 1 | 4 | one | 1 | -1 | 1 | -1 - 1 | 4 | one | 1 | -1 | 2 | 2 - 1 | 4 | one | 1 | -1 | 3 | -3 - 1 | 4 | one | 1 | -1 | 2 | 4 - 1 | 4 | one | 1 | -1 | 5 | -5 - 1 | 4 | one | 1 | -1 | 5 | -5 - 1 | 4 | one | 1 | -1 | 0 | - 1 | 4 | one | 1 | -1 | | - 1 | 4 | one | 1 | -1 | | 0 - 2 | 3 | two | 1 | -1 | 1 | -1 - 2 | 3 | two | 1 | -1 | 2 | 2 - 2 | 3 | two | 1 | -1 | 3 | -3 - 2 | 3 | two | 1 | -1 | 2 | 4 - 2 | 3 | two | 1 | -1 | 5 | -5 - 2 | 3 | two | 1 | -1 | 5 | -5 - 2 | 3 | two | 1 | -1 | 0 | - 2 | 3 | two | 1 | -1 | | - 2 | 3 | two | 1 | -1 | | 0 - 3 | 2 | three | 1 | -1 | 1 | -1 - 3 | 2 | three | 1 | -1 | 2 | 2 - 3 | 2 | three | 1 | -1 | 3 | -3 - 3 | 2 | three | 1 | -1 | 2 | 4 - 3 | 2 | three | 1 | -1 | 5 | -5 - 3 | 2 | three | 1 | -1 | 5 | -5 - 3 | 2 | three | 1 | -1 | 0 | - 3 | 2 | three | 1 | -1 | | - 3 | 2 | three | 1 | -1 | | 0 - 4 | 1 | four | 1 | -1 | 1 | -1 - 4 | 1 | four | 1 | -1 | 2 | 2 - 4 | 1 | four | 1 | -1 | 3 | -3 - 4 | 1 | four | 1 | -1 | 2 | 4 - 4 | 1 | four | 1 | -1 | 5 | -5 - 4 | 1 | four | 1 | -1 | 5 | -5 - 4 | 1 | four | 1 | -1 | 0 | - 4 | 1 | four | 1 | -1 | | - 4 | 1 | four | 1 | -1 | | 0 - 5 | 0 | five | 1 | -1 | 1 | -1 - 5 | 0 | five | 1 | -1 | 2 | 2 - 5 | 0 | five | 1 | -1 | 3 | -3 - 5 | 0 | five | 1 | -1 | 2 | 4 - 5 | 0 | five | 1 | -1 | 5 | -5 - 5 | 0 | five | 1 | -1 | 5 | -5 - 5 | 0 | five | 1 | -1 | 0 | - 5 | 0 | five | 1 | -1 | | - 5 | 0 | five | 1 | -1 | | 0 - 6 | 6 | six | 1 | -1 | 1 | -1 - 6 | 6 | six | 1 | -1 | 2 | 2 - 6 | 6 | six | 1 | -1 | 3 | -3 - 6 | 6 | six | 1 | -1 | 2 | 4 - 6 | 6 | six | 1 | -1 | 5 | -5 - 6 | 6 | six | 1 | -1 | 5 | -5 - 6 | 6 | six | 1 | -1 | 0 | - 6 | 6 | six | 1 | -1 | | - 6 | 6 | six | 1 | -1 | | 0 - 7 | 7 | seven | 1 | -1 | 1 | -1 - 7 | 7 | seven | 1 | -1 | 2 | 2 - 7 | 7 | seven | 1 | -1 | 3 | -3 - 7 | 7 | seven | 1 | -1 | 2 | 4 - 7 | 7 | seven | 1 | -1 | 5 | -5 - 7 | 7 | seven | 1 | -1 | 5 | -5 - 7 | 7 | seven | 1 | -1 | 0 | - 7 | 7 | seven | 1 | -1 | | - 7 | 7 | seven | 1 | -1 | | 0 - 8 | 8 | eight | 1 | -1 | 1 | -1 - 8 | 8 | eight | 1 | -1 | 2 | 2 - 8 | 8 | eight | 1 | -1 | 3 | -3 - 8 | 8 | eight | 1 | -1 | 2 | 4 - 8 | 8 | eight | 1 | -1 | 5 | -5 - 8 | 8 | eight | 1 | -1 | 5 | -5 - 8 | 8 | eight | 1 | -1 | 0 | - 8 | 8 | eight | 1 | -1 | | - 8 | 8 | eight | 1 | -1 | | 0 - 0 | | zero | 1 | -1 | 1 | -1 - 0 | | zero | 1 | -1 | 2 | 2 - 0 | | zero | 1 | -1 | 3 | -3 - 0 | | zero | 1 | -1 | 2 | 4 - 0 | | zero | 1 | -1 | 5 | -5 - 0 | | zero | 1 | -1 | 5 | -5 - 0 | | zero | 1 | -1 | 0 | - 0 | | zero | 1 | -1 | | - 0 | | zero | 1 | -1 | | 0 - | | null | 1 | -1 | 1 | -1 - | | null | 1 | -1 | 2 | 2 - | | null | 1 | -1 | 3 | -3 - | | null | 1 | -1 | 2 | 4 - | | null | 1 | -1 | 5 | -5 - | | null | 1 | -1 | 5 | -5 - | | null | 1 | -1 | 0 | - | | null | 1 | -1 | | - | | null | 1 | -1 | | 0 - | 0 | zero | 1 | -1 | 1 | -1 - | 0 | zero | 1 | -1 | 2 | 2 - | 0 | zero | 1 | -1 | 3 | -3 - | 0 | zero | 1 | -1 | 2 | 4 - | 0 | zero | 1 | -1 | 5 | -5 - | 0 | zero | 1 | -1 | 5 | -5 - | 0 | zero | 1 | -1 | 0 | - | 0 | zero | 1 | -1 | | - | 0 | zero | 1 | -1 | | 0 - 1 | 4 | one | 2 | 2 | 1 | -1 - 1 | 4 | one | 2 | 2 | 2 | 2 - 1 | 4 | one | 2 | 2 | 3 | -3 - 1 | 4 | one | 2 | 2 | 2 | 4 - 1 | 4 | one | 2 | 2 | 5 | -5 - 1 | 4 | one | 2 | 2 | 5 | -5 - 1 | 4 | one | 2 | 2 | 0 | - 1 | 4 | one | 2 | 2 | | - 1 | 4 | one | 2 | 2 | | 0 - 2 | 3 | two | 2 | 2 | 1 | -1 - 2 | 3 | two | 2 | 2 | 2 | 2 - 2 | 3 | two | 2 | 2 | 3 | -3 - 2 | 3 | two | 2 | 2 | 2 | 4 - 2 | 3 | two | 2 | 2 | 5 | -5 - 2 | 3 | two | 2 | 2 | 5 | -5 - 2 | 3 | two | 2 | 2 | 0 | - 2 | 3 | two | 2 | 2 | | - 2 | 3 | two | 2 | 2 | | 0 - 3 | 2 | three | 2 | 2 | 1 | -1 - 3 | 2 | three | 2 | 2 | 2 | 2 - 3 | 2 | three | 2 | 2 | 3 | -3 - 3 | 2 | three | 2 | 2 | 2 | 4 - 3 | 2 | three | 2 | 2 | 5 | -5 - 3 | 2 | three | 2 | 2 | 5 | -5 - 3 | 2 | three | 2 | 2 | 0 | - 3 | 2 | three | 2 | 2 | | - 3 | 2 | three | 2 | 2 | | 0 - 4 | 1 | four | 2 | 2 | 1 | -1 - 4 | 1 | four | 2 | 2 | 2 | 2 - 4 | 1 | four | 2 | 2 | 3 | -3 - 4 | 1 | four | 2 | 2 | 2 | 4 - 4 | 1 | four | 2 | 2 | 5 | -5 - 4 | 1 | four | 2 | 2 | 5 | -5 - 4 | 1 | four | 2 | 2 | 0 | - 4 | 1 | four | 2 | 2 | | - 4 | 1 | four | 2 | 2 | | 0 - 5 | 0 | five | 2 | 2 | 1 | -1 - 5 | 0 | five | 2 | 2 | 2 | 2 - 5 | 0 | five | 2 | 2 | 3 | -3 - 5 | 0 | five | 2 | 2 | 2 | 4 - 5 | 0 | five | 2 | 2 | 5 | -5 - 5 | 0 | five | 2 | 2 | 5 | -5 - 5 | 0 | five | 2 | 2 | 0 | - 5 | 0 | five | 2 | 2 | | - 5 | 0 | five | 2 | 2 | | 0 - 6 | 6 | six | 2 | 2 | 1 | -1 - 6 | 6 | six | 2 | 2 | 2 | 2 - 6 | 6 | six | 2 | 2 | 3 | -3 - 6 | 6 | six | 2 | 2 | 2 | 4 - 6 | 6 | six | 2 | 2 | 5 | -5 - 6 | 6 | six | 2 | 2 | 5 | -5 - 6 | 6 | six | 2 | 2 | 0 | - 6 | 6 | six | 2 | 2 | | - 6 | 6 | six | 2 | 2 | | 0 - 7 | 7 | seven | 2 | 2 | 1 | -1 - 7 | 7 | seven | 2 | 2 | 2 | 2 - 7 | 7 | seven | 2 | 2 | 3 | -3 - 7 | 7 | seven | 2 | 2 | 2 | 4 - 7 | 7 | seven | 2 | 2 | 5 | -5 - 7 | 7 | seven | 2 | 2 | 5 | -5 - 7 | 7 | seven | 2 | 2 | 0 | - 7 | 7 | seven | 2 | 2 | | - 7 | 7 | seven | 2 | 2 | | 0 - 8 | 8 | eight | 2 | 2 | 1 | -1 - 8 | 8 | eight | 2 | 2 | 2 | 2 - 8 | 8 | eight | 2 | 2 | 3 | -3 - 8 | 8 | eight | 2 | 2 | 2 | 4 - 8 | 8 | eight | 2 | 2 | 5 | -5 - 8 | 8 | eight | 2 | 2 | 5 | -5 - 8 | 8 | eight | 2 | 2 | 0 | - 8 | 8 | eight | 2 | 2 | | - 8 | 8 | eight | 2 | 2 | | 0 - 0 | | zero | 2 | 2 | 1 | -1 - 0 | | zero | 2 | 2 | 2 | 2 - 0 | | zero | 2 | 2 | 3 | -3 - 0 | | zero | 2 | 2 | 2 | 4 - 0 | | zero | 2 | 2 | 5 | -5 - 0 | | zero | 2 | 2 | 5 | -5 - 0 | | zero | 2 | 2 | 0 | - 0 | | zero | 2 | 2 | | - 0 | | zero | 2 | 2 | | 0 - | | null | 2 | 2 | 1 | -1 - | | null | 2 | 2 | 2 | 2 - | | null | 2 | 2 | 3 | -3 - | | null | 2 | 2 | 2 | 4 - | | null | 2 | 2 | 5 | -5 - | | null | 2 | 2 | 5 | -5 - | | null | 2 | 2 | 0 | - | | null | 2 | 2 | | - | | null | 2 | 2 | | 0 - | 0 | zero | 2 | 2 | 1 | -1 - | 0 | zero | 2 | 2 | 2 | 2 - | 0 | zero | 2 | 2 | 3 | -3 - | 0 | zero | 2 | 2 | 2 | 4 - | 0 | zero | 2 | 2 | 5 | -5 - | 0 | zero | 2 | 2 | 5 | -5 - | 0 | zero | 2 | 2 | 0 | - | 0 | zero | 2 | 2 | | - | 0 | zero | 2 | 2 | | 0 - 1 | 4 | one | 3 | -3 | 1 | -1 - 1 | 4 | one | 3 | -3 | 2 | 2 - 1 | 4 | one | 3 | -3 | 3 | -3 - 1 | 4 | one | 3 | -3 | 2 | 4 - 1 | 4 | one | 3 | -3 | 5 | -5 - 1 | 4 | one | 3 | -3 | 5 | -5 - 1 | 4 | one | 3 | -3 | 0 | - 1 | 4 | one | 3 | -3 | | - 1 | 4 | one | 3 | -3 | | 0 - 2 | 3 | two | 3 | -3 | 1 | -1 - 2 | 3 | two | 3 | -3 | 2 | 2 - 2 | 3 | two | 3 | -3 | 3 | -3 - 2 | 3 | two | 3 | -3 | 2 | 4 - 2 | 3 | two | 3 | -3 | 5 | -5 - 2 | 3 | two | 3 | -3 | 5 | -5 - 2 | 3 | two | 3 | -3 | 0 | - 2 | 3 | two | 3 | -3 | | - 2 | 3 | two | 3 | -3 | | 0 - 3 | 2 | three | 3 | -3 | 1 | -1 - 3 | 2 | three | 3 | -3 | 2 | 2 - 3 | 2 | three | 3 | -3 | 3 | -3 - 3 | 2 | three | 3 | -3 | 2 | 4 - 3 | 2 | three | 3 | -3 | 5 | -5 - 3 | 2 | three | 3 | -3 | 5 | -5 - 3 | 2 | three | 3 | -3 | 0 | - 3 | 2 | three | 3 | -3 | | - 3 | 2 | three | 3 | -3 | | 0 - 4 | 1 | four | 3 | -3 | 1 | -1 - 4 | 1 | four | 3 | -3 | 2 | 2 - 4 | 1 | four | 3 | -3 | 3 | -3 - 4 | 1 | four | 3 | -3 | 2 | 4 - 4 | 1 | four | 3 | -3 | 5 | -5 - 4 | 1 | four | 3 | -3 | 5 | -5 - 4 | 1 | four | 3 | -3 | 0 | - 4 | 1 | four | 3 | -3 | | - 4 | 1 | four | 3 | -3 | | 0 - 5 | 0 | five | 3 | -3 | 1 | -1 - 5 | 0 | five | 3 | -3 | 2 | 2 - 5 | 0 | five | 3 | -3 | 3 | -3 - 5 | 0 | five | 3 | -3 | 2 | 4 - 5 | 0 | five | 3 | -3 | 5 | -5 - 5 | 0 | five | 3 | -3 | 5 | -5 - 5 | 0 | five | 3 | -3 | 0 | - 5 | 0 | five | 3 | -3 | | - 5 | 0 | five | 3 | -3 | | 0 - 6 | 6 | six | 3 | -3 | 1 | -1 - 6 | 6 | six | 3 | -3 | 2 | 2 - 6 | 6 | six | 3 | -3 | 3 | -3 - 6 | 6 | six | 3 | -3 | 2 | 4 - 6 | 6 | six | 3 | -3 | 5 | -5 - 6 | 6 | six | 3 | -3 | 5 | -5 - 6 | 6 | six | 3 | -3 | 0 | - 6 | 6 | six | 3 | -3 | | - 6 | 6 | six | 3 | -3 | | 0 - 7 | 7 | seven | 3 | -3 | 1 | -1 - 7 | 7 | seven | 3 | -3 | 2 | 2 - 7 | 7 | seven | 3 | -3 | 3 | -3 - 7 | 7 | seven | 3 | -3 | 2 | 4 - 7 | 7 | seven | 3 | -3 | 5 | -5 - 7 | 7 | seven | 3 | -3 | 5 | -5 - 7 | 7 | seven | 3 | -3 | 0 | - 7 | 7 | seven | 3 | -3 | | - 7 | 7 | seven | 3 | -3 | | 0 - 8 | 8 | eight | 3 | -3 | 1 | -1 - 8 | 8 | eight | 3 | -3 | 2 | 2 - 8 | 8 | eight | 3 | -3 | 3 | -3 - 8 | 8 | eight | 3 | -3 | 2 | 4 - 8 | 8 | eight | 3 | -3 | 5 | -5 - 8 | 8 | eight | 3 | -3 | 5 | -5 - 8 | 8 | eight | 3 | -3 | 0 | - 8 | 8 | eight | 3 | -3 | | - 8 | 8 | eight | 3 | -3 | | 0 - 0 | | zero | 3 | -3 | 1 | -1 - 0 | | zero | 3 | -3 | 2 | 2 - 0 | | zero | 3 | -3 | 3 | -3 - 0 | | zero | 3 | -3 | 2 | 4 - 0 | | zero | 3 | -3 | 5 | -5 - 0 | | zero | 3 | -3 | 5 | -5 - 0 | | zero | 3 | -3 | 0 | - 0 | | zero | 3 | -3 | | - 0 | | zero | 3 | -3 | | 0 - | | null | 3 | -3 | 1 | -1 - | | null | 3 | -3 | 2 | 2 - | | null | 3 | -3 | 3 | -3 - | | null | 3 | -3 | 2 | 4 - | | null | 3 | -3 | 5 | -5 - | | null | 3 | -3 | 5 | -5 - | | null | 3 | -3 | 0 | - | | null | 3 | -3 | | - | | null | 3 | -3 | | 0 - | 0 | zero | 3 | -3 | 1 | -1 - | 0 | zero | 3 | -3 | 2 | 2 - | 0 | zero | 3 | -3 | 3 | -3 - | 0 | zero | 3 | -3 | 2 | 4 - | 0 | zero | 3 | -3 | 5 | -5 - | 0 | zero | 3 | -3 | 5 | -5 - | 0 | zero | 3 | -3 | 0 | - | 0 | zero | 3 | -3 | | - | 0 | zero | 3 | -3 | | 0 - 1 | 4 | one | 2 | 4 | 1 | -1 - 1 | 4 | one | 2 | 4 | 2 | 2 - 1 | 4 | one | 2 | 4 | 3 | -3 - 1 | 4 | one | 2 | 4 | 2 | 4 - 1 | 4 | one | 2 | 4 | 5 | -5 - 1 | 4 | one | 2 | 4 | 5 | -5 - 1 | 4 | one | 2 | 4 | 0 | - 1 | 4 | one | 2 | 4 | | - 1 | 4 | one | 2 | 4 | | 0 - 2 | 3 | two | 2 | 4 | 1 | -1 - 2 | 3 | two | 2 | 4 | 2 | 2 - 2 | 3 | two | 2 | 4 | 3 | -3 - 2 | 3 | two | 2 | 4 | 2 | 4 - 2 | 3 | two | 2 | 4 | 5 | -5 - 2 | 3 | two | 2 | 4 | 5 | -5 - 2 | 3 | two | 2 | 4 | 0 | - 2 | 3 | two | 2 | 4 | | - 2 | 3 | two | 2 | 4 | | 0 - 3 | 2 | three | 2 | 4 | 1 | -1 - 3 | 2 | three | 2 | 4 | 2 | 2 - 3 | 2 | three | 2 | 4 | 3 | -3 - 3 | 2 | three | 2 | 4 | 2 | 4 - 3 | 2 | three | 2 | 4 | 5 | -5 - 3 | 2 | three | 2 | 4 | 5 | -5 - 3 | 2 | three | 2 | 4 | 0 | - 3 | 2 | three | 2 | 4 | | - 3 | 2 | three | 2 | 4 | | 0 - 4 | 1 | four | 2 | 4 | 1 | -1 - 4 | 1 | four | 2 | 4 | 2 | 2 - 4 | 1 | four | 2 | 4 | 3 | -3 - 4 | 1 | four | 2 | 4 | 2 | 4 - 4 | 1 | four | 2 | 4 | 5 | -5 - 4 | 1 | four | 2 | 4 | 5 | -5 - 4 | 1 | four | 2 | 4 | 0 | - 4 | 1 | four | 2 | 4 | | - 4 | 1 | four | 2 | 4 | | 0 - 5 | 0 | five | 2 | 4 | 1 | -1 - 5 | 0 | five | 2 | 4 | 2 | 2 - 5 | 0 | five | 2 | 4 | 3 | -3 - 5 | 0 | five | 2 | 4 | 2 | 4 - 5 | 0 | five | 2 | 4 | 5 | -5 - 5 | 0 | five | 2 | 4 | 5 | -5 - 5 | 0 | five | 2 | 4 | 0 | - 5 | 0 | five | 2 | 4 | | - 5 | 0 | five | 2 | 4 | | 0 - 6 | 6 | six | 2 | 4 | 1 | -1 - 6 | 6 | six | 2 | 4 | 2 | 2 - 6 | 6 | six | 2 | 4 | 3 | -3 - 6 | 6 | six | 2 | 4 | 2 | 4 - 6 | 6 | six | 2 | 4 | 5 | -5 - 6 | 6 | six | 2 | 4 | 5 | -5 - 6 | 6 | six | 2 | 4 | 0 | - 6 | 6 | six | 2 | 4 | | - 6 | 6 | six | 2 | 4 | | 0 - 7 | 7 | seven | 2 | 4 | 1 | -1 - 7 | 7 | seven | 2 | 4 | 2 | 2 - 7 | 7 | seven | 2 | 4 | 3 | -3 - 7 | 7 | seven | 2 | 4 | 2 | 4 - 7 | 7 | seven | 2 | 4 | 5 | -5 - 7 | 7 | seven | 2 | 4 | 5 | -5 - 7 | 7 | seven | 2 | 4 | 0 | - 7 | 7 | seven | 2 | 4 | | - 7 | 7 | seven | 2 | 4 | | 0 - 8 | 8 | eight | 2 | 4 | 1 | -1 - 8 | 8 | eight | 2 | 4 | 2 | 2 - 8 | 8 | eight | 2 | 4 | 3 | -3 - 8 | 8 | eight | 2 | 4 | 2 | 4 - 8 | 8 | eight | 2 | 4 | 5 | -5 - 8 | 8 | eight | 2 | 4 | 5 | -5 - 8 | 8 | eight | 2 | 4 | 0 | - 8 | 8 | eight | 2 | 4 | | - 8 | 8 | eight | 2 | 4 | | 0 - 0 | | zero | 2 | 4 | 1 | -1 - 0 | | zero | 2 | 4 | 2 | 2 - 0 | | zero | 2 | 4 | 3 | -3 - 0 | | zero | 2 | 4 | 2 | 4 - 0 | | zero | 2 | 4 | 5 | -5 - 0 | | zero | 2 | 4 | 5 | -5 - 0 | | zero | 2 | 4 | 0 | - 0 | | zero | 2 | 4 | | - 0 | | zero | 2 | 4 | | 0 - | | null | 2 | 4 | 1 | -1 - | | null | 2 | 4 | 2 | 2 - | | null | 2 | 4 | 3 | -3 - | | null | 2 | 4 | 2 | 4 - | | null | 2 | 4 | 5 | -5 - | | null | 2 | 4 | 5 | -5 - | | null | 2 | 4 | 0 | - | | null | 2 | 4 | | - | | null | 2 | 4 | | 0 - | 0 | zero | 2 | 4 | 1 | -1 - | 0 | zero | 2 | 4 | 2 | 2 - | 0 | zero | 2 | 4 | 3 | -3 - | 0 | zero | 2 | 4 | 2 | 4 - | 0 | zero | 2 | 4 | 5 | -5 - | 0 | zero | 2 | 4 | 5 | -5 - | 0 | zero | 2 | 4 | 0 | - | 0 | zero | 2 | 4 | | - | 0 | zero | 2 | 4 | | 0 - 1 | 4 | one | 5 | -5 | 1 | -1 - 1 | 4 | one | 5 | -5 | 2 | 2 - 1 | 4 | one | 5 | -5 | 3 | -3 - 1 | 4 | one | 5 | -5 | 2 | 4 - 1 | 4 | one | 5 | -5 | 5 | -5 - 1 | 4 | one | 5 | -5 | 5 | -5 - 1 | 4 | one | 5 | -5 | 0 | - 1 | 4 | one | 5 | -5 | | - 1 | 4 | one | 5 | -5 | | 0 - 2 | 3 | two | 5 | -5 | 1 | -1 - 2 | 3 | two | 5 | -5 | 2 | 2 - 2 | 3 | two | 5 | -5 | 3 | -3 - 2 | 3 | two | 5 | -5 | 2 | 4 - 2 | 3 | two | 5 | -5 | 5 | -5 - 2 | 3 | two | 5 | -5 | 5 | -5 - 2 | 3 | two | 5 | -5 | 0 | - 2 | 3 | two | 5 | -5 | | - 2 | 3 | two | 5 | -5 | | 0 - 3 | 2 | three | 5 | -5 | 1 | -1 - 3 | 2 | three | 5 | -5 | 2 | 2 - 3 | 2 | three | 5 | -5 | 3 | -3 - 3 | 2 | three | 5 | -5 | 2 | 4 - 3 | 2 | three | 5 | -5 | 5 | -5 - 3 | 2 | three | 5 | -5 | 5 | -5 - 3 | 2 | three | 5 | -5 | 0 | - 3 | 2 | three | 5 | -5 | | - 3 | 2 | three | 5 | -5 | | 0 - 4 | 1 | four | 5 | -5 | 1 | -1 - 4 | 1 | four | 5 | -5 | 2 | 2 - 4 | 1 | four | 5 | -5 | 3 | -3 - 4 | 1 | four | 5 | -5 | 2 | 4 - 4 | 1 | four | 5 | -5 | 5 | -5 - 4 | 1 | four | 5 | -5 | 5 | -5 - 4 | 1 | four | 5 | -5 | 0 | - 4 | 1 | four | 5 | -5 | | - 4 | 1 | four | 5 | -5 | | 0 - 5 | 0 | five | 5 | -5 | 1 | -1 - 5 | 0 | five | 5 | -5 | 2 | 2 - 5 | 0 | five | 5 | -5 | 3 | -3 - 5 | 0 | five | 5 | -5 | 2 | 4 - 5 | 0 | five | 5 | -5 | 5 | -5 - 5 | 0 | five | 5 | -5 | 5 | -5 - 5 | 0 | five | 5 | -5 | 0 | - 5 | 0 | five | 5 | -5 | | - 5 | 0 | five | 5 | -5 | | 0 - 6 | 6 | six | 5 | -5 | 1 | -1 - 6 | 6 | six | 5 | -5 | 2 | 2 - 6 | 6 | six | 5 | -5 | 3 | -3 - 6 | 6 | six | 5 | -5 | 2 | 4 - 6 | 6 | six | 5 | -5 | 5 | -5 - 6 | 6 | six | 5 | -5 | 5 | -5 - 6 | 6 | six | 5 | -5 | 0 | - 6 | 6 | six | 5 | -5 | | - 6 | 6 | six | 5 | -5 | | 0 - 7 | 7 | seven | 5 | -5 | 1 | -1 - 7 | 7 | seven | 5 | -5 | 2 | 2 - 7 | 7 | seven | 5 | -5 | 3 | -3 - 7 | 7 | seven | 5 | -5 | 2 | 4 - 7 | 7 | seven | 5 | -5 | 5 | -5 - 7 | 7 | seven | 5 | -5 | 5 | -5 - 7 | 7 | seven | 5 | -5 | 0 | - 7 | 7 | seven | 5 | -5 | | - 7 | 7 | seven | 5 | -5 | | 0 - 8 | 8 | eight | 5 | -5 | 1 | -1 - 8 | 8 | eight | 5 | -5 | 2 | 2 - 8 | 8 | eight | 5 | -5 | 3 | -3 - 8 | 8 | eight | 5 | -5 | 2 | 4 - 8 | 8 | eight | 5 | -5 | 5 | -5 - 8 | 8 | eight | 5 | -5 | 5 | -5 - 8 | 8 | eight | 5 | -5 | 0 | - 8 | 8 | eight | 5 | -5 | | - 8 | 8 | eight | 5 | -5 | | 0 - 0 | | zero | 5 | -5 | 1 | -1 - 0 | | zero | 5 | -5 | 2 | 2 - 0 | | zero | 5 | -5 | 3 | -3 - 0 | | zero | 5 | -5 | 2 | 4 - 0 | | zero | 5 | -5 | 5 | -5 - 0 | | zero | 5 | -5 | 5 | -5 - 0 | | zero | 5 | -5 | 0 | - 0 | | zero | 5 | -5 | | - 0 | | zero | 5 | -5 | | 0 - | | null | 5 | -5 | 1 | -1 - | | null | 5 | -5 | 2 | 2 - | | null | 5 | -5 | 3 | -3 - | | null | 5 | -5 | 2 | 4 - | | null | 5 | -5 | 5 | -5 - | | null | 5 | -5 | 5 | -5 - | | null | 5 | -5 | 0 | - | | null | 5 | -5 | | - | | null | 5 | -5 | | 0 - | 0 | zero | 5 | -5 | 1 | -1 - | 0 | zero | 5 | -5 | 2 | 2 - | 0 | zero | 5 | -5 | 3 | -3 - | 0 | zero | 5 | -5 | 2 | 4 - | 0 | zero | 5 | -5 | 5 | -5 - | 0 | zero | 5 | -5 | 5 | -5 - | 0 | zero | 5 | -5 | 0 | - | 0 | zero | 5 | -5 | | - | 0 | zero | 5 | -5 | | 0 - 1 | 4 | one | 5 | -5 | 1 | -1 - 1 | 4 | one | 5 | -5 | 2 | 2 - 1 | 4 | one | 5 | -5 | 3 | -3 - 1 | 4 | one | 5 | -5 | 2 | 4 - 1 | 4 | one | 5 | -5 | 5 | -5 - 1 | 4 | one | 5 | -5 | 5 | -5 - 1 | 4 | one | 5 | -5 | 0 | - 1 | 4 | one | 5 | -5 | | - 1 | 4 | one | 5 | -5 | | 0 - 2 | 3 | two | 5 | -5 | 1 | -1 - 2 | 3 | two | 5 | -5 | 2 | 2 - 2 | 3 | two | 5 | -5 | 3 | -3 - 2 | 3 | two | 5 | -5 | 2 | 4 - 2 | 3 | two | 5 | -5 | 5 | -5 - 2 | 3 | two | 5 | -5 | 5 | -5 - 2 | 3 | two | 5 | -5 | 0 | - 2 | 3 | two | 5 | -5 | | - 2 | 3 | two | 5 | -5 | | 0 - 3 | 2 | three | 5 | -5 | 1 | -1 - 3 | 2 | three | 5 | -5 | 2 | 2 - 3 | 2 | three | 5 | -5 | 3 | -3 - 3 | 2 | three | 5 | -5 | 2 | 4 - 3 | 2 | three | 5 | -5 | 5 | -5 - 3 | 2 | three | 5 | -5 | 5 | -5 - 3 | 2 | three | 5 | -5 | 0 | - 3 | 2 | three | 5 | -5 | | - 3 | 2 | three | 5 | -5 | | 0 - 4 | 1 | four | 5 | -5 | 1 | -1 - 4 | 1 | four | 5 | -5 | 2 | 2 - 4 | 1 | four | 5 | -5 | 3 | -3 - 4 | 1 | four | 5 | -5 | 2 | 4 - 4 | 1 | four | 5 | -5 | 5 | -5 - 4 | 1 | four | 5 | -5 | 5 | -5 - 4 | 1 | four | 5 | -5 | 0 | - 4 | 1 | four | 5 | -5 | | - 4 | 1 | four | 5 | -5 | | 0 - 5 | 0 | five | 5 | -5 | 1 | -1 - 5 | 0 | five | 5 | -5 | 2 | 2 - 5 | 0 | five | 5 | -5 | 3 | -3 - 5 | 0 | five | 5 | -5 | 2 | 4 - 5 | 0 | five | 5 | -5 | 5 | -5 - 5 | 0 | five | 5 | -5 | 5 | -5 - 5 | 0 | five | 5 | -5 | 0 | - 5 | 0 | five | 5 | -5 | | - 5 | 0 | five | 5 | -5 | | 0 - 6 | 6 | six | 5 | -5 | 1 | -1 - 6 | 6 | six | 5 | -5 | 2 | 2 - 6 | 6 | six | 5 | -5 | 3 | -3 - 6 | 6 | six | 5 | -5 | 2 | 4 - 6 | 6 | six | 5 | -5 | 5 | -5 - 6 | 6 | six | 5 | -5 | 5 | -5 - 6 | 6 | six | 5 | -5 | 0 | - 6 | 6 | six | 5 | -5 | | - 6 | 6 | six | 5 | -5 | | 0 - 7 | 7 | seven | 5 | -5 | 1 | -1 - 7 | 7 | seven | 5 | -5 | 2 | 2 - 7 | 7 | seven | 5 | -5 | 3 | -3 - 7 | 7 | seven | 5 | -5 | 2 | 4 - 7 | 7 | seven | 5 | -5 | 5 | -5 - 7 | 7 | seven | 5 | -5 | 5 | -5 - 7 | 7 | seven | 5 | -5 | 0 | - 7 | 7 | seven | 5 | -5 | | - 7 | 7 | seven | 5 | -5 | | 0 - 8 | 8 | eight | 5 | -5 | 1 | -1 - 8 | 8 | eight | 5 | -5 | 2 | 2 - 8 | 8 | eight | 5 | -5 | 3 | -3 - 8 | 8 | eight | 5 | -5 | 2 | 4 - 8 | 8 | eight | 5 | -5 | 5 | -5 - 8 | 8 | eight | 5 | -5 | 5 | -5 - 8 | 8 | eight | 5 | -5 | 0 | - 8 | 8 | eight | 5 | -5 | | - 8 | 8 | eight | 5 | -5 | | 0 - 0 | | zero | 5 | -5 | 1 | -1 - 0 | | zero | 5 | -5 | 2 | 2 - 0 | | zero | 5 | -5 | 3 | -3 - 0 | | zero | 5 | -5 | 2 | 4 - 0 | | zero | 5 | -5 | 5 | -5 - 0 | | zero | 5 | -5 | 5 | -5 - 0 | | zero | 5 | -5 | 0 | - 0 | | zero | 5 | -5 | | - 0 | | zero | 5 | -5 | | 0 - | | null | 5 | -5 | 1 | -1 - | | null | 5 | -5 | 2 | 2 - | | null | 5 | -5 | 3 | -3 - | | null | 5 | -5 | 2 | 4 - | | null | 5 | -5 | 5 | -5 - | | null | 5 | -5 | 5 | -5 - | | null | 5 | -5 | 0 | - | | null | 5 | -5 | | - | | null | 5 | -5 | | 0 - | 0 | zero | 5 | -5 | 1 | -1 - | 0 | zero | 5 | -5 | 2 | 2 - | 0 | zero | 5 | -5 | 3 | -3 - | 0 | zero | 5 | -5 | 2 | 4 - | 0 | zero | 5 | -5 | 5 | -5 - | 0 | zero | 5 | -5 | 5 | -5 - | 0 | zero | 5 | -5 | 0 | - | 0 | zero | 5 | -5 | | - | 0 | zero | 5 | -5 | | 0 - 1 | 4 | one | 0 | | 1 | -1 - 1 | 4 | one | 0 | | 2 | 2 - 1 | 4 | one | 0 | | 3 | -3 - 1 | 4 | one | 0 | | 2 | 4 - 1 | 4 | one | 0 | | 5 | -5 - 1 | 4 | one | 0 | | 5 | -5 - 1 | 4 | one | 0 | | 0 | - 1 | 4 | one | 0 | | | - 1 | 4 | one | 0 | | | 0 - 2 | 3 | two | 0 | | 1 | -1 - 2 | 3 | two | 0 | | 2 | 2 - 2 | 3 | two | 0 | | 3 | -3 - 2 | 3 | two | 0 | | 2 | 4 - 2 | 3 | two | 0 | | 5 | -5 - 2 | 3 | two | 0 | | 5 | -5 - 2 | 3 | two | 0 | | 0 | - 2 | 3 | two | 0 | | | - 2 | 3 | two | 0 | | | 0 - 3 | 2 | three | 0 | | 1 | -1 - 3 | 2 | three | 0 | | 2 | 2 - 3 | 2 | three | 0 | | 3 | -3 - 3 | 2 | three | 0 | | 2 | 4 - 3 | 2 | three | 0 | | 5 | -5 - 3 | 2 | three | 0 | | 5 | -5 - 3 | 2 | three | 0 | | 0 | - 3 | 2 | three | 0 | | | - 3 | 2 | three | 0 | | | 0 - 4 | 1 | four | 0 | | 1 | -1 - 4 | 1 | four | 0 | | 2 | 2 - 4 | 1 | four | 0 | | 3 | -3 - 4 | 1 | four | 0 | | 2 | 4 - 4 | 1 | four | 0 | | 5 | -5 - 4 | 1 | four | 0 | | 5 | -5 - 4 | 1 | four | 0 | | 0 | - 4 | 1 | four | 0 | | | - 4 | 1 | four | 0 | | | 0 - 5 | 0 | five | 0 | | 1 | -1 - 5 | 0 | five | 0 | | 2 | 2 - 5 | 0 | five | 0 | | 3 | -3 - 5 | 0 | five | 0 | | 2 | 4 - 5 | 0 | five | 0 | | 5 | -5 - 5 | 0 | five | 0 | | 5 | -5 - 5 | 0 | five | 0 | | 0 | - 5 | 0 | five | 0 | | | - 5 | 0 | five | 0 | | | 0 - 6 | 6 | six | 0 | | 1 | -1 - 6 | 6 | six | 0 | | 2 | 2 - 6 | 6 | six | 0 | | 3 | -3 - 6 | 6 | six | 0 | | 2 | 4 - 6 | 6 | six | 0 | | 5 | -5 - 6 | 6 | six | 0 | | 5 | -5 - 6 | 6 | six | 0 | | 0 | - 6 | 6 | six | 0 | | | - 6 | 6 | six | 0 | | | 0 - 7 | 7 | seven | 0 | | 1 | -1 - 7 | 7 | seven | 0 | | 2 | 2 - 7 | 7 | seven | 0 | | 3 | -3 - 7 | 7 | seven | 0 | | 2 | 4 - 7 | 7 | seven | 0 | | 5 | -5 - 7 | 7 | seven | 0 | | 5 | -5 - 7 | 7 | seven | 0 | | 0 | - 7 | 7 | seven | 0 | | | - 7 | 7 | seven | 0 | | | 0 - 8 | 8 | eight | 0 | | 1 | -1 - 8 | 8 | eight | 0 | | 2 | 2 - 8 | 8 | eight | 0 | | 3 | -3 - 8 | 8 | eight | 0 | | 2 | 4 - 8 | 8 | eight | 0 | | 5 | -5 - 8 | 8 | eight | 0 | | 5 | -5 - 8 | 8 | eight | 0 | | 0 | - 8 | 8 | eight | 0 | | | - 8 | 8 | eight | 0 | | | 0 - 0 | | zero | 0 | | 1 | -1 - 0 | | zero | 0 | | 2 | 2 - 0 | | zero | 0 | | 3 | -3 - 0 | | zero | 0 | | 2 | 4 - 0 | | zero | 0 | | 5 | -5 - 0 | | zero | 0 | | 5 | -5 - 0 | | zero | 0 | | 0 | - 0 | | zero | 0 | | | - 0 | | zero | 0 | | | 0 - | | null | 0 | | 1 | -1 - | | null | 0 | | 2 | 2 - | | null | 0 | | 3 | -3 - | | null | 0 | | 2 | 4 - | | null | 0 | | 5 | -5 - | | null | 0 | | 5 | -5 - | | null | 0 | | 0 | - | | null | 0 | | | - | | null | 0 | | | 0 - | 0 | zero | 0 | | 1 | -1 - | 0 | zero | 0 | | 2 | 2 - | 0 | zero | 0 | | 3 | -3 - | 0 | zero | 0 | | 2 | 4 - | 0 | zero | 0 | | 5 | -5 - | 0 | zero | 0 | | 5 | -5 - | 0 | zero | 0 | | 0 | - | 0 | zero | 0 | | | - | 0 | zero | 0 | | | 0 - 1 | 4 | one | | | 1 | -1 - 1 | 4 | one | | | 2 | 2 - 1 | 4 | one | | | 3 | -3 - 1 | 4 | one | | | 2 | 4 - 1 | 4 | one | | | 5 | -5 - 1 | 4 | one | | | 5 | -5 - 1 | 4 | one | | | 0 | - 1 | 4 | one | | | | - 1 | 4 | one | | | | 0 - 2 | 3 | two | | | 1 | -1 - 2 | 3 | two | | | 2 | 2 - 2 | 3 | two | | | 3 | -3 - 2 | 3 | two | | | 2 | 4 - 2 | 3 | two | | | 5 | -5 - 2 | 3 | two | | | 5 | -5 - 2 | 3 | two | | | 0 | - 2 | 3 | two | | | | - 2 | 3 | two | | | | 0 - 3 | 2 | three | | | 1 | -1 - 3 | 2 | three | | | 2 | 2 - 3 | 2 | three | | | 3 | -3 - 3 | 2 | three | | | 2 | 4 - 3 | 2 | three | | | 5 | -5 - 3 | 2 | three | | | 5 | -5 - 3 | 2 | three | | | 0 | - 3 | 2 | three | | | | - 3 | 2 | three | | | | 0 - 4 | 1 | four | | | 1 | -1 - 4 | 1 | four | | | 2 | 2 - 4 | 1 | four | | | 3 | -3 - 4 | 1 | four | | | 2 | 4 - 4 | 1 | four | | | 5 | -5 - 4 | 1 | four | | | 5 | -5 - 4 | 1 | four | | | 0 | - 4 | 1 | four | | | | - 4 | 1 | four | | | | 0 - 5 | 0 | five | | | 1 | -1 - 5 | 0 | five | | | 2 | 2 - 5 | 0 | five | | | 3 | -3 - 5 | 0 | five | | | 2 | 4 - 5 | 0 | five | | | 5 | -5 - 5 | 0 | five | | | 5 | -5 - 5 | 0 | five | | | 0 | - 5 | 0 | five | | | | - 5 | 0 | five | | | | 0 - 6 | 6 | six | | | 1 | -1 - 6 | 6 | six | | | 2 | 2 - 6 | 6 | six | | | 3 | -3 - 6 | 6 | six | | | 2 | 4 - 6 | 6 | six | | | 5 | -5 - 6 | 6 | six | | | 5 | -5 - 6 | 6 | six | | | 0 | - 6 | 6 | six | | | | - 6 | 6 | six | | | | 0 - 7 | 7 | seven | | | 1 | -1 - 7 | 7 | seven | | | 2 | 2 - 7 | 7 | seven | | | 3 | -3 - 7 | 7 | seven | | | 2 | 4 - 7 | 7 | seven | | | 5 | -5 - 7 | 7 | seven | | | 5 | -5 - 7 | 7 | seven | | | 0 | - 7 | 7 | seven | | | | - 7 | 7 | seven | | | | 0 - 8 | 8 | eight | | | 1 | -1 - 8 | 8 | eight | | | 2 | 2 - 8 | 8 | eight | | | 3 | -3 - 8 | 8 | eight | | | 2 | 4 - 8 | 8 | eight | | | 5 | -5 - 8 | 8 | eight | | | 5 | -5 - 8 | 8 | eight | | | 0 | - 8 | 8 | eight | | | | - 8 | 8 | eight | | | | 0 - 0 | | zero | | | 1 | -1 - 0 | | zero | | | 2 | 2 - 0 | | zero | | | 3 | -3 - 0 | | zero | | | 2 | 4 - 0 | | zero | | | 5 | -5 - 0 | | zero | | | 5 | -5 - 0 | | zero | | | 0 | - 0 | | zero | | | | - 0 | | zero | | | | 0 - | | null | | | 1 | -1 - | | null | | | 2 | 2 - | | null | | | 3 | -3 - | | null | | | 2 | 4 - | | null | | | 5 | -5 - | | null | | | 5 | -5 - | | null | | | 0 | - | | null | | | | - | | null | | | | 0 - | 0 | zero | | | 1 | -1 - | 0 | zero | | | 2 | 2 - | 0 | zero | | | 3 | -3 - | 0 | zero | | | 2 | 4 - | 0 | zero | | | 5 | -5 - | 0 | zero | | | 5 | -5 - | 0 | zero | | | 0 | - | 0 | zero | | | | - | 0 | zero | | | | 0 - 1 | 4 | one | | 0 | 1 | -1 - 1 | 4 | one | | 0 | 2 | 2 - 1 | 4 | one | | 0 | 3 | -3 - 1 | 4 | one | | 0 | 2 | 4 - 1 | 4 | one | | 0 | 5 | -5 - 1 | 4 | one | | 0 | 5 | -5 - 1 | 4 | one | | 0 | 0 | - 1 | 4 | one | | 0 | | - 1 | 4 | one | | 0 | | 0 - 2 | 3 | two | | 0 | 1 | -1 - 2 | 3 | two | | 0 | 2 | 2 - 2 | 3 | two | | 0 | 3 | -3 - 2 | 3 | two | | 0 | 2 | 4 - 2 | 3 | two | | 0 | 5 | -5 - 2 | 3 | two | | 0 | 5 | -5 - 2 | 3 | two | | 0 | 0 | - 2 | 3 | two | | 0 | | - 2 | 3 | two | | 0 | | 0 - 3 | 2 | three | | 0 | 1 | -1 - 3 | 2 | three | | 0 | 2 | 2 - 3 | 2 | three | | 0 | 3 | -3 - 3 | 2 | three | | 0 | 2 | 4 - 3 | 2 | three | | 0 | 5 | -5 - 3 | 2 | three | | 0 | 5 | -5 - 3 | 2 | three | | 0 | 0 | - 3 | 2 | three | | 0 | | - 3 | 2 | three | | 0 | | 0 - 4 | 1 | four | | 0 | 1 | -1 - 4 | 1 | four | | 0 | 2 | 2 - 4 | 1 | four | | 0 | 3 | -3 - 4 | 1 | four | | 0 | 2 | 4 - 4 | 1 | four | | 0 | 5 | -5 - 4 | 1 | four | | 0 | 5 | -5 - 4 | 1 | four | | 0 | 0 | - 4 | 1 | four | | 0 | | - 4 | 1 | four | | 0 | | 0 - 5 | 0 | five | | 0 | 1 | -1 - 5 | 0 | five | | 0 | 2 | 2 - 5 | 0 | five | | 0 | 3 | -3 - 5 | 0 | five | | 0 | 2 | 4 - 5 | 0 | five | | 0 | 5 | -5 - 5 | 0 | five | | 0 | 5 | -5 - 5 | 0 | five | | 0 | 0 | - 5 | 0 | five | | 0 | | - 5 | 0 | five | | 0 | | 0 - 6 | 6 | six | | 0 | 1 | -1 - 6 | 6 | six | | 0 | 2 | 2 - 6 | 6 | six | | 0 | 3 | -3 - 6 | 6 | six | | 0 | 2 | 4 - 6 | 6 | six | | 0 | 5 | -5 - 6 | 6 | six | | 0 | 5 | -5 - 6 | 6 | six | | 0 | 0 | - 6 | 6 | six | | 0 | | - 6 | 6 | six | | 0 | | 0 - 7 | 7 | seven | | 0 | 1 | -1 - 7 | 7 | seven | | 0 | 2 | 2 - 7 | 7 | seven | | 0 | 3 | -3 - 7 | 7 | seven | | 0 | 2 | 4 - 7 | 7 | seven | | 0 | 5 | -5 - 7 | 7 | seven | | 0 | 5 | -5 - 7 | 7 | seven | | 0 | 0 | - 7 | 7 | seven | | 0 | | - 7 | 7 | seven | | 0 | | 0 - 8 | 8 | eight | | 0 | 1 | -1 - 8 | 8 | eight | | 0 | 2 | 2 - 8 | 8 | eight | | 0 | 3 | -3 - 8 | 8 | eight | | 0 | 2 | 4 - 8 | 8 | eight | | 0 | 5 | -5 - 8 | 8 | eight | | 0 | 5 | -5 - 8 | 8 | eight | | 0 | 0 | - 8 | 8 | eight | | 0 | | - 8 | 8 | eight | | 0 | | 0 - 0 | | zero | | 0 | 1 | -1 - 0 | | zero | | 0 | 2 | 2 - 0 | | zero | | 0 | 3 | -3 - 0 | | zero | | 0 | 2 | 4 - 0 | | zero | | 0 | 5 | -5 - 0 | | zero | | 0 | 5 | -5 - 0 | | zero | | 0 | 0 | - 0 | | zero | | 0 | | - 0 | | zero | | 0 | | 0 - | | null | | 0 | 1 | -1 - | | null | | 0 | 2 | 2 - | | null | | 0 | 3 | -3 - | | null | | 0 | 2 | 4 - | | null | | 0 | 5 | -5 - | | null | | 0 | 5 | -5 - | | null | | 0 | 0 | - | | null | | 0 | | - | | null | | 0 | | 0 - | 0 | zero | | 0 | 1 | -1 - | 0 | zero | | 0 | 2 | 2 - | 0 | zero | | 0 | 3 | -3 - | 0 | zero | | 0 | 2 | 4 - | 0 | zero | | 0 | 5 | -5 - | 0 | zero | | 0 | 5 | -5 - | 0 | zero | | 0 | 0 | - | 0 | zero | | 0 | | - | 0 | zero | | 0 | | 0 -(891 rows) - --- --- --- Inner joins (equi-joins) --- --- --- --- Inner joins (equi-joins) with USING clause --- The USING syntax changes the shape of the resulting table --- by including a column in the USING clause only once in the result. --- --- Inner equi-join on specified column -SELECT * - FROM J1_TBL INNER JOIN J2_TBL USING (i); - i | j | t | k ----+---+-------+---- - 0 | | zero | - 1 | 4 | one | -1 - 2 | 3 | two | 2 - 2 | 3 | two | 4 - 3 | 2 | three | -3 - 5 | 0 | five | -5 - 5 | 0 | five | -5 -(7 rows) - --- Same as above, slightly different syntax -SELECT * - FROM J1_TBL JOIN J2_TBL USING (i); - i | j | t | k ----+---+-------+---- - 0 | | zero | - 1 | 4 | one | -1 - 2 | 3 | two | 2 - 2 | 3 | two | 4 - 3 | 2 | three | -3 - 5 | 0 | five | -5 - 5 | 0 | five | -5 -(7 rows) - -SELECT * - FROM J1_TBL t1 (a, b, c) JOIN J2_TBL t2 (a, d) USING (a) - ORDER BY a, d; - a | b | c | d ----+---+-------+---- - 0 | | zero | - 1 | 4 | one | -1 - 2 | 3 | two | 2 - 2 | 3 | two | 4 - 3 | 2 | three | -3 - 5 | 0 | five | -5 - 5 | 0 | five | -5 -(7 rows) - -SELECT * - FROM J1_TBL t1 (a, b, c) JOIN J2_TBL t2 (a, b) USING (b) - ORDER BY b, t1.a; - b | a | c | a ----+---+-------+--- - 0 | 5 | five | - 0 | | zero | - 2 | 3 | three | 2 - 4 | 1 | one | 2 -(4 rows) - --- test join using aliases -SELECT * FROM J1_TBL JOIN J2_TBL USING (i) WHERE J1_TBL.t = 'one'; -- ok - i | j | t | k ----+---+-----+---- - 1 | 4 | one | -1 -(1 row) - -SELECT * FROM J1_TBL JOIN J2_TBL USING (i) AS x WHERE J1_TBL.t = 'one'; -- ok - i | j | t | k ----+---+-----+---- - 1 | 4 | one | -1 -(1 row) - -SELECT * FROM (J1_TBL JOIN J2_TBL USING (i)) AS x WHERE J1_TBL.t = 'one'; -- error -ERROR: invalid reference to FROM-clause entry for table "j1_tbl" -LINE 1: ... * FROM (J1_TBL JOIN J2_TBL USING (i)) AS x WHERE J1_TBL.t =... - ^ -HINT: There is an entry for table "j1_tbl", but it cannot be referenced from this part of the query. -SELECT * FROM J1_TBL JOIN J2_TBL USING (i) AS x WHERE x.i = 1; -- ok - i | j | t | k ----+---+-----+---- - 1 | 4 | one | -1 -(1 row) - -SELECT * FROM J1_TBL JOIN J2_TBL USING (i) AS x WHERE x.t = 'one'; -- error -ERROR: column x.t does not exist -LINE 1: ...CT * FROM J1_TBL JOIN J2_TBL USING (i) AS x WHERE x.t = 'one... - ^ -SELECT * FROM (J1_TBL JOIN J2_TBL USING (i) AS x) AS xx WHERE x.i = 1; -- error (XXX could use better hint) -ERROR: missing FROM-clause entry for table "x" -LINE 1: ...ROM (J1_TBL JOIN J2_TBL USING (i) AS x) AS xx WHERE x.i = 1; - ^ -SELECT * FROM J1_TBL a1 JOIN J2_TBL a2 USING (i) AS a1; -- error -ERROR: table name "a1" specified more than once -SELECT x.* FROM J1_TBL JOIN J2_TBL USING (i) AS x WHERE J1_TBL.t = 'one'; - i ---- - 1 -(1 row) - -SELECT ROW(x.*) FROM J1_TBL JOIN J2_TBL USING (i) AS x WHERE J1_TBL.t = 'one'; - row ------ - (1) -(1 row) - -SELECT row_to_json(x.*) FROM J1_TBL JOIN J2_TBL USING (i) AS x WHERE J1_TBL.t = 'one'; - row_to_json -------------- - {"i":1} -(1 row) - --- --- NATURAL JOIN --- Inner equi-join on all columns with the same name --- -SELECT * - FROM J1_TBL NATURAL JOIN J2_TBL; - i | j | t | k ----+---+-------+---- - 0 | | zero | - 1 | 4 | one | -1 - 2 | 3 | two | 2 - 2 | 3 | two | 4 - 3 | 2 | three | -3 - 5 | 0 | five | -5 - 5 | 0 | five | -5 -(7 rows) - -SELECT * - FROM J1_TBL t1 (a, b, c) NATURAL JOIN J2_TBL t2 (a, d); - a | b | c | d ----+---+-------+---- - 0 | | zero | - 1 | 4 | one | -1 - 2 | 3 | two | 2 - 2 | 3 | two | 4 - 3 | 2 | three | -3 - 5 | 0 | five | -5 - 5 | 0 | five | -5 -(7 rows) - -SELECT * - FROM J1_TBL t1 (a, b, c) NATURAL JOIN J2_TBL t2 (d, a); - a | b | c | d ----+---+------+--- - 0 | | zero | - 2 | 3 | two | 2 - 4 | 1 | four | 2 -(3 rows) - --- mismatch number of columns --- currently, Postgres will fill in with underlying names -SELECT * - FROM J1_TBL t1 (a, b) NATURAL JOIN J2_TBL t2 (a); - a | b | t | k ----+---+-------+---- - 0 | | zero | - 1 | 4 | one | -1 - 2 | 3 | two | 2 - 2 | 3 | two | 4 - 3 | 2 | three | -3 - 5 | 0 | five | -5 - 5 | 0 | five | -5 -(7 rows) - --- --- Inner joins (equi-joins) --- -SELECT * - FROM J1_TBL JOIN J2_TBL ON (J1_TBL.i = J2_TBL.i); - i | j | t | i | k ----+---+-------+---+---- - 0 | | zero | 0 | - 1 | 4 | one | 1 | -1 - 2 | 3 | two | 2 | 2 - 2 | 3 | two | 2 | 4 - 3 | 2 | three | 3 | -3 - 5 | 0 | five | 5 | -5 - 5 | 0 | five | 5 | -5 -(7 rows) - -SELECT * - FROM J1_TBL JOIN J2_TBL ON (J1_TBL.i = J2_TBL.k); - i | j | t | i | k ----+---+------+---+--- - 0 | | zero | | 0 - 2 | 3 | two | 2 | 2 - 4 | 1 | four | 2 | 4 -(3 rows) - --- --- Non-equi-joins --- -SELECT * - FROM J1_TBL JOIN J2_TBL ON (J1_TBL.i <= J2_TBL.k); - i | j | t | i | k ----+---+-------+---+--- - 1 | 4 | one | 2 | 2 - 2 | 3 | two | 2 | 2 - 0 | | zero | 2 | 2 - 1 | 4 | one | 2 | 4 - 2 | 3 | two | 2 | 4 - 3 | 2 | three | 2 | 4 - 4 | 1 | four | 2 | 4 - 0 | | zero | 2 | 4 - 0 | | zero | | 0 -(9 rows) - --- --- Outer joins --- Note that OUTER is a noise word --- -SELECT * - FROM J1_TBL LEFT OUTER JOIN J2_TBL USING (i) - ORDER BY i, k, t; - i | j | t | k ----+---+-------+---- - 0 | | zero | - 1 | 4 | one | -1 - 2 | 3 | two | 2 - 2 | 3 | two | 4 - 3 | 2 | three | -3 - 4 | 1 | four | - 5 | 0 | five | -5 - 5 | 0 | five | -5 - 6 | 6 | six | - 7 | 7 | seven | - 8 | 8 | eight | - | | null | - | 0 | zero | -(13 rows) - -SELECT * - FROM J1_TBL LEFT JOIN J2_TBL USING (i) - ORDER BY i, k, t; - i | j | t | k ----+---+-------+---- - 0 | | zero | - 1 | 4 | one | -1 - 2 | 3 | two | 2 - 2 | 3 | two | 4 - 3 | 2 | three | -3 - 4 | 1 | four | - 5 | 0 | five | -5 - 5 | 0 | five | -5 - 6 | 6 | six | - 7 | 7 | seven | - 8 | 8 | eight | - | | null | - | 0 | zero | -(13 rows) - -SELECT * - FROM J1_TBL RIGHT OUTER JOIN J2_TBL USING (i); - i | j | t | k ----+---+-------+---- - 0 | | zero | - 1 | 4 | one | -1 - 2 | 3 | two | 2 - 2 | 3 | two | 4 - 3 | 2 | three | -3 - 5 | 0 | five | -5 - 5 | 0 | five | -5 - | | | - | | | 0 -(9 rows) - -SELECT * - FROM J1_TBL RIGHT JOIN J2_TBL USING (i); - i | j | t | k ----+---+-------+---- - 0 | | zero | - 1 | 4 | one | -1 - 2 | 3 | two | 2 - 2 | 3 | two | 4 - 3 | 2 | three | -3 - 5 | 0 | five | -5 - 5 | 0 | five | -5 - | | | - | | | 0 -(9 rows) - -SELECT * - FROM J1_TBL FULL OUTER JOIN J2_TBL USING (i) - ORDER BY i, k, t; - i | j | t | k ----+---+-------+---- - 0 | | zero | - 1 | 4 | one | -1 - 2 | 3 | two | 2 - 2 | 3 | two | 4 - 3 | 2 | three | -3 - 4 | 1 | four | - 5 | 0 | five | -5 - 5 | 0 | five | -5 - 6 | 6 | six | - 7 | 7 | seven | - 8 | 8 | eight | - | | | 0 - | | null | - | 0 | zero | - | | | -(15 rows) - -SELECT * - FROM J1_TBL FULL JOIN J2_TBL USING (i) - ORDER BY i, k, t; - i | j | t | k ----+---+-------+---- - 0 | | zero | - 1 | 4 | one | -1 - 2 | 3 | two | 2 - 2 | 3 | two | 4 - 3 | 2 | three | -3 - 4 | 1 | four | - 5 | 0 | five | -5 - 5 | 0 | five | -5 - 6 | 6 | six | - 7 | 7 | seven | - 8 | 8 | eight | - | | | 0 - | | null | - | 0 | zero | - | | | -(15 rows) - -SELECT * - FROM J1_TBL LEFT JOIN J2_TBL USING (i) WHERE (k = 1); - i | j | t | k ----+---+---+--- -(0 rows) - -SELECT * - FROM J1_TBL LEFT JOIN J2_TBL USING (i) WHERE (i = 1); - i | j | t | k ----+---+-----+---- - 1 | 4 | one | -1 -(1 row) - --- --- semijoin selectivity for <> --- -explain (costs off) -select * from int4_tbl i4, tenk1 a -where exists(select * from tenk1 b - where a.twothousand = b.twothousand and a.fivethous <> b.fivethous) - and i4.f1 = a.tenthous; - QUERY PLAN ----------------------------------------------- - Hash Semi Join - Hash Cond: (a.twothousand = b.twothousand) - Join Filter: (a.fivethous <> b.fivethous) - -> Hash Join - Hash Cond: (a.tenthous = i4.f1) - -> Seq Scan on tenk1 a - -> Hash - -> Seq Scan on int4_tbl i4 - -> Hash - -> Seq Scan on tenk1 b -(10 rows) - --- --- More complicated constructs --- --- --- Multiway full join --- -CREATE TABLE t1 (name TEXT, n INTEGER); -CREATE TABLE t2 (name TEXT, n INTEGER); -CREATE TABLE t3 (name TEXT, n INTEGER); -INSERT INTO t1 VALUES ( 'bb', 11 ); -INSERT INTO t2 VALUES ( 'bb', 12 ); -INSERT INTO t2 VALUES ( 'cc', 22 ); -INSERT INTO t2 VALUES ( 'ee', 42 ); -INSERT INTO t3 VALUES ( 'bb', 13 ); -INSERT INTO t3 VALUES ( 'cc', 23 ); -INSERT INTO t3 VALUES ( 'dd', 33 ); -SELECT * FROM t1 FULL JOIN t2 USING (name) FULL JOIN t3 USING (name); - name | n | n | n -------+----+----+---- - bb | 11 | 12 | 13 - cc | | 22 | 23 - dd | | | 33 - ee | | 42 | -(4 rows) - --- --- Test interactions of join syntax and subqueries --- --- Basic cases (we expect planner to pull up the subquery here) -SELECT * FROM -(SELECT * FROM t2) as s2 -INNER JOIN -(SELECT * FROM t3) s3 -USING (name); - name | n | n -------+----+---- - bb | 12 | 13 - cc | 22 | 23 -(2 rows) - -SELECT * FROM -(SELECT * FROM t2) as s2 -LEFT JOIN -(SELECT * FROM t3) s3 -USING (name); - name | n | n -------+----+---- - bb | 12 | 13 - cc | 22 | 23 - ee | 42 | -(3 rows) - -SELECT * FROM -(SELECT * FROM t2) as s2 -FULL JOIN -(SELECT * FROM t3) s3 -USING (name); - name | n | n -------+----+---- - bb | 12 | 13 - cc | 22 | 23 - dd | | 33 - ee | 42 | -(4 rows) - --- Cases with non-nullable expressions in subquery results; --- make sure these go to null as expected -SELECT * FROM -(SELECT name, n as s2_n, 2 as s2_2 FROM t2) as s2 -NATURAL INNER JOIN -(SELECT name, n as s3_n, 3 as s3_2 FROM t3) s3; - name | s2_n | s2_2 | s3_n | s3_2 -------+------+------+------+------ - bb | 12 | 2 | 13 | 3 - cc | 22 | 2 | 23 | 3 -(2 rows) - -SELECT * FROM -(SELECT name, n as s2_n, 2 as s2_2 FROM t2) as s2 -NATURAL LEFT JOIN -(SELECT name, n as s3_n, 3 as s3_2 FROM t3) s3; - name | s2_n | s2_2 | s3_n | s3_2 -------+------+------+------+------ - bb | 12 | 2 | 13 | 3 - cc | 22 | 2 | 23 | 3 - ee | 42 | 2 | | -(3 rows) - -SELECT * FROM -(SELECT name, n as s2_n, 2 as s2_2 FROM t2) as s2 -NATURAL FULL JOIN -(SELECT name, n as s3_n, 3 as s3_2 FROM t3) s3; - name | s2_n | s2_2 | s3_n | s3_2 -------+------+------+------+------ - bb | 12 | 2 | 13 | 3 - cc | 22 | 2 | 23 | 3 - dd | | | 33 | 3 - ee | 42 | 2 | | -(4 rows) - -SELECT * FROM -(SELECT name, n as s1_n, 1 as s1_1 FROM t1) as s1 -NATURAL INNER JOIN -(SELECT name, n as s2_n, 2 as s2_2 FROM t2) as s2 -NATURAL INNER JOIN -(SELECT name, n as s3_n, 3 as s3_2 FROM t3) s3; - name | s1_n | s1_1 | s2_n | s2_2 | s3_n | s3_2 -------+------+------+------+------+------+------ - bb | 11 | 1 | 12 | 2 | 13 | 3 -(1 row) - -SELECT * FROM -(SELECT name, n as s1_n, 1 as s1_1 FROM t1) as s1 -NATURAL FULL JOIN -(SELECT name, n as s2_n, 2 as s2_2 FROM t2) as s2 -NATURAL FULL JOIN -(SELECT name, n as s3_n, 3 as s3_2 FROM t3) s3; - name | s1_n | s1_1 | s2_n | s2_2 | s3_n | s3_2 -------+------+------+------+------+------+------ - bb | 11 | 1 | 12 | 2 | 13 | 3 - cc | | | 22 | 2 | 23 | 3 - dd | | | | | 33 | 3 - ee | | | 42 | 2 | | -(4 rows) - -SELECT * FROM -(SELECT name, n as s1_n FROM t1) as s1 -NATURAL FULL JOIN - (SELECT * FROM - (SELECT name, n as s2_n FROM t2) as s2 - NATURAL FULL JOIN - (SELECT name, n as s3_n FROM t3) as s3 - ) ss2; - name | s1_n | s2_n | s3_n -------+------+------+------ - bb | 11 | 12 | 13 - cc | | 22 | 23 - dd | | | 33 - ee | | 42 | -(4 rows) - -SELECT * FROM -(SELECT name, n as s1_n FROM t1) as s1 -NATURAL FULL JOIN - (SELECT * FROM - (SELECT name, n as s2_n, 2 as s2_2 FROM t2) as s2 - NATURAL FULL JOIN - (SELECT name, n as s3_n FROM t3) as s3 - ) ss2; - name | s1_n | s2_n | s2_2 | s3_n -------+------+------+------+------ - bb | 11 | 12 | 2 | 13 - cc | | 22 | 2 | 23 - dd | | | | 33 - ee | | 42 | 2 | -(4 rows) - --- Constants as join keys can also be problematic -SELECT * FROM - (SELECT name, n as s1_n FROM t1) as s1 -FULL JOIN - (SELECT name, 2 as s2_n FROM t2) as s2 -ON (s1_n = s2_n); - name | s1_n | name | s2_n -------+------+------+------ - | | bb | 2 - | | cc | 2 - | | ee | 2 - bb | 11 | | -(4 rows) - --- Test for propagation of nullability constraints into sub-joins -create temp table x (x1 int, x2 int); -insert into x values (1,11); -insert into x values (2,22); -insert into x values (3,null); -insert into x values (4,44); -insert into x values (5,null); -create temp table y (y1 int, y2 int); -insert into y values (1,111); -insert into y values (2,222); -insert into y values (3,333); -insert into y values (4,null); -select * from x; - x1 | x2 -----+---- - 1 | 11 - 2 | 22 - 3 | - 4 | 44 - 5 | -(5 rows) - -select * from y; - y1 | y2 -----+----- - 1 | 111 - 2 | 222 - 3 | 333 - 4 | -(4 rows) - -select * from x left join y on (x1 = y1 and x2 is not null); - x1 | x2 | y1 | y2 -----+----+----+----- - 1 | 11 | 1 | 111 - 2 | 22 | 2 | 222 - 3 | | | - 4 | 44 | 4 | - 5 | | | -(5 rows) - -select * from x left join y on (x1 = y1 and y2 is not null); - x1 | x2 | y1 | y2 -----+----+----+----- - 1 | 11 | 1 | 111 - 2 | 22 | 2 | 222 - 3 | | 3 | 333 - 4 | 44 | | - 5 | | | -(5 rows) - -select * from (x left join y on (x1 = y1)) left join x xx(xx1,xx2) -on (x1 = xx1); - x1 | x2 | y1 | y2 | xx1 | xx2 -----+----+----+-----+-----+----- - 1 | 11 | 1 | 111 | 1 | 11 - 2 | 22 | 2 | 222 | 2 | 22 - 3 | | 3 | 333 | 3 | - 4 | 44 | 4 | | 4 | 44 - 5 | | | | 5 | -(5 rows) - -select * from (x left join y on (x1 = y1)) left join x xx(xx1,xx2) -on (x1 = xx1 and x2 is not null); - x1 | x2 | y1 | y2 | xx1 | xx2 -----+----+----+-----+-----+----- - 1 | 11 | 1 | 111 | 1 | 11 - 2 | 22 | 2 | 222 | 2 | 22 - 3 | | 3 | 333 | | - 4 | 44 | 4 | | 4 | 44 - 5 | | | | | -(5 rows) - -select * from (x left join y on (x1 = y1)) left join x xx(xx1,xx2) -on (x1 = xx1 and y2 is not null); - x1 | x2 | y1 | y2 | xx1 | xx2 -----+----+----+-----+-----+----- - 1 | 11 | 1 | 111 | 1 | 11 - 2 | 22 | 2 | 222 | 2 | 22 - 3 | | 3 | 333 | 3 | - 4 | 44 | 4 | | | - 5 | | | | | -(5 rows) - -select * from (x left join y on (x1 = y1)) left join x xx(xx1,xx2) -on (x1 = xx1 and xx2 is not null); - x1 | x2 | y1 | y2 | xx1 | xx2 -----+----+----+-----+-----+----- - 1 | 11 | 1 | 111 | 1 | 11 - 2 | 22 | 2 | 222 | 2 | 22 - 3 | | 3 | 333 | | - 4 | 44 | 4 | | 4 | 44 - 5 | | | | | -(5 rows) - --- these should NOT give the same answers as above -select * from (x left join y on (x1 = y1)) left join x xx(xx1,xx2) -on (x1 = xx1) where (x2 is not null); - x1 | x2 | y1 | y2 | xx1 | xx2 -----+----+----+-----+-----+----- - 1 | 11 | 1 | 111 | 1 | 11 - 2 | 22 | 2 | 222 | 2 | 22 - 4 | 44 | 4 | | 4 | 44 -(3 rows) - -select * from (x left join y on (x1 = y1)) left join x xx(xx1,xx2) -on (x1 = xx1) where (y2 is not null); - x1 | x2 | y1 | y2 | xx1 | xx2 -----+----+----+-----+-----+----- - 1 | 11 | 1 | 111 | 1 | 11 - 2 | 22 | 2 | 222 | 2 | 22 - 3 | | 3 | 333 | 3 | -(3 rows) - -select * from (x left join y on (x1 = y1)) left join x xx(xx1,xx2) -on (x1 = xx1) where (xx2 is not null); - x1 | x2 | y1 | y2 | xx1 | xx2 -----+----+----+-----+-----+----- - 1 | 11 | 1 | 111 | 1 | 11 - 2 | 22 | 2 | 222 | 2 | 22 - 4 | 44 | 4 | | 4 | 44 -(3 rows) - --- --- regression test: check for bug with propagation of implied equality --- to outside an IN --- -select count(*) from tenk1 a where unique1 in - (select unique1 from tenk1 b join tenk1 c using (unique1) - where b.unique2 = 42); - count -------- - 1 -(1 row) - --- --- regression test: check for failure to generate a plan with multiple --- degenerate IN clauses --- -select count(*) from tenk1 x where - x.unique1 in (select a.f1 from int4_tbl a,float8_tbl b where a.f1=b.f1) and - x.unique1 = 0 and - x.unique1 in (select aa.f1 from int4_tbl aa,float8_tbl bb where aa.f1=bb.f1); - count -------- - 1 -(1 row) - --- try that with GEQO too -begin; -set geqo = on; -set geqo_threshold = 2; -select count(*) from tenk1 x where - x.unique1 in (select a.f1 from int4_tbl a,float8_tbl b where a.f1=b.f1) and - x.unique1 = 0 and - x.unique1 in (select aa.f1 from int4_tbl aa,float8_tbl bb where aa.f1=bb.f1); - count -------- - 1 -(1 row) - -rollback; --- --- regression test: be sure we cope with proven-dummy append rels --- -explain (costs off) -select aa, bb, unique1, unique1 - from tenk1 right join b on aa = unique1 - where bb < bb and bb is null; - QUERY PLAN --------------------------- - Result - One-Time Filter: false -(2 rows) - -select aa, bb, unique1, unique1 - from tenk1 right join b on aa = unique1 - where bb < bb and bb is null; - aa | bb | unique1 | unique1 -----+----+---------+--------- -(0 rows) - --- --- regression test: check handling of empty-FROM subquery underneath outer join --- -explain (costs off) -select * from int8_tbl i1 left join (int8_tbl i2 join - (select 123 as x) ss on i2.q1 = x) on i1.q2 = i2.q2 -order by 1, 2; - QUERY PLAN -------------------------------------------- - Sort - Sort Key: i1.q1, i1.q2 - -> Hash Left Join - Hash Cond: (i1.q2 = i2.q2) - -> Seq Scan on int8_tbl i1 - -> Hash - -> Seq Scan on int8_tbl i2 - Filter: (q1 = 123) -(8 rows) - -select * from int8_tbl i1 left join (int8_tbl i2 join - (select 123 as x) ss on i2.q1 = x) on i1.q2 = i2.q2 -order by 1, 2; - q1 | q2 | q1 | q2 | x -------------------+-------------------+-----+------------------+----- - 123 | 456 | 123 | 456 | 123 - 123 | 4567890123456789 | 123 | 4567890123456789 | 123 - 4567890123456789 | -4567890123456789 | | | - 4567890123456789 | 123 | | | - 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 123 -(5 rows) - --- --- regression test: check a case where join_clause_is_movable_into() gives --- an imprecise result, causing an assertion failure --- -select count(*) -from - (select t3.tenthous as x1, coalesce(t1.stringu1, t2.stringu1) as x2 - from tenk1 t1 - left join tenk1 t2 on t1.unique1 = t2.unique1 - join tenk1 t3 on t1.unique2 = t3.unique2) ss, - tenk1 t4, - tenk1 t5 -where t4.thousand = t5.unique1 and ss.x1 = t4.tenthous and ss.x2 = t5.stringu1; - count -------- - 1000 -(1 row) - --- --- regression test: check a case where we formerly missed including an EC --- enforcement clause because it was expected to be handled at scan level --- -explain (costs off) -select a.f1, b.f1, t.thousand, t.tenthous from - tenk1 t, - (select sum(f1)+1 as f1 from int4_tbl i4a) a, - (select sum(f1) as f1 from int4_tbl i4b) b -where b.f1 = t.thousand and a.f1 = b.f1 and (a.f1+b.f1+999) = t.tenthous; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------ - Nested Loop - -> Aggregate - -> Seq Scan on int4_tbl i4b - -> Nested Loop - Join Filter: ((sum(i4b.f1)) = ((sum(i4a.f1) + 1))) - -> Aggregate - -> Seq Scan on int4_tbl i4a - -> Index Only Scan using tenk1_thous_tenthous on tenk1 t - Index Cond: ((thousand = (sum(i4b.f1))) AND (tenthous = ((((sum(i4a.f1) + 1)) + (sum(i4b.f1))) + 999))) -(9 rows) - -select a.f1, b.f1, t.thousand, t.tenthous from - tenk1 t, - (select sum(f1)+1 as f1 from int4_tbl i4a) a, - (select sum(f1) as f1 from int4_tbl i4b) b -where b.f1 = t.thousand and a.f1 = b.f1 and (a.f1+b.f1+999) = t.tenthous; - f1 | f1 | thousand | tenthous -----+----+----------+---------- -(0 rows) - --- --- check a case where we formerly got confused by conflicting sort orders --- in redundant merge join path keys --- -explain (costs off) -select * from - j1_tbl full join - (select * from j2_tbl order by j2_tbl.i desc, j2_tbl.k asc) j2_tbl - on j1_tbl.i = j2_tbl.i and j1_tbl.i = j2_tbl.k; - QUERY PLAN ------------------------------------------------------------------ - Merge Full Join - Merge Cond: ((j2_tbl.i = j1_tbl.i) AND (j2_tbl.k = j1_tbl.i)) - -> Sort - Sort Key: j2_tbl.i DESC, j2_tbl.k - -> Seq Scan on j2_tbl - -> Sort - Sort Key: j1_tbl.i DESC - -> Seq Scan on j1_tbl -(8 rows) - -select * from - j1_tbl full join - (select * from j2_tbl order by j2_tbl.i desc, j2_tbl.k asc) j2_tbl - on j1_tbl.i = j2_tbl.i and j1_tbl.i = j2_tbl.k; - i | j | t | i | k ----+---+-------+---+---- - | | | | 0 - | | | | - | 0 | zero | | - | | null | | - 8 | 8 | eight | | - 7 | 7 | seven | | - 6 | 6 | six | | - | | | 5 | -5 - | | | 5 | -5 - 5 | 0 | five | | - 4 | 1 | four | | - | | | 3 | -3 - 3 | 2 | three | | - 2 | 3 | two | 2 | 2 - | | | 2 | 4 - | | | 1 | -1 - | | | 0 | - 1 | 4 | one | | - 0 | | zero | | -(19 rows) - --- --- a different check for handling of redundant sort keys in merge joins --- -explain (costs off) -select count(*) from - (select * from tenk1 x order by x.thousand, x.twothousand, x.fivethous) x - left join - (select * from tenk1 y order by y.unique2) y - on x.thousand = y.unique2 and x.twothousand = y.hundred and x.fivethous = y.unique2; - QUERY PLAN ----------------------------------------------------------------------------------- - Aggregate - -> Merge Left Join - Merge Cond: (x.thousand = y.unique2) - Join Filter: ((x.twothousand = y.hundred) AND (x.fivethous = y.unique2)) - -> Sort - Sort Key: x.thousand, x.twothousand, x.fivethous - -> Seq Scan on tenk1 x - -> Materialize - -> Index Scan using tenk1_unique2 on tenk1 y -(9 rows) - -select count(*) from - (select * from tenk1 x order by x.thousand, x.twothousand, x.fivethous) x - left join - (select * from tenk1 y order by y.unique2) y - on x.thousand = y.unique2 and x.twothousand = y.hundred and x.fivethous = y.unique2; - count -------- - 10000 -(1 row) - --- --- Clean up --- -DROP TABLE t1; -DROP TABLE t2; -DROP TABLE t3; -DROP TABLE J1_TBL; -DROP TABLE J2_TBL; --- Both DELETE and UPDATE allow the specification of additional tables --- to "join" against to determine which rows should be modified. -CREATE TEMP TABLE t1 (a int, b int); -CREATE TEMP TABLE t2 (a int, b int); -CREATE TEMP TABLE t3 (x int, y int); -INSERT INTO t1 VALUES (5, 10); -INSERT INTO t1 VALUES (15, 20); -INSERT INTO t1 VALUES (100, 100); -INSERT INTO t1 VALUES (200, 1000); -INSERT INTO t2 VALUES (200, 2000); -INSERT INTO t3 VALUES (5, 20); -INSERT INTO t3 VALUES (6, 7); -INSERT INTO t3 VALUES (7, 8); -INSERT INTO t3 VALUES (500, 100); -DELETE FROM t3 USING t1 table1 WHERE t3.x = table1.a; -SELECT * FROM t3; - x | y ------+----- - 6 | 7 - 7 | 8 - 500 | 100 -(3 rows) - -DELETE FROM t3 USING t1 JOIN t2 USING (a) WHERE t3.x > t1.a; -SELECT * FROM t3; - x | y ----+--- - 6 | 7 - 7 | 8 -(2 rows) - -DELETE FROM t3 USING t3 t3_other WHERE t3.x = t3_other.x AND t3.y = t3_other.y; -SELECT * FROM t3; - x | y ----+--- -(0 rows) - --- Test join against inheritance tree -create temp table t2a () inherits (t2); -insert into t2a values (200, 2001); -select * from t1 left join t2 on (t1.a = t2.a); - a | b | a | b ------+------+-----+------ - 5 | 10 | | - 15 | 20 | | - 100 | 100 | | - 200 | 1000 | 200 | 2000 - 200 | 1000 | 200 | 2001 -(5 rows) - --- Test matching of column name with wrong alias -select t1.x from t1 join t3 on (t1.a = t3.x); -ERROR: column t1.x does not exist -LINE 1: select t1.x from t1 join t3 on (t1.a = t3.x); - ^ -HINT: Perhaps you meant to reference the column "t3.x". --- --- regression test for 8.1 merge right join bug --- -CREATE TEMP TABLE tt1 ( tt1_id int4, joincol int4 ); -INSERT INTO tt1 VALUES (1, 11); -INSERT INTO tt1 VALUES (2, NULL); -CREATE TEMP TABLE tt2 ( tt2_id int4, joincol int4 ); -INSERT INTO tt2 VALUES (21, 11); -INSERT INTO tt2 VALUES (22, 11); -set enable_hashjoin to off; -set enable_nestloop to off; --- these should give the same results -select tt1.*, tt2.* from tt1 left join tt2 on tt1.joincol = tt2.joincol; - tt1_id | joincol | tt2_id | joincol ---------+---------+--------+--------- - 1 | 11 | 21 | 11 - 1 | 11 | 22 | 11 - 2 | | | -(3 rows) - -select tt1.*, tt2.* from tt2 right join tt1 on tt1.joincol = tt2.joincol; - tt1_id | joincol | tt2_id | joincol ---------+---------+--------+--------- - 1 | 11 | 21 | 11 - 1 | 11 | 22 | 11 - 2 | | | -(3 rows) - -reset enable_hashjoin; -reset enable_nestloop; --- --- regression test for bug #13908 (hash join with skew tuples & nbatch increase) --- -set work_mem to '64kB'; -set enable_mergejoin to off; -set enable_memoize to off; -explain (costs off) -select count(*) from tenk1 a, tenk1 b - where a.hundred = b.thousand and (b.fivethous % 10) < 10; - QUERY PLAN ------------------------------------------------------------- - Aggregate - -> Hash Join - Hash Cond: (a.hundred = b.thousand) - -> Index Only Scan using tenk1_hundred on tenk1 a - -> Hash - -> Seq Scan on tenk1 b - Filter: ((fivethous % 10) < 10) -(7 rows) - -select count(*) from tenk1 a, tenk1 b - where a.hundred = b.thousand and (b.fivethous % 10) < 10; - count --------- - 100000 -(1 row) - -reset work_mem; -reset enable_mergejoin; -reset enable_memoize; --- --- regression test for 8.2 bug with improper re-ordering of left joins --- -create temp table tt3(f1 int, f2 text); -insert into tt3 select x, repeat('xyzzy', 100) from generate_series(1,10000) x; -create index tt3i on tt3(f1); -analyze tt3; -create temp table tt4(f1 int); -insert into tt4 values (0),(1),(9999); -analyze tt4; -SELECT a.f1 -FROM tt4 a -LEFT JOIN ( - SELECT b.f1 - FROM tt3 b LEFT JOIN tt3 c ON (b.f1 = c.f1) - WHERE c.f1 IS NULL -) AS d ON (a.f1 = d.f1) -WHERE d.f1 IS NULL; - f1 ------- - 0 - 1 - 9999 -(3 rows) - --- --- regression test for proper handling of outer joins within antijoins --- -create temp table tt4x(c1 int, c2 int, c3 int); -explain (costs off) -select * from tt4x t1 -where not exists ( - select 1 from tt4x t2 - left join tt4x t3 on t2.c3 = t3.c1 - left join ( select t5.c1 as c1 - from tt4x t4 left join tt4x t5 on t4.c2 = t5.c1 - ) a1 on t3.c2 = a1.c1 - where t1.c1 = t2.c2 -); - QUERY PLAN ---------------------------------------------------------- - Hash Anti Join - Hash Cond: (t1.c1 = t2.c2) - -> Seq Scan on tt4x t1 - -> Hash - -> Merge Right Join - Merge Cond: (t5.c1 = t3.c2) - -> Merge Join - Merge Cond: (t4.c2 = t5.c1) - -> Sort - Sort Key: t4.c2 - -> Seq Scan on tt4x t4 - -> Sort - Sort Key: t5.c1 - -> Seq Scan on tt4x t5 - -> Sort - Sort Key: t3.c2 - -> Merge Left Join - Merge Cond: (t2.c3 = t3.c1) - -> Sort - Sort Key: t2.c3 - -> Seq Scan on tt4x t2 - -> Sort - Sort Key: t3.c1 - -> Seq Scan on tt4x t3 -(24 rows) - --- --- regression test for problems of the sort depicted in bug #3494 --- -create temp table tt5(f1 int, f2 int); -create temp table tt6(f1 int, f2 int); -insert into tt5 values(1, 10); -insert into tt5 values(1, 11); -insert into tt6 values(1, 9); -insert into tt6 values(1, 2); -insert into tt6 values(2, 9); -select * from tt5,tt6 where tt5.f1 = tt6.f1 and tt5.f1 = tt5.f2 - tt6.f2; - f1 | f2 | f1 | f2 -----+----+----+---- - 1 | 10 | 1 | 9 -(1 row) - --- --- regression test for problems of the sort depicted in bug #3588 --- -create temp table xx (pkxx int); -create temp table yy (pkyy int, pkxx int); -insert into xx values (1); -insert into xx values (2); -insert into xx values (3); -insert into yy values (101, 1); -insert into yy values (201, 2); -insert into yy values (301, NULL); -select yy.pkyy as yy_pkyy, yy.pkxx as yy_pkxx, yya.pkyy as yya_pkyy, - xxa.pkxx as xxa_pkxx, xxb.pkxx as xxb_pkxx -from yy - left join (SELECT * FROM yy where pkyy = 101) as yya ON yy.pkyy = yya.pkyy - left join xx xxa on yya.pkxx = xxa.pkxx - left join xx xxb on coalesce (xxa.pkxx, 1) = xxb.pkxx; - yy_pkyy | yy_pkxx | yya_pkyy | xxa_pkxx | xxb_pkxx ----------+---------+----------+----------+---------- - 101 | 1 | 101 | 1 | 1 - 201 | 2 | | | 1 - 301 | | | | 1 -(3 rows) - --- --- regression test for improper pushing of constants across outer-join clauses --- (as seen in early 8.2.x releases) --- -create temp table zt1 (f1 int primary key); -create temp table zt2 (f2 int primary key); -create temp table zt3 (f3 int primary key); -insert into zt1 values(53); -insert into zt2 values(53); -select * from - zt2 left join zt3 on (f2 = f3) - left join zt1 on (f3 = f1) -where f2 = 53; - f2 | f3 | f1 -----+----+---- - 53 | | -(1 row) - -create temp view zv1 as select *,'dummy'::text AS junk from zt1; -select * from - zt2 left join zt3 on (f2 = f3) - left join zv1 on (f3 = f1) -where f2 = 53; - f2 | f3 | f1 | junk -----+----+----+------ - 53 | | | -(1 row) - --- --- regression test for improper extraction of OR indexqual conditions --- (as seen in early 8.3.x releases) --- -select a.unique2, a.ten, b.tenthous, b.unique2, b.hundred -from tenk1 a left join tenk1 b on a.unique2 = b.tenthous -where a.unique1 = 42 and - ((b.unique2 is null and a.ten = 2) or b.hundred = 3); - unique2 | ten | tenthous | unique2 | hundred ----------+-----+----------+---------+--------- -(0 rows) - --- --- test proper positioning of one-time quals in EXISTS (8.4devel bug) --- -prepare foo(bool) as - select count(*) from tenk1 a left join tenk1 b - on (a.unique2 = b.unique1 and exists - (select 1 from tenk1 c where c.thousand = b.unique2 and $1)); -execute foo(true); - count -------- - 10000 -(1 row) - -execute foo(false); - count -------- - 10000 -(1 row) - --- --- test for sane behavior with noncanonical merge clauses, per bug #4926 --- -begin; -set enable_mergejoin = 1; -set enable_hashjoin = 0; -set enable_nestloop = 0; -create temp table a (i integer); -create temp table b (x integer, y integer); -select * from a left join b on i = x and i = y and x = i; - i | x | y ----+---+--- -(0 rows) - -rollback; --- --- test handling of merge clauses using record_ops --- -begin; -create type mycomptype as (id int, v bigint); -create temp table tidv (idv mycomptype); -create index on tidv (idv); -explain (costs off) -select a.idv, b.idv from tidv a, tidv b where a.idv = b.idv; - QUERY PLAN ----------------------------------------------------------- - Merge Join - Merge Cond: (a.idv = b.idv) - -> Index Only Scan using tidv_idv_idx on tidv a - -> Materialize - -> Index Only Scan using tidv_idv_idx on tidv b -(5 rows) - -set enable_mergejoin = 0; -set enable_hashjoin = 0; -explain (costs off) -select a.idv, b.idv from tidv a, tidv b where a.idv = b.idv; - QUERY PLAN ----------------------------------------------------- - Nested Loop - -> Seq Scan on tidv a - -> Index Only Scan using tidv_idv_idx on tidv b - Index Cond: (idv = a.idv) -(4 rows) - -rollback; --- --- test NULL behavior of whole-row Vars, per bug #5025 --- -select t1.q2, count(t2.*) -from int8_tbl t1 left join int8_tbl t2 on (t1.q2 = t2.q1) -group by t1.q2 order by 1; - q2 | count --------------------+------- - -4567890123456789 | 0 - 123 | 2 - 456 | 0 - 4567890123456789 | 6 -(4 rows) - -select t1.q2, count(t2.*) -from int8_tbl t1 left join (select * from int8_tbl) t2 on (t1.q2 = t2.q1) -group by t1.q2 order by 1; - q2 | count --------------------+------- - -4567890123456789 | 0 - 123 | 2 - 456 | 0 - 4567890123456789 | 6 -(4 rows) - -select t1.q2, count(t2.*) -from int8_tbl t1 left join (select * from int8_tbl offset 0) t2 on (t1.q2 = t2.q1) -group by t1.q2 order by 1; - q2 | count --------------------+------- - -4567890123456789 | 0 - 123 | 2 - 456 | 0 - 4567890123456789 | 6 -(4 rows) - -select t1.q2, count(t2.*) -from int8_tbl t1 left join - (select q1, case when q2=1 then 1 else q2 end as q2 from int8_tbl) t2 - on (t1.q2 = t2.q1) -group by t1.q2 order by 1; - q2 | count --------------------+------- - -4567890123456789 | 0 - 123 | 2 - 456 | 0 - 4567890123456789 | 6 -(4 rows) - --- --- test incorrect failure to NULL pulled-up subexpressions --- -begin; -create temp table a ( - code char not null, - constraint a_pk primary key (code) -); -create temp table b ( - a char not null, - num integer not null, - constraint b_pk primary key (a, num) -); -create temp table c ( - name char not null, - a char, - constraint c_pk primary key (name) -); -insert into a (code) values ('p'); -insert into a (code) values ('q'); -insert into b (a, num) values ('p', 1); -insert into b (a, num) values ('p', 2); -insert into c (name, a) values ('A', 'p'); -insert into c (name, a) values ('B', 'q'); -insert into c (name, a) values ('C', null); -select c.name, ss.code, ss.b_cnt, ss.const -from c left join - (select a.code, coalesce(b_grp.cnt, 0) as b_cnt, -1 as const - from a left join - (select count(1) as cnt, b.a from b group by b.a) as b_grp - on a.code = b_grp.a - ) as ss - on (c.a = ss.code) -order by c.name; - name | code | b_cnt | const -------+------+-------+------- - A | p | 2 | -1 - B | q | 0 | -1 - C | | | -(3 rows) - -rollback; --- --- test incorrect handling of placeholders that only appear in targetlists, --- per bug #6154 --- -SELECT * FROM -( SELECT 1 as key1 ) sub1 -LEFT JOIN -( SELECT sub3.key3, sub4.value2, COALESCE(sub4.value2, 66) as value3 FROM - ( SELECT 1 as key3 ) sub3 - LEFT JOIN - ( SELECT sub5.key5, COALESCE(sub6.value1, 1) as value2 FROM - ( SELECT 1 as key5 ) sub5 - LEFT JOIN - ( SELECT 2 as key6, 42 as value1 ) sub6 - ON sub5.key5 = sub6.key6 - ) sub4 - ON sub4.key5 = sub3.key3 -) sub2 -ON sub1.key1 = sub2.key3; - key1 | key3 | value2 | value3 -------+------+--------+-------- - 1 | 1 | 1 | 1 -(1 row) - --- test the path using join aliases, too -SELECT * FROM -( SELECT 1 as key1 ) sub1 -LEFT JOIN -( SELECT sub3.key3, value2, COALESCE(value2, 66) as value3 FROM - ( SELECT 1 as key3 ) sub3 - LEFT JOIN - ( SELECT sub5.key5, COALESCE(sub6.value1, 1) as value2 FROM - ( SELECT 1 as key5 ) sub5 - LEFT JOIN - ( SELECT 2 as key6, 42 as value1 ) sub6 - ON sub5.key5 = sub6.key6 - ) sub4 - ON sub4.key5 = sub3.key3 -) sub2 -ON sub1.key1 = sub2.key3; - key1 | key3 | value2 | value3 -------+------+--------+-------- - 1 | 1 | 1 | 1 -(1 row) - --- --- test case where a PlaceHolderVar is used as a nestloop parameter --- -EXPLAIN (COSTS OFF) -SELECT qq, unique1 - FROM - ( SELECT COALESCE(q1, 0) AS qq FROM int8_tbl a ) AS ss1 - FULL OUTER JOIN - ( SELECT COALESCE(q2, -1) AS qq FROM int8_tbl b ) AS ss2 - USING (qq) - INNER JOIN tenk1 c ON qq = unique2; - QUERY PLAN ---------------------------------------------------------------------------------------------------------- - Nested Loop - -> Hash Full Join - Hash Cond: ((COALESCE(a.q1, '0'::bigint)) = (COALESCE(b.q2, '-1'::bigint))) - -> Seq Scan on int8_tbl a - -> Hash - -> Seq Scan on int8_tbl b - -> Index Scan using tenk1_unique2 on tenk1 c - Index Cond: (unique2 = COALESCE((COALESCE(a.q1, '0'::bigint)), (COALESCE(b.q2, '-1'::bigint)))) -(8 rows) - -SELECT qq, unique1 - FROM - ( SELECT COALESCE(q1, 0) AS qq FROM int8_tbl a ) AS ss1 - FULL OUTER JOIN - ( SELECT COALESCE(q2, -1) AS qq FROM int8_tbl b ) AS ss2 - USING (qq) - INNER JOIN tenk1 c ON qq = unique2; - qq | unique1 ------+--------- - 123 | 4596 - 123 | 4596 - 456 | 7318 -(3 rows) - --- --- nested nestloops can require nested PlaceHolderVars --- -create temp table nt1 ( - id int primary key, - a1 boolean, - a2 boolean -); -create temp table nt2 ( - id int primary key, - nt1_id int, - b1 boolean, - b2 boolean, - foreign key (nt1_id) references nt1(id) -); -create temp table nt3 ( - id int primary key, - nt2_id int, - c1 boolean, - foreign key (nt2_id) references nt2(id) -); -insert into nt1 values (1,true,true); -insert into nt1 values (2,true,false); -insert into nt1 values (3,false,false); -insert into nt2 values (1,1,true,true); -insert into nt2 values (2,2,true,false); -insert into nt2 values (3,3,false,false); -insert into nt3 values (1,1,true); -insert into nt3 values (2,2,false); -insert into nt3 values (3,3,true); -explain (costs off) -select nt3.id -from nt3 as nt3 - left join - (select nt2.*, (nt2.b1 and ss1.a3) AS b3 - from nt2 as nt2 - left join - (select nt1.*, (nt1.id is not null) as a3 from nt1) as ss1 - on ss1.id = nt2.nt1_id - ) as ss2 - on ss2.id = nt3.nt2_id -where nt3.id = 1 and ss2.b3; - QUERY PLAN ------------------------------------------------ - Nested Loop - -> Nested Loop - -> Index Scan using nt3_pkey on nt3 - Index Cond: (id = 1) - -> Index Scan using nt2_pkey on nt2 - Index Cond: (id = nt3.nt2_id) - -> Index Only Scan using nt1_pkey on nt1 - Index Cond: (id = nt2.nt1_id) - Filter: (nt2.b1 AND (id IS NOT NULL)) -(9 rows) - -select nt3.id -from nt3 as nt3 - left join - (select nt2.*, (nt2.b1 and ss1.a3) AS b3 - from nt2 as nt2 - left join - (select nt1.*, (nt1.id is not null) as a3 from nt1) as ss1 - on ss1.id = nt2.nt1_id - ) as ss2 - on ss2.id = nt3.nt2_id -where nt3.id = 1 and ss2.b3; - id ----- - 1 -(1 row) - --- --- test case where a PlaceHolderVar is propagated into a subquery --- -explain (costs off) -select * from - int8_tbl t1 left join - (select q1 as x, 42 as y from int8_tbl t2) ss - on t1.q2 = ss.x -where - 1 = (select 1 from int8_tbl t3 where ss.y is not null limit 1) -order by 1,2; - QUERY PLAN ------------------------------------------------------------ - Sort - Sort Key: t1.q1, t1.q2 - -> Hash Left Join - Hash Cond: (t1.q2 = t2.q1) - Filter: (1 = (SubPlan 1)) - -> Seq Scan on int8_tbl t1 - -> Hash - -> Seq Scan on int8_tbl t2 - SubPlan 1 - -> Limit - -> Result - One-Time Filter: ((42) IS NOT NULL) - -> Seq Scan on int8_tbl t3 -(13 rows) - -select * from - int8_tbl t1 left join - (select q1 as x, 42 as y from int8_tbl t2) ss - on t1.q2 = ss.x -where - 1 = (select 1 from int8_tbl t3 where ss.y is not null limit 1) -order by 1,2; - q1 | q2 | x | y -------------------+------------------+------------------+---- - 123 | 4567890123456789 | 4567890123456789 | 42 - 123 | 4567890123456789 | 4567890123456789 | 42 - 123 | 4567890123456789 | 4567890123456789 | 42 - 4567890123456789 | 123 | 123 | 42 - 4567890123456789 | 123 | 123 | 42 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 42 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 42 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 42 -(8 rows) - --- --- variant where a PlaceHolderVar is needed at a join, but not above the join --- -explain (costs off) -select * from - int4_tbl as i41, - lateral - (select 1 as x from - (select i41.f1 as lat, - i42.f1 as loc from - int8_tbl as i81, int4_tbl as i42) as ss1 - right join int4_tbl as i43 on (i43.f1 > 1) - where ss1.loc = ss1.lat) as ss2 -where i41.f1 > 0; - QUERY PLAN --------------------------------------------------- - Nested Loop - -> Nested Loop - -> Seq Scan on int4_tbl i41 - Filter: (f1 > 0) - -> Nested Loop - Join Filter: (i41.f1 = i42.f1) - -> Seq Scan on int8_tbl i81 - -> Materialize - -> Seq Scan on int4_tbl i42 - -> Materialize - -> Seq Scan on int4_tbl i43 - Filter: (f1 > 1) -(12 rows) - -select * from - int4_tbl as i41, - lateral - (select 1 as x from - (select i41.f1 as lat, - i42.f1 as loc from - int8_tbl as i81, int4_tbl as i42) as ss1 - right join int4_tbl as i43 on (i43.f1 > 1) - where ss1.loc = ss1.lat) as ss2 -where i41.f1 > 0; - f1 | x -------------+--- - 123456 | 1 - 123456 | 1 - 123456 | 1 - 123456 | 1 - 123456 | 1 - 123456 | 1 - 123456 | 1 - 123456 | 1 - 123456 | 1 - 123456 | 1 - 2147483647 | 1 - 2147483647 | 1 - 2147483647 | 1 - 2147483647 | 1 - 2147483647 | 1 - 2147483647 | 1 - 2147483647 | 1 - 2147483647 | 1 - 2147483647 | 1 - 2147483647 | 1 -(20 rows) - --- --- test the corner cases FULL JOIN ON TRUE and FULL JOIN ON FALSE --- -select * from int4_tbl a full join int4_tbl b on true; - f1 | f1 --------------+------------- - 0 | 0 - 0 | 123456 - 0 | -123456 - 0 | 2147483647 - 0 | -2147483647 - 123456 | 0 - 123456 | 123456 - 123456 | -123456 - 123456 | 2147483647 - 123456 | -2147483647 - -123456 | 0 - -123456 | 123456 - -123456 | -123456 - -123456 | 2147483647 - -123456 | -2147483647 - 2147483647 | 0 - 2147483647 | 123456 - 2147483647 | -123456 - 2147483647 | 2147483647 - 2147483647 | -2147483647 - -2147483647 | 0 - -2147483647 | 123456 - -2147483647 | -123456 - -2147483647 | 2147483647 - -2147483647 | -2147483647 -(25 rows) - -select * from int4_tbl a full join int4_tbl b on false; - f1 | f1 --------------+------------- - | 0 - | 123456 - | -123456 - | 2147483647 - | -2147483647 - 0 | - 123456 | - -123456 | - 2147483647 | - -2147483647 | -(10 rows) - --- --- test for ability to use a cartesian join when necessary --- -create temp table q1 as select 1 as q1; -create temp table q2 as select 0 as q2; -analyze q1; -analyze q2; -explain (costs off) -select * from - tenk1 join int4_tbl on f1 = twothousand, - q1, q2 -where q1 = thousand or q2 = thousand; - QUERY PLAN ------------------------------------------------------------------------- - Hash Join - Hash Cond: (tenk1.twothousand = int4_tbl.f1) - -> Nested Loop - -> Nested Loop - -> Seq Scan on q1 - -> Seq Scan on q2 - -> Bitmap Heap Scan on tenk1 - Recheck Cond: ((q1.q1 = thousand) OR (q2.q2 = thousand)) - -> BitmapOr - -> Bitmap Index Scan on tenk1_thous_tenthous - Index Cond: (thousand = q1.q1) - -> Bitmap Index Scan on tenk1_thous_tenthous - Index Cond: (thousand = q2.q2) - -> Hash - -> Seq Scan on int4_tbl -(15 rows) - -explain (costs off) -select * from - tenk1 join int4_tbl on f1 = twothousand, - q1, q2 -where thousand = (q1 + q2); - QUERY PLAN --------------------------------------------------------------- - Hash Join - Hash Cond: (tenk1.twothousand = int4_tbl.f1) - -> Nested Loop - -> Nested Loop - -> Seq Scan on q1 - -> Seq Scan on q2 - -> Bitmap Heap Scan on tenk1 - Recheck Cond: (thousand = (q1.q1 + q2.q2)) - -> Bitmap Index Scan on tenk1_thous_tenthous - Index Cond: (thousand = (q1.q1 + q2.q2)) - -> Hash - -> Seq Scan on int4_tbl -(12 rows) - --- --- test ability to generate a suitable plan for a star-schema query --- -explain (costs off) -select * from - tenk1, int8_tbl a, int8_tbl b -where thousand = a.q1 and tenthous = b.q1 and a.q2 = 1 and b.q2 = 2; - QUERY PLAN ---------------------------------------------------------------------- - Nested Loop - -> Seq Scan on int8_tbl b - Filter: (q2 = 2) - -> Nested Loop - -> Seq Scan on int8_tbl a - Filter: (q2 = 1) - -> Index Scan using tenk1_thous_tenthous on tenk1 - Index Cond: ((thousand = a.q1) AND (tenthous = b.q1)) -(8 rows) - --- --- test a corner case in which we shouldn't apply the star-schema optimization --- -explain (costs off) -select t1.unique2, t1.stringu1, t2.unique1, t2.stringu2 from - tenk1 t1 - inner join int4_tbl i1 - left join (select v1.x2, v2.y1, 11 AS d1 - from (select 1,0 from onerow) v1(x1,x2) - left join (select 3,1 from onerow) v2(y1,y2) - on v1.x1 = v2.y2) subq1 - on (i1.f1 = subq1.x2) - on (t1.unique2 = subq1.d1) - left join tenk1 t2 - on (subq1.y1 = t2.unique1) -where t1.unique2 < 42 and t1.stringu1 > t2.stringu2; - QUERY PLAN ------------------------------------------------------------------------ - Nested Loop - -> Nested Loop - Join Filter: (t1.stringu1 > t2.stringu2) - -> Nested Loop - -> Nested Loop - -> Seq Scan on onerow - -> Seq Scan on onerow onerow_1 - -> Index Scan using tenk1_unique2 on tenk1 t1 - Index Cond: ((unique2 = (11)) AND (unique2 < 42)) - -> Index Scan using tenk1_unique1 on tenk1 t2 - Index Cond: (unique1 = (3)) - -> Seq Scan on int4_tbl i1 - Filter: (f1 = 0) -(13 rows) - -select t1.unique2, t1.stringu1, t2.unique1, t2.stringu2 from - tenk1 t1 - inner join int4_tbl i1 - left join (select v1.x2, v2.y1, 11 AS d1 - from (select 1,0 from onerow) v1(x1,x2) - left join (select 3,1 from onerow) v2(y1,y2) - on v1.x1 = v2.y2) subq1 - on (i1.f1 = subq1.x2) - on (t1.unique2 = subq1.d1) - left join tenk1 t2 - on (subq1.y1 = t2.unique1) -where t1.unique2 < 42 and t1.stringu1 > t2.stringu2; - unique2 | stringu1 | unique1 | stringu2 ----------+----------+---------+---------- - 11 | WFAAAA | 3 | LKIAAA -(1 row) - --- variant that isn't quite a star-schema case -select ss1.d1 from - tenk1 as t1 - inner join tenk1 as t2 - on t1.tenthous = t2.ten - inner join - int8_tbl as i8 - left join int4_tbl as i4 - inner join (select 64::information_schema.cardinal_number as d1 - from tenk1 t3, - lateral (select abs(t3.unique1) + random()) ss0(x) - where t3.fivethous < 0) as ss1 - on i4.f1 = ss1.d1 - on i8.q1 = i4.f1 - on t1.tenthous = ss1.d1 -where t1.unique1 < i4.f1; - d1 ----- -(0 rows) - --- this variant is foldable by the remove-useless-RESULT-RTEs code -explain (costs off) -select t1.unique2, t1.stringu1, t2.unique1, t2.stringu2 from - tenk1 t1 - inner join int4_tbl i1 - left join (select v1.x2, v2.y1, 11 AS d1 - from (values(1,0)) v1(x1,x2) - left join (values(3,1)) v2(y1,y2) - on v1.x1 = v2.y2) subq1 - on (i1.f1 = subq1.x2) - on (t1.unique2 = subq1.d1) - left join tenk1 t2 - on (subq1.y1 = t2.unique1) -where t1.unique2 < 42 and t1.stringu1 > t2.stringu2; - QUERY PLAN ------------------------------------------------------------------ - Nested Loop - Join Filter: (t1.stringu1 > t2.stringu2) - -> Nested Loop - -> Seq Scan on int4_tbl i1 - Filter: (f1 = 0) - -> Index Scan using tenk1_unique2 on tenk1 t1 - Index Cond: ((unique2 = (11)) AND (unique2 < 42)) - -> Index Scan using tenk1_unique1 on tenk1 t2 - Index Cond: (unique1 = (3)) -(9 rows) - -select t1.unique2, t1.stringu1, t2.unique1, t2.stringu2 from - tenk1 t1 - inner join int4_tbl i1 - left join (select v1.x2, v2.y1, 11 AS d1 - from (values(1,0)) v1(x1,x2) - left join (values(3,1)) v2(y1,y2) - on v1.x1 = v2.y2) subq1 - on (i1.f1 = subq1.x2) - on (t1.unique2 = subq1.d1) - left join tenk1 t2 - on (subq1.y1 = t2.unique1) -where t1.unique2 < 42 and t1.stringu1 > t2.stringu2; - unique2 | stringu1 | unique1 | stringu2 ----------+----------+---------+---------- - 11 | WFAAAA | 3 | LKIAAA -(1 row) - --- Here's a variant that we can't fold too aggressively, though, --- or we end up with noplace to evaluate the lateral PHV -explain (verbose, costs off) -select * from - (select 1 as x) ss1 left join (select 2 as y) ss2 on (true), - lateral (select ss2.y as z limit 1) ss3; - QUERY PLAN ---------------------------- - Nested Loop - Output: 1, (2), ((2)) - -> Result - Output: 2 - -> Limit - Output: ((2)) - -> Result - Output: (2) -(8 rows) - -select * from - (select 1 as x) ss1 left join (select 2 as y) ss2 on (true), - lateral (select ss2.y as z limit 1) ss3; - x | y | z ----+---+--- - 1 | 2 | 2 -(1 row) - --- Test proper handling of appendrel PHVs during useless-RTE removal -explain (costs off) -select * from - (select 0 as z) as t1 - left join - (select true as a) as t2 - on true, - lateral (select true as b - union all - select a as b) as t3 -where b; - QUERY PLAN ---------------------------------------- - Nested Loop - -> Result - -> Append - -> Result - -> Result - One-Time Filter: (true) -(6 rows) - -select * from - (select 0 as z) as t1 - left join - (select true as a) as t2 - on true, - lateral (select true as b - union all - select a as b) as t3 -where b; - z | a | b ----+---+--- - 0 | t | t - 0 | t | t -(2 rows) - --- --- test inlining of immutable functions --- -create function f_immutable_int4(i integer) returns integer as -$$ begin return i; end; $$ language plpgsql immutable; --- check optimization of function scan with join -explain (costs off) -select unique1 from tenk1, (select * from f_immutable_int4(1) x) x -where x = unique1; - QUERY PLAN ----------------------------------------------- - Index Only Scan using tenk1_unique1 on tenk1 - Index Cond: (unique1 = 1) -(2 rows) - -explain (verbose, costs off) -select unique1, x.* -from tenk1, (select *, random() from f_immutable_int4(1) x) x -where x = unique1; - QUERY PLAN ------------------------------------------------------------ - Nested Loop - Output: tenk1.unique1, (1), (random()) - -> Result - Output: 1, random() - -> Index Only Scan using tenk1_unique1 on public.tenk1 - Output: tenk1.unique1 - Index Cond: (tenk1.unique1 = (1)) -(7 rows) - -explain (costs off) -select unique1 from tenk1, f_immutable_int4(1) x where x = unique1; - QUERY PLAN ----------------------------------------------- - Index Only Scan using tenk1_unique1 on tenk1 - Index Cond: (unique1 = 1) -(2 rows) - -explain (costs off) -select unique1 from tenk1, lateral f_immutable_int4(1) x where x = unique1; - QUERY PLAN ----------------------------------------------- - Index Only Scan using tenk1_unique1 on tenk1 - Index Cond: (unique1 = 1) -(2 rows) - -explain (costs off) -select unique1 from tenk1, lateral f_immutable_int4(1) x where x in (select 17); - QUERY PLAN --------------------------- - Result - One-Time Filter: false -(2 rows) - -explain (costs off) -select unique1, x from tenk1 join f_immutable_int4(1) x on unique1 = x; - QUERY PLAN ----------------------------------------------- - Index Only Scan using tenk1_unique1 on tenk1 - Index Cond: (unique1 = 1) -(2 rows) - -explain (costs off) -select unique1, x from tenk1 left join f_immutable_int4(1) x on unique1 = x; - QUERY PLAN ----------------------------------------------------- - Nested Loop Left Join - Join Filter: (tenk1.unique1 = 1) - -> Index Only Scan using tenk1_unique1 on tenk1 - -> Materialize - -> Result -(5 rows) - -explain (costs off) -select unique1, x from tenk1 right join f_immutable_int4(1) x on unique1 = x; - QUERY PLAN ----------------------------------------------------- - Nested Loop Left Join - -> Result - -> Index Only Scan using tenk1_unique1 on tenk1 - Index Cond: (unique1 = 1) -(4 rows) - -explain (costs off) -select unique1, x from tenk1 full join f_immutable_int4(1) x on unique1 = x; - QUERY PLAN ----------------------------------------------------- - Merge Full Join - Merge Cond: (tenk1.unique1 = (1)) - -> Index Only Scan using tenk1_unique1 on tenk1 - -> Sort - Sort Key: (1) - -> Result -(6 rows) - --- check that pullup of a const function allows further const-folding -explain (costs off) -select unique1 from tenk1, f_immutable_int4(1) x where x = 42; - QUERY PLAN --------------------------- - Result - One-Time Filter: false -(2 rows) - --- test inlining of immutable functions with PlaceHolderVars -explain (costs off) -select nt3.id -from nt3 as nt3 - left join - (select nt2.*, (nt2.b1 or i4 = 42) AS b3 - from nt2 as nt2 - left join - f_immutable_int4(0) i4 - on i4 = nt2.nt1_id - ) as ss2 - on ss2.id = nt3.nt2_id -where nt3.id = 1 and ss2.b3; - QUERY PLAN ----------------------------------------------- - Nested Loop Left Join - Filter: ((nt2.b1 OR ((0) = 42))) - -> Index Scan using nt3_pkey on nt3 - Index Cond: (id = 1) - -> Nested Loop Left Join - Join Filter: (0 = nt2.nt1_id) - -> Index Scan using nt2_pkey on nt2 - Index Cond: (id = nt3.nt2_id) - -> Result -(9 rows) - -drop function f_immutable_int4(int); --- test inlining when function returns composite -create function mki8(bigint, bigint) returns int8_tbl as -$$select row($1,$2)::int8_tbl$$ language sql; -create function mki4(int) returns int4_tbl as -$$select row($1)::int4_tbl$$ language sql; -explain (verbose, costs off) -select * from mki8(1,2); - QUERY PLAN ------------------------------------- - Function Scan on mki8 - Output: q1, q2 - Function Call: '(1,2)'::int8_tbl -(3 rows) - -select * from mki8(1,2); - q1 | q2 -----+---- - 1 | 2 -(1 row) - -explain (verbose, costs off) -select * from mki4(42); - QUERY PLAN ------------------------------------ - Function Scan on mki4 - Output: f1 - Function Call: '(42)'::int4_tbl -(3 rows) - -select * from mki4(42); - f1 ----- - 42 -(1 row) - -drop function mki8(bigint, bigint); -drop function mki4(int); --- --- test extraction of restriction OR clauses from join OR clause --- (we used to only do this for indexable clauses) --- -explain (costs off) -select * from tenk1 a join tenk1 b on - (a.unique1 = 1 and b.unique1 = 2) or (a.unique2 = 3 and b.hundred = 4); - QUERY PLAN -------------------------------------------------------------------------------------------------- - Nested Loop - Join Filter: (((a.unique1 = 1) AND (b.unique1 = 2)) OR ((a.unique2 = 3) AND (b.hundred = 4))) - -> Bitmap Heap Scan on tenk1 b - Recheck Cond: ((unique1 = 2) OR (hundred = 4)) - -> BitmapOr - -> Bitmap Index Scan on tenk1_unique1 - Index Cond: (unique1 = 2) - -> Bitmap Index Scan on tenk1_hundred - Index Cond: (hundred = 4) - -> Materialize - -> Bitmap Heap Scan on tenk1 a - Recheck Cond: ((unique1 = 1) OR (unique2 = 3)) - -> BitmapOr - -> Bitmap Index Scan on tenk1_unique1 - Index Cond: (unique1 = 1) - -> Bitmap Index Scan on tenk1_unique2 - Index Cond: (unique2 = 3) -(17 rows) - -explain (costs off) -select * from tenk1 a join tenk1 b on - (a.unique1 = 1 and b.unique1 = 2) or (a.unique2 = 3 and b.ten = 4); - QUERY PLAN ---------------------------------------------------------------------------------------------- - Nested Loop - Join Filter: (((a.unique1 = 1) AND (b.unique1 = 2)) OR ((a.unique2 = 3) AND (b.ten = 4))) - -> Seq Scan on tenk1 b - Filter: ((unique1 = 2) OR (ten = 4)) - -> Materialize - -> Bitmap Heap Scan on tenk1 a - Recheck Cond: ((unique1 = 1) OR (unique2 = 3)) - -> BitmapOr - -> Bitmap Index Scan on tenk1_unique1 - Index Cond: (unique1 = 1) - -> Bitmap Index Scan on tenk1_unique2 - Index Cond: (unique2 = 3) -(12 rows) - -explain (costs off) -select * from tenk1 a join tenk1 b on - (a.unique1 = 1 and b.unique1 = 2) or - ((a.unique2 = 3 or a.unique2 = 7) and b.hundred = 4); - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------- - Nested Loop - Join Filter: (((a.unique1 = 1) AND (b.unique1 = 2)) OR (((a.unique2 = 3) OR (a.unique2 = 7)) AND (b.hundred = 4))) - -> Bitmap Heap Scan on tenk1 b - Recheck Cond: ((unique1 = 2) OR (hundred = 4)) - -> BitmapOr - -> Bitmap Index Scan on tenk1_unique1 - Index Cond: (unique1 = 2) - -> Bitmap Index Scan on tenk1_hundred - Index Cond: (hundred = 4) - -> Materialize - -> Bitmap Heap Scan on tenk1 a - Recheck Cond: ((unique1 = 1) OR (unique2 = 3) OR (unique2 = 7)) - -> BitmapOr - -> Bitmap Index Scan on tenk1_unique1 - Index Cond: (unique1 = 1) - -> Bitmap Index Scan on tenk1_unique2 - Index Cond: (unique2 = 3) - -> Bitmap Index Scan on tenk1_unique2 - Index Cond: (unique2 = 7) -(19 rows) - --- --- test placement of movable quals in a parameterized join tree --- -explain (costs off) -select * from tenk1 t1 left join - (tenk1 t2 join tenk1 t3 on t2.thousand = t3.unique2) - on t1.hundred = t2.hundred and t1.ten = t3.ten -where t1.unique1 = 1; - QUERY PLAN --------------------------------------------------------------- - Nested Loop Left Join - -> Index Scan using tenk1_unique1 on tenk1 t1 - Index Cond: (unique1 = 1) - -> Nested Loop - Join Filter: (t1.ten = t3.ten) - -> Bitmap Heap Scan on tenk1 t2 - Recheck Cond: (t1.hundred = hundred) - -> Bitmap Index Scan on tenk1_hundred - Index Cond: (hundred = t1.hundred) - -> Memoize - Cache Key: t2.thousand - Cache Mode: logical - -> Index Scan using tenk1_unique2 on tenk1 t3 - Index Cond: (unique2 = t2.thousand) -(14 rows) - -explain (costs off) -select * from tenk1 t1 left join - (tenk1 t2 join tenk1 t3 on t2.thousand = t3.unique2) - on t1.hundred = t2.hundred and t1.ten + t2.ten = t3.ten -where t1.unique1 = 1; - QUERY PLAN --------------------------------------------------------------- - Nested Loop Left Join - -> Index Scan using tenk1_unique1 on tenk1 t1 - Index Cond: (unique1 = 1) - -> Nested Loop - Join Filter: ((t1.ten + t2.ten) = t3.ten) - -> Bitmap Heap Scan on tenk1 t2 - Recheck Cond: (t1.hundred = hundred) - -> Bitmap Index Scan on tenk1_hundred - Index Cond: (hundred = t1.hundred) - -> Memoize - Cache Key: t2.thousand - Cache Mode: logical - -> Index Scan using tenk1_unique2 on tenk1 t3 - Index Cond: (unique2 = t2.thousand) -(14 rows) - -explain (costs off) -select count(*) from - tenk1 a join tenk1 b on a.unique1 = b.unique2 - left join tenk1 c on a.unique2 = b.unique1 and c.thousand = a.thousand - join int4_tbl on b.thousand = f1; - QUERY PLAN -------------------------------------------------------------------------- - Aggregate - -> Nested Loop Left Join - Join Filter: (a.unique2 = b.unique1) - -> Nested Loop - -> Nested Loop - -> Seq Scan on int4_tbl - -> Bitmap Heap Scan on tenk1 b - Recheck Cond: (thousand = int4_tbl.f1) - -> Bitmap Index Scan on tenk1_thous_tenthous - Index Cond: (thousand = int4_tbl.f1) - -> Index Scan using tenk1_unique1 on tenk1 a - Index Cond: (unique1 = b.unique2) - -> Index Only Scan using tenk1_thous_tenthous on tenk1 c - Index Cond: (thousand = a.thousand) -(14 rows) - -select count(*) from - tenk1 a join tenk1 b on a.unique1 = b.unique2 - left join tenk1 c on a.unique2 = b.unique1 and c.thousand = a.thousand - join int4_tbl on b.thousand = f1; - count -------- - 10 -(1 row) - -explain (costs off) -select b.unique1 from - tenk1 a join tenk1 b on a.unique1 = b.unique2 - left join tenk1 c on b.unique1 = 42 and c.thousand = a.thousand - join int4_tbl i1 on b.thousand = f1 - right join int4_tbl i2 on i2.f1 = b.tenthous - order by 1; - QUERY PLAN ------------------------------------------------------------------------------------------ - Sort - Sort Key: b.unique1 - -> Nested Loop Left Join - -> Seq Scan on int4_tbl i2 - -> Nested Loop Left Join - Join Filter: (b.unique1 = 42) - -> Nested Loop - -> Nested Loop - -> Seq Scan on int4_tbl i1 - -> Index Scan using tenk1_thous_tenthous on tenk1 b - Index Cond: ((thousand = i1.f1) AND (tenthous = i2.f1)) - -> Index Scan using tenk1_unique1 on tenk1 a - Index Cond: (unique1 = b.unique2) - -> Index Only Scan using tenk1_thous_tenthous on tenk1 c - Index Cond: (thousand = a.thousand) -(15 rows) - -select b.unique1 from - tenk1 a join tenk1 b on a.unique1 = b.unique2 - left join tenk1 c on b.unique1 = 42 and c.thousand = a.thousand - join int4_tbl i1 on b.thousand = f1 - right join int4_tbl i2 on i2.f1 = b.tenthous - order by 1; - unique1 ---------- - 0 - - - - -(5 rows) - -explain (costs off) -select * from -( - select unique1, q1, coalesce(unique1, -1) + q1 as fault - from int8_tbl left join tenk1 on (q2 = unique2) -) ss -where fault = 122 -order by fault; - QUERY PLAN --------------------------------------------------------------------------- - Nested Loop Left Join - Filter: ((COALESCE(tenk1.unique1, '-1'::integer) + int8_tbl.q1) = 122) - -> Seq Scan on int8_tbl - -> Index Scan using tenk1_unique2 on tenk1 - Index Cond: (unique2 = int8_tbl.q2) -(5 rows) - -select * from -( - select unique1, q1, coalesce(unique1, -1) + q1 as fault - from int8_tbl left join tenk1 on (q2 = unique2) -) ss -where fault = 122 -order by fault; - unique1 | q1 | fault ----------+-----+------- - | 123 | 122 -(1 row) - -explain (costs off) -select * from -(values (1, array[10,20]), (2, array[20,30])) as v1(v1x,v1ys) -left join (values (1, 10), (2, 20)) as v2(v2x,v2y) on v2x = v1x -left join unnest(v1ys) as u1(u1y) on u1y = v2y; - QUERY PLAN -------------------------------------------------------------- - Nested Loop Left Join - -> Values Scan on "*VALUES*" - -> Hash Right Join - Hash Cond: (u1.u1y = "*VALUES*_1".column2) - Filter: ("*VALUES*_1".column1 = "*VALUES*".column1) - -> Function Scan on unnest u1 - -> Hash - -> Values Scan on "*VALUES*_1" -(8 rows) - -select * from -(values (1, array[10,20]), (2, array[20,30])) as v1(v1x,v1ys) -left join (values (1, 10), (2, 20)) as v2(v2x,v2y) on v2x = v1x -left join unnest(v1ys) as u1(u1y) on u1y = v2y; - v1x | v1ys | v2x | v2y | u1y ------+---------+-----+-----+----- - 1 | {10,20} | 1 | 10 | 10 - 2 | {20,30} | 2 | 20 | 20 -(2 rows) - --- --- test handling of potential equivalence clauses above outer joins --- -explain (costs off) -select q1, unique2, thousand, hundred - from int8_tbl a left join tenk1 b on q1 = unique2 - where coalesce(thousand,123) = q1 and q1 = coalesce(hundred,123); - QUERY PLAN --------------------------------------------------------------------------------------- - Nested Loop Left Join - Filter: ((COALESCE(b.thousand, 123) = a.q1) AND (a.q1 = COALESCE(b.hundred, 123))) - -> Seq Scan on int8_tbl a - -> Index Scan using tenk1_unique2 on tenk1 b - Index Cond: (unique2 = a.q1) -(5 rows) - -select q1, unique2, thousand, hundred - from int8_tbl a left join tenk1 b on q1 = unique2 - where coalesce(thousand,123) = q1 and q1 = coalesce(hundred,123); - q1 | unique2 | thousand | hundred -----+---------+----------+--------- -(0 rows) - -explain (costs off) -select f1, unique2, case when unique2 is null then f1 else 0 end - from int4_tbl a left join tenk1 b on f1 = unique2 - where (case when unique2 is null then f1 else 0 end) = 0; - QUERY PLAN --------------------------------------------------------------------- - Nested Loop Left Join - Filter: (CASE WHEN (b.unique2 IS NULL) THEN a.f1 ELSE 0 END = 0) - -> Seq Scan on int4_tbl a - -> Index Only Scan using tenk1_unique2 on tenk1 b - Index Cond: (unique2 = a.f1) -(5 rows) - -select f1, unique2, case when unique2 is null then f1 else 0 end - from int4_tbl a left join tenk1 b on f1 = unique2 - where (case when unique2 is null then f1 else 0 end) = 0; - f1 | unique2 | case -----+---------+------ - 0 | 0 | 0 -(1 row) - --- --- another case with equivalence clauses above outer joins (bug #8591) --- -explain (costs off) -select a.unique1, b.unique1, c.unique1, coalesce(b.twothousand, a.twothousand) - from tenk1 a left join tenk1 b on b.thousand = a.unique1 left join tenk1 c on c.unique2 = coalesce(b.twothousand, a.twothousand) - where a.unique2 < 10 and coalesce(b.twothousand, a.twothousand) = 44; - QUERY PLAN ---------------------------------------------------------------------------------------------- - Nested Loop Left Join - -> Nested Loop Left Join - Filter: (COALESCE(b.twothousand, a.twothousand) = 44) - -> Index Scan using tenk1_unique2 on tenk1 a - Index Cond: (unique2 < 10) - -> Bitmap Heap Scan on tenk1 b - Recheck Cond: (thousand = a.unique1) - -> Bitmap Index Scan on tenk1_thous_tenthous - Index Cond: (thousand = a.unique1) - -> Index Scan using tenk1_unique2 on tenk1 c - Index Cond: ((unique2 = COALESCE(b.twothousand, a.twothousand)) AND (unique2 = 44)) -(11 rows) - -select a.unique1, b.unique1, c.unique1, coalesce(b.twothousand, a.twothousand) - from tenk1 a left join tenk1 b on b.thousand = a.unique1 left join tenk1 c on c.unique2 = coalesce(b.twothousand, a.twothousand) - where a.unique2 < 10 and coalesce(b.twothousand, a.twothousand) = 44; - unique1 | unique1 | unique1 | coalesce ----------+---------+---------+---------- -(0 rows) - --- --- check handling of join aliases when flattening multiple levels of subquery --- -explain (verbose, costs off) -select foo1.join_key as foo1_id, foo3.join_key AS foo3_id, bug_field from - (values (0),(1)) foo1(join_key) -left join - (select join_key, bug_field from - (select ss1.join_key, ss1.bug_field from - (select f1 as join_key, 666 as bug_field from int4_tbl i1) ss1 - ) foo2 - left join - (select unique2 as join_key from tenk1 i2) ss2 - using (join_key) - ) foo3 -using (join_key); - QUERY PLAN --------------------------------------------------------------------------- - Nested Loop Left Join - Output: "*VALUES*".column1, i1.f1, (666) - Join Filter: ("*VALUES*".column1 = i1.f1) - -> Values Scan on "*VALUES*" - Output: "*VALUES*".column1 - -> Materialize - Output: i1.f1, (666) - -> Nested Loop Left Join - Output: i1.f1, 666 - -> Seq Scan on public.int4_tbl i1 - Output: i1.f1 - -> Index Only Scan using tenk1_unique2 on public.tenk1 i2 - Output: i2.unique2 - Index Cond: (i2.unique2 = i1.f1) -(14 rows) - -select foo1.join_key as foo1_id, foo3.join_key AS foo3_id, bug_field from - (values (0),(1)) foo1(join_key) -left join - (select join_key, bug_field from - (select ss1.join_key, ss1.bug_field from - (select f1 as join_key, 666 as bug_field from int4_tbl i1) ss1 - ) foo2 - left join - (select unique2 as join_key from tenk1 i2) ss2 - using (join_key) - ) foo3 -using (join_key); - foo1_id | foo3_id | bug_field ----------+---------+----------- - 0 | 0 | 666 - 1 | | -(2 rows) - --- --- test successful handling of nested outer joins with degenerate join quals --- -explain (verbose, costs off) -select t1.* from - text_tbl t1 - left join (select *, '***'::text as d1 from int8_tbl i8b1) b1 - left join int8_tbl i8 - left join (select *, null::int as d2 from int8_tbl i8b2) b2 - on (i8.q1 = b2.q1) - on (b2.d2 = b1.q2) - on (t1.f1 = b1.d1) - left join int4_tbl i4 - on (i8.q2 = i4.f1); - QUERY PLAN ----------------------------------------------------------------------- - Hash Left Join - Output: t1.f1 - Hash Cond: (i8.q2 = i4.f1) - -> Nested Loop Left Join - Output: t1.f1, i8.q2 - Join Filter: (t1.f1 = '***'::text) - -> Seq Scan on public.text_tbl t1 - Output: t1.f1 - -> Materialize - Output: i8.q2 - -> Hash Right Join - Output: i8.q2 - Hash Cond: ((NULL::integer) = i8b1.q2) - -> Hash Join - Output: i8.q2, (NULL::integer) - Hash Cond: (i8.q1 = i8b2.q1) - -> Seq Scan on public.int8_tbl i8 - Output: i8.q1, i8.q2 - -> Hash - Output: i8b2.q1, (NULL::integer) - -> Seq Scan on public.int8_tbl i8b2 - Output: i8b2.q1, NULL::integer - -> Hash - Output: i8b1.q2 - -> Seq Scan on public.int8_tbl i8b1 - Output: i8b1.q2 - -> Hash - Output: i4.f1 - -> Seq Scan on public.int4_tbl i4 - Output: i4.f1 -(30 rows) - -select t1.* from - text_tbl t1 - left join (select *, '***'::text as d1 from int8_tbl i8b1) b1 - left join int8_tbl i8 - left join (select *, null::int as d2 from int8_tbl i8b2) b2 - on (i8.q1 = b2.q1) - on (b2.d2 = b1.q2) - on (t1.f1 = b1.d1) - left join int4_tbl i4 - on (i8.q2 = i4.f1); - f1 -------------------- - doh! - hi de ho neighbor -(2 rows) - -explain (verbose, costs off) -select t1.* from - text_tbl t1 - left join (select *, '***'::text as d1 from int8_tbl i8b1) b1 - left join int8_tbl i8 - left join (select *, null::int as d2 from int8_tbl i8b2, int4_tbl i4b2) b2 - on (i8.q1 = b2.q1) - on (b2.d2 = b1.q2) - on (t1.f1 = b1.d1) - left join int4_tbl i4 - on (i8.q2 = i4.f1); - QUERY PLAN ----------------------------------------------------------------------------- - Hash Left Join - Output: t1.f1 - Hash Cond: (i8.q2 = i4.f1) - -> Nested Loop Left Join - Output: t1.f1, i8.q2 - Join Filter: (t1.f1 = '***'::text) - -> Seq Scan on public.text_tbl t1 - Output: t1.f1 - -> Materialize - Output: i8.q2 - -> Hash Right Join - Output: i8.q2 - Hash Cond: ((NULL::integer) = i8b1.q2) - -> Hash Right Join - Output: i8.q2, (NULL::integer) - Hash Cond: (i8b2.q1 = i8.q1) - -> Nested Loop - Output: i8b2.q1, NULL::integer - -> Seq Scan on public.int8_tbl i8b2 - Output: i8b2.q1, i8b2.q2 - -> Materialize - -> Seq Scan on public.int4_tbl i4b2 - -> Hash - Output: i8.q1, i8.q2 - -> Seq Scan on public.int8_tbl i8 - Output: i8.q1, i8.q2 - -> Hash - Output: i8b1.q2 - -> Seq Scan on public.int8_tbl i8b1 - Output: i8b1.q2 - -> Hash - Output: i4.f1 - -> Seq Scan on public.int4_tbl i4 - Output: i4.f1 -(34 rows) - -select t1.* from - text_tbl t1 - left join (select *, '***'::text as d1 from int8_tbl i8b1) b1 - left join int8_tbl i8 - left join (select *, null::int as d2 from int8_tbl i8b2, int4_tbl i4b2) b2 - on (i8.q1 = b2.q1) - on (b2.d2 = b1.q2) - on (t1.f1 = b1.d1) - left join int4_tbl i4 - on (i8.q2 = i4.f1); - f1 -------------------- - doh! - hi de ho neighbor -(2 rows) - -explain (verbose, costs off) -select t1.* from - text_tbl t1 - left join (select *, '***'::text as d1 from int8_tbl i8b1) b1 - left join int8_tbl i8 - left join (select *, null::int as d2 from int8_tbl i8b2, int4_tbl i4b2 - where q1 = f1) b2 - on (i8.q1 = b2.q1) - on (b2.d2 = b1.q2) - on (t1.f1 = b1.d1) - left join int4_tbl i4 - on (i8.q2 = i4.f1); - QUERY PLAN ----------------------------------------------------------------------------- - Hash Left Join - Output: t1.f1 - Hash Cond: (i8.q2 = i4.f1) - -> Nested Loop Left Join - Output: t1.f1, i8.q2 - Join Filter: (t1.f1 = '***'::text) - -> Seq Scan on public.text_tbl t1 - Output: t1.f1 - -> Materialize - Output: i8.q2 - -> Hash Right Join - Output: i8.q2 - Hash Cond: ((NULL::integer) = i8b1.q2) - -> Hash Right Join - Output: i8.q2, (NULL::integer) - Hash Cond: (i8b2.q1 = i8.q1) - -> Hash Join - Output: i8b2.q1, NULL::integer - Hash Cond: (i8b2.q1 = i4b2.f1) - -> Seq Scan on public.int8_tbl i8b2 - Output: i8b2.q1, i8b2.q2 - -> Hash - Output: i4b2.f1 - -> Seq Scan on public.int4_tbl i4b2 - Output: i4b2.f1 - -> Hash - Output: i8.q1, i8.q2 - -> Seq Scan on public.int8_tbl i8 - Output: i8.q1, i8.q2 - -> Hash - Output: i8b1.q2 - -> Seq Scan on public.int8_tbl i8b1 - Output: i8b1.q2 - -> Hash - Output: i4.f1 - -> Seq Scan on public.int4_tbl i4 - Output: i4.f1 -(37 rows) - -select t1.* from - text_tbl t1 - left join (select *, '***'::text as d1 from int8_tbl i8b1) b1 - left join int8_tbl i8 - left join (select *, null::int as d2 from int8_tbl i8b2, int4_tbl i4b2 - where q1 = f1) b2 - on (i8.q1 = b2.q1) - on (b2.d2 = b1.q2) - on (t1.f1 = b1.d1) - left join int4_tbl i4 - on (i8.q2 = i4.f1); - f1 -------------------- - doh! - hi de ho neighbor -(2 rows) - -explain (verbose, costs off) -select * from - text_tbl t1 - inner join int8_tbl i8 - on i8.q2 = 456 - right join text_tbl t2 - on t1.f1 = 'doh!' - left join int4_tbl i4 - on i8.q1 = i4.f1; - QUERY PLAN --------------------------------------------------------- - Nested Loop Left Join - Output: t1.f1, i8.q1, i8.q2, t2.f1, i4.f1 - -> Seq Scan on public.text_tbl t2 - Output: t2.f1 - -> Materialize - Output: i8.q1, i8.q2, i4.f1, t1.f1 - -> Nested Loop - Output: i8.q1, i8.q2, i4.f1, t1.f1 - -> Nested Loop Left Join - Output: i8.q1, i8.q2, i4.f1 - Join Filter: (i8.q1 = i4.f1) - -> Seq Scan on public.int8_tbl i8 - Output: i8.q1, i8.q2 - Filter: (i8.q2 = 456) - -> Seq Scan on public.int4_tbl i4 - Output: i4.f1 - -> Seq Scan on public.text_tbl t1 - Output: t1.f1 - Filter: (t1.f1 = 'doh!'::text) -(19 rows) - -select * from - text_tbl t1 - inner join int8_tbl i8 - on i8.q2 = 456 - right join text_tbl t2 - on t1.f1 = 'doh!' - left join int4_tbl i4 - on i8.q1 = i4.f1; - f1 | q1 | q2 | f1 | f1 -------+-----+-----+-------------------+---- - doh! | 123 | 456 | doh! | - doh! | 123 | 456 | hi de ho neighbor | -(2 rows) - --- --- test for appropriate join order in the presence of lateral references --- -explain (verbose, costs off) -select * from - text_tbl t1 - left join int8_tbl i8 - on i8.q2 = 123, - lateral (select i8.q1, t2.f1 from text_tbl t2 limit 1) as ss -where t1.f1 = ss.f1; - QUERY PLAN --------------------------------------------------- - Nested Loop - Output: t1.f1, i8.q1, i8.q2, (i8.q1), t2.f1 - Join Filter: (t1.f1 = t2.f1) - -> Nested Loop Left Join - Output: t1.f1, i8.q1, i8.q2 - -> Seq Scan on public.text_tbl t1 - Output: t1.f1 - -> Materialize - Output: i8.q1, i8.q2 - -> Seq Scan on public.int8_tbl i8 - Output: i8.q1, i8.q2 - Filter: (i8.q2 = 123) - -> Memoize - Output: (i8.q1), t2.f1 - Cache Key: i8.q1 - Cache Mode: binary - -> Limit - Output: (i8.q1), t2.f1 - -> Seq Scan on public.text_tbl t2 - Output: i8.q1, t2.f1 -(20 rows) - -select * from - text_tbl t1 - left join int8_tbl i8 - on i8.q2 = 123, - lateral (select i8.q1, t2.f1 from text_tbl t2 limit 1) as ss -where t1.f1 = ss.f1; - f1 | q1 | q2 | q1 | f1 -------+------------------+-----+------------------+------ - doh! | 4567890123456789 | 123 | 4567890123456789 | doh! -(1 row) - -explain (verbose, costs off) -select * from - text_tbl t1 - left join int8_tbl i8 - on i8.q2 = 123, - lateral (select i8.q1, t2.f1 from text_tbl t2 limit 1) as ss1, - lateral (select ss1.* from text_tbl t3 limit 1) as ss2 -where t1.f1 = ss2.f1; - QUERY PLAN -------------------------------------------------------------------- - Nested Loop - Output: t1.f1, i8.q1, i8.q2, (i8.q1), t2.f1, ((i8.q1)), (t2.f1) - Join Filter: (t1.f1 = (t2.f1)) - -> Nested Loop - Output: t1.f1, i8.q1, i8.q2, (i8.q1), t2.f1 - -> Nested Loop Left Join - Output: t1.f1, i8.q1, i8.q2 - -> Seq Scan on public.text_tbl t1 - Output: t1.f1 - -> Materialize - Output: i8.q1, i8.q2 - -> Seq Scan on public.int8_tbl i8 - Output: i8.q1, i8.q2 - Filter: (i8.q2 = 123) - -> Memoize - Output: (i8.q1), t2.f1 - Cache Key: i8.q1 - Cache Mode: binary - -> Limit - Output: (i8.q1), t2.f1 - -> Seq Scan on public.text_tbl t2 - Output: i8.q1, t2.f1 - -> Memoize - Output: ((i8.q1)), (t2.f1) - Cache Key: (i8.q1), t2.f1 - Cache Mode: binary - -> Limit - Output: ((i8.q1)), (t2.f1) - -> Seq Scan on public.text_tbl t3 - Output: (i8.q1), t2.f1 -(30 rows) - -select * from - text_tbl t1 - left join int8_tbl i8 - on i8.q2 = 123, - lateral (select i8.q1, t2.f1 from text_tbl t2 limit 1) as ss1, - lateral (select ss1.* from text_tbl t3 limit 1) as ss2 -where t1.f1 = ss2.f1; - f1 | q1 | q2 | q1 | f1 | q1 | f1 -------+------------------+-----+------------------+------+------------------+------ - doh! | 4567890123456789 | 123 | 4567890123456789 | doh! | 4567890123456789 | doh! -(1 row) - -explain (verbose, costs off) -select 1 from - text_tbl as tt1 - inner join text_tbl as tt2 on (tt1.f1 = 'foo') - left join text_tbl as tt3 on (tt3.f1 = 'foo') - left join text_tbl as tt4 on (tt3.f1 = tt4.f1), - lateral (select tt4.f1 as c0 from text_tbl as tt5 limit 1) as ss1 -where tt1.f1 = ss1.c0; - QUERY PLAN ----------------------------------------------------------- - Nested Loop - Output: 1 - -> Nested Loop Left Join - Output: tt1.f1, tt4.f1 - -> Nested Loop - Output: tt1.f1 - -> Seq Scan on public.text_tbl tt1 - Output: tt1.f1 - Filter: (tt1.f1 = 'foo'::text) - -> Seq Scan on public.text_tbl tt2 - Output: tt2.f1 - -> Materialize - Output: tt4.f1 - -> Nested Loop Left Join - Output: tt4.f1 - Join Filter: (tt3.f1 = tt4.f1) - -> Seq Scan on public.text_tbl tt3 - Output: tt3.f1 - Filter: (tt3.f1 = 'foo'::text) - -> Seq Scan on public.text_tbl tt4 - Output: tt4.f1 - Filter: (tt4.f1 = 'foo'::text) - -> Memoize - Output: ss1.c0 - Cache Key: tt4.f1 - Cache Mode: binary - -> Subquery Scan on ss1 - Output: ss1.c0 - Filter: (ss1.c0 = 'foo'::text) - -> Limit - Output: (tt4.f1) - -> Seq Scan on public.text_tbl tt5 - Output: tt4.f1 -(33 rows) - -select 1 from - text_tbl as tt1 - inner join text_tbl as tt2 on (tt1.f1 = 'foo') - left join text_tbl as tt3 on (tt3.f1 = 'foo') - left join text_tbl as tt4 on (tt3.f1 = tt4.f1), - lateral (select tt4.f1 as c0 from text_tbl as tt5 limit 1) as ss1 -where tt1.f1 = ss1.c0; - ?column? ----------- -(0 rows) - --- --- check a case in which a PlaceHolderVar forces join order --- -explain (verbose, costs off) -select ss2.* from - int4_tbl i41 - left join int8_tbl i8 - join (select i42.f1 as c1, i43.f1 as c2, 42 as c3 - from int4_tbl i42, int4_tbl i43) ss1 - on i8.q1 = ss1.c2 - on i41.f1 = ss1.c1, - lateral (select i41.*, i8.*, ss1.* from text_tbl limit 1) ss2 -where ss1.c2 = 0; - QUERY PLAN ------------------------------------------------------------------------- - Nested Loop - Output: (i41.f1), (i8.q1), (i8.q2), (i42.f1), (i43.f1), ((42)) - -> Hash Join - Output: i41.f1, i42.f1, i8.q1, i8.q2, i43.f1, 42 - Hash Cond: (i41.f1 = i42.f1) - -> Nested Loop - Output: i8.q1, i8.q2, i43.f1, i41.f1 - -> Nested Loop - Output: i8.q1, i8.q2, i43.f1 - -> Seq Scan on public.int8_tbl i8 - Output: i8.q1, i8.q2 - Filter: (i8.q1 = 0) - -> Seq Scan on public.int4_tbl i43 - Output: i43.f1 - Filter: (i43.f1 = 0) - -> Seq Scan on public.int4_tbl i41 - Output: i41.f1 - -> Hash - Output: i42.f1 - -> Seq Scan on public.int4_tbl i42 - Output: i42.f1 - -> Limit - Output: (i41.f1), (i8.q1), (i8.q2), (i42.f1), (i43.f1), ((42)) - -> Seq Scan on public.text_tbl - Output: i41.f1, i8.q1, i8.q2, i42.f1, i43.f1, (42) -(25 rows) - -select ss2.* from - int4_tbl i41 - left join int8_tbl i8 - join (select i42.f1 as c1, i43.f1 as c2, 42 as c3 - from int4_tbl i42, int4_tbl i43) ss1 - on i8.q1 = ss1.c2 - on i41.f1 = ss1.c1, - lateral (select i41.*, i8.*, ss1.* from text_tbl limit 1) ss2 -where ss1.c2 = 0; - f1 | q1 | q2 | c1 | c2 | c3 -----+----+----+----+----+---- -(0 rows) - --- --- test successful handling of full join underneath left join (bug #14105) --- -explain (costs off) -select * from - (select 1 as id) as xx - left join - (tenk1 as a1 full join (select 1 as id) as yy on (a1.unique1 = yy.id)) - on (xx.id = coalesce(yy.id)); - QUERY PLAN ---------------------------------------- - Nested Loop Left Join - -> Result - -> Hash Full Join - Hash Cond: (a1.unique1 = (1)) - Filter: (1 = COALESCE((1))) - -> Seq Scan on tenk1 a1 - -> Hash - -> Result -(8 rows) - -select * from - (select 1 as id) as xx - left join - (tenk1 as a1 full join (select 1 as id) as yy on (a1.unique1 = yy.id)) - on (xx.id = coalesce(yy.id)); - id | unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 | id -----+---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------+---- - 1 | 1 | 2838 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 2 | 3 | BAAAAA | EFEAAA | OOOOxx | 1 -(1 row) - --- --- test ability to push constants through outer join clauses --- -explain (costs off) - select * from int4_tbl a left join tenk1 b on f1 = unique2 where f1 = 0; - QUERY PLAN -------------------------------------------------- - Nested Loop Left Join - Join Filter: (a.f1 = b.unique2) - -> Seq Scan on int4_tbl a - Filter: (f1 = 0) - -> Index Scan using tenk1_unique2 on tenk1 b - Index Cond: (unique2 = 0) -(6 rows) - -explain (costs off) - select * from tenk1 a full join tenk1 b using(unique2) where unique2 = 42; - QUERY PLAN -------------------------------------------------- - Merge Full Join - Merge Cond: (a.unique2 = b.unique2) - -> Index Scan using tenk1_unique2 on tenk1 a - Index Cond: (unique2 = 42) - -> Index Scan using tenk1_unique2 on tenk1 b - Index Cond: (unique2 = 42) -(6 rows) - --- --- test that quals attached to an outer join have correct semantics, --- specifically that they don't re-use expressions computed below the join; --- we force a mergejoin so that coalesce(b.q1, 1) appears as a join input --- -set enable_hashjoin to off; -set enable_nestloop to off; -explain (verbose, costs off) - select a.q2, b.q1 - from int8_tbl a left join int8_tbl b on a.q2 = coalesce(b.q1, 1) - where coalesce(b.q1, 1) > 0; - QUERY PLAN ---------------------------------------------------------- - Merge Left Join - Output: a.q2, b.q1 - Merge Cond: (a.q2 = (COALESCE(b.q1, '1'::bigint))) - Filter: (COALESCE(b.q1, '1'::bigint) > 0) - -> Sort - Output: a.q2 - Sort Key: a.q2 - -> Seq Scan on public.int8_tbl a - Output: a.q2 - -> Sort - Output: b.q1, (COALESCE(b.q1, '1'::bigint)) - Sort Key: (COALESCE(b.q1, '1'::bigint)) - -> Seq Scan on public.int8_tbl b - Output: b.q1, COALESCE(b.q1, '1'::bigint) -(14 rows) - -select a.q2, b.q1 - from int8_tbl a left join int8_tbl b on a.q2 = coalesce(b.q1, 1) - where coalesce(b.q1, 1) > 0; - q2 | q1 --------------------+------------------ - -4567890123456789 | - 123 | 123 - 123 | 123 - 456 | - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 -(10 rows) - -reset enable_hashjoin; -reset enable_nestloop; --- --- test join removal --- -begin; -CREATE TEMP TABLE a (id int PRIMARY KEY, b_id int); -CREATE TEMP TABLE b (id int PRIMARY KEY, c_id int); -CREATE TEMP TABLE c (id int PRIMARY KEY); -CREATE TEMP TABLE d (a int, b int); -INSERT INTO a VALUES (0, 0), (1, NULL); -INSERT INTO b VALUES (0, 0), (1, NULL); -INSERT INTO c VALUES (0), (1); -INSERT INTO d VALUES (1,3), (2,2), (3,1); --- all three cases should be optimizable into a simple seqscan -explain (costs off) SELECT a.* FROM a LEFT JOIN b ON a.b_id = b.id; - QUERY PLAN ---------------- - Seq Scan on a -(1 row) - -explain (costs off) SELECT b.* FROM b LEFT JOIN c ON b.c_id = c.id; - QUERY PLAN ---------------- - Seq Scan on b -(1 row) - -explain (costs off) - SELECT a.* FROM a LEFT JOIN (b left join c on b.c_id = c.id) - ON (a.b_id = b.id); - QUERY PLAN ---------------- - Seq Scan on a -(1 row) - --- check optimization of outer join within another special join -explain (costs off) -select id from a where id in ( - select b.id from b left join c on b.id = c.id -); - QUERY PLAN ----------------------------- - Hash Join - Hash Cond: (a.id = b.id) - -> Seq Scan on a - -> Hash - -> Seq Scan on b -(5 rows) - --- check that join removal works for a left join when joining a subquery --- that is guaranteed to be unique by its GROUP BY clause -explain (costs off) -select d.* from d left join (select * from b group by b.id, b.c_id) s - on d.a = s.id and d.b = s.c_id; - QUERY PLAN ---------------- - Seq Scan on d -(1 row) - --- similarly, but keying off a DISTINCT clause -explain (costs off) -select d.* from d left join (select distinct * from b) s - on d.a = s.id and d.b = s.c_id; - QUERY PLAN ---------------- - Seq Scan on d -(1 row) - --- join removal is not possible when the GROUP BY contains a column that is --- not in the join condition. (Note: as of 9.6, we notice that b.id is a --- primary key and so drop b.c_id from the GROUP BY of the resulting plan; --- but this happens too late for join removal in the outer plan level.) -explain (costs off) -select d.* from d left join (select * from b group by b.id, b.c_id) s - on d.a = s.id; - QUERY PLAN ------------------------------------------- - Merge Right Join - Merge Cond: (b.id = d.a) - -> Group - Group Key: b.id - -> Index Scan using b_pkey on b - -> Sort - Sort Key: d.a - -> Seq Scan on d -(8 rows) - --- similarly, but keying off a DISTINCT clause -explain (costs off) -select d.* from d left join (select distinct * from b) s - on d.a = s.id; - QUERY PLAN --------------------------------------- - Merge Right Join - Merge Cond: (b.id = d.a) - -> Unique - -> Sort - Sort Key: b.id, b.c_id - -> Seq Scan on b - -> Sort - Sort Key: d.a - -> Seq Scan on d -(9 rows) - --- check join removal works when uniqueness of the join condition is enforced --- by a UNION -explain (costs off) -select d.* from d left join (select id from a union select id from b) s - on d.a = s.id; - QUERY PLAN ---------------- - Seq Scan on d -(1 row) - --- check join removal with a cross-type comparison operator -explain (costs off) -select i8.* from int8_tbl i8 left join (select f1 from int4_tbl group by f1) i4 - on i8.q1 = i4.f1; - QUERY PLAN -------------------------- - Seq Scan on int8_tbl i8 -(1 row) - --- check join removal with lateral references -explain (costs off) -select 1 from (select a.id FROM a left join b on a.b_id = b.id) q, - lateral generate_series(1, q.id) gs(i) where q.id = gs.i; - QUERY PLAN -------------------------------------------- - Nested Loop - -> Seq Scan on a - -> Function Scan on generate_series gs - Filter: (a.id = i) -(4 rows) - -rollback; -create temp table parent (k int primary key, pd int); -create temp table child (k int unique, cd int); -insert into parent values (1, 10), (2, 20), (3, 30); -insert into child values (1, 100), (4, 400); --- this case is optimizable -select p.* from parent p left join child c on (p.k = c.k); - k | pd ----+---- - 1 | 10 - 2 | 20 - 3 | 30 -(3 rows) - -explain (costs off) - select p.* from parent p left join child c on (p.k = c.k); - QUERY PLAN ----------------------- - Seq Scan on parent p -(1 row) - --- this case is not -select p.*, linked from parent p - left join (select c.*, true as linked from child c) as ss - on (p.k = ss.k); - k | pd | linked ----+----+-------- - 1 | 10 | t - 2 | 20 | - 3 | 30 | -(3 rows) - -explain (costs off) - select p.*, linked from parent p - left join (select c.*, true as linked from child c) as ss - on (p.k = ss.k); - QUERY PLAN ---------------------------------- - Hash Left Join - Hash Cond: (p.k = c.k) - -> Seq Scan on parent p - -> Hash - -> Seq Scan on child c -(5 rows) - --- check for a 9.0rc1 bug: join removal breaks pseudoconstant qual handling -select p.* from - parent p left join child c on (p.k = c.k) - where p.k = 1 and p.k = 2; - k | pd ----+---- -(0 rows) - -explain (costs off) -select p.* from - parent p left join child c on (p.k = c.k) - where p.k = 1 and p.k = 2; - QUERY PLAN ------------------------------------------------- - Result - One-Time Filter: false - -> Index Scan using parent_pkey on parent p - Index Cond: (k = 1) -(4 rows) - -select p.* from - (parent p left join child c on (p.k = c.k)) join parent x on p.k = x.k - where p.k = 1 and p.k = 2; - k | pd ----+---- -(0 rows) - -explain (costs off) -select p.* from - (parent p left join child c on (p.k = c.k)) join parent x on p.k = x.k - where p.k = 1 and p.k = 2; - QUERY PLAN --------------------------- - Result - One-Time Filter: false -(2 rows) - --- bug 5255: this is not optimizable by join removal -begin; -CREATE TEMP TABLE a (id int PRIMARY KEY); -CREATE TEMP TABLE b (id int PRIMARY KEY, a_id int); -INSERT INTO a VALUES (0), (1); -INSERT INTO b VALUES (0, 0), (1, NULL); -SELECT * FROM b LEFT JOIN a ON (b.a_id = a.id) WHERE (a.id IS NULL OR a.id > 0); - id | a_id | id -----+------+---- - 1 | | -(1 row) - -SELECT b.* FROM b LEFT JOIN a ON (b.a_id = a.id) WHERE (a.id IS NULL OR a.id > 0); - id | a_id -----+------ - 1 | -(1 row) - -rollback; --- another join removal bug: this is not optimizable, either -begin; -create temp table innertab (id int8 primary key, dat1 int8); -insert into innertab values(123, 42); -SELECT * FROM - (SELECT 1 AS x) ss1 - LEFT JOIN - (SELECT q1, q2, COALESCE(dat1, q1) AS y - FROM int8_tbl LEFT JOIN innertab ON q2 = id) ss2 - ON true; - x | q1 | q2 | y ----+------------------+-------------------+------------------ - 1 | 123 | 456 | 123 - 1 | 123 | 4567890123456789 | 123 - 1 | 4567890123456789 | 123 | 42 - 1 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 1 | 4567890123456789 | -4567890123456789 | 4567890123456789 -(5 rows) - -rollback; --- another join removal bug: we must clean up correctly when removing a PHV -begin; -create temp table uniquetbl (f1 text unique); -explain (costs off) -select t1.* from - uniquetbl as t1 - left join (select *, '***'::text as d1 from uniquetbl) t2 - on t1.f1 = t2.f1 - left join uniquetbl t3 - on t2.d1 = t3.f1; - QUERY PLAN --------------------------- - Seq Scan on uniquetbl t1 -(1 row) - -explain (costs off) -select t0.* -from - text_tbl t0 - left join - (select case t1.ten when 0 then 'doh!'::text else null::text end as case1, - t1.stringu2 - from tenk1 t1 - join int4_tbl i4 ON i4.f1 = t1.unique2 - left join uniquetbl u1 ON u1.f1 = t1.string4) ss - on t0.f1 = ss.case1 -where ss.stringu2 !~* ss.case1; - QUERY PLAN --------------------------------------------------------------------------------------------- - Nested Loop - Join Filter: (CASE t1.ten WHEN 0 THEN 'doh!'::text ELSE NULL::text END = t0.f1) - -> Nested Loop - -> Seq Scan on int4_tbl i4 - -> Index Scan using tenk1_unique2 on tenk1 t1 - Index Cond: (unique2 = i4.f1) - Filter: (stringu2 !~* CASE ten WHEN 0 THEN 'doh!'::text ELSE NULL::text END) - -> Materialize - -> Seq Scan on text_tbl t0 -(9 rows) - -select t0.* -from - text_tbl t0 - left join - (select case t1.ten when 0 then 'doh!'::text else null::text end as case1, - t1.stringu2 - from tenk1 t1 - join int4_tbl i4 ON i4.f1 = t1.unique2 - left join uniquetbl u1 ON u1.f1 = t1.string4) ss - on t0.f1 = ss.case1 -where ss.stringu2 !~* ss.case1; - f1 ------- - doh! -(1 row) - -rollback; --- test case to expose miscomputation of required relid set for a PHV -explain (verbose, costs off) -select i8.*, ss.v, t.unique2 - from int8_tbl i8 - left join int4_tbl i4 on i4.f1 = 1 - left join lateral (select i4.f1 + 1 as v) as ss on true - left join tenk1 t on t.unique2 = ss.v -where q2 = 456; - QUERY PLAN -------------------------------------------------------------- - Nested Loop Left Join - Output: i8.q1, i8.q2, ((i4.f1 + 1)), t.unique2 - -> Nested Loop Left Join - Output: i8.q1, i8.q2, (i4.f1 + 1) - -> Seq Scan on public.int8_tbl i8 - Output: i8.q1, i8.q2 - Filter: (i8.q2 = 456) - -> Seq Scan on public.int4_tbl i4 - Output: i4.f1 - Filter: (i4.f1 = 1) - -> Index Only Scan using tenk1_unique2 on public.tenk1 t - Output: t.unique2 - Index Cond: (t.unique2 = ((i4.f1 + 1))) -(13 rows) - -select i8.*, ss.v, t.unique2 - from int8_tbl i8 - left join int4_tbl i4 on i4.f1 = 1 - left join lateral (select i4.f1 + 1 as v) as ss on true - left join tenk1 t on t.unique2 = ss.v -where q2 = 456; - q1 | q2 | v | unique2 ------+-----+---+--------- - 123 | 456 | | -(1 row) - --- and check a related issue where we miscompute required relids for --- a PHV that's been translated to a child rel -create temp table parttbl (a integer primary key) partition by range (a); -create temp table parttbl1 partition of parttbl for values from (1) to (100); -insert into parttbl values (11), (12); -explain (costs off) -select * from - (select *, 12 as phv from parttbl) as ss - right join int4_tbl on true -where ss.a = ss.phv and f1 = 0; - QUERY PLAN ------------------------------------- - Nested Loop - -> Seq Scan on int4_tbl - Filter: (f1 = 0) - -> Seq Scan on parttbl1 parttbl - Filter: (a = 12) -(5 rows) - -select * from - (select *, 12 as phv from parttbl) as ss - right join int4_tbl on true -where ss.a = ss.phv and f1 = 0; - a | phv | f1 -----+-----+---- - 12 | 12 | 0 -(1 row) - --- bug #8444: we've historically allowed duplicate aliases within aliased JOINs -select * from - int8_tbl x join (int4_tbl x cross join int4_tbl y) j on q1 = f1; -- error -ERROR: column reference "f1" is ambiguous -LINE 2: ..._tbl x join (int4_tbl x cross join int4_tbl y) j on q1 = f1; - ^ -select * from - int8_tbl x join (int4_tbl x cross join int4_tbl y) j on q1 = y.f1; -- error -ERROR: invalid reference to FROM-clause entry for table "y" -LINE 2: ...bl x join (int4_tbl x cross join int4_tbl y) j on q1 = y.f1; - ^ -HINT: There is an entry for table "y", but it cannot be referenced from this part of the query. -select * from - int8_tbl x join (int4_tbl x cross join int4_tbl y(ff)) j on q1 = f1; -- ok - q1 | q2 | f1 | ff -----+----+----+---- -(0 rows) - --- --- Test hints given on incorrect column references are useful --- -select t1.uunique1 from - tenk1 t1 join tenk2 t2 on t1.two = t2.two; -- error, prefer "t1" suggestion -ERROR: column t1.uunique1 does not exist -LINE 1: select t1.uunique1 from - ^ -HINT: Perhaps you meant to reference the column "t1.unique1". -select t2.uunique1 from - tenk1 t1 join tenk2 t2 on t1.two = t2.two; -- error, prefer "t2" suggestion -ERROR: column t2.uunique1 does not exist -LINE 1: select t2.uunique1 from - ^ -HINT: Perhaps you meant to reference the column "t2.unique1". -select uunique1 from - tenk1 t1 join tenk2 t2 on t1.two = t2.two; -- error, suggest both at once -ERROR: column "uunique1" does not exist -LINE 1: select uunique1 from - ^ -HINT: Perhaps you meant to reference the column "t1.unique1" or the column "t2.unique1". --- --- Take care to reference the correct RTE --- -select atts.relid::regclass, s.* from pg_stats s join - pg_attribute a on s.attname = a.attname and s.tablename = - a.attrelid::regclass::text join (select unnest(indkey) attnum, - indexrelid from pg_index i) atts on atts.attnum = a.attnum where - schemaname != 'pg_catalog'; -ERROR: column atts.relid does not exist -LINE 1: select atts.relid::regclass, s.* from pg_stats s join - ^ --- --- Test LATERAL --- -select unique2, x.* -from tenk1 a, lateral (select * from int4_tbl b where f1 = a.unique1) x; - unique2 | f1 ----------+---- - 9998 | 0 -(1 row) - -explain (costs off) - select unique2, x.* - from tenk1 a, lateral (select * from int4_tbl b where f1 = a.unique1) x; - QUERY PLAN -------------------------------------------------- - Nested Loop - -> Seq Scan on int4_tbl b - -> Index Scan using tenk1_unique1 on tenk1 a - Index Cond: (unique1 = b.f1) -(4 rows) - -select unique2, x.* -from int4_tbl x, lateral (select unique2 from tenk1 where f1 = unique1) ss; - unique2 | f1 ----------+---- - 9998 | 0 -(1 row) - -explain (costs off) - select unique2, x.* - from int4_tbl x, lateral (select unique2 from tenk1 where f1 = unique1) ss; - QUERY PLAN ------------------------------------------------ - Nested Loop - -> Seq Scan on int4_tbl x - -> Index Scan using tenk1_unique1 on tenk1 - Index Cond: (unique1 = x.f1) -(4 rows) - -explain (costs off) - select unique2, x.* - from int4_tbl x cross join lateral (select unique2 from tenk1 where f1 = unique1) ss; - QUERY PLAN ------------------------------------------------ - Nested Loop - -> Seq Scan on int4_tbl x - -> Index Scan using tenk1_unique1 on tenk1 - Index Cond: (unique1 = x.f1) -(4 rows) - -select unique2, x.* -from int4_tbl x left join lateral (select unique1, unique2 from tenk1 where f1 = unique1) ss on true; - unique2 | f1 ----------+------------- - 9998 | 0 - | 123456 - | -123456 - | 2147483647 - | -2147483647 -(5 rows) - -explain (costs off) - select unique2, x.* - from int4_tbl x left join lateral (select unique1, unique2 from tenk1 where f1 = unique1) ss on true; - QUERY PLAN ------------------------------------------------ - Nested Loop Left Join - -> Seq Scan on int4_tbl x - -> Index Scan using tenk1_unique1 on tenk1 - Index Cond: (unique1 = x.f1) -(4 rows) - --- check scoping of lateral versus parent references --- the first of these should return int8_tbl.q2, the second int8_tbl.q1 -select *, (select r from (select q1 as q2) x, (select q2 as r) y) from int8_tbl; - q1 | q2 | r -------------------+-------------------+------------------- - 123 | 456 | 456 - 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 123 - 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | -4567890123456789 -(5 rows) - -select *, (select r from (select q1 as q2) x, lateral (select q2 as r) y) from int8_tbl; - q1 | q2 | r -------------------+-------------------+------------------ - 123 | 456 | 123 - 123 | 4567890123456789 | 123 - 4567890123456789 | 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | 4567890123456789 -(5 rows) - --- lateral with function in FROM -select count(*) from tenk1 a, lateral generate_series(1,two) g; - count -------- - 5000 -(1 row) - -explain (costs off) - select count(*) from tenk1 a, lateral generate_series(1,two) g; - QUERY PLAN ------------------------------------------------------- - Aggregate - -> Nested Loop - -> Seq Scan on tenk1 a - -> Memoize - Cache Key: a.two - Cache Mode: binary - -> Function Scan on generate_series g -(7 rows) - -explain (costs off) - select count(*) from tenk1 a cross join lateral generate_series(1,two) g; - QUERY PLAN ------------------------------------------------------- - Aggregate - -> Nested Loop - -> Seq Scan on tenk1 a - -> Memoize - Cache Key: a.two - Cache Mode: binary - -> Function Scan on generate_series g -(7 rows) - --- don't need the explicit LATERAL keyword for functions -explain (costs off) - select count(*) from tenk1 a, generate_series(1,two) g; - QUERY PLAN ------------------------------------------------------- - Aggregate - -> Nested Loop - -> Seq Scan on tenk1 a - -> Memoize - Cache Key: a.two - Cache Mode: binary - -> Function Scan on generate_series g -(7 rows) - --- lateral with UNION ALL subselect -explain (costs off) - select * from generate_series(100,200) g, - lateral (select * from int8_tbl a where g = q1 union all - select * from int8_tbl b where g = q2) ss; - QUERY PLAN ------------------------------------------- - Nested Loop - -> Function Scan on generate_series g - -> Append - -> Seq Scan on int8_tbl a - Filter: (g.g = q1) - -> Seq Scan on int8_tbl b - Filter: (g.g = q2) -(7 rows) - -select * from generate_series(100,200) g, - lateral (select * from int8_tbl a where g = q1 union all - select * from int8_tbl b where g = q2) ss; - g | q1 | q2 ------+------------------+------------------ - 123 | 123 | 456 - 123 | 123 | 4567890123456789 - 123 | 4567890123456789 | 123 -(3 rows) - --- lateral with VALUES -explain (costs off) - select count(*) from tenk1 a, - tenk1 b join lateral (values(a.unique1)) ss(x) on b.unique2 = ss.x; - QUERY PLAN ------------------------------------------------------------- - Aggregate - -> Merge Join - Merge Cond: (a.unique1 = b.unique2) - -> Index Only Scan using tenk1_unique1 on tenk1 a - -> Index Only Scan using tenk1_unique2 on tenk1 b -(5 rows) - -select count(*) from tenk1 a, - tenk1 b join lateral (values(a.unique1)) ss(x) on b.unique2 = ss.x; - count -------- - 10000 -(1 row) - --- lateral with VALUES, no flattening possible -explain (costs off) - select count(*) from tenk1 a, - tenk1 b join lateral (values(a.unique1),(-1)) ss(x) on b.unique2 = ss.x; - QUERY PLAN ------------------------------------------------------------------- - Aggregate - -> Nested Loop - -> Nested Loop - -> Index Only Scan using tenk1_unique1 on tenk1 a - -> Values Scan on "*VALUES*" - -> Memoize - Cache Key: "*VALUES*".column1 - Cache Mode: logical - -> Index Only Scan using tenk1_unique2 on tenk1 b - Index Cond: (unique2 = "*VALUES*".column1) -(10 rows) - -select count(*) from tenk1 a, - tenk1 b join lateral (values(a.unique1),(-1)) ss(x) on b.unique2 = ss.x; - count -------- - 10000 -(1 row) - --- lateral injecting a strange outer join condition -explain (costs off) - select * from int8_tbl a, - int8_tbl x left join lateral (select a.q1 from int4_tbl y) ss(z) - on x.q2 = ss.z - order by a.q1, a.q2, x.q1, x.q2, ss.z; - QUERY PLAN ------------------------------------------------- - Sort - Sort Key: a.q1, a.q2, x.q1, x.q2, (a.q1) - -> Nested Loop - -> Seq Scan on int8_tbl a - -> Hash Right Join - Hash Cond: ((a.q1) = x.q2) - -> Seq Scan on int4_tbl y - -> Hash - -> Seq Scan on int8_tbl x -(9 rows) - -select * from int8_tbl a, - int8_tbl x left join lateral (select a.q1 from int4_tbl y) ss(z) - on x.q2 = ss.z - order by a.q1, a.q2, x.q1, x.q2, ss.z; - q1 | q2 | q1 | q2 | z -------------------+-------------------+------------------+-------------------+------------------ - 123 | 456 | 123 | 456 | - 123 | 456 | 123 | 4567890123456789 | - 123 | 456 | 4567890123456789 | -4567890123456789 | - 123 | 456 | 4567890123456789 | 123 | 123 - 123 | 456 | 4567890123456789 | 123 | 123 - 123 | 456 | 4567890123456789 | 123 | 123 - 123 | 456 | 4567890123456789 | 123 | 123 - 123 | 456 | 4567890123456789 | 123 | 123 - 123 | 456 | 4567890123456789 | 4567890123456789 | - 123 | 4567890123456789 | 123 | 456 | - 123 | 4567890123456789 | 123 | 4567890123456789 | - 123 | 4567890123456789 | 4567890123456789 | -4567890123456789 | - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | - 4567890123456789 | -4567890123456789 | 123 | 456 | - 4567890123456789 | -4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | 4567890123456789 | -4567890123456789 | - 4567890123456789 | -4567890123456789 | 4567890123456789 | 123 | - 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 123 | 456 | - 4567890123456789 | 123 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 4567890123456789 | -4567890123456789 | - 4567890123456789 | 123 | 4567890123456789 | 123 | - 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 123 | 456 | - 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 | - 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 -(57 rows) - --- lateral reference to a join alias variable -select * from (select f1/2 as x from int4_tbl) ss1 join int4_tbl i4 on x = f1, - lateral (select x) ss2(y); - x | f1 | y ----+----+--- - 0 | 0 | 0 -(1 row) - -select * from (select f1 as x from int4_tbl) ss1 join int4_tbl i4 on x = f1, - lateral (values(x)) ss2(y); - x | f1 | y --------------+-------------+------------- - 0 | 0 | 0 - 123456 | 123456 | 123456 - -123456 | -123456 | -123456 - 2147483647 | 2147483647 | 2147483647 - -2147483647 | -2147483647 | -2147483647 -(5 rows) - -select * from ((select f1/2 as x from int4_tbl) ss1 join int4_tbl i4 on x = f1) j, - lateral (select x) ss2(y); - x | f1 | y ----+----+--- - 0 | 0 | 0 -(1 row) - --- lateral references requiring pullup -select * from (values(1)) x(lb), - lateral generate_series(lb,4) x4; - lb | x4 -----+---- - 1 | 1 - 1 | 2 - 1 | 3 - 1 | 4 -(4 rows) - -select * from (select f1/1000000000 from int4_tbl) x(lb), - lateral generate_series(lb,4) x4; - lb | x4 -----+---- - 0 | 0 - 0 | 1 - 0 | 2 - 0 | 3 - 0 | 4 - 0 | 0 - 0 | 1 - 0 | 2 - 0 | 3 - 0 | 4 - 0 | 0 - 0 | 1 - 0 | 2 - 0 | 3 - 0 | 4 - 2 | 2 - 2 | 3 - 2 | 4 - -2 | -2 - -2 | -1 - -2 | 0 - -2 | 1 - -2 | 2 - -2 | 3 - -2 | 4 -(25 rows) - -select * from (values(1)) x(lb), - lateral (values(lb)) y(lbcopy); - lb | lbcopy -----+-------- - 1 | 1 -(1 row) - -select * from (values(1)) x(lb), - lateral (select lb from int4_tbl) y(lbcopy); - lb | lbcopy -----+-------- - 1 | 1 - 1 | 1 - 1 | 1 - 1 | 1 - 1 | 1 -(5 rows) - -select * from - int8_tbl x left join (select q1,coalesce(q2,0) q2 from int8_tbl) y on x.q2 = y.q1, - lateral (values(x.q1,y.q1,y.q2)) v(xq1,yq1,yq2); - q1 | q2 | q1 | q2 | xq1 | yq1 | yq2 -------------------+-------------------+------------------+-------------------+------------------+------------------+------------------- - 123 | 456 | | | 123 | | - 123 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 123 | 4567890123456789 | -4567890123456789 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 | 4567890123456789 | 123 - 4567890123456789 | 123 | 123 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 - 4567890123456789 | 123 | 123 | 456 | 4567890123456789 | 123 | 456 - 4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 | 123 - 4567890123456789 | -4567890123456789 | | | 4567890123456789 | | -(10 rows) - -select * from - int8_tbl x left join (select q1,coalesce(q2,0) q2 from int8_tbl) y on x.q2 = y.q1, - lateral (select x.q1,y.q1,y.q2) v(xq1,yq1,yq2); - q1 | q2 | q1 | q2 | xq1 | yq1 | yq2 -------------------+-------------------+------------------+-------------------+------------------+------------------+------------------- - 123 | 456 | | | 123 | | - 123 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 123 | 4567890123456789 | -4567890123456789 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 | 4567890123456789 | 123 - 4567890123456789 | 123 | 123 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 - 4567890123456789 | 123 | 123 | 456 | 4567890123456789 | 123 | 456 - 4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 | 123 - 4567890123456789 | -4567890123456789 | | | 4567890123456789 | | -(10 rows) - -select x.* from - int8_tbl x left join (select q1,coalesce(q2,0) q2 from int8_tbl) y on x.q2 = y.q1, - lateral (select x.q1,y.q1,y.q2) v(xq1,yq1,yq2); - q1 | q2 -------------------+------------------- - 123 | 456 - 123 | 4567890123456789 - 123 | 4567890123456789 - 123 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(10 rows) - -select v.* from - (int8_tbl x left join (select q1,coalesce(q2,0) q2 from int8_tbl) y on x.q2 = y.q1) - left join int4_tbl z on z.f1 = x.q2, - lateral (select x.q1,y.q1 union all select x.q2,y.q2) v(vx,vy); - vx | vy --------------------+------------------- - 123 | - 456 | - 123 | 4567890123456789 - 4567890123456789 | -4567890123456789 - 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 123 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 123 - 123 | 4567890123456789 - 4567890123456789 | 123 - 123 | 456 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | - -4567890123456789 | -(20 rows) - -select v.* from - (int8_tbl x left join (select q1,(select coalesce(q2,0)) q2 from int8_tbl) y on x.q2 = y.q1) - left join int4_tbl z on z.f1 = x.q2, - lateral (select x.q1,y.q1 union all select x.q2,y.q2) v(vx,vy); - vx | vy --------------------+------------------- - 4567890123456789 | 123 - 123 | 456 - 4567890123456789 | 123 - 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 - 123 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 - 123 | 4567890123456789 - 4567890123456789 | -4567890123456789 - 123 | - 456 | - 4567890123456789 | - -4567890123456789 | -(20 rows) - -select v.* from - (int8_tbl x left join (select q1,(select coalesce(q2,0)) q2 from int8_tbl) y on x.q2 = y.q1) - left join int4_tbl z on z.f1 = x.q2, - lateral (select x.q1,y.q1 from onerow union all select x.q2,y.q2 from onerow) v(vx,vy); - vx | vy --------------------+------------------- - 4567890123456789 | 123 - 123 | 456 - 4567890123456789 | 123 - 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 - 123 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 - 123 | 4567890123456789 - 4567890123456789 | -4567890123456789 - 123 | - 456 | - 4567890123456789 | - -4567890123456789 | -(20 rows) - -explain (verbose, costs off) -select * from - int8_tbl a left join - lateral (select *, a.q2 as x from int8_tbl b) ss on a.q2 = ss.q1; - QUERY PLAN ------------------------------------------- - Nested Loop Left Join - Output: a.q1, a.q2, b.q1, b.q2, (a.q2) - -> Seq Scan on public.int8_tbl a - Output: a.q1, a.q2 - -> Seq Scan on public.int8_tbl b - Output: b.q1, b.q2, a.q2 - Filter: (a.q2 = b.q1) -(7 rows) - -select * from - int8_tbl a left join - lateral (select *, a.q2 as x from int8_tbl b) ss on a.q2 = ss.q1; - q1 | q2 | q1 | q2 | x -------------------+-------------------+------------------+-------------------+------------------ - 123 | 456 | | | - 123 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 123 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 123 | 456 | 123 - 4567890123456789 | 123 | 123 | 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | | | -(10 rows) - -explain (verbose, costs off) -select * from - int8_tbl a left join - lateral (select *, coalesce(a.q2, 42) as x from int8_tbl b) ss on a.q2 = ss.q1; - QUERY PLAN ------------------------------------------------------------------- - Nested Loop Left Join - Output: a.q1, a.q2, b.q1, b.q2, (COALESCE(a.q2, '42'::bigint)) - -> Seq Scan on public.int8_tbl a - Output: a.q1, a.q2 - -> Seq Scan on public.int8_tbl b - Output: b.q1, b.q2, COALESCE(a.q2, '42'::bigint) - Filter: (a.q2 = b.q1) -(7 rows) - -select * from - int8_tbl a left join - lateral (select *, coalesce(a.q2, 42) as x from int8_tbl b) ss on a.q2 = ss.q1; - q1 | q2 | q1 | q2 | x -------------------+-------------------+------------------+-------------------+------------------ - 123 | 456 | | | - 123 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 123 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 4567890123456789 - 4567890123456789 | 123 | 123 | 456 | 123 - 4567890123456789 | 123 | 123 | 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | | | -(10 rows) - --- lateral can result in join conditions appearing below their --- real semantic level -explain (verbose, costs off) -select * from int4_tbl i left join - lateral (select * from int2_tbl j where i.f1 = j.f1) k on true; - QUERY PLAN -------------------------------------------- - Hash Left Join - Output: i.f1, j.f1 - Hash Cond: (i.f1 = j.f1) - -> Seq Scan on public.int4_tbl i - Output: i.f1 - -> Hash - Output: j.f1 - -> Seq Scan on public.int2_tbl j - Output: j.f1 -(9 rows) - -select * from int4_tbl i left join - lateral (select * from int2_tbl j where i.f1 = j.f1) k on true; - f1 | f1 --------------+---- - 0 | 0 - 123456 | - -123456 | - 2147483647 | - -2147483647 | -(5 rows) - -explain (verbose, costs off) -select * from int4_tbl i left join - lateral (select coalesce(i) from int2_tbl j where i.f1 = j.f1) k on true; - QUERY PLAN -------------------------------------- - Nested Loop Left Join - Output: i.f1, (COALESCE(i.*)) - -> Seq Scan on public.int4_tbl i - Output: i.f1, i.* - -> Seq Scan on public.int2_tbl j - Output: j.f1, COALESCE(i.*) - Filter: (i.f1 = j.f1) -(7 rows) - -select * from int4_tbl i left join - lateral (select coalesce(i) from int2_tbl j where i.f1 = j.f1) k on true; - f1 | coalesce --------------+---------- - 0 | (0) - 123456 | - -123456 | - 2147483647 | - -2147483647 | -(5 rows) - -explain (verbose, costs off) -select * from int4_tbl a, - lateral ( - select * from int4_tbl b left join int8_tbl c on (b.f1 = q1 and a.f1 = q2) - ) ss; - QUERY PLAN -------------------------------------------------- - Nested Loop - Output: a.f1, b.f1, c.q1, c.q2 - -> Seq Scan on public.int4_tbl a - Output: a.f1 - -> Hash Left Join - Output: b.f1, c.q1, c.q2 - Hash Cond: (b.f1 = c.q1) - -> Seq Scan on public.int4_tbl b - Output: b.f1 - -> Hash - Output: c.q1, c.q2 - -> Seq Scan on public.int8_tbl c - Output: c.q1, c.q2 - Filter: (a.f1 = c.q2) -(14 rows) - -select * from int4_tbl a, - lateral ( - select * from int4_tbl b left join int8_tbl c on (b.f1 = q1 and a.f1 = q2) - ) ss; - f1 | f1 | q1 | q2 --------------+-------------+----+---- - 0 | 0 | | - 0 | 123456 | | - 0 | -123456 | | - 0 | 2147483647 | | - 0 | -2147483647 | | - 123456 | 0 | | - 123456 | 123456 | | - 123456 | -123456 | | - 123456 | 2147483647 | | - 123456 | -2147483647 | | - -123456 | 0 | | - -123456 | 123456 | | - -123456 | -123456 | | - -123456 | 2147483647 | | - -123456 | -2147483647 | | - 2147483647 | 0 | | - 2147483647 | 123456 | | - 2147483647 | -123456 | | - 2147483647 | 2147483647 | | - 2147483647 | -2147483647 | | - -2147483647 | 0 | | - -2147483647 | 123456 | | - -2147483647 | -123456 | | - -2147483647 | 2147483647 | | - -2147483647 | -2147483647 | | -(25 rows) - --- lateral reference in a PlaceHolderVar evaluated at join level -explain (verbose, costs off) -select * from - int8_tbl a left join lateral - (select b.q1 as bq1, c.q1 as cq1, least(a.q1,b.q1,c.q1) from - int8_tbl b cross join int8_tbl c) ss - on a.q2 = ss.bq1; - QUERY PLAN -------------------------------------------------------------- - Nested Loop Left Join - Output: a.q1, a.q2, b.q1, c.q1, (LEAST(a.q1, b.q1, c.q1)) - -> Seq Scan on public.int8_tbl a - Output: a.q1, a.q2 - -> Nested Loop - Output: b.q1, c.q1, LEAST(a.q1, b.q1, c.q1) - -> Seq Scan on public.int8_tbl b - Output: b.q1, b.q2 - Filter: (a.q2 = b.q1) - -> Seq Scan on public.int8_tbl c - Output: c.q1, c.q2 -(11 rows) - -select * from - int8_tbl a left join lateral - (select b.q1 as bq1, c.q1 as cq1, least(a.q1,b.q1,c.q1) from - int8_tbl b cross join int8_tbl c) ss - on a.q2 = ss.bq1; - q1 | q2 | bq1 | cq1 | least -------------------+-------------------+------------------+------------------+------------------ - 123 | 456 | | | - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 - 123 | 4567890123456789 | 4567890123456789 | 123 | 123 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 - 4567890123456789 | 123 | 123 | 123 | 123 - 4567890123456789 | 123 | 123 | 123 | 123 - 4567890123456789 | 123 | 123 | 4567890123456789 | 123 - 4567890123456789 | 123 | 123 | 4567890123456789 | 123 - 4567890123456789 | 123 | 123 | 4567890123456789 | 123 - 4567890123456789 | 123 | 123 | 123 | 123 - 4567890123456789 | 123 | 123 | 123 | 123 - 4567890123456789 | 123 | 123 | 4567890123456789 | 123 - 4567890123456789 | 123 | 123 | 4567890123456789 | 123 - 4567890123456789 | 123 | 123 | 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 123 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 123 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 123 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 123 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 123 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 123 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 | | | -(42 rows) - --- case requiring nested PlaceHolderVars -explain (verbose, costs off) -select * from - int8_tbl c left join ( - int8_tbl a left join (select q1, coalesce(q2,42) as x from int8_tbl b) ss1 - on a.q2 = ss1.q1 - cross join - lateral (select q1, coalesce(ss1.x,q2) as y from int8_tbl d) ss2 - ) on c.q2 = ss2.q1, - lateral (select ss2.y offset 0) ss3; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Nested Loop - Output: c.q1, c.q2, a.q1, a.q2, b.q1, (COALESCE(b.q2, '42'::bigint)), d.q1, (COALESCE((COALESCE(b.q2, '42'::bigint)), d.q2)), ((COALESCE((COALESCE(b.q2, '42'::bigint)), d.q2))) - -> Hash Right Join - Output: c.q1, c.q2, a.q1, a.q2, b.q1, d.q1, (COALESCE(b.q2, '42'::bigint)), (COALESCE((COALESCE(b.q2, '42'::bigint)), d.q2)) - Hash Cond: (d.q1 = c.q2) - -> Nested Loop - Output: a.q1, a.q2, b.q1, d.q1, (COALESCE(b.q2, '42'::bigint)), (COALESCE((COALESCE(b.q2, '42'::bigint)), d.q2)) - -> Hash Left Join - Output: a.q1, a.q2, b.q1, (COALESCE(b.q2, '42'::bigint)) - Hash Cond: (a.q2 = b.q1) - -> Seq Scan on public.int8_tbl a - Output: a.q1, a.q2 - -> Hash - Output: b.q1, (COALESCE(b.q2, '42'::bigint)) - -> Seq Scan on public.int8_tbl b - Output: b.q1, COALESCE(b.q2, '42'::bigint) - -> Seq Scan on public.int8_tbl d - Output: d.q1, COALESCE((COALESCE(b.q2, '42'::bigint)), d.q2) - -> Hash - Output: c.q1, c.q2 - -> Seq Scan on public.int8_tbl c - Output: c.q1, c.q2 - -> Result - Output: (COALESCE((COALESCE(b.q2, '42'::bigint)), d.q2)) -(24 rows) - --- case that breaks the old ph_may_need optimization -explain (verbose, costs off) -select c.*,a.*,ss1.q1,ss2.q1,ss3.* from - int8_tbl c left join ( - int8_tbl a left join - (select q1, coalesce(q2,f1) as x from int8_tbl b, int4_tbl b2 - where q1 < f1) ss1 - on a.q2 = ss1.q1 - cross join - lateral (select q1, coalesce(ss1.x,q2) as y from int8_tbl d) ss2 - ) on c.q2 = ss2.q1, - lateral (select * from int4_tbl i where ss2.y > f1) ss3; - QUERY PLAN ---------------------------------------------------------------------------------------------------------- - Nested Loop - Output: c.q1, c.q2, a.q1, a.q2, b.q1, d.q1, i.f1 - Join Filter: ((COALESCE((COALESCE(b.q2, (b2.f1)::bigint)), d.q2)) > i.f1) - -> Hash Right Join - Output: c.q1, c.q2, a.q1, a.q2, b.q1, d.q1, (COALESCE((COALESCE(b.q2, (b2.f1)::bigint)), d.q2)) - Hash Cond: (d.q1 = c.q2) - -> Nested Loop - Output: a.q1, a.q2, b.q1, d.q1, (COALESCE((COALESCE(b.q2, (b2.f1)::bigint)), d.q2)) - -> Hash Right Join - Output: a.q1, a.q2, b.q1, (COALESCE(b.q2, (b2.f1)::bigint)) - Hash Cond: (b.q1 = a.q2) - -> Nested Loop - Output: b.q1, COALESCE(b.q2, (b2.f1)::bigint) - Join Filter: (b.q1 < b2.f1) - -> Seq Scan on public.int8_tbl b - Output: b.q1, b.q2 - -> Materialize - Output: b2.f1 - -> Seq Scan on public.int4_tbl b2 - Output: b2.f1 - -> Hash - Output: a.q1, a.q2 - -> Seq Scan on public.int8_tbl a - Output: a.q1, a.q2 - -> Seq Scan on public.int8_tbl d - Output: d.q1, COALESCE((COALESCE(b.q2, (b2.f1)::bigint)), d.q2) - -> Hash - Output: c.q1, c.q2 - -> Seq Scan on public.int8_tbl c - Output: c.q1, c.q2 - -> Materialize - Output: i.f1 - -> Seq Scan on public.int4_tbl i - Output: i.f1 -(34 rows) - --- check processing of postponed quals (bug #9041) -explain (verbose, costs off) -select * from - (select 1 as x offset 0) x cross join (select 2 as y offset 0) y - left join lateral ( - select * from (select 3 as z offset 0) z where z.z = x.x - ) zz on zz.z = y.y; - QUERY PLAN ----------------------------------------------- - Nested Loop Left Join - Output: (1), (2), (3) - Join Filter: (((3) = (1)) AND ((3) = (2))) - -> Nested Loop - Output: (1), (2) - -> Result - Output: 1 - -> Result - Output: 2 - -> Result - Output: 3 -(11 rows) - --- check dummy rels with lateral references (bug #15694) -explain (verbose, costs off) -select * from int8_tbl i8 left join lateral - (select *, i8.q2 from int4_tbl where false) ss on true; - QUERY PLAN --------------------------------------- - Nested Loop Left Join - Output: i8.q1, i8.q2, f1, (i8.q2) - -> Seq Scan on public.int8_tbl i8 - Output: i8.q1, i8.q2 - -> Result - Output: f1, i8.q2 - One-Time Filter: false -(7 rows) - -explain (verbose, costs off) -select * from int8_tbl i8 left join lateral - (select *, i8.q2 from int4_tbl i1, int4_tbl i2 where false) ss on true; - QUERY PLAN ------------------------------------------ - Nested Loop Left Join - Output: i8.q1, i8.q2, f1, f1, (i8.q2) - -> Seq Scan on public.int8_tbl i8 - Output: i8.q1, i8.q2 - -> Result - Output: f1, f1, i8.q2 - One-Time Filter: false -(7 rows) - --- check handling of nested appendrels inside LATERAL -select * from - ((select 2 as v) union all (select 3 as v)) as q1 - cross join lateral - ((select * from - ((select 4 as v) union all (select 5 as v)) as q3) - union all - (select q1.v) - ) as q2; - v | v ----+--- - 2 | 4 - 2 | 5 - 2 | 2 - 3 | 4 - 3 | 5 - 3 | 3 -(6 rows) - --- check we don't try to do a unique-ified semijoin with LATERAL -explain (verbose, costs off) -select * from - (values (0,9998), (1,1000)) v(id,x), - lateral (select f1 from int4_tbl - where f1 = any (select unique1 from tenk1 - where unique2 = v.x offset 0)) ss; - QUERY PLAN ----------------------------------------------------------------------- - Nested Loop - Output: "*VALUES*".column1, "*VALUES*".column2, int4_tbl.f1 - -> Values Scan on "*VALUES*" - Output: "*VALUES*".column1, "*VALUES*".column2 - -> Nested Loop Semi Join - Output: int4_tbl.f1 - Join Filter: (int4_tbl.f1 = tenk1.unique1) - -> Seq Scan on public.int4_tbl - Output: int4_tbl.f1 - -> Materialize - Output: tenk1.unique1 - -> Index Scan using tenk1_unique2 on public.tenk1 - Output: tenk1.unique1 - Index Cond: (tenk1.unique2 = "*VALUES*".column2) -(14 rows) - -select * from - (values (0,9998), (1,1000)) v(id,x), - lateral (select f1 from int4_tbl - where f1 = any (select unique1 from tenk1 - where unique2 = v.x offset 0)) ss; - id | x | f1 -----+------+---- - 0 | 9998 | 0 -(1 row) - --- check proper extParam/allParam handling (this isn't exactly a LATERAL issue, --- but we can make the test case much more compact with LATERAL) -explain (verbose, costs off) -select * from (values (0), (1)) v(id), -lateral (select * from int8_tbl t1, - lateral (select * from - (select * from int8_tbl t2 - where q1 = any (select q2 from int8_tbl t3 - where q2 = (select greatest(t1.q1,t2.q2)) - and (select v.id=0)) offset 0) ss2) ss - where t1.q1 = ss.q2) ss0; - QUERY PLAN ------------------------------------------------------------------ - Nested Loop - Output: "*VALUES*".column1, t1.q1, t1.q2, ss2.q1, ss2.q2 - -> Seq Scan on public.int8_tbl t1 - Output: t1.q1, t1.q2 - -> Nested Loop - Output: "*VALUES*".column1, ss2.q1, ss2.q2 - -> Values Scan on "*VALUES*" - Output: "*VALUES*".column1 - -> Subquery Scan on ss2 - Output: ss2.q1, ss2.q2 - Filter: (t1.q1 = ss2.q2) - -> Seq Scan on public.int8_tbl t2 - Output: t2.q1, t2.q2 - Filter: (SubPlan 3) - SubPlan 3 - -> Result - Output: t3.q2 - One-Time Filter: $4 - InitPlan 1 (returns $2) - -> Result - Output: GREATEST($0, t2.q2) - InitPlan 2 (returns $4) - -> Result - Output: ($3 = 0) - -> Seq Scan on public.int8_tbl t3 - Output: t3.q1, t3.q2 - Filter: (t3.q2 = $2) -(27 rows) - -select * from (values (0), (1)) v(id), -lateral (select * from int8_tbl t1, - lateral (select * from - (select * from int8_tbl t2 - where q1 = any (select q2 from int8_tbl t3 - where q2 = (select greatest(t1.q1,t2.q2)) - and (select v.id=0)) offset 0) ss2) ss - where t1.q1 = ss.q2) ss0; - id | q1 | q2 | q1 | q2 -----+------------------+-------------------+------------------+------------------ - 0 | 4567890123456789 | 123 | 4567890123456789 | 4567890123456789 - 0 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 0 | 4567890123456789 | -4567890123456789 | 4567890123456789 | 4567890123456789 -(3 rows) - --- test some error cases where LATERAL should have been used but wasn't -select f1,g from int4_tbl a, (select f1 as g) ss; -ERROR: column "f1" does not exist -LINE 1: select f1,g from int4_tbl a, (select f1 as g) ss; - ^ -HINT: There is a column named "f1" in table "a", but it cannot be referenced from this part of the query. -select f1,g from int4_tbl a, (select a.f1 as g) ss; -ERROR: invalid reference to FROM-clause entry for table "a" -LINE 1: select f1,g from int4_tbl a, (select a.f1 as g) ss; - ^ -HINT: There is an entry for table "a", but it cannot be referenced from this part of the query. -select f1,g from int4_tbl a cross join (select f1 as g) ss; -ERROR: column "f1" does not exist -LINE 1: select f1,g from int4_tbl a cross join (select f1 as g) ss; - ^ -HINT: There is a column named "f1" in table "a", but it cannot be referenced from this part of the query. -select f1,g from int4_tbl a cross join (select a.f1 as g) ss; -ERROR: invalid reference to FROM-clause entry for table "a" -LINE 1: select f1,g from int4_tbl a cross join (select a.f1 as g) ss... - ^ -HINT: There is an entry for table "a", but it cannot be referenced from this part of the query. --- SQL:2008 says the left table is in scope but illegal to access here -select f1,g from int4_tbl a right join lateral generate_series(0, a.f1) g on true; -ERROR: invalid reference to FROM-clause entry for table "a" -LINE 1: ... int4_tbl a right join lateral generate_series(0, a.f1) g on... - ^ -DETAIL: The combining JOIN type must be INNER or LEFT for a LATERAL reference. -select f1,g from int4_tbl a full join lateral generate_series(0, a.f1) g on true; -ERROR: invalid reference to FROM-clause entry for table "a" -LINE 1: ...m int4_tbl a full join lateral generate_series(0, a.f1) g on... - ^ -DETAIL: The combining JOIN type must be INNER or LEFT for a LATERAL reference. --- check we complain about ambiguous table references -select * from - int8_tbl x cross join (int4_tbl x cross join lateral (select x.f1) ss); -ERROR: table reference "x" is ambiguous -LINE 2: ...cross join (int4_tbl x cross join lateral (select x.f1) ss); - ^ --- LATERAL can be used to put an aggregate into the FROM clause of its query -select 1 from tenk1 a, lateral (select max(a.unique1) from int4_tbl b) ss; -ERROR: aggregate functions are not allowed in FROM clause of their own query level -LINE 1: select 1 from tenk1 a, lateral (select max(a.unique1) from i... - ^ --- check behavior of LATERAL in UPDATE/DELETE -create temp table xx1 as select f1 as x1, -f1 as x2 from int4_tbl; --- error, can't do this: -update xx1 set x2 = f1 from (select * from int4_tbl where f1 = x1) ss; -ERROR: column "x1" does not exist -LINE 1: ... set x2 = f1 from (select * from int4_tbl where f1 = x1) ss; - ^ -HINT: There is a column named "x1" in table "xx1", but it cannot be referenced from this part of the query. -update xx1 set x2 = f1 from (select * from int4_tbl where f1 = xx1.x1) ss; -ERROR: invalid reference to FROM-clause entry for table "xx1" -LINE 1: ...t x2 = f1 from (select * from int4_tbl where f1 = xx1.x1) ss... - ^ -HINT: There is an entry for table "xx1", but it cannot be referenced from this part of the query. --- can't do it even with LATERAL: -update xx1 set x2 = f1 from lateral (select * from int4_tbl where f1 = x1) ss; -ERROR: invalid reference to FROM-clause entry for table "xx1" -LINE 1: ...= f1 from lateral (select * from int4_tbl where f1 = x1) ss; - ^ -HINT: There is an entry for table "xx1", but it cannot be referenced from this part of the query. --- we might in future allow something like this, but for now it's an error: -update xx1 set x2 = f1 from xx1, lateral (select * from int4_tbl where f1 = x1) ss; -ERROR: table name "xx1" specified more than once --- also errors: -delete from xx1 using (select * from int4_tbl where f1 = x1) ss; -ERROR: column "x1" does not exist -LINE 1: ...te from xx1 using (select * from int4_tbl where f1 = x1) ss; - ^ -HINT: There is a column named "x1" in table "xx1", but it cannot be referenced from this part of the query. -delete from xx1 using (select * from int4_tbl where f1 = xx1.x1) ss; -ERROR: invalid reference to FROM-clause entry for table "xx1" -LINE 1: ...from xx1 using (select * from int4_tbl where f1 = xx1.x1) ss... - ^ -HINT: There is an entry for table "xx1", but it cannot be referenced from this part of the query. -delete from xx1 using lateral (select * from int4_tbl where f1 = x1) ss; -ERROR: invalid reference to FROM-clause entry for table "xx1" -LINE 1: ...xx1 using lateral (select * from int4_tbl where f1 = x1) ss; - ^ -HINT: There is an entry for table "xx1", but it cannot be referenced from this part of the query. --- --- test LATERAL reference propagation down a multi-level inheritance hierarchy --- produced for a multi-level partitioned table hierarchy. --- -create table join_pt1 (a int, b int, c varchar) partition by range(a); -create table join_pt1p1 partition of join_pt1 for values from (0) to (100) partition by range(b); -create table join_pt1p2 partition of join_pt1 for values from (100) to (200); -create table join_pt1p1p1 partition of join_pt1p1 for values from (0) to (100); -insert into join_pt1 values (1, 1, 'x'), (101, 101, 'y'); -create table join_ut1 (a int, b int, c varchar); -insert into join_ut1 values (101, 101, 'y'), (2, 2, 'z'); -explain (verbose, costs off) -select t1.b, ss.phv from join_ut1 t1 left join lateral - (select t2.a as t2a, t3.a t3a, least(t1.a, t2.a, t3.a) phv - from join_pt1 t2 join join_ut1 t3 on t2.a = t3.b) ss - on t1.a = ss.t2a order by t1.a; - QUERY PLAN --------------------------------------------------------------------- - Sort - Output: t1.b, (LEAST(t1.a, t2.a, t3.a)), t1.a - Sort Key: t1.a - -> Nested Loop Left Join - Output: t1.b, (LEAST(t1.a, t2.a, t3.a)), t1.a - -> Seq Scan on public.join_ut1 t1 - Output: t1.a, t1.b, t1.c - -> Hash Join - Output: t2.a, LEAST(t1.a, t2.a, t3.a) - Hash Cond: (t3.b = t2.a) - -> Seq Scan on public.join_ut1 t3 - Output: t3.a, t3.b, t3.c - -> Hash - Output: t2.a - -> Append - -> Seq Scan on public.join_pt1p1p1 t2_1 - Output: t2_1.a - Filter: (t1.a = t2_1.a) - -> Seq Scan on public.join_pt1p2 t2_2 - Output: t2_2.a - Filter: (t1.a = t2_2.a) -(21 rows) - -select t1.b, ss.phv from join_ut1 t1 left join lateral - (select t2.a as t2a, t3.a t3a, least(t1.a, t2.a, t3.a) phv - from join_pt1 t2 join join_ut1 t3 on t2.a = t3.b) ss - on t1.a = ss.t2a order by t1.a; - b | phv ------+----- - 2 | - 101 | 101 -(2 rows) - -drop table join_pt1; -drop table join_ut1; --- --- test estimation behavior with multi-column foreign key and constant qual --- -begin; -create table fkest (x integer, x10 integer, x10b integer, x100 integer); -insert into fkest select x, x/10, x/10, x/100 from generate_series(1,1000) x; -create unique index on fkest(x, x10, x100); -analyze fkest; -explain (costs off) -select * from fkest f1 - join fkest f2 on (f1.x = f2.x and f1.x10 = f2.x10b and f1.x100 = f2.x100) - join fkest f3 on f1.x = f3.x - where f1.x100 = 2; - QUERY PLAN ------------------------------------------------------------ - Nested Loop - -> Hash Join - Hash Cond: ((f2.x = f1.x) AND (f2.x10b = f1.x10)) - -> Seq Scan on fkest f2 - Filter: (x100 = 2) - -> Hash - -> Seq Scan on fkest f1 - Filter: (x100 = 2) - -> Index Scan using fkest_x_x10_x100_idx on fkest f3 - Index Cond: (x = f1.x) -(10 rows) - -alter table fkest add constraint fk - foreign key (x, x10b, x100) references fkest (x, x10, x100); -explain (costs off) -select * from fkest f1 - join fkest f2 on (f1.x = f2.x and f1.x10 = f2.x10b and f1.x100 = f2.x100) - join fkest f3 on f1.x = f3.x - where f1.x100 = 2; - QUERY PLAN ------------------------------------------------------ - Hash Join - Hash Cond: ((f2.x = f1.x) AND (f2.x10b = f1.x10)) - -> Hash Join - Hash Cond: (f3.x = f2.x) - -> Seq Scan on fkest f3 - -> Hash - -> Seq Scan on fkest f2 - Filter: (x100 = 2) - -> Hash - -> Seq Scan on fkest f1 - Filter: (x100 = 2) -(11 rows) - -rollback; --- --- test that foreign key join estimation performs sanely for outer joins --- -begin; -create table fkest (a int, b int, c int unique, primary key(a,b)); -create table fkest1 (a int, b int, primary key(a,b)); -insert into fkest select x/10, x%10, x from generate_series(1,1000) x; -insert into fkest1 select x/10, x%10 from generate_series(1,1000) x; -alter table fkest1 - add constraint fkest1_a_b_fkey foreign key (a,b) references fkest; -analyze fkest; -analyze fkest1; -explain (costs off) -select * -from fkest f - left join fkest1 f1 on f.a = f1.a and f.b = f1.b - left join fkest1 f2 on f.a = f2.a and f.b = f2.b - left join fkest1 f3 on f.a = f3.a and f.b = f3.b -where f.c = 1; - QUERY PLAN ------------------------------------------------------------------- - Nested Loop Left Join - -> Nested Loop Left Join - -> Nested Loop Left Join - -> Index Scan using fkest_c_key on fkest f - Index Cond: (c = 1) - -> Index Only Scan using fkest1_pkey on fkest1 f1 - Index Cond: ((a = f.a) AND (b = f.b)) - -> Index Only Scan using fkest1_pkey on fkest1 f2 - Index Cond: ((a = f.a) AND (b = f.b)) - -> Index Only Scan using fkest1_pkey on fkest1 f3 - Index Cond: ((a = f.a) AND (b = f.b)) -(11 rows) - -rollback; --- --- test planner's ability to mark joins as unique --- -create table j1 (id int primary key); -create table j2 (id int primary key); -create table j3 (id int); -insert into j1 values(1),(2),(3); -insert into j2 values(1),(2),(3); -insert into j3 values(1),(1); -analyze j1; -analyze j2; -analyze j3; --- ensure join is properly marked as unique -explain (verbose, costs off) -select * from j1 inner join j2 on j1.id = j2.id; - QUERY PLAN ------------------------------------ - Hash Join - Output: j1.id, j2.id - Inner Unique: true - Hash Cond: (j1.id = j2.id) - -> Seq Scan on public.j1 - Output: j1.id - -> Hash - Output: j2.id - -> Seq Scan on public.j2 - Output: j2.id -(10 rows) - --- ensure join is not unique when not an equi-join -explain (verbose, costs off) -select * from j1 inner join j2 on j1.id > j2.id; - QUERY PLAN ------------------------------------ - Nested Loop - Output: j1.id, j2.id - Join Filter: (j1.id > j2.id) - -> Seq Scan on public.j1 - Output: j1.id - -> Materialize - Output: j2.id - -> Seq Scan on public.j2 - Output: j2.id -(9 rows) - --- ensure non-unique rel is not chosen as inner -explain (verbose, costs off) -select * from j1 inner join j3 on j1.id = j3.id; - QUERY PLAN ------------------------------------ - Hash Join - Output: j1.id, j3.id - Inner Unique: true - Hash Cond: (j3.id = j1.id) - -> Seq Scan on public.j3 - Output: j3.id - -> Hash - Output: j1.id - -> Seq Scan on public.j1 - Output: j1.id -(10 rows) - --- ensure left join is marked as unique -explain (verbose, costs off) -select * from j1 left join j2 on j1.id = j2.id; - QUERY PLAN ------------------------------------ - Hash Left Join - Output: j1.id, j2.id - Inner Unique: true - Hash Cond: (j1.id = j2.id) - -> Seq Scan on public.j1 - Output: j1.id - -> Hash - Output: j2.id - -> Seq Scan on public.j2 - Output: j2.id -(10 rows) - --- ensure right join is marked as unique -explain (verbose, costs off) -select * from j1 right join j2 on j1.id = j2.id; - QUERY PLAN ------------------------------------ - Hash Left Join - Output: j1.id, j2.id - Inner Unique: true - Hash Cond: (j2.id = j1.id) - -> Seq Scan on public.j2 - Output: j2.id - -> Hash - Output: j1.id - -> Seq Scan on public.j1 - Output: j1.id -(10 rows) - --- ensure full join is marked as unique -explain (verbose, costs off) -select * from j1 full join j2 on j1.id = j2.id; - QUERY PLAN ------------------------------------ - Hash Full Join - Output: j1.id, j2.id - Inner Unique: true - Hash Cond: (j1.id = j2.id) - -> Seq Scan on public.j1 - Output: j1.id - -> Hash - Output: j2.id - -> Seq Scan on public.j2 - Output: j2.id -(10 rows) - --- a clauseless (cross) join can't be unique -explain (verbose, costs off) -select * from j1 cross join j2; - QUERY PLAN ------------------------------------ - Nested Loop - Output: j1.id, j2.id - -> Seq Scan on public.j1 - Output: j1.id - -> Materialize - Output: j2.id - -> Seq Scan on public.j2 - Output: j2.id -(8 rows) - --- ensure a natural join is marked as unique -explain (verbose, costs off) -select * from j1 natural join j2; - QUERY PLAN ------------------------------------ - Hash Join - Output: j1.id - Inner Unique: true - Hash Cond: (j1.id = j2.id) - -> Seq Scan on public.j1 - Output: j1.id - -> Hash - Output: j2.id - -> Seq Scan on public.j2 - Output: j2.id -(10 rows) - --- ensure a distinct clause allows the inner to become unique -explain (verbose, costs off) -select * from j1 -inner join (select distinct id from j3) j3 on j1.id = j3.id; - QUERY PLAN ------------------------------------------ - Nested Loop - Output: j1.id, j3.id - Inner Unique: true - Join Filter: (j1.id = j3.id) - -> Unique - Output: j3.id - -> Sort - Output: j3.id - Sort Key: j3.id - -> Seq Scan on public.j3 - Output: j3.id - -> Seq Scan on public.j1 - Output: j1.id -(13 rows) - --- ensure group by clause allows the inner to become unique -explain (verbose, costs off) -select * from j1 -inner join (select id from j3 group by id) j3 on j1.id = j3.id; - QUERY PLAN ------------------------------------------ - Nested Loop - Output: j1.id, j3.id - Inner Unique: true - Join Filter: (j1.id = j3.id) - -> Group - Output: j3.id - Group Key: j3.id - -> Sort - Output: j3.id - Sort Key: j3.id - -> Seq Scan on public.j3 - Output: j3.id - -> Seq Scan on public.j1 - Output: j1.id -(14 rows) - -drop table j1; -drop table j2; -drop table j3; --- test more complex permutations of unique joins -create table j1 (id1 int, id2 int, primary key(id1,id2)); -create table j2 (id1 int, id2 int, primary key(id1,id2)); -create table j3 (id1 int, id2 int, primary key(id1,id2)); -insert into j1 values(1,1),(1,2); -insert into j2 values(1,1); -insert into j3 values(1,1); -analyze j1; -analyze j2; -analyze j3; --- ensure there's no unique join when not all columns which are part of the --- unique index are seen in the join clause -explain (verbose, costs off) -select * from j1 -inner join j2 on j1.id1 = j2.id1; - QUERY PLAN ------------------------------------------- - Nested Loop - Output: j1.id1, j1.id2, j2.id1, j2.id2 - Join Filter: (j1.id1 = j2.id1) - -> Seq Scan on public.j2 - Output: j2.id1, j2.id2 - -> Seq Scan on public.j1 - Output: j1.id1, j1.id2 -(7 rows) - --- ensure proper unique detection with multiple join quals -explain (verbose, costs off) -select * from j1 -inner join j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2; - QUERY PLAN ----------------------------------------------------------- - Nested Loop - Output: j1.id1, j1.id2, j2.id1, j2.id2 - Inner Unique: true - Join Filter: ((j1.id1 = j2.id1) AND (j1.id2 = j2.id2)) - -> Seq Scan on public.j2 - Output: j2.id1, j2.id2 - -> Seq Scan on public.j1 - Output: j1.id1, j1.id2 -(8 rows) - --- ensure we don't detect the join to be unique when quals are not part of the --- join condition -explain (verbose, costs off) -select * from j1 -inner join j2 on j1.id1 = j2.id1 where j1.id2 = 1; - QUERY PLAN ------------------------------------------- - Nested Loop - Output: j1.id1, j1.id2, j2.id1, j2.id2 - Join Filter: (j1.id1 = j2.id1) - -> Seq Scan on public.j1 - Output: j1.id1, j1.id2 - Filter: (j1.id2 = 1) - -> Seq Scan on public.j2 - Output: j2.id1, j2.id2 -(8 rows) - --- as above, but for left joins. -explain (verbose, costs off) -select * from j1 -left join j2 on j1.id1 = j2.id1 where j1.id2 = 1; - QUERY PLAN ------------------------------------------- - Nested Loop Left Join - Output: j1.id1, j1.id2, j2.id1, j2.id2 - Join Filter: (j1.id1 = j2.id1) - -> Seq Scan on public.j1 - Output: j1.id1, j1.id2 - Filter: (j1.id2 = 1) - -> Seq Scan on public.j2 - Output: j2.id1, j2.id2 -(8 rows) - --- validate logic in merge joins which skips mark and restore. --- it should only do this if all quals which were used to detect the unique --- are present as join quals, and not plain quals. -set enable_nestloop to 0; -set enable_hashjoin to 0; -set enable_sort to 0; --- create indexes that will be preferred over the PKs to perform the join -create index j1_id1_idx on j1 (id1) where id1 % 1000 = 1; -create index j2_id1_idx on j2 (id1) where id1 % 1000 = 1; --- need an additional row in j2, if we want j2_id1_idx to be preferred -insert into j2 values(1,2); -analyze j2; -explain (costs off) select * from j1 -inner join j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 -where j1.id1 % 1000 = 1 and j2.id1 % 1000 = 1; - QUERY PLAN ------------------------------------------ - Merge Join - Merge Cond: (j1.id1 = j2.id1) - Join Filter: (j1.id2 = j2.id2) - -> Index Scan using j1_id1_idx on j1 - -> Index Scan using j2_id1_idx on j2 -(5 rows) - -select * from j1 -inner join j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 -where j1.id1 % 1000 = 1 and j2.id1 % 1000 = 1; - id1 | id2 | id1 | id2 ------+-----+-----+----- - 1 | 1 | 1 | 1 - 1 | 2 | 1 | 2 -(2 rows) - --- Exercise array keys mark/restore B-Tree code -explain (costs off) select * from j1 -inner join j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 -where j1.id1 % 1000 = 1 and j2.id1 % 1000 = 1 and j2.id1 = any (array[1]); - QUERY PLAN ----------------------------------------------------- - Merge Join - Merge Cond: (j1.id1 = j2.id1) - Join Filter: (j1.id2 = j2.id2) - -> Index Scan using j1_id1_idx on j1 - -> Index Scan using j2_id1_idx on j2 - Index Cond: (id1 = ANY ('{1}'::integer[])) -(6 rows) - -select * from j1 -inner join j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 -where j1.id1 % 1000 = 1 and j2.id1 % 1000 = 1 and j2.id1 = any (array[1]); - id1 | id2 | id1 | id2 ------+-----+-----+----- - 1 | 1 | 1 | 1 - 1 | 2 | 1 | 2 -(2 rows) - --- Exercise array keys "find extreme element" B-Tree code -explain (costs off) select * from j1 -inner join j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 -where j1.id1 % 1000 = 1 and j2.id1 % 1000 = 1 and j2.id1 >= any (array[1,5]); - QUERY PLAN -------------------------------------------------------- - Merge Join - Merge Cond: (j1.id1 = j2.id1) - Join Filter: (j1.id2 = j2.id2) - -> Index Scan using j1_id1_idx on j1 - -> Index Only Scan using j2_pkey on j2 - Index Cond: (id1 >= ANY ('{1,5}'::integer[])) - Filter: ((id1 % 1000) = 1) -(7 rows) - -select * from j1 -inner join j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 -where j1.id1 % 1000 = 1 and j2.id1 % 1000 = 1 and j2.id1 >= any (array[1,5]); - id1 | id2 | id1 | id2 ------+-----+-----+----- - 1 | 1 | 1 | 1 - 1 | 2 | 1 | 2 -(2 rows) - -reset enable_nestloop; -reset enable_hashjoin; -reset enable_sort; -drop table j1; -drop table j2; -drop table j3; --- check that semijoin inner is not seen as unique for a portion of the outerrel -explain (verbose, costs off) -select t1.unique1, t2.hundred -from onek t1, tenk1 t2 -where exists (select 1 from tenk1 t3 - where t3.thousand = t1.unique1 and t3.tenthous = t2.hundred) - and t1.unique1 < 1; - QUERY PLAN ---------------------------------------------------------------------------------- - Nested Loop - Output: t1.unique1, t2.hundred - -> Hash Join - Output: t1.unique1, t3.tenthous - Hash Cond: (t3.thousand = t1.unique1) - -> HashAggregate - Output: t3.thousand, t3.tenthous - Group Key: t3.thousand, t3.tenthous - -> Index Only Scan using tenk1_thous_tenthous on public.tenk1 t3 - Output: t3.thousand, t3.tenthous - -> Hash - Output: t1.unique1 - -> Index Only Scan using onek_unique1 on public.onek t1 - Output: t1.unique1 - Index Cond: (t1.unique1 < 1) - -> Index Only Scan using tenk1_hundred on public.tenk1 t2 - Output: t2.hundred - Index Cond: (t2.hundred = t3.tenthous) -(18 rows) - --- ... unless it actually is unique -create table j3 as select unique1, tenthous from onek; -vacuum analyze j3; -create unique index on j3(unique1, tenthous); -explain (verbose, costs off) -select t1.unique1, t2.hundred -from onek t1, tenk1 t2 -where exists (select 1 from j3 - where j3.unique1 = t1.unique1 and j3.tenthous = t2.hundred) - and t1.unique1 < 1; - QUERY PLAN ------------------------------------------------------------------------- - Nested Loop - Output: t1.unique1, t2.hundred - -> Nested Loop - Output: t1.unique1, j3.tenthous - -> Index Only Scan using onek_unique1 on public.onek t1 - Output: t1.unique1 - Index Cond: (t1.unique1 < 1) - -> Index Only Scan using j3_unique1_tenthous_idx on public.j3 - Output: j3.unique1, j3.tenthous - Index Cond: (j3.unique1 = t1.unique1) - -> Index Only Scan using tenk1_hundred on public.tenk1 t2 - Output: t2.hundred - Index Cond: (t2.hundred = j3.tenthous) -(13 rows) - -drop table j3; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/aggregates.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/aggregates.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/aggregates.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/aggregates.out 2023-02-20 19:45:46.279211041 -0500 @@ -1,2815 +1 @@ --- --- AGGREGATES --- --- avoid bit-exact output here because operations may not be bit-exact. -SET extra_float_digits = 0; -SELECT avg(four) AS avg_1 FROM onek; - avg_1 --------------------- - 1.5000000000000000 -(1 row) - -SELECT avg(a) AS avg_32 FROM aggtest WHERE a < 100; - avg_32 ---------------------- - 32.6666666666666667 -(1 row) - --- In 7.1, avg(float4) is computed using float8 arithmetic. --- Round the result to 3 digits to avoid platform-specific results. -SELECT avg(b)::numeric(10,3) AS avg_107_943 FROM aggtest; - avg_107_943 -------------- - 107.943 -(1 row) - -SELECT avg(gpa) AS avg_3_4 FROM ONLY student; - avg_3_4 ---------- - 3.4 -(1 row) - -SELECT sum(four) AS sum_1500 FROM onek; - sum_1500 ----------- - 1500 -(1 row) - -SELECT sum(a) AS sum_198 FROM aggtest; - sum_198 ---------- - 198 -(1 row) - -SELECT sum(b) AS avg_431_773 FROM aggtest; - avg_431_773 -------------- - 431.773 -(1 row) - -SELECT sum(gpa) AS avg_6_8 FROM ONLY student; - avg_6_8 ---------- - 6.8 -(1 row) - -SELECT max(four) AS max_3 FROM onek; - max_3 -------- - 3 -(1 row) - -SELECT max(a) AS max_100 FROM aggtest; - max_100 ---------- - 100 -(1 row) - -SELECT max(aggtest.b) AS max_324_78 FROM aggtest; - max_324_78 ------------- - 324.78 -(1 row) - -SELECT max(student.gpa) AS max_3_7 FROM student; - max_3_7 ---------- - 3.7 -(1 row) - -SELECT stddev_pop(b) FROM aggtest; - stddev_pop ------------------ - 131.10703231895 -(1 row) - -SELECT stddev_samp(b) FROM aggtest; - stddev_samp ------------------- - 151.389360803998 -(1 row) - -SELECT var_pop(b) FROM aggtest; - var_pop ------------------- - 17189.0539234823 -(1 row) - -SELECT var_samp(b) FROM aggtest; - var_samp ------------------- - 22918.7385646431 -(1 row) - -SELECT stddev_pop(b::numeric) FROM aggtest; - stddev_pop ------------------- - 131.107032862199 -(1 row) - -SELECT stddev_samp(b::numeric) FROM aggtest; - stddev_samp ------------------- - 151.389361431288 -(1 row) - -SELECT var_pop(b::numeric) FROM aggtest; - var_pop --------------------- - 17189.054065929769 -(1 row) - -SELECT var_samp(b::numeric) FROM aggtest; - var_samp --------------------- - 22918.738754573025 -(1 row) - --- population variance is defined for a single tuple, sample variance --- is not -SELECT var_pop(1.0::float8), var_samp(2.0::float8); - var_pop | var_samp ----------+---------- - 0 | -(1 row) - -SELECT stddev_pop(3.0::float8), stddev_samp(4.0::float8); - stddev_pop | stddev_samp -------------+------------- - 0 | -(1 row) - -SELECT var_pop('inf'::float8), var_samp('inf'::float8); - var_pop | var_samp ----------+---------- - NaN | -(1 row) - -SELECT stddev_pop('inf'::float8), stddev_samp('inf'::float8); - stddev_pop | stddev_samp -------------+------------- - NaN | -(1 row) - -SELECT var_pop('nan'::float8), var_samp('nan'::float8); - var_pop | var_samp ----------+---------- - NaN | -(1 row) - -SELECT stddev_pop('nan'::float8), stddev_samp('nan'::float8); - stddev_pop | stddev_samp -------------+------------- - NaN | -(1 row) - -SELECT var_pop(1.0::float4), var_samp(2.0::float4); - var_pop | var_samp ----------+---------- - 0 | -(1 row) - -SELECT stddev_pop(3.0::float4), stddev_samp(4.0::float4); - stddev_pop | stddev_samp -------------+------------- - 0 | -(1 row) - -SELECT var_pop('inf'::float4), var_samp('inf'::float4); - var_pop | var_samp ----------+---------- - NaN | -(1 row) - -SELECT stddev_pop('inf'::float4), stddev_samp('inf'::float4); - stddev_pop | stddev_samp -------------+------------- - NaN | -(1 row) - -SELECT var_pop('nan'::float4), var_samp('nan'::float4); - var_pop | var_samp ----------+---------- - NaN | -(1 row) - -SELECT stddev_pop('nan'::float4), stddev_samp('nan'::float4); - stddev_pop | stddev_samp -------------+------------- - NaN | -(1 row) - -SELECT var_pop(1.0::numeric), var_samp(2.0::numeric); - var_pop | var_samp ----------+---------- - 0 | -(1 row) - -SELECT stddev_pop(3.0::numeric), stddev_samp(4.0::numeric); - stddev_pop | stddev_samp -------------+------------- - 0 | -(1 row) - -SELECT var_pop('inf'::numeric), var_samp('inf'::numeric); - var_pop | var_samp ----------+---------- - NaN | -(1 row) - -SELECT stddev_pop('inf'::numeric), stddev_samp('inf'::numeric); - stddev_pop | stddev_samp -------------+------------- - NaN | -(1 row) - -SELECT var_pop('nan'::numeric), var_samp('nan'::numeric); - var_pop | var_samp ----------+---------- - NaN | -(1 row) - -SELECT stddev_pop('nan'::numeric), stddev_samp('nan'::numeric); - stddev_pop | stddev_samp -------------+------------- - NaN | -(1 row) - --- verify correct results for null and NaN inputs -select sum(null::int4) from generate_series(1,3); - sum ------ - -(1 row) - -select sum(null::int8) from generate_series(1,3); - sum ------ - -(1 row) - -select sum(null::numeric) from generate_series(1,3); - sum ------ - -(1 row) - -select sum(null::float8) from generate_series(1,3); - sum ------ - -(1 row) - -select avg(null::int4) from generate_series(1,3); - avg ------ - -(1 row) - -select avg(null::int8) from generate_series(1,3); - avg ------ - -(1 row) - -select avg(null::numeric) from generate_series(1,3); - avg ------ - -(1 row) - -select avg(null::float8) from generate_series(1,3); - avg ------ - -(1 row) - -select sum('NaN'::numeric) from generate_series(1,3); - sum ------ - NaN -(1 row) - -select avg('NaN'::numeric) from generate_series(1,3); - avg ------ - NaN -(1 row) - --- verify correct results for infinite inputs -SELECT sum(x::float8), avg(x::float8), var_pop(x::float8) -FROM (VALUES ('1'), ('infinity')) v(x); - sum | avg | var_pop -----------+----------+--------- - Infinity | Infinity | NaN -(1 row) - -SELECT sum(x::float8), avg(x::float8), var_pop(x::float8) -FROM (VALUES ('infinity'), ('1')) v(x); - sum | avg | var_pop -----------+----------+--------- - Infinity | Infinity | NaN -(1 row) - -SELECT sum(x::float8), avg(x::float8), var_pop(x::float8) -FROM (VALUES ('infinity'), ('infinity')) v(x); - sum | avg | var_pop -----------+----------+--------- - Infinity | Infinity | NaN -(1 row) - -SELECT sum(x::float8), avg(x::float8), var_pop(x::float8) -FROM (VALUES ('-infinity'), ('infinity')) v(x); - sum | avg | var_pop ------+-----+--------- - NaN | NaN | NaN -(1 row) - -SELECT sum(x::float8), avg(x::float8), var_pop(x::float8) -FROM (VALUES ('-infinity'), ('-infinity')) v(x); - sum | avg | var_pop ------------+-----------+--------- - -Infinity | -Infinity | NaN -(1 row) - -SELECT sum(x::numeric), avg(x::numeric), var_pop(x::numeric) -FROM (VALUES ('1'), ('infinity')) v(x); - sum | avg | var_pop -----------+----------+--------- - Infinity | Infinity | NaN -(1 row) - -SELECT sum(x::numeric), avg(x::numeric), var_pop(x::numeric) -FROM (VALUES ('infinity'), ('1')) v(x); - sum | avg | var_pop -----------+----------+--------- - Infinity | Infinity | NaN -(1 row) - -SELECT sum(x::numeric), avg(x::numeric), var_pop(x::numeric) -FROM (VALUES ('infinity'), ('infinity')) v(x); - sum | avg | var_pop -----------+----------+--------- - Infinity | Infinity | NaN -(1 row) - -SELECT sum(x::numeric), avg(x::numeric), var_pop(x::numeric) -FROM (VALUES ('-infinity'), ('infinity')) v(x); - sum | avg | var_pop ------+-----+--------- - NaN | NaN | NaN -(1 row) - -SELECT sum(x::numeric), avg(x::numeric), var_pop(x::numeric) -FROM (VALUES ('-infinity'), ('-infinity')) v(x); - sum | avg | var_pop ------------+-----------+--------- - -Infinity | -Infinity | NaN -(1 row) - --- test accuracy with a large input offset -SELECT avg(x::float8), var_pop(x::float8) -FROM (VALUES (100000003), (100000004), (100000006), (100000007)) v(x); - avg | var_pop ------------+--------- - 100000005 | 2.5 -(1 row) - -SELECT avg(x::float8), var_pop(x::float8) -FROM (VALUES (7000000000005), (7000000000007)) v(x); - avg | var_pop ----------------+--------- - 7000000000006 | 1 -(1 row) - --- SQL2003 binary aggregates -SELECT regr_count(b, a) FROM aggtest; - regr_count ------------- - 4 -(1 row) - -SELECT regr_sxx(b, a) FROM aggtest; - regr_sxx ----------- - 5099 -(1 row) - -SELECT regr_syy(b, a) FROM aggtest; - regr_syy ------------------- - 68756.2156939293 -(1 row) - -SELECT regr_sxy(b, a) FROM aggtest; - regr_sxy ------------------- - 2614.51582155004 -(1 row) - -SELECT regr_avgx(b, a), regr_avgy(b, a) FROM aggtest; - regr_avgx | regr_avgy ------------+------------------ - 49.5 | 107.943152273074 -(1 row) - -SELECT regr_r2(b, a) FROM aggtest; - regr_r2 --------------------- - 0.0194977982031803 -(1 row) - -SELECT regr_slope(b, a), regr_intercept(b, a) FROM aggtest; - regr_slope | regr_intercept --------------------+------------------ - 0.512750700441271 | 82.5619926012309 -(1 row) - -SELECT covar_pop(b, a), covar_samp(b, a) FROM aggtest; - covar_pop | covar_samp ------------------+------------------ - 653.62895538751 | 871.505273850014 -(1 row) - -SELECT corr(b, a) FROM aggtest; - corr -------------------- - 0.139634516517873 -(1 row) - --- check single-tuple behavior -SELECT covar_pop(1::float8,2::float8), covar_samp(3::float8,4::float8); - covar_pop | covar_samp ------------+------------ - 0 | -(1 row) - -SELECT covar_pop(1::float8,'inf'::float8), covar_samp(3::float8,'inf'::float8); - covar_pop | covar_samp ------------+------------ - NaN | -(1 row) - -SELECT covar_pop(1::float8,'nan'::float8), covar_samp(3::float8,'nan'::float8); - covar_pop | covar_samp ------------+------------ - NaN | -(1 row) - --- test accum and combine functions directly -CREATE TABLE regr_test (x float8, y float8); -INSERT INTO regr_test VALUES (10,150),(20,250),(30,350),(80,540),(100,200); -SELECT count(*), sum(x), regr_sxx(y,x), sum(y),regr_syy(y,x), regr_sxy(y,x) -FROM regr_test WHERE x IN (10,20,30,80); - count | sum | regr_sxx | sum | regr_syy | regr_sxy --------+-----+----------+------+----------+---------- - 4 | 140 | 2900 | 1290 | 83075 | 15050 -(1 row) - -SELECT count(*), sum(x), regr_sxx(y,x), sum(y),regr_syy(y,x), regr_sxy(y,x) -FROM regr_test; - count | sum | regr_sxx | sum | regr_syy | regr_sxy --------+-----+----------+------+----------+---------- - 5 | 240 | 6280 | 1490 | 95080 | 8680 -(1 row) - -SELECT float8_accum('{4,140,2900}'::float8[], 100); - float8_accum --------------- - {5,240,6280} -(1 row) - -SELECT float8_regr_accum('{4,140,2900,1290,83075,15050}'::float8[], 200, 100); - float8_regr_accum ------------------------------- - {5,240,6280,1490,95080,8680} -(1 row) - -SELECT count(*), sum(x), regr_sxx(y,x), sum(y),regr_syy(y,x), regr_sxy(y,x) -FROM regr_test WHERE x IN (10,20,30); - count | sum | regr_sxx | sum | regr_syy | regr_sxy --------+-----+----------+-----+----------+---------- - 3 | 60 | 200 | 750 | 20000 | 2000 -(1 row) - -SELECT count(*), sum(x), regr_sxx(y,x), sum(y),regr_syy(y,x), regr_sxy(y,x) -FROM regr_test WHERE x IN (80,100); - count | sum | regr_sxx | sum | regr_syy | regr_sxy --------+-----+----------+-----+----------+---------- - 2 | 180 | 200 | 740 | 57800 | -3400 -(1 row) - -SELECT float8_combine('{3,60,200}'::float8[], '{0,0,0}'::float8[]); - float8_combine ----------------- - {3,60,200} -(1 row) - -SELECT float8_combine('{0,0,0}'::float8[], '{2,180,200}'::float8[]); - float8_combine ----------------- - {2,180,200} -(1 row) - -SELECT float8_combine('{3,60,200}'::float8[], '{2,180,200}'::float8[]); - float8_combine ----------------- - {5,240,6280} -(1 row) - -SELECT float8_regr_combine('{3,60,200,750,20000,2000}'::float8[], - '{0,0,0,0,0,0}'::float8[]); - float8_regr_combine ---------------------------- - {3,60,200,750,20000,2000} -(1 row) - -SELECT float8_regr_combine('{0,0,0,0,0,0}'::float8[], - '{2,180,200,740,57800,-3400}'::float8[]); - float8_regr_combine ------------------------------ - {2,180,200,740,57800,-3400} -(1 row) - -SELECT float8_regr_combine('{3,60,200,750,20000,2000}'::float8[], - '{2,180,200,740,57800,-3400}'::float8[]); - float8_regr_combine ------------------------------- - {5,240,6280,1490,95080,8680} -(1 row) - -DROP TABLE regr_test; --- test count, distinct -SELECT count(four) AS cnt_1000 FROM onek; - cnt_1000 ----------- - 1000 -(1 row) - -SELECT count(DISTINCT four) AS cnt_4 FROM onek; - cnt_4 -------- - 4 -(1 row) - -select ten, count(*), sum(four) from onek -group by ten order by ten; - ten | count | sum ------+-------+----- - 0 | 100 | 100 - 1 | 100 | 200 - 2 | 100 | 100 - 3 | 100 | 200 - 4 | 100 | 100 - 5 | 100 | 200 - 6 | 100 | 100 - 7 | 100 | 200 - 8 | 100 | 100 - 9 | 100 | 200 -(10 rows) - -select ten, count(four), sum(DISTINCT four) from onek -group by ten order by ten; - ten | count | sum ------+-------+----- - 0 | 100 | 2 - 1 | 100 | 4 - 2 | 100 | 2 - 3 | 100 | 4 - 4 | 100 | 2 - 5 | 100 | 4 - 6 | 100 | 2 - 7 | 100 | 4 - 8 | 100 | 2 - 9 | 100 | 4 -(10 rows) - --- user-defined aggregates -SELECT newavg(four) AS avg_1 FROM onek; - avg_1 --------------------- - 1.5000000000000000 -(1 row) - -SELECT newsum(four) AS sum_1500 FROM onek; - sum_1500 ----------- - 1500 -(1 row) - -SELECT newcnt(four) AS cnt_1000 FROM onek; - cnt_1000 ----------- - 1000 -(1 row) - -SELECT newcnt(*) AS cnt_1000 FROM onek; - cnt_1000 ----------- - 1000 -(1 row) - -SELECT oldcnt(*) AS cnt_1000 FROM onek; - cnt_1000 ----------- - 1000 -(1 row) - -SELECT sum2(q1,q2) FROM int8_tbl; - sum2 -------------------- - 18271560493827981 -(1 row) - --- test for outer-level aggregates --- this should work -select ten, sum(distinct four) from onek a -group by ten -having exists (select 1 from onek b where sum(distinct a.four) = b.four); - ten | sum ------+----- - 0 | 2 - 2 | 2 - 4 | 2 - 6 | 2 - 8 | 2 -(5 rows) - --- this should fail because subquery has an agg of its own in WHERE -select ten, sum(distinct four) from onek a -group by ten -having exists (select 1 from onek b - where sum(distinct a.four + b.four) = b.four); -ERROR: aggregate functions are not allowed in WHERE -LINE 4: where sum(distinct a.four + b.four) = b.four)... - ^ --- Test handling of sublinks within outer-level aggregates. --- Per bug report from Daniel Grace. -select - (select max((select i.unique2 from tenk1 i where i.unique1 = o.unique1))) -from tenk1 o; - max ------- - 9999 -(1 row) - --- Test handling of Params within aggregate arguments in hashed aggregation. --- Per bug report from Jeevan Chalke. -explain (verbose, costs off) -select s1, s2, sm -from generate_series(1, 3) s1, - lateral (select s2, sum(s1 + s2) sm - from generate_series(1, 3) s2 group by s2) ss -order by 1, 2; - QUERY PLAN ------------------------------------------------------------------- - Sort - Output: s1.s1, s2.s2, (sum((s1.s1 + s2.s2))) - Sort Key: s1.s1, s2.s2 - -> Nested Loop - Output: s1.s1, s2.s2, (sum((s1.s1 + s2.s2))) - -> Function Scan on pg_catalog.generate_series s1 - Output: s1.s1 - Function Call: generate_series(1, 3) - -> HashAggregate - Output: s2.s2, sum((s1.s1 + s2.s2)) - Group Key: s2.s2 - -> Function Scan on pg_catalog.generate_series s2 - Output: s2.s2 - Function Call: generate_series(1, 3) -(14 rows) - -select s1, s2, sm -from generate_series(1, 3) s1, - lateral (select s2, sum(s1 + s2) sm - from generate_series(1, 3) s2 group by s2) ss -order by 1, 2; - s1 | s2 | sm -----+----+---- - 1 | 1 | 2 - 1 | 2 | 3 - 1 | 3 | 4 - 2 | 1 | 3 - 2 | 2 | 4 - 2 | 3 | 5 - 3 | 1 | 4 - 3 | 2 | 5 - 3 | 3 | 6 -(9 rows) - -explain (verbose, costs off) -select array(select sum(x+y) s - from generate_series(1,3) y group by y order by s) - from generate_series(1,3) x; - QUERY PLAN -------------------------------------------------------------------- - Function Scan on pg_catalog.generate_series x - Output: (SubPlan 1) - Function Call: generate_series(1, 3) - SubPlan 1 - -> Sort - Output: (sum((x.x + y.y))), y.y - Sort Key: (sum((x.x + y.y))) - -> HashAggregate - Output: sum((x.x + y.y)), y.y - Group Key: y.y - -> Function Scan on pg_catalog.generate_series y - Output: y.y - Function Call: generate_series(1, 3) -(13 rows) - -select array(select sum(x+y) s - from generate_series(1,3) y group by y order by s) - from generate_series(1,3) x; - array ---------- - {2,3,4} - {3,4,5} - {4,5,6} -(3 rows) - --- --- test for bitwise integer aggregates --- -CREATE TEMPORARY TABLE bitwise_test( - i2 INT2, - i4 INT4, - i8 INT8, - i INTEGER, - x INT2, - y BIT(4) -); --- empty case -SELECT - BIT_AND(i2) AS "?", - BIT_OR(i4) AS "?", - BIT_XOR(i8) AS "?" -FROM bitwise_test; - ? | ? | ? ----+---+--- - | | -(1 row) - -COPY bitwise_test FROM STDIN NULL 'null'; -SELECT - BIT_AND(i2) AS "1", - BIT_AND(i4) AS "1", - BIT_AND(i8) AS "1", - BIT_AND(i) AS "?", - BIT_AND(x) AS "0", - BIT_AND(y) AS "0100", - BIT_OR(i2) AS "7", - BIT_OR(i4) AS "7", - BIT_OR(i8) AS "7", - BIT_OR(i) AS "?", - BIT_OR(x) AS "7", - BIT_OR(y) AS "1101", - BIT_XOR(i2) AS "5", - BIT_XOR(i4) AS "5", - BIT_XOR(i8) AS "5", - BIT_XOR(i) AS "?", - BIT_XOR(x) AS "7", - BIT_XOR(y) AS "1101" -FROM bitwise_test; - 1 | 1 | 1 | ? | 0 | 0100 | 7 | 7 | 7 | ? | 7 | 1101 | 5 | 5 | 5 | ? | 7 | 1101 ----+---+---+---+---+------+---+---+---+---+---+------+---+---+---+---+---+------ - 1 | 1 | 1 | 1 | 0 | 0100 | 7 | 7 | 7 | 3 | 7 | 1101 | 5 | 5 | 5 | 2 | 7 | 1101 -(1 row) - --- --- test boolean aggregates --- --- first test all possible transition and final states -SELECT - -- boolean and transitions - -- null because strict - booland_statefunc(NULL, NULL) IS NULL AS "t", - booland_statefunc(TRUE, NULL) IS NULL AS "t", - booland_statefunc(FALSE, NULL) IS NULL AS "t", - booland_statefunc(NULL, TRUE) IS NULL AS "t", - booland_statefunc(NULL, FALSE) IS NULL AS "t", - -- and actual computations - booland_statefunc(TRUE, TRUE) AS "t", - NOT booland_statefunc(TRUE, FALSE) AS "t", - NOT booland_statefunc(FALSE, TRUE) AS "t", - NOT booland_statefunc(FALSE, FALSE) AS "t"; - t | t | t | t | t | t | t | t | t ----+---+---+---+---+---+---+---+--- - t | t | t | t | t | t | t | t | t -(1 row) - -SELECT - -- boolean or transitions - -- null because strict - boolor_statefunc(NULL, NULL) IS NULL AS "t", - boolor_statefunc(TRUE, NULL) IS NULL AS "t", - boolor_statefunc(FALSE, NULL) IS NULL AS "t", - boolor_statefunc(NULL, TRUE) IS NULL AS "t", - boolor_statefunc(NULL, FALSE) IS NULL AS "t", - -- actual computations - boolor_statefunc(TRUE, TRUE) AS "t", - boolor_statefunc(TRUE, FALSE) AS "t", - boolor_statefunc(FALSE, TRUE) AS "t", - NOT boolor_statefunc(FALSE, FALSE) AS "t"; - t | t | t | t | t | t | t | t | t ----+---+---+---+---+---+---+---+--- - t | t | t | t | t | t | t | t | t -(1 row) - -CREATE TEMPORARY TABLE bool_test( - b1 BOOL, - b2 BOOL, - b3 BOOL, - b4 BOOL); --- empty case -SELECT - BOOL_AND(b1) AS "n", - BOOL_OR(b3) AS "n" -FROM bool_test; - n | n ----+--- - | -(1 row) - -COPY bool_test FROM STDIN NULL 'null'; -SELECT - BOOL_AND(b1) AS "f", - BOOL_AND(b2) AS "t", - BOOL_AND(b3) AS "f", - BOOL_AND(b4) AS "n", - BOOL_AND(NOT b2) AS "f", - BOOL_AND(NOT b3) AS "t" -FROM bool_test; - f | t | f | n | f | t ----+---+---+---+---+--- - f | t | f | | f | t -(1 row) - -SELECT - EVERY(b1) AS "f", - EVERY(b2) AS "t", - EVERY(b3) AS "f", - EVERY(b4) AS "n", - EVERY(NOT b2) AS "f", - EVERY(NOT b3) AS "t" -FROM bool_test; - f | t | f | n | f | t ----+---+---+---+---+--- - f | t | f | | f | t -(1 row) - -SELECT - BOOL_OR(b1) AS "t", - BOOL_OR(b2) AS "t", - BOOL_OR(b3) AS "f", - BOOL_OR(b4) AS "n", - BOOL_OR(NOT b2) AS "f", - BOOL_OR(NOT b3) AS "t" -FROM bool_test; - t | t | f | n | f | t ----+---+---+---+---+--- - t | t | f | | f | t -(1 row) - --- --- Test cases that should be optimized into indexscans instead of --- the generic aggregate implementation. --- --- Basic cases -explain (costs off) - select min(unique1) from tenk1; - QUERY PLAN ------------------------------------------------------------- - Result - InitPlan 1 (returns $0) - -> Limit - -> Index Only Scan using tenk1_unique1 on tenk1 - Index Cond: (unique1 IS NOT NULL) -(5 rows) - -select min(unique1) from tenk1; - min ------ - 0 -(1 row) - -explain (costs off) - select max(unique1) from tenk1; - QUERY PLAN ---------------------------------------------------------------------- - Result - InitPlan 1 (returns $0) - -> Limit - -> Index Only Scan Backward using tenk1_unique1 on tenk1 - Index Cond: (unique1 IS NOT NULL) -(5 rows) - -select max(unique1) from tenk1; - max ------- - 9999 -(1 row) - -explain (costs off) - select max(unique1) from tenk1 where unique1 < 42; - QUERY PLAN ------------------------------------------------------------------------- - Result - InitPlan 1 (returns $0) - -> Limit - -> Index Only Scan Backward using tenk1_unique1 on tenk1 - Index Cond: ((unique1 IS NOT NULL) AND (unique1 < 42)) -(5 rows) - -select max(unique1) from tenk1 where unique1 < 42; - max ------ - 41 -(1 row) - -explain (costs off) - select max(unique1) from tenk1 where unique1 > 42; - QUERY PLAN ------------------------------------------------------------------------- - Result - InitPlan 1 (returns $0) - -> Limit - -> Index Only Scan Backward using tenk1_unique1 on tenk1 - Index Cond: ((unique1 IS NOT NULL) AND (unique1 > 42)) -(5 rows) - -select max(unique1) from tenk1 where unique1 > 42; - max ------- - 9999 -(1 row) - --- the planner may choose a generic aggregate here if parallel query is --- enabled, since that plan will be parallel safe and the "optimized" --- plan, which has almost identical cost, will not be. we want to test --- the optimized plan, so temporarily disable parallel query. -begin; -set local max_parallel_workers_per_gather = 0; -explain (costs off) - select max(unique1) from tenk1 where unique1 > 42000; - QUERY PLAN ---------------------------------------------------------------------------- - Result - InitPlan 1 (returns $0) - -> Limit - -> Index Only Scan Backward using tenk1_unique1 on tenk1 - Index Cond: ((unique1 IS NOT NULL) AND (unique1 > 42000)) -(5 rows) - -select max(unique1) from tenk1 where unique1 > 42000; - max ------ - -(1 row) - -rollback; --- multi-column index (uses tenk1_thous_tenthous) -explain (costs off) - select max(tenthous) from tenk1 where thousand = 33; - QUERY PLAN ----------------------------------------------------------------------------- - Result - InitPlan 1 (returns $0) - -> Limit - -> Index Only Scan Backward using tenk1_thous_tenthous on tenk1 - Index Cond: ((thousand = 33) AND (tenthous IS NOT NULL)) -(5 rows) - -select max(tenthous) from tenk1 where thousand = 33; - max ------- - 9033 -(1 row) - -explain (costs off) - select min(tenthous) from tenk1 where thousand = 33; - QUERY PLAN --------------------------------------------------------------------------- - Result - InitPlan 1 (returns $0) - -> Limit - -> Index Only Scan using tenk1_thous_tenthous on tenk1 - Index Cond: ((thousand = 33) AND (tenthous IS NOT NULL)) -(5 rows) - -select min(tenthous) from tenk1 where thousand = 33; - min ------ - 33 -(1 row) - --- check parameter propagation into an indexscan subquery -explain (costs off) - select f1, (select min(unique1) from tenk1 where unique1 > f1) AS gt - from int4_tbl; - QUERY PLAN ------------------------------------------------------------------------------------------ - Seq Scan on int4_tbl - SubPlan 2 - -> Result - InitPlan 1 (returns $1) - -> Limit - -> Index Only Scan using tenk1_unique1 on tenk1 - Index Cond: ((unique1 IS NOT NULL) AND (unique1 > int4_tbl.f1)) -(7 rows) - -select f1, (select min(unique1) from tenk1 where unique1 > f1) AS gt - from int4_tbl; - f1 | gt --------------+---- - 0 | 1 - 123456 | - -123456 | 0 - 2147483647 | - -2147483647 | 0 -(5 rows) - --- check some cases that were handled incorrectly in 8.3.0 -explain (costs off) - select distinct max(unique2) from tenk1; - QUERY PLAN ---------------------------------------------------------------------- - HashAggregate - Group Key: $0 - InitPlan 1 (returns $0) - -> Limit - -> Index Only Scan Backward using tenk1_unique2 on tenk1 - Index Cond: (unique2 IS NOT NULL) - -> Result -(7 rows) - -select distinct max(unique2) from tenk1; - max ------- - 9999 -(1 row) - -explain (costs off) - select max(unique2) from tenk1 order by 1; - QUERY PLAN ---------------------------------------------------------------------- - Sort - Sort Key: ($0) - InitPlan 1 (returns $0) - -> Limit - -> Index Only Scan Backward using tenk1_unique2 on tenk1 - Index Cond: (unique2 IS NOT NULL) - -> Result -(7 rows) - -select max(unique2) from tenk1 order by 1; - max ------- - 9999 -(1 row) - -explain (costs off) - select max(unique2) from tenk1 order by max(unique2); - QUERY PLAN ---------------------------------------------------------------------- - Sort - Sort Key: ($0) - InitPlan 1 (returns $0) - -> Limit - -> Index Only Scan Backward using tenk1_unique2 on tenk1 - Index Cond: (unique2 IS NOT NULL) - -> Result -(7 rows) - -select max(unique2) from tenk1 order by max(unique2); - max ------- - 9999 -(1 row) - -explain (costs off) - select max(unique2) from tenk1 order by max(unique2)+1; - QUERY PLAN ---------------------------------------------------------------------- - Sort - Sort Key: (($0 + 1)) - InitPlan 1 (returns $0) - -> Limit - -> Index Only Scan Backward using tenk1_unique2 on tenk1 - Index Cond: (unique2 IS NOT NULL) - -> Result -(7 rows) - -select max(unique2) from tenk1 order by max(unique2)+1; - max ------- - 9999 -(1 row) - -explain (costs off) - select max(unique2), generate_series(1,3) as g from tenk1 order by g desc; - QUERY PLAN ---------------------------------------------------------------------- - Sort - Sort Key: (generate_series(1, 3)) DESC - InitPlan 1 (returns $0) - -> Limit - -> Index Only Scan Backward using tenk1_unique2 on tenk1 - Index Cond: (unique2 IS NOT NULL) - -> ProjectSet - -> Result -(8 rows) - -select max(unique2), generate_series(1,3) as g from tenk1 order by g desc; - max | g -------+--- - 9999 | 3 - 9999 | 2 - 9999 | 1 -(3 rows) - --- interesting corner case: constant gets optimized into a seqscan -explain (costs off) - select max(100) from tenk1; - QUERY PLAN ----------------------------------------------------- - Result - InitPlan 1 (returns $0) - -> Limit - -> Result - One-Time Filter: (100 IS NOT NULL) - -> Seq Scan on tenk1 -(6 rows) - -select max(100) from tenk1; - max ------ - 100 -(1 row) - --- try it on an inheritance tree -create table minmaxtest(f1 int); -create table minmaxtest1() inherits (minmaxtest); -create table minmaxtest2() inherits (minmaxtest); -create table minmaxtest3() inherits (minmaxtest); -create index minmaxtesti on minmaxtest(f1); -create index minmaxtest1i on minmaxtest1(f1); -create index minmaxtest2i on minmaxtest2(f1 desc); -create index minmaxtest3i on minmaxtest3(f1) where f1 is not null; -insert into minmaxtest values(11), (12); -insert into minmaxtest1 values(13), (14); -insert into minmaxtest2 values(15), (16); -insert into minmaxtest3 values(17), (18); -explain (costs off) - select min(f1), max(f1) from minmaxtest; - QUERY PLAN ---------------------------------------------------------------------------------------------- - Result - InitPlan 1 (returns $0) - -> Limit - -> Merge Append - Sort Key: minmaxtest.f1 - -> Index Only Scan using minmaxtesti on minmaxtest minmaxtest_1 - Index Cond: (f1 IS NOT NULL) - -> Index Only Scan using minmaxtest1i on minmaxtest1 minmaxtest_2 - Index Cond: (f1 IS NOT NULL) - -> Index Only Scan Backward using minmaxtest2i on minmaxtest2 minmaxtest_3 - Index Cond: (f1 IS NOT NULL) - -> Index Only Scan using minmaxtest3i on minmaxtest3 minmaxtest_4 - InitPlan 2 (returns $1) - -> Limit - -> Merge Append - Sort Key: minmaxtest_5.f1 DESC - -> Index Only Scan Backward using minmaxtesti on minmaxtest minmaxtest_6 - Index Cond: (f1 IS NOT NULL) - -> Index Only Scan Backward using minmaxtest1i on minmaxtest1 minmaxtest_7 - Index Cond: (f1 IS NOT NULL) - -> Index Only Scan using minmaxtest2i on minmaxtest2 minmaxtest_8 - Index Cond: (f1 IS NOT NULL) - -> Index Only Scan Backward using minmaxtest3i on minmaxtest3 minmaxtest_9 -(23 rows) - -select min(f1), max(f1) from minmaxtest; - min | max ------+----- - 11 | 18 -(1 row) - --- DISTINCT doesn't do anything useful here, but it shouldn't fail -explain (costs off) - select distinct min(f1), max(f1) from minmaxtest; - QUERY PLAN ---------------------------------------------------------------------------------------------- - Unique - InitPlan 1 (returns $0) - -> Limit - -> Merge Append - Sort Key: minmaxtest.f1 - -> Index Only Scan using minmaxtesti on minmaxtest minmaxtest_1 - Index Cond: (f1 IS NOT NULL) - -> Index Only Scan using minmaxtest1i on minmaxtest1 minmaxtest_2 - Index Cond: (f1 IS NOT NULL) - -> Index Only Scan Backward using minmaxtest2i on minmaxtest2 minmaxtest_3 - Index Cond: (f1 IS NOT NULL) - -> Index Only Scan using minmaxtest3i on minmaxtest3 minmaxtest_4 - InitPlan 2 (returns $1) - -> Limit - -> Merge Append - Sort Key: minmaxtest_5.f1 DESC - -> Index Only Scan Backward using minmaxtesti on minmaxtest minmaxtest_6 - Index Cond: (f1 IS NOT NULL) - -> Index Only Scan Backward using minmaxtest1i on minmaxtest1 minmaxtest_7 - Index Cond: (f1 IS NOT NULL) - -> Index Only Scan using minmaxtest2i on minmaxtest2 minmaxtest_8 - Index Cond: (f1 IS NOT NULL) - -> Index Only Scan Backward using minmaxtest3i on minmaxtest3 minmaxtest_9 - -> Sort - Sort Key: ($0), ($1) - -> Result -(26 rows) - -select distinct min(f1), max(f1) from minmaxtest; - min | max ------+----- - 11 | 18 -(1 row) - -drop table minmaxtest cascade; -NOTICE: drop cascades to 3 other objects -DETAIL: drop cascades to table minmaxtest1 -drop cascades to table minmaxtest2 -drop cascades to table minmaxtest3 --- check for correct detection of nested-aggregate errors -select max(min(unique1)) from tenk1; -ERROR: aggregate function calls cannot be nested -LINE 1: select max(min(unique1)) from tenk1; - ^ -select (select max(min(unique1)) from int8_tbl) from tenk1; -ERROR: aggregate function calls cannot be nested -LINE 1: select (select max(min(unique1)) from int8_tbl) from tenk1; - ^ --- --- Test removal of redundant GROUP BY columns --- -create temp table t1 (a int, b int, c int, d int, primary key (a, b)); -create temp table t2 (x int, y int, z int, primary key (x, y)); -create temp table t3 (a int, b int, c int, primary key(a, b) deferrable); --- Non-primary-key columns can be removed from GROUP BY -explain (costs off) select * from t1 group by a,b,c,d; - QUERY PLAN ----------------------- - HashAggregate - Group Key: a, b - -> Seq Scan on t1 -(3 rows) - --- No removal can happen if the complete PK is not present in GROUP BY -explain (costs off) select a,c from t1 group by a,c,d; - QUERY PLAN ----------------------- - HashAggregate - Group Key: a, c, d - -> Seq Scan on t1 -(3 rows) - --- Test removal across multiple relations -explain (costs off) select * -from t1 inner join t2 on t1.a = t2.x and t1.b = t2.y -group by t1.a,t1.b,t1.c,t1.d,t2.x,t2.y,t2.z; - QUERY PLAN ------------------------------------------------------- - HashAggregate - Group Key: t1.a, t1.b, t2.x, t2.y - -> Hash Join - Hash Cond: ((t2.x = t1.a) AND (t2.y = t1.b)) - -> Seq Scan on t2 - -> Hash - -> Seq Scan on t1 -(7 rows) - --- Test case where t1 can be optimized but not t2 -explain (costs off) select t1.*,t2.x,t2.z -from t1 inner join t2 on t1.a = t2.x and t1.b = t2.y -group by t1.a,t1.b,t1.c,t1.d,t2.x,t2.z; - QUERY PLAN ------------------------------------------------------- - HashAggregate - Group Key: t1.a, t1.b, t2.x, t2.z - -> Hash Join - Hash Cond: ((t2.x = t1.a) AND (t2.y = t1.b)) - -> Seq Scan on t2 - -> Hash - -> Seq Scan on t1 -(7 rows) - --- Cannot optimize when PK is deferrable -explain (costs off) select * from t3 group by a,b,c; - QUERY PLAN ----------------------- - HashAggregate - Group Key: a, b, c - -> Seq Scan on t3 -(3 rows) - -create temp table t1c () inherits (t1); --- Ensure we don't remove any columns when t1 has a child table -explain (costs off) select * from t1 group by a,b,c,d; - QUERY PLAN -------------------------------------- - HashAggregate - Group Key: t1.a, t1.b, t1.c, t1.d - -> Append - -> Seq Scan on t1 t1_1 - -> Seq Scan on t1c t1_2 -(5 rows) - --- Okay to remove columns if we're only querying the parent. -explain (costs off) select * from only t1 group by a,b,c,d; - QUERY PLAN ----------------------- - HashAggregate - Group Key: a, b - -> Seq Scan on t1 -(3 rows) - -create temp table p_t1 ( - a int, - b int, - c int, - d int, - primary key(a,b) -) partition by list(a); -create temp table p_t1_1 partition of p_t1 for values in(1); -create temp table p_t1_2 partition of p_t1 for values in(2); --- Ensure we can remove non-PK columns for partitioned tables. -explain (costs off) select * from p_t1 group by a,b,c,d; - QUERY PLAN --------------------------------- - HashAggregate - Group Key: p_t1.a, p_t1.b - -> Append - -> Seq Scan on p_t1_1 - -> Seq Scan on p_t1_2 -(5 rows) - -drop table t1 cascade; -NOTICE: drop cascades to table t1c -drop table t2; -drop table t3; -drop table p_t1; --- --- Test GROUP BY matching of join columns that are type-coerced due to USING --- -create temp table t1(f1 int, f2 bigint); -create temp table t2(f1 bigint, f22 bigint); -select f1 from t1 left join t2 using (f1) group by f1; - f1 ----- -(0 rows) - -select f1 from t1 left join t2 using (f1) group by t1.f1; - f1 ----- -(0 rows) - -select t1.f1 from t1 left join t2 using (f1) group by t1.f1; - f1 ----- -(0 rows) - --- only this one should fail: -select t1.f1 from t1 left join t2 using (f1) group by f1; -ERROR: column "t1.f1" must appear in the GROUP BY clause or be used in an aggregate function -LINE 1: select t1.f1 from t1 left join t2 using (f1) group by f1; - ^ -drop table t1, t2; --- --- Test combinations of DISTINCT and/or ORDER BY --- -select array_agg(a order by b) - from (values (1,4),(2,3),(3,1),(4,2)) v(a,b); - array_agg ------------ - {3,4,2,1} -(1 row) - -select array_agg(a order by a) - from (values (1,4),(2,3),(3,1),(4,2)) v(a,b); - array_agg ------------ - {1,2,3,4} -(1 row) - -select array_agg(a order by a desc) - from (values (1,4),(2,3),(3,1),(4,2)) v(a,b); - array_agg ------------ - {4,3,2,1} -(1 row) - -select array_agg(b order by a desc) - from (values (1,4),(2,3),(3,1),(4,2)) v(a,b); - array_agg ------------ - {2,1,3,4} -(1 row) - -select array_agg(distinct a) - from (values (1),(2),(1),(3),(null),(2)) v(a); - array_agg --------------- - {1,2,3,NULL} -(1 row) - -select array_agg(distinct a order by a) - from (values (1),(2),(1),(3),(null),(2)) v(a); - array_agg --------------- - {1,2,3,NULL} -(1 row) - -select array_agg(distinct a order by a desc) - from (values (1),(2),(1),(3),(null),(2)) v(a); - array_agg --------------- - {NULL,3,2,1} -(1 row) - -select array_agg(distinct a order by a desc nulls last) - from (values (1),(2),(1),(3),(null),(2)) v(a); - array_agg --------------- - {3,2,1,NULL} -(1 row) - --- multi-arg aggs, strict/nonstrict, distinct/order by -select aggfstr(a,b,c) - from (values (1,3,'foo'),(0,null,null),(2,2,'bar'),(3,1,'baz')) v(a,b,c); - aggfstr ---------------------------------------- - {"(1,3,foo)","(2,2,bar)","(3,1,baz)"} -(1 row) - -select aggfns(a,b,c) - from (values (1,3,'foo'),(0,null,null),(2,2,'bar'),(3,1,'baz')) v(a,b,c); - aggfns ------------------------------------------------ - {"(1,3,foo)","(0,,)","(2,2,bar)","(3,1,baz)"} -(1 row) - -select aggfstr(distinct a,b,c) - from (values (1,3,'foo'),(0,null,null),(2,2,'bar'),(3,1,'baz')) v(a,b,c), - generate_series(1,3) i; - aggfstr ---------------------------------------- - {"(1,3,foo)","(2,2,bar)","(3,1,baz)"} -(1 row) - -select aggfns(distinct a,b,c) - from (values (1,3,'foo'),(0,null,null),(2,2,'bar'),(3,1,'baz')) v(a,b,c), - generate_series(1,3) i; - aggfns ------------------------------------------------ - {"(0,,)","(1,3,foo)","(2,2,bar)","(3,1,baz)"} -(1 row) - -select aggfstr(distinct a,b,c order by b) - from (values (1,3,'foo'),(0,null,null),(2,2,'bar'),(3,1,'baz')) v(a,b,c), - generate_series(1,3) i; - aggfstr ---------------------------------------- - {"(3,1,baz)","(2,2,bar)","(1,3,foo)"} -(1 row) - -select aggfns(distinct a,b,c order by b) - from (values (1,3,'foo'),(0,null,null),(2,2,'bar'),(3,1,'baz')) v(a,b,c), - generate_series(1,3) i; - aggfns ------------------------------------------------ - {"(3,1,baz)","(2,2,bar)","(1,3,foo)","(0,,)"} -(1 row) - --- test specific code paths -select aggfns(distinct a,a,c order by c using ~<~,a) - from (values (1,3,'foo'),(0,null,null),(2,2,'bar'),(3,1,'baz')) v(a,b,c), - generate_series(1,2) i; - aggfns ------------------------------------------------- - {"(2,2,bar)","(3,3,baz)","(1,1,foo)","(0,0,)"} -(1 row) - -select aggfns(distinct a,a,c order by c using ~<~) - from (values (1,3,'foo'),(0,null,null),(2,2,'bar'),(3,1,'baz')) v(a,b,c), - generate_series(1,2) i; - aggfns ------------------------------------------------- - {"(2,2,bar)","(3,3,baz)","(1,1,foo)","(0,0,)"} -(1 row) - -select aggfns(distinct a,a,c order by a) - from (values (1,3,'foo'),(0,null,null),(2,2,'bar'),(3,1,'baz')) v(a,b,c), - generate_series(1,2) i; - aggfns ------------------------------------------------- - {"(0,0,)","(1,1,foo)","(2,2,bar)","(3,3,baz)"} -(1 row) - -select aggfns(distinct a,b,c order by a,c using ~<~,b) - from (values (1,3,'foo'),(0,null,null),(2,2,'bar'),(3,1,'baz')) v(a,b,c), - generate_series(1,2) i; - aggfns ------------------------------------------------ - {"(0,,)","(1,3,foo)","(2,2,bar)","(3,1,baz)"} -(1 row) - --- check node I/O via view creation and usage, also deparsing logic -create view agg_view1 as - select aggfns(a,b,c) - from (values (1,3,'foo'),(0,null,null),(2,2,'bar'),(3,1,'baz')) v(a,b,c); -select * from agg_view1; - aggfns ------------------------------------------------ - {"(1,3,foo)","(0,,)","(2,2,bar)","(3,1,baz)"} -(1 row) - -select pg_get_viewdef('agg_view1'::regclass); - pg_get_viewdef ---------------------------------------------------------------------------------------------------------------------- - SELECT aggfns(v.a, v.b, v.c) AS aggfns + - FROM ( VALUES (1,3,'foo'::text), (0,NULL::integer,NULL::text), (2,2,'bar'::text), (3,1,'baz'::text)) v(a, b, c); -(1 row) - -create or replace view agg_view1 as - select aggfns(distinct a,b,c) - from (values (1,3,'foo'),(0,null,null),(2,2,'bar'),(3,1,'baz')) v(a,b,c), - generate_series(1,3) i; -select * from agg_view1; - aggfns ------------------------------------------------ - {"(0,,)","(1,3,foo)","(2,2,bar)","(3,1,baz)"} -(1 row) - -select pg_get_viewdef('agg_view1'::regclass); - pg_get_viewdef ---------------------------------------------------------------------------------------------------------------------- - SELECT aggfns(DISTINCT v.a, v.b, v.c) AS aggfns + - FROM ( VALUES (1,3,'foo'::text), (0,NULL::integer,NULL::text), (2,2,'bar'::text), (3,1,'baz'::text)) v(a, b, c),+ - generate_series(1, 3) i(i); -(1 row) - -create or replace view agg_view1 as - select aggfns(distinct a,b,c order by b) - from (values (1,3,'foo'),(0,null,null),(2,2,'bar'),(3,1,'baz')) v(a,b,c), - generate_series(1,3) i; -select * from agg_view1; - aggfns ------------------------------------------------ - {"(3,1,baz)","(2,2,bar)","(1,3,foo)","(0,,)"} -(1 row) - -select pg_get_viewdef('agg_view1'::regclass); - pg_get_viewdef ---------------------------------------------------------------------------------------------------------------------- - SELECT aggfns(DISTINCT v.a, v.b, v.c ORDER BY v.b) AS aggfns + - FROM ( VALUES (1,3,'foo'::text), (0,NULL::integer,NULL::text), (2,2,'bar'::text), (3,1,'baz'::text)) v(a, b, c),+ - generate_series(1, 3) i(i); -(1 row) - -create or replace view agg_view1 as - select aggfns(a,b,c order by b+1) - from (values (1,3,'foo'),(0,null,null),(2,2,'bar'),(3,1,'baz')) v(a,b,c); -select * from agg_view1; - aggfns ------------------------------------------------ - {"(3,1,baz)","(2,2,bar)","(1,3,foo)","(0,,)"} -(1 row) - -select pg_get_viewdef('agg_view1'::regclass); - pg_get_viewdef ---------------------------------------------------------------------------------------------------------------------- - SELECT aggfns(v.a, v.b, v.c ORDER BY (v.b + 1)) AS aggfns + - FROM ( VALUES (1,3,'foo'::text), (0,NULL::integer,NULL::text), (2,2,'bar'::text), (3,1,'baz'::text)) v(a, b, c); -(1 row) - -create or replace view agg_view1 as - select aggfns(a,a,c order by b) - from (values (1,3,'foo'),(0,null,null),(2,2,'bar'),(3,1,'baz')) v(a,b,c); -select * from agg_view1; - aggfns ------------------------------------------------- - {"(3,3,baz)","(2,2,bar)","(1,1,foo)","(0,0,)"} -(1 row) - -select pg_get_viewdef('agg_view1'::regclass); - pg_get_viewdef ---------------------------------------------------------------------------------------------------------------------- - SELECT aggfns(v.a, v.a, v.c ORDER BY v.b) AS aggfns + - FROM ( VALUES (1,3,'foo'::text), (0,NULL::integer,NULL::text), (2,2,'bar'::text), (3,1,'baz'::text)) v(a, b, c); -(1 row) - -create or replace view agg_view1 as - select aggfns(a,b,c order by c using ~<~) - from (values (1,3,'foo'),(0,null,null),(2,2,'bar'),(3,1,'baz')) v(a,b,c); -select * from agg_view1; - aggfns ------------------------------------------------ - {"(2,2,bar)","(3,1,baz)","(1,3,foo)","(0,,)"} -(1 row) - -select pg_get_viewdef('agg_view1'::regclass); - pg_get_viewdef ---------------------------------------------------------------------------------------------------------------------- - SELECT aggfns(v.a, v.b, v.c ORDER BY v.c USING ~<~ NULLS LAST) AS aggfns + - FROM ( VALUES (1,3,'foo'::text), (0,NULL::integer,NULL::text), (2,2,'bar'::text), (3,1,'baz'::text)) v(a, b, c); -(1 row) - -create or replace view agg_view1 as - select aggfns(distinct a,b,c order by a,c using ~<~,b) - from (values (1,3,'foo'),(0,null,null),(2,2,'bar'),(3,1,'baz')) v(a,b,c), - generate_series(1,2) i; -select * from agg_view1; - aggfns ------------------------------------------------ - {"(0,,)","(1,3,foo)","(2,2,bar)","(3,1,baz)"} -(1 row) - -select pg_get_viewdef('agg_view1'::regclass); - pg_get_viewdef ---------------------------------------------------------------------------------------------------------------------- - SELECT aggfns(DISTINCT v.a, v.b, v.c ORDER BY v.a, v.c USING ~<~ NULLS LAST, v.b) AS aggfns + - FROM ( VALUES (1,3,'foo'::text), (0,NULL::integer,NULL::text), (2,2,'bar'::text), (3,1,'baz'::text)) v(a, b, c),+ - generate_series(1, 2) i(i); -(1 row) - -drop view agg_view1; --- incorrect DISTINCT usage errors -select aggfns(distinct a,b,c order by i) - from (values (1,1,'foo')) v(a,b,c), generate_series(1,2) i; -ERROR: in an aggregate with DISTINCT, ORDER BY expressions must appear in argument list -LINE 1: select aggfns(distinct a,b,c order by i) - ^ -select aggfns(distinct a,b,c order by a,b+1) - from (values (1,1,'foo')) v(a,b,c), generate_series(1,2) i; -ERROR: in an aggregate with DISTINCT, ORDER BY expressions must appear in argument list -LINE 1: select aggfns(distinct a,b,c order by a,b+1) - ^ -select aggfns(distinct a,b,c order by a,b,i,c) - from (values (1,1,'foo')) v(a,b,c), generate_series(1,2) i; -ERROR: in an aggregate with DISTINCT, ORDER BY expressions must appear in argument list -LINE 1: select aggfns(distinct a,b,c order by a,b,i,c) - ^ -select aggfns(distinct a,a,c order by a,b) - from (values (1,1,'foo')) v(a,b,c), generate_series(1,2) i; -ERROR: in an aggregate with DISTINCT, ORDER BY expressions must appear in argument list -LINE 1: select aggfns(distinct a,a,c order by a,b) - ^ --- string_agg tests -select string_agg(a,',') from (values('aaaa'),('bbbb'),('cccc')) g(a); - string_agg ----------------- - aaaa,bbbb,cccc -(1 row) - -select string_agg(a,',') from (values('aaaa'),(null),('bbbb'),('cccc')) g(a); - string_agg ----------------- - aaaa,bbbb,cccc -(1 row) - -select string_agg(a,'AB') from (values(null),(null),('bbbb'),('cccc')) g(a); - string_agg ------------- - bbbbABcccc -(1 row) - -select string_agg(a,',') from (values(null),(null)) g(a); - string_agg ------------- - -(1 row) - --- check some implicit casting cases, as per bug #5564 -select string_agg(distinct f1, ',' order by f1) from varchar_tbl; -- ok - string_agg ------------- - a,ab,abcd -(1 row) - -select string_agg(distinct f1::text, ',' order by f1) from varchar_tbl; -- not ok -ERROR: in an aggregate with DISTINCT, ORDER BY expressions must appear in argument list -LINE 1: select string_agg(distinct f1::text, ',' order by f1) from v... - ^ -select string_agg(distinct f1, ',' order by f1::text) from varchar_tbl; -- not ok -ERROR: in an aggregate with DISTINCT, ORDER BY expressions must appear in argument list -LINE 1: select string_agg(distinct f1, ',' order by f1::text) from v... - ^ -select string_agg(distinct f1::text, ',' order by f1::text) from varchar_tbl; -- ok - string_agg ------------- - a,ab,abcd -(1 row) - --- string_agg bytea tests -create table bytea_test_table(v bytea); -select string_agg(v, '') from bytea_test_table; - string_agg ------------- - -(1 row) - -insert into bytea_test_table values(decode('ff','hex')); -select string_agg(v, '') from bytea_test_table; - string_agg ------------- - \xff -(1 row) - -insert into bytea_test_table values(decode('aa','hex')); -select string_agg(v, '') from bytea_test_table; - string_agg ------------- - \xffaa -(1 row) - -select string_agg(v, NULL) from bytea_test_table; - string_agg ------------- - \xffaa -(1 row) - -select string_agg(v, decode('ee', 'hex')) from bytea_test_table; - string_agg ------------- - \xffeeaa -(1 row) - -drop table bytea_test_table; --- FILTER tests -select min(unique1) filter (where unique1 > 100) from tenk1; - min ------ - 101 -(1 row) - -select sum(1/ten) filter (where ten > 0) from tenk1; - sum ------- - 1000 -(1 row) - -select ten, sum(distinct four) filter (where four::text ~ '123') from onek a -group by ten; - ten | sum ------+----- - 0 | - 1 | - 2 | - 3 | - 4 | - 5 | - 6 | - 7 | - 8 | - 9 | -(10 rows) - -select ten, sum(distinct four) filter (where four > 10) from onek a -group by ten -having exists (select 1 from onek b where sum(distinct a.four) = b.four); - ten | sum ------+----- - 0 | - 2 | - 4 | - 6 | - 8 | -(5 rows) - -select max(foo COLLATE "C") filter (where (bar collate "POSIX") > '0') -from (values ('a', 'b')) AS v(foo,bar); - max ------ - a -(1 row) - --- outer reference in FILTER (PostgreSQL extension) -select (select count(*) - from (values (1)) t0(inner_c)) -from (values (2),(3)) t1(outer_c); -- inner query is aggregation query - count -------- - 1 - 1 -(2 rows) - -select (select count(*) filter (where outer_c <> 0) - from (values (1)) t0(inner_c)) -from (values (2),(3)) t1(outer_c); -- outer query is aggregation query - count -------- - 2 -(1 row) - -select (select count(inner_c) filter (where outer_c <> 0) - from (values (1)) t0(inner_c)) -from (values (2),(3)) t1(outer_c); -- inner query is aggregation query - count -------- - 1 - 1 -(2 rows) - -select - (select max((select i.unique2 from tenk1 i where i.unique1 = o.unique1)) - filter (where o.unique1 < 10)) -from tenk1 o; -- outer query is aggregation query - max ------- - 9998 -(1 row) - --- subquery in FILTER clause (PostgreSQL extension) -select sum(unique1) FILTER (WHERE - unique1 IN (SELECT unique1 FROM onek where unique1 < 100)) FROM tenk1; - sum ------- - 4950 -(1 row) - --- exercise lots of aggregate parts with FILTER -select aggfns(distinct a,b,c order by a,c using ~<~,b) filter (where a > 1) - from (values (1,3,'foo'),(0,null,null),(2,2,'bar'),(3,1,'baz')) v(a,b,c), - generate_series(1,2) i; - aggfns ---------------------------- - {"(2,2,bar)","(3,1,baz)"} -(1 row) - --- check handling of bare boolean Var in FILTER -select max(0) filter (where b1) from bool_test; - max ------ - 0 -(1 row) - -select (select max(0) filter (where b1)) from bool_test; - max ------ - 0 -(1 row) - --- check for correct detection of nested-aggregate errors in FILTER -select max(unique1) filter (where sum(ten) > 0) from tenk1; -ERROR: aggregate functions are not allowed in FILTER -LINE 1: select max(unique1) filter (where sum(ten) > 0) from tenk1; - ^ -select (select max(unique1) filter (where sum(ten) > 0) from int8_tbl) from tenk1; -ERROR: aggregate function calls cannot be nested -LINE 1: select (select max(unique1) filter (where sum(ten) > 0) from... - ^ -select max(unique1) filter (where bool_or(ten > 0)) from tenk1; -ERROR: aggregate functions are not allowed in FILTER -LINE 1: select max(unique1) filter (where bool_or(ten > 0)) from ten... - ^ -select (select max(unique1) filter (where bool_or(ten > 0)) from int8_tbl) from tenk1; -ERROR: aggregate function calls cannot be nested -LINE 1: select (select max(unique1) filter (where bool_or(ten > 0)) ... - ^ --- ordered-set aggregates -select p, percentile_cont(p) within group (order by x::float8) -from generate_series(1,5) x, - (values (0::float8),(0.1),(0.25),(0.4),(0.5),(0.6),(0.75),(0.9),(1)) v(p) -group by p order by p; - p | percentile_cont -------+----------------- - 0 | 1 - 0.1 | 1.4 - 0.25 | 2 - 0.4 | 2.6 - 0.5 | 3 - 0.6 | 3.4 - 0.75 | 4 - 0.9 | 4.6 - 1 | 5 -(9 rows) - -select p, percentile_cont(p order by p) within group (order by x) -- error -from generate_series(1,5) x, - (values (0::float8),(0.1),(0.25),(0.4),(0.5),(0.6),(0.75),(0.9),(1)) v(p) -group by p order by p; -ERROR: cannot use multiple ORDER BY clauses with WITHIN GROUP -LINE 1: select p, percentile_cont(p order by p) within group (order ... - ^ -select p, sum() within group (order by x::float8) -- error -from generate_series(1,5) x, - (values (0::float8),(0.1),(0.25),(0.4),(0.5),(0.6),(0.75),(0.9),(1)) v(p) -group by p order by p; -ERROR: sum is not an ordered-set aggregate, so it cannot have WITHIN GROUP -LINE 1: select p, sum() within group (order by x::float8) - ^ -select p, percentile_cont(p,p) -- error -from generate_series(1,5) x, - (values (0::float8),(0.1),(0.25),(0.4),(0.5),(0.6),(0.75),(0.9),(1)) v(p) -group by p order by p; -ERROR: WITHIN GROUP is required for ordered-set aggregate percentile_cont -LINE 1: select p, percentile_cont(p,p) - ^ -select percentile_cont(0.5) within group (order by b) from aggtest; - percentile_cont ------------------- - 53.4485001564026 -(1 row) - -select percentile_cont(0.5) within group (order by b), sum(b) from aggtest; - percentile_cont | sum -------------------+--------- - 53.4485001564026 | 431.773 -(1 row) - -select percentile_cont(0.5) within group (order by thousand) from tenk1; - percentile_cont ------------------ - 499.5 -(1 row) - -select percentile_disc(0.5) within group (order by thousand) from tenk1; - percentile_disc ------------------ - 499 -(1 row) - -select rank(3) within group (order by x) -from (values (1),(1),(2),(2),(3),(3),(4)) v(x); - rank ------- - 5 -(1 row) - -select cume_dist(3) within group (order by x) -from (values (1),(1),(2),(2),(3),(3),(4)) v(x); - cume_dist ------------ - 0.875 -(1 row) - -select percent_rank(3) within group (order by x) -from (values (1),(1),(2),(2),(3),(3),(4),(5)) v(x); - percent_rank --------------- - 0.5 -(1 row) - -select dense_rank(3) within group (order by x) -from (values (1),(1),(2),(2),(3),(3),(4)) v(x); - dense_rank ------------- - 3 -(1 row) - -select percentile_disc(array[0,0.1,0.25,0.5,0.75,0.9,1]) within group (order by thousand) -from tenk1; - percentile_disc ----------------------------- - {0,99,249,499,749,899,999} -(1 row) - -select percentile_cont(array[0,0.25,0.5,0.75,1]) within group (order by thousand) -from tenk1; - percentile_cont ------------------------------ - {0,249.75,499.5,749.25,999} -(1 row) - -select percentile_disc(array[[null,1,0.5],[0.75,0.25,null]]) within group (order by thousand) -from tenk1; - percentile_disc ---------------------------------- - {{NULL,999,499},{749,249,NULL}} -(1 row) - -select percentile_cont(array[0,1,0.25,0.75,0.5,1,0.3,0.32,0.35,0.38,0.4]) within group (order by x) -from generate_series(1,6) x; - percentile_cont ------------------------------------------- - {1,6,2.25,4.75,3.5,6,2.5,2.6,2.75,2.9,3} -(1 row) - -select ten, mode() within group (order by string4) from tenk1 group by ten; - ten | mode ------+-------- - 0 | HHHHxx - 1 | OOOOxx - 2 | VVVVxx - 3 | OOOOxx - 4 | HHHHxx - 5 | HHHHxx - 6 | OOOOxx - 7 | AAAAxx - 8 | VVVVxx - 9 | VVVVxx -(10 rows) - -select percentile_disc(array[0.25,0.5,0.75]) within group (order by x) -from unnest('{fred,jim,fred,jack,jill,fred,jill,jim,jim,sheila,jim,sheila}'::text[]) u(x); - percentile_disc ------------------ - {fred,jill,jim} -(1 row) - --- check collation propagates up in suitable cases: -select pg_collation_for(percentile_disc(1) within group (order by x collate "POSIX")) - from (values ('fred'),('jim')) v(x); - pg_collation_for ------------------- - "POSIX" -(1 row) - --- ordered-set aggs created with CREATE AGGREGATE -select test_rank(3) within group (order by x) -from (values (1),(1),(2),(2),(3),(3),(4)) v(x); - test_rank ------------ - 5 -(1 row) - -select test_percentile_disc(0.5) within group (order by thousand) from tenk1; - test_percentile_disc ----------------------- - 499 -(1 row) - --- ordered-set aggs can't use ungrouped vars in direct args: -select rank(x) within group (order by x) from generate_series(1,5) x; -ERROR: column "x.x" must appear in the GROUP BY clause or be used in an aggregate function -LINE 1: select rank(x) within group (order by x) from generate_serie... - ^ -DETAIL: Direct arguments of an ordered-set aggregate must use only grouped columns. --- outer-level agg can't use a grouped arg of a lower level, either: -select array(select percentile_disc(a) within group (order by x) - from (values (0.3),(0.7)) v(a) group by a) - from generate_series(1,5) g(x); -ERROR: outer-level aggregate cannot contain a lower-level variable in its direct arguments -LINE 1: select array(select percentile_disc(a) within group (order b... - ^ --- agg in the direct args is a grouping violation, too: -select rank(sum(x)) within group (order by x) from generate_series(1,5) x; -ERROR: aggregate function calls cannot be nested -LINE 1: select rank(sum(x)) within group (order by x) from generate_... - ^ --- hypothetical-set type unification and argument-count failures: -select rank(3) within group (order by x) from (values ('fred'),('jim')) v(x); -ERROR: WITHIN GROUP types text and integer cannot be matched -LINE 1: select rank(3) within group (order by x) from (values ('fred... - ^ -select rank(3) within group (order by stringu1,stringu2) from tenk1; -ERROR: function rank(integer, name, name) does not exist -LINE 1: select rank(3) within group (order by stringu1,stringu2) fro... - ^ -HINT: To use the hypothetical-set aggregate rank, the number of hypothetical direct arguments (here 1) must match the number of ordering columns (here 2). -select rank('fred') within group (order by x) from generate_series(1,5) x; -ERROR: invalid input syntax for type integer: "fred" -LINE 1: select rank('fred') within group (order by x) from generate_... - ^ -select rank('adam'::text collate "C") within group (order by x collate "POSIX") - from (values ('fred'),('jim')) v(x); -ERROR: collation mismatch between explicit collations "C" and "POSIX" -LINE 1: ...adam'::text collate "C") within group (order by x collate "P... - ^ --- hypothetical-set type unification successes: -select rank('adam'::varchar) within group (order by x) from (values ('fred'),('jim')) v(x); - rank ------- - 1 -(1 row) - -select rank('3') within group (order by x) from generate_series(1,5) x; - rank ------- - 3 -(1 row) - --- divide by zero check -select percent_rank(0) within group (order by x) from generate_series(1,0) x; - percent_rank --------------- - 0 -(1 row) - --- deparse and multiple features: -create view aggordview1 as -select ten, - percentile_disc(0.5) within group (order by thousand) as p50, - percentile_disc(0.5) within group (order by thousand) filter (where hundred=1) as px, - rank(5,'AZZZZ',50) within group (order by hundred, string4 desc, hundred) - from tenk1 - group by ten order by ten; -select pg_get_viewdef('aggordview1'); - pg_get_viewdef -------------------------------------------------------------------------------------------------------------------------------- - SELECT tenk1.ten, + - percentile_disc((0.5)::double precision) WITHIN GROUP (ORDER BY tenk1.thousand) AS p50, + - percentile_disc((0.5)::double precision) WITHIN GROUP (ORDER BY tenk1.thousand) FILTER (WHERE (tenk1.hundred = 1)) AS px,+ - rank(5, 'AZZZZ'::name, 50) WITHIN GROUP (ORDER BY tenk1.hundred, tenk1.string4 DESC, tenk1.hundred) AS rank + - FROM tenk1 + - GROUP BY tenk1.ten + - ORDER BY tenk1.ten; -(1 row) - -select * from aggordview1 order by ten; - ten | p50 | px | rank ------+-----+-----+------ - 0 | 490 | | 101 - 1 | 491 | 401 | 101 - 2 | 492 | | 101 - 3 | 493 | | 101 - 4 | 494 | | 101 - 5 | 495 | | 67 - 6 | 496 | | 1 - 7 | 497 | | 1 - 8 | 498 | | 1 - 9 | 499 | | 1 -(10 rows) - -drop view aggordview1; --- variadic aggregates -select least_agg(q1,q2) from int8_tbl; - least_agg -------------------- - -4567890123456789 -(1 row) - -select least_agg(variadic array[q1,q2]) from int8_tbl; - least_agg -------------------- - -4567890123456789 -(1 row) - -select cleast_agg(q1,q2) from int8_tbl; - cleast_agg -------------------- - -4567890123456789 -(1 row) - -select cleast_agg(4.5,f1) from int4_tbl; - cleast_agg -------------- - -2147483647 -(1 row) - -select cleast_agg(variadic array[4.5,f1]) from int4_tbl; - cleast_agg -------------- - -2147483647 -(1 row) - -select pg_typeof(cleast_agg(variadic array[4.5,f1])) from int4_tbl; - pg_typeof ------------ - numeric -(1 row) - --- test aggregates with common transition functions share the same states -begin work; -create type avg_state as (total bigint, count bigint); -create or replace function avg_transfn(state avg_state, n int) returns avg_state as -$$ -declare new_state avg_state; -begin - raise notice 'avg_transfn called with %', n; - if state is null then - if n is not null then - new_state.total := n; - new_state.count := 1; - return new_state; - end if; - return null; - elsif n is not null then - state.total := state.total + n; - state.count := state.count + 1; - return state; - end if; - - return null; -end -$$ language plpgsql; -create function avg_finalfn(state avg_state) returns int4 as -$$ -begin - if state is null then - return NULL; - else - return state.total / state.count; - end if; -end -$$ language plpgsql; -create function sum_finalfn(state avg_state) returns int4 as -$$ -begin - if state is null then - return NULL; - else - return state.total; - end if; -end -$$ language plpgsql; -create aggregate my_avg(int4) -( - stype = avg_state, - sfunc = avg_transfn, - finalfunc = avg_finalfn -); -create aggregate my_sum(int4) -( - stype = avg_state, - sfunc = avg_transfn, - finalfunc = sum_finalfn -); --- aggregate state should be shared as aggs are the same. -select my_avg(one),my_avg(one) from (values(1),(3)) t(one); -NOTICE: avg_transfn called with 1 -NOTICE: avg_transfn called with 3 - my_avg | my_avg ---------+-------- - 2 | 2 -(1 row) - --- aggregate state should be shared as transfn is the same for both aggs. -select my_avg(one),my_sum(one) from (values(1),(3)) t(one); -NOTICE: avg_transfn called with 1 -NOTICE: avg_transfn called with 3 - my_avg | my_sum ---------+-------- - 2 | 4 -(1 row) - --- same as previous one, but with DISTINCT, which requires sorting the input. -select my_avg(distinct one),my_sum(distinct one) from (values(1),(3),(1)) t(one); -NOTICE: avg_transfn called with 1 -NOTICE: avg_transfn called with 3 - my_avg | my_sum ---------+-------- - 2 | 4 -(1 row) - --- shouldn't share states due to the distinctness not matching. -select my_avg(distinct one),my_sum(one) from (values(1),(3)) t(one); -NOTICE: avg_transfn called with 1 -NOTICE: avg_transfn called with 3 -NOTICE: avg_transfn called with 1 -NOTICE: avg_transfn called with 3 - my_avg | my_sum ---------+-------- - 2 | 4 -(1 row) - --- shouldn't share states due to the filter clause not matching. -select my_avg(one) filter (where one > 1),my_sum(one) from (values(1),(3)) t(one); -NOTICE: avg_transfn called with 1 -NOTICE: avg_transfn called with 3 -NOTICE: avg_transfn called with 3 - my_avg | my_sum ---------+-------- - 3 | 4 -(1 row) - --- this should not share the state due to different input columns. -select my_avg(one),my_sum(two) from (values(1,2),(3,4)) t(one,two); -NOTICE: avg_transfn called with 1 -NOTICE: avg_transfn called with 2 -NOTICE: avg_transfn called with 3 -NOTICE: avg_transfn called with 4 - my_avg | my_sum ---------+-------- - 2 | 6 -(1 row) - --- exercise cases where OSAs share state -select - percentile_cont(0.5) within group (order by a), - percentile_disc(0.5) within group (order by a) -from (values(1::float8),(3),(5),(7)) t(a); - percentile_cont | percentile_disc ------------------+----------------- - 4 | 3 -(1 row) - -select - percentile_cont(0.25) within group (order by a), - percentile_disc(0.5) within group (order by a) -from (values(1::float8),(3),(5),(7)) t(a); - percentile_cont | percentile_disc ------------------+----------------- - 2.5 | 3 -(1 row) - --- these can't share state currently -select - rank(4) within group (order by a), - dense_rank(4) within group (order by a) -from (values(1),(3),(5),(7)) t(a); - rank | dense_rank -------+------------ - 3 | 3 -(1 row) - --- test that aggs with the same sfunc and initcond share the same agg state -create aggregate my_sum_init(int4) -( - stype = avg_state, - sfunc = avg_transfn, - finalfunc = sum_finalfn, - initcond = '(10,0)' -); -create aggregate my_avg_init(int4) -( - stype = avg_state, - sfunc = avg_transfn, - finalfunc = avg_finalfn, - initcond = '(10,0)' -); -create aggregate my_avg_init2(int4) -( - stype = avg_state, - sfunc = avg_transfn, - finalfunc = avg_finalfn, - initcond = '(4,0)' -); --- state should be shared if INITCONDs are matching -select my_sum_init(one),my_avg_init(one) from (values(1),(3)) t(one); -NOTICE: avg_transfn called with 1 -NOTICE: avg_transfn called with 3 - my_sum_init | my_avg_init --------------+------------- - 14 | 7 -(1 row) - --- Varying INITCONDs should cause the states not to be shared. -select my_sum_init(one),my_avg_init2(one) from (values(1),(3)) t(one); -NOTICE: avg_transfn called with 1 -NOTICE: avg_transfn called with 1 -NOTICE: avg_transfn called with 3 -NOTICE: avg_transfn called with 3 - my_sum_init | my_avg_init2 --------------+-------------- - 14 | 4 -(1 row) - -rollback; --- test aggregate state sharing to ensure it works if one aggregate has a --- finalfn and the other one has none. -begin work; -create or replace function sum_transfn(state int4, n int4) returns int4 as -$$ -declare new_state int4; -begin - raise notice 'sum_transfn called with %', n; - if state is null then - if n is not null then - new_state := n; - return new_state; - end if; - return null; - elsif n is not null then - state := state + n; - return state; - end if; - - return null; -end -$$ language plpgsql; -create function halfsum_finalfn(state int4) returns int4 as -$$ -begin - if state is null then - return NULL; - else - return state / 2; - end if; -end -$$ language plpgsql; -create aggregate my_sum(int4) -( - stype = int4, - sfunc = sum_transfn -); -create aggregate my_half_sum(int4) -( - stype = int4, - sfunc = sum_transfn, - finalfunc = halfsum_finalfn -); --- Agg state should be shared even though my_sum has no finalfn -select my_sum(one),my_half_sum(one) from (values(1),(2),(3),(4)) t(one); -NOTICE: sum_transfn called with 1 -NOTICE: sum_transfn called with 2 -NOTICE: sum_transfn called with 3 -NOTICE: sum_transfn called with 4 - my_sum | my_half_sum ---------+------------- - 10 | 5 -(1 row) - -rollback; --- test that the aggregate transition logic correctly handles --- transition / combine functions returning NULL --- First test the case of a normal transition function returning NULL -BEGIN; -CREATE FUNCTION balkifnull(int8, int4) -RETURNS int8 -STRICT -LANGUAGE plpgsql AS $$ -BEGIN - IF $1 IS NULL THEN - RAISE 'erroneously called with NULL argument'; - END IF; - RETURN NULL; -END$$; -CREATE AGGREGATE balk(int4) -( - SFUNC = balkifnull(int8, int4), - STYPE = int8, - PARALLEL = SAFE, - INITCOND = '0' -); -SELECT balk(hundred) FROM tenk1; - balk ------- - -(1 row) - -ROLLBACK; --- Secondly test the case of a parallel aggregate combiner function --- returning NULL. For that use normal transition function, but a --- combiner function returning NULL. -BEGIN; -CREATE FUNCTION balkifnull(int8, int8) -RETURNS int8 -PARALLEL SAFE -STRICT -LANGUAGE plpgsql AS $$ -BEGIN - IF $1 IS NULL THEN - RAISE 'erroneously called with NULL argument'; - END IF; - RETURN NULL; -END$$; -CREATE AGGREGATE balk(int4) -( - SFUNC = int4_sum(int8, int4), - STYPE = int8, - COMBINEFUNC = balkifnull(int8, int8), - PARALLEL = SAFE, - INITCOND = '0' -); --- force use of parallelism -ALTER TABLE tenk1 set (parallel_workers = 4); -SET LOCAL parallel_setup_cost=0; -SET LOCAL max_parallel_workers_per_gather=4; -EXPLAIN (COSTS OFF) SELECT balk(hundred) FROM tenk1; - QUERY PLAN -------------------------------------------------------------------------- - Finalize Aggregate - -> Gather - Workers Planned: 4 - -> Partial Aggregate - -> Parallel Index Only Scan using tenk1_hundred on tenk1 -(5 rows) - -SELECT balk(hundred) FROM tenk1; - balk ------- - -(1 row) - -ROLLBACK; --- test coverage for aggregate combine/serial/deserial functions -BEGIN; -SET parallel_setup_cost = 0; -SET parallel_tuple_cost = 0; -SET min_parallel_table_scan_size = 0; -SET max_parallel_workers_per_gather = 4; -SET parallel_leader_participation = off; -SET enable_indexonlyscan = off; --- variance(int4) covers numeric_poly_combine --- sum(int8) covers int8_avg_combine --- regr_count(float8, float8) covers int8inc_float8_float8 and aggregates with > 1 arg -EXPLAIN (COSTS OFF, VERBOSE) -SELECT variance(unique1::int4), sum(unique1::int8), regr_count(unique1::float8, unique1::float8) -FROM (SELECT * FROM tenk1 - UNION ALL SELECT * FROM tenk1 - UNION ALL SELECT * FROM tenk1 - UNION ALL SELECT * FROM tenk1) u; - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Finalize Aggregate - Output: variance(tenk1.unique1), sum((tenk1.unique1)::bigint), regr_count((tenk1.unique1)::double precision, (tenk1.unique1)::double precision) - -> Gather - Output: (PARTIAL variance(tenk1.unique1)), (PARTIAL sum((tenk1.unique1)::bigint)), (PARTIAL regr_count((tenk1.unique1)::double precision, (tenk1.unique1)::double precision)) - Workers Planned: 4 - -> Partial Aggregate - Output: PARTIAL variance(tenk1.unique1), PARTIAL sum((tenk1.unique1)::bigint), PARTIAL regr_count((tenk1.unique1)::double precision, (tenk1.unique1)::double precision) - -> Parallel Append - -> Parallel Seq Scan on public.tenk1 - Output: tenk1.unique1 - -> Parallel Seq Scan on public.tenk1 tenk1_1 - Output: tenk1_1.unique1 - -> Parallel Seq Scan on public.tenk1 tenk1_2 - Output: tenk1_2.unique1 - -> Parallel Seq Scan on public.tenk1 tenk1_3 - Output: tenk1_3.unique1 -(16 rows) - -SELECT variance(unique1::int4), sum(unique1::int8), regr_count(unique1::float8, unique1::float8) -FROM (SELECT * FROM tenk1 - UNION ALL SELECT * FROM tenk1 - UNION ALL SELECT * FROM tenk1 - UNION ALL SELECT * FROM tenk1) u; - variance | sum | regr_count -----------------------+-----------+------------ - 8333541.588539713493 | 199980000 | 40000 -(1 row) - --- variance(int8) covers numeric_combine --- avg(numeric) covers numeric_avg_combine -EXPLAIN (COSTS OFF, VERBOSE) -SELECT variance(unique1::int8), avg(unique1::numeric) -FROM (SELECT * FROM tenk1 - UNION ALL SELECT * FROM tenk1 - UNION ALL SELECT * FROM tenk1 - UNION ALL SELECT * FROM tenk1) u; - QUERY PLAN --------------------------------------------------------------------------------------------------------- - Finalize Aggregate - Output: variance((tenk1.unique1)::bigint), avg((tenk1.unique1)::numeric) - -> Gather - Output: (PARTIAL variance((tenk1.unique1)::bigint)), (PARTIAL avg((tenk1.unique1)::numeric)) - Workers Planned: 4 - -> Partial Aggregate - Output: PARTIAL variance((tenk1.unique1)::bigint), PARTIAL avg((tenk1.unique1)::numeric) - -> Parallel Append - -> Parallel Seq Scan on public.tenk1 - Output: tenk1.unique1 - -> Parallel Seq Scan on public.tenk1 tenk1_1 - Output: tenk1_1.unique1 - -> Parallel Seq Scan on public.tenk1 tenk1_2 - Output: tenk1_2.unique1 - -> Parallel Seq Scan on public.tenk1 tenk1_3 - Output: tenk1_3.unique1 -(16 rows) - -SELECT variance(unique1::int8), avg(unique1::numeric) -FROM (SELECT * FROM tenk1 - UNION ALL SELECT * FROM tenk1 - UNION ALL SELECT * FROM tenk1 - UNION ALL SELECT * FROM tenk1) u; - variance | avg -----------------------+----------------------- - 8333541.588539713493 | 4999.5000000000000000 -(1 row) - -ROLLBACK; --- test coverage for dense_rank -SELECT dense_rank(x) WITHIN GROUP (ORDER BY x) FROM (VALUES (1),(1),(2),(2),(3),(3)) v(x) GROUP BY (x) ORDER BY 1; - dense_rank ------------- - 1 - 1 - 1 -(3 rows) - --- Ensure that the STRICT checks for aggregates does not take NULLness --- of ORDER BY columns into account. See bug report around --- 2a505161-2727-2473-7c46-591ed108ac52@email.cz -SELECT min(x ORDER BY y) FROM (VALUES(1, NULL)) AS d(x,y); - min ------ - 1 -(1 row) - -SELECT min(x ORDER BY y) FROM (VALUES(1, 2)) AS d(x,y); - min ------ - 1 -(1 row) - --- check collation-sensitive matching between grouping expressions -select v||'a', case v||'a' when 'aa' then 1 else 0 end, count(*) - from unnest(array['a','b']) u(v) - group by v||'a' order by 1; - ?column? | case | count -----------+------+------- - aa | 1 | 1 - ba | 0 | 1 -(2 rows) - -select v||'a', case when v||'a' = 'aa' then 1 else 0 end, count(*) - from unnest(array['a','b']) u(v) - group by v||'a' order by 1; - ?column? | case | count -----------+------+------- - aa | 1 | 1 - ba | 0 | 1 -(2 rows) - --- Make sure that generation of HashAggregate for uniqification purposes --- does not lead to array overflow due to unexpected duplicate hash keys --- see CAFeeJoKKu0u+A_A9R9316djW-YW3-+Gtgvy3ju655qRHR3jtdA@mail.gmail.com -set enable_memoize to off; -explain (costs off) - select 1 from tenk1 - where (hundred, thousand) in (select twothousand, twothousand from onek); - QUERY PLAN -------------------------------------------------------------- - Hash Join - Hash Cond: (tenk1.hundred = onek.twothousand) - -> Seq Scan on tenk1 - Filter: (hundred = thousand) - -> Hash - -> HashAggregate - Group Key: onek.twothousand, onek.twothousand - -> Seq Scan on onek -(8 rows) - -reset enable_memoize; --- --- Hash Aggregation Spill tests --- -set enable_sort=false; -set work_mem='64kB'; -select unique1, count(*), sum(twothousand) from tenk1 -group by unique1 -having sum(fivethous) > 4975 -order by sum(twothousand); - unique1 | count | sum ----------+-------+------ - 4976 | 1 | 976 - 4977 | 1 | 977 - 4978 | 1 | 978 - 4979 | 1 | 979 - 4980 | 1 | 980 - 4981 | 1 | 981 - 4982 | 1 | 982 - 4983 | 1 | 983 - 4984 | 1 | 984 - 4985 | 1 | 985 - 4986 | 1 | 986 - 4987 | 1 | 987 - 4988 | 1 | 988 - 4989 | 1 | 989 - 4990 | 1 | 990 - 4991 | 1 | 991 - 4992 | 1 | 992 - 4993 | 1 | 993 - 4994 | 1 | 994 - 4995 | 1 | 995 - 4996 | 1 | 996 - 4997 | 1 | 997 - 4998 | 1 | 998 - 4999 | 1 | 999 - 9976 | 1 | 1976 - 9977 | 1 | 1977 - 9978 | 1 | 1978 - 9979 | 1 | 1979 - 9980 | 1 | 1980 - 9981 | 1 | 1981 - 9982 | 1 | 1982 - 9983 | 1 | 1983 - 9984 | 1 | 1984 - 9985 | 1 | 1985 - 9986 | 1 | 1986 - 9987 | 1 | 1987 - 9988 | 1 | 1988 - 9989 | 1 | 1989 - 9990 | 1 | 1990 - 9991 | 1 | 1991 - 9992 | 1 | 1992 - 9993 | 1 | 1993 - 9994 | 1 | 1994 - 9995 | 1 | 1995 - 9996 | 1 | 1996 - 9997 | 1 | 1997 - 9998 | 1 | 1998 - 9999 | 1 | 1999 -(48 rows) - -set work_mem to default; -set enable_sort to default; --- --- Compare results between plans using sorting and plans using hash --- aggregation. Force spilling in both cases by setting work_mem low. --- -set work_mem='64kB'; -create table agg_data_2k as -select g from generate_series(0, 1999) g; -analyze agg_data_2k; -create table agg_data_20k as -select g from generate_series(0, 19999) g; -analyze agg_data_20k; --- Produce results with sorting. -set enable_hashagg = false; -set jit_above_cost = 0; -explain (costs off) -select g%10000 as c1, sum(g::numeric) as c2, count(*) as c3 - from agg_data_20k group by g%10000; - QUERY PLAN --------------------------------------- - GroupAggregate - Group Key: ((g % 10000)) - -> Sort - Sort Key: ((g % 10000)) - -> Seq Scan on agg_data_20k -(5 rows) - -create table agg_group_1 as -select g%10000 as c1, sum(g::numeric) as c2, count(*) as c3 - from agg_data_20k group by g%10000; -create table agg_group_2 as -select * from - (values (100), (300), (500)) as r(a), - lateral ( - select (g/2)::numeric as c1, - array_agg(g::numeric) as c2, - count(*) as c3 - from agg_data_2k - where g < r.a - group by g/2) as s; -set jit_above_cost to default; -create table agg_group_3 as -select (g/2)::numeric as c1, sum(7::int4) as c2, count(*) as c3 - from agg_data_2k group by g/2; -create table agg_group_4 as -select (g/2)::numeric as c1, array_agg(g::numeric) as c2, count(*) as c3 - from agg_data_2k group by g/2; --- Produce results with hash aggregation -set enable_hashagg = true; -set enable_sort = false; -set jit_above_cost = 0; -explain (costs off) -select g%10000 as c1, sum(g::numeric) as c2, count(*) as c3 - from agg_data_20k group by g%10000; - QUERY PLAN --------------------------------- - HashAggregate - Group Key: (g % 10000) - -> Seq Scan on agg_data_20k -(3 rows) - -create table agg_hash_1 as -select g%10000 as c1, sum(g::numeric) as c2, count(*) as c3 - from agg_data_20k group by g%10000; -create table agg_hash_2 as -select * from - (values (100), (300), (500)) as r(a), - lateral ( - select (g/2)::numeric as c1, - array_agg(g::numeric) as c2, - count(*) as c3 - from agg_data_2k - where g < r.a - group by g/2) as s; -set jit_above_cost to default; -create table agg_hash_3 as -select (g/2)::numeric as c1, sum(7::int4) as c2, count(*) as c3 - from agg_data_2k group by g/2; -create table agg_hash_4 as -select (g/2)::numeric as c1, array_agg(g::numeric) as c2, count(*) as c3 - from agg_data_2k group by g/2; -set enable_sort = true; -set work_mem to default; --- Compare group aggregation results to hash aggregation results -(select * from agg_hash_1 except select * from agg_group_1) - union all -(select * from agg_group_1 except select * from agg_hash_1); - c1 | c2 | c3 -----+----+---- -(0 rows) - -(select * from agg_hash_2 except select * from agg_group_2) - union all -(select * from agg_group_2 except select * from agg_hash_2); - a | c1 | c2 | c3 ----+----+----+---- -(0 rows) - -(select * from agg_hash_3 except select * from agg_group_3) - union all -(select * from agg_group_3 except select * from agg_hash_3); - c1 | c2 | c3 -----+----+---- -(0 rows) - -(select * from agg_hash_4 except select * from agg_group_4) - union all -(select * from agg_group_4 except select * from agg_hash_4); - c1 | c2 | c3 -----+----+---- -(0 rows) - -drop table agg_group_1; -drop table agg_group_2; -drop table agg_group_3; -drop table agg_group_4; -drop table agg_hash_1; -drop table agg_hash_2; -drop table agg_hash_3; -drop table agg_hash_4; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/transactions.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/transactions.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/transactions.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/transactions.out 2023-02-20 19:45:46.609211055 -0500 @@ -1,1064 +1 @@ --- --- TRANSACTIONS --- -BEGIN; -SELECT * - INTO TABLE xacttest - FROM aggtest; -INSERT INTO xacttest (a, b) VALUES (777, 777.777); -END; --- should retrieve one value-- -SELECT a FROM xacttest WHERE a > 100; - a ------ - 777 -(1 row) - -BEGIN; -CREATE TABLE disappear (a int4); -DELETE FROM aggtest; --- should be empty -SELECT * FROM aggtest; - a | b ----+--- -(0 rows) - -ABORT; --- should not exist -SELECT oid FROM pg_class WHERE relname = 'disappear'; - oid ------ -(0 rows) - --- should have members again -SELECT * FROM aggtest; - a | b ------+--------- - 56 | 7.8 - 100 | 99.097 - 0 | 0.09561 - 42 | 324.78 -(4 rows) - --- Read-only tests -CREATE TABLE writetest (a int); -CREATE TEMPORARY TABLE temptest (a int); -BEGIN; -SET TRANSACTION ISOLATION LEVEL SERIALIZABLE, READ ONLY, DEFERRABLE; -- ok -SELECT * FROM writetest; -- ok - a ---- -(0 rows) - -SET TRANSACTION READ WRITE; --fail -ERROR: transaction read-write mode must be set before any query -COMMIT; -BEGIN; -SET TRANSACTION READ ONLY; -- ok -SET TRANSACTION READ WRITE; -- ok -SET TRANSACTION READ ONLY; -- ok -SELECT * FROM writetest; -- ok - a ---- -(0 rows) - -SAVEPOINT x; -SET TRANSACTION READ ONLY; -- ok -SELECT * FROM writetest; -- ok - a ---- -(0 rows) - -SET TRANSACTION READ ONLY; -- ok -SET TRANSACTION READ WRITE; --fail -ERROR: cannot set transaction read-write mode inside a read-only transaction -COMMIT; -BEGIN; -SET TRANSACTION READ WRITE; -- ok -SAVEPOINT x; -SET TRANSACTION READ WRITE; -- ok -SET TRANSACTION READ ONLY; -- ok -SELECT * FROM writetest; -- ok - a ---- -(0 rows) - -SET TRANSACTION READ ONLY; -- ok -SET TRANSACTION READ WRITE; --fail -ERROR: cannot set transaction read-write mode inside a read-only transaction -COMMIT; -BEGIN; -SET TRANSACTION READ WRITE; -- ok -SAVEPOINT x; -SET TRANSACTION READ ONLY; -- ok -SELECT * FROM writetest; -- ok - a ---- -(0 rows) - -ROLLBACK TO SAVEPOINT x; -SHOW transaction_read_only; -- off - transaction_read_only ------------------------ - off -(1 row) - -SAVEPOINT y; -SET TRANSACTION READ ONLY; -- ok -SELECT * FROM writetest; -- ok - a ---- -(0 rows) - -RELEASE SAVEPOINT y; -SHOW transaction_read_only; -- off - transaction_read_only ------------------------ - off -(1 row) - -COMMIT; -SET SESSION CHARACTERISTICS AS TRANSACTION READ ONLY; -DROP TABLE writetest; -- fail -ERROR: cannot execute DROP TABLE in a read-only transaction -INSERT INTO writetest VALUES (1); -- fail -ERROR: cannot execute INSERT in a read-only transaction -SELECT * FROM writetest; -- ok - a ---- -(0 rows) - -DELETE FROM temptest; -- ok -UPDATE temptest SET a = 0 FROM writetest WHERE temptest.a = 1 AND writetest.a = temptest.a; -- ok -PREPARE test AS UPDATE writetest SET a = 0; -- ok -EXECUTE test; -- fail -ERROR: cannot execute UPDATE in a read-only transaction -SELECT * FROM writetest, temptest; -- ok - a | a ----+--- -(0 rows) - -CREATE TABLE test AS SELECT * FROM writetest; -- fail -ERROR: cannot execute CREATE TABLE AS in a read-only transaction -START TRANSACTION READ WRITE; -DROP TABLE writetest; -- ok -COMMIT; --- Subtransactions, basic tests --- create & drop tables -SET SESSION CHARACTERISTICS AS TRANSACTION READ WRITE; -CREATE TABLE trans_foobar (a int); -BEGIN; - CREATE TABLE trans_foo (a int); - SAVEPOINT one; - DROP TABLE trans_foo; - CREATE TABLE trans_bar (a int); - ROLLBACK TO SAVEPOINT one; - RELEASE SAVEPOINT one; - SAVEPOINT two; - CREATE TABLE trans_baz (a int); - RELEASE SAVEPOINT two; - drop TABLE trans_foobar; - CREATE TABLE trans_barbaz (a int); -COMMIT; --- should exist: trans_barbaz, trans_baz, trans_foo -SELECT * FROM trans_foo; -- should be empty - a ---- -(0 rows) - -SELECT * FROM trans_bar; -- shouldn't exist -ERROR: relation "trans_bar" does not exist -LINE 1: SELECT * FROM trans_bar; - ^ -SELECT * FROM trans_barbaz; -- should be empty - a ---- -(0 rows) - -SELECT * FROM trans_baz; -- should be empty - a ---- -(0 rows) - --- inserts -BEGIN; - INSERT INTO trans_foo VALUES (1); - SAVEPOINT one; - INSERT into trans_bar VALUES (1); -ERROR: relation "trans_bar" does not exist -LINE 1: INSERT into trans_bar VALUES (1); - ^ - ROLLBACK TO one; - RELEASE SAVEPOINT one; - SAVEPOINT two; - INSERT into trans_barbaz VALUES (1); - RELEASE two; - SAVEPOINT three; - SAVEPOINT four; - INSERT INTO trans_foo VALUES (2); - RELEASE SAVEPOINT four; - ROLLBACK TO SAVEPOINT three; - RELEASE SAVEPOINT three; - INSERT INTO trans_foo VALUES (3); -COMMIT; -SELECT * FROM trans_foo; -- should have 1 and 3 - a ---- - 1 - 3 -(2 rows) - -SELECT * FROM trans_barbaz; -- should have 1 - a ---- - 1 -(1 row) - --- test whole-tree commit -BEGIN; - SAVEPOINT one; - SELECT trans_foo; -ERROR: column "trans_foo" does not exist -LINE 1: SELECT trans_foo; - ^ - ROLLBACK TO SAVEPOINT one; - RELEASE SAVEPOINT one; - SAVEPOINT two; - CREATE TABLE savepoints (a int); - SAVEPOINT three; - INSERT INTO savepoints VALUES (1); - SAVEPOINT four; - INSERT INTO savepoints VALUES (2); - SAVEPOINT five; - INSERT INTO savepoints VALUES (3); - ROLLBACK TO SAVEPOINT five; -COMMIT; -COMMIT; -- should not be in a transaction block -WARNING: there is no transaction in progress -SELECT * FROM savepoints; - a ---- - 1 - 2 -(2 rows) - --- test whole-tree rollback -BEGIN; - SAVEPOINT one; - DELETE FROM savepoints WHERE a=1; - RELEASE SAVEPOINT one; - SAVEPOINT two; - DELETE FROM savepoints WHERE a=1; - SAVEPOINT three; - DELETE FROM savepoints WHERE a=2; -ROLLBACK; -COMMIT; -- should not be in a transaction block -WARNING: there is no transaction in progress -SELECT * FROM savepoints; - a ---- - 1 - 2 -(2 rows) - --- test whole-tree commit on an aborted subtransaction -BEGIN; - INSERT INTO savepoints VALUES (4); - SAVEPOINT one; - INSERT INTO savepoints VALUES (5); - SELECT trans_foo; -ERROR: column "trans_foo" does not exist -LINE 1: SELECT trans_foo; - ^ -COMMIT; -SELECT * FROM savepoints; - a ---- - 1 - 2 -(2 rows) - -BEGIN; - INSERT INTO savepoints VALUES (6); - SAVEPOINT one; - INSERT INTO savepoints VALUES (7); - RELEASE SAVEPOINT one; - INSERT INTO savepoints VALUES (8); -COMMIT; --- rows 6 and 8 should have been created by the same xact -SELECT a.xmin = b.xmin FROM savepoints a, savepoints b WHERE a.a=6 AND b.a=8; - ?column? ----------- - t -(1 row) - --- rows 6 and 7 should have been created by different xacts -SELECT a.xmin = b.xmin FROM savepoints a, savepoints b WHERE a.a=6 AND b.a=7; - ?column? ----------- - f -(1 row) - -BEGIN; - INSERT INTO savepoints VALUES (9); - SAVEPOINT one; - INSERT INTO savepoints VALUES (10); - ROLLBACK TO SAVEPOINT one; - INSERT INTO savepoints VALUES (11); -COMMIT; -SELECT a FROM savepoints WHERE a in (9, 10, 11); - a ----- - 9 - 11 -(2 rows) - --- rows 9 and 11 should have been created by different xacts -SELECT a.xmin = b.xmin FROM savepoints a, savepoints b WHERE a.a=9 AND b.a=11; - ?column? ----------- - f -(1 row) - -BEGIN; - INSERT INTO savepoints VALUES (12); - SAVEPOINT one; - INSERT INTO savepoints VALUES (13); - SAVEPOINT two; - INSERT INTO savepoints VALUES (14); - ROLLBACK TO SAVEPOINT one; - INSERT INTO savepoints VALUES (15); - SAVEPOINT two; - INSERT INTO savepoints VALUES (16); - SAVEPOINT three; - INSERT INTO savepoints VALUES (17); -COMMIT; -SELECT a FROM savepoints WHERE a BETWEEN 12 AND 17; - a ----- - 12 - 15 - 16 - 17 -(4 rows) - -BEGIN; - INSERT INTO savepoints VALUES (18); - SAVEPOINT one; - INSERT INTO savepoints VALUES (19); - SAVEPOINT two; - INSERT INTO savepoints VALUES (20); - ROLLBACK TO SAVEPOINT one; - INSERT INTO savepoints VALUES (21); - ROLLBACK TO SAVEPOINT one; - INSERT INTO savepoints VALUES (22); -COMMIT; -SELECT a FROM savepoints WHERE a BETWEEN 18 AND 22; - a ----- - 18 - 22 -(2 rows) - -DROP TABLE savepoints; --- only in a transaction block: -SAVEPOINT one; -ERROR: SAVEPOINT can only be used in transaction blocks -ROLLBACK TO SAVEPOINT one; -ERROR: ROLLBACK TO SAVEPOINT can only be used in transaction blocks -RELEASE SAVEPOINT one; -ERROR: RELEASE SAVEPOINT can only be used in transaction blocks --- Only "rollback to" allowed in aborted state -BEGIN; - SAVEPOINT one; - SELECT 0/0; -ERROR: division by zero - SAVEPOINT two; -- ignored till the end of ... -ERROR: current transaction is aborted, commands ignored until end of transaction block - RELEASE SAVEPOINT one; -- ignored till the end of ... -ERROR: current transaction is aborted, commands ignored until end of transaction block - ROLLBACK TO SAVEPOINT one; - SELECT 1; - ?column? ----------- - 1 -(1 row) - -COMMIT; -SELECT 1; -- this should work - ?column? ----------- - 1 -(1 row) - --- check non-transactional behavior of cursors -BEGIN; - DECLARE c CURSOR FOR SELECT unique2 FROM tenk1 ORDER BY unique2; - SAVEPOINT one; - FETCH 10 FROM c; - unique2 ---------- - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 -(10 rows) - - ROLLBACK TO SAVEPOINT one; - FETCH 10 FROM c; - unique2 ---------- - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 -(10 rows) - - RELEASE SAVEPOINT one; - FETCH 10 FROM c; - unique2 ---------- - 20 - 21 - 22 - 23 - 24 - 25 - 26 - 27 - 28 - 29 -(10 rows) - - CLOSE c; - DECLARE c CURSOR FOR SELECT unique2/0 FROM tenk1 ORDER BY unique2; - SAVEPOINT two; - FETCH 10 FROM c; -ERROR: division by zero - ROLLBACK TO SAVEPOINT two; - -- c is now dead to the world ... - FETCH 10 FROM c; -ERROR: portal "c" cannot be run - ROLLBACK TO SAVEPOINT two; - RELEASE SAVEPOINT two; - FETCH 10 FROM c; -ERROR: portal "c" cannot be run -COMMIT; --- --- Check that "stable" functions are really stable. They should not be --- able to see the partial results of the calling query. (Ideally we would --- also check that they don't see commits of concurrent transactions, but --- that's a mite hard to do within the limitations of pg_regress.) --- -select * from xacttest; - a | b ------+--------- - 56 | 7.8 - 100 | 99.097 - 0 | 0.09561 - 42 | 324.78 - 777 | 777.777 -(5 rows) - -create or replace function max_xacttest() returns smallint language sql as -'select max(a) from xacttest' stable; -begin; -update xacttest set a = max_xacttest() + 10 where a > 0; -select * from xacttest; - a | b ------+--------- - 0 | 0.09561 - 787 | 7.8 - 787 | 99.097 - 787 | 324.78 - 787 | 777.777 -(5 rows) - -rollback; --- But a volatile function can see the partial results of the calling query -create or replace function max_xacttest() returns smallint language sql as -'select max(a) from xacttest' volatile; -begin; -update xacttest set a = max_xacttest() + 10 where a > 0; -select * from xacttest; - a | b ------+--------- - 0 | 0.09561 - 787 | 7.8 - 797 | 99.097 - 807 | 324.78 - 817 | 777.777 -(5 rows) - -rollback; --- Now the same test with plpgsql (since it depends on SPI which is different) -create or replace function max_xacttest() returns smallint language plpgsql as -'begin return max(a) from xacttest; end' stable; -begin; -update xacttest set a = max_xacttest() + 10 where a > 0; -select * from xacttest; - a | b ------+--------- - 0 | 0.09561 - 787 | 7.8 - 787 | 99.097 - 787 | 324.78 - 787 | 777.777 -(5 rows) - -rollback; -create or replace function max_xacttest() returns smallint language plpgsql as -'begin return max(a) from xacttest; end' volatile; -begin; -update xacttest set a = max_xacttest() + 10 where a > 0; -select * from xacttest; - a | b ------+--------- - 0 | 0.09561 - 787 | 7.8 - 797 | 99.097 - 807 | 324.78 - 817 | 777.777 -(5 rows) - -rollback; --- test case for problems with dropping an open relation during abort -BEGIN; - savepoint x; - CREATE TABLE koju (a INT UNIQUE); - INSERT INTO koju VALUES (1); - INSERT INTO koju VALUES (1); -ERROR: duplicate key value violates unique constraint "koju_a_key" -DETAIL: Key (a)=(1) already exists. - rollback to x; - CREATE TABLE koju (a INT UNIQUE); - INSERT INTO koju VALUES (1); - INSERT INTO koju VALUES (1); -ERROR: duplicate key value violates unique constraint "koju_a_key" -DETAIL: Key (a)=(1) already exists. -ROLLBACK; -DROP TABLE trans_foo; -DROP TABLE trans_baz; -DROP TABLE trans_barbaz; --- test case for problems with revalidating an open relation during abort -create function inverse(int) returns float8 as -$$ -begin - analyze revalidate_bug; - return 1::float8/$1; -exception - when division_by_zero then return 0; -end$$ language plpgsql volatile; -create table revalidate_bug (c float8 unique); -insert into revalidate_bug values (1); -insert into revalidate_bug values (inverse(0)); -drop table revalidate_bug; -drop function inverse(int); --- verify that cursors created during an aborted subtransaction are --- closed, but that we do not rollback the effect of any FETCHs --- performed in the aborted subtransaction -begin; -savepoint x; -create table abc (a int); -insert into abc values (5); -insert into abc values (10); -declare foo cursor for select * from abc; -fetch from foo; - a ---- - 5 -(1 row) - -rollback to x; --- should fail -fetch from foo; -ERROR: cursor "foo" does not exist -commit; -begin; -create table abc (a int); -insert into abc values (5); -insert into abc values (10); -insert into abc values (15); -declare foo cursor for select * from abc; -fetch from foo; - a ---- - 5 -(1 row) - -savepoint x; -fetch from foo; - a ----- - 10 -(1 row) - -rollback to x; -fetch from foo; - a ----- - 15 -(1 row) - -abort; --- Test for proper cleanup after a failure in a cursor portal --- that was created in an outer subtransaction -CREATE FUNCTION invert(x float8) RETURNS float8 LANGUAGE plpgsql AS -$$ begin return 1/x; end $$; -CREATE FUNCTION create_temp_tab() RETURNS text -LANGUAGE plpgsql AS $$ -BEGIN - CREATE TEMP TABLE new_table (f1 float8); - -- case of interest is that we fail while holding an open - -- relcache reference to new_table - INSERT INTO new_table SELECT invert(0.0); - RETURN 'foo'; -END $$; -BEGIN; -DECLARE ok CURSOR FOR SELECT * FROM int8_tbl; -DECLARE ctt CURSOR FOR SELECT create_temp_tab(); -FETCH ok; - q1 | q2 ------+----- - 123 | 456 -(1 row) - -SAVEPOINT s1; -FETCH ok; -- should work - q1 | q2 ------+------------------ - 123 | 4567890123456789 -(1 row) - -FETCH ctt; -- error occurs here -ERROR: division by zero -CONTEXT: PL/pgSQL function invert(double precision) line 1 at RETURN -SQL statement "INSERT INTO new_table SELECT invert(0.0)" -PL/pgSQL function create_temp_tab() line 6 at SQL statement -ROLLBACK TO s1; -FETCH ok; -- should work - q1 | q2 -------------------+----- - 4567890123456789 | 123 -(1 row) - -FETCH ctt; -- must be rejected -ERROR: portal "ctt" cannot be run -COMMIT; -DROP FUNCTION create_temp_tab(); -DROP FUNCTION invert(x float8); --- Tests for AND CHAIN -CREATE TABLE abc (a int); --- set nondefault value so we have something to override below -SET default_transaction_read_only = on; -START TRANSACTION ISOLATION LEVEL REPEATABLE READ, READ WRITE, DEFERRABLE; -SHOW transaction_isolation; - transaction_isolation ------------------------ - repeatable read -(1 row) - -SHOW transaction_read_only; - transaction_read_only ------------------------ - off -(1 row) - -SHOW transaction_deferrable; - transaction_deferrable ------------------------- - on -(1 row) - -INSERT INTO abc VALUES (1); -INSERT INTO abc VALUES (2); -COMMIT AND CHAIN; -- TBLOCK_END -SHOW transaction_isolation; - transaction_isolation ------------------------ - repeatable read -(1 row) - -SHOW transaction_read_only; - transaction_read_only ------------------------ - off -(1 row) - -SHOW transaction_deferrable; - transaction_deferrable ------------------------- - on -(1 row) - -INSERT INTO abc VALUES ('error'); -ERROR: invalid input syntax for type integer: "error" -LINE 1: INSERT INTO abc VALUES ('error'); - ^ -INSERT INTO abc VALUES (3); -- check it's really aborted -ERROR: current transaction is aborted, commands ignored until end of transaction block -COMMIT AND CHAIN; -- TBLOCK_ABORT_END -SHOW transaction_isolation; - transaction_isolation ------------------------ - repeatable read -(1 row) - -SHOW transaction_read_only; - transaction_read_only ------------------------ - off -(1 row) - -SHOW transaction_deferrable; - transaction_deferrable ------------------------- - on -(1 row) - -INSERT INTO abc VALUES (4); -COMMIT; -START TRANSACTION ISOLATION LEVEL REPEATABLE READ, READ WRITE, DEFERRABLE; -SHOW transaction_isolation; - transaction_isolation ------------------------ - repeatable read -(1 row) - -SHOW transaction_read_only; - transaction_read_only ------------------------ - off -(1 row) - -SHOW transaction_deferrable; - transaction_deferrable ------------------------- - on -(1 row) - -SAVEPOINT x; -INSERT INTO abc VALUES ('error'); -ERROR: invalid input syntax for type integer: "error" -LINE 1: INSERT INTO abc VALUES ('error'); - ^ -COMMIT AND CHAIN; -- TBLOCK_ABORT_PENDING -SHOW transaction_isolation; - transaction_isolation ------------------------ - repeatable read -(1 row) - -SHOW transaction_read_only; - transaction_read_only ------------------------ - off -(1 row) - -SHOW transaction_deferrable; - transaction_deferrable ------------------------- - on -(1 row) - -INSERT INTO abc VALUES (5); -COMMIT; -START TRANSACTION ISOLATION LEVEL REPEATABLE READ, READ WRITE, DEFERRABLE; -SHOW transaction_isolation; - transaction_isolation ------------------------ - repeatable read -(1 row) - -SHOW transaction_read_only; - transaction_read_only ------------------------ - off -(1 row) - -SHOW transaction_deferrable; - transaction_deferrable ------------------------- - on -(1 row) - -SAVEPOINT x; -COMMIT AND CHAIN; -- TBLOCK_SUBCOMMIT -SHOW transaction_isolation; - transaction_isolation ------------------------ - repeatable read -(1 row) - -SHOW transaction_read_only; - transaction_read_only ------------------------ - off -(1 row) - -SHOW transaction_deferrable; - transaction_deferrable ------------------------- - on -(1 row) - -COMMIT; --- different mix of options just for fun -START TRANSACTION ISOLATION LEVEL SERIALIZABLE, READ WRITE, NOT DEFERRABLE; -SHOW transaction_isolation; - transaction_isolation ------------------------ - serializable -(1 row) - -SHOW transaction_read_only; - transaction_read_only ------------------------ - off -(1 row) - -SHOW transaction_deferrable; - transaction_deferrable ------------------------- - off -(1 row) - -INSERT INTO abc VALUES (6); -ROLLBACK AND CHAIN; -- TBLOCK_ABORT_PENDING -SHOW transaction_isolation; - transaction_isolation ------------------------ - serializable -(1 row) - -SHOW transaction_read_only; - transaction_read_only ------------------------ - off -(1 row) - -SHOW transaction_deferrable; - transaction_deferrable ------------------------- - off -(1 row) - -INSERT INTO abc VALUES ('error'); -ERROR: invalid input syntax for type integer: "error" -LINE 1: INSERT INTO abc VALUES ('error'); - ^ -ROLLBACK AND CHAIN; -- TBLOCK_ABORT_END -SHOW transaction_isolation; - transaction_isolation ------------------------ - serializable -(1 row) - -SHOW transaction_read_only; - transaction_read_only ------------------------ - off -(1 row) - -SHOW transaction_deferrable; - transaction_deferrable ------------------------- - off -(1 row) - -ROLLBACK; --- not allowed outside a transaction block -COMMIT AND CHAIN; -- error -ERROR: COMMIT AND CHAIN can only be used in transaction blocks -ROLLBACK AND CHAIN; -- error -ERROR: ROLLBACK AND CHAIN can only be used in transaction blocks -SELECT * FROM abc ORDER BY 1; - a ---- - 1 - 2 - 4 - 5 -(4 rows) - -RESET default_transaction_read_only; -DROP TABLE abc; --- Test assorted behaviors around the implicit transaction block created --- when multiple SQL commands are sent in a single Query message. These --- tests rely on the fact that psql will not break SQL commands apart at a --- backslash-quoted semicolon, but will send them as one Query. -create temp table i_table (f1 int); --- psql will show only the last result in a multi-statement Query -SELECT 1\; SELECT 2\; SELECT 3; - ?column? ----------- - 3 -(1 row) - --- this implicitly commits: -insert into i_table values(1)\; select * from i_table; - f1 ----- - 1 -(1 row) - --- 1/0 error will cause rolling back the whole implicit transaction -insert into i_table values(2)\; select * from i_table\; select 1/0; -ERROR: division by zero -select * from i_table; - f1 ----- - 1 -(1 row) - -rollback; -- we are not in a transaction at this point -WARNING: there is no transaction in progress --- can use regular begin/commit/rollback within a single Query -begin\; insert into i_table values(3)\; commit; -rollback; -- we are not in a transaction at this point -WARNING: there is no transaction in progress -begin\; insert into i_table values(4)\; rollback; -rollback; -- we are not in a transaction at this point -WARNING: there is no transaction in progress --- begin converts implicit transaction into a regular one that --- can extend past the end of the Query -select 1\; begin\; insert into i_table values(5); -commit; -select 1\; begin\; insert into i_table values(6); -rollback; --- commit in implicit-transaction state commits but issues a warning. -insert into i_table values(7)\; commit\; insert into i_table values(8)\; select 1/0; -WARNING: there is no transaction in progress -ERROR: division by zero --- similarly, rollback aborts but issues a warning. -insert into i_table values(9)\; rollback\; select 2; -WARNING: there is no transaction in progress - ?column? ----------- - 2 -(1 row) - -select * from i_table; - f1 ----- - 1 - 3 - 5 - 7 -(4 rows) - -rollback; -- we are not in a transaction at this point -WARNING: there is no transaction in progress --- implicit transaction block is still a transaction block, for e.g. VACUUM -SELECT 1\; VACUUM; -ERROR: VACUUM cannot run inside a transaction block -SELECT 1\; COMMIT\; VACUUM; -WARNING: there is no transaction in progress -ERROR: VACUUM cannot run inside a transaction block --- we disallow savepoint-related commands in implicit-transaction state -SELECT 1\; SAVEPOINT sp; -ERROR: SAVEPOINT can only be used in transaction blocks -SELECT 1\; COMMIT\; SAVEPOINT sp; -WARNING: there is no transaction in progress -ERROR: SAVEPOINT can only be used in transaction blocks -ROLLBACK TO SAVEPOINT sp\; SELECT 2; -ERROR: ROLLBACK TO SAVEPOINT can only be used in transaction blocks -SELECT 2\; RELEASE SAVEPOINT sp\; SELECT 3; -ERROR: RELEASE SAVEPOINT can only be used in transaction blocks --- but this is OK, because the BEGIN converts it to a regular xact -SELECT 1\; BEGIN\; SAVEPOINT sp\; ROLLBACK TO SAVEPOINT sp\; COMMIT; --- Tests for AND CHAIN in implicit transaction blocks -SET TRANSACTION READ ONLY\; COMMIT AND CHAIN; -- error -ERROR: COMMIT AND CHAIN can only be used in transaction blocks -SHOW transaction_read_only; - transaction_read_only ------------------------ - off -(1 row) - -SET TRANSACTION READ ONLY\; ROLLBACK AND CHAIN; -- error -ERROR: ROLLBACK AND CHAIN can only be used in transaction blocks -SHOW transaction_read_only; - transaction_read_only ------------------------ - off -(1 row) - -CREATE TABLE abc (a int); --- COMMIT/ROLLBACK + COMMIT/ROLLBACK AND CHAIN -INSERT INTO abc VALUES (7)\; COMMIT\; INSERT INTO abc VALUES (8)\; COMMIT AND CHAIN; -- 7 commit, 8 error -WARNING: there is no transaction in progress -ERROR: COMMIT AND CHAIN can only be used in transaction blocks -INSERT INTO abc VALUES (9)\; ROLLBACK\; INSERT INTO abc VALUES (10)\; ROLLBACK AND CHAIN; -- 9 rollback, 10 error -WARNING: there is no transaction in progress -ERROR: ROLLBACK AND CHAIN can only be used in transaction blocks --- COMMIT/ROLLBACK AND CHAIN + COMMIT/ROLLBACK -INSERT INTO abc VALUES (11)\; COMMIT AND CHAIN\; INSERT INTO abc VALUES (12)\; COMMIT; -- 11 error, 12 not reached -ERROR: COMMIT AND CHAIN can only be used in transaction blocks -INSERT INTO abc VALUES (13)\; ROLLBACK AND CHAIN\; INSERT INTO abc VALUES (14)\; ROLLBACK; -- 13 error, 14 not reached -ERROR: ROLLBACK AND CHAIN can only be used in transaction blocks --- START TRANSACTION + COMMIT/ROLLBACK AND CHAIN -START TRANSACTION ISOLATION LEVEL REPEATABLE READ\; INSERT INTO abc VALUES (15)\; COMMIT AND CHAIN; -- 15 ok -SHOW transaction_isolation; -- transaction is active at this point - transaction_isolation ------------------------ - repeatable read -(1 row) - -COMMIT; -START TRANSACTION ISOLATION LEVEL REPEATABLE READ\; INSERT INTO abc VALUES (16)\; ROLLBACK AND CHAIN; -- 16 ok -SHOW transaction_isolation; -- transaction is active at this point - transaction_isolation ------------------------ - repeatable read -(1 row) - -ROLLBACK; -SET default_transaction_isolation = 'read committed'; --- START TRANSACTION + COMMIT/ROLLBACK + COMMIT/ROLLBACK AND CHAIN -START TRANSACTION ISOLATION LEVEL REPEATABLE READ\; INSERT INTO abc VALUES (17)\; COMMIT\; INSERT INTO abc VALUES (18)\; COMMIT AND CHAIN; -- 17 commit, 18 error -ERROR: COMMIT AND CHAIN can only be used in transaction blocks -SHOW transaction_isolation; -- out of transaction block - transaction_isolation ------------------------ - read committed -(1 row) - -START TRANSACTION ISOLATION LEVEL REPEATABLE READ\; INSERT INTO abc VALUES (19)\; ROLLBACK\; INSERT INTO abc VALUES (20)\; ROLLBACK AND CHAIN; -- 19 rollback, 20 error -ERROR: ROLLBACK AND CHAIN can only be used in transaction blocks -SHOW transaction_isolation; -- out of transaction block - transaction_isolation ------------------------ - read committed -(1 row) - -RESET default_transaction_isolation; -SELECT * FROM abc ORDER BY 1; - a ----- - 7 - 15 - 17 -(3 rows) - -DROP TABLE abc; --- Test for successful cleanup of an aborted transaction at session exit. --- THIS MUST BE THE LAST TEST IN THIS FILE. -begin; -select 1/0; -ERROR: division by zero -rollback to X; -ERROR: savepoint "x" does not exist --- DO NOT ADD ANYTHING HERE. +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/random.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/random.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/random.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/random.out 2023-02-20 19:45:46.599211054 -0500 @@ -1,53 +1 @@ --- --- RANDOM --- Test the random function --- --- count the number of tuples originally, should be 1000 -SELECT count(*) FROM onek; - count -------- - 1000 -(1 row) - --- pick three random rows, they shouldn't match -(SELECT unique1 AS random - FROM onek ORDER BY random() LIMIT 1) -INTERSECT -(SELECT unique1 AS random - FROM onek ORDER BY random() LIMIT 1) -INTERSECT -(SELECT unique1 AS random - FROM onek ORDER BY random() LIMIT 1); - random --------- -(0 rows) - --- count roughly 1/10 of the tuples -CREATE TABLE RANDOM_TBL AS - SELECT count(*) AS random - FROM onek WHERE random() < 1.0/10; --- select again, the count should be different -INSERT INTO RANDOM_TBL (random) - SELECT count(*) - FROM onek WHERE random() < 1.0/10; --- select again, the count should be different -INSERT INTO RANDOM_TBL (random) - SELECT count(*) - FROM onek WHERE random() < 1.0/10; --- select again, the count should be different -INSERT INTO RANDOM_TBL (random) - SELECT count(*) - FROM onek WHERE random() < 1.0/10; --- now test that they are different counts -SELECT random, count(random) FROM RANDOM_TBL - GROUP BY random HAVING count(random) > 3; - random | count ---------+------- -(0 rows) - -SELECT AVG(random) FROM RANDOM_TBL - HAVING AVG(random) NOT BETWEEN 80 AND 120; - avg ------ -(0 rows) - +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/portals.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/portals.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/portals.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/portals.out 2023-02-20 19:45:46.579211053 -0500 @@ -1,1520 +1 @@ --- --- Cursor regression tests --- -BEGIN; -DECLARE foo1 SCROLL CURSOR FOR SELECT * FROM tenk1 ORDER BY unique2; -DECLARE foo2 SCROLL CURSOR FOR SELECT * FROM tenk2; -DECLARE foo3 SCROLL CURSOR FOR SELECT * FROM tenk1 ORDER BY unique2; -DECLARE foo4 SCROLL CURSOR FOR SELECT * FROM tenk2; -DECLARE foo5 SCROLL CURSOR FOR SELECT * FROM tenk1 ORDER BY unique2; -DECLARE foo6 SCROLL CURSOR FOR SELECT * FROM tenk2; -DECLARE foo7 SCROLL CURSOR FOR SELECT * FROM tenk1 ORDER BY unique2; -DECLARE foo8 SCROLL CURSOR FOR SELECT * FROM tenk2; -DECLARE foo9 SCROLL CURSOR FOR SELECT * FROM tenk1 ORDER BY unique2; -DECLARE foo10 SCROLL CURSOR FOR SELECT * FROM tenk2; -DECLARE foo11 SCROLL CURSOR FOR SELECT * FROM tenk1 ORDER BY unique2; -DECLARE foo12 SCROLL CURSOR FOR SELECT * FROM tenk2; -DECLARE foo13 SCROLL CURSOR FOR SELECT * FROM tenk1 ORDER BY unique2; -DECLARE foo14 SCROLL CURSOR FOR SELECT * FROM tenk2; -DECLARE foo15 SCROLL CURSOR FOR SELECT * FROM tenk1 ORDER BY unique2; -DECLARE foo16 SCROLL CURSOR FOR SELECT * FROM tenk2; -DECLARE foo17 SCROLL CURSOR FOR SELECT * FROM tenk1 ORDER BY unique2; -DECLARE foo18 SCROLL CURSOR FOR SELECT * FROM tenk2; -DECLARE foo19 SCROLL CURSOR FOR SELECT * FROM tenk1 ORDER BY unique2; -DECLARE foo20 SCROLL CURSOR FOR SELECT * FROM tenk2; -DECLARE foo21 SCROLL CURSOR FOR SELECT * FROM tenk1 ORDER BY unique2; -DECLARE foo22 SCROLL CURSOR FOR SELECT * FROM tenk2; -DECLARE foo23 SCROLL CURSOR FOR SELECT * FROM tenk1 ORDER BY unique2; -FETCH 1 in foo1; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx -(1 row) - -FETCH 2 in foo2; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx - 1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx -(2 rows) - -FETCH 3 in foo3; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx - 1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx - 3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx -(3 rows) - -FETCH 4 in foo4; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx - 1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx - 3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx - 9850 | 3 | 0 | 2 | 0 | 10 | 50 | 850 | 1850 | 4850 | 9850 | 100 | 101 | WOAAAA | DAAAAA | VVVVxx -(4 rows) - -FETCH 5 in foo5; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx - 1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx - 3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx - 9850 | 3 | 0 | 2 | 0 | 10 | 50 | 850 | 1850 | 4850 | 9850 | 100 | 101 | WOAAAA | DAAAAA | VVVVxx - 7164 | 4 | 0 | 0 | 4 | 4 | 64 | 164 | 1164 | 2164 | 7164 | 128 | 129 | OPAAAA | EAAAAA | AAAAxx -(5 rows) - -FETCH 6 in foo6; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx - 1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx - 3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx - 9850 | 3 | 0 | 2 | 0 | 10 | 50 | 850 | 1850 | 4850 | 9850 | 100 | 101 | WOAAAA | DAAAAA | VVVVxx - 7164 | 4 | 0 | 0 | 4 | 4 | 64 | 164 | 1164 | 2164 | 7164 | 128 | 129 | OPAAAA | EAAAAA | AAAAxx - 8009 | 5 | 1 | 1 | 9 | 9 | 9 | 9 | 9 | 3009 | 8009 | 18 | 19 | BWAAAA | FAAAAA | HHHHxx -(6 rows) - -FETCH 7 in foo7; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx - 1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx - 3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx - 9850 | 3 | 0 | 2 | 0 | 10 | 50 | 850 | 1850 | 4850 | 9850 | 100 | 101 | WOAAAA | DAAAAA | VVVVxx - 7164 | 4 | 0 | 0 | 4 | 4 | 64 | 164 | 1164 | 2164 | 7164 | 128 | 129 | OPAAAA | EAAAAA | AAAAxx - 8009 | 5 | 1 | 1 | 9 | 9 | 9 | 9 | 9 | 3009 | 8009 | 18 | 19 | BWAAAA | FAAAAA | HHHHxx - 5057 | 6 | 1 | 1 | 7 | 17 | 57 | 57 | 1057 | 57 | 5057 | 114 | 115 | NMAAAA | GAAAAA | OOOOxx -(7 rows) - -FETCH 8 in foo8; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx - 1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx - 3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx - 9850 | 3 | 0 | 2 | 0 | 10 | 50 | 850 | 1850 | 4850 | 9850 | 100 | 101 | WOAAAA | DAAAAA | VVVVxx - 7164 | 4 | 0 | 0 | 4 | 4 | 64 | 164 | 1164 | 2164 | 7164 | 128 | 129 | OPAAAA | EAAAAA | AAAAxx - 8009 | 5 | 1 | 1 | 9 | 9 | 9 | 9 | 9 | 3009 | 8009 | 18 | 19 | BWAAAA | FAAAAA | HHHHxx - 5057 | 6 | 1 | 1 | 7 | 17 | 57 | 57 | 1057 | 57 | 5057 | 114 | 115 | NMAAAA | GAAAAA | OOOOxx - 6701 | 7 | 1 | 1 | 1 | 1 | 1 | 701 | 701 | 1701 | 6701 | 2 | 3 | TXAAAA | HAAAAA | VVVVxx -(8 rows) - -FETCH 9 in foo9; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx - 1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx - 3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx - 9850 | 3 | 0 | 2 | 0 | 10 | 50 | 850 | 1850 | 4850 | 9850 | 100 | 101 | WOAAAA | DAAAAA | VVVVxx - 7164 | 4 | 0 | 0 | 4 | 4 | 64 | 164 | 1164 | 2164 | 7164 | 128 | 129 | OPAAAA | EAAAAA | AAAAxx - 8009 | 5 | 1 | 1 | 9 | 9 | 9 | 9 | 9 | 3009 | 8009 | 18 | 19 | BWAAAA | FAAAAA | HHHHxx - 5057 | 6 | 1 | 1 | 7 | 17 | 57 | 57 | 1057 | 57 | 5057 | 114 | 115 | NMAAAA | GAAAAA | OOOOxx - 6701 | 7 | 1 | 1 | 1 | 1 | 1 | 701 | 701 | 1701 | 6701 | 2 | 3 | TXAAAA | HAAAAA | VVVVxx - 4321 | 8 | 1 | 1 | 1 | 1 | 21 | 321 | 321 | 4321 | 4321 | 42 | 43 | FKAAAA | IAAAAA | AAAAxx -(9 rows) - -FETCH 10 in foo10; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx - 1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx - 3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx - 9850 | 3 | 0 | 2 | 0 | 10 | 50 | 850 | 1850 | 4850 | 9850 | 100 | 101 | WOAAAA | DAAAAA | VVVVxx - 7164 | 4 | 0 | 0 | 4 | 4 | 64 | 164 | 1164 | 2164 | 7164 | 128 | 129 | OPAAAA | EAAAAA | AAAAxx - 8009 | 5 | 1 | 1 | 9 | 9 | 9 | 9 | 9 | 3009 | 8009 | 18 | 19 | BWAAAA | FAAAAA | HHHHxx - 5057 | 6 | 1 | 1 | 7 | 17 | 57 | 57 | 1057 | 57 | 5057 | 114 | 115 | NMAAAA | GAAAAA | OOOOxx - 6701 | 7 | 1 | 1 | 1 | 1 | 1 | 701 | 701 | 1701 | 6701 | 2 | 3 | TXAAAA | HAAAAA | VVVVxx - 4321 | 8 | 1 | 1 | 1 | 1 | 21 | 321 | 321 | 4321 | 4321 | 42 | 43 | FKAAAA | IAAAAA | AAAAxx - 3043 | 9 | 1 | 3 | 3 | 3 | 43 | 43 | 1043 | 3043 | 3043 | 86 | 87 | BNAAAA | JAAAAA | HHHHxx -(10 rows) - -FETCH 11 in foo11; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx - 1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx - 3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx - 9850 | 3 | 0 | 2 | 0 | 10 | 50 | 850 | 1850 | 4850 | 9850 | 100 | 101 | WOAAAA | DAAAAA | VVVVxx - 7164 | 4 | 0 | 0 | 4 | 4 | 64 | 164 | 1164 | 2164 | 7164 | 128 | 129 | OPAAAA | EAAAAA | AAAAxx - 8009 | 5 | 1 | 1 | 9 | 9 | 9 | 9 | 9 | 3009 | 8009 | 18 | 19 | BWAAAA | FAAAAA | HHHHxx - 5057 | 6 | 1 | 1 | 7 | 17 | 57 | 57 | 1057 | 57 | 5057 | 114 | 115 | NMAAAA | GAAAAA | OOOOxx - 6701 | 7 | 1 | 1 | 1 | 1 | 1 | 701 | 701 | 1701 | 6701 | 2 | 3 | TXAAAA | HAAAAA | VVVVxx - 4321 | 8 | 1 | 1 | 1 | 1 | 21 | 321 | 321 | 4321 | 4321 | 42 | 43 | FKAAAA | IAAAAA | AAAAxx - 3043 | 9 | 1 | 3 | 3 | 3 | 43 | 43 | 1043 | 3043 | 3043 | 86 | 87 | BNAAAA | JAAAAA | HHHHxx - 1314 | 10 | 0 | 2 | 4 | 14 | 14 | 314 | 1314 | 1314 | 1314 | 28 | 29 | OYAAAA | KAAAAA | OOOOxx -(11 rows) - -FETCH 12 in foo12; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx - 1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx - 3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx - 9850 | 3 | 0 | 2 | 0 | 10 | 50 | 850 | 1850 | 4850 | 9850 | 100 | 101 | WOAAAA | DAAAAA | VVVVxx - 7164 | 4 | 0 | 0 | 4 | 4 | 64 | 164 | 1164 | 2164 | 7164 | 128 | 129 | OPAAAA | EAAAAA | AAAAxx - 8009 | 5 | 1 | 1 | 9 | 9 | 9 | 9 | 9 | 3009 | 8009 | 18 | 19 | BWAAAA | FAAAAA | HHHHxx - 5057 | 6 | 1 | 1 | 7 | 17 | 57 | 57 | 1057 | 57 | 5057 | 114 | 115 | NMAAAA | GAAAAA | OOOOxx - 6701 | 7 | 1 | 1 | 1 | 1 | 1 | 701 | 701 | 1701 | 6701 | 2 | 3 | TXAAAA | HAAAAA | VVVVxx - 4321 | 8 | 1 | 1 | 1 | 1 | 21 | 321 | 321 | 4321 | 4321 | 42 | 43 | FKAAAA | IAAAAA | AAAAxx - 3043 | 9 | 1 | 3 | 3 | 3 | 43 | 43 | 1043 | 3043 | 3043 | 86 | 87 | BNAAAA | JAAAAA | HHHHxx - 1314 | 10 | 0 | 2 | 4 | 14 | 14 | 314 | 1314 | 1314 | 1314 | 28 | 29 | OYAAAA | KAAAAA | OOOOxx - 1504 | 11 | 0 | 0 | 4 | 4 | 4 | 504 | 1504 | 1504 | 1504 | 8 | 9 | WFAAAA | LAAAAA | VVVVxx -(12 rows) - -FETCH 13 in foo13; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx - 1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx - 3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx - 9850 | 3 | 0 | 2 | 0 | 10 | 50 | 850 | 1850 | 4850 | 9850 | 100 | 101 | WOAAAA | DAAAAA | VVVVxx - 7164 | 4 | 0 | 0 | 4 | 4 | 64 | 164 | 1164 | 2164 | 7164 | 128 | 129 | OPAAAA | EAAAAA | AAAAxx - 8009 | 5 | 1 | 1 | 9 | 9 | 9 | 9 | 9 | 3009 | 8009 | 18 | 19 | BWAAAA | FAAAAA | HHHHxx - 5057 | 6 | 1 | 1 | 7 | 17 | 57 | 57 | 1057 | 57 | 5057 | 114 | 115 | NMAAAA | GAAAAA | OOOOxx - 6701 | 7 | 1 | 1 | 1 | 1 | 1 | 701 | 701 | 1701 | 6701 | 2 | 3 | TXAAAA | HAAAAA | VVVVxx - 4321 | 8 | 1 | 1 | 1 | 1 | 21 | 321 | 321 | 4321 | 4321 | 42 | 43 | FKAAAA | IAAAAA | AAAAxx - 3043 | 9 | 1 | 3 | 3 | 3 | 43 | 43 | 1043 | 3043 | 3043 | 86 | 87 | BNAAAA | JAAAAA | HHHHxx - 1314 | 10 | 0 | 2 | 4 | 14 | 14 | 314 | 1314 | 1314 | 1314 | 28 | 29 | OYAAAA | KAAAAA | OOOOxx - 1504 | 11 | 0 | 0 | 4 | 4 | 4 | 504 | 1504 | 1504 | 1504 | 8 | 9 | WFAAAA | LAAAAA | VVVVxx - 5222 | 12 | 0 | 2 | 2 | 2 | 22 | 222 | 1222 | 222 | 5222 | 44 | 45 | WSAAAA | MAAAAA | AAAAxx -(13 rows) - -FETCH 14 in foo14; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx - 1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx - 3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx - 9850 | 3 | 0 | 2 | 0 | 10 | 50 | 850 | 1850 | 4850 | 9850 | 100 | 101 | WOAAAA | DAAAAA | VVVVxx - 7164 | 4 | 0 | 0 | 4 | 4 | 64 | 164 | 1164 | 2164 | 7164 | 128 | 129 | OPAAAA | EAAAAA | AAAAxx - 8009 | 5 | 1 | 1 | 9 | 9 | 9 | 9 | 9 | 3009 | 8009 | 18 | 19 | BWAAAA | FAAAAA | HHHHxx - 5057 | 6 | 1 | 1 | 7 | 17 | 57 | 57 | 1057 | 57 | 5057 | 114 | 115 | NMAAAA | GAAAAA | OOOOxx - 6701 | 7 | 1 | 1 | 1 | 1 | 1 | 701 | 701 | 1701 | 6701 | 2 | 3 | TXAAAA | HAAAAA | VVVVxx - 4321 | 8 | 1 | 1 | 1 | 1 | 21 | 321 | 321 | 4321 | 4321 | 42 | 43 | FKAAAA | IAAAAA | AAAAxx - 3043 | 9 | 1 | 3 | 3 | 3 | 43 | 43 | 1043 | 3043 | 3043 | 86 | 87 | BNAAAA | JAAAAA | HHHHxx - 1314 | 10 | 0 | 2 | 4 | 14 | 14 | 314 | 1314 | 1314 | 1314 | 28 | 29 | OYAAAA | KAAAAA | OOOOxx - 1504 | 11 | 0 | 0 | 4 | 4 | 4 | 504 | 1504 | 1504 | 1504 | 8 | 9 | WFAAAA | LAAAAA | VVVVxx - 5222 | 12 | 0 | 2 | 2 | 2 | 22 | 222 | 1222 | 222 | 5222 | 44 | 45 | WSAAAA | MAAAAA | AAAAxx - 6243 | 13 | 1 | 3 | 3 | 3 | 43 | 243 | 243 | 1243 | 6243 | 86 | 87 | DGAAAA | NAAAAA | HHHHxx -(14 rows) - -FETCH 15 in foo15; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx - 1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx - 3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx - 9850 | 3 | 0 | 2 | 0 | 10 | 50 | 850 | 1850 | 4850 | 9850 | 100 | 101 | WOAAAA | DAAAAA | VVVVxx - 7164 | 4 | 0 | 0 | 4 | 4 | 64 | 164 | 1164 | 2164 | 7164 | 128 | 129 | OPAAAA | EAAAAA | AAAAxx - 8009 | 5 | 1 | 1 | 9 | 9 | 9 | 9 | 9 | 3009 | 8009 | 18 | 19 | BWAAAA | FAAAAA | HHHHxx - 5057 | 6 | 1 | 1 | 7 | 17 | 57 | 57 | 1057 | 57 | 5057 | 114 | 115 | NMAAAA | GAAAAA | OOOOxx - 6701 | 7 | 1 | 1 | 1 | 1 | 1 | 701 | 701 | 1701 | 6701 | 2 | 3 | TXAAAA | HAAAAA | VVVVxx - 4321 | 8 | 1 | 1 | 1 | 1 | 21 | 321 | 321 | 4321 | 4321 | 42 | 43 | FKAAAA | IAAAAA | AAAAxx - 3043 | 9 | 1 | 3 | 3 | 3 | 43 | 43 | 1043 | 3043 | 3043 | 86 | 87 | BNAAAA | JAAAAA | HHHHxx - 1314 | 10 | 0 | 2 | 4 | 14 | 14 | 314 | 1314 | 1314 | 1314 | 28 | 29 | OYAAAA | KAAAAA | OOOOxx - 1504 | 11 | 0 | 0 | 4 | 4 | 4 | 504 | 1504 | 1504 | 1504 | 8 | 9 | WFAAAA | LAAAAA | VVVVxx - 5222 | 12 | 0 | 2 | 2 | 2 | 22 | 222 | 1222 | 222 | 5222 | 44 | 45 | WSAAAA | MAAAAA | AAAAxx - 6243 | 13 | 1 | 3 | 3 | 3 | 43 | 243 | 243 | 1243 | 6243 | 86 | 87 | DGAAAA | NAAAAA | HHHHxx - 5471 | 14 | 1 | 3 | 1 | 11 | 71 | 471 | 1471 | 471 | 5471 | 142 | 143 | LCAAAA | OAAAAA | OOOOxx -(15 rows) - -FETCH 16 in foo16; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx - 1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx - 3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx - 9850 | 3 | 0 | 2 | 0 | 10 | 50 | 850 | 1850 | 4850 | 9850 | 100 | 101 | WOAAAA | DAAAAA | VVVVxx - 7164 | 4 | 0 | 0 | 4 | 4 | 64 | 164 | 1164 | 2164 | 7164 | 128 | 129 | OPAAAA | EAAAAA | AAAAxx - 8009 | 5 | 1 | 1 | 9 | 9 | 9 | 9 | 9 | 3009 | 8009 | 18 | 19 | BWAAAA | FAAAAA | HHHHxx - 5057 | 6 | 1 | 1 | 7 | 17 | 57 | 57 | 1057 | 57 | 5057 | 114 | 115 | NMAAAA | GAAAAA | OOOOxx - 6701 | 7 | 1 | 1 | 1 | 1 | 1 | 701 | 701 | 1701 | 6701 | 2 | 3 | TXAAAA | HAAAAA | VVVVxx - 4321 | 8 | 1 | 1 | 1 | 1 | 21 | 321 | 321 | 4321 | 4321 | 42 | 43 | FKAAAA | IAAAAA | AAAAxx - 3043 | 9 | 1 | 3 | 3 | 3 | 43 | 43 | 1043 | 3043 | 3043 | 86 | 87 | BNAAAA | JAAAAA | HHHHxx - 1314 | 10 | 0 | 2 | 4 | 14 | 14 | 314 | 1314 | 1314 | 1314 | 28 | 29 | OYAAAA | KAAAAA | OOOOxx - 1504 | 11 | 0 | 0 | 4 | 4 | 4 | 504 | 1504 | 1504 | 1504 | 8 | 9 | WFAAAA | LAAAAA | VVVVxx - 5222 | 12 | 0 | 2 | 2 | 2 | 22 | 222 | 1222 | 222 | 5222 | 44 | 45 | WSAAAA | MAAAAA | AAAAxx - 6243 | 13 | 1 | 3 | 3 | 3 | 43 | 243 | 243 | 1243 | 6243 | 86 | 87 | DGAAAA | NAAAAA | HHHHxx - 5471 | 14 | 1 | 3 | 1 | 11 | 71 | 471 | 1471 | 471 | 5471 | 142 | 143 | LCAAAA | OAAAAA | OOOOxx - 5006 | 15 | 0 | 2 | 6 | 6 | 6 | 6 | 1006 | 6 | 5006 | 12 | 13 | OKAAAA | PAAAAA | VVVVxx -(16 rows) - -FETCH 17 in foo17; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx - 1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx - 3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx - 9850 | 3 | 0 | 2 | 0 | 10 | 50 | 850 | 1850 | 4850 | 9850 | 100 | 101 | WOAAAA | DAAAAA | VVVVxx - 7164 | 4 | 0 | 0 | 4 | 4 | 64 | 164 | 1164 | 2164 | 7164 | 128 | 129 | OPAAAA | EAAAAA | AAAAxx - 8009 | 5 | 1 | 1 | 9 | 9 | 9 | 9 | 9 | 3009 | 8009 | 18 | 19 | BWAAAA | FAAAAA | HHHHxx - 5057 | 6 | 1 | 1 | 7 | 17 | 57 | 57 | 1057 | 57 | 5057 | 114 | 115 | NMAAAA | GAAAAA | OOOOxx - 6701 | 7 | 1 | 1 | 1 | 1 | 1 | 701 | 701 | 1701 | 6701 | 2 | 3 | TXAAAA | HAAAAA | VVVVxx - 4321 | 8 | 1 | 1 | 1 | 1 | 21 | 321 | 321 | 4321 | 4321 | 42 | 43 | FKAAAA | IAAAAA | AAAAxx - 3043 | 9 | 1 | 3 | 3 | 3 | 43 | 43 | 1043 | 3043 | 3043 | 86 | 87 | BNAAAA | JAAAAA | HHHHxx - 1314 | 10 | 0 | 2 | 4 | 14 | 14 | 314 | 1314 | 1314 | 1314 | 28 | 29 | OYAAAA | KAAAAA | OOOOxx - 1504 | 11 | 0 | 0 | 4 | 4 | 4 | 504 | 1504 | 1504 | 1504 | 8 | 9 | WFAAAA | LAAAAA | VVVVxx - 5222 | 12 | 0 | 2 | 2 | 2 | 22 | 222 | 1222 | 222 | 5222 | 44 | 45 | WSAAAA | MAAAAA | AAAAxx - 6243 | 13 | 1 | 3 | 3 | 3 | 43 | 243 | 243 | 1243 | 6243 | 86 | 87 | DGAAAA | NAAAAA | HHHHxx - 5471 | 14 | 1 | 3 | 1 | 11 | 71 | 471 | 1471 | 471 | 5471 | 142 | 143 | LCAAAA | OAAAAA | OOOOxx - 5006 | 15 | 0 | 2 | 6 | 6 | 6 | 6 | 1006 | 6 | 5006 | 12 | 13 | OKAAAA | PAAAAA | VVVVxx - 5387 | 16 | 1 | 3 | 7 | 7 | 87 | 387 | 1387 | 387 | 5387 | 174 | 175 | FZAAAA | QAAAAA | AAAAxx -(17 rows) - -FETCH 18 in foo18; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx - 1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx - 3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx - 9850 | 3 | 0 | 2 | 0 | 10 | 50 | 850 | 1850 | 4850 | 9850 | 100 | 101 | WOAAAA | DAAAAA | VVVVxx - 7164 | 4 | 0 | 0 | 4 | 4 | 64 | 164 | 1164 | 2164 | 7164 | 128 | 129 | OPAAAA | EAAAAA | AAAAxx - 8009 | 5 | 1 | 1 | 9 | 9 | 9 | 9 | 9 | 3009 | 8009 | 18 | 19 | BWAAAA | FAAAAA | HHHHxx - 5057 | 6 | 1 | 1 | 7 | 17 | 57 | 57 | 1057 | 57 | 5057 | 114 | 115 | NMAAAA | GAAAAA | OOOOxx - 6701 | 7 | 1 | 1 | 1 | 1 | 1 | 701 | 701 | 1701 | 6701 | 2 | 3 | TXAAAA | HAAAAA | VVVVxx - 4321 | 8 | 1 | 1 | 1 | 1 | 21 | 321 | 321 | 4321 | 4321 | 42 | 43 | FKAAAA | IAAAAA | AAAAxx - 3043 | 9 | 1 | 3 | 3 | 3 | 43 | 43 | 1043 | 3043 | 3043 | 86 | 87 | BNAAAA | JAAAAA | HHHHxx - 1314 | 10 | 0 | 2 | 4 | 14 | 14 | 314 | 1314 | 1314 | 1314 | 28 | 29 | OYAAAA | KAAAAA | OOOOxx - 1504 | 11 | 0 | 0 | 4 | 4 | 4 | 504 | 1504 | 1504 | 1504 | 8 | 9 | WFAAAA | LAAAAA | VVVVxx - 5222 | 12 | 0 | 2 | 2 | 2 | 22 | 222 | 1222 | 222 | 5222 | 44 | 45 | WSAAAA | MAAAAA | AAAAxx - 6243 | 13 | 1 | 3 | 3 | 3 | 43 | 243 | 243 | 1243 | 6243 | 86 | 87 | DGAAAA | NAAAAA | HHHHxx - 5471 | 14 | 1 | 3 | 1 | 11 | 71 | 471 | 1471 | 471 | 5471 | 142 | 143 | LCAAAA | OAAAAA | OOOOxx - 5006 | 15 | 0 | 2 | 6 | 6 | 6 | 6 | 1006 | 6 | 5006 | 12 | 13 | OKAAAA | PAAAAA | VVVVxx - 5387 | 16 | 1 | 3 | 7 | 7 | 87 | 387 | 1387 | 387 | 5387 | 174 | 175 | FZAAAA | QAAAAA | AAAAxx - 5785 | 17 | 1 | 1 | 5 | 5 | 85 | 785 | 1785 | 785 | 5785 | 170 | 171 | NOAAAA | RAAAAA | HHHHxx -(18 rows) - -FETCH 19 in foo19; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx - 1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx - 3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx - 9850 | 3 | 0 | 2 | 0 | 10 | 50 | 850 | 1850 | 4850 | 9850 | 100 | 101 | WOAAAA | DAAAAA | VVVVxx - 7164 | 4 | 0 | 0 | 4 | 4 | 64 | 164 | 1164 | 2164 | 7164 | 128 | 129 | OPAAAA | EAAAAA | AAAAxx - 8009 | 5 | 1 | 1 | 9 | 9 | 9 | 9 | 9 | 3009 | 8009 | 18 | 19 | BWAAAA | FAAAAA | HHHHxx - 5057 | 6 | 1 | 1 | 7 | 17 | 57 | 57 | 1057 | 57 | 5057 | 114 | 115 | NMAAAA | GAAAAA | OOOOxx - 6701 | 7 | 1 | 1 | 1 | 1 | 1 | 701 | 701 | 1701 | 6701 | 2 | 3 | TXAAAA | HAAAAA | VVVVxx - 4321 | 8 | 1 | 1 | 1 | 1 | 21 | 321 | 321 | 4321 | 4321 | 42 | 43 | FKAAAA | IAAAAA | AAAAxx - 3043 | 9 | 1 | 3 | 3 | 3 | 43 | 43 | 1043 | 3043 | 3043 | 86 | 87 | BNAAAA | JAAAAA | HHHHxx - 1314 | 10 | 0 | 2 | 4 | 14 | 14 | 314 | 1314 | 1314 | 1314 | 28 | 29 | OYAAAA | KAAAAA | OOOOxx - 1504 | 11 | 0 | 0 | 4 | 4 | 4 | 504 | 1504 | 1504 | 1504 | 8 | 9 | WFAAAA | LAAAAA | VVVVxx - 5222 | 12 | 0 | 2 | 2 | 2 | 22 | 222 | 1222 | 222 | 5222 | 44 | 45 | WSAAAA | MAAAAA | AAAAxx - 6243 | 13 | 1 | 3 | 3 | 3 | 43 | 243 | 243 | 1243 | 6243 | 86 | 87 | DGAAAA | NAAAAA | HHHHxx - 5471 | 14 | 1 | 3 | 1 | 11 | 71 | 471 | 1471 | 471 | 5471 | 142 | 143 | LCAAAA | OAAAAA | OOOOxx - 5006 | 15 | 0 | 2 | 6 | 6 | 6 | 6 | 1006 | 6 | 5006 | 12 | 13 | OKAAAA | PAAAAA | VVVVxx - 5387 | 16 | 1 | 3 | 7 | 7 | 87 | 387 | 1387 | 387 | 5387 | 174 | 175 | FZAAAA | QAAAAA | AAAAxx - 5785 | 17 | 1 | 1 | 5 | 5 | 85 | 785 | 1785 | 785 | 5785 | 170 | 171 | NOAAAA | RAAAAA | HHHHxx - 6621 | 18 | 1 | 1 | 1 | 1 | 21 | 621 | 621 | 1621 | 6621 | 42 | 43 | RUAAAA | SAAAAA | OOOOxx -(19 rows) - -FETCH 20 in foo20; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx - 1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx - 3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx - 9850 | 3 | 0 | 2 | 0 | 10 | 50 | 850 | 1850 | 4850 | 9850 | 100 | 101 | WOAAAA | DAAAAA | VVVVxx - 7164 | 4 | 0 | 0 | 4 | 4 | 64 | 164 | 1164 | 2164 | 7164 | 128 | 129 | OPAAAA | EAAAAA | AAAAxx - 8009 | 5 | 1 | 1 | 9 | 9 | 9 | 9 | 9 | 3009 | 8009 | 18 | 19 | BWAAAA | FAAAAA | HHHHxx - 5057 | 6 | 1 | 1 | 7 | 17 | 57 | 57 | 1057 | 57 | 5057 | 114 | 115 | NMAAAA | GAAAAA | OOOOxx - 6701 | 7 | 1 | 1 | 1 | 1 | 1 | 701 | 701 | 1701 | 6701 | 2 | 3 | TXAAAA | HAAAAA | VVVVxx - 4321 | 8 | 1 | 1 | 1 | 1 | 21 | 321 | 321 | 4321 | 4321 | 42 | 43 | FKAAAA | IAAAAA | AAAAxx - 3043 | 9 | 1 | 3 | 3 | 3 | 43 | 43 | 1043 | 3043 | 3043 | 86 | 87 | BNAAAA | JAAAAA | HHHHxx - 1314 | 10 | 0 | 2 | 4 | 14 | 14 | 314 | 1314 | 1314 | 1314 | 28 | 29 | OYAAAA | KAAAAA | OOOOxx - 1504 | 11 | 0 | 0 | 4 | 4 | 4 | 504 | 1504 | 1504 | 1504 | 8 | 9 | WFAAAA | LAAAAA | VVVVxx - 5222 | 12 | 0 | 2 | 2 | 2 | 22 | 222 | 1222 | 222 | 5222 | 44 | 45 | WSAAAA | MAAAAA | AAAAxx - 6243 | 13 | 1 | 3 | 3 | 3 | 43 | 243 | 243 | 1243 | 6243 | 86 | 87 | DGAAAA | NAAAAA | HHHHxx - 5471 | 14 | 1 | 3 | 1 | 11 | 71 | 471 | 1471 | 471 | 5471 | 142 | 143 | LCAAAA | OAAAAA | OOOOxx - 5006 | 15 | 0 | 2 | 6 | 6 | 6 | 6 | 1006 | 6 | 5006 | 12 | 13 | OKAAAA | PAAAAA | VVVVxx - 5387 | 16 | 1 | 3 | 7 | 7 | 87 | 387 | 1387 | 387 | 5387 | 174 | 175 | FZAAAA | QAAAAA | AAAAxx - 5785 | 17 | 1 | 1 | 5 | 5 | 85 | 785 | 1785 | 785 | 5785 | 170 | 171 | NOAAAA | RAAAAA | HHHHxx - 6621 | 18 | 1 | 1 | 1 | 1 | 21 | 621 | 621 | 1621 | 6621 | 42 | 43 | RUAAAA | SAAAAA | OOOOxx - 6969 | 19 | 1 | 1 | 9 | 9 | 69 | 969 | 969 | 1969 | 6969 | 138 | 139 | BIAAAA | TAAAAA | VVVVxx -(20 rows) - -FETCH 21 in foo21; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx - 1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx - 3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx - 9850 | 3 | 0 | 2 | 0 | 10 | 50 | 850 | 1850 | 4850 | 9850 | 100 | 101 | WOAAAA | DAAAAA | VVVVxx - 7164 | 4 | 0 | 0 | 4 | 4 | 64 | 164 | 1164 | 2164 | 7164 | 128 | 129 | OPAAAA | EAAAAA | AAAAxx - 8009 | 5 | 1 | 1 | 9 | 9 | 9 | 9 | 9 | 3009 | 8009 | 18 | 19 | BWAAAA | FAAAAA | HHHHxx - 5057 | 6 | 1 | 1 | 7 | 17 | 57 | 57 | 1057 | 57 | 5057 | 114 | 115 | NMAAAA | GAAAAA | OOOOxx - 6701 | 7 | 1 | 1 | 1 | 1 | 1 | 701 | 701 | 1701 | 6701 | 2 | 3 | TXAAAA | HAAAAA | VVVVxx - 4321 | 8 | 1 | 1 | 1 | 1 | 21 | 321 | 321 | 4321 | 4321 | 42 | 43 | FKAAAA | IAAAAA | AAAAxx - 3043 | 9 | 1 | 3 | 3 | 3 | 43 | 43 | 1043 | 3043 | 3043 | 86 | 87 | BNAAAA | JAAAAA | HHHHxx - 1314 | 10 | 0 | 2 | 4 | 14 | 14 | 314 | 1314 | 1314 | 1314 | 28 | 29 | OYAAAA | KAAAAA | OOOOxx - 1504 | 11 | 0 | 0 | 4 | 4 | 4 | 504 | 1504 | 1504 | 1504 | 8 | 9 | WFAAAA | LAAAAA | VVVVxx - 5222 | 12 | 0 | 2 | 2 | 2 | 22 | 222 | 1222 | 222 | 5222 | 44 | 45 | WSAAAA | MAAAAA | AAAAxx - 6243 | 13 | 1 | 3 | 3 | 3 | 43 | 243 | 243 | 1243 | 6243 | 86 | 87 | DGAAAA | NAAAAA | HHHHxx - 5471 | 14 | 1 | 3 | 1 | 11 | 71 | 471 | 1471 | 471 | 5471 | 142 | 143 | LCAAAA | OAAAAA | OOOOxx - 5006 | 15 | 0 | 2 | 6 | 6 | 6 | 6 | 1006 | 6 | 5006 | 12 | 13 | OKAAAA | PAAAAA | VVVVxx - 5387 | 16 | 1 | 3 | 7 | 7 | 87 | 387 | 1387 | 387 | 5387 | 174 | 175 | FZAAAA | QAAAAA | AAAAxx - 5785 | 17 | 1 | 1 | 5 | 5 | 85 | 785 | 1785 | 785 | 5785 | 170 | 171 | NOAAAA | RAAAAA | HHHHxx - 6621 | 18 | 1 | 1 | 1 | 1 | 21 | 621 | 621 | 1621 | 6621 | 42 | 43 | RUAAAA | SAAAAA | OOOOxx - 6969 | 19 | 1 | 1 | 9 | 9 | 69 | 969 | 969 | 1969 | 6969 | 138 | 139 | BIAAAA | TAAAAA | VVVVxx - 9460 | 20 | 0 | 0 | 0 | 0 | 60 | 460 | 1460 | 4460 | 9460 | 120 | 121 | WZAAAA | UAAAAA | AAAAxx -(21 rows) - -FETCH 22 in foo22; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx - 1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx - 3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx - 9850 | 3 | 0 | 2 | 0 | 10 | 50 | 850 | 1850 | 4850 | 9850 | 100 | 101 | WOAAAA | DAAAAA | VVVVxx - 7164 | 4 | 0 | 0 | 4 | 4 | 64 | 164 | 1164 | 2164 | 7164 | 128 | 129 | OPAAAA | EAAAAA | AAAAxx - 8009 | 5 | 1 | 1 | 9 | 9 | 9 | 9 | 9 | 3009 | 8009 | 18 | 19 | BWAAAA | FAAAAA | HHHHxx - 5057 | 6 | 1 | 1 | 7 | 17 | 57 | 57 | 1057 | 57 | 5057 | 114 | 115 | NMAAAA | GAAAAA | OOOOxx - 6701 | 7 | 1 | 1 | 1 | 1 | 1 | 701 | 701 | 1701 | 6701 | 2 | 3 | TXAAAA | HAAAAA | VVVVxx - 4321 | 8 | 1 | 1 | 1 | 1 | 21 | 321 | 321 | 4321 | 4321 | 42 | 43 | FKAAAA | IAAAAA | AAAAxx - 3043 | 9 | 1 | 3 | 3 | 3 | 43 | 43 | 1043 | 3043 | 3043 | 86 | 87 | BNAAAA | JAAAAA | HHHHxx - 1314 | 10 | 0 | 2 | 4 | 14 | 14 | 314 | 1314 | 1314 | 1314 | 28 | 29 | OYAAAA | KAAAAA | OOOOxx - 1504 | 11 | 0 | 0 | 4 | 4 | 4 | 504 | 1504 | 1504 | 1504 | 8 | 9 | WFAAAA | LAAAAA | VVVVxx - 5222 | 12 | 0 | 2 | 2 | 2 | 22 | 222 | 1222 | 222 | 5222 | 44 | 45 | WSAAAA | MAAAAA | AAAAxx - 6243 | 13 | 1 | 3 | 3 | 3 | 43 | 243 | 243 | 1243 | 6243 | 86 | 87 | DGAAAA | NAAAAA | HHHHxx - 5471 | 14 | 1 | 3 | 1 | 11 | 71 | 471 | 1471 | 471 | 5471 | 142 | 143 | LCAAAA | OAAAAA | OOOOxx - 5006 | 15 | 0 | 2 | 6 | 6 | 6 | 6 | 1006 | 6 | 5006 | 12 | 13 | OKAAAA | PAAAAA | VVVVxx - 5387 | 16 | 1 | 3 | 7 | 7 | 87 | 387 | 1387 | 387 | 5387 | 174 | 175 | FZAAAA | QAAAAA | AAAAxx - 5785 | 17 | 1 | 1 | 5 | 5 | 85 | 785 | 1785 | 785 | 5785 | 170 | 171 | NOAAAA | RAAAAA | HHHHxx - 6621 | 18 | 1 | 1 | 1 | 1 | 21 | 621 | 621 | 1621 | 6621 | 42 | 43 | RUAAAA | SAAAAA | OOOOxx - 6969 | 19 | 1 | 1 | 9 | 9 | 69 | 969 | 969 | 1969 | 6969 | 138 | 139 | BIAAAA | TAAAAA | VVVVxx - 9460 | 20 | 0 | 0 | 0 | 0 | 60 | 460 | 1460 | 4460 | 9460 | 120 | 121 | WZAAAA | UAAAAA | AAAAxx - 59 | 21 | 1 | 3 | 9 | 19 | 59 | 59 | 59 | 59 | 59 | 118 | 119 | HCAAAA | VAAAAA | HHHHxx -(22 rows) - -FETCH 23 in foo23; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx - 1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx - 3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx - 9850 | 3 | 0 | 2 | 0 | 10 | 50 | 850 | 1850 | 4850 | 9850 | 100 | 101 | WOAAAA | DAAAAA | VVVVxx - 7164 | 4 | 0 | 0 | 4 | 4 | 64 | 164 | 1164 | 2164 | 7164 | 128 | 129 | OPAAAA | EAAAAA | AAAAxx - 8009 | 5 | 1 | 1 | 9 | 9 | 9 | 9 | 9 | 3009 | 8009 | 18 | 19 | BWAAAA | FAAAAA | HHHHxx - 5057 | 6 | 1 | 1 | 7 | 17 | 57 | 57 | 1057 | 57 | 5057 | 114 | 115 | NMAAAA | GAAAAA | OOOOxx - 6701 | 7 | 1 | 1 | 1 | 1 | 1 | 701 | 701 | 1701 | 6701 | 2 | 3 | TXAAAA | HAAAAA | VVVVxx - 4321 | 8 | 1 | 1 | 1 | 1 | 21 | 321 | 321 | 4321 | 4321 | 42 | 43 | FKAAAA | IAAAAA | AAAAxx - 3043 | 9 | 1 | 3 | 3 | 3 | 43 | 43 | 1043 | 3043 | 3043 | 86 | 87 | BNAAAA | JAAAAA | HHHHxx - 1314 | 10 | 0 | 2 | 4 | 14 | 14 | 314 | 1314 | 1314 | 1314 | 28 | 29 | OYAAAA | KAAAAA | OOOOxx - 1504 | 11 | 0 | 0 | 4 | 4 | 4 | 504 | 1504 | 1504 | 1504 | 8 | 9 | WFAAAA | LAAAAA | VVVVxx - 5222 | 12 | 0 | 2 | 2 | 2 | 22 | 222 | 1222 | 222 | 5222 | 44 | 45 | WSAAAA | MAAAAA | AAAAxx - 6243 | 13 | 1 | 3 | 3 | 3 | 43 | 243 | 243 | 1243 | 6243 | 86 | 87 | DGAAAA | NAAAAA | HHHHxx - 5471 | 14 | 1 | 3 | 1 | 11 | 71 | 471 | 1471 | 471 | 5471 | 142 | 143 | LCAAAA | OAAAAA | OOOOxx - 5006 | 15 | 0 | 2 | 6 | 6 | 6 | 6 | 1006 | 6 | 5006 | 12 | 13 | OKAAAA | PAAAAA | VVVVxx - 5387 | 16 | 1 | 3 | 7 | 7 | 87 | 387 | 1387 | 387 | 5387 | 174 | 175 | FZAAAA | QAAAAA | AAAAxx - 5785 | 17 | 1 | 1 | 5 | 5 | 85 | 785 | 1785 | 785 | 5785 | 170 | 171 | NOAAAA | RAAAAA | HHHHxx - 6621 | 18 | 1 | 1 | 1 | 1 | 21 | 621 | 621 | 1621 | 6621 | 42 | 43 | RUAAAA | SAAAAA | OOOOxx - 6969 | 19 | 1 | 1 | 9 | 9 | 69 | 969 | 969 | 1969 | 6969 | 138 | 139 | BIAAAA | TAAAAA | VVVVxx - 9460 | 20 | 0 | 0 | 0 | 0 | 60 | 460 | 1460 | 4460 | 9460 | 120 | 121 | WZAAAA | UAAAAA | AAAAxx - 59 | 21 | 1 | 3 | 9 | 19 | 59 | 59 | 59 | 59 | 59 | 118 | 119 | HCAAAA | VAAAAA | HHHHxx - 8020 | 22 | 0 | 0 | 0 | 0 | 20 | 20 | 20 | 3020 | 8020 | 40 | 41 | MWAAAA | WAAAAA | OOOOxx -(23 rows) - -FETCH backward 1 in foo23; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 59 | 21 | 1 | 3 | 9 | 19 | 59 | 59 | 59 | 59 | 59 | 118 | 119 | HCAAAA | VAAAAA | HHHHxx -(1 row) - -FETCH backward 2 in foo22; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 9460 | 20 | 0 | 0 | 0 | 0 | 60 | 460 | 1460 | 4460 | 9460 | 120 | 121 | WZAAAA | UAAAAA | AAAAxx - 6969 | 19 | 1 | 1 | 9 | 9 | 69 | 969 | 969 | 1969 | 6969 | 138 | 139 | BIAAAA | TAAAAA | VVVVxx -(2 rows) - -FETCH backward 3 in foo21; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 6969 | 19 | 1 | 1 | 9 | 9 | 69 | 969 | 969 | 1969 | 6969 | 138 | 139 | BIAAAA | TAAAAA | VVVVxx - 6621 | 18 | 1 | 1 | 1 | 1 | 21 | 621 | 621 | 1621 | 6621 | 42 | 43 | RUAAAA | SAAAAA | OOOOxx - 5785 | 17 | 1 | 1 | 5 | 5 | 85 | 785 | 1785 | 785 | 5785 | 170 | 171 | NOAAAA | RAAAAA | HHHHxx -(3 rows) - -FETCH backward 4 in foo20; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 6621 | 18 | 1 | 1 | 1 | 1 | 21 | 621 | 621 | 1621 | 6621 | 42 | 43 | RUAAAA | SAAAAA | OOOOxx - 5785 | 17 | 1 | 1 | 5 | 5 | 85 | 785 | 1785 | 785 | 5785 | 170 | 171 | NOAAAA | RAAAAA | HHHHxx - 5387 | 16 | 1 | 3 | 7 | 7 | 87 | 387 | 1387 | 387 | 5387 | 174 | 175 | FZAAAA | QAAAAA | AAAAxx - 5006 | 15 | 0 | 2 | 6 | 6 | 6 | 6 | 1006 | 6 | 5006 | 12 | 13 | OKAAAA | PAAAAA | VVVVxx -(4 rows) - -FETCH backward 5 in foo19; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 5785 | 17 | 1 | 1 | 5 | 5 | 85 | 785 | 1785 | 785 | 5785 | 170 | 171 | NOAAAA | RAAAAA | HHHHxx - 5387 | 16 | 1 | 3 | 7 | 7 | 87 | 387 | 1387 | 387 | 5387 | 174 | 175 | FZAAAA | QAAAAA | AAAAxx - 5006 | 15 | 0 | 2 | 6 | 6 | 6 | 6 | 1006 | 6 | 5006 | 12 | 13 | OKAAAA | PAAAAA | VVVVxx - 5471 | 14 | 1 | 3 | 1 | 11 | 71 | 471 | 1471 | 471 | 5471 | 142 | 143 | LCAAAA | OAAAAA | OOOOxx - 6243 | 13 | 1 | 3 | 3 | 3 | 43 | 243 | 243 | 1243 | 6243 | 86 | 87 | DGAAAA | NAAAAA | HHHHxx -(5 rows) - -FETCH backward 6 in foo18; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 5387 | 16 | 1 | 3 | 7 | 7 | 87 | 387 | 1387 | 387 | 5387 | 174 | 175 | FZAAAA | QAAAAA | AAAAxx - 5006 | 15 | 0 | 2 | 6 | 6 | 6 | 6 | 1006 | 6 | 5006 | 12 | 13 | OKAAAA | PAAAAA | VVVVxx - 5471 | 14 | 1 | 3 | 1 | 11 | 71 | 471 | 1471 | 471 | 5471 | 142 | 143 | LCAAAA | OAAAAA | OOOOxx - 6243 | 13 | 1 | 3 | 3 | 3 | 43 | 243 | 243 | 1243 | 6243 | 86 | 87 | DGAAAA | NAAAAA | HHHHxx - 5222 | 12 | 0 | 2 | 2 | 2 | 22 | 222 | 1222 | 222 | 5222 | 44 | 45 | WSAAAA | MAAAAA | AAAAxx - 1504 | 11 | 0 | 0 | 4 | 4 | 4 | 504 | 1504 | 1504 | 1504 | 8 | 9 | WFAAAA | LAAAAA | VVVVxx -(6 rows) - -FETCH backward 7 in foo17; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 5006 | 15 | 0 | 2 | 6 | 6 | 6 | 6 | 1006 | 6 | 5006 | 12 | 13 | OKAAAA | PAAAAA | VVVVxx - 5471 | 14 | 1 | 3 | 1 | 11 | 71 | 471 | 1471 | 471 | 5471 | 142 | 143 | LCAAAA | OAAAAA | OOOOxx - 6243 | 13 | 1 | 3 | 3 | 3 | 43 | 243 | 243 | 1243 | 6243 | 86 | 87 | DGAAAA | NAAAAA | HHHHxx - 5222 | 12 | 0 | 2 | 2 | 2 | 22 | 222 | 1222 | 222 | 5222 | 44 | 45 | WSAAAA | MAAAAA | AAAAxx - 1504 | 11 | 0 | 0 | 4 | 4 | 4 | 504 | 1504 | 1504 | 1504 | 8 | 9 | WFAAAA | LAAAAA | VVVVxx - 1314 | 10 | 0 | 2 | 4 | 14 | 14 | 314 | 1314 | 1314 | 1314 | 28 | 29 | OYAAAA | KAAAAA | OOOOxx - 3043 | 9 | 1 | 3 | 3 | 3 | 43 | 43 | 1043 | 3043 | 3043 | 86 | 87 | BNAAAA | JAAAAA | HHHHxx -(7 rows) - -FETCH backward 8 in foo16; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 5471 | 14 | 1 | 3 | 1 | 11 | 71 | 471 | 1471 | 471 | 5471 | 142 | 143 | LCAAAA | OAAAAA | OOOOxx - 6243 | 13 | 1 | 3 | 3 | 3 | 43 | 243 | 243 | 1243 | 6243 | 86 | 87 | DGAAAA | NAAAAA | HHHHxx - 5222 | 12 | 0 | 2 | 2 | 2 | 22 | 222 | 1222 | 222 | 5222 | 44 | 45 | WSAAAA | MAAAAA | AAAAxx - 1504 | 11 | 0 | 0 | 4 | 4 | 4 | 504 | 1504 | 1504 | 1504 | 8 | 9 | WFAAAA | LAAAAA | VVVVxx - 1314 | 10 | 0 | 2 | 4 | 14 | 14 | 314 | 1314 | 1314 | 1314 | 28 | 29 | OYAAAA | KAAAAA | OOOOxx - 3043 | 9 | 1 | 3 | 3 | 3 | 43 | 43 | 1043 | 3043 | 3043 | 86 | 87 | BNAAAA | JAAAAA | HHHHxx - 4321 | 8 | 1 | 1 | 1 | 1 | 21 | 321 | 321 | 4321 | 4321 | 42 | 43 | FKAAAA | IAAAAA | AAAAxx - 6701 | 7 | 1 | 1 | 1 | 1 | 1 | 701 | 701 | 1701 | 6701 | 2 | 3 | TXAAAA | HAAAAA | VVVVxx -(8 rows) - -FETCH backward 9 in foo15; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 6243 | 13 | 1 | 3 | 3 | 3 | 43 | 243 | 243 | 1243 | 6243 | 86 | 87 | DGAAAA | NAAAAA | HHHHxx - 5222 | 12 | 0 | 2 | 2 | 2 | 22 | 222 | 1222 | 222 | 5222 | 44 | 45 | WSAAAA | MAAAAA | AAAAxx - 1504 | 11 | 0 | 0 | 4 | 4 | 4 | 504 | 1504 | 1504 | 1504 | 8 | 9 | WFAAAA | LAAAAA | VVVVxx - 1314 | 10 | 0 | 2 | 4 | 14 | 14 | 314 | 1314 | 1314 | 1314 | 28 | 29 | OYAAAA | KAAAAA | OOOOxx - 3043 | 9 | 1 | 3 | 3 | 3 | 43 | 43 | 1043 | 3043 | 3043 | 86 | 87 | BNAAAA | JAAAAA | HHHHxx - 4321 | 8 | 1 | 1 | 1 | 1 | 21 | 321 | 321 | 4321 | 4321 | 42 | 43 | FKAAAA | IAAAAA | AAAAxx - 6701 | 7 | 1 | 1 | 1 | 1 | 1 | 701 | 701 | 1701 | 6701 | 2 | 3 | TXAAAA | HAAAAA | VVVVxx - 5057 | 6 | 1 | 1 | 7 | 17 | 57 | 57 | 1057 | 57 | 5057 | 114 | 115 | NMAAAA | GAAAAA | OOOOxx - 8009 | 5 | 1 | 1 | 9 | 9 | 9 | 9 | 9 | 3009 | 8009 | 18 | 19 | BWAAAA | FAAAAA | HHHHxx -(9 rows) - -FETCH backward 10 in foo14; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 5222 | 12 | 0 | 2 | 2 | 2 | 22 | 222 | 1222 | 222 | 5222 | 44 | 45 | WSAAAA | MAAAAA | AAAAxx - 1504 | 11 | 0 | 0 | 4 | 4 | 4 | 504 | 1504 | 1504 | 1504 | 8 | 9 | WFAAAA | LAAAAA | VVVVxx - 1314 | 10 | 0 | 2 | 4 | 14 | 14 | 314 | 1314 | 1314 | 1314 | 28 | 29 | OYAAAA | KAAAAA | OOOOxx - 3043 | 9 | 1 | 3 | 3 | 3 | 43 | 43 | 1043 | 3043 | 3043 | 86 | 87 | BNAAAA | JAAAAA | HHHHxx - 4321 | 8 | 1 | 1 | 1 | 1 | 21 | 321 | 321 | 4321 | 4321 | 42 | 43 | FKAAAA | IAAAAA | AAAAxx - 6701 | 7 | 1 | 1 | 1 | 1 | 1 | 701 | 701 | 1701 | 6701 | 2 | 3 | TXAAAA | HAAAAA | VVVVxx - 5057 | 6 | 1 | 1 | 7 | 17 | 57 | 57 | 1057 | 57 | 5057 | 114 | 115 | NMAAAA | GAAAAA | OOOOxx - 8009 | 5 | 1 | 1 | 9 | 9 | 9 | 9 | 9 | 3009 | 8009 | 18 | 19 | BWAAAA | FAAAAA | HHHHxx - 7164 | 4 | 0 | 0 | 4 | 4 | 64 | 164 | 1164 | 2164 | 7164 | 128 | 129 | OPAAAA | EAAAAA | AAAAxx - 9850 | 3 | 0 | 2 | 0 | 10 | 50 | 850 | 1850 | 4850 | 9850 | 100 | 101 | WOAAAA | DAAAAA | VVVVxx -(10 rows) - -FETCH backward 11 in foo13; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 1504 | 11 | 0 | 0 | 4 | 4 | 4 | 504 | 1504 | 1504 | 1504 | 8 | 9 | WFAAAA | LAAAAA | VVVVxx - 1314 | 10 | 0 | 2 | 4 | 14 | 14 | 314 | 1314 | 1314 | 1314 | 28 | 29 | OYAAAA | KAAAAA | OOOOxx - 3043 | 9 | 1 | 3 | 3 | 3 | 43 | 43 | 1043 | 3043 | 3043 | 86 | 87 | BNAAAA | JAAAAA | HHHHxx - 4321 | 8 | 1 | 1 | 1 | 1 | 21 | 321 | 321 | 4321 | 4321 | 42 | 43 | FKAAAA | IAAAAA | AAAAxx - 6701 | 7 | 1 | 1 | 1 | 1 | 1 | 701 | 701 | 1701 | 6701 | 2 | 3 | TXAAAA | HAAAAA | VVVVxx - 5057 | 6 | 1 | 1 | 7 | 17 | 57 | 57 | 1057 | 57 | 5057 | 114 | 115 | NMAAAA | GAAAAA | OOOOxx - 8009 | 5 | 1 | 1 | 9 | 9 | 9 | 9 | 9 | 3009 | 8009 | 18 | 19 | BWAAAA | FAAAAA | HHHHxx - 7164 | 4 | 0 | 0 | 4 | 4 | 64 | 164 | 1164 | 2164 | 7164 | 128 | 129 | OPAAAA | EAAAAA | AAAAxx - 9850 | 3 | 0 | 2 | 0 | 10 | 50 | 850 | 1850 | 4850 | 9850 | 100 | 101 | WOAAAA | DAAAAA | VVVVxx - 3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx - 1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx -(11 rows) - -FETCH backward 12 in foo12; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 1314 | 10 | 0 | 2 | 4 | 14 | 14 | 314 | 1314 | 1314 | 1314 | 28 | 29 | OYAAAA | KAAAAA | OOOOxx - 3043 | 9 | 1 | 3 | 3 | 3 | 43 | 43 | 1043 | 3043 | 3043 | 86 | 87 | BNAAAA | JAAAAA | HHHHxx - 4321 | 8 | 1 | 1 | 1 | 1 | 21 | 321 | 321 | 4321 | 4321 | 42 | 43 | FKAAAA | IAAAAA | AAAAxx - 6701 | 7 | 1 | 1 | 1 | 1 | 1 | 701 | 701 | 1701 | 6701 | 2 | 3 | TXAAAA | HAAAAA | VVVVxx - 5057 | 6 | 1 | 1 | 7 | 17 | 57 | 57 | 1057 | 57 | 5057 | 114 | 115 | NMAAAA | GAAAAA | OOOOxx - 8009 | 5 | 1 | 1 | 9 | 9 | 9 | 9 | 9 | 3009 | 8009 | 18 | 19 | BWAAAA | FAAAAA | HHHHxx - 7164 | 4 | 0 | 0 | 4 | 4 | 64 | 164 | 1164 | 2164 | 7164 | 128 | 129 | OPAAAA | EAAAAA | AAAAxx - 9850 | 3 | 0 | 2 | 0 | 10 | 50 | 850 | 1850 | 4850 | 9850 | 100 | 101 | WOAAAA | DAAAAA | VVVVxx - 3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx - 1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx -(11 rows) - -FETCH backward 13 in foo11; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 3043 | 9 | 1 | 3 | 3 | 3 | 43 | 43 | 1043 | 3043 | 3043 | 86 | 87 | BNAAAA | JAAAAA | HHHHxx - 4321 | 8 | 1 | 1 | 1 | 1 | 21 | 321 | 321 | 4321 | 4321 | 42 | 43 | FKAAAA | IAAAAA | AAAAxx - 6701 | 7 | 1 | 1 | 1 | 1 | 1 | 701 | 701 | 1701 | 6701 | 2 | 3 | TXAAAA | HAAAAA | VVVVxx - 5057 | 6 | 1 | 1 | 7 | 17 | 57 | 57 | 1057 | 57 | 5057 | 114 | 115 | NMAAAA | GAAAAA | OOOOxx - 8009 | 5 | 1 | 1 | 9 | 9 | 9 | 9 | 9 | 3009 | 8009 | 18 | 19 | BWAAAA | FAAAAA | HHHHxx - 7164 | 4 | 0 | 0 | 4 | 4 | 64 | 164 | 1164 | 2164 | 7164 | 128 | 129 | OPAAAA | EAAAAA | AAAAxx - 9850 | 3 | 0 | 2 | 0 | 10 | 50 | 850 | 1850 | 4850 | 9850 | 100 | 101 | WOAAAA | DAAAAA | VVVVxx - 3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx - 1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx -(10 rows) - -FETCH backward 14 in foo10; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 4321 | 8 | 1 | 1 | 1 | 1 | 21 | 321 | 321 | 4321 | 4321 | 42 | 43 | FKAAAA | IAAAAA | AAAAxx - 6701 | 7 | 1 | 1 | 1 | 1 | 1 | 701 | 701 | 1701 | 6701 | 2 | 3 | TXAAAA | HAAAAA | VVVVxx - 5057 | 6 | 1 | 1 | 7 | 17 | 57 | 57 | 1057 | 57 | 5057 | 114 | 115 | NMAAAA | GAAAAA | OOOOxx - 8009 | 5 | 1 | 1 | 9 | 9 | 9 | 9 | 9 | 3009 | 8009 | 18 | 19 | BWAAAA | FAAAAA | HHHHxx - 7164 | 4 | 0 | 0 | 4 | 4 | 64 | 164 | 1164 | 2164 | 7164 | 128 | 129 | OPAAAA | EAAAAA | AAAAxx - 9850 | 3 | 0 | 2 | 0 | 10 | 50 | 850 | 1850 | 4850 | 9850 | 100 | 101 | WOAAAA | DAAAAA | VVVVxx - 3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx - 1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx -(9 rows) - -FETCH backward 15 in foo9; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 6701 | 7 | 1 | 1 | 1 | 1 | 1 | 701 | 701 | 1701 | 6701 | 2 | 3 | TXAAAA | HAAAAA | VVVVxx - 5057 | 6 | 1 | 1 | 7 | 17 | 57 | 57 | 1057 | 57 | 5057 | 114 | 115 | NMAAAA | GAAAAA | OOOOxx - 8009 | 5 | 1 | 1 | 9 | 9 | 9 | 9 | 9 | 3009 | 8009 | 18 | 19 | BWAAAA | FAAAAA | HHHHxx - 7164 | 4 | 0 | 0 | 4 | 4 | 64 | 164 | 1164 | 2164 | 7164 | 128 | 129 | OPAAAA | EAAAAA | AAAAxx - 9850 | 3 | 0 | 2 | 0 | 10 | 50 | 850 | 1850 | 4850 | 9850 | 100 | 101 | WOAAAA | DAAAAA | VVVVxx - 3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx - 1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx -(8 rows) - -FETCH backward 16 in foo8; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 5057 | 6 | 1 | 1 | 7 | 17 | 57 | 57 | 1057 | 57 | 5057 | 114 | 115 | NMAAAA | GAAAAA | OOOOxx - 8009 | 5 | 1 | 1 | 9 | 9 | 9 | 9 | 9 | 3009 | 8009 | 18 | 19 | BWAAAA | FAAAAA | HHHHxx - 7164 | 4 | 0 | 0 | 4 | 4 | 64 | 164 | 1164 | 2164 | 7164 | 128 | 129 | OPAAAA | EAAAAA | AAAAxx - 9850 | 3 | 0 | 2 | 0 | 10 | 50 | 850 | 1850 | 4850 | 9850 | 100 | 101 | WOAAAA | DAAAAA | VVVVxx - 3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx - 1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx -(7 rows) - -FETCH backward 17 in foo7; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 8009 | 5 | 1 | 1 | 9 | 9 | 9 | 9 | 9 | 3009 | 8009 | 18 | 19 | BWAAAA | FAAAAA | HHHHxx - 7164 | 4 | 0 | 0 | 4 | 4 | 64 | 164 | 1164 | 2164 | 7164 | 128 | 129 | OPAAAA | EAAAAA | AAAAxx - 9850 | 3 | 0 | 2 | 0 | 10 | 50 | 850 | 1850 | 4850 | 9850 | 100 | 101 | WOAAAA | DAAAAA | VVVVxx - 3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx - 1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx -(6 rows) - -FETCH backward 18 in foo6; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 7164 | 4 | 0 | 0 | 4 | 4 | 64 | 164 | 1164 | 2164 | 7164 | 128 | 129 | OPAAAA | EAAAAA | AAAAxx - 9850 | 3 | 0 | 2 | 0 | 10 | 50 | 850 | 1850 | 4850 | 9850 | 100 | 101 | WOAAAA | DAAAAA | VVVVxx - 3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx - 1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx -(5 rows) - -FETCH backward 19 in foo5; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 9850 | 3 | 0 | 2 | 0 | 10 | 50 | 850 | 1850 | 4850 | 9850 | 100 | 101 | WOAAAA | DAAAAA | VVVVxx - 3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx - 1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx -(4 rows) - -FETCH backward 20 in foo4; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx - 1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx -(3 rows) - -FETCH backward 21 in foo3; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx -(2 rows) - -FETCH backward 22 in foo2; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx -(1 row) - -FETCH backward 23 in foo1; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- -(0 rows) - -CLOSE foo1; -CLOSE foo2; -CLOSE foo3; -CLOSE foo4; -CLOSE foo5; -CLOSE foo6; -CLOSE foo7; -CLOSE foo8; -CLOSE foo9; -CLOSE foo10; -CLOSE foo11; -CLOSE foo12; --- leave some cursors open, to test that auto-close works. --- record this in the system view as well (don't query the time field there --- however) -SELECT name, statement, is_holdable, is_binary, is_scrollable FROM pg_cursors ORDER BY 1; - name | statement | is_holdable | is_binary | is_scrollable --------+-----------------------------------------------------------------------+-------------+-----------+--------------- - foo13 | DECLARE foo13 SCROLL CURSOR FOR SELECT * FROM tenk1 ORDER BY unique2; | f | f | t - foo14 | DECLARE foo14 SCROLL CURSOR FOR SELECT * FROM tenk2; | f | f | t - foo15 | DECLARE foo15 SCROLL CURSOR FOR SELECT * FROM tenk1 ORDER BY unique2; | f | f | t - foo16 | DECLARE foo16 SCROLL CURSOR FOR SELECT * FROM tenk2; | f | f | t - foo17 | DECLARE foo17 SCROLL CURSOR FOR SELECT * FROM tenk1 ORDER BY unique2; | f | f | t - foo18 | DECLARE foo18 SCROLL CURSOR FOR SELECT * FROM tenk2; | f | f | t - foo19 | DECLARE foo19 SCROLL CURSOR FOR SELECT * FROM tenk1 ORDER BY unique2; | f | f | t - foo20 | DECLARE foo20 SCROLL CURSOR FOR SELECT * FROM tenk2; | f | f | t - foo21 | DECLARE foo21 SCROLL CURSOR FOR SELECT * FROM tenk1 ORDER BY unique2; | f | f | t - foo22 | DECLARE foo22 SCROLL CURSOR FOR SELECT * FROM tenk2; | f | f | t - foo23 | DECLARE foo23 SCROLL CURSOR FOR SELECT * FROM tenk1 ORDER BY unique2; | f | f | t -(11 rows) - -END; -SELECT name, statement, is_holdable, is_binary, is_scrollable FROM pg_cursors; - name | statement | is_holdable | is_binary | is_scrollable -------+-----------+-------------+-----------+--------------- -(0 rows) - --- --- NO SCROLL disallows backward fetching --- -BEGIN; -DECLARE foo24 NO SCROLL CURSOR FOR SELECT * FROM tenk1 ORDER BY unique2; -FETCH 1 FROM foo24; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx -(1 row) - -FETCH BACKWARD 1 FROM foo24; -- should fail -ERROR: cursor can only scan forward -HINT: Declare it with SCROLL option to enable backward scan. -END; --- --- Cursors outside transaction blocks --- -SELECT name, statement, is_holdable, is_binary, is_scrollable FROM pg_cursors; - name | statement | is_holdable | is_binary | is_scrollable -------+-----------+-------------+-----------+--------------- -(0 rows) - -BEGIN; -DECLARE foo25 SCROLL CURSOR WITH HOLD FOR SELECT * FROM tenk2; -FETCH FROM foo25; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx -(1 row) - -FETCH FROM foo25; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx -(1 row) - -COMMIT; -FETCH FROM foo25; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx -(1 row) - -FETCH BACKWARD FROM foo25; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx -(1 row) - -FETCH ABSOLUTE -1 FROM foo25; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 2968 | 9999 | 0 | 0 | 8 | 8 | 68 | 968 | 968 | 2968 | 2968 | 136 | 137 | EKAAAA | PUOAAA | VVVVxx -(1 row) - -SELECT name, statement, is_holdable, is_binary, is_scrollable FROM pg_cursors; - name | statement | is_holdable | is_binary | is_scrollable --------+----------------------------------------------------------------+-------------+-----------+--------------- - foo25 | DECLARE foo25 SCROLL CURSOR WITH HOLD FOR SELECT * FROM tenk2; | t | f | t -(1 row) - -CLOSE foo25; -BEGIN; -DECLARE foo25ns NO SCROLL CURSOR WITH HOLD FOR SELECT * FROM tenk2; -FETCH FROM foo25ns; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx -(1 row) - -FETCH FROM foo25ns; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx -(1 row) - -COMMIT; -FETCH FROM foo25ns; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx -(1 row) - -FETCH ABSOLUTE 4 FROM foo25ns; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 9850 | 3 | 0 | 2 | 0 | 10 | 50 | 850 | 1850 | 4850 | 9850 | 100 | 101 | WOAAAA | DAAAAA | VVVVxx -(1 row) - -FETCH ABSOLUTE 4 FROM foo25ns; -- fail -ERROR: cursor can only scan forward -HINT: Declare it with SCROLL option to enable backward scan. -SELECT name, statement, is_holdable, is_binary, is_scrollable FROM pg_cursors; - name | statement | is_holdable | is_binary | is_scrollable ----------+---------------------------------------------------------------------+-------------+-----------+--------------- - foo25ns | DECLARE foo25ns NO SCROLL CURSOR WITH HOLD FOR SELECT * FROM tenk2; | t | f | f -(1 row) - -CLOSE foo25ns; --- --- ROLLBACK should close holdable cursors --- -BEGIN; -DECLARE foo26 CURSOR WITH HOLD FOR SELECT * FROM tenk1 ORDER BY unique2; -ROLLBACK; --- should fail -FETCH FROM foo26; -ERROR: cursor "foo26" does not exist --- --- Parameterized DECLARE needs to insert param values into the cursor portal --- -BEGIN; -CREATE FUNCTION declares_cursor(text) - RETURNS void - AS 'DECLARE c CURSOR FOR SELECT stringu1 FROM tenk1 WHERE stringu1 LIKE $1;' - LANGUAGE SQL; -SELECT declares_cursor('AB%'); - declares_cursor ------------------ - -(1 row) - -FETCH ALL FROM c; - stringu1 ----------- - ABAAAA - ABAAAA - ABAAAA - ABAAAA - ABAAAA - ABAAAA - ABAAAA - ABAAAA - ABAAAA - ABAAAA - ABAAAA - ABAAAA - ABAAAA - ABAAAA - ABAAAA -(15 rows) - -ROLLBACK; --- --- Test behavior of both volatile and stable functions inside a cursor; --- in particular we want to see what happens during commit of a holdable --- cursor --- -create temp table tt1(f1 int); -create function count_tt1_v() returns int8 as -'select count(*) from tt1' language sql volatile; -create function count_tt1_s() returns int8 as -'select count(*) from tt1' language sql stable; -begin; -insert into tt1 values(1); -declare c1 cursor for select count_tt1_v(), count_tt1_s(); -insert into tt1 values(2); -fetch all from c1; - count_tt1_v | count_tt1_s --------------+------------- - 2 | 1 -(1 row) - -rollback; -begin; -insert into tt1 values(1); -declare c2 cursor with hold for select count_tt1_v(), count_tt1_s(); -insert into tt1 values(2); -commit; -delete from tt1; -fetch all from c2; - count_tt1_v | count_tt1_s --------------+------------- - 2 | 1 -(1 row) - -drop function count_tt1_v(); -drop function count_tt1_s(); --- Create a cursor with the BINARY option and check the pg_cursors view -BEGIN; -SELECT name, statement, is_holdable, is_binary, is_scrollable FROM pg_cursors; - name | statement | is_holdable | is_binary | is_scrollable -------+----------------------------------------------------------------------+-------------+-----------+--------------- - c2 | declare c2 cursor with hold for select count_tt1_v(), count_tt1_s(); | t | f | f -(1 row) - -DECLARE bc BINARY CURSOR FOR SELECT * FROM tenk1; -SELECT name, statement, is_holdable, is_binary, is_scrollable FROM pg_cursors ORDER BY 1; - name | statement | is_holdable | is_binary | is_scrollable -------+----------------------------------------------------------------------+-------------+-----------+--------------- - bc | DECLARE bc BINARY CURSOR FOR SELECT * FROM tenk1; | f | t | t - c2 | declare c2 cursor with hold for select count_tt1_v(), count_tt1_s(); | t | f | f -(2 rows) - -ROLLBACK; --- We should not see the portal that is created internally to --- implement EXECUTE in pg_cursors -PREPARE cprep AS - SELECT name, statement, is_holdable, is_binary, is_scrollable FROM pg_cursors; -EXECUTE cprep; - name | statement | is_holdable | is_binary | is_scrollable -------+----------------------------------------------------------------------+-------------+-----------+--------------- - c2 | declare c2 cursor with hold for select count_tt1_v(), count_tt1_s(); | t | f | f -(1 row) - --- test CLOSE ALL; -SELECT name FROM pg_cursors ORDER BY 1; - name ------- - c2 -(1 row) - -CLOSE ALL; -SELECT name FROM pg_cursors ORDER BY 1; - name ------- -(0 rows) - -BEGIN; -DECLARE foo1 CURSOR WITH HOLD FOR SELECT 1; -DECLARE foo2 CURSOR WITHOUT HOLD FOR SELECT 1; -SELECT name FROM pg_cursors ORDER BY 1; - name ------- - foo1 - foo2 -(2 rows) - -CLOSE ALL; -SELECT name FROM pg_cursors ORDER BY 1; - name ------- -(0 rows) - -COMMIT; --- --- Tests for updatable cursors --- -CREATE TEMP TABLE uctest(f1 int, f2 text); -INSERT INTO uctest VALUES (1, 'one'), (2, 'two'), (3, 'three'); -SELECT * FROM uctest; - f1 | f2 -----+------- - 1 | one - 2 | two - 3 | three -(3 rows) - --- Check DELETE WHERE CURRENT -BEGIN; -DECLARE c1 CURSOR FOR SELECT * FROM uctest; -FETCH 2 FROM c1; - f1 | f2 -----+----- - 1 | one - 2 | two -(2 rows) - -DELETE FROM uctest WHERE CURRENT OF c1; --- should show deletion -SELECT * FROM uctest; - f1 | f2 -----+------- - 1 | one - 3 | three -(2 rows) - --- cursor did not move -FETCH ALL FROM c1; - f1 | f2 -----+------- - 3 | three -(1 row) - --- cursor is insensitive -MOVE BACKWARD ALL IN c1; -FETCH ALL FROM c1; - f1 | f2 -----+------- - 1 | one - 2 | two - 3 | three -(3 rows) - -COMMIT; --- should still see deletion -SELECT * FROM uctest; - f1 | f2 -----+------- - 1 | one - 3 | three -(2 rows) - --- Check UPDATE WHERE CURRENT; this time use FOR UPDATE -BEGIN; -DECLARE c1 CURSOR FOR SELECT * FROM uctest FOR UPDATE; -FETCH c1; - f1 | f2 -----+----- - 1 | one -(1 row) - -UPDATE uctest SET f1 = 8 WHERE CURRENT OF c1; -SELECT * FROM uctest; - f1 | f2 -----+------- - 3 | three - 8 | one -(2 rows) - -COMMIT; -SELECT * FROM uctest; - f1 | f2 -----+------- - 3 | three - 8 | one -(2 rows) - --- Check repeated-update and update-then-delete cases -BEGIN; -DECLARE c1 CURSOR FOR SELECT * FROM uctest; -FETCH c1; - f1 | f2 -----+------- - 3 | three -(1 row) - -UPDATE uctest SET f1 = f1 + 10 WHERE CURRENT OF c1; -SELECT * FROM uctest; - f1 | f2 -----+------- - 8 | one - 13 | three -(2 rows) - -UPDATE uctest SET f1 = f1 + 10 WHERE CURRENT OF c1; -SELECT * FROM uctest; - f1 | f2 -----+------- - 8 | one - 23 | three -(2 rows) - --- insensitive cursor should not show effects of updates or deletes -FETCH RELATIVE 0 FROM c1; - f1 | f2 -----+------- - 3 | three -(1 row) - -DELETE FROM uctest WHERE CURRENT OF c1; -SELECT * FROM uctest; - f1 | f2 -----+----- - 8 | one -(1 row) - -DELETE FROM uctest WHERE CURRENT OF c1; -- no-op -SELECT * FROM uctest; - f1 | f2 -----+----- - 8 | one -(1 row) - -UPDATE uctest SET f1 = f1 + 10 WHERE CURRENT OF c1; -- no-op -SELECT * FROM uctest; - f1 | f2 -----+----- - 8 | one -(1 row) - -FETCH RELATIVE 0 FROM c1; - f1 | f2 -----+------- - 3 | three -(1 row) - -ROLLBACK; -SELECT * FROM uctest; - f1 | f2 -----+------- - 3 | three - 8 | one -(2 rows) - -BEGIN; -DECLARE c1 CURSOR FOR SELECT * FROM uctest FOR UPDATE; -FETCH c1; - f1 | f2 -----+------- - 3 | three -(1 row) - -UPDATE uctest SET f1 = f1 + 10 WHERE CURRENT OF c1; -SELECT * FROM uctest; - f1 | f2 -----+------- - 8 | one - 13 | three -(2 rows) - -UPDATE uctest SET f1 = f1 + 10 WHERE CURRENT OF c1; -SELECT * FROM uctest; - f1 | f2 -----+------- - 8 | one - 23 | three -(2 rows) - -DELETE FROM uctest WHERE CURRENT OF c1; -SELECT * FROM uctest; - f1 | f2 -----+----- - 8 | one -(1 row) - -DELETE FROM uctest WHERE CURRENT OF c1; -- no-op -SELECT * FROM uctest; - f1 | f2 -----+----- - 8 | one -(1 row) - -UPDATE uctest SET f1 = f1 + 10 WHERE CURRENT OF c1; -- no-op -SELECT * FROM uctest; - f1 | f2 -----+----- - 8 | one -(1 row) - ---- FOR UPDATE cursors can't currently scroll back, so this is an error: -FETCH RELATIVE 0 FROM c1; -ERROR: cursor can only scan forward -HINT: Declare it with SCROLL option to enable backward scan. -ROLLBACK; -SELECT * FROM uctest; - f1 | f2 -----+------- - 3 | three - 8 | one -(2 rows) - --- Check insensitive cursor with INSERT --- (The above tests don't test the SQL notion of an insensitive cursor --- correctly, because per SQL standard, changes from WHERE CURRENT OF --- commands should be visible in the cursor. So here we make the --- changes with a command that is independent of the cursor.) -BEGIN; -DECLARE c1 INSENSITIVE CURSOR FOR SELECT * FROM uctest; -INSERT INTO uctest VALUES (10, 'ten'); -FETCH NEXT FROM c1; - f1 | f2 -----+------- - 3 | three -(1 row) - -FETCH NEXT FROM c1; - f1 | f2 -----+----- - 8 | one -(1 row) - -FETCH NEXT FROM c1; -- insert not visible - f1 | f2 -----+---- -(0 rows) - -COMMIT; -SELECT * FROM uctest; - f1 | f2 -----+------- - 3 | three - 8 | one - 10 | ten -(3 rows) - -DELETE FROM uctest WHERE f1 = 10; -- restore test table state --- Check inheritance cases -CREATE TEMP TABLE ucchild () inherits (uctest); -INSERT INTO ucchild values(100, 'hundred'); -SELECT * FROM uctest; - f1 | f2 ------+--------- - 3 | three - 8 | one - 100 | hundred -(3 rows) - -BEGIN; -DECLARE c1 CURSOR FOR SELECT * FROM uctest FOR UPDATE; -FETCH 1 FROM c1; - f1 | f2 -----+------- - 3 | three -(1 row) - -UPDATE uctest SET f1 = f1 + 10 WHERE CURRENT OF c1; -FETCH 1 FROM c1; - f1 | f2 -----+----- - 8 | one -(1 row) - -UPDATE uctest SET f1 = f1 + 10 WHERE CURRENT OF c1; -FETCH 1 FROM c1; - f1 | f2 ------+--------- - 100 | hundred -(1 row) - -UPDATE uctest SET f1 = f1 + 10 WHERE CURRENT OF c1; -FETCH 1 FROM c1; - f1 | f2 -----+---- -(0 rows) - -COMMIT; -SELECT * FROM uctest; - f1 | f2 ------+--------- - 13 | three - 18 | one - 110 | hundred -(3 rows) - --- Can update from a self-join, but only if FOR UPDATE says which to use -BEGIN; -DECLARE c1 CURSOR FOR SELECT * FROM uctest a, uctest b WHERE a.f1 = b.f1 + 5; -FETCH 1 FROM c1; - f1 | f2 | f1 | f2 -----+-----+----+------- - 18 | one | 13 | three -(1 row) - -UPDATE uctest SET f1 = f1 + 10 WHERE CURRENT OF c1; -- fail -ERROR: cursor "c1" is not a simply updatable scan of table "uctest" -ROLLBACK; -BEGIN; -DECLARE c1 CURSOR FOR SELECT * FROM uctest a, uctest b WHERE a.f1 = b.f1 + 5 FOR UPDATE; -FETCH 1 FROM c1; - f1 | f2 | f1 | f2 -----+-----+----+------- - 18 | one | 13 | three -(1 row) - -UPDATE uctest SET f1 = f1 + 10 WHERE CURRENT OF c1; -- fail -ERROR: cursor "c1" has multiple FOR UPDATE/SHARE references to table "uctest" -ROLLBACK; -BEGIN; -DECLARE c1 CURSOR FOR SELECT * FROM uctest a, uctest b WHERE a.f1 = b.f1 + 5 FOR SHARE OF a; -FETCH 1 FROM c1; - f1 | f2 | f1 | f2 -----+-----+----+------- - 18 | one | 13 | three -(1 row) - -UPDATE uctest SET f1 = f1 + 10 WHERE CURRENT OF c1; -SELECT * FROM uctest; - f1 | f2 ------+--------- - 13 | three - 28 | one - 110 | hundred -(3 rows) - -ROLLBACK; --- Check various error cases -DELETE FROM uctest WHERE CURRENT OF c1; -- fail, no such cursor -ERROR: cursor "c1" does not exist -DECLARE cx CURSOR WITH HOLD FOR SELECT * FROM uctest; -DELETE FROM uctest WHERE CURRENT OF cx; -- fail, can't use held cursor -ERROR: cursor "cx" is held from a previous transaction -BEGIN; -DECLARE c CURSOR FOR SELECT * FROM tenk2; -DELETE FROM uctest WHERE CURRENT OF c; -- fail, cursor on wrong table -ERROR: cursor "c" is not a simply updatable scan of table "uctest" -ROLLBACK; -BEGIN; -DECLARE c CURSOR FOR SELECT * FROM tenk2 FOR SHARE; -DELETE FROM uctest WHERE CURRENT OF c; -- fail, cursor on wrong table -ERROR: cursor "c" does not have a FOR UPDATE/SHARE reference to table "uctest" -ROLLBACK; -BEGIN; -DECLARE c CURSOR FOR SELECT * FROM tenk1 JOIN tenk2 USING (unique1); -DELETE FROM tenk1 WHERE CURRENT OF c; -- fail, cursor is on a join -ERROR: cursor "c" is not a simply updatable scan of table "tenk1" -ROLLBACK; -BEGIN; -DECLARE c CURSOR FOR SELECT f1,count(*) FROM uctest GROUP BY f1; -DELETE FROM uctest WHERE CURRENT OF c; -- fail, cursor is on aggregation -ERROR: cursor "c" is not a simply updatable scan of table "uctest" -ROLLBACK; -BEGIN; -DECLARE c1 CURSOR FOR SELECT * FROM uctest; -DELETE FROM uctest WHERE CURRENT OF c1; -- fail, no current row -ERROR: cursor "c1" is not positioned on a row -ROLLBACK; -BEGIN; -DECLARE c1 CURSOR FOR SELECT MIN(f1) FROM uctest FOR UPDATE; -ERROR: FOR UPDATE is not allowed with aggregate functions -ROLLBACK; --- WHERE CURRENT OF may someday work with views, but today is not that day. --- For now, just make sure it errors out cleanly. -CREATE TEMP VIEW ucview AS SELECT * FROM uctest; -CREATE RULE ucrule AS ON DELETE TO ucview DO INSTEAD - DELETE FROM uctest WHERE f1 = OLD.f1; -BEGIN; -DECLARE c1 CURSOR FOR SELECT * FROM ucview; -FETCH FROM c1; - f1 | f2 -----+------- - 13 | three -(1 row) - -DELETE FROM ucview WHERE CURRENT OF c1; -- fail, views not supported -ERROR: WHERE CURRENT OF on a view is not implemented -ROLLBACK; --- Check WHERE CURRENT OF with an index-only scan -BEGIN; -EXPLAIN (costs off) -DECLARE c1 CURSOR FOR SELECT stringu1 FROM onek WHERE stringu1 = 'DZAAAA'; - QUERY PLAN ---------------------------------------------- - Index Only Scan using onek_stringu1 on onek - Index Cond: (stringu1 = 'DZAAAA'::name) -(2 rows) - -DECLARE c1 CURSOR FOR SELECT stringu1 FROM onek WHERE stringu1 = 'DZAAAA'; -FETCH FROM c1; - stringu1 ----------- - DZAAAA -(1 row) - -DELETE FROM onek WHERE CURRENT OF c1; -SELECT stringu1 FROM onek WHERE stringu1 = 'DZAAAA'; - stringu1 ----------- -(0 rows) - -ROLLBACK; --- Check behavior with rewinding to a previous child scan node, --- as per bug #15395 -BEGIN; -CREATE TABLE current_check (currentid int, payload text); -CREATE TABLE current_check_1 () INHERITS (current_check); -CREATE TABLE current_check_2 () INHERITS (current_check); -INSERT INTO current_check_1 SELECT i, 'p' || i FROM generate_series(1,9) i; -INSERT INTO current_check_2 SELECT i, 'P' || i FROM generate_series(10,19) i; -DECLARE c1 SCROLL CURSOR FOR SELECT * FROM current_check; --- This tests the fetch-backwards code path -FETCH ABSOLUTE 12 FROM c1; - currentid | payload ------------+--------- - 12 | P12 -(1 row) - -FETCH ABSOLUTE 8 FROM c1; - currentid | payload ------------+--------- - 8 | p8 -(1 row) - -DELETE FROM current_check WHERE CURRENT OF c1 RETURNING *; - currentid | payload ------------+--------- - 8 | p8 -(1 row) - --- This tests the ExecutorRewind code path -FETCH ABSOLUTE 13 FROM c1; - currentid | payload ------------+--------- - 13 | P13 -(1 row) - -FETCH ABSOLUTE 1 FROM c1; - currentid | payload ------------+--------- - 1 | p1 -(1 row) - -DELETE FROM current_check WHERE CURRENT OF c1 RETURNING *; - currentid | payload ------------+--------- - 1 | p1 -(1 row) - -SELECT * FROM current_check; - currentid | payload ------------+--------- - 2 | p2 - 3 | p3 - 4 | p4 - 5 | p5 - 6 | p6 - 7 | p7 - 9 | p9 - 10 | P10 - 11 | P11 - 12 | P12 - 13 | P13 - 14 | P14 - 15 | P15 - 16 | P16 - 17 | P17 - 18 | P18 - 19 | P19 -(17 rows) - -ROLLBACK; --- Make sure snapshot management works okay, per bug report in --- 235395b90909301035v7228ce63q392931f15aa74b31@mail.gmail.com -BEGIN; -SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; -CREATE TABLE cursor (a int); -INSERT INTO cursor VALUES (1); -DECLARE c1 NO SCROLL CURSOR FOR SELECT * FROM cursor FOR UPDATE; -UPDATE cursor SET a = 2; -FETCH ALL FROM c1; - a ---- -(0 rows) - -COMMIT; -DROP TABLE cursor; --- Check rewinding a cursor containing a stable function in LIMIT, --- per bug report in 8336843.9833.1399385291498.JavaMail.root@quick -begin; -create function nochange(int) returns int - as 'select $1 limit 1' language sql stable; -declare c cursor for select * from int8_tbl limit nochange(3); -fetch all from c; - q1 | q2 -------------------+------------------ - 123 | 456 - 123 | 4567890123456789 - 4567890123456789 | 123 -(3 rows) - -move backward all in c; -fetch all from c; - q1 | q2 -------------------+------------------ - 123 | 456 - 123 | 4567890123456789 - 4567890123456789 | 123 -(3 rows) - -rollback; --- Check handling of non-backwards-scan-capable plans with scroll cursors -begin; -explain (costs off) declare c1 cursor for select (select 42) as x; - QUERY PLAN ---------------------------- - Result - InitPlan 1 (returns $0) - -> Result -(3 rows) - -explain (costs off) declare c1 scroll cursor for select (select 42) as x; - QUERY PLAN ---------------------------- - Materialize - InitPlan 1 (returns $0) - -> Result - -> Result -(4 rows) - -declare c1 scroll cursor for select (select 42) as x; -fetch all in c1; - x ----- - 42 -(1 row) - -fetch backward all in c1; - x ----- - 42 -(1 row) - -rollback; -begin; -explain (costs off) declare c2 cursor for select generate_series(1,3) as g; - QUERY PLAN --------------- - ProjectSet - -> Result -(2 rows) - -explain (costs off) declare c2 scroll cursor for select generate_series(1,3) as g; - QUERY PLAN --------------------- - Materialize - -> ProjectSet - -> Result -(3 rows) - -declare c2 scroll cursor for select generate_series(1,3) as g; -fetch all in c2; - g ---- - 1 - 2 - 3 -(3 rows) - -fetch backward all in c2; - g ---- - 3 - 2 - 1 -(3 rows) - -rollback; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/arrays.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/arrays.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/arrays.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/arrays.out 2023-02-20 19:45:46.569211053 -0500 @@ -1,2434 +1 @@ --- --- ARRAYS --- -CREATE TABLE arrtest ( - a int2[], - b int4[][][], - c name[], - d text[][], - e float8[], - f char(5)[], - g varchar(5)[] -); --- --- only the 'e' array is 0-based, the others are 1-based. --- -INSERT INTO arrtest (a[1:5], b[1:1][1:2][1:2], c, d, f, g) - VALUES ('{1,2,3,4,5}', '{{{0,0},{1,2}}}', '{}', '{}', '{}', '{}'); -UPDATE arrtest SET e[0] = '1.1'; -UPDATE arrtest SET e[1] = '2.2'; -INSERT INTO arrtest (f) - VALUES ('{"too long"}'); -ERROR: value too long for type character(5) -INSERT INTO arrtest (a, b[1:2][1:2], c, d, e, f, g) - VALUES ('{11,12,23}', '{{3,4},{4,5}}', '{"foobar"}', - '{{"elt1", "elt2"}}', '{"3.4", "6.7"}', - '{"abc","abcde"}', '{"abc","abcde"}'); -INSERT INTO arrtest (a, b[1:2], c, d[1:2]) - VALUES ('{}', '{3,4}', '{foo,bar}', '{bar,foo}'); -INSERT INTO arrtest (b[2]) VALUES(now()); -- error, type mismatch -ERROR: subscripted assignment to "b" requires type integer but expression is of type timestamp with time zone -LINE 1: INSERT INTO arrtest (b[2]) VALUES(now()); - ^ -HINT: You will need to rewrite or cast the expression. -INSERT INTO arrtest (b[1:2]) VALUES(now()); -- error, type mismatch -ERROR: subscripted assignment to "b" requires type integer[] but expression is of type timestamp with time zone -LINE 1: INSERT INTO arrtest (b[1:2]) VALUES(now()); - ^ -HINT: You will need to rewrite or cast the expression. -SELECT * FROM arrtest; - a | b | c | d | e | f | g --------------+-----------------+-----------+---------------+-----------------+-----------------+------------- - {1,2,3,4,5} | {{{0,0},{1,2}}} | {} | {} | [0:1]={1.1,2.2} | {} | {} - {11,12,23} | {{3,4},{4,5}} | {foobar} | {{elt1,elt2}} | {3.4,6.7} | {"abc ",abcde} | {abc,abcde} - {} | {3,4} | {foo,bar} | {bar,foo} | | | -(3 rows) - -SELECT arrtest.a[1], - arrtest.b[1][1][1], - arrtest.c[1], - arrtest.d[1][1], - arrtest.e[0] - FROM arrtest; - a | b | c | d | e -----+---+--------+------+----- - 1 | 0 | | | 1.1 - 11 | | foobar | elt1 | - | | foo | | -(3 rows) - -SELECT a[1], b[1][1][1], c[1], d[1][1], e[0] - FROM arrtest; - a | b | c | d | e -----+---+--------+------+----- - 1 | 0 | | | 1.1 - 11 | | foobar | elt1 | - | | foo | | -(3 rows) - -SELECT a[1:3], - b[1:1][1:2][1:2], - c[1:2], - d[1:1][1:2] - FROM arrtest; - a | b | c | d -------------+-----------------+-----------+--------------- - {1,2,3} | {{{0,0},{1,2}}} | {} | {} - {11,12,23} | {} | {foobar} | {{elt1,elt2}} - {} | {} | {foo,bar} | {} -(3 rows) - -SELECT array_ndims(a) AS a,array_ndims(b) AS b,array_ndims(c) AS c - FROM arrtest; - a | b | c ----+---+--- - 1 | 3 | - 1 | 2 | 1 - | 1 | 1 -(3 rows) - -SELECT array_dims(a) AS a,array_dims(b) AS b,array_dims(c) AS c - FROM arrtest; - a | b | c --------+-----------------+------- - [1:5] | [1:1][1:2][1:2] | - [1:3] | [1:2][1:2] | [1:1] - | [1:2] | [1:2] -(3 rows) - --- returns nothing -SELECT * - FROM arrtest - WHERE a[1] < 5 and - c = '{"foobar"}'::_name; - a | b | c | d | e | f | g ----+---+---+---+---+---+--- -(0 rows) - -UPDATE arrtest - SET a[1:2] = '{16,25}' - WHERE NOT a = '{}'::_int2; -UPDATE arrtest - SET b[1:1][1:1][1:2] = '{113, 117}', - b[1:1][1:2][2:2] = '{142, 147}' - WHERE array_dims(b) = '[1:1][1:2][1:2]'; -UPDATE arrtest - SET c[2:2] = '{"new_word"}' - WHERE array_dims(c) is not null; -SELECT a,b,c FROM arrtest; - a | b | c ----------------+-----------------------+------------------- - {16,25,3,4,5} | {{{113,142},{1,147}}} | {} - {} | {3,4} | {foo,new_word} - {16,25,23} | {{3,4},{4,5}} | {foobar,new_word} -(3 rows) - -SELECT a[1:3], - b[1:1][1:2][1:2], - c[1:2], - d[1:1][2:2] - FROM arrtest; - a | b | c | d -------------+-----------------------+-------------------+---------- - {16,25,3} | {{{113,142},{1,147}}} | {} | {} - {} | {} | {foo,new_word} | {} - {16,25,23} | {} | {foobar,new_word} | {{elt2}} -(3 rows) - -SELECT b[1:1][2][2], - d[1:1][2] - FROM arrtest; - b | d ------------------------+--------------- - {{{113,142},{1,147}}} | {} - {} | {} - {} | {{elt1,elt2}} -(3 rows) - -INSERT INTO arrtest(a) VALUES('{1,null,3}'); -SELECT a FROM arrtest; - a ---------------- - {16,25,3,4,5} - {} - {16,25,23} - {1,NULL,3} -(4 rows) - -UPDATE arrtest SET a[4] = NULL WHERE a[2] IS NULL; -SELECT a FROM arrtest WHERE a[2] IS NULL; - a ------------------ - [4:4]={NULL} - {1,NULL,3,NULL} -(2 rows) - -DELETE FROM arrtest WHERE a[2] IS NULL AND b IS NULL; -SELECT a,b,c FROM arrtest; - a | b | c ----------------+-----------------------+------------------- - {16,25,3,4,5} | {{{113,142},{1,147}}} | {} - {16,25,23} | {{3,4},{4,5}} | {foobar,new_word} - [4:4]={NULL} | {3,4} | {foo,new_word} -(3 rows) - --- test mixed slice/scalar subscripting -select '{{1,2,3},{4,5,6},{7,8,9}}'::int[]; - int4 ---------------------------- - {{1,2,3},{4,5,6},{7,8,9}} -(1 row) - -select ('{{1,2,3},{4,5,6},{7,8,9}}'::int[])[1:2][2]; - int4 ---------------- - {{1,2},{4,5}} -(1 row) - -select '[0:2][0:2]={{1,2,3},{4,5,6},{7,8,9}}'::int[]; - int4 --------------------------------------- - [0:2][0:2]={{1,2,3},{4,5,6},{7,8,9}} -(1 row) - -select ('[0:2][0:2]={{1,2,3},{4,5,6},{7,8,9}}'::int[])[1:2][2]; - int4 ---------------- - {{5,6},{8,9}} -(1 row) - --- --- check subscription corner cases --- --- More subscripts than MAXDIM (6) -SELECT ('{}'::int[])[1][2][3][4][5][6][7]; -ERROR: number of array dimensions (7) exceeds the maximum allowed (6) --- NULL index yields NULL when selecting -SELECT ('{{{1},{2},{3}},{{4},{5},{6}}}'::int[])[1][NULL][1]; - int4 ------- - -(1 row) - -SELECT ('{{{1},{2},{3}},{{4},{5},{6}}}'::int[])[1][NULL:1][1]; - int4 ------- - -(1 row) - -SELECT ('{{{1},{2},{3}},{{4},{5},{6}}}'::int[])[1][1:NULL][1]; - int4 ------- - -(1 row) - --- NULL index in assignment is an error -UPDATE arrtest - SET c[NULL] = '{"can''t assign"}' - WHERE array_dims(c) is not null; -ERROR: array subscript in assignment must not be null -UPDATE arrtest - SET c[NULL:1] = '{"can''t assign"}' - WHERE array_dims(c) is not null; -ERROR: array subscript in assignment must not be null -UPDATE arrtest - SET c[1:NULL] = '{"can''t assign"}' - WHERE array_dims(c) is not null; -ERROR: array subscript in assignment must not be null --- Un-subscriptable type -SELECT (now())[1]; -ERROR: cannot subscript type timestamp with time zone because it does not support subscripting -LINE 1: SELECT (now())[1]; - ^ --- test slices with empty lower and/or upper index -CREATE TEMP TABLE arrtest_s ( - a int2[], - b int2[][] -); -INSERT INTO arrtest_s VALUES ('{1,2,3,4,5}', '{{1,2,3}, {4,5,6}, {7,8,9}}'); -INSERT INTO arrtest_s VALUES ('[0:4]={1,2,3,4,5}', '[0:2][0:2]={{1,2,3}, {4,5,6}, {7,8,9}}'); -SELECT * FROM arrtest_s; - a | b --------------------+-------------------------------------- - {1,2,3,4,5} | {{1,2,3},{4,5,6},{7,8,9}} - [0:4]={1,2,3,4,5} | [0:2][0:2]={{1,2,3},{4,5,6},{7,8,9}} -(2 rows) - -SELECT a[:3], b[:2][:2] FROM arrtest_s; - a | b ------------+--------------------------- - {1,2,3} | {{1,2},{4,5}} - {1,2,3,4} | {{1,2,3},{4,5,6},{7,8,9}} -(2 rows) - -SELECT a[2:], b[2:][2:] FROM arrtest_s; - a | b ------------+--------------- - {2,3,4,5} | {{5,6},{8,9}} - {3,4,5} | {{9}} -(2 rows) - -SELECT a[:], b[:] FROM arrtest_s; - a | b --------------+--------------------------- - {1,2,3,4,5} | {{1,2,3},{4,5,6},{7,8,9}} - {1,2,3,4,5} | {{1,2,3},{4,5,6},{7,8,9}} -(2 rows) - --- updates -UPDATE arrtest_s SET a[:3] = '{11, 12, 13}', b[:2][:2] = '{{11,12}, {14,15}}' - WHERE array_lower(a,1) = 1; -SELECT * FROM arrtest_s; - a | b --------------------+-------------------------------------- - [0:4]={1,2,3,4,5} | [0:2][0:2]={{1,2,3},{4,5,6},{7,8,9}} - {11,12,13,4,5} | {{11,12,3},{14,15,6},{7,8,9}} -(2 rows) - -UPDATE arrtest_s SET a[3:] = '{23, 24, 25}', b[2:][2:] = '{{25,26}, {28,29}}'; -SELECT * FROM arrtest_s; - a | b ----------------------+--------------------------------------- - [0:4]={1,2,3,23,24} | [0:2][0:2]={{1,2,3},{4,5,6},{7,8,25}} - {11,12,23,24,25} | {{11,12,3},{14,25,26},{7,28,29}} -(2 rows) - -UPDATE arrtest_s SET a[:] = '{11, 12, 13, 14, 15}'; -SELECT * FROM arrtest_s; - a | b -------------------------+--------------------------------------- - [0:4]={11,12,13,14,15} | [0:2][0:2]={{1,2,3},{4,5,6},{7,8,25}} - {11,12,13,14,15} | {{11,12,3},{14,25,26},{7,28,29}} -(2 rows) - -UPDATE arrtest_s SET a[:] = '{23, 24, 25}'; -- fail, too small -ERROR: source array too small -INSERT INTO arrtest_s VALUES(NULL, NULL); -UPDATE arrtest_s SET a[:] = '{11, 12, 13, 14, 15}'; -- fail, no good with null -ERROR: array slice subscript must provide both boundaries -DETAIL: When assigning to a slice of an empty array value, slice boundaries must be fully specified. --- check with fixed-length-array type, such as point -SELECT f1[0:1] FROM POINT_TBL; -ERROR: slices of fixed-length arrays not implemented -SELECT f1[0:] FROM POINT_TBL; -ERROR: slices of fixed-length arrays not implemented -SELECT f1[:1] FROM POINT_TBL; -ERROR: slices of fixed-length arrays not implemented -SELECT f1[:] FROM POINT_TBL; -ERROR: slices of fixed-length arrays not implemented --- subscript assignments to fixed-width result in NULL if previous value is NULL -UPDATE point_tbl SET f1[0] = 10 WHERE f1 IS NULL RETURNING *; - f1 ----- - -(1 row) - -INSERT INTO point_tbl(f1[0]) VALUES(0) RETURNING *; - f1 ----- - -(1 row) - --- NULL assignments get ignored -UPDATE point_tbl SET f1[0] = NULL WHERE f1::text = '(10,10)'::point::text RETURNING *; - f1 ---------- - (10,10) -(1 row) - --- but non-NULL subscript assignments work -UPDATE point_tbl SET f1[0] = -10, f1[1] = -10 WHERE f1::text = '(10,10)'::point::text RETURNING *; - f1 ------------ - (-10,-10) -(1 row) - --- but not to expand the range -UPDATE point_tbl SET f1[3] = 10 WHERE f1::text = '(-10,-10)'::point::text RETURNING *; -ERROR: array subscript out of range --- --- test array extension --- -CREATE TEMP TABLE arrtest1 (i int[], t text[]); -insert into arrtest1 values(array[1,2,null,4], array['one','two',null,'four']); -select * from arrtest1; - i | t ---------------+--------------------- - {1,2,NULL,4} | {one,two,NULL,four} -(1 row) - -update arrtest1 set i[2] = 22, t[2] = 'twenty-two'; -select * from arrtest1; - i | t ----------------+---------------------------- - {1,22,NULL,4} | {one,twenty-two,NULL,four} -(1 row) - -update arrtest1 set i[5] = 5, t[5] = 'five'; -select * from arrtest1; - i | t ------------------+--------------------------------- - {1,22,NULL,4,5} | {one,twenty-two,NULL,four,five} -(1 row) - -update arrtest1 set i[8] = 8, t[8] = 'eight'; -select * from arrtest1; - i | t ------------------------------+------------------------------------------------- - {1,22,NULL,4,5,NULL,NULL,8} | {one,twenty-two,NULL,four,five,NULL,NULL,eight} -(1 row) - -update arrtest1 set i[0] = 0, t[0] = 'zero'; -select * from arrtest1; - i | t --------------------------------------+------------------------------------------------------------ - [0:8]={0,1,22,NULL,4,5,NULL,NULL,8} | [0:8]={zero,one,twenty-two,NULL,four,five,NULL,NULL,eight} -(1 row) - -update arrtest1 set i[-3] = -3, t[-3] = 'minus-three'; -select * from arrtest1; - i | t ----------------------------------------------------+----------------------------------------------------------------------------------- - [-3:8]={-3,NULL,NULL,0,1,22,NULL,4,5,NULL,NULL,8} | [-3:8]={minus-three,NULL,NULL,zero,one,twenty-two,NULL,four,five,NULL,NULL,eight} -(1 row) - -update arrtest1 set i[0:2] = array[10,11,12], t[0:2] = array['ten','eleven','twelve']; -select * from arrtest1; - i | t ------------------------------------------------------+--------------------------------------------------------------------------------- - [-3:8]={-3,NULL,NULL,10,11,12,NULL,4,5,NULL,NULL,8} | [-3:8]={minus-three,NULL,NULL,ten,eleven,twelve,NULL,four,five,NULL,NULL,eight} -(1 row) - -update arrtest1 set i[8:10] = array[18,null,20], t[8:10] = array['p18',null,'p20']; -select * from arrtest1; - i | t ----------------------------------------------------------------+----------------------------------------------------------------------------------------- - [-3:10]={-3,NULL,NULL,10,11,12,NULL,4,5,NULL,NULL,18,NULL,20} | [-3:10]={minus-three,NULL,NULL,ten,eleven,twelve,NULL,four,five,NULL,NULL,p18,NULL,p20} -(1 row) - -update arrtest1 set i[11:12] = array[null,22], t[11:12] = array[null,'p22']; -select * from arrtest1; - i | t ------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------- - [-3:12]={-3,NULL,NULL,10,11,12,NULL,4,5,NULL,NULL,18,NULL,20,NULL,22} | [-3:12]={minus-three,NULL,NULL,ten,eleven,twelve,NULL,four,five,NULL,NULL,p18,NULL,p20,NULL,p22} -(1 row) - -update arrtest1 set i[15:16] = array[null,26], t[15:16] = array[null,'p26']; -select * from arrtest1; - i | t ------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------- - [-3:16]={-3,NULL,NULL,10,11,12,NULL,4,5,NULL,NULL,18,NULL,20,NULL,22,NULL,NULL,NULL,26} | [-3:16]={minus-three,NULL,NULL,ten,eleven,twelve,NULL,four,five,NULL,NULL,p18,NULL,p20,NULL,p22,NULL,NULL,NULL,p26} -(1 row) - -update arrtest1 set i[-5:-3] = array[-15,-14,-13], t[-5:-3] = array['m15','m14','m13']; -select * from arrtest1; - i | t ---------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------- - [-5:16]={-15,-14,-13,NULL,NULL,10,11,12,NULL,4,5,NULL,NULL,18,NULL,20,NULL,22,NULL,NULL,NULL,26} | [-5:16]={m15,m14,m13,NULL,NULL,ten,eleven,twelve,NULL,four,five,NULL,NULL,p18,NULL,p20,NULL,p22,NULL,NULL,NULL,p26} -(1 row) - -update arrtest1 set i[-7:-6] = array[-17,null], t[-7:-6] = array['m17',null]; -select * from arrtest1; - i | t ------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------ - [-7:16]={-17,NULL,-15,-14,-13,NULL,NULL,10,11,12,NULL,4,5,NULL,NULL,18,NULL,20,NULL,22,NULL,NULL,NULL,26} | [-7:16]={m17,NULL,m15,m14,m13,NULL,NULL,ten,eleven,twelve,NULL,four,five,NULL,NULL,p18,NULL,p20,NULL,p22,NULL,NULL,NULL,p26} -(1 row) - -update arrtest1 set i[-12:-10] = array[-22,null,-20], t[-12:-10] = array['m22',null,'m20']; -select * from arrtest1; - i | t ------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------ - [-12:16]={-22,NULL,-20,NULL,NULL,-17,NULL,-15,-14,-13,NULL,NULL,10,11,12,NULL,4,5,NULL,NULL,18,NULL,20,NULL,22,NULL,NULL,NULL,26} | [-12:16]={m22,NULL,m20,NULL,NULL,m17,NULL,m15,m14,m13,NULL,NULL,ten,eleven,twelve,NULL,four,five,NULL,NULL,p18,NULL,p20,NULL,p22,NULL,NULL,NULL,p26} -(1 row) - -delete from arrtest1; -insert into arrtest1 values(array[1,2,null,4], array['one','two',null,'four']); -select * from arrtest1; - i | t ---------------+--------------------- - {1,2,NULL,4} | {one,two,NULL,four} -(1 row) - -update arrtest1 set i[0:5] = array[0,1,2,null,4,5], t[0:5] = array['z','p1','p2',null,'p4','p5']; -select * from arrtest1; - i | t -------------------------+---------------------------- - [0:5]={0,1,2,NULL,4,5} | [0:5]={z,p1,p2,NULL,p4,p5} -(1 row) - --- --- array expressions and operators --- --- table creation and INSERTs -CREATE TEMP TABLE arrtest2 (i integer ARRAY[4], f float8[], n numeric[], t text[], d timestamp[]); -INSERT INTO arrtest2 VALUES( - ARRAY[[[113,142],[1,147]]], - ARRAY[1.1,1.2,1.3]::float8[], - ARRAY[1.1,1.2,1.3], - ARRAY[[['aaa','aab'],['aba','abb'],['aca','acb']],[['baa','bab'],['bba','bbb'],['bca','bcb']]], - ARRAY['19620326','19931223','19970117']::timestamp[] -); --- some more test data -CREATE TEMP TABLE arrtest_f (f0 int, f1 text, f2 float8); -insert into arrtest_f values(1,'cat1',1.21); -insert into arrtest_f values(2,'cat1',1.24); -insert into arrtest_f values(3,'cat1',1.18); -insert into arrtest_f values(4,'cat1',1.26); -insert into arrtest_f values(5,'cat1',1.15); -insert into arrtest_f values(6,'cat2',1.15); -insert into arrtest_f values(7,'cat2',1.26); -insert into arrtest_f values(8,'cat2',1.32); -insert into arrtest_f values(9,'cat2',1.30); -CREATE TEMP TABLE arrtest_i (f0 int, f1 text, f2 int); -insert into arrtest_i values(1,'cat1',21); -insert into arrtest_i values(2,'cat1',24); -insert into arrtest_i values(3,'cat1',18); -insert into arrtest_i values(4,'cat1',26); -insert into arrtest_i values(5,'cat1',15); -insert into arrtest_i values(6,'cat2',15); -insert into arrtest_i values(7,'cat2',26); -insert into arrtest_i values(8,'cat2',32); -insert into arrtest_i values(9,'cat2',30); --- expressions -SELECT t.f[1][3][1] AS "131", t.f[2][2][1] AS "221" FROM ( - SELECT ARRAY[[[111,112],[121,122],[131,132]],[[211,212],[221,122],[231,232]]] AS f -) AS t; - 131 | 221 ------+----- - 131 | 221 -(1 row) - -SELECT ARRAY[[[[[['hello'],['world']]]]]]; - array ---------------------------- - {{{{{{hello},{world}}}}}} -(1 row) - -SELECT ARRAY[ARRAY['hello'],ARRAY['world']]; - array -------------------- - {{hello},{world}} -(1 row) - -SELECT ARRAY(select f2 from arrtest_f order by f2) AS "ARRAY"; - ARRAY ------------------------------------------------ - {1.15,1.15,1.18,1.21,1.24,1.26,1.26,1.3,1.32} -(1 row) - --- with nulls -SELECT '{1,null,3}'::int[]; - int4 ------------- - {1,NULL,3} -(1 row) - -SELECT ARRAY[1,NULL,3]; - array ------------- - {1,NULL,3} -(1 row) - --- functions -SELECT array_append(array[42], 6) AS "{42,6}"; - {42,6} --------- - {42,6} -(1 row) - -SELECT array_prepend(6, array[42]) AS "{6,42}"; - {6,42} --------- - {6,42} -(1 row) - -SELECT array_cat(ARRAY[1,2], ARRAY[3,4]) AS "{1,2,3,4}"; - {1,2,3,4} ------------ - {1,2,3,4} -(1 row) - -SELECT array_cat(ARRAY[1,2], ARRAY[[3,4],[5,6]]) AS "{{1,2},{3,4},{5,6}}"; - {{1,2},{3,4},{5,6}} ---------------------- - {{1,2},{3,4},{5,6}} -(1 row) - -SELECT array_cat(ARRAY[[3,4],[5,6]], ARRAY[1,2]) AS "{{3,4},{5,6},{1,2}}"; - {{3,4},{5,6},{1,2}} ---------------------- - {{3,4},{5,6},{1,2}} -(1 row) - -SELECT array_position(ARRAY[1,2,3,4,5], 4); - array_position ----------------- - 4 -(1 row) - -SELECT array_position(ARRAY[5,3,4,2,1], 4); - array_position ----------------- - 3 -(1 row) - -SELECT array_position(ARRAY[[1,2],[3,4]], 3); -ERROR: searching for elements in multidimensional arrays is not supported -SELECT array_position(ARRAY['sun','mon','tue','wed','thu','fri','sat'], 'mon'); - array_position ----------------- - 2 -(1 row) - -SELECT array_position(ARRAY['sun','mon','tue','wed','thu','fri','sat'], 'sat'); - array_position ----------------- - 7 -(1 row) - -SELECT array_position(ARRAY['sun','mon','tue','wed','thu','fri','sat'], NULL); - array_position ----------------- - -(1 row) - -SELECT array_position(ARRAY['sun','mon','tue','wed','thu',NULL,'fri','sat'], NULL); - array_position ----------------- - 6 -(1 row) - -SELECT array_position(ARRAY['sun','mon','tue','wed','thu',NULL,'fri','sat'], 'sat'); - array_position ----------------- - 8 -(1 row) - -SELECT array_positions(NULL, 10); - array_positions ------------------ - -(1 row) - -SELECT array_positions(NULL, NULL::int); - array_positions ------------------ - -(1 row) - -SELECT array_positions(ARRAY[1,2,3,4,5,6,1,2,3,4,5,6], 4); - array_positions ------------------ - {4,10} -(1 row) - -SELECT array_positions(ARRAY[[1,2],[3,4]], 4); -ERROR: searching for elements in multidimensional arrays is not supported -SELECT array_positions(ARRAY[1,2,3,4,5,6,1,2,3,4,5,6], NULL); - array_positions ------------------ - {} -(1 row) - -SELECT array_positions(ARRAY[1,2,3,NULL,5,6,1,2,3,NULL,5,6], NULL); - array_positions ------------------ - {4,10} -(1 row) - -SELECT array_length(array_positions(ARRAY(SELECT 'AAAAAAAAAAAAAAAAAAAAAAAAA'::text || i % 10 - FROM generate_series(1,100) g(i)), - 'AAAAAAAAAAAAAAAAAAAAAAAAA5'), 1); - array_length --------------- - 10 -(1 row) - -DO $$ -DECLARE - o int; - a int[] := ARRAY[1,2,3,2,3,1,2]; -BEGIN - o := array_position(a, 2); - WHILE o IS NOT NULL - LOOP - RAISE NOTICE '%', o; - o := array_position(a, 2, o + 1); - END LOOP; -END -$$ LANGUAGE plpgsql; -NOTICE: 2 -NOTICE: 4 -NOTICE: 7 -SELECT array_position('[2:4]={1,2,3}'::int[], 1); - array_position ----------------- - 2 -(1 row) - -SELECT array_positions('[2:4]={1,2,3}'::int[], 1); - array_positions ------------------ - {2} -(1 row) - -SELECT - array_position(ids, (1, 1)), - array_positions(ids, (1, 1)) - FROM -(VALUES - (ARRAY[(0, 0), (1, 1)]), - (ARRAY[(1, 1)]) -) AS f (ids); - array_position | array_positions -----------------+----------------- - 2 | {2} - 1 | {1} -(2 rows) - --- operators -SELECT a FROM arrtest WHERE b = ARRAY[[[113,142],[1,147]]]; - a ---------------- - {16,25,3,4,5} -(1 row) - -SELECT NOT ARRAY[1.1,1.2,1.3] = ARRAY[1.1,1.2,1.3] AS "FALSE"; - FALSE -------- - f -(1 row) - -SELECT ARRAY[1,2] || 3 AS "{1,2,3}"; - {1,2,3} ---------- - {1,2,3} -(1 row) - -SELECT 0 || ARRAY[1,2] AS "{0,1,2}"; - {0,1,2} ---------- - {0,1,2} -(1 row) - -SELECT ARRAY[1,2] || ARRAY[3,4] AS "{1,2,3,4}"; - {1,2,3,4} ------------ - {1,2,3,4} -(1 row) - -SELECT ARRAY[[['hello','world']]] || ARRAY[[['happy','birthday']]] AS "ARRAY"; - ARRAY --------------------------------------- - {{{hello,world}},{{happy,birthday}}} -(1 row) - -SELECT ARRAY[[1,2],[3,4]] || ARRAY[5,6] AS "{{1,2},{3,4},{5,6}}"; - {{1,2},{3,4},{5,6}} ---------------------- - {{1,2},{3,4},{5,6}} -(1 row) - -SELECT ARRAY[0,0] || ARRAY[1,1] || ARRAY[2,2] AS "{0,0,1,1,2,2}"; - {0,0,1,1,2,2} ---------------- - {0,0,1,1,2,2} -(1 row) - -SELECT 0 || ARRAY[1,2] || 3 AS "{0,1,2,3}"; - {0,1,2,3} ------------ - {0,1,2,3} -(1 row) - -SELECT ARRAY[1.1] || ARRAY[2,3,4]; - ?column? -------------- - {1.1,2,3,4} -(1 row) - -SELECT array_agg(x) || array_agg(x) FROM (VALUES (ROW(1,2)), (ROW(3,4))) v(x); - ?column? ------------------------------------ - {"(1,2)","(3,4)","(1,2)","(3,4)"} -(1 row) - -SELECT ROW(1,2) || array_agg(x) FROM (VALUES (ROW(3,4)), (ROW(5,6))) v(x); - ?column? ---------------------------- - {"(1,2)","(3,4)","(5,6)"} -(1 row) - -SELECT * FROM array_op_test WHERE i @> '{32}' ORDER BY seqno; - seqno | i | t --------+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------ - 6 | {39,35,5,94,17,92,60,32} | {AAAAAAAAAAAAAAA35875,AAAAAAAAAAAAAAAA23657} - 74 | {32} | {AAAAAAAAAAAAAAAA1729,AAAAAAAAAAAAA22860,AAAAAA99807,AAAAA17383,AAAAAAAAAAAAAAA67062,AAAAAAAAAAA15165,AAAAAAAAAAA50956} - 77 | {97,15,32,17,55,59,18,37,50,39} | {AAAAAAAAAAAA67946,AAAAAA54032,AAAAAAAA81587,55847,AAAAAAAAAAAAAA28620,AAAAAAAAAAAAAAAAA43052,AAAAAA75463,AAAA49534,AAAAAAAA44066} - 89 | {40,32,17,6,30,88} | {AA44673,AAAAAAAAAAA6119,AAAAAAAAAAAAAAAA23657,AAAAAAAAAAAAAAAAAA47955,AAAAAAAAAAAAAAAA33598,AAAAAAAAAAA33576,AA44673} - 98 | {38,34,32,89} | {AAAAAAAAAAAAAAAAAA71621,AAAA8857,AAAAAAAAAAAAAAAAAAA65037,AAAAAAAAAAAAAAAA31334,AAAAAAAAAA48845} - 100 | {85,32,57,39,49,84,32,3,30} | {AAAAAAA80240,AAAAAAAAAAAAAAAA1729,AAAAA60038,AAAAAAAAAAA92631,AAAAAAAA9523} -(6 rows) - -SELECT * FROM array_op_test WHERE i && '{32}' ORDER BY seqno; - seqno | i | t --------+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------ - 6 | {39,35,5,94,17,92,60,32} | {AAAAAAAAAAAAAAA35875,AAAAAAAAAAAAAAAA23657} - 74 | {32} | {AAAAAAAAAAAAAAAA1729,AAAAAAAAAAAAA22860,AAAAAA99807,AAAAA17383,AAAAAAAAAAAAAAA67062,AAAAAAAAAAA15165,AAAAAAAAAAA50956} - 77 | {97,15,32,17,55,59,18,37,50,39} | {AAAAAAAAAAAA67946,AAAAAA54032,AAAAAAAA81587,55847,AAAAAAAAAAAAAA28620,AAAAAAAAAAAAAAAAA43052,AAAAAA75463,AAAA49534,AAAAAAAA44066} - 89 | {40,32,17,6,30,88} | {AA44673,AAAAAAAAAAA6119,AAAAAAAAAAAAAAAA23657,AAAAAAAAAAAAAAAAAA47955,AAAAAAAAAAAAAAAA33598,AAAAAAAAAAA33576,AA44673} - 98 | {38,34,32,89} | {AAAAAAAAAAAAAAAAAA71621,AAAA8857,AAAAAAAAAAAAAAAAAAA65037,AAAAAAAAAAAAAAAA31334,AAAAAAAAAA48845} - 100 | {85,32,57,39,49,84,32,3,30} | {AAAAAAA80240,AAAAAAAAAAAAAAAA1729,AAAAA60038,AAAAAAAAAAA92631,AAAAAAAA9523} -(6 rows) - -SELECT * FROM array_op_test WHERE i @> '{17}' ORDER BY seqno; - seqno | i | t --------+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------ - 6 | {39,35,5,94,17,92,60,32} | {AAAAAAAAAAAAAAA35875,AAAAAAAAAAAAAAAA23657} - 12 | {17,99,18,52,91,72,0,43,96,23} | {AAAAA33250,AAAAAAAAAAAAAAAAAAA85420,AAAAAAAAAAA33576} - 15 | {17,14,16,63,67} | {AA6416,AAAAAAAAAA646,AAAAA95309} - 19 | {52,82,17,74,23,46,69,51,75} | {AAAAAAAAAAAAA73084,AAAAA75968,AAAAAAAAAAAAAAAA14047,AAAAAAA80240,AAAAAAAAAAAAAAAAAAA1205,A68938} - 53 | {38,17} | {AAAAAAAAAAA21658} - 65 | {61,5,76,59,17} | {AAAAAA99807,AAAAA64741,AAAAAAAAAAA53908,AA21643,AAAAAAAAA10012} - 77 | {97,15,32,17,55,59,18,37,50,39} | {AAAAAAAAAAAA67946,AAAAAA54032,AAAAAAAA81587,55847,AAAAAAAAAAAAAA28620,AAAAAAAAAAAAAAAAA43052,AAAAAA75463,AAAA49534,AAAAAAAA44066} - 89 | {40,32,17,6,30,88} | {AA44673,AAAAAAAAAAA6119,AAAAAAAAAAAAAAAA23657,AAAAAAAAAAAAAAAAAA47955,AAAAAAAAAAAAAAAA33598,AAAAAAAAAAA33576,AA44673} -(8 rows) - -SELECT * FROM array_op_test WHERE i && '{17}' ORDER BY seqno; - seqno | i | t --------+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------ - 6 | {39,35,5,94,17,92,60,32} | {AAAAAAAAAAAAAAA35875,AAAAAAAAAAAAAAAA23657} - 12 | {17,99,18,52,91,72,0,43,96,23} | {AAAAA33250,AAAAAAAAAAAAAAAAAAA85420,AAAAAAAAAAA33576} - 15 | {17,14,16,63,67} | {AA6416,AAAAAAAAAA646,AAAAA95309} - 19 | {52,82,17,74,23,46,69,51,75} | {AAAAAAAAAAAAA73084,AAAAA75968,AAAAAAAAAAAAAAAA14047,AAAAAAA80240,AAAAAAAAAAAAAAAAAAA1205,A68938} - 53 | {38,17} | {AAAAAAAAAAA21658} - 65 | {61,5,76,59,17} | {AAAAAA99807,AAAAA64741,AAAAAAAAAAA53908,AA21643,AAAAAAAAA10012} - 77 | {97,15,32,17,55,59,18,37,50,39} | {AAAAAAAAAAAA67946,AAAAAA54032,AAAAAAAA81587,55847,AAAAAAAAAAAAAA28620,AAAAAAAAAAAAAAAAA43052,AAAAAA75463,AAAA49534,AAAAAAAA44066} - 89 | {40,32,17,6,30,88} | {AA44673,AAAAAAAAAAA6119,AAAAAAAAAAAAAAAA23657,AAAAAAAAAAAAAAAAAA47955,AAAAAAAAAAAAAAAA33598,AAAAAAAAAAA33576,AA44673} -(8 rows) - -SELECT * FROM array_op_test WHERE i @> '{32,17}' ORDER BY seqno; - seqno | i | t --------+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------ - 6 | {39,35,5,94,17,92,60,32} | {AAAAAAAAAAAAAAA35875,AAAAAAAAAAAAAAAA23657} - 77 | {97,15,32,17,55,59,18,37,50,39} | {AAAAAAAAAAAA67946,AAAAAA54032,AAAAAAAA81587,55847,AAAAAAAAAAAAAA28620,AAAAAAAAAAAAAAAAA43052,AAAAAA75463,AAAA49534,AAAAAAAA44066} - 89 | {40,32,17,6,30,88} | {AA44673,AAAAAAAAAAA6119,AAAAAAAAAAAAAAAA23657,AAAAAAAAAAAAAAAAAA47955,AAAAAAAAAAAAAAAA33598,AAAAAAAAAAA33576,AA44673} -(3 rows) - -SELECT * FROM array_op_test WHERE i && '{32,17}' ORDER BY seqno; - seqno | i | t --------+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------ - 6 | {39,35,5,94,17,92,60,32} | {AAAAAAAAAAAAAAA35875,AAAAAAAAAAAAAAAA23657} - 12 | {17,99,18,52,91,72,0,43,96,23} | {AAAAA33250,AAAAAAAAAAAAAAAAAAA85420,AAAAAAAAAAA33576} - 15 | {17,14,16,63,67} | {AA6416,AAAAAAAAAA646,AAAAA95309} - 19 | {52,82,17,74,23,46,69,51,75} | {AAAAAAAAAAAAA73084,AAAAA75968,AAAAAAAAAAAAAAAA14047,AAAAAAA80240,AAAAAAAAAAAAAAAAAAA1205,A68938} - 53 | {38,17} | {AAAAAAAAAAA21658} - 65 | {61,5,76,59,17} | {AAAAAA99807,AAAAA64741,AAAAAAAAAAA53908,AA21643,AAAAAAAAA10012} - 74 | {32} | {AAAAAAAAAAAAAAAA1729,AAAAAAAAAAAAA22860,AAAAAA99807,AAAAA17383,AAAAAAAAAAAAAAA67062,AAAAAAAAAAA15165,AAAAAAAAAAA50956} - 77 | {97,15,32,17,55,59,18,37,50,39} | {AAAAAAAAAAAA67946,AAAAAA54032,AAAAAAAA81587,55847,AAAAAAAAAAAAAA28620,AAAAAAAAAAAAAAAAA43052,AAAAAA75463,AAAA49534,AAAAAAAA44066} - 89 | {40,32,17,6,30,88} | {AA44673,AAAAAAAAAAA6119,AAAAAAAAAAAAAAAA23657,AAAAAAAAAAAAAAAAAA47955,AAAAAAAAAAAAAAAA33598,AAAAAAAAAAA33576,AA44673} - 98 | {38,34,32,89} | {AAAAAAAAAAAAAAAAAA71621,AAAA8857,AAAAAAAAAAAAAAAAAAA65037,AAAAAAAAAAAAAAAA31334,AAAAAAAAAA48845} - 100 | {85,32,57,39,49,84,32,3,30} | {AAAAAAA80240,AAAAAAAAAAAAAAAA1729,AAAAA60038,AAAAAAAAAAA92631,AAAAAAAA9523} -(11 rows) - -SELECT * FROM array_op_test WHERE i <@ '{38,34,32,89}' ORDER BY seqno; - seqno | i | t --------+---------------+---------------------------------------------------------------------------------------------------------------------------- - 40 | {34} | {AAAAAAAAAAAAAA10611,AAAAAAAAAAAAAAAAAAA1205,AAAAAAAAAAA50956,AAAAAAAAAAAAAAAA31334,AAAAA70466,AAAAAAAA81587,AAAAAAA74623} - 74 | {32} | {AAAAAAAAAAAAAAAA1729,AAAAAAAAAAAAA22860,AAAAAA99807,AAAAA17383,AAAAAAAAAAAAAAA67062,AAAAAAAAAAA15165,AAAAAAAAAAA50956} - 98 | {38,34,32,89} | {AAAAAAAAAAAAAAAAAA71621,AAAA8857,AAAAAAAAAAAAAAAAAAA65037,AAAAAAAAAAAAAAAA31334,AAAAAAAAAA48845} - 101 | {} | {} -(4 rows) - -SELECT * FROM array_op_test WHERE i = '{}' ORDER BY seqno; - seqno | i | t --------+----+---- - 101 | {} | {} -(1 row) - -SELECT * FROM array_op_test WHERE i @> '{}' ORDER BY seqno; - seqno | i | t --------+---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - 1 | {92,75,71,52,64,83} | {AAAAAAAA44066,AAAAAA1059,AAAAAAAAAAA176,AAAAAAA48038} - 2 | {3,6} | {AAAAAA98232,AAAAAAAA79710,AAAAAAAAAAAAAAAAA69675,AAAAAAAAAAAAAAAA55798,AAAAAAAAA12793} - 3 | {37,64,95,43,3,41,13,30,11,43} | {AAAAAAAAAA48845,AAAAA75968,AAAAA95309,AAA54451,AAAAAAAAAA22292,AAAAAAA99836,A96617,AA17009,AAAAAAAAAAAAAA95246} - 4 | {71,39,99,55,33,75,45} | {AAAAAAAAA53663,AAAAAAAAAAAAAAA67062,AAAAAAAAAA64777,AAA99043,AAAAAAAAAAAAAAAAAAA91804,39557} - 5 | {50,42,77,50,4} | {AAAAAAAAAAAAAAAAA26540,AAAAAAA79710,AAAAAAAAAAAAAAAAAAA1205,AAAAAAAAAAA176,AAAAA95309,AAAAAAAAAAA46154,AAAAAA66777,AAAAAAAAA27249,AAAAAAAAAA64777,AAAAAAAAAAAAAAAAAAA70104} - 6 | {39,35,5,94,17,92,60,32} | {AAAAAAAAAAAAAAA35875,AAAAAAAAAAAAAAAA23657} - 7 | {12,51,88,64,8} | {AAAAAAAAAAAAAAAAAA12591,AAAAAAAAAAAAAAAAA50407,AAAAAAAAAAAA67946} - 8 | {60,84} | {AAAAAAA81898,AAAAAA1059,AAAAAAAAAAAA81511,AAAAA961,AAAAAAAAAAAAAAAA31334,AAAAA64741,AA6416,AAAAAAAAAAAAAAAAAA32918,AAAAAAAAAAAAAAAAA50407} - 9 | {56,52,35,27,80,44,81,22} | {AAAAAAAAAAAAAAA73034,AAAAAAAAAAAAA7929,AAAAAAA66161,AA88409,39557,A27153,AAAAAAAA9523,AAAAAAAAAAA99000} - 10 | {71,5,45} | {AAAAAAAAAAA21658,AAAAAAAAAAAA21089,AAA54451,AAAAAAAAAAAAAAAAAA54141,AAAAAAAAAAAAAA28620,AAAAAAAAAAA21658,AAAAAAAAAAA74076,AAAAAAAAA27249} - 11 | {41,86,74,48,22,74,47,50} | {AAAAAAAA9523,AAAAAAAAAAAA37562,AAAAAAAAAAAAAAAA14047,AAAAAAAAAAA46154,AAAA41702,AAAAAAAAAAAAAAAAA764,AAAAA62737,39557} - 12 | {17,99,18,52,91,72,0,43,96,23} | {AAAAA33250,AAAAAAAAAAAAAAAAAAA85420,AAAAAAAAAAA33576} - 13 | {3,52,34,23} | {AAAAAA98232,AAAA49534,AAAAAAAAAAA21658} - 14 | {78,57,19} | {AAAA8857,AAAAAAAAAAAAAAA73034,AAAAAAAA81587,AAAAAAAAAAAAAAA68526,AAAAA75968,AAAAAAAAAAAAAA65909,AAAAAAAAA10012,AAAAAAAAAAAAAA65909} - 15 | {17,14,16,63,67} | {AA6416,AAAAAAAAAA646,AAAAA95309} - 16 | {14,63,85,11} | {AAAAAA66777} - 17 | {7,10,81,85} | {AAAAAA43678,AAAAAAA12144,AAAAAAAAAAA50956,AAAAAAAAAAAAAAAAAAA15356} - 18 | {1} | {AAAAAAAAAAA33576,AAAAA95309,64261,AAA59323,AAAAAAAAAAAAAA95246,55847,AAAAAAAAAAAA67946,AAAAAAAAAAAAAAAAAA64374} - 19 | {52,82,17,74,23,46,69,51,75} | {AAAAAAAAAAAAA73084,AAAAA75968,AAAAAAAAAAAAAAAA14047,AAAAAAA80240,AAAAAAAAAAAAAAAAAAA1205,A68938} - 20 | {72,89,70,51,54,37,8,49,79} | {AAAAAA58494} - 21 | {2,8,65,10,5,79,43} | {AAAAAAAAAAAAAAAAA88852,AAAAAAAAAAAAAAAAAAA91804,AAAAA64669,AAAAAAAAAAAAAAAA1443,AAAAAAAAAAAAAAAA23657,AAAAA12179,AAAAAAAAAAAAAAAAA88852,AAAAAAAAAAAAAAAA31334,AAAAAAAAAAAAAAAA41303,AAAAAAAAAAAAAAAAAAA85420} - 22 | {11,6,56,62,53,30} | {AAAAAAAA72908} - 23 | {40,90,5,38,72,40,30,10,43,55} | {A6053,AAAAAAAAAAA6119,AA44673,AAAAAAAAAAAAAAAAA764,AA17009,AAAAA17383,AAAAA70514,AAAAA33250,AAAAA95309,AAAAAAAAAAAA37562} - 24 | {94,61,99,35,48} | {AAAAAAAAAAA50956,AAAAAAAAAAA15165,AAAA85070,AAAAAAAAAAAAAAA36627,AAAAA961,AAAAAAAAAA55219} - 25 | {31,1,10,11,27,79,38} | {AAAAAAAAAAAAAAAAAA59334,45449} - 26 | {71,10,9,69,75} | {47735,AAAAAAA21462,AAAAAAAAAAAAAAAAA6897,AAAAAAAAAAAAAAAAAAA91804,AAAAAAAAA72121,AAAAAAAAAAAAAAAAAAA1205,AAAAA41597,AAAA8857,AAAAAAAAAAAAAAAAAAA15356,AA17009} - 27 | {94} | {AA6416,A6053,AAAAAAA21462,AAAAAAA57334,AAAAAAAAAAAAAAAAAA12591,AA88409,AAAAAAAAAAAAA70254} - 28 | {14,33,6,34,14} | {AAAAAAAAAAAAAAA13198,AAAAAAAA69452,AAAAAAAAAAA82945,AAAAAAA12144,AAAAAAAAA72121,AAAAAAAAAA18601} - 29 | {39,21} | {AAAAAAAAAAAAAAAAA6897,AAAAAAAAAAAAAAAAAAA38885,AAAA85070,AAAAAAAAAAAAAAAAAAA70104,AAAAA66674,AAAAAAAAAAAAA62007,AAAAAAAA69452,AAAAAAA1242,AAAAAAAAAAAAAAAA1729,AAAA35194} - 30 | {26,81,47,91,34} | {AAAAAAAAAAAAAAAAAAA70104,AAAAAAA80240} - 31 | {80,24,18,21,54} | {AAAAAAAAAAAAAAA13198,AAAAAAAAAAAAAAAAAAA70415,A27153,AAAAAAAAA53663,AAAAAAAAAAAAAAAAA50407,A68938} - 32 | {58,79,82,80,67,75,98,10,41} | {AAAAAAAAAAAAAAAAAA61286,AAA54451,AAAAAAAAAAAAAAAAAAA87527,A96617,51533} - 33 | {74,73} | {A85417,AAAAAAA56483,AAAAA17383,AAAAAAAAAAAAA62159,AAAAAAAAAAAA52814,AAAAAAAAAAAAA85723,AAAAAAAAAAAAAAAAAA55796} - 34 | {70,45} | {AAAAAAAAAAAAAAAAAA71621,AAAAAAAAAAAAAA28620,AAAAAAAAAA55219,AAAAAAAA23648,AAAAAAAAAA22292,AAAAAAA1242} - 35 | {23,40} | {AAAAAAAAAAAA52814,AAAA48949,AAAAAAAAA34727,AAAA8857,AAAAAAAAAAAAAAAAAAA62179,AAAAAAAAAAAAAAA68526,AAAAAAA99836,AAAAAAAA50094,AAAA91194,AAAAAAAAAAAAA73084} - 36 | {79,82,14,52,30,5,79} | {AAAAAAAAA53663,AAAAAAAAAAAAAAAA55798,AAAAAAAAAAAAAAAAAAA89194,AA88409,AAAAAAAAAAAAAAA81326,AAAAAAAAAAAAAAAAA63050,AAAAAAAAAAAAAAAA33598} - 37 | {53,11,81,39,3,78,58,64,74} | {AAAAAAAAAAAAAAAAAAA17075,AAAAAAA66161,AAAAAAAA23648,AAAAAAAAAAAAAA10611} - 38 | {59,5,4,95,28} | {AAAAAAAAAAA82945,A96617,47735,AAAAA12179,AAAAA64669,AAAAAA99807,AA74433,AAAAAAAAAAAAAAAAA59387} - 39 | {82,43,99,16,74} | {AAAAAAAAAAAAAAA67062,AAAAAAA57334,AAAAAAAAAAAAAA65909,A27153,AAAAAAAAAAAAAAAAAAA17075,AAAAAAAAAAAAAAAAA43052,AAAAAAAAAA64777,AAAAAAAAAAAA81511,AAAAAAAAAAAAAA65909,AAAAAAAAAAAAAA28620} - 40 | {34} | {AAAAAAAAAAAAAA10611,AAAAAAAAAAAAAAAAAAA1205,AAAAAAAAAAA50956,AAAAAAAAAAAAAAAA31334,AAAAA70466,AAAAAAAA81587,AAAAAAA74623} - 41 | {19,26,63,12,93,73,27,94} | {AAAAAAA79710,AAAAAAAAAA55219,AAAA41702,AAAAAAAAAAAAAAAAAAA17075,AAAAAAAAAAAAAAAAAA71621,AAAAAAAAAAAAAAAAA63050,AAAAAAA99836,AAAAAAAAAAAAAA8666} - 42 | {15,76,82,75,8,91} | {AAAAAAAAAAA176,AAAAAA38063,45449,AAAAAA54032,AAAAAAA81898,AA6416,AAAAAAAAAAAAAAAAAAA62179,45449,AAAAA60038,AAAAAAAA81587} - 43 | {39,87,91,97,79,28} | {AAAAAAAAAAA74076,A96617,AAAAAAAAAAAAAAAAAAA89194,AAAAAAAAAAAAAAAAAA55796,AAAAAAAAAAAAAAAA23657,AAAAAAAAAAAA67946} - 44 | {40,58,68,29,54} | {AAAAAAA81898,AAAAAA66777,AAAAAA98232} - 45 | {99,45} | {AAAAAAAA72908,AAAAAAAAAAAAAAAAAAA17075,AA88409,AAAAAAAAAAAAAAAAAA36842,AAAAAAA48038,AAAAAAAAAAAAAA10611} - 46 | {53,24} | {AAAAAAAAAAA53908,AAAAAA54032,AAAAA17383,AAAA48949,AAAAAAAAAA18601,AAAAA64669,45449,AAAAAAAAAAA98051,AAAAAAAAAAAAAAAAAA71621} - 47 | {98,23,64,12,75,61} | {AAA59323,AAAAA95309,AAAAAAAAAAAAAAAA31334,AAAAAAAAA27249,AAAAA17383,AAAAAAAAAAAA37562,AAAAAA1059,A84822,55847,AAAAA70466} - 48 | {76,14} | {AAAAAAAAAAAAA59671,AAAAAAAAAAAAAAAAAAA91804,AAAAAA66777,AAAAAAAAAAAAAAAAAAA89194,AAAAAAAAAAAAAAA36627,AAAAAAAAAAAAAAAAAAA17075,AAAAAAAAAAAAA73084,AAAAAAA79710,AAAAAAAAAAAAAAA40402,AAAAAAAAAAAAAAAAAAA65037} - 49 | {56,5,54,37,49} | {AA21643,AAAAAAAAAAA92631,AAAAAAAA81587} - 50 | {20,12,37,64,93} | {AAAAAAAAAA5483,AAAAAAAAAAAAAAAAAAA1205,AA6416,AAAAAAAAAAAAAAAAA63050,AAAAAAAAAAAAAAAAAA47955} - 51 | {47} | {AAAAAAAAAAAAAA96505,AAAAAAAAAAAAAAAAAA36842,AAAAA95309,AAAAAAAA81587,AA6416,AAAA91194,AAAAAA58494,AAAAAA1059,AAAAAAAA69452} - 52 | {89,0} | {AAAAAAAAAAAAAAAAAA47955,AAAAAAA48038,AAAAAAAAAAAAAAAAA43052,AAAAAAAAAAAAA73084,AAAAA70466,AAAAAAAAAAAAAAAAA764,AAAAAAAAAAA46154,AA66862} - 53 | {38,17} | {AAAAAAAAAAA21658} - 54 | {70,47} | {AAAAAAAAAAAAAAAAAA54141,AAAAA40681,AAAAAAA48038,AAAAAAAAAAAAAAAA29150,AAAAA41597,AAAAAAAAAAAAAAAAAA59334,AA15322} - 55 | {47,79,47,64,72,25,71,24,93} | {AAAAAAAAAAAAAAAAAA55796,AAAAA62737} - 56 | {33,7,60,54,93,90,77,85,39} | {AAAAAAAAAAAAAAAAAA32918,AA42406} - 57 | {23,45,10,42,36,21,9,96} | {AAAAAAAAAAAAAAAAAAA70415} - 58 | {92} | {AAAAAAAAAAAAAAAA98414,AAAAAAAA23648,AAAAAAAAAAAAAAAAAA55796,AA25381,AAAAAAAAAAA6119} - 59 | {9,69,46,77} | {39557,AAAAAAA89932,AAAAAAAAAAAAAAAAA43052,AAAAAAAAAAAAAAAAA26540,AAA20874,AA6416,AAAAAAAAAAAAAAAAAA47955} - 60 | {62,2,59,38,89} | {AAAAAAA89932,AAAAAAAAAAAAAAAAAAA15356,AA99927,AA17009,AAAAAAAAAAAAAAA35875} - 61 | {72,2,44,95,54,54,13} | {AAAAAAAAAAAAAAAAAAA91804} - 62 | {83,72,29,73} | {AAAAAAAAAAAAA15097,AAAA8857,AAAAAAAAAAAA35809,AAAAAAAAAAAA52814,AAAAAAAAAAAAAAAAAAA38885,AAAAAAAAAAAAAAAAAA24183,AAAAAA43678,A96617} - 63 | {11,4,61,87} | {AAAAAAAAA27249,AAAAAAAAAAAAAAAAAA32918,AAAAAAAAAAAAAAA13198,AAA20874,39557,51533,AAAAAAAAAAA53908,AAAAAAAAAAAAAA96505,AAAAAAAA78938} - 64 | {26,19,34,24,81,78} | {A96617,AAAAAAAAAAAAAAAAAAA70104,A68938,AAAAAAAAAAA53908,AAAAAAAAAAAAAAA453,AA17009,AAAAAAA80240} - 65 | {61,5,76,59,17} | {AAAAAA99807,AAAAA64741,AAAAAAAAAAA53908,AA21643,AAAAAAAAA10012} - 66 | {31,23,70,52,4,33,48,25} | {AAAAAAAAAAAAAAAAA69675,AAAAAAAA50094,AAAAAAAAAAA92631,AAAA35194,39557,AAAAAAA99836} - 67 | {31,94,7,10} | {AAAAAA38063,A96617,AAAA35194,AAAAAAAAAAAA67946} - 68 | {90,43,38} | {AA75092,AAAAAAAAAAAAAAAAA69675,AAAAAAAAAAA92631,AAAAAAAAA10012,AAAAAAAAAAAAA7929,AA21643} - 69 | {67,35,99,85,72,86,44} | {AAAAAAAAAAAAAAAAAAA1205,AAAAAAAA50094,AAAAAAAAAAAAAAAA1729,AAAAAAAAAAAAAAAAAA47955} - 70 | {56,70,83} | {AAAA41702,AAAAAAAAAAA82945,AA21643,AAAAAAAAAAA99000,A27153,AA25381,AAAAAAAAAAAAAA96505,AAAAAAA1242} - 71 | {74,26} | {AAAAAAAAAAA50956,AA74433,AAAAAAA21462,AAAAAAAAAAAAAAAAAAA17075,AAAAAAAAAAAAAAA36627,AAAAAAAAAAAAA70254,AAAAAAAAAA43419,39557} - 72 | {22,1,16,78,20,91,83} | {47735,AAAAAAA56483,AAAAAAAAAAAAA93788,AA42406,AAAAAAAAAAAAA73084,AAAAAAAA72908,AAAAAAAAAAAAAAAAAA61286,AAAAA66674,AAAAAAAAAAAAAAAAA50407} - 73 | {88,25,96,78,65,15,29,19} | {AAA54451,AAAAAAAAA27249,AAAAAAA9228,AAAAAAAAAAAAAAA67062,AAAAAAAAAAAAAAAAAAA70415,AAAAA17383,AAAAAAAAAAAAAAAA33598} - 74 | {32} | {AAAAAAAAAAAAAAAA1729,AAAAAAAAAAAAA22860,AAAAAA99807,AAAAA17383,AAAAAAAAAAAAAAA67062,AAAAAAAAAAA15165,AAAAAAAAAAA50956} - 75 | {12,96,83,24,71,89,55} | {AAAA48949,AAAAAAAA29716,AAAAAAAAAAAAAAAAAAA1205,AAAAAAAAAAAA67946,AAAAAAAAAAAAAAAA29150,AAA28075,AAAAAAAAAAAAAAAAA43052} - 76 | {92,55,10,7} | {AAAAAAAAAAAAAAA67062} - 77 | {97,15,32,17,55,59,18,37,50,39} | {AAAAAAAAAAAA67946,AAAAAA54032,AAAAAAAA81587,55847,AAAAAAAAAAAAAA28620,AAAAAAAAAAAAAAAAA43052,AAAAAA75463,AAAA49534,AAAAAAAA44066} - 78 | {55,89,44,84,34} | {AAAAAAAAAAA6119,AAAAAAAAAAAAAA8666,AA99927,AA42406,AAAAAAA81898,AAAAAAA9228,AAAAAAAAAAA92631,AA21643,AAAAAAAAAAAAAA28620} - 79 | {45} | {AAAAAAAAAA646,AAAAAAAAAAAAAAAAAAA70415,AAAAAA43678,AAAAAAAA72908} - 80 | {74,89,44,80,0} | {AAAA35194,AAAAAAAA79710,AAA20874,AAAAAAAAAAAAAAAAAAA70104,AAAAAAAAAAAAA73084,AAAAAAA57334,AAAAAAA9228,AAAAAAAAAAAAA62007} - 81 | {63,77,54,48,61,53,97} | {AAAAAAAAAAAAAAA81326,AAAAAAAAAA22292,AA25381,AAAAAAAAAAA74076,AAAAAAA81898,AAAAAAAAA72121} - 82 | {34,60,4,79,78,16,86,89,42,50} | {AAAAA40681,AAAAAAAAAAAAAAAAAA12591,AAAAAAA80240,AAAAAAAAAAAAAAAA55798,AAAAAAAAAAAAAAAAAAA70104} - 83 | {14,10} | {AAAAAAAAAA22292,AAAAAAAAAAAAA70254,AAAAAAAAAAA6119} - 84 | {11,83,35,13,96,94} | {AAAAA95309,AAAAAAAAAAAAAAAAAA32918,AAAAAAAAAAAAAAAAAA24183} - 85 | {39,60} | {AAAAAAAAAAAAAAAA55798,AAAAAAAAAA22292,AAAAAAA66161,AAAAAAA21462,AAAAAAAAAAAAAAAAAA12591,55847,AAAAAA98232,AAAAAAAAAAA46154} - 86 | {33,81,72,74,45,36,82} | {AAAAAAAA81587,AAAAAAAAAAAAAA96505,45449,AAAA80176} - 87 | {57,27,50,12,97,68} | {AAAAAAAAAAAAAAAAA26540,AAAAAAAAA10012,AAAAAAAAAAAA35809,AAAAAAAAAAAAAAAA29150,AAAAAAAAAAA82945,AAAAAA66777,31228,AAAAAAAAAAAAAAAA23657,AAAAAAAAAAAAAA28620,AAAAAAAAAAAAAA96505} - 88 | {41,90,77,24,6,24} | {AAAA35194,AAAA35194,AAAAAAA80240,AAAAAAAAAAA46154,AAAAAA58494,AAAAAAAAAAAAAAAAAAA17075,AAAAAAAAAAAAAAAAAA59334,AAAAAAAAAAAAAAAAAAA91804,AA74433} - 89 | {40,32,17,6,30,88} | {AA44673,AAAAAAAAAAA6119,AAAAAAAAAAAAAAAA23657,AAAAAAAAAAAAAAAAAA47955,AAAAAAAAAAAAAAAA33598,AAAAAAAAAAA33576,AA44673} - 90 | {88,75} | {AAAAA60038,AAAAAAAA23648,AAAAAAAAAAA99000,AAAA41702,AAAAAAAAAAAAA22860,AAAAAAAAAAAAAAA68526} - 91 | {78} | {AAAAAAAAAAAAA62007,AAA99043} - 92 | {85,63,49,45} | {AAAAAAA89932,AAAAAAAAAAAAA22860,AAAAAAAAAAAAAAAAAAA1205,AAAAAAAAAAAA21089} - 93 | {11} | {AAAAAAAAAAA176,AAAAAAAAAAAAAA8666,AAAAAAAAAAAAAAA453,AAAAAAAAAAAAA85723,A68938,AAAAAAAAAAAAA9821,AAAAAAA48038,AAAAAAAAAAAAAAAAA59387,AA99927,AAAAA17383} - 94 | {98,9,85,62,88,91,60,61,38,86} | {AAAAAAAA81587,AAAAA17383,AAAAAAAA81587} - 95 | {47,77} | {AAAAAAAAAAAAAAAAA764,AAAAAAAAAAA74076,AAAAAAAAAA18107,AAAAA40681,AAAAAAAAAAAAAAA35875,AAAAA60038,AAAAAAA56483} - 96 | {23,97,43} | {AAAAAAAAAA646,A87088} - 97 | {54,2,86,65} | {47735,AAAAAAA99836,AAAAAAAAAAAAAAAAA6897,AAAAAAAAAAAAAAAA29150,AAAAAAA80240,AAAAAAAAAAAAAAAA98414,AAAAAAA56483,AAAAAAAAAAAAAAAA29150,AAAAAAA39692,AA21643} - 98 | {38,34,32,89} | {AAAAAAAAAAAAAAAAAA71621,AAAA8857,AAAAAAAAAAAAAAAAAAA65037,AAAAAAAAAAAAAAAA31334,AAAAAAAAAA48845} - 99 | {37,86} | {AAAAAAAAAAAAAAAAAA32918,AAAAA70514,AAAAAAAAA10012,AAAAAAAAAAAAAAAAA59387,AAAAAAAAAA64777,AAAAAAAAAAAAAAAAAAA15356} - 100 | {85,32,57,39,49,84,32,3,30} | {AAAAAAA80240,AAAAAAAAAAAAAAAA1729,AAAAA60038,AAAAAAAAAAA92631,AAAAAAAA9523} - 101 | {} | {} - 102 | {NULL} | {NULL} -(102 rows) - -SELECT * FROM array_op_test WHERE i && '{}' ORDER BY seqno; - seqno | i | t --------+---+--- -(0 rows) - -SELECT * FROM array_op_test WHERE i <@ '{}' ORDER BY seqno; - seqno | i | t --------+----+---- - 101 | {} | {} -(1 row) - -SELECT * FROM array_op_test WHERE i = '{NULL}' ORDER BY seqno; - seqno | i | t --------+--------+-------- - 102 | {NULL} | {NULL} -(1 row) - -SELECT * FROM array_op_test WHERE i @> '{NULL}' ORDER BY seqno; - seqno | i | t --------+---+--- -(0 rows) - -SELECT * FROM array_op_test WHERE i && '{NULL}' ORDER BY seqno; - seqno | i | t --------+---+--- -(0 rows) - -SELECT * FROM array_op_test WHERE i <@ '{NULL}' ORDER BY seqno; - seqno | i | t --------+----+---- - 101 | {} | {} -(1 row) - -SELECT * FROM array_op_test WHERE t @> '{AAAAAAAA72908}' ORDER BY seqno; - seqno | i | t --------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------- - 22 | {11,6,56,62,53,30} | {AAAAAAAA72908} - 45 | {99,45} | {AAAAAAAA72908,AAAAAAAAAAAAAAAAAAA17075,AA88409,AAAAAAAAAAAAAAAAAA36842,AAAAAAA48038,AAAAAAAAAAAAAA10611} - 72 | {22,1,16,78,20,91,83} | {47735,AAAAAAA56483,AAAAAAAAAAAAA93788,AA42406,AAAAAAAAAAAAA73084,AAAAAAAA72908,AAAAAAAAAAAAAAAAAA61286,AAAAA66674,AAAAAAAAAAAAAAAAA50407} - 79 | {45} | {AAAAAAAAAA646,AAAAAAAAAAAAAAAAAAA70415,AAAAAA43678,AAAAAAAA72908} -(4 rows) - -SELECT * FROM array_op_test WHERE t && '{AAAAAAAA72908}' ORDER BY seqno; - seqno | i | t --------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------- - 22 | {11,6,56,62,53,30} | {AAAAAAAA72908} - 45 | {99,45} | {AAAAAAAA72908,AAAAAAAAAAAAAAAAAAA17075,AA88409,AAAAAAAAAAAAAAAAAA36842,AAAAAAA48038,AAAAAAAAAAAAAA10611} - 72 | {22,1,16,78,20,91,83} | {47735,AAAAAAA56483,AAAAAAAAAAAAA93788,AA42406,AAAAAAAAAAAAA73084,AAAAAAAA72908,AAAAAAAAAAAAAAAAAA61286,AAAAA66674,AAAAAAAAAAAAAAAAA50407} - 79 | {45} | {AAAAAAAAAA646,AAAAAAAAAAAAAAAAAAA70415,AAAAAA43678,AAAAAAAA72908} -(4 rows) - -SELECT * FROM array_op_test WHERE t @> '{AAAAAAAAAA646}' ORDER BY seqno; - seqno | i | t --------+------------------+-------------------------------------------------------------------- - 15 | {17,14,16,63,67} | {AA6416,AAAAAAAAAA646,AAAAA95309} - 79 | {45} | {AAAAAAAAAA646,AAAAAAAAAAAAAAAAAAA70415,AAAAAA43678,AAAAAAAA72908} - 96 | {23,97,43} | {AAAAAAAAAA646,A87088} -(3 rows) - -SELECT * FROM array_op_test WHERE t && '{AAAAAAAAAA646}' ORDER BY seqno; - seqno | i | t --------+------------------+-------------------------------------------------------------------- - 15 | {17,14,16,63,67} | {AA6416,AAAAAAAAAA646,AAAAA95309} - 79 | {45} | {AAAAAAAAAA646,AAAAAAAAAAAAAAAAAAA70415,AAAAAA43678,AAAAAAAA72908} - 96 | {23,97,43} | {AAAAAAAAAA646,A87088} -(3 rows) - -SELECT * FROM array_op_test WHERE t @> '{AAAAAAAA72908,AAAAAAAAAA646}' ORDER BY seqno; - seqno | i | t --------+------+-------------------------------------------------------------------- - 79 | {45} | {AAAAAAAAAA646,AAAAAAAAAAAAAAAAAAA70415,AAAAAA43678,AAAAAAAA72908} -(1 row) - -SELECT * FROM array_op_test WHERE t && '{AAAAAAAA72908,AAAAAAAAAA646}' ORDER BY seqno; - seqno | i | t --------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------- - 15 | {17,14,16,63,67} | {AA6416,AAAAAAAAAA646,AAAAA95309} - 22 | {11,6,56,62,53,30} | {AAAAAAAA72908} - 45 | {99,45} | {AAAAAAAA72908,AAAAAAAAAAAAAAAAAAA17075,AA88409,AAAAAAAAAAAAAAAAAA36842,AAAAAAA48038,AAAAAAAAAAAAAA10611} - 72 | {22,1,16,78,20,91,83} | {47735,AAAAAAA56483,AAAAAAAAAAAAA93788,AA42406,AAAAAAAAAAAAA73084,AAAAAAAA72908,AAAAAAAAAAAAAAAAAA61286,AAAAA66674,AAAAAAAAAAAAAAAAA50407} - 79 | {45} | {AAAAAAAAAA646,AAAAAAAAAAAAAAAAAAA70415,AAAAAA43678,AAAAAAAA72908} - 96 | {23,97,43} | {AAAAAAAAAA646,A87088} -(6 rows) - -SELECT * FROM array_op_test WHERE t <@ '{AAAAAAAA72908,AAAAAAAAAAAAAAAAAAA17075,AA88409,AAAAAAAAAAAAAAAAAA36842,AAAAAAA48038,AAAAAAAAAAAAAA10611}' ORDER BY seqno; - seqno | i | t --------+--------------------+----------------------------------------------------------------------------------------------------------- - 22 | {11,6,56,62,53,30} | {AAAAAAAA72908} - 45 | {99,45} | {AAAAAAAA72908,AAAAAAAAAAAAAAAAAAA17075,AA88409,AAAAAAAAAAAAAAAAAA36842,AAAAAAA48038,AAAAAAAAAAAAAA10611} - 101 | {} | {} -(3 rows) - -SELECT * FROM array_op_test WHERE t = '{}' ORDER BY seqno; - seqno | i | t --------+----+---- - 101 | {} | {} -(1 row) - -SELECT * FROM array_op_test WHERE t @> '{}' ORDER BY seqno; - seqno | i | t --------+---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - 1 | {92,75,71,52,64,83} | {AAAAAAAA44066,AAAAAA1059,AAAAAAAAAAA176,AAAAAAA48038} - 2 | {3,6} | {AAAAAA98232,AAAAAAAA79710,AAAAAAAAAAAAAAAAA69675,AAAAAAAAAAAAAAAA55798,AAAAAAAAA12793} - 3 | {37,64,95,43,3,41,13,30,11,43} | {AAAAAAAAAA48845,AAAAA75968,AAAAA95309,AAA54451,AAAAAAAAAA22292,AAAAAAA99836,A96617,AA17009,AAAAAAAAAAAAAA95246} - 4 | {71,39,99,55,33,75,45} | {AAAAAAAAA53663,AAAAAAAAAAAAAAA67062,AAAAAAAAAA64777,AAA99043,AAAAAAAAAAAAAAAAAAA91804,39557} - 5 | {50,42,77,50,4} | {AAAAAAAAAAAAAAAAA26540,AAAAAAA79710,AAAAAAAAAAAAAAAAAAA1205,AAAAAAAAAAA176,AAAAA95309,AAAAAAAAAAA46154,AAAAAA66777,AAAAAAAAA27249,AAAAAAAAAA64777,AAAAAAAAAAAAAAAAAAA70104} - 6 | {39,35,5,94,17,92,60,32} | {AAAAAAAAAAAAAAA35875,AAAAAAAAAAAAAAAA23657} - 7 | {12,51,88,64,8} | {AAAAAAAAAAAAAAAAAA12591,AAAAAAAAAAAAAAAAA50407,AAAAAAAAAAAA67946} - 8 | {60,84} | {AAAAAAA81898,AAAAAA1059,AAAAAAAAAAAA81511,AAAAA961,AAAAAAAAAAAAAAAA31334,AAAAA64741,AA6416,AAAAAAAAAAAAAAAAAA32918,AAAAAAAAAAAAAAAAA50407} - 9 | {56,52,35,27,80,44,81,22} | {AAAAAAAAAAAAAAA73034,AAAAAAAAAAAAA7929,AAAAAAA66161,AA88409,39557,A27153,AAAAAAAA9523,AAAAAAAAAAA99000} - 10 | {71,5,45} | {AAAAAAAAAAA21658,AAAAAAAAAAAA21089,AAA54451,AAAAAAAAAAAAAAAAAA54141,AAAAAAAAAAAAAA28620,AAAAAAAAAAA21658,AAAAAAAAAAA74076,AAAAAAAAA27249} - 11 | {41,86,74,48,22,74,47,50} | {AAAAAAAA9523,AAAAAAAAAAAA37562,AAAAAAAAAAAAAAAA14047,AAAAAAAAAAA46154,AAAA41702,AAAAAAAAAAAAAAAAA764,AAAAA62737,39557} - 12 | {17,99,18,52,91,72,0,43,96,23} | {AAAAA33250,AAAAAAAAAAAAAAAAAAA85420,AAAAAAAAAAA33576} - 13 | {3,52,34,23} | {AAAAAA98232,AAAA49534,AAAAAAAAAAA21658} - 14 | {78,57,19} | {AAAA8857,AAAAAAAAAAAAAAA73034,AAAAAAAA81587,AAAAAAAAAAAAAAA68526,AAAAA75968,AAAAAAAAAAAAAA65909,AAAAAAAAA10012,AAAAAAAAAAAAAA65909} - 15 | {17,14,16,63,67} | {AA6416,AAAAAAAAAA646,AAAAA95309} - 16 | {14,63,85,11} | {AAAAAA66777} - 17 | {7,10,81,85} | {AAAAAA43678,AAAAAAA12144,AAAAAAAAAAA50956,AAAAAAAAAAAAAAAAAAA15356} - 18 | {1} | {AAAAAAAAAAA33576,AAAAA95309,64261,AAA59323,AAAAAAAAAAAAAA95246,55847,AAAAAAAAAAAA67946,AAAAAAAAAAAAAAAAAA64374} - 19 | {52,82,17,74,23,46,69,51,75} | {AAAAAAAAAAAAA73084,AAAAA75968,AAAAAAAAAAAAAAAA14047,AAAAAAA80240,AAAAAAAAAAAAAAAAAAA1205,A68938} - 20 | {72,89,70,51,54,37,8,49,79} | {AAAAAA58494} - 21 | {2,8,65,10,5,79,43} | {AAAAAAAAAAAAAAAAA88852,AAAAAAAAAAAAAAAAAAA91804,AAAAA64669,AAAAAAAAAAAAAAAA1443,AAAAAAAAAAAAAAAA23657,AAAAA12179,AAAAAAAAAAAAAAAAA88852,AAAAAAAAAAAAAAAA31334,AAAAAAAAAAAAAAAA41303,AAAAAAAAAAAAAAAAAAA85420} - 22 | {11,6,56,62,53,30} | {AAAAAAAA72908} - 23 | {40,90,5,38,72,40,30,10,43,55} | {A6053,AAAAAAAAAAA6119,AA44673,AAAAAAAAAAAAAAAAA764,AA17009,AAAAA17383,AAAAA70514,AAAAA33250,AAAAA95309,AAAAAAAAAAAA37562} - 24 | {94,61,99,35,48} | {AAAAAAAAAAA50956,AAAAAAAAAAA15165,AAAA85070,AAAAAAAAAAAAAAA36627,AAAAA961,AAAAAAAAAA55219} - 25 | {31,1,10,11,27,79,38} | {AAAAAAAAAAAAAAAAAA59334,45449} - 26 | {71,10,9,69,75} | {47735,AAAAAAA21462,AAAAAAAAAAAAAAAAA6897,AAAAAAAAAAAAAAAAAAA91804,AAAAAAAAA72121,AAAAAAAAAAAAAAAAAAA1205,AAAAA41597,AAAA8857,AAAAAAAAAAAAAAAAAAA15356,AA17009} - 27 | {94} | {AA6416,A6053,AAAAAAA21462,AAAAAAA57334,AAAAAAAAAAAAAAAAAA12591,AA88409,AAAAAAAAAAAAA70254} - 28 | {14,33,6,34,14} | {AAAAAAAAAAAAAAA13198,AAAAAAAA69452,AAAAAAAAAAA82945,AAAAAAA12144,AAAAAAAAA72121,AAAAAAAAAA18601} - 29 | {39,21} | {AAAAAAAAAAAAAAAAA6897,AAAAAAAAAAAAAAAAAAA38885,AAAA85070,AAAAAAAAAAAAAAAAAAA70104,AAAAA66674,AAAAAAAAAAAAA62007,AAAAAAAA69452,AAAAAAA1242,AAAAAAAAAAAAAAAA1729,AAAA35194} - 30 | {26,81,47,91,34} | {AAAAAAAAAAAAAAAAAAA70104,AAAAAAA80240} - 31 | {80,24,18,21,54} | {AAAAAAAAAAAAAAA13198,AAAAAAAAAAAAAAAAAAA70415,A27153,AAAAAAAAA53663,AAAAAAAAAAAAAAAAA50407,A68938} - 32 | {58,79,82,80,67,75,98,10,41} | {AAAAAAAAAAAAAAAAAA61286,AAA54451,AAAAAAAAAAAAAAAAAAA87527,A96617,51533} - 33 | {74,73} | {A85417,AAAAAAA56483,AAAAA17383,AAAAAAAAAAAAA62159,AAAAAAAAAAAA52814,AAAAAAAAAAAAA85723,AAAAAAAAAAAAAAAAAA55796} - 34 | {70,45} | {AAAAAAAAAAAAAAAAAA71621,AAAAAAAAAAAAAA28620,AAAAAAAAAA55219,AAAAAAAA23648,AAAAAAAAAA22292,AAAAAAA1242} - 35 | {23,40} | {AAAAAAAAAAAA52814,AAAA48949,AAAAAAAAA34727,AAAA8857,AAAAAAAAAAAAAAAAAAA62179,AAAAAAAAAAAAAAA68526,AAAAAAA99836,AAAAAAAA50094,AAAA91194,AAAAAAAAAAAAA73084} - 36 | {79,82,14,52,30,5,79} | {AAAAAAAAA53663,AAAAAAAAAAAAAAAA55798,AAAAAAAAAAAAAAAAAAA89194,AA88409,AAAAAAAAAAAAAAA81326,AAAAAAAAAAAAAAAAA63050,AAAAAAAAAAAAAAAA33598} - 37 | {53,11,81,39,3,78,58,64,74} | {AAAAAAAAAAAAAAAAAAA17075,AAAAAAA66161,AAAAAAAA23648,AAAAAAAAAAAAAA10611} - 38 | {59,5,4,95,28} | {AAAAAAAAAAA82945,A96617,47735,AAAAA12179,AAAAA64669,AAAAAA99807,AA74433,AAAAAAAAAAAAAAAAA59387} - 39 | {82,43,99,16,74} | {AAAAAAAAAAAAAAA67062,AAAAAAA57334,AAAAAAAAAAAAAA65909,A27153,AAAAAAAAAAAAAAAAAAA17075,AAAAAAAAAAAAAAAAA43052,AAAAAAAAAA64777,AAAAAAAAAAAA81511,AAAAAAAAAAAAAA65909,AAAAAAAAAAAAAA28620} - 40 | {34} | {AAAAAAAAAAAAAA10611,AAAAAAAAAAAAAAAAAAA1205,AAAAAAAAAAA50956,AAAAAAAAAAAAAAAA31334,AAAAA70466,AAAAAAAA81587,AAAAAAA74623} - 41 | {19,26,63,12,93,73,27,94} | {AAAAAAA79710,AAAAAAAAAA55219,AAAA41702,AAAAAAAAAAAAAAAAAAA17075,AAAAAAAAAAAAAAAAAA71621,AAAAAAAAAAAAAAAAA63050,AAAAAAA99836,AAAAAAAAAAAAAA8666} - 42 | {15,76,82,75,8,91} | {AAAAAAAAAAA176,AAAAAA38063,45449,AAAAAA54032,AAAAAAA81898,AA6416,AAAAAAAAAAAAAAAAAAA62179,45449,AAAAA60038,AAAAAAAA81587} - 43 | {39,87,91,97,79,28} | {AAAAAAAAAAA74076,A96617,AAAAAAAAAAAAAAAAAAA89194,AAAAAAAAAAAAAAAAAA55796,AAAAAAAAAAAAAAAA23657,AAAAAAAAAAAA67946} - 44 | {40,58,68,29,54} | {AAAAAAA81898,AAAAAA66777,AAAAAA98232} - 45 | {99,45} | {AAAAAAAA72908,AAAAAAAAAAAAAAAAAAA17075,AA88409,AAAAAAAAAAAAAAAAAA36842,AAAAAAA48038,AAAAAAAAAAAAAA10611} - 46 | {53,24} | {AAAAAAAAAAA53908,AAAAAA54032,AAAAA17383,AAAA48949,AAAAAAAAAA18601,AAAAA64669,45449,AAAAAAAAAAA98051,AAAAAAAAAAAAAAAAAA71621} - 47 | {98,23,64,12,75,61} | {AAA59323,AAAAA95309,AAAAAAAAAAAAAAAA31334,AAAAAAAAA27249,AAAAA17383,AAAAAAAAAAAA37562,AAAAAA1059,A84822,55847,AAAAA70466} - 48 | {76,14} | {AAAAAAAAAAAAA59671,AAAAAAAAAAAAAAAAAAA91804,AAAAAA66777,AAAAAAAAAAAAAAAAAAA89194,AAAAAAAAAAAAAAA36627,AAAAAAAAAAAAAAAAAAA17075,AAAAAAAAAAAAA73084,AAAAAAA79710,AAAAAAAAAAAAAAA40402,AAAAAAAAAAAAAAAAAAA65037} - 49 | {56,5,54,37,49} | {AA21643,AAAAAAAAAAA92631,AAAAAAAA81587} - 50 | {20,12,37,64,93} | {AAAAAAAAAA5483,AAAAAAAAAAAAAAAAAAA1205,AA6416,AAAAAAAAAAAAAAAAA63050,AAAAAAAAAAAAAAAAAA47955} - 51 | {47} | {AAAAAAAAAAAAAA96505,AAAAAAAAAAAAAAAAAA36842,AAAAA95309,AAAAAAAA81587,AA6416,AAAA91194,AAAAAA58494,AAAAAA1059,AAAAAAAA69452} - 52 | {89,0} | {AAAAAAAAAAAAAAAAAA47955,AAAAAAA48038,AAAAAAAAAAAAAAAAA43052,AAAAAAAAAAAAA73084,AAAAA70466,AAAAAAAAAAAAAAAAA764,AAAAAAAAAAA46154,AA66862} - 53 | {38,17} | {AAAAAAAAAAA21658} - 54 | {70,47} | {AAAAAAAAAAAAAAAAAA54141,AAAAA40681,AAAAAAA48038,AAAAAAAAAAAAAAAA29150,AAAAA41597,AAAAAAAAAAAAAAAAAA59334,AA15322} - 55 | {47,79,47,64,72,25,71,24,93} | {AAAAAAAAAAAAAAAAAA55796,AAAAA62737} - 56 | {33,7,60,54,93,90,77,85,39} | {AAAAAAAAAAAAAAAAAA32918,AA42406} - 57 | {23,45,10,42,36,21,9,96} | {AAAAAAAAAAAAAAAAAAA70415} - 58 | {92} | {AAAAAAAAAAAAAAAA98414,AAAAAAAA23648,AAAAAAAAAAAAAAAAAA55796,AA25381,AAAAAAAAAAA6119} - 59 | {9,69,46,77} | {39557,AAAAAAA89932,AAAAAAAAAAAAAAAAA43052,AAAAAAAAAAAAAAAAA26540,AAA20874,AA6416,AAAAAAAAAAAAAAAAAA47955} - 60 | {62,2,59,38,89} | {AAAAAAA89932,AAAAAAAAAAAAAAAAAAA15356,AA99927,AA17009,AAAAAAAAAAAAAAA35875} - 61 | {72,2,44,95,54,54,13} | {AAAAAAAAAAAAAAAAAAA91804} - 62 | {83,72,29,73} | {AAAAAAAAAAAAA15097,AAAA8857,AAAAAAAAAAAA35809,AAAAAAAAAAAA52814,AAAAAAAAAAAAAAAAAAA38885,AAAAAAAAAAAAAAAAAA24183,AAAAAA43678,A96617} - 63 | {11,4,61,87} | {AAAAAAAAA27249,AAAAAAAAAAAAAAAAAA32918,AAAAAAAAAAAAAAA13198,AAA20874,39557,51533,AAAAAAAAAAA53908,AAAAAAAAAAAAAA96505,AAAAAAAA78938} - 64 | {26,19,34,24,81,78} | {A96617,AAAAAAAAAAAAAAAAAAA70104,A68938,AAAAAAAAAAA53908,AAAAAAAAAAAAAAA453,AA17009,AAAAAAA80240} - 65 | {61,5,76,59,17} | {AAAAAA99807,AAAAA64741,AAAAAAAAAAA53908,AA21643,AAAAAAAAA10012} - 66 | {31,23,70,52,4,33,48,25} | {AAAAAAAAAAAAAAAAA69675,AAAAAAAA50094,AAAAAAAAAAA92631,AAAA35194,39557,AAAAAAA99836} - 67 | {31,94,7,10} | {AAAAAA38063,A96617,AAAA35194,AAAAAAAAAAAA67946} - 68 | {90,43,38} | {AA75092,AAAAAAAAAAAAAAAAA69675,AAAAAAAAAAA92631,AAAAAAAAA10012,AAAAAAAAAAAAA7929,AA21643} - 69 | {67,35,99,85,72,86,44} | {AAAAAAAAAAAAAAAAAAA1205,AAAAAAAA50094,AAAAAAAAAAAAAAAA1729,AAAAAAAAAAAAAAAAAA47955} - 70 | {56,70,83} | {AAAA41702,AAAAAAAAAAA82945,AA21643,AAAAAAAAAAA99000,A27153,AA25381,AAAAAAAAAAAAAA96505,AAAAAAA1242} - 71 | {74,26} | {AAAAAAAAAAA50956,AA74433,AAAAAAA21462,AAAAAAAAAAAAAAAAAAA17075,AAAAAAAAAAAAAAA36627,AAAAAAAAAAAAA70254,AAAAAAAAAA43419,39557} - 72 | {22,1,16,78,20,91,83} | {47735,AAAAAAA56483,AAAAAAAAAAAAA93788,AA42406,AAAAAAAAAAAAA73084,AAAAAAAA72908,AAAAAAAAAAAAAAAAAA61286,AAAAA66674,AAAAAAAAAAAAAAAAA50407} - 73 | {88,25,96,78,65,15,29,19} | {AAA54451,AAAAAAAAA27249,AAAAAAA9228,AAAAAAAAAAAAAAA67062,AAAAAAAAAAAAAAAAAAA70415,AAAAA17383,AAAAAAAAAAAAAAAA33598} - 74 | {32} | {AAAAAAAAAAAAAAAA1729,AAAAAAAAAAAAA22860,AAAAAA99807,AAAAA17383,AAAAAAAAAAAAAAA67062,AAAAAAAAAAA15165,AAAAAAAAAAA50956} - 75 | {12,96,83,24,71,89,55} | {AAAA48949,AAAAAAAA29716,AAAAAAAAAAAAAAAAAAA1205,AAAAAAAAAAAA67946,AAAAAAAAAAAAAAAA29150,AAA28075,AAAAAAAAAAAAAAAAA43052} - 76 | {92,55,10,7} | {AAAAAAAAAAAAAAA67062} - 77 | {97,15,32,17,55,59,18,37,50,39} | {AAAAAAAAAAAA67946,AAAAAA54032,AAAAAAAA81587,55847,AAAAAAAAAAAAAA28620,AAAAAAAAAAAAAAAAA43052,AAAAAA75463,AAAA49534,AAAAAAAA44066} - 78 | {55,89,44,84,34} | {AAAAAAAAAAA6119,AAAAAAAAAAAAAA8666,AA99927,AA42406,AAAAAAA81898,AAAAAAA9228,AAAAAAAAAAA92631,AA21643,AAAAAAAAAAAAAA28620} - 79 | {45} | {AAAAAAAAAA646,AAAAAAAAAAAAAAAAAAA70415,AAAAAA43678,AAAAAAAA72908} - 80 | {74,89,44,80,0} | {AAAA35194,AAAAAAAA79710,AAA20874,AAAAAAAAAAAAAAAAAAA70104,AAAAAAAAAAAAA73084,AAAAAAA57334,AAAAAAA9228,AAAAAAAAAAAAA62007} - 81 | {63,77,54,48,61,53,97} | {AAAAAAAAAAAAAAA81326,AAAAAAAAAA22292,AA25381,AAAAAAAAAAA74076,AAAAAAA81898,AAAAAAAAA72121} - 82 | {34,60,4,79,78,16,86,89,42,50} | {AAAAA40681,AAAAAAAAAAAAAAAAAA12591,AAAAAAA80240,AAAAAAAAAAAAAAAA55798,AAAAAAAAAAAAAAAAAAA70104} - 83 | {14,10} | {AAAAAAAAAA22292,AAAAAAAAAAAAA70254,AAAAAAAAAAA6119} - 84 | {11,83,35,13,96,94} | {AAAAA95309,AAAAAAAAAAAAAAAAAA32918,AAAAAAAAAAAAAAAAAA24183} - 85 | {39,60} | {AAAAAAAAAAAAAAAA55798,AAAAAAAAAA22292,AAAAAAA66161,AAAAAAA21462,AAAAAAAAAAAAAAAAAA12591,55847,AAAAAA98232,AAAAAAAAAAA46154} - 86 | {33,81,72,74,45,36,82} | {AAAAAAAA81587,AAAAAAAAAAAAAA96505,45449,AAAA80176} - 87 | {57,27,50,12,97,68} | {AAAAAAAAAAAAAAAAA26540,AAAAAAAAA10012,AAAAAAAAAAAA35809,AAAAAAAAAAAAAAAA29150,AAAAAAAAAAA82945,AAAAAA66777,31228,AAAAAAAAAAAAAAAA23657,AAAAAAAAAAAAAA28620,AAAAAAAAAAAAAA96505} - 88 | {41,90,77,24,6,24} | {AAAA35194,AAAA35194,AAAAAAA80240,AAAAAAAAAAA46154,AAAAAA58494,AAAAAAAAAAAAAAAAAAA17075,AAAAAAAAAAAAAAAAAA59334,AAAAAAAAAAAAAAAAAAA91804,AA74433} - 89 | {40,32,17,6,30,88} | {AA44673,AAAAAAAAAAA6119,AAAAAAAAAAAAAAAA23657,AAAAAAAAAAAAAAAAAA47955,AAAAAAAAAAAAAAAA33598,AAAAAAAAAAA33576,AA44673} - 90 | {88,75} | {AAAAA60038,AAAAAAAA23648,AAAAAAAAAAA99000,AAAA41702,AAAAAAAAAAAAA22860,AAAAAAAAAAAAAAA68526} - 91 | {78} | {AAAAAAAAAAAAA62007,AAA99043} - 92 | {85,63,49,45} | {AAAAAAA89932,AAAAAAAAAAAAA22860,AAAAAAAAAAAAAAAAAAA1205,AAAAAAAAAAAA21089} - 93 | {11} | {AAAAAAAAAAA176,AAAAAAAAAAAAAA8666,AAAAAAAAAAAAAAA453,AAAAAAAAAAAAA85723,A68938,AAAAAAAAAAAAA9821,AAAAAAA48038,AAAAAAAAAAAAAAAAA59387,AA99927,AAAAA17383} - 94 | {98,9,85,62,88,91,60,61,38,86} | {AAAAAAAA81587,AAAAA17383,AAAAAAAA81587} - 95 | {47,77} | {AAAAAAAAAAAAAAAAA764,AAAAAAAAAAA74076,AAAAAAAAAA18107,AAAAA40681,AAAAAAAAAAAAAAA35875,AAAAA60038,AAAAAAA56483} - 96 | {23,97,43} | {AAAAAAAAAA646,A87088} - 97 | {54,2,86,65} | {47735,AAAAAAA99836,AAAAAAAAAAAAAAAAA6897,AAAAAAAAAAAAAAAA29150,AAAAAAA80240,AAAAAAAAAAAAAAAA98414,AAAAAAA56483,AAAAAAAAAAAAAAAA29150,AAAAAAA39692,AA21643} - 98 | {38,34,32,89} | {AAAAAAAAAAAAAAAAAA71621,AAAA8857,AAAAAAAAAAAAAAAAAAA65037,AAAAAAAAAAAAAAAA31334,AAAAAAAAAA48845} - 99 | {37,86} | {AAAAAAAAAAAAAAAAAA32918,AAAAA70514,AAAAAAAAA10012,AAAAAAAAAAAAAAAAA59387,AAAAAAAAAA64777,AAAAAAAAAAAAAAAAAAA15356} - 100 | {85,32,57,39,49,84,32,3,30} | {AAAAAAA80240,AAAAAAAAAAAAAAAA1729,AAAAA60038,AAAAAAAAAAA92631,AAAAAAAA9523} - 101 | {} | {} - 102 | {NULL} | {NULL} -(102 rows) - -SELECT * FROM array_op_test WHERE t && '{}' ORDER BY seqno; - seqno | i | t --------+---+--- -(0 rows) - -SELECT * FROM array_op_test WHERE t <@ '{}' ORDER BY seqno; - seqno | i | t --------+----+---- - 101 | {} | {} -(1 row) - --- array casts -SELECT ARRAY[1,2,3]::text[]::int[]::float8[] AS "{1,2,3}"; - {1,2,3} ---------- - {1,2,3} -(1 row) - -SELECT pg_typeof(ARRAY[1,2,3]::text[]::int[]::float8[]) AS "double precision[]"; - double precision[] --------------------- - double precision[] -(1 row) - -SELECT ARRAY[['a','bc'],['def','hijk']]::text[]::varchar[] AS "{{a,bc},{def,hijk}}"; - {{a,bc},{def,hijk}} ---------------------- - {{a,bc},{def,hijk}} -(1 row) - -SELECT pg_typeof(ARRAY[['a','bc'],['def','hijk']]::text[]::varchar[]) AS "character varying[]"; - character varying[] ---------------------- - character varying[] -(1 row) - -SELECT CAST(ARRAY[[[[[['a','bb','ccc']]]]]] as text[]) as "{{{{{{a,bb,ccc}}}}}}"; - {{{{{{a,bb,ccc}}}}}} ----------------------- - {{{{{{a,bb,ccc}}}}}} -(1 row) - -SELECT NULL::text[]::int[] AS "NULL"; - NULL ------- - -(1 row) - --- scalar op any/all (array) -select 33 = any ('{1,2,3}'); - ?column? ----------- - f -(1 row) - -select 33 = any ('{1,2,33}'); - ?column? ----------- - t -(1 row) - -select 33 = all ('{1,2,33}'); - ?column? ----------- - f -(1 row) - -select 33 >= all ('{1,2,33}'); - ?column? ----------- - t -(1 row) - --- boundary cases -select null::int >= all ('{1,2,33}'); - ?column? ----------- - -(1 row) - -select null::int >= all ('{}'); - ?column? ----------- - t -(1 row) - -select null::int >= any ('{}'); - ?column? ----------- - f -(1 row) - --- cross-datatype -select 33.4 = any (array[1,2,3]); - ?column? ----------- - f -(1 row) - -select 33.4 > all (array[1,2,3]); - ?column? ----------- - t -(1 row) - --- errors -select 33 * any ('{1,2,3}'); -ERROR: op ANY/ALL (array) requires operator to yield boolean -LINE 1: select 33 * any ('{1,2,3}'); - ^ -select 33 * any (44); -ERROR: op ANY/ALL (array) requires array on right side -LINE 1: select 33 * any (44); - ^ --- nulls -select 33 = any (null::int[]); - ?column? ----------- - -(1 row) - -select null::int = any ('{1,2,3}'); - ?column? ----------- - -(1 row) - -select 33 = any ('{1,null,3}'); - ?column? ----------- - -(1 row) - -select 33 = any ('{1,null,33}'); - ?column? ----------- - t -(1 row) - -select 33 = all (null::int[]); - ?column? ----------- - -(1 row) - -select null::int = all ('{1,2,3}'); - ?column? ----------- - -(1 row) - -select 33 = all ('{1,null,3}'); - ?column? ----------- - f -(1 row) - -select 33 = all ('{33,null,33}'); - ?column? ----------- - -(1 row) - --- nulls later in the bitmap -SELECT -1 != ALL(ARRAY(SELECT NULLIF(g.i, 900) FROM generate_series(1,1000) g(i))); - ?column? ----------- - -(1 row) - --- test indexes on arrays -create temp table arr_tbl (f1 int[] unique); -insert into arr_tbl values ('{1,2,3}'); -insert into arr_tbl values ('{1,2}'); --- failure expected: -insert into arr_tbl values ('{1,2,3}'); -ERROR: duplicate key value violates unique constraint "arr_tbl_f1_key" -DETAIL: Key (f1)=({1,2,3}) already exists. -insert into arr_tbl values ('{2,3,4}'); -insert into arr_tbl values ('{1,5,3}'); -insert into arr_tbl values ('{1,2,10}'); -set enable_seqscan to off; -set enable_bitmapscan to off; -select * from arr_tbl where f1 > '{1,2,3}' and f1 <= '{1,5,3}'; - f1 ----------- - {1,2,10} - {1,5,3} -(2 rows) - -select * from arr_tbl where f1 >= '{1,2,3}' and f1 < '{1,5,3}'; - f1 ----------- - {1,2,3} - {1,2,10} -(2 rows) - --- test ON CONFLICT DO UPDATE with arrays -create temp table arr_pk_tbl (pk int4 primary key, f1 int[]); -insert into arr_pk_tbl values (1, '{1,2,3}'); -insert into arr_pk_tbl values (1, '{3,4,5}') on conflict (pk) - do update set f1[1] = excluded.f1[1], f1[3] = excluded.f1[3] - returning pk, f1; - pk | f1 -----+--------- - 1 | {3,2,5} -(1 row) - -insert into arr_pk_tbl(pk, f1[1:2]) values (1, '{6,7,8}') on conflict (pk) - do update set f1[1] = excluded.f1[1], - f1[2] = excluded.f1[2], - f1[3] = excluded.f1[3] - returning pk, f1; - pk | f1 -----+------------ - 1 | {6,7,NULL} -(1 row) - --- note: if above selects don't produce the expected tuple order, --- then you didn't get an indexscan plan, and something is busted. -reset enable_seqscan; -reset enable_bitmapscan; --- test [not] (like|ilike) (any|all) (...) -select 'foo' like any (array['%a', '%o']); -- t - ?column? ----------- - t -(1 row) - -select 'foo' like any (array['%a', '%b']); -- f - ?column? ----------- - f -(1 row) - -select 'foo' like all (array['f%', '%o']); -- t - ?column? ----------- - t -(1 row) - -select 'foo' like all (array['f%', '%b']); -- f - ?column? ----------- - f -(1 row) - -select 'foo' not like any (array['%a', '%b']); -- t - ?column? ----------- - t -(1 row) - -select 'foo' not like all (array['%a', '%o']); -- f - ?column? ----------- - f -(1 row) - -select 'foo' ilike any (array['%A', '%O']); -- t - ?column? ----------- - t -(1 row) - -select 'foo' ilike all (array['F%', '%O']); -- t - ?column? ----------- - t -(1 row) - --- --- General array parser tests --- --- none of the following should be accepted -select '{{1,{2}},{2,3}}'::text[]; -ERROR: malformed array literal: "{{1,{2}},{2,3}}" -LINE 1: select '{{1,{2}},{2,3}}'::text[]; - ^ -DETAIL: Unexpected "{" character. -select '{{},{}}'::text[]; -ERROR: malformed array literal: "{{},{}}" -LINE 1: select '{{},{}}'::text[]; - ^ -DETAIL: Unexpected "}" character. -select E'{{1,2},\\{2,3}}'::text[]; -ERROR: malformed array literal: "{{1,2},\{2,3}}" -LINE 1: select E'{{1,2},\\{2,3}}'::text[]; - ^ -DETAIL: Unexpected "\" character. -select '{{"1 2" x},{3}}'::text[]; -ERROR: malformed array literal: "{{"1 2" x},{3}}" -LINE 1: select '{{"1 2" x},{3}}'::text[]; - ^ -DETAIL: Unexpected array element. -select '{}}'::text[]; -ERROR: malformed array literal: "{}}" -LINE 1: select '{}}'::text[]; - ^ -DETAIL: Junk after closing right brace. -select '{ }}'::text[]; -ERROR: malformed array literal: "{ }}" -LINE 1: select '{ }}'::text[]; - ^ -DETAIL: Junk after closing right brace. -select array[]; -ERROR: cannot determine type of empty array -LINE 1: select array[]; - ^ -HINT: Explicitly cast to the desired type, for example ARRAY[]::integer[]. --- none of the above should be accepted --- all of the following should be accepted -select '{}'::text[]; - text ------- - {} -(1 row) - -select '{{{1,2,3,4},{2,3,4,5}},{{3,4,5,6},{4,5,6,7}}}'::text[]; - text ------------------------------------------------ - {{{1,2,3,4},{2,3,4,5}},{{3,4,5,6},{4,5,6,7}}} -(1 row) - -select '{0 second ,0 second}'::interval[]; - interval ---------------- - {"@ 0","@ 0"} -(1 row) - -select '{ { "," } , { 3 } }'::text[]; - text -------------- - {{","},{3}} -(1 row) - -select ' { { " 0 second " , 0 second } }'::text[]; - text -------------------------------- - {{" 0 second ","0 second"}} -(1 row) - -select '{ - 0 second, - @ 1 hour @ 42 minutes @ 20 seconds - }'::interval[]; - interval ------------------------------------- - {"@ 0","@ 1 hour 42 mins 20 secs"} -(1 row) - -select array[]::text[]; - array -------- - {} -(1 row) - -select '[0:1]={1.1,2.2}'::float8[]; - float8 ------------------ - [0:1]={1.1,2.2} -(1 row) - --- all of the above should be accepted --- tests for array aggregates -CREATE TEMP TABLE arraggtest ( f1 INT[], f2 TEXT[][], f3 FLOAT[]); -INSERT INTO arraggtest (f1, f2, f3) VALUES -('{1,2,3,4}','{{grey,red},{blue,blue}}','{1.6, 0.0}'); -INSERT INTO arraggtest (f1, f2, f3) VALUES -('{1,2,3}','{{grey,red},{grey,blue}}','{1.6}'); -SELECT max(f1), min(f1), max(f2), min(f2), max(f3), min(f3) FROM arraggtest; - max | min | max | min | max | min ------------+---------+--------------------------+--------------------------+---------+------- - {1,2,3,4} | {1,2,3} | {{grey,red},{grey,blue}} | {{grey,red},{blue,blue}} | {1.6,0} | {1.6} -(1 row) - -INSERT INTO arraggtest (f1, f2, f3) VALUES -('{3,3,2,4,5,6}','{{white,yellow},{pink,orange}}','{2.1,3.3,1.8,1.7,1.6}'); -SELECT max(f1), min(f1), max(f2), min(f2), max(f3), min(f3) FROM arraggtest; - max | min | max | min | max | min ----------------+---------+--------------------------------+--------------------------+-----------------------+------- - {3,3,2,4,5,6} | {1,2,3} | {{white,yellow},{pink,orange}} | {{grey,red},{blue,blue}} | {2.1,3.3,1.8,1.7,1.6} | {1.6} -(1 row) - -INSERT INTO arraggtest (f1, f2, f3) VALUES -('{2}','{{black,red},{green,orange}}','{1.6,2.2,2.6,0.4}'); -SELECT max(f1), min(f1), max(f2), min(f2), max(f3), min(f3) FROM arraggtest; - max | min | max | min | max | min ----------------+---------+--------------------------------+------------------------------+-----------------------+------- - {3,3,2,4,5,6} | {1,2,3} | {{white,yellow},{pink,orange}} | {{black,red},{green,orange}} | {2.1,3.3,1.8,1.7,1.6} | {1.6} -(1 row) - -INSERT INTO arraggtest (f1, f2, f3) VALUES -('{4,2,6,7,8,1}','{{red},{black},{purple},{blue},{blue}}',NULL); -SELECT max(f1), min(f1), max(f2), min(f2), max(f3), min(f3) FROM arraggtest; - max | min | max | min | max | min ----------------+---------+--------------------------------+------------------------------+-----------------------+------- - {4,2,6,7,8,1} | {1,2,3} | {{white,yellow},{pink,orange}} | {{black,red},{green,orange}} | {2.1,3.3,1.8,1.7,1.6} | {1.6} -(1 row) - -INSERT INTO arraggtest (f1, f2, f3) VALUES -('{}','{{pink,white,blue,red,grey,orange}}','{2.1,1.87,1.4,2.2}'); -SELECT max(f1), min(f1), max(f2), min(f2), max(f3), min(f3) FROM arraggtest; - max | min | max | min | max | min ----------------+-----+--------------------------------+------------------------------+-----------------------+------- - {4,2,6,7,8,1} | {} | {{white,yellow},{pink,orange}} | {{black,red},{green,orange}} | {2.1,3.3,1.8,1.7,1.6} | {1.6} -(1 row) - --- A few simple tests for arrays of composite types -create type comptype as (f1 int, f2 text); -create table comptable (c1 comptype, c2 comptype[]); --- XXX would like to not have to specify row() construct types here ... -insert into comptable - values (row(1,'foo'), array[row(2,'bar')::comptype, row(3,'baz')::comptype]); --- check that implicitly named array type _comptype isn't a problem -create type _comptype as enum('fooey'); -select * from comptable; - c1 | c2 ----------+----------------------- - (1,foo) | {"(2,bar)","(3,baz)"} -(1 row) - -select c2[2].f2 from comptable; - f2 ------ - baz -(1 row) - -drop type _comptype; -drop table comptable; -drop type comptype; -create or replace function unnest1(anyarray) -returns setof anyelement as $$ -select $1[s] from generate_subscripts($1,1) g(s); -$$ language sql immutable; -create or replace function unnest2(anyarray) -returns setof anyelement as $$ -select $1[s1][s2] from generate_subscripts($1,1) g1(s1), - generate_subscripts($1,2) g2(s2); -$$ language sql immutable; -select * from unnest1(array[1,2,3]); - unnest1 ---------- - 1 - 2 - 3 -(3 rows) - -select * from unnest2(array[[1,2,3],[4,5,6]]); - unnest2 ---------- - 1 - 2 - 3 - 4 - 5 - 6 -(6 rows) - -drop function unnest1(anyarray); -drop function unnest2(anyarray); -select array_fill(null::integer, array[3,3],array[2,2]); - array_fill ------------------------------------------------------------------ - [2:4][2:4]={{NULL,NULL,NULL},{NULL,NULL,NULL},{NULL,NULL,NULL}} -(1 row) - -select array_fill(null::integer, array[3,3]); - array_fill ------------------------------------------------------- - {{NULL,NULL,NULL},{NULL,NULL,NULL},{NULL,NULL,NULL}} -(1 row) - -select array_fill(null::text, array[3,3],array[2,2]); - array_fill ------------------------------------------------------------------ - [2:4][2:4]={{NULL,NULL,NULL},{NULL,NULL,NULL},{NULL,NULL,NULL}} -(1 row) - -select array_fill(null::text, array[3,3]); - array_fill ------------------------------------------------------- - {{NULL,NULL,NULL},{NULL,NULL,NULL},{NULL,NULL,NULL}} -(1 row) - -select array_fill(7, array[3,3],array[2,2]); - array_fill --------------------------------------- - [2:4][2:4]={{7,7,7},{7,7,7},{7,7,7}} -(1 row) - -select array_fill(7, array[3,3]); - array_fill ---------------------------- - {{7,7,7},{7,7,7},{7,7,7}} -(1 row) - -select array_fill('juhu'::text, array[3,3],array[2,2]); - array_fill ------------------------------------------------------------------ - [2:4][2:4]={{juhu,juhu,juhu},{juhu,juhu,juhu},{juhu,juhu,juhu}} -(1 row) - -select array_fill('juhu'::text, array[3,3]); - array_fill ------------------------------------------------------- - {{juhu,juhu,juhu},{juhu,juhu,juhu},{juhu,juhu,juhu}} -(1 row) - -select a, a = '{}' as is_eq, array_dims(a) - from (select array_fill(42, array[0]) as a) ss; - a | is_eq | array_dims -----+-------+------------ - {} | t | -(1 row) - -select a, a = '{}' as is_eq, array_dims(a) - from (select array_fill(42, '{}') as a) ss; - a | is_eq | array_dims -----+-------+------------ - {} | t | -(1 row) - -select a, a = '{}' as is_eq, array_dims(a) - from (select array_fill(42, '{}', '{}') as a) ss; - a | is_eq | array_dims -----+-------+------------ - {} | t | -(1 row) - --- raise exception -select array_fill(1, null, array[2,2]); -ERROR: dimension array or low bound array cannot be null -select array_fill(1, array[2,2], null); -ERROR: dimension array or low bound array cannot be null -select array_fill(1, array[2,2], '{}'); -ERROR: wrong number of array subscripts -DETAIL: Low bound array has different size than dimensions array. -select array_fill(1, array[3,3], array[1,1,1]); -ERROR: wrong number of array subscripts -DETAIL: Low bound array has different size than dimensions array. -select array_fill(1, array[1,2,null]); -ERROR: dimension values cannot be null -select array_fill(1, array[[1,2],[3,4]]); -ERROR: wrong number of array subscripts -DETAIL: Dimension array must be one dimensional. -select string_to_array('1|2|3', '|'); - string_to_array ------------------ - {1,2,3} -(1 row) - -select string_to_array('1|2|3|', '|'); - string_to_array ------------------ - {1,2,3,""} -(1 row) - -select string_to_array('1||2|3||', '||'); - string_to_array ------------------ - {1,2|3,""} -(1 row) - -select string_to_array('1|2|3', ''); - string_to_array ------------------ - {1|2|3} -(1 row) - -select string_to_array('', '|'); - string_to_array ------------------ - {} -(1 row) - -select string_to_array('1|2|3', NULL); - string_to_array ------------------ - {1,|,2,|,3} -(1 row) - -select string_to_array(NULL, '|') IS NULL; - ?column? ----------- - t -(1 row) - -select string_to_array('abc', ''); - string_to_array ------------------ - {abc} -(1 row) - -select string_to_array('abc', '', 'abc'); - string_to_array ------------------ - {NULL} -(1 row) - -select string_to_array('abc', ','); - string_to_array ------------------ - {abc} -(1 row) - -select string_to_array('abc', ',', 'abc'); - string_to_array ------------------ - {NULL} -(1 row) - -select string_to_array('1,2,3,4,,6', ','); - string_to_array ------------------ - {1,2,3,4,"",6} -(1 row) - -select string_to_array('1,2,3,4,,6', ',', ''); - string_to_array ------------------- - {1,2,3,4,NULL,6} -(1 row) - -select string_to_array('1,2,3,4,*,6', ',', '*'); - string_to_array ------------------- - {1,2,3,4,NULL,6} -(1 row) - -select v, v is null as "is null" from string_to_table('1|2|3', '|') g(v); - v | is null ----+--------- - 1 | f - 2 | f - 3 | f -(3 rows) - -select v, v is null as "is null" from string_to_table('1|2|3|', '|') g(v); - v | is null ----+--------- - 1 | f - 2 | f - 3 | f - | f -(4 rows) - -select v, v is null as "is null" from string_to_table('1||2|3||', '||') g(v); - v | is null ------+--------- - 1 | f - 2|3 | f - | f -(3 rows) - -select v, v is null as "is null" from string_to_table('1|2|3', '') g(v); - v | is null --------+--------- - 1|2|3 | f -(1 row) - -select v, v is null as "is null" from string_to_table('', '|') g(v); - v | is null ----+--------- -(0 rows) - -select v, v is null as "is null" from string_to_table('1|2|3', NULL) g(v); - v | is null ----+--------- - 1 | f - | | f - 2 | f - | | f - 3 | f -(5 rows) - -select v, v is null as "is null" from string_to_table(NULL, '|') g(v); - v | is null ----+--------- -(0 rows) - -select v, v is null as "is null" from string_to_table('abc', '') g(v); - v | is null ------+--------- - abc | f -(1 row) - -select v, v is null as "is null" from string_to_table('abc', '', 'abc') g(v); - v | is null ----+--------- - | t -(1 row) - -select v, v is null as "is null" from string_to_table('abc', ',') g(v); - v | is null ------+--------- - abc | f -(1 row) - -select v, v is null as "is null" from string_to_table('abc', ',', 'abc') g(v); - v | is null ----+--------- - | t -(1 row) - -select v, v is null as "is null" from string_to_table('1,2,3,4,,6', ',') g(v); - v | is null ----+--------- - 1 | f - 2 | f - 3 | f - 4 | f - | f - 6 | f -(6 rows) - -select v, v is null as "is null" from string_to_table('1,2,3,4,,6', ',', '') g(v); - v | is null ----+--------- - 1 | f - 2 | f - 3 | f - 4 | f - | t - 6 | f -(6 rows) - -select v, v is null as "is null" from string_to_table('1,2,3,4,*,6', ',', '*') g(v); - v | is null ----+--------- - 1 | f - 2 | f - 3 | f - 4 | f - | t - 6 | f -(6 rows) - -select array_to_string(NULL::int4[], ',') IS NULL; - ?column? ----------- - t -(1 row) - -select array_to_string('{}'::int4[], ','); - array_to_string ------------------ - -(1 row) - -select array_to_string(array[1,2,3,4,NULL,6], ','); - array_to_string ------------------ - 1,2,3,4,6 -(1 row) - -select array_to_string(array[1,2,3,4,NULL,6], ',', '*'); - array_to_string ------------------ - 1,2,3,4,*,6 -(1 row) - -select array_to_string(array[1,2,3,4,NULL,6], NULL); - array_to_string ------------------ - -(1 row) - -select array_to_string(array[1,2,3,4,NULL,6], ',', NULL); - array_to_string ------------------ - 1,2,3,4,6 -(1 row) - -select array_to_string(string_to_array('1|2|3', '|'), '|'); - array_to_string ------------------ - 1|2|3 -(1 row) - -select array_length(array[1,2,3], 1); - array_length --------------- - 3 -(1 row) - -select array_length(array[[1,2,3], [4,5,6]], 0); - array_length --------------- - -(1 row) - -select array_length(array[[1,2,3], [4,5,6]], 1); - array_length --------------- - 2 -(1 row) - -select array_length(array[[1,2,3], [4,5,6]], 2); - array_length --------------- - 3 -(1 row) - -select array_length(array[[1,2,3], [4,5,6]], 3); - array_length --------------- - -(1 row) - -select cardinality(NULL::int[]); - cardinality -------------- - -(1 row) - -select cardinality('{}'::int[]); - cardinality -------------- - 0 -(1 row) - -select cardinality(array[1,2,3]); - cardinality -------------- - 3 -(1 row) - -select cardinality('[2:4]={5,6,7}'::int[]); - cardinality -------------- - 3 -(1 row) - -select cardinality('{{1,2}}'::int[]); - cardinality -------------- - 2 -(1 row) - -select cardinality('{{1,2},{3,4},{5,6}}'::int[]); - cardinality -------------- - 6 -(1 row) - -select cardinality('{{{1,9},{5,6}},{{2,3},{3,4}}}'::int[]); - cardinality -------------- - 8 -(1 row) - --- array_agg(anynonarray) -select array_agg(unique1) from (select unique1 from tenk1 where unique1 < 15 order by unique1) ss; - array_agg --------------------------------------- - {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14} -(1 row) - -select array_agg(ten) from (select ten from tenk1 where unique1 < 15 order by unique1) ss; - array_agg ---------------------------------- - {0,1,2,3,4,5,6,7,8,9,0,1,2,3,4} -(1 row) - -select array_agg(nullif(ten, 4)) from (select ten from tenk1 where unique1 < 15 order by unique1) ss; - array_agg ---------------------------------------- - {0,1,2,3,NULL,5,6,7,8,9,0,1,2,3,NULL} -(1 row) - -select array_agg(unique1) from tenk1 where unique1 < -15; - array_agg ------------ - -(1 row) - --- array_agg(anyarray) -select array_agg(ar) - from (values ('{1,2}'::int[]), ('{3,4}'::int[])) v(ar); - array_agg ---------------- - {{1,2},{3,4}} -(1 row) - -select array_agg(distinct ar order by ar desc) - from (select array[i / 2] from generate_series(1,10) a(i)) b(ar); - array_agg ---------------------------- - {{5},{4},{3},{2},{1},{0}} -(1 row) - -select array_agg(ar) - from (select array_agg(array[i, i+1, i-1]) - from generate_series(1,2) a(i)) b(ar); - array_agg ---------------------- - {{{1,2,0},{2,3,1}}} -(1 row) - -select array_agg(array[i+1.2, i+1.3, i+1.4]) from generate_series(1,3) g(i); - array_agg ---------------------------------------------- - {{2.2,2.3,2.4},{3.2,3.3,3.4},{4.2,4.3,4.4}} -(1 row) - -select array_agg(array['Hello', i::text]) from generate_series(9,11) g(i); - array_agg ------------------------------------ - {{Hello,9},{Hello,10},{Hello,11}} -(1 row) - -select array_agg(array[i, nullif(i, 3), i+1]) from generate_series(1,4) g(i); - array_agg --------------------------------------- - {{1,1,2},{2,2,3},{3,NULL,4},{4,4,5}} -(1 row) - --- errors -select array_agg('{}'::int[]) from generate_series(1,2); -ERROR: cannot accumulate empty arrays -select array_agg(null::int[]) from generate_series(1,2); -ERROR: cannot accumulate null arrays -select array_agg(ar) - from (values ('{1,2}'::int[]), ('{3}'::int[])) v(ar); -ERROR: cannot accumulate arrays of different dimensionality -select unnest(array[1,2,3]); - unnest --------- - 1 - 2 - 3 -(3 rows) - -select * from unnest(array[1,2,3]); - unnest --------- - 1 - 2 - 3 -(3 rows) - -select unnest(array[1,2,3,4.5]::float8[]); - unnest --------- - 1 - 2 - 3 - 4.5 -(4 rows) - -select unnest(array[1,2,3,4.5]::numeric[]); - unnest --------- - 1 - 2 - 3 - 4.5 -(4 rows) - -select unnest(array[1,2,3,null,4,null,null,5,6]); - unnest --------- - 1 - 2 - 3 - - 4 - - - 5 - 6 -(9 rows) - -select unnest(array[1,2,3,null,4,null,null,5,6]::text[]); - unnest --------- - 1 - 2 - 3 - - 4 - - - 5 - 6 -(9 rows) - -select abs(unnest(array[1,2,null,-3])); - abs ------ - 1 - 2 - - 3 -(4 rows) - -select array_remove(array[1,2,2,3], 2); - array_remove --------------- - {1,3} -(1 row) - -select array_remove(array[1,2,2,3], 5); - array_remove --------------- - {1,2,2,3} -(1 row) - -select array_remove(array[1,NULL,NULL,3], NULL); - array_remove --------------- - {1,3} -(1 row) - -select array_remove(array['A','CC','D','C','RR'], 'RR'); - array_remove --------------- - {A,CC,D,C} -(1 row) - -select array_remove(array[1.0, 2.1, 3.3], 1); - array_remove --------------- - {2.1,3.3} -(1 row) - -select array_remove('{{1,2,2},{1,4,3}}', 2); -- not allowed -ERROR: removing elements from multidimensional arrays is not supported -select array_remove(array['X','X','X'], 'X') = '{}'; - ?column? ----------- - t -(1 row) - -select array_replace(array[1,2,5,4],5,3); - array_replace ---------------- - {1,2,3,4} -(1 row) - -select array_replace(array[1,2,5,4],5,NULL); - array_replace ---------------- - {1,2,NULL,4} -(1 row) - -select array_replace(array[1,2,NULL,4,NULL],NULL,5); - array_replace ---------------- - {1,2,5,4,5} -(1 row) - -select array_replace(array['A','B','DD','B'],'B','CC'); - array_replace ---------------- - {A,CC,DD,CC} -(1 row) - -select array_replace(array[1,NULL,3],NULL,NULL); - array_replace ---------------- - {1,NULL,3} -(1 row) - -select array_replace(array['AB',NULL,'CDE'],NULL,'12'); - array_replace ---------------- - {AB,12,CDE} -(1 row) - --- array(select array-value ...) -select array(select array[i,i/2] from generate_series(1,5) i); - array ---------------------------------- - {{1,0},{2,1},{3,1},{4,2},{5,2}} -(1 row) - -select array(select array['Hello', i::text] from generate_series(9,11) i); - array ------------------------------------ - {{Hello,9},{Hello,10},{Hello,11}} -(1 row) - --- Insert/update on a column that is array of composite -create temp table t1 (f1 int8_tbl[]); -insert into t1 (f1[5].q1) values(42); -select * from t1; - f1 ------------------ - [5:5]={"(42,)"} -(1 row) - -update t1 set f1[5].q2 = 43; -select * from t1; - f1 -------------------- - [5:5]={"(42,43)"} -(1 row) - --- Check that arrays of composites are safely detoasted when needed -create temp table src (f1 text); -insert into src - select string_agg(random()::text,'') from generate_series(1,10000); -create type textandtext as (c1 text, c2 text); -create temp table dest (f1 textandtext[]); -insert into dest select array[row(f1,f1)::textandtext] from src; -select length(md5((f1[1]).c2)) from dest; - length --------- - 32 -(1 row) - -delete from src; -select length(md5((f1[1]).c2)) from dest; - length --------- - 32 -(1 row) - -truncate table src; -drop table src; -select length(md5((f1[1]).c2)) from dest; - length --------- - 32 -(1 row) - -drop table dest; -drop type textandtext; --- Tests for polymorphic-array form of width_bucket() --- this exercises the varwidth and float8 code paths -SELECT - op, - width_bucket(op::numeric, ARRAY[1, 3, 5, 10.0]::numeric[]) AS wb_n1, - width_bucket(op::numeric, ARRAY[0, 5.5, 9.99]::numeric[]) AS wb_n2, - width_bucket(op::numeric, ARRAY[-6, -5, 2.0]::numeric[]) AS wb_n3, - width_bucket(op::float8, ARRAY[1, 3, 5, 10.0]::float8[]) AS wb_f1, - width_bucket(op::float8, ARRAY[0, 5.5, 9.99]::float8[]) AS wb_f2, - width_bucket(op::float8, ARRAY[-6, -5, 2.0]::float8[]) AS wb_f3 -FROM (VALUES - (-5.2), - (-0.0000000001), - (0.000000000001), - (1), - (1.99999999999999), - (2), - (2.00000000000001), - (3), - (4), - (4.5), - (5), - (5.5), - (6), - (7), - (8), - (9), - (9.99999999999999), - (10), - (10.0000000000001) -) v(op); - op | wb_n1 | wb_n2 | wb_n3 | wb_f1 | wb_f2 | wb_f3 -------------------+-------+-------+-------+-------+-------+------- - -5.2 | 0 | 0 | 1 | 0 | 0 | 1 - -0.0000000001 | 0 | 0 | 2 | 0 | 0 | 2 - 0.000000000001 | 0 | 1 | 2 | 0 | 1 | 2 - 1 | 1 | 1 | 2 | 1 | 1 | 2 - 1.99999999999999 | 1 | 1 | 2 | 1 | 1 | 2 - 2 | 1 | 1 | 3 | 1 | 1 | 3 - 2.00000000000001 | 1 | 1 | 3 | 1 | 1 | 3 - 3 | 2 | 1 | 3 | 2 | 1 | 3 - 4 | 2 | 1 | 3 | 2 | 1 | 3 - 4.5 | 2 | 1 | 3 | 2 | 1 | 3 - 5 | 3 | 1 | 3 | 3 | 1 | 3 - 5.5 | 3 | 2 | 3 | 3 | 2 | 3 - 6 | 3 | 2 | 3 | 3 | 2 | 3 - 7 | 3 | 2 | 3 | 3 | 2 | 3 - 8 | 3 | 2 | 3 | 3 | 2 | 3 - 9 | 3 | 2 | 3 | 3 | 2 | 3 - 9.99999999999999 | 3 | 3 | 3 | 3 | 3 | 3 - 10 | 4 | 3 | 3 | 4 | 3 | 3 - 10.0000000000001 | 4 | 3 | 3 | 4 | 3 | 3 -(19 rows) - --- ensure float8 path handles NaN properly -SELECT - op, - width_bucket(op, ARRAY[1, 3, 9, 'NaN', 'NaN']::float8[]) AS wb -FROM (VALUES - (-5.2::float8), - (4::float8), - (77::float8), - ('NaN'::float8) -) v(op); - op | wb -------+---- - -5.2 | 0 - 4 | 2 - 77 | 3 - NaN | 5 -(4 rows) - --- these exercise the generic fixed-width code path -SELECT - op, - width_bucket(op, ARRAY[1, 3, 5, 10]) AS wb_1 -FROM generate_series(0,11) as op; - op | wb_1 -----+------ - 0 | 0 - 1 | 1 - 2 | 1 - 3 | 2 - 4 | 2 - 5 | 3 - 6 | 3 - 7 | 3 - 8 | 3 - 9 | 3 - 10 | 4 - 11 | 4 -(12 rows) - -SELECT width_bucket(now(), - array['yesterday', 'today', 'tomorrow']::timestamptz[]); - width_bucket --------------- - 2 -(1 row) - --- corner cases -SELECT width_bucket(5, ARRAY[3]); - width_bucket --------------- - 1 -(1 row) - -SELECT width_bucket(5, '{}'); - width_bucket --------------- - 0 -(1 row) - --- error cases -SELECT width_bucket('5'::text, ARRAY[3, 4]::integer[]); -ERROR: function width_bucket(text, integer[]) does not exist -LINE 1: SELECT width_bucket('5'::text, ARRAY[3, 4]::integer[]); - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. -SELECT width_bucket(5, ARRAY[3, 4, NULL]); -ERROR: thresholds array must not contain NULLs -SELECT width_bucket(5, ARRAY[ARRAY[1, 2], ARRAY[3, 4]]); -ERROR: thresholds must be one-dimensional array --- trim_array -SELECT arr, trim_array(arr, 2) -FROM -(VALUES ('{1,2,3,4,5,6}'::bigint[]), - ('{1,2}'), - ('[10:16]={1,2,3,4,5,6,7}'), - ('[-15:-10]={1,2,3,4,5,6}'), - ('{{1,10},{2,20},{3,30},{4,40}}')) v(arr); - arr | trim_array --------------------------------+----------------- - {1,2,3,4,5,6} | {1,2,3,4} - {1,2} | {} - [10:16]={1,2,3,4,5,6,7} | {1,2,3,4,5} - [-15:-10]={1,2,3,4,5,6} | {1,2,3,4} - {{1,10},{2,20},{3,30},{4,40}} | {{1,10},{2,20}} -(5 rows) - -SELECT trim_array(ARRAY[1, 2, 3], -1); -- fail -ERROR: number of elements to trim must be between 0 and 3 -SELECT trim_array(ARRAY[1, 2, 3], 10); -- fail -ERROR: number of elements to trim must be between 0 and 3 +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/btree_index.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/btree_index.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/btree_index.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/btree_index.out 2023-02-20 19:45:46.629211056 -0500 @@ -1,343 +1 @@ --- --- BTREE_INDEX --- test retrieval of min/max keys for each index --- -SELECT b.* - FROM bt_i4_heap b - WHERE b.seqno < 1; - seqno | random --------+------------ - 0 | 1935401906 -(1 row) - -SELECT b.* - FROM bt_i4_heap b - WHERE b.seqno >= 9999; - seqno | random --------+------------ - 9999 | 1227676208 -(1 row) - -SELECT b.* - FROM bt_i4_heap b - WHERE b.seqno = 4500; - seqno | random --------+------------ - 4500 | 2080851358 -(1 row) - -SELECT b.* - FROM bt_name_heap b - WHERE b.seqno < '1'::name; - seqno | random --------+------------ - 0 | 1935401906 -(1 row) - -SELECT b.* - FROM bt_name_heap b - WHERE b.seqno >= '9999'::name; - seqno | random --------+------------ - 9999 | 1227676208 -(1 row) - -SELECT b.* - FROM bt_name_heap b - WHERE b.seqno = '4500'::name; - seqno | random --------+------------ - 4500 | 2080851358 -(1 row) - -SELECT b.* - FROM bt_txt_heap b - WHERE b.seqno < '1'::text; - seqno | random --------+------------ - 0 | 1935401906 -(1 row) - -SELECT b.* - FROM bt_txt_heap b - WHERE b.seqno >= '9999'::text; - seqno | random --------+------------ - 9999 | 1227676208 -(1 row) - -SELECT b.* - FROM bt_txt_heap b - WHERE b.seqno = '4500'::text; - seqno | random --------+------------ - 4500 | 2080851358 -(1 row) - -SELECT b.* - FROM bt_f8_heap b - WHERE b.seqno < '1'::float8; - seqno | random --------+------------ - 0 | 1935401906 -(1 row) - -SELECT b.* - FROM bt_f8_heap b - WHERE b.seqno >= '9999'::float8; - seqno | random --------+------------ - 9999 | 1227676208 -(1 row) - -SELECT b.* - FROM bt_f8_heap b - WHERE b.seqno = '4500'::float8; - seqno | random --------+------------ - 4500 | 2080851358 -(1 row) - --- --- Check correct optimization of LIKE (special index operator support) --- for both indexscan and bitmapscan cases --- -set enable_seqscan to false; -set enable_indexscan to true; -set enable_bitmapscan to false; -explain (costs off) -select proname from pg_proc where proname like E'RI\\_FKey%del' order by 1; - QUERY PLAN ------------------------------------------------------------------------------- - Index Only Scan using pg_proc_proname_args_nsp_index on pg_proc - Index Cond: ((proname >= 'RI_FKey'::text) AND (proname < 'RI_FKez'::text)) - Filter: (proname ~~ 'RI\_FKey%del'::text) -(3 rows) - -select proname from pg_proc where proname like E'RI\\_FKey%del' order by 1; - proname ------------------------- - RI_FKey_cascade_del - RI_FKey_noaction_del - RI_FKey_restrict_del - RI_FKey_setdefault_del - RI_FKey_setnull_del -(5 rows) - -explain (costs off) -select proname from pg_proc where proname ilike '00%foo' order by 1; - QUERY PLAN --------------------------------------------------------------------- - Index Only Scan using pg_proc_proname_args_nsp_index on pg_proc - Index Cond: ((proname >= '00'::text) AND (proname < '01'::text)) - Filter: (proname ~~* '00%foo'::text) -(3 rows) - -select proname from pg_proc where proname ilike '00%foo' order by 1; - proname ---------- -(0 rows) - -explain (costs off) -select proname from pg_proc where proname ilike 'ri%foo' order by 1; - QUERY PLAN ------------------------------------------------------------------ - Index Only Scan using pg_proc_proname_args_nsp_index on pg_proc - Filter: (proname ~~* 'ri%foo'::text) -(2 rows) - -set enable_indexscan to false; -set enable_bitmapscan to true; -explain (costs off) -select proname from pg_proc where proname like E'RI\\_FKey%del' order by 1; - QUERY PLAN ------------------------------------------------------------------------------------------- - Sort - Sort Key: proname - -> Bitmap Heap Scan on pg_proc - Filter: (proname ~~ 'RI\_FKey%del'::text) - -> Bitmap Index Scan on pg_proc_proname_args_nsp_index - Index Cond: ((proname >= 'RI_FKey'::text) AND (proname < 'RI_FKez'::text)) -(6 rows) - -select proname from pg_proc where proname like E'RI\\_FKey%del' order by 1; - proname ------------------------- - RI_FKey_cascade_del - RI_FKey_noaction_del - RI_FKey_restrict_del - RI_FKey_setdefault_del - RI_FKey_setnull_del -(5 rows) - -explain (costs off) -select proname from pg_proc where proname ilike '00%foo' order by 1; - QUERY PLAN --------------------------------------------------------------------------------- - Sort - Sort Key: proname - -> Bitmap Heap Scan on pg_proc - Filter: (proname ~~* '00%foo'::text) - -> Bitmap Index Scan on pg_proc_proname_args_nsp_index - Index Cond: ((proname >= '00'::text) AND (proname < '01'::text)) -(6 rows) - -select proname from pg_proc where proname ilike '00%foo' order by 1; - proname ---------- -(0 rows) - -explain (costs off) -select proname from pg_proc where proname ilike 'ri%foo' order by 1; - QUERY PLAN ------------------------------------------------------------------ - Index Only Scan using pg_proc_proname_args_nsp_index on pg_proc - Filter: (proname ~~* 'ri%foo'::text) -(2 rows) - -reset enable_seqscan; -reset enable_indexscan; -reset enable_bitmapscan; --- Also check LIKE optimization with binary-compatible cases -create temp table btree_bpchar (f1 text collate "C"); -create index on btree_bpchar(f1 bpchar_ops) WITH (deduplicate_items=on); -insert into btree_bpchar values ('foo'), ('fool'), ('bar'), ('quux'); --- doesn't match index: -explain (costs off) -select * from btree_bpchar where f1 like 'foo'; - QUERY PLAN -------------------------------- - Seq Scan on btree_bpchar - Filter: (f1 ~~ 'foo'::text) -(2 rows) - -select * from btree_bpchar where f1 like 'foo'; - f1 ------ - foo -(1 row) - -explain (costs off) -select * from btree_bpchar where f1 like 'foo%'; - QUERY PLAN --------------------------------- - Seq Scan on btree_bpchar - Filter: (f1 ~~ 'foo%'::text) -(2 rows) - -select * from btree_bpchar where f1 like 'foo%'; - f1 ------- - foo - fool -(2 rows) - --- these do match the index: -explain (costs off) -select * from btree_bpchar where f1::bpchar like 'foo'; - QUERY PLAN ----------------------------------------------------- - Bitmap Heap Scan on btree_bpchar - Filter: ((f1)::bpchar ~~ 'foo'::text) - -> Bitmap Index Scan on btree_bpchar_f1_idx - Index Cond: ((f1)::bpchar = 'foo'::bpchar) -(4 rows) - -select * from btree_bpchar where f1::bpchar like 'foo'; - f1 ------ - foo -(1 row) - -explain (costs off) -select * from btree_bpchar where f1::bpchar like 'foo%'; - QUERY PLAN ------------------------------------------------------------------------------------------- - Bitmap Heap Scan on btree_bpchar - Filter: ((f1)::bpchar ~~ 'foo%'::text) - -> Bitmap Index Scan on btree_bpchar_f1_idx - Index Cond: (((f1)::bpchar >= 'foo'::bpchar) AND ((f1)::bpchar < 'fop'::bpchar)) -(4 rows) - -select * from btree_bpchar where f1::bpchar like 'foo%'; - f1 ------- - foo - fool -(2 rows) - --- get test coverage for "single value" deduplication strategy: -insert into btree_bpchar select 'foo' from generate_series(1,1500); --- --- Perform unique checking, with and without the use of deduplication --- -CREATE TABLE dedup_unique_test_table (a int) WITH (autovacuum_enabled=false); -CREATE UNIQUE INDEX dedup_unique ON dedup_unique_test_table (a) WITH (deduplicate_items=on); -CREATE UNIQUE INDEX plain_unique ON dedup_unique_test_table (a) WITH (deduplicate_items=off); --- Generate enough garbage tuples in index to ensure that even the unique index --- with deduplication enabled has to check multiple leaf pages during unique --- checking (at least with a BLCKSZ of 8192 or less) -DO $$ -BEGIN - FOR r IN 1..1350 LOOP - DELETE FROM dedup_unique_test_table; - INSERT INTO dedup_unique_test_table SELECT 1; - END LOOP; -END$$; --- Exercise the LP_DEAD-bit-set tuple deletion code with a posting list tuple. --- The implementation prefers deleting existing items to merging any duplicate --- tuples into a posting list, so we need an explicit test to make sure we get --- coverage (note that this test also assumes BLCKSZ is 8192 or less): -DROP INDEX plain_unique; -DELETE FROM dedup_unique_test_table WHERE a = 1; -INSERT INTO dedup_unique_test_table SELECT i FROM generate_series(0,450) i; --- --- Test B-tree fast path (cache rightmost leaf page) optimization. --- --- First create a tree that's at least three levels deep (i.e. has one level --- between the root and leaf levels). The text inserted is long. It won't be --- TOAST compressed because we use plain storage in the table. Only a few --- index tuples fit on each internal page, allowing us to get a tall tree with --- few pages. (A tall tree is required to trigger caching.) --- --- The text column must be the leading column in the index, since suffix --- truncation would otherwise truncate tuples on internal pages, leaving us --- with a short tree. -create table btree_tall_tbl(id int4, t text); -alter table btree_tall_tbl alter COLUMN t set storage plain; -create index btree_tall_idx on btree_tall_tbl (t, id) with (fillfactor = 10); -insert into btree_tall_tbl select g, repeat('x', 250) -from generate_series(1, 130) g; --- --- Test for multilevel page deletion --- -CREATE TABLE delete_test_table (a bigint, b bigint, c bigint, d bigint); -INSERT INTO delete_test_table SELECT i, 1, 2, 3 FROM generate_series(1,80000) i; -ALTER TABLE delete_test_table ADD PRIMARY KEY (a,b,c,d); --- Delete most entries, and vacuum, deleting internal pages and creating "fast --- root" -DELETE FROM delete_test_table WHERE a < 79990; -VACUUM delete_test_table; --- --- Test B-tree insertion with a metapage update (XLOG_BTREE_INSERT_META --- WAL record type). This happens when a "fast root" page is split. This --- also creates coverage for nbtree FSM page recycling. --- --- The vacuum above should've turned the leaf page into a fast root. We just --- need to insert some rows to cause the fast root page to split. -INSERT INTO delete_test_table SELECT i, 1, 2, 3 FROM generate_series(1,1000) i; --- Test unsupported btree opclass parameters -create index on btree_tall_tbl (id int4_ops(foo=1)); -ERROR: operator class int4_ops has no options --- Test case of ALTER INDEX with abuse of column names for indexes. --- This grammar is not officially supported, but the parser allows it. -CREATE INDEX btree_tall_idx2 ON btree_tall_tbl (id); -ALTER INDEX btree_tall_idx2 ALTER COLUMN id SET (n_distinct=100); -ERROR: "btree_tall_idx2" is not a table, materialized view, or foreign table -DROP INDEX btree_tall_idx2; --- Partitioned index -CREATE TABLE btree_part (id int4) PARTITION BY RANGE (id); -CREATE INDEX btree_part_idx ON btree_part(id); -ALTER INDEX btree_part_idx ALTER COLUMN id SET (n_distinct=100); -ERROR: "btree_part_idx" is not a table, materialized view, or foreign table -DROP TABLE btree_part; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/hash_index.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/hash_index.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/hash_index.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/hash_index.out 2023-02-20 19:45:46.929211068 -0500 @@ -1,243 +1 @@ --- --- HASH_INDEX --- grep 843938989 hash.data --- -SELECT * FROM hash_i4_heap - WHERE hash_i4_heap.random = 843938989; - seqno | random --------+----------- - 15 | 843938989 -(1 row) - --- --- hash index --- grep 66766766 hash.data --- -SELECT * FROM hash_i4_heap - WHERE hash_i4_heap.random = 66766766; - seqno | random --------+-------- -(0 rows) - --- --- hash index --- grep 1505703298 hash.data --- -SELECT * FROM hash_name_heap - WHERE hash_name_heap.random = '1505703298'::name; - seqno | random --------+------------ - 9838 | 1505703298 -(1 row) - --- --- hash index --- grep 7777777 hash.data --- -SELECT * FROM hash_name_heap - WHERE hash_name_heap.random = '7777777'::name; - seqno | random --------+-------- -(0 rows) - --- --- hash index --- grep 1351610853 hash.data --- -SELECT * FROM hash_txt_heap - WHERE hash_txt_heap.random = '1351610853'::text; - seqno | random --------+------------ - 5677 | 1351610853 -(1 row) - --- --- hash index --- grep 111111112222222233333333 hash.data --- -SELECT * FROM hash_txt_heap - WHERE hash_txt_heap.random = '111111112222222233333333'::text; - seqno | random --------+-------- -(0 rows) - --- --- hash index --- grep 444705537 hash.data --- -SELECT * FROM hash_f8_heap - WHERE hash_f8_heap.random = '444705537'::float8; - seqno | random --------+----------- - 7853 | 444705537 -(1 row) - --- --- hash index --- grep 88888888 hash.data --- -SELECT * FROM hash_f8_heap - WHERE hash_f8_heap.random = '88888888'::float8; - seqno | random --------+-------- -(0 rows) - --- --- hash index --- grep '^90[^0-9]' hashovfl.data --- --- SELECT count(*) AS i988 FROM hash_ovfl_heap --- WHERE x = 90; --- --- hash index --- grep '^1000[^0-9]' hashovfl.data --- --- SELECT count(*) AS i0 FROM hash_ovfl_heap --- WHERE x = 1000; --- --- HASH --- -UPDATE hash_i4_heap - SET random = 1 - WHERE hash_i4_heap.seqno = 1492; -SELECT h.seqno AS i1492, h.random AS i1 - FROM hash_i4_heap h - WHERE h.random = 1; - i1492 | i1 --------+---- - 1492 | 1 -(1 row) - -UPDATE hash_i4_heap - SET seqno = 20000 - WHERE hash_i4_heap.random = 1492795354; -SELECT h.seqno AS i20000 - FROM hash_i4_heap h - WHERE h.random = 1492795354; - i20000 --------- - 20000 -(1 row) - -UPDATE hash_name_heap - SET random = '0123456789abcdef'::name - WHERE hash_name_heap.seqno = 6543; -SELECT h.seqno AS i6543, h.random AS c0_to_f - FROM hash_name_heap h - WHERE h.random = '0123456789abcdef'::name; - i6543 | c0_to_f --------+------------------ - 6543 | 0123456789abcdef -(1 row) - -UPDATE hash_name_heap - SET seqno = 20000 - WHERE hash_name_heap.random = '76652222'::name; --- --- this is the row we just replaced; index scan should return zero rows --- -SELECT h.seqno AS emptyset - FROM hash_name_heap h - WHERE h.random = '76652222'::name; - emptyset ----------- -(0 rows) - -UPDATE hash_txt_heap - SET random = '0123456789abcdefghijklmnop'::text - WHERE hash_txt_heap.seqno = 4002; -SELECT h.seqno AS i4002, h.random AS c0_to_p - FROM hash_txt_heap h - WHERE h.random = '0123456789abcdefghijklmnop'::text; - i4002 | c0_to_p --------+---------------------------- - 4002 | 0123456789abcdefghijklmnop -(1 row) - -UPDATE hash_txt_heap - SET seqno = 20000 - WHERE hash_txt_heap.random = '959363399'::text; -SELECT h.seqno AS t20000 - FROM hash_txt_heap h - WHERE h.random = '959363399'::text; - t20000 --------- - 20000 -(1 row) - -UPDATE hash_f8_heap - SET random = '-1234.1234'::float8 - WHERE hash_f8_heap.seqno = 8906; -SELECT h.seqno AS i8096, h.random AS f1234_1234 - FROM hash_f8_heap h - WHERE h.random = '-1234.1234'::float8; - i8096 | f1234_1234 --------+------------ - 8906 | -1234.1234 -(1 row) - -UPDATE hash_f8_heap - SET seqno = 20000 - WHERE hash_f8_heap.random = '488912369'::float8; -SELECT h.seqno AS f20000 - FROM hash_f8_heap h - WHERE h.random = '488912369'::float8; - f20000 --------- - 20000 -(1 row) - --- UPDATE hash_ovfl_heap --- SET x = 1000 --- WHERE x = 90; --- this vacuums the index as well --- VACUUM hash_ovfl_heap; --- SELECT count(*) AS i0 FROM hash_ovfl_heap --- WHERE x = 90; --- SELECT count(*) AS i988 FROM hash_ovfl_heap --- WHERE x = 1000; --- --- Cause some overflow insert and splits. --- -CREATE TABLE hash_split_heap (keycol INT); -INSERT INTO hash_split_heap SELECT 1 FROM generate_series(1, 500) a; -CREATE INDEX hash_split_index on hash_split_heap USING HASH (keycol); -INSERT INTO hash_split_heap SELECT 1 FROM generate_series(1, 5000) a; --- Let's do a backward scan. -BEGIN; -SET enable_seqscan = OFF; -SET enable_bitmapscan = OFF; -DECLARE c CURSOR FOR SELECT * from hash_split_heap WHERE keycol = 1; -MOVE FORWARD ALL FROM c; -MOVE BACKWARD 10000 FROM c; -MOVE BACKWARD ALL FROM c; -CLOSE c; -END; --- DELETE, INSERT, VACUUM. -DELETE FROM hash_split_heap WHERE keycol = 1; -INSERT INTO hash_split_heap SELECT a/2 FROM generate_series(1, 25000) a; -VACUUM hash_split_heap; --- Rebuild the index using a different fillfactor -ALTER INDEX hash_split_index SET (fillfactor = 10); -REINDEX INDEX hash_split_index; --- Clean up. -DROP TABLE hash_split_heap; --- Index on temp table. -CREATE TEMP TABLE hash_temp_heap (x int, y int); -INSERT INTO hash_temp_heap VALUES (1,1); -CREATE INDEX hash_idx ON hash_temp_heap USING hash (x); -DROP TABLE hash_temp_heap CASCADE; --- Float4 type. -CREATE TABLE hash_heap_float4 (x float4, y int); -INSERT INTO hash_heap_float4 VALUES (1.1,1); -CREATE INDEX hash_idx ON hash_heap_float4 USING hash (x); -DROP TABLE hash_heap_float4 CASCADE; --- Test out-of-range fillfactor values -CREATE INDEX hash_f8_index2 ON hash_f8_heap USING hash (random float8_ops) - WITH (fillfactor=9); -ERROR: value 9 out of bounds for option "fillfactor" -DETAIL: Valid values are between "10" and "100". -CREATE INDEX hash_f8_index2 ON hash_f8_heap USING hash (random float8_ops) - WITH (fillfactor=101); -ERROR: value 101 out of bounds for option "fillfactor" -DETAIL: Valid values are between "10" and "100". +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/update.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/update.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/update.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/update.out 2023-02-20 19:45:46.929211068 -0500 @@ -1,1028 +1 @@ --- --- UPDATE syntax tests --- -CREATE TABLE update_test ( - a INT DEFAULT 10, - b INT, - c TEXT -); -CREATE TABLE upsert_test ( - a INT PRIMARY KEY, - b TEXT -); -INSERT INTO update_test VALUES (5, 10, 'foo'); -INSERT INTO update_test(b, a) VALUES (15, 10); -SELECT * FROM update_test; - a | b | c -----+----+----- - 5 | 10 | foo - 10 | 15 | -(2 rows) - -UPDATE update_test SET a = DEFAULT, b = DEFAULT; -SELECT * FROM update_test; - a | b | c -----+---+----- - 10 | | foo - 10 | | -(2 rows) - --- aliases for the UPDATE target table -UPDATE update_test AS t SET b = 10 WHERE t.a = 10; -SELECT * FROM update_test; - a | b | c -----+----+----- - 10 | 10 | foo - 10 | 10 | -(2 rows) - -UPDATE update_test t SET b = t.b + 10 WHERE t.a = 10; -SELECT * FROM update_test; - a | b | c -----+----+----- - 10 | 20 | foo - 10 | 20 | -(2 rows) - --- --- Test VALUES in FROM --- -UPDATE update_test SET a=v.i FROM (VALUES(100, 20)) AS v(i, j) - WHERE update_test.b = v.j; -SELECT * FROM update_test; - a | b | c ------+----+----- - 100 | 20 | foo - 100 | 20 | -(2 rows) - --- fail, wrong data type: -UPDATE update_test SET a = v.* FROM (VALUES(100, 20)) AS v(i, j) - WHERE update_test.b = v.j; -ERROR: column "a" is of type integer but expression is of type record -LINE 1: UPDATE update_test SET a = v.* FROM (VALUES(100, 20)) AS v(i... - ^ -HINT: You will need to rewrite or cast the expression. --- --- Test multiple-set-clause syntax --- -INSERT INTO update_test SELECT a,b+1,c FROM update_test; -SELECT * FROM update_test; - a | b | c ------+----+----- - 100 | 20 | foo - 100 | 20 | - 100 | 21 | foo - 100 | 21 | -(4 rows) - -UPDATE update_test SET (c,b,a) = ('bugle', b+11, DEFAULT) WHERE c = 'foo'; -SELECT * FROM update_test; - a | b | c ------+----+------- - 100 | 20 | - 100 | 21 | - 10 | 31 | bugle - 10 | 32 | bugle -(4 rows) - -UPDATE update_test SET (c,b) = ('car', a+b), a = a + 1 WHERE a = 10; -SELECT * FROM update_test; - a | b | c ------+----+----- - 100 | 20 | - 100 | 21 | - 11 | 41 | car - 11 | 42 | car -(4 rows) - --- fail, multi assignment to same column: -UPDATE update_test SET (c,b) = ('car', a+b), b = a + 1 WHERE a = 10; -ERROR: multiple assignments to same column "b" --- uncorrelated sub-select: -UPDATE update_test - SET (b,a) = (select a,b from update_test where b = 41 and c = 'car') - WHERE a = 100 AND b = 20; -SELECT * FROM update_test; - a | b | c ------+----+----- - 100 | 21 | - 11 | 41 | car - 11 | 42 | car - 41 | 11 | -(4 rows) - --- correlated sub-select: -UPDATE update_test o - SET (b,a) = (select a+1,b from update_test i - where i.a=o.a and i.b=o.b and i.c is not distinct from o.c); -SELECT * FROM update_test; - a | b | c -----+-----+----- - 21 | 101 | - 41 | 12 | car - 42 | 12 | car - 11 | 42 | -(4 rows) - --- fail, multiple rows supplied: -UPDATE update_test SET (b,a) = (select a+1,b from update_test); -ERROR: more than one row returned by a subquery used as an expression --- set to null if no rows supplied: -UPDATE update_test SET (b,a) = (select a+1,b from update_test where a = 1000) - WHERE a = 11; -SELECT * FROM update_test; - a | b | c -----+-----+----- - 21 | 101 | - 41 | 12 | car - 42 | 12 | car - | | -(4 rows) - --- *-expansion should work in this context: -UPDATE update_test SET (a,b) = ROW(v.*) FROM (VALUES(21, 100)) AS v(i, j) - WHERE update_test.a = v.i; --- you might expect this to work, but syntactically it's not a RowExpr: -UPDATE update_test SET (a,b) = (v.*) FROM (VALUES(21, 101)) AS v(i, j) - WHERE update_test.a = v.i; -ERROR: source for a multiple-column UPDATE item must be a sub-SELECT or ROW() expression -LINE 1: UPDATE update_test SET (a,b) = (v.*) FROM (VALUES(21, 101)) ... - ^ --- if an alias for the target table is specified, don't allow references --- to the original table name -UPDATE update_test AS t SET b = update_test.b + 10 WHERE t.a = 10; -ERROR: invalid reference to FROM-clause entry for table "update_test" -LINE 1: UPDATE update_test AS t SET b = update_test.b + 10 WHERE t.a... - ^ -HINT: Perhaps you meant to reference the table alias "t". --- Make sure that we can update to a TOASTed value. -UPDATE update_test SET c = repeat('x', 10000) WHERE c = 'car'; -SELECT a, b, char_length(c) FROM update_test; - a | b | char_length -----+-----+------------- - | | - 21 | 100 | - 41 | 12 | 10000 - 42 | 12 | 10000 -(4 rows) - --- Check multi-assignment with a Result node to handle a one-time filter. -EXPLAIN (VERBOSE, COSTS OFF) -UPDATE update_test t - SET (a, b) = (SELECT b, a FROM update_test s WHERE s.a = t.a) - WHERE CURRENT_USER = SESSION_USER; - QUERY PLAN -------------------------------------------------------------- - Update on public.update_test t - -> Result - Output: $1, $2, (SubPlan 1 (returns $1,$2)), t.ctid - One-Time Filter: (CURRENT_USER = SESSION_USER) - -> Seq Scan on public.update_test t - Output: t.a, t.ctid - SubPlan 1 (returns $1,$2) - -> Seq Scan on public.update_test s - Output: s.b, s.a - Filter: (s.a = t.a) -(10 rows) - -UPDATE update_test t - SET (a, b) = (SELECT b, a FROM update_test s WHERE s.a = t.a) - WHERE CURRENT_USER = SESSION_USER; -SELECT a, b, char_length(c) FROM update_test; - a | b | char_length ------+----+------------- - | | - 100 | 21 | - 12 | 41 | 10000 - 12 | 42 | 10000 -(4 rows) - --- Test ON CONFLICT DO UPDATE -INSERT INTO upsert_test VALUES(1, 'Boo'), (3, 'Zoo'); --- uncorrelated sub-select: -WITH aaa AS (SELECT 1 AS a, 'Foo' AS b) INSERT INTO upsert_test - VALUES (1, 'Bar') ON CONFLICT(a) - DO UPDATE SET (b, a) = (SELECT b, a FROM aaa) RETURNING *; - a | b ----+----- - 1 | Foo -(1 row) - --- correlated sub-select: -INSERT INTO upsert_test VALUES (1, 'Baz'), (3, 'Zaz') ON CONFLICT(a) - DO UPDATE SET (b, a) = (SELECT b || ', Correlated', a from upsert_test i WHERE i.a = upsert_test.a) - RETURNING *; - a | b ----+----------------- - 1 | Foo, Correlated - 3 | Zoo, Correlated -(2 rows) - --- correlated sub-select (EXCLUDED.* alias): -INSERT INTO upsert_test VALUES (1, 'Bat'), (3, 'Zot') ON CONFLICT(a) - DO UPDATE SET (b, a) = (SELECT b || ', Excluded', a from upsert_test i WHERE i.a = excluded.a) - RETURNING *; - a | b ----+--------------------------- - 1 | Foo, Correlated, Excluded - 3 | Zoo, Correlated, Excluded -(2 rows) - --- ON CONFLICT using system attributes in RETURNING, testing both the --- inserting and updating paths. See bug report at: --- https://www.postgresql.org/message-id/73436355-6432-49B1-92ED-1FE4F7E7E100%40finefun.com.au -INSERT INTO upsert_test VALUES (2, 'Beeble') ON CONFLICT(a) - DO UPDATE SET (b, a) = (SELECT b || ', Excluded', a from upsert_test i WHERE i.a = excluded.a) - RETURNING tableoid::regclass, xmin = pg_current_xact_id()::xid AS xmin_correct, xmax = 0 AS xmax_correct; - tableoid | xmin_correct | xmax_correct --------------+--------------+-------------- - upsert_test | t | t -(1 row) - --- currently xmax is set after a conflict - that's probably not good, --- but it seems worthwhile to have to be explicit if that changes. -INSERT INTO upsert_test VALUES (2, 'Brox') ON CONFLICT(a) - DO UPDATE SET (b, a) = (SELECT b || ', Excluded', a from upsert_test i WHERE i.a = excluded.a) - RETURNING tableoid::regclass, xmin = pg_current_xact_id()::xid AS xmin_correct, xmax = pg_current_xact_id()::xid AS xmax_correct; - tableoid | xmin_correct | xmax_correct --------------+--------------+-------------- - upsert_test | t | t -(1 row) - -DROP TABLE update_test; -DROP TABLE upsert_test; --- Test ON CONFLICT DO UPDATE with partitioned table and non-identical children -CREATE TABLE upsert_test ( - a INT PRIMARY KEY, - b TEXT -) PARTITION BY LIST (a); -CREATE TABLE upsert_test_1 PARTITION OF upsert_test FOR VALUES IN (1); -CREATE TABLE upsert_test_2 (b TEXT, a INT PRIMARY KEY); -ALTER TABLE upsert_test ATTACH PARTITION upsert_test_2 FOR VALUES IN (2); -INSERT INTO upsert_test VALUES(1, 'Boo'), (2, 'Zoo'); --- uncorrelated sub-select: -WITH aaa AS (SELECT 1 AS a, 'Foo' AS b) INSERT INTO upsert_test - VALUES (1, 'Bar') ON CONFLICT(a) - DO UPDATE SET (b, a) = (SELECT b, a FROM aaa) RETURNING *; - a | b ----+----- - 1 | Foo -(1 row) - --- correlated sub-select: -WITH aaa AS (SELECT 1 AS ctea, ' Foo' AS cteb) INSERT INTO upsert_test - VALUES (1, 'Bar'), (2, 'Baz') ON CONFLICT(a) - DO UPDATE SET (b, a) = (SELECT upsert_test.b||cteb, upsert_test.a FROM aaa) RETURNING *; - a | b ----+--------- - 1 | Foo Foo - 2 | Zoo Foo -(2 rows) - -DROP TABLE upsert_test; ---------------------------- --- UPDATE with row movement ---------------------------- --- When a partitioned table receives an UPDATE to the partitioned key and the --- new values no longer meet the partition's bound, the row must be moved to --- the correct partition for the new partition key (if one exists). We must --- also ensure that updatable views on partitioned tables properly enforce any --- WITH CHECK OPTION that is defined. The situation with triggers in this case --- also requires thorough testing as partition key updates causing row --- movement convert UPDATEs into DELETE+INSERT. -CREATE TABLE range_parted ( - a text, - b bigint, - c numeric, - d int, - e varchar -) PARTITION BY RANGE (a, b); --- Create partitions intentionally in descending bound order, so as to test --- that update-row-movement works with the leaf partitions not in bound order. -CREATE TABLE part_b_20_b_30 (e varchar, c numeric, a text, b bigint, d int); -ALTER TABLE range_parted ATTACH PARTITION part_b_20_b_30 FOR VALUES FROM ('b', 20) TO ('b', 30); -CREATE TABLE part_b_10_b_20 (e varchar, c numeric, a text, b bigint, d int) PARTITION BY RANGE (c); -CREATE TABLE part_b_1_b_10 PARTITION OF range_parted FOR VALUES FROM ('b', 1) TO ('b', 10); -ALTER TABLE range_parted ATTACH PARTITION part_b_10_b_20 FOR VALUES FROM ('b', 10) TO ('b', 20); -CREATE TABLE part_a_10_a_20 PARTITION OF range_parted FOR VALUES FROM ('a', 10) TO ('a', 20); -CREATE TABLE part_a_1_a_10 PARTITION OF range_parted FOR VALUES FROM ('a', 1) TO ('a', 10); --- Check that partition-key UPDATE works sanely on a partitioned table that --- does not have any child partitions. -UPDATE part_b_10_b_20 set b = b - 6; --- Create some more partitions following the above pattern of descending bound --- order, but let's make the situation a bit more complex by having the --- attribute numbers of the columns vary from their parent partition. -CREATE TABLE part_c_100_200 (e varchar, c numeric, a text, b bigint, d int) PARTITION BY range (abs(d)); -ALTER TABLE part_c_100_200 DROP COLUMN e, DROP COLUMN c, DROP COLUMN a; -ALTER TABLE part_c_100_200 ADD COLUMN c numeric, ADD COLUMN e varchar, ADD COLUMN a text; -ALTER TABLE part_c_100_200 DROP COLUMN b; -ALTER TABLE part_c_100_200 ADD COLUMN b bigint; -CREATE TABLE part_d_1_15 PARTITION OF part_c_100_200 FOR VALUES FROM (1) TO (15); -CREATE TABLE part_d_15_20 PARTITION OF part_c_100_200 FOR VALUES FROM (15) TO (20); -ALTER TABLE part_b_10_b_20 ATTACH PARTITION part_c_100_200 FOR VALUES FROM (100) TO (200); -CREATE TABLE part_c_1_100 (e varchar, d int, c numeric, b bigint, a text); -ALTER TABLE part_b_10_b_20 ATTACH PARTITION part_c_1_100 FOR VALUES FROM (1) TO (100); -\set init_range_parted 'truncate range_parted; insert into range_parted VALUES (''a'', 1, 1, 1), (''a'', 10, 200, 1), (''b'', 12, 96, 1), (''b'', 13, 97, 2), (''b'', 15, 105, 16), (''b'', 17, 105, 19)' -\set show_data 'select tableoid::regclass::text COLLATE "C" partname, * from range_parted ORDER BY 1, 2, 3, 4, 5, 6' -:init_range_parted; -:show_data; - partname | a | b | c | d | e -----------------+---+----+-----+----+--- - part_a_10_a_20 | a | 10 | 200 | 1 | - part_a_1_a_10 | a | 1 | 1 | 1 | - part_c_1_100 | b | 12 | 96 | 1 | - part_c_1_100 | b | 13 | 97 | 2 | - part_d_15_20 | b | 15 | 105 | 16 | - part_d_15_20 | b | 17 | 105 | 19 | -(6 rows) - --- The order of subplans should be in bound order -EXPLAIN (costs off) UPDATE range_parted set c = c - 50 WHERE c > 97; - QUERY PLAN -------------------------------------------------------- - Update on range_parted - Update on part_a_1_a_10 range_parted_1 - Update on part_a_10_a_20 range_parted_2 - Update on part_b_1_b_10 range_parted_3 - Update on part_c_1_100 range_parted_4 - Update on part_d_1_15 range_parted_5 - Update on part_d_15_20 range_parted_6 - Update on part_b_20_b_30 range_parted_7 - -> Append - -> Seq Scan on part_a_1_a_10 range_parted_1 - Filter: (c > '97'::numeric) - -> Seq Scan on part_a_10_a_20 range_parted_2 - Filter: (c > '97'::numeric) - -> Seq Scan on part_b_1_b_10 range_parted_3 - Filter: (c > '97'::numeric) - -> Seq Scan on part_c_1_100 range_parted_4 - Filter: (c > '97'::numeric) - -> Seq Scan on part_d_1_15 range_parted_5 - Filter: (c > '97'::numeric) - -> Seq Scan on part_d_15_20 range_parted_6 - Filter: (c > '97'::numeric) - -> Seq Scan on part_b_20_b_30 range_parted_7 - Filter: (c > '97'::numeric) -(23 rows) - --- fail, row movement happens only within the partition subtree. -UPDATE part_c_100_200 set c = c - 20, d = c WHERE c = 105; -ERROR: new row for relation "part_c_100_200" violates partition constraint -DETAIL: Failing row contains (105, 85, null, b, 15). --- fail, no partition key update, so no attempt to move tuple, --- but "a = 'a'" violates partition constraint enforced by root partition) -UPDATE part_b_10_b_20 set a = 'a'; -ERROR: new row for relation "part_b_10_b_20" violates partition constraint -DETAIL: Failing row contains (null, 96, a, 12, 1). --- ok, partition key update, no constraint violation -UPDATE range_parted set d = d - 10 WHERE d > 10; --- ok, no partition key update, no constraint violation -UPDATE range_parted set e = d; --- No row found -UPDATE part_c_1_100 set c = c + 20 WHERE c = 98; --- ok, row movement -UPDATE part_b_10_b_20 set c = c + 20 returning c, b, a; - c | b | a ------+----+--- - 116 | 12 | b - 117 | 13 | b - 125 | 15 | b - 125 | 17 | b -(4 rows) - -:show_data; - partname | a | b | c | d | e -----------------+---+----+-----+---+--- - part_a_10_a_20 | a | 10 | 200 | 1 | 1 - part_a_1_a_10 | a | 1 | 1 | 1 | 1 - part_d_1_15 | b | 12 | 116 | 1 | 1 - part_d_1_15 | b | 13 | 117 | 2 | 2 - part_d_1_15 | b | 15 | 125 | 6 | 6 - part_d_1_15 | b | 17 | 125 | 9 | 9 -(6 rows) - --- fail, row movement happens only within the partition subtree. -UPDATE part_b_10_b_20 set b = b - 6 WHERE c > 116 returning *; -ERROR: new row for relation "part_b_10_b_20" violates partition constraint -DETAIL: Failing row contains (2, 117, b, 7, 2). --- ok, row movement, with subset of rows moved into different partition. -UPDATE range_parted set b = b - 6 WHERE c > 116 returning a, b + c; - a | ?column? ----+---------- - a | 204 - b | 124 - b | 134 - b | 136 -(4 rows) - -:show_data; - partname | a | b | c | d | e ----------------+---+----+-----+---+--- - part_a_1_a_10 | a | 1 | 1 | 1 | 1 - part_a_1_a_10 | a | 4 | 200 | 1 | 1 - part_b_1_b_10 | b | 7 | 117 | 2 | 2 - part_b_1_b_10 | b | 9 | 125 | 6 | 6 - part_d_1_15 | b | 11 | 125 | 9 | 9 - part_d_1_15 | b | 12 | 116 | 1 | 1 -(6 rows) - --- Common table needed for multiple test scenarios. -CREATE TABLE mintab(c1 int); -INSERT into mintab VALUES (120); --- update partition key using updatable view. -CREATE VIEW upview AS SELECT * FROM range_parted WHERE (select c > c1 FROM mintab) WITH CHECK OPTION; --- ok -UPDATE upview set c = 199 WHERE b = 4; --- fail, check option violation -UPDATE upview set c = 120 WHERE b = 4; -ERROR: new row violates check option for view "upview" -DETAIL: Failing row contains (a, 4, 120, 1, 1). --- fail, row movement with check option violation -UPDATE upview set a = 'b', b = 15, c = 120 WHERE b = 4; -ERROR: new row violates check option for view "upview" -DETAIL: Failing row contains (b, 15, 120, 1, 1). --- ok, row movement, check option passes -UPDATE upview set a = 'b', b = 15 WHERE b = 4; -:show_data; - partname | a | b | c | d | e ----------------+---+----+-----+---+--- - part_a_1_a_10 | a | 1 | 1 | 1 | 1 - part_b_1_b_10 | b | 7 | 117 | 2 | 2 - part_b_1_b_10 | b | 9 | 125 | 6 | 6 - part_d_1_15 | b | 11 | 125 | 9 | 9 - part_d_1_15 | b | 12 | 116 | 1 | 1 - part_d_1_15 | b | 15 | 199 | 1 | 1 -(6 rows) - --- cleanup -DROP VIEW upview; --- RETURNING having whole-row vars. -:init_range_parted; -UPDATE range_parted set c = 95 WHERE a = 'b' and b > 10 and c > 100 returning (range_parted), *; - range_parted | a | b | c | d | e ----------------+---+----+----+----+--- - (b,15,95,16,) | b | 15 | 95 | 16 | - (b,17,95,19,) | b | 17 | 95 | 19 | -(2 rows) - -:show_data; - partname | a | b | c | d | e -----------------+---+----+-----+----+--- - part_a_10_a_20 | a | 10 | 200 | 1 | - part_a_1_a_10 | a | 1 | 1 | 1 | - part_c_1_100 | b | 12 | 96 | 1 | - part_c_1_100 | b | 13 | 97 | 2 | - part_c_1_100 | b | 15 | 95 | 16 | - part_c_1_100 | b | 17 | 95 | 19 | -(6 rows) - --- Transition tables with update row movement -:init_range_parted; -CREATE FUNCTION trans_updatetrigfunc() RETURNS trigger LANGUAGE plpgsql AS -$$ - begin - raise notice 'trigger = %, old table = %, new table = %', - TG_NAME, - (select string_agg(old_table::text, ', ' ORDER BY a) FROM old_table), - (select string_agg(new_table::text, ', ' ORDER BY a) FROM new_table); - return null; - end; -$$; -CREATE TRIGGER trans_updatetrig - AFTER UPDATE ON range_parted REFERENCING OLD TABLE AS old_table NEW TABLE AS new_table - FOR EACH STATEMENT EXECUTE PROCEDURE trans_updatetrigfunc(); -UPDATE range_parted set c = (case when c = 96 then 110 else c + 1 end ) WHERE a = 'b' and b > 10 and c >= 96; -NOTICE: trigger = trans_updatetrig, old table = (b,12,96,1,), (b,13,97,2,), (b,15,105,16,), (b,17,105,19,), new table = (b,12,110,1,), (b,13,98,2,), (b,15,106,16,), (b,17,106,19,) -:show_data; - partname | a | b | c | d | e -----------------+---+----+-----+----+--- - part_a_10_a_20 | a | 10 | 200 | 1 | - part_a_1_a_10 | a | 1 | 1 | 1 | - part_c_1_100 | b | 13 | 98 | 2 | - part_d_15_20 | b | 15 | 106 | 16 | - part_d_15_20 | b | 17 | 106 | 19 | - part_d_1_15 | b | 12 | 110 | 1 | -(6 rows) - -:init_range_parted; --- Enabling OLD TABLE capture for both DELETE as well as UPDATE stmt triggers --- should not cause DELETEd rows to be captured twice. Similar thing for --- INSERT triggers and inserted rows. -CREATE TRIGGER trans_deletetrig - AFTER DELETE ON range_parted REFERENCING OLD TABLE AS old_table - FOR EACH STATEMENT EXECUTE PROCEDURE trans_updatetrigfunc(); -CREATE TRIGGER trans_inserttrig - AFTER INSERT ON range_parted REFERENCING NEW TABLE AS new_table - FOR EACH STATEMENT EXECUTE PROCEDURE trans_updatetrigfunc(); -UPDATE range_parted set c = c + 50 WHERE a = 'b' and b > 10 and c >= 96; -NOTICE: trigger = trans_updatetrig, old table = (b,12,96,1,), (b,13,97,2,), (b,15,105,16,), (b,17,105,19,), new table = (b,12,146,1,), (b,13,147,2,), (b,15,155,16,), (b,17,155,19,) -:show_data; - partname | a | b | c | d | e -----------------+---+----+-----+----+--- - part_a_10_a_20 | a | 10 | 200 | 1 | - part_a_1_a_10 | a | 1 | 1 | 1 | - part_d_15_20 | b | 15 | 155 | 16 | - part_d_15_20 | b | 17 | 155 | 19 | - part_d_1_15 | b | 12 | 146 | 1 | - part_d_1_15 | b | 13 | 147 | 2 | -(6 rows) - -DROP TRIGGER trans_deletetrig ON range_parted; -DROP TRIGGER trans_inserttrig ON range_parted; --- Don't drop trans_updatetrig yet. It is required below. --- Test with transition tuple conversion happening for rows moved into the --- new partition. This requires a trigger that references transition table --- (we already have trans_updatetrig). For inserted rows, the conversion --- is not usually needed, because the original tuple is already compatible with --- the desired transition tuple format. But conversion happens when there is a --- BR trigger because the trigger can change the inserted row. So install a --- BR triggers on those child partitions where the rows will be moved. -CREATE FUNCTION func_parted_mod_b() RETURNS trigger AS $$ -BEGIN - NEW.b = NEW.b + 1; - return NEW; -END $$ language plpgsql; -CREATE TRIGGER trig_c1_100 BEFORE UPDATE OR INSERT ON part_c_1_100 - FOR EACH ROW EXECUTE PROCEDURE func_parted_mod_b(); -CREATE TRIGGER trig_d1_15 BEFORE UPDATE OR INSERT ON part_d_1_15 - FOR EACH ROW EXECUTE PROCEDURE func_parted_mod_b(); -CREATE TRIGGER trig_d15_20 BEFORE UPDATE OR INSERT ON part_d_15_20 - FOR EACH ROW EXECUTE PROCEDURE func_parted_mod_b(); -:init_range_parted; -UPDATE range_parted set c = (case when c = 96 then 110 else c + 1 end) WHERE a = 'b' and b > 10 and c >= 96; -NOTICE: trigger = trans_updatetrig, old table = (b,13,96,1,), (b,14,97,2,), (b,16,105,16,), (b,18,105,19,), new table = (b,15,110,1,), (b,15,98,2,), (b,17,106,16,), (b,19,106,19,) -:show_data; - partname | a | b | c | d | e -----------------+---+----+-----+----+--- - part_a_10_a_20 | a | 10 | 200 | 1 | - part_a_1_a_10 | a | 1 | 1 | 1 | - part_c_1_100 | b | 15 | 98 | 2 | - part_d_15_20 | b | 17 | 106 | 16 | - part_d_15_20 | b | 19 | 106 | 19 | - part_d_1_15 | b | 15 | 110 | 1 | -(6 rows) - -:init_range_parted; -UPDATE range_parted set c = c + 50 WHERE a = 'b' and b > 10 and c >= 96; -NOTICE: trigger = trans_updatetrig, old table = (b,13,96,1,), (b,14,97,2,), (b,16,105,16,), (b,18,105,19,), new table = (b,15,146,1,), (b,16,147,2,), (b,17,155,16,), (b,19,155,19,) -:show_data; - partname | a | b | c | d | e -----------------+---+----+-----+----+--- - part_a_10_a_20 | a | 10 | 200 | 1 | - part_a_1_a_10 | a | 1 | 1 | 1 | - part_d_15_20 | b | 17 | 155 | 16 | - part_d_15_20 | b | 19 | 155 | 19 | - part_d_1_15 | b | 15 | 146 | 1 | - part_d_1_15 | b | 16 | 147 | 2 | -(6 rows) - --- Case where per-partition tuple conversion map array is allocated, but the --- map is not required for the particular tuple that is routed, thanks to --- matching table attributes of the partition and the target table. -:init_range_parted; -UPDATE range_parted set b = 15 WHERE b = 1; -NOTICE: trigger = trans_updatetrig, old table = (a,1,1,1,), new table = (a,15,1,1,) -:show_data; - partname | a | b | c | d | e -----------------+---+----+-----+----+--- - part_a_10_a_20 | a | 10 | 200 | 1 | - part_a_10_a_20 | a | 15 | 1 | 1 | - part_c_1_100 | b | 13 | 96 | 1 | - part_c_1_100 | b | 14 | 97 | 2 | - part_d_15_20 | b | 16 | 105 | 16 | - part_d_15_20 | b | 18 | 105 | 19 | -(6 rows) - -DROP TRIGGER trans_updatetrig ON range_parted; -DROP TRIGGER trig_c1_100 ON part_c_1_100; -DROP TRIGGER trig_d1_15 ON part_d_1_15; -DROP TRIGGER trig_d15_20 ON part_d_15_20; -DROP FUNCTION func_parted_mod_b(); --- RLS policies with update-row-movement ------------------------------------------ -ALTER TABLE range_parted ENABLE ROW LEVEL SECURITY; -CREATE USER regress_range_parted_user; -GRANT ALL ON range_parted, mintab TO regress_range_parted_user; -CREATE POLICY seeall ON range_parted AS PERMISSIVE FOR SELECT USING (true); -CREATE POLICY policy_range_parted ON range_parted for UPDATE USING (true) WITH CHECK (c % 2 = 0); -:init_range_parted; -SET SESSION AUTHORIZATION regress_range_parted_user; --- This should fail with RLS violation error while moving row from --- part_a_10_a_20 to part_d_1_15, because we are setting 'c' to an odd number. -UPDATE range_parted set a = 'b', c = 151 WHERE a = 'a' and c = 200; -ERROR: new row violates row-level security policy for table "range_parted" -RESET SESSION AUTHORIZATION; --- Create a trigger on part_d_1_15 -CREATE FUNCTION func_d_1_15() RETURNS trigger AS $$ -BEGIN - NEW.c = NEW.c + 1; -- Make even numbers odd, or vice versa - return NEW; -END $$ LANGUAGE plpgsql; -CREATE TRIGGER trig_d_1_15 BEFORE INSERT ON part_d_1_15 - FOR EACH ROW EXECUTE PROCEDURE func_d_1_15(); -:init_range_parted; -SET SESSION AUTHORIZATION regress_range_parted_user; --- Here, RLS checks should succeed while moving row from part_a_10_a_20 to --- part_d_1_15. Even though the UPDATE is setting 'c' to an odd number, the --- trigger at the destination partition again makes it an even number. -UPDATE range_parted set a = 'b', c = 151 WHERE a = 'a' and c = 200; -RESET SESSION AUTHORIZATION; -:init_range_parted; -SET SESSION AUTHORIZATION regress_range_parted_user; --- This should fail with RLS violation error. Even though the UPDATE is setting --- 'c' to an even number, the trigger at the destination partition again makes --- it an odd number. -UPDATE range_parted set a = 'b', c = 150 WHERE a = 'a' and c = 200; -ERROR: new row violates row-level security policy for table "range_parted" --- Cleanup -RESET SESSION AUTHORIZATION; -DROP TRIGGER trig_d_1_15 ON part_d_1_15; -DROP FUNCTION func_d_1_15(); --- Policy expression contains SubPlan -RESET SESSION AUTHORIZATION; -:init_range_parted; -CREATE POLICY policy_range_parted_subplan on range_parted - AS RESTRICTIVE for UPDATE USING (true) - WITH CHECK ((SELECT range_parted.c <= c1 FROM mintab)); -SET SESSION AUTHORIZATION regress_range_parted_user; --- fail, mintab has row with c1 = 120 -UPDATE range_parted set a = 'b', c = 122 WHERE a = 'a' and c = 200; -ERROR: new row violates row-level security policy "policy_range_parted_subplan" for table "range_parted" --- ok -UPDATE range_parted set a = 'b', c = 120 WHERE a = 'a' and c = 200; --- RLS policy expression contains whole row. -RESET SESSION AUTHORIZATION; -:init_range_parted; -CREATE POLICY policy_range_parted_wholerow on range_parted AS RESTRICTIVE for UPDATE USING (true) - WITH CHECK (range_parted = row('b', 10, 112, 1, NULL)::range_parted); -SET SESSION AUTHORIZATION regress_range_parted_user; --- ok, should pass the RLS check -UPDATE range_parted set a = 'b', c = 112 WHERE a = 'a' and c = 200; -RESET SESSION AUTHORIZATION; -:init_range_parted; -SET SESSION AUTHORIZATION regress_range_parted_user; --- fail, the whole row RLS check should fail -UPDATE range_parted set a = 'b', c = 116 WHERE a = 'a' and c = 200; -ERROR: new row violates row-level security policy "policy_range_parted_wholerow" for table "range_parted" --- Cleanup -RESET SESSION AUTHORIZATION; -DROP POLICY policy_range_parted ON range_parted; -DROP POLICY policy_range_parted_subplan ON range_parted; -DROP POLICY policy_range_parted_wholerow ON range_parted; -REVOKE ALL ON range_parted, mintab FROM regress_range_parted_user; -DROP USER regress_range_parted_user; -DROP TABLE mintab; --- statement triggers with update row movement ---------------------------------------------------- -:init_range_parted; -CREATE FUNCTION trigfunc() returns trigger language plpgsql as -$$ - begin - raise notice 'trigger = % fired on table % during %', - TG_NAME, TG_TABLE_NAME, TG_OP; - return null; - end; -$$; --- Triggers on root partition -CREATE TRIGGER parent_delete_trig - AFTER DELETE ON range_parted for each statement execute procedure trigfunc(); -CREATE TRIGGER parent_update_trig - AFTER UPDATE ON range_parted for each statement execute procedure trigfunc(); -CREATE TRIGGER parent_insert_trig - AFTER INSERT ON range_parted for each statement execute procedure trigfunc(); --- Triggers on leaf partition part_c_1_100 -CREATE TRIGGER c1_delete_trig - AFTER DELETE ON part_c_1_100 for each statement execute procedure trigfunc(); -CREATE TRIGGER c1_update_trig - AFTER UPDATE ON part_c_1_100 for each statement execute procedure trigfunc(); -CREATE TRIGGER c1_insert_trig - AFTER INSERT ON part_c_1_100 for each statement execute procedure trigfunc(); --- Triggers on leaf partition part_d_1_15 -CREATE TRIGGER d1_delete_trig - AFTER DELETE ON part_d_1_15 for each statement execute procedure trigfunc(); -CREATE TRIGGER d1_update_trig - AFTER UPDATE ON part_d_1_15 for each statement execute procedure trigfunc(); -CREATE TRIGGER d1_insert_trig - AFTER INSERT ON part_d_1_15 for each statement execute procedure trigfunc(); --- Triggers on leaf partition part_d_15_20 -CREATE TRIGGER d15_delete_trig - AFTER DELETE ON part_d_15_20 for each statement execute procedure trigfunc(); -CREATE TRIGGER d15_update_trig - AFTER UPDATE ON part_d_15_20 for each statement execute procedure trigfunc(); -CREATE TRIGGER d15_insert_trig - AFTER INSERT ON part_d_15_20 for each statement execute procedure trigfunc(); --- Move all rows from part_c_100_200 to part_c_1_100. None of the delete or --- insert statement triggers should be fired. -UPDATE range_parted set c = c - 50 WHERE c > 97; -NOTICE: trigger = parent_update_trig fired on table range_parted during UPDATE -:show_data; - partname | a | b | c | d | e -----------------+---+----+-----+----+--- - part_a_10_a_20 | a | 10 | 150 | 1 | - part_a_1_a_10 | a | 1 | 1 | 1 | - part_c_1_100 | b | 12 | 96 | 1 | - part_c_1_100 | b | 13 | 97 | 2 | - part_c_1_100 | b | 15 | 55 | 16 | - part_c_1_100 | b | 17 | 55 | 19 | -(6 rows) - -DROP TRIGGER parent_delete_trig ON range_parted; -DROP TRIGGER parent_update_trig ON range_parted; -DROP TRIGGER parent_insert_trig ON range_parted; -DROP TRIGGER c1_delete_trig ON part_c_1_100; -DROP TRIGGER c1_update_trig ON part_c_1_100; -DROP TRIGGER c1_insert_trig ON part_c_1_100; -DROP TRIGGER d1_delete_trig ON part_d_1_15; -DROP TRIGGER d1_update_trig ON part_d_1_15; -DROP TRIGGER d1_insert_trig ON part_d_1_15; -DROP TRIGGER d15_delete_trig ON part_d_15_20; -DROP TRIGGER d15_update_trig ON part_d_15_20; -DROP TRIGGER d15_insert_trig ON part_d_15_20; --- Creating default partition for range -:init_range_parted; -create table part_def partition of range_parted default; -\d+ part_def - Table "public.part_def" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+-------------------+-----------+----------+---------+----------+--------------+------------- - a | text | | | | extended | | - b | bigint | | | | plain | | - c | numeric | | | | main | | - d | integer | | | | plain | | - e | character varying | | | | extended | | -Partition of: range_parted DEFAULT -Partition constraint: (NOT ((a IS NOT NULL) AND (b IS NOT NULL) AND (((a = 'a'::text) AND (b >= '1'::bigint) AND (b < '10'::bigint)) OR ((a = 'a'::text) AND (b >= '10'::bigint) AND (b < '20'::bigint)) OR ((a = 'b'::text) AND (b >= '1'::bigint) AND (b < '10'::bigint)) OR ((a = 'b'::text) AND (b >= '10'::bigint) AND (b < '20'::bigint)) OR ((a = 'b'::text) AND (b >= '20'::bigint) AND (b < '30'::bigint))))) - -insert into range_parted values ('c', 9); --- ok -update part_def set a = 'd' where a = 'c'; --- fail -update part_def set a = 'a' where a = 'd'; -ERROR: new row for relation "part_def" violates partition constraint -DETAIL: Failing row contains (a, 9, null, null, null). -:show_data; - partname | a | b | c | d | e -----------------+---+----+-----+----+--- - part_a_10_a_20 | a | 10 | 200 | 1 | - part_a_1_a_10 | a | 1 | 1 | 1 | - part_c_1_100 | b | 12 | 96 | 1 | - part_c_1_100 | b | 13 | 97 | 2 | - part_d_15_20 | b | 15 | 105 | 16 | - part_d_15_20 | b | 17 | 105 | 19 | - part_def | d | 9 | | | -(7 rows) - --- Update row movement from non-default to default partition. --- fail, default partition is not under part_a_10_a_20; -UPDATE part_a_10_a_20 set a = 'ad' WHERE a = 'a'; -ERROR: new row for relation "part_a_10_a_20" violates partition constraint -DETAIL: Failing row contains (ad, 10, 200, 1, null). --- ok -UPDATE range_parted set a = 'ad' WHERE a = 'a'; -UPDATE range_parted set a = 'bd' WHERE a = 'b'; -:show_data; - partname | a | b | c | d | e -----------+----+----+-----+----+--- - part_def | ad | 1 | 1 | 1 | - part_def | ad | 10 | 200 | 1 | - part_def | bd | 12 | 96 | 1 | - part_def | bd | 13 | 97 | 2 | - part_def | bd | 15 | 105 | 16 | - part_def | bd | 17 | 105 | 19 | - part_def | d | 9 | | | -(7 rows) - --- Update row movement from default to non-default partitions. --- ok -UPDATE range_parted set a = 'a' WHERE a = 'ad'; -UPDATE range_parted set a = 'b' WHERE a = 'bd'; -:show_data; - partname | a | b | c | d | e -----------------+---+----+-----+----+--- - part_a_10_a_20 | a | 10 | 200 | 1 | - part_a_1_a_10 | a | 1 | 1 | 1 | - part_c_1_100 | b | 12 | 96 | 1 | - part_c_1_100 | b | 13 | 97 | 2 | - part_d_15_20 | b | 15 | 105 | 16 | - part_d_15_20 | b | 17 | 105 | 19 | - part_def | d | 9 | | | -(7 rows) - --- Cleanup: range_parted no longer needed. -DROP TABLE range_parted; -CREATE TABLE list_parted ( - a text, - b int -) PARTITION BY list (a); -CREATE TABLE list_part1 PARTITION OF list_parted for VALUES in ('a', 'b'); -CREATE TABLE list_default PARTITION OF list_parted default; -INSERT into list_part1 VALUES ('a', 1); -INSERT into list_default VALUES ('d', 10); --- fail -UPDATE list_default set a = 'a' WHERE a = 'd'; -ERROR: new row for relation "list_default" violates partition constraint -DETAIL: Failing row contains (a, 10). --- ok -UPDATE list_default set a = 'x' WHERE a = 'd'; -DROP TABLE list_parted; --- Test retrieval of system columns with non-consistent partition row types. --- This is only partially supported, as seen in the results. -create table utrtest (a int, b text) partition by list (a); -create table utr1 (a int check (a in (1)), q text, b text); -create table utr2 (a int check (a in (2)), b text); -alter table utr1 drop column q; -alter table utrtest attach partition utr1 for values in (1); -alter table utrtest attach partition utr2 for values in (2); -insert into utrtest values (1, 'foo') - returning *, tableoid::regclass, xmin = pg_current_xact_id()::xid as xmin_ok; - a | b | tableoid | xmin_ok ----+-----+----------+--------- - 1 | foo | utr1 | t -(1 row) - -insert into utrtest values (2, 'bar') - returning *, tableoid::regclass, xmin = pg_current_xact_id()::xid as xmin_ok; -- fails -ERROR: cannot retrieve a system column in this context -insert into utrtest values (2, 'bar') - returning *, tableoid::regclass; - a | b | tableoid ----+-----+---------- - 2 | bar | utr2 -(1 row) - -update utrtest set b = b || b from (values (1), (2)) s(x) where a = s.x - returning *, tableoid::regclass, xmin = pg_current_xact_id()::xid as xmin_ok; - a | b | x | tableoid | xmin_ok ----+--------+---+----------+--------- - 1 | foofoo | 1 | utr1 | t - 2 | barbar | 2 | utr2 | t -(2 rows) - -update utrtest set a = 3 - a from (values (1), (2)) s(x) where a = s.x - returning *, tableoid::regclass, xmin = pg_current_xact_id()::xid as xmin_ok; -- fails -ERROR: cannot retrieve a system column in this context -update utrtest set a = 3 - a from (values (1), (2)) s(x) where a = s.x - returning *, tableoid::regclass; - a | b | x | tableoid ----+--------+---+---------- - 2 | foofoo | 1 | utr2 - 1 | barbar | 2 | utr1 -(2 rows) - -delete from utrtest - returning *, tableoid::regclass, xmax = pg_current_xact_id()::xid as xmax_ok; - a | b | tableoid | xmax_ok ----+--------+----------+--------- - 1 | barbar | utr1 | t - 2 | foofoo | utr2 | t -(2 rows) - -drop table utrtest; --------------- --- Some more update-partition-key test scenarios below. This time use list --- partitions. --------------- --- Setup for list partitions -CREATE TABLE list_parted (a numeric, b int, c int8) PARTITION BY list (a); -CREATE TABLE sub_parted PARTITION OF list_parted for VALUES in (1) PARTITION BY list (b); -CREATE TABLE sub_part1(b int, c int8, a numeric); -ALTER TABLE sub_parted ATTACH PARTITION sub_part1 for VALUES in (1); -CREATE TABLE sub_part2(b int, c int8, a numeric); -ALTER TABLE sub_parted ATTACH PARTITION sub_part2 for VALUES in (2); -CREATE TABLE list_part1(a numeric, b int, c int8); -ALTER TABLE list_parted ATTACH PARTITION list_part1 for VALUES in (2,3); -INSERT into list_parted VALUES (2,5,50); -INSERT into list_parted VALUES (3,6,60); -INSERT into sub_parted VALUES (1,1,60); -INSERT into sub_parted VALUES (1,2,10); --- Test partition constraint violation when intermediate ancestor is used and --- constraint is inherited from upper root. -UPDATE sub_parted set a = 2 WHERE c = 10; -ERROR: new row for relation "sub_parted" violates partition constraint -DETAIL: Failing row contains (2, 2, 10). --- Test update-partition-key, where the unpruned partitions do not have their --- partition keys updated. -SELECT tableoid::regclass::text, * FROM list_parted WHERE a = 2 ORDER BY 1; - tableoid | a | b | c -------------+---+---+---- - list_part1 | 2 | 5 | 50 -(1 row) - -UPDATE list_parted set b = c + a WHERE a = 2; -SELECT tableoid::regclass::text, * FROM list_parted WHERE a = 2 ORDER BY 1; - tableoid | a | b | c -------------+---+----+---- - list_part1 | 2 | 52 | 50 -(1 row) - --- Test the case where BR UPDATE triggers change the partition key. -CREATE FUNCTION func_parted_mod_b() returns trigger as $$ -BEGIN - NEW.b = 2; -- This is changing partition key column. - return NEW; -END $$ LANGUAGE plpgsql; -CREATE TRIGGER parted_mod_b before update on sub_part1 - for each row execute procedure func_parted_mod_b(); -SELECT tableoid::regclass::text, * FROM list_parted ORDER BY 1, 2, 3, 4; - tableoid | a | b | c -------------+---+----+---- - list_part1 | 2 | 52 | 50 - list_part1 | 3 | 6 | 60 - sub_part1 | 1 | 1 | 60 - sub_part2 | 1 | 2 | 10 -(4 rows) - --- This should do the tuple routing even though there is no explicit --- partition-key update, because there is a trigger on sub_part1. -UPDATE list_parted set c = 70 WHERE b = 1; -SELECT tableoid::regclass::text, * FROM list_parted ORDER BY 1, 2, 3, 4; - tableoid | a | b | c -------------+---+----+---- - list_part1 | 2 | 52 | 50 - list_part1 | 3 | 6 | 60 - sub_part2 | 1 | 2 | 10 - sub_part2 | 1 | 2 | 70 -(4 rows) - -DROP TRIGGER parted_mod_b ON sub_part1; --- If BR DELETE trigger prevented DELETE from happening, we should also skip --- the INSERT if that delete is part of UPDATE=>DELETE+INSERT. -CREATE OR REPLACE FUNCTION func_parted_mod_b() returns trigger as $$ -BEGIN - raise notice 'Trigger: Got OLD row %, but returning NULL', OLD; - return NULL; -END $$ LANGUAGE plpgsql; -CREATE TRIGGER trig_skip_delete before delete on sub_part2 - for each row execute procedure func_parted_mod_b(); -UPDATE list_parted set b = 1 WHERE c = 70; -NOTICE: Trigger: Got OLD row (2,70,1), but returning NULL -SELECT tableoid::regclass::text, * FROM list_parted ORDER BY 1, 2, 3, 4; - tableoid | a | b | c -------------+---+----+---- - list_part1 | 2 | 52 | 50 - list_part1 | 3 | 6 | 60 - sub_part2 | 1 | 2 | 10 - sub_part2 | 1 | 2 | 70 -(4 rows) - --- Drop the trigger. Now the row should be moved. -DROP TRIGGER trig_skip_delete ON sub_part2; -UPDATE list_parted set b = 1 WHERE c = 70; -SELECT tableoid::regclass::text, * FROM list_parted ORDER BY 1, 2, 3, 4; - tableoid | a | b | c -------------+---+----+---- - list_part1 | 2 | 52 | 50 - list_part1 | 3 | 6 | 60 - sub_part1 | 1 | 1 | 70 - sub_part2 | 1 | 2 | 10 -(4 rows) - -DROP FUNCTION func_parted_mod_b(); --- UPDATE partition-key with FROM clause. If join produces multiple output --- rows for the same row to be modified, we should tuple-route the row only --- once. There should not be any rows inserted. -CREATE TABLE non_parted (id int); -INSERT into non_parted VALUES (1), (1), (1), (2), (2), (2), (3), (3), (3); -UPDATE list_parted t1 set a = 2 FROM non_parted t2 WHERE t1.a = t2.id and a = 1; -SELECT tableoid::regclass::text, * FROM list_parted ORDER BY 1, 2, 3, 4; - tableoid | a | b | c -------------+---+----+---- - list_part1 | 2 | 1 | 70 - list_part1 | 2 | 2 | 10 - list_part1 | 2 | 52 | 50 - list_part1 | 3 | 6 | 60 -(4 rows) - -DROP TABLE non_parted; --- Cleanup: list_parted no longer needed. -DROP TABLE list_parted; --- create custom operator class and hash function, for the same reason --- explained in alter_table.sql -create or replace function dummy_hashint4(a int4, seed int8) returns int8 as -$$ begin return (a + seed); end; $$ language 'plpgsql' immutable; -create operator class custom_opclass for type int4 using hash as -operator 1 = , function 2 dummy_hashint4(int4, int8); -create table hash_parted ( - a int, - b int -) partition by hash (a custom_opclass, b custom_opclass); -create table hpart1 partition of hash_parted for values with (modulus 2, remainder 1); -create table hpart2 partition of hash_parted for values with (modulus 4, remainder 2); -create table hpart3 partition of hash_parted for values with (modulus 8, remainder 0); -create table hpart4 partition of hash_parted for values with (modulus 8, remainder 4); -insert into hpart1 values (1, 1); -insert into hpart2 values (2, 5); -insert into hpart4 values (3, 4); --- fail -update hpart1 set a = 3, b=4 where a = 1; -ERROR: new row for relation "hpart1" violates partition constraint -DETAIL: Failing row contains (3, 4). --- ok, row movement -update hash_parted set b = b - 1 where b = 1; --- ok -update hash_parted set b = b + 8 where b = 1; --- cleanup -drop table hash_parted; -drop operator class custom_opclass using hash; -drop function dummy_hashint4(a int4, seed int8); +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/delete.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/delete.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/delete.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/delete.out 2023-02-20 19:45:46.919211068 -0500 @@ -1,33 +1 @@ -CREATE TABLE delete_test ( - id SERIAL PRIMARY KEY, - a INT, - b text -); -INSERT INTO delete_test (a) VALUES (10); -INSERT INTO delete_test (a, b) VALUES (50, repeat('x', 10000)); -INSERT INTO delete_test (a) VALUES (100); --- allow an alias to be specified for DELETE's target table -DELETE FROM delete_test AS dt WHERE dt.a > 75; --- if an alias is specified, don't allow the original table name --- to be referenced -DELETE FROM delete_test dt WHERE delete_test.a > 25; -ERROR: invalid reference to FROM-clause entry for table "delete_test" -LINE 1: DELETE FROM delete_test dt WHERE delete_test.a > 25; - ^ -HINT: Perhaps you meant to reference the table alias "dt". -SELECT id, a, char_length(b) FROM delete_test; - id | a | char_length -----+----+------------- - 1 | 10 | - 2 | 50 | 10000 -(2 rows) - --- delete a row with a TOASTed value -DELETE FROM delete_test WHERE a > 25; -SELECT id, a, char_length(b) FROM delete_test; - id | a | char_length -----+----+------------- - 1 | 10 | -(1 row) - -DROP TABLE delete_test; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/namespace.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/namespace.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/namespace.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/namespace.out 2023-02-20 19:45:46.909211068 -0500 @@ -1,71 +1 @@ --- --- Regression tests for schemas (namespaces) --- -CREATE SCHEMA test_ns_schema_1 - CREATE UNIQUE INDEX abc_a_idx ON abc (a) - CREATE VIEW abc_view AS - SELECT a+1 AS a, b+1 AS b FROM abc - CREATE TABLE abc ( - a serial, - b int UNIQUE - ); --- verify that the objects were created -SELECT COUNT(*) FROM pg_class WHERE relnamespace = - (SELECT oid FROM pg_namespace WHERE nspname = 'test_ns_schema_1'); - count -------- - 5 -(1 row) - -INSERT INTO test_ns_schema_1.abc DEFAULT VALUES; -INSERT INTO test_ns_schema_1.abc DEFAULT VALUES; -INSERT INTO test_ns_schema_1.abc DEFAULT VALUES; -SELECT * FROM test_ns_schema_1.abc; - a | b ----+--- - 1 | - 2 | - 3 | -(3 rows) - -SELECT * FROM test_ns_schema_1.abc_view; - a | b ----+--- - 2 | - 3 | - 4 | -(3 rows) - -ALTER SCHEMA test_ns_schema_1 RENAME TO test_ns_schema_renamed; -SELECT COUNT(*) FROM pg_class WHERE relnamespace = - (SELECT oid FROM pg_namespace WHERE nspname = 'test_ns_schema_1'); - count -------- - 0 -(1 row) - --- test IF NOT EXISTS cases -CREATE SCHEMA test_ns_schema_renamed; -- fail, already exists -ERROR: schema "test_ns_schema_renamed" already exists -CREATE SCHEMA IF NOT EXISTS test_ns_schema_renamed; -- ok with notice -NOTICE: schema "test_ns_schema_renamed" already exists, skipping -CREATE SCHEMA IF NOT EXISTS test_ns_schema_renamed -- fail, disallowed - CREATE TABLE abc ( - a serial, - b int UNIQUE - ); -ERROR: CREATE SCHEMA IF NOT EXISTS cannot include schema elements -LINE 2: CREATE TABLE abc ( - ^ -DROP SCHEMA test_ns_schema_renamed CASCADE; -NOTICE: drop cascades to 2 other objects -DETAIL: drop cascades to table test_ns_schema_renamed.abc -drop cascades to view test_ns_schema_renamed.abc_view --- verify that the objects were dropped -SELECT COUNT(*) FROM pg_class WHERE relnamespace = - (SELECT oid FROM pg_namespace WHERE nspname = 'test_ns_schema_renamed'); - count -------- - 0 -(1 row) - +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/prepared_xacts_1.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/prepared_xacts.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/prepared_xacts_1.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/prepared_xacts.out 2023-02-20 19:45:46.909211068 -0500 @@ -1,266 +1 @@ --- --- PREPARED TRANSACTIONS (two-phase commit) --- --- We can't readily test persistence of prepared xacts within the --- regression script framework, unfortunately. Note that a crash --- isn't really needed ... stopping and starting the postmaster would --- be enough, but we can't even do that here. --- create a simple table that we'll use in the tests -CREATE TABLE pxtest1 (foobar VARCHAR(10)); -INSERT INTO pxtest1 VALUES ('aaa'); --- Test PREPARE TRANSACTION -BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; -UPDATE pxtest1 SET foobar = 'bbb' WHERE foobar = 'aaa'; -SELECT * FROM pxtest1; - foobar --------- - bbb -(1 row) - -PREPARE TRANSACTION 'foo1'; -ERROR: prepared transactions are disabled -HINT: Set max_prepared_transactions to a nonzero value. -SELECT * FROM pxtest1; - foobar --------- - aaa -(1 row) - --- Test pg_prepared_xacts system view -SELECT gid FROM pg_prepared_xacts; - gid ------ -(0 rows) - --- Test ROLLBACK PREPARED -ROLLBACK PREPARED 'foo1'; -ERROR: prepared transaction with identifier "foo1" does not exist -SELECT * FROM pxtest1; - foobar --------- - aaa -(1 row) - -SELECT gid FROM pg_prepared_xacts; - gid ------ -(0 rows) - --- Test COMMIT PREPARED -BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; -INSERT INTO pxtest1 VALUES ('ddd'); -SELECT * FROM pxtest1; - foobar --------- - aaa - ddd -(2 rows) - -PREPARE TRANSACTION 'foo2'; -ERROR: prepared transactions are disabled -HINT: Set max_prepared_transactions to a nonzero value. -SELECT * FROM pxtest1; - foobar --------- - aaa -(1 row) - -COMMIT PREPARED 'foo2'; -ERROR: prepared transaction with identifier "foo2" does not exist -SELECT * FROM pxtest1; - foobar --------- - aaa -(1 row) - --- Test duplicate gids -BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; -UPDATE pxtest1 SET foobar = 'eee' WHERE foobar = 'ddd'; -SELECT * FROM pxtest1; - foobar --------- - aaa -(1 row) - -PREPARE TRANSACTION 'foo3'; -ERROR: prepared transactions are disabled -HINT: Set max_prepared_transactions to a nonzero value. -SELECT gid FROM pg_prepared_xacts; - gid ------ -(0 rows) - -BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; -INSERT INTO pxtest1 VALUES ('fff'); --- This should fail, because the gid foo3 is already in use -PREPARE TRANSACTION 'foo3'; -ERROR: prepared transactions are disabled -HINT: Set max_prepared_transactions to a nonzero value. -SELECT * FROM pxtest1; - foobar --------- - aaa -(1 row) - -ROLLBACK PREPARED 'foo3'; -ERROR: prepared transaction with identifier "foo3" does not exist -SELECT * FROM pxtest1; - foobar --------- - aaa -(1 row) - --- Test serialization failure (SSI) -BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; -UPDATE pxtest1 SET foobar = 'eee' WHERE foobar = 'ddd'; -SELECT * FROM pxtest1; - foobar --------- - aaa -(1 row) - -PREPARE TRANSACTION 'foo4'; -ERROR: prepared transactions are disabled -HINT: Set max_prepared_transactions to a nonzero value. -SELECT gid FROM pg_prepared_xacts; - gid ------ -(0 rows) - -BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; -SELECT * FROM pxtest1; - foobar --------- - aaa -(1 row) - --- This should fail, because the two transactions have a write-skew anomaly -INSERT INTO pxtest1 VALUES ('fff'); -PREPARE TRANSACTION 'foo5'; -ERROR: prepared transactions are disabled -HINT: Set max_prepared_transactions to a nonzero value. -SELECT gid FROM pg_prepared_xacts; - gid ------ -(0 rows) - -ROLLBACK PREPARED 'foo4'; -ERROR: prepared transaction with identifier "foo4" does not exist -SELECT gid FROM pg_prepared_xacts; - gid ------ -(0 rows) - --- Clean up -DROP TABLE pxtest1; --- Test detection of session-level and xact-level locks on same object -BEGIN; -SELECT pg_advisory_lock(1); - pg_advisory_lock ------------------- - -(1 row) - -SELECT pg_advisory_xact_lock_shared(1); - pg_advisory_xact_lock_shared ------------------------------- - -(1 row) - -PREPARE TRANSACTION 'foo6'; -- fails -ERROR: prepared transactions are disabled -HINT: Set max_prepared_transactions to a nonzero value. --- Test subtransactions -BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; - CREATE TABLE pxtest2 (a int); - INSERT INTO pxtest2 VALUES (1); - SAVEPOINT a; - INSERT INTO pxtest2 VALUES (2); - ROLLBACK TO a; - SAVEPOINT b; - INSERT INTO pxtest2 VALUES (3); -PREPARE TRANSACTION 'regress-one'; -ERROR: prepared transactions are disabled -HINT: Set max_prepared_transactions to a nonzero value. -CREATE TABLE pxtest3(fff int); --- Test shared invalidation -BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; - DROP TABLE pxtest3; - CREATE TABLE pxtest4 (a int); - INSERT INTO pxtest4 VALUES (1); - INSERT INTO pxtest4 VALUES (2); - DECLARE foo CURSOR FOR SELECT * FROM pxtest4; - -- Fetch 1 tuple, keeping the cursor open - FETCH 1 FROM foo; - a ---- - 1 -(1 row) - -PREPARE TRANSACTION 'regress-two'; -ERROR: prepared transactions are disabled -HINT: Set max_prepared_transactions to a nonzero value. --- No such cursor -FETCH 1 FROM foo; -ERROR: cursor "foo" does not exist --- Table doesn't exist, the creation hasn't been committed yet -SELECT * FROM pxtest2; -ERROR: relation "pxtest2" does not exist -LINE 1: SELECT * FROM pxtest2; - ^ --- There should be two prepared transactions -SELECT gid FROM pg_prepared_xacts; - gid ------ -(0 rows) - --- pxtest3 should be locked because of the pending DROP -begin; -lock table pxtest3 in access share mode nowait; -rollback; --- Disconnect, we will continue testing in a different backend -\c - --- There should still be two prepared transactions -SELECT gid FROM pg_prepared_xacts; - gid ------ -(0 rows) - --- pxtest3 should still be locked because of the pending DROP -begin; -lock table pxtest3 in access share mode nowait; -rollback; --- Commit table creation -COMMIT PREPARED 'regress-one'; -ERROR: prepared transaction with identifier "regress-one" does not exist -\d pxtest2 -SELECT * FROM pxtest2; -ERROR: relation "pxtest2" does not exist -LINE 1: SELECT * FROM pxtest2; - ^ --- There should be one prepared transaction -SELECT gid FROM pg_prepared_xacts; - gid ------ -(0 rows) - --- Commit table drop -COMMIT PREPARED 'regress-two'; -ERROR: prepared transaction with identifier "regress-two" does not exist -SELECT * FROM pxtest3; - fff ------ -(0 rows) - --- There should be no prepared transactions -SELECT gid FROM pg_prepared_xacts; - gid ------ -(0 rows) - --- Clean up -DROP TABLE pxtest2; -ERROR: table "pxtest2" does not exist -DROP TABLE pxtest3; -- will still be there if prepared xacts are disabled -DROP TABLE pxtest4; -ERROR: table "pxtest4" does not exist +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/brin.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/brin.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/brin.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/brin.out 2023-02-20 19:46:20.889212526 -0500 @@ -539,31 +539,10 @@ -- vacuum actually removes the TOAST rows. Creating an index concurrently -- is a one way to achieve that, because it does exactly such wait. CREATE INDEX CONCURRENTLY brin_test_temp_idx ON brintest_3(a); -DROP INDEX brin_test_temp_idx; --- vacuum the table, to discard TOAST data -VACUUM brintest_3; --- retry insert with a different random-looking (but deterministic) value --- the value is different, and so should replace either min or max in the --- brin summary -WITH rand_value AS (SELECT string_agg(md5((-i)::text),'') AS val FROM generate_series(1,60) s(i)) -INSERT INTO brintest_3 -SELECT val, val, val, val FROM rand_value; --- now try some queries, accessing the brin index -SET enable_seqscan = off; -EXPLAIN (COSTS OFF) -SELECT * FROM brintest_3 WHERE b < '0'; - QUERY PLAN ------------------------------------------------- - Bitmap Heap Scan on brintest_3 - Recheck Cond: (b < '0'::text) - -> Bitmap Index Scan on brin_test_toast_idx - Index Cond: (b < '0'::text) -(4 rows) - -SELECT * FROM brintest_3 WHERE b < '0'; - a | b | c | d ----+---+---+--- -(0 rows) - -DROP TABLE brintest_3; -RESET enable_seqscan; +WARNING: terminating connection because of crash of another server process +DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory. +HINT: In a moment you should be able to reconnect to the database and repeat your command. +server closed the connection unexpectedly + This probably means the server terminated abnormally + before or while processing the request. +connection to server was lost diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/gin.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/gin.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/gin.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/gin.out 2023-02-20 19:46:20.849212524 -0500 @@ -185,106 +185,7 @@ lateral explain_query_json($$select * from t_gin_test_tbl where $$ || query) js, lateral execute_text_query_index($$select string_agg((i, j)::text, ' ') from t_gin_test_tbl where $$ || query) res_index, lateral execute_text_query_heap($$select string_agg((i, j)::text, ' ') from t_gin_test_tbl where $$ || query) res_heap; - query | return by index | removed by recheck | match --------------------------------------------+-----------------+--------------------+------- - i @> '{}' | 7 | 0 | t - j @> '{}' | 6 | 0 | t - i @> '{}' and j @> '{}' | 4 | 0 | t - i @> '{1}' | 5 | 0 | t - i @> '{1}' and j @> '{}' | 3 | 0 | t - i @> '{1}' and i @> '{}' and j @> '{}' | 3 | 0 | t - j @> '{10}' | 4 | 0 | t - j @> '{10}' and i @> '{}' | 3 | 0 | t - j @> '{10}' and j @> '{}' and i @> '{}' | 3 | 0 | t - i @> '{1}' and j @> '{10}' | 2 | 0 | t -(10 rows) - -reset enable_seqscan; -reset enable_bitmapscan; --- re-purpose t_gin_test_tbl to test scans involving posting trees -insert into t_gin_test_tbl select array[1, g, g/10], array[2, g, g/10] - from generate_series(1, 20000) g; -select gin_clean_pending_list('t_gin_test_tbl_i_j_idx') is not null; - ?column? ----------- - t -(1 row) - -analyze t_gin_test_tbl; -set enable_seqscan = off; -set enable_bitmapscan = on; -explain (costs off) -select count(*) from t_gin_test_tbl where j @> array[50]; - QUERY PLAN ---------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on t_gin_test_tbl - Recheck Cond: (j @> '{50}'::integer[]) - -> Bitmap Index Scan on t_gin_test_tbl_i_j_idx - Index Cond: (j @> '{50}'::integer[]) -(5 rows) - -select count(*) from t_gin_test_tbl where j @> array[50]; - count -------- - 11 -(1 row) - -explain (costs off) -select count(*) from t_gin_test_tbl where j @> array[2]; - QUERY PLAN ---------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on t_gin_test_tbl - Recheck Cond: (j @> '{2}'::integer[]) - -> Bitmap Index Scan on t_gin_test_tbl_i_j_idx - Index Cond: (j @> '{2}'::integer[]) -(5 rows) - -select count(*) from t_gin_test_tbl where j @> array[2]; - count -------- - 20000 -(1 row) - -explain (costs off) -select count(*) from t_gin_test_tbl where j @> '{}'::int[]; - QUERY PLAN ---------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on t_gin_test_tbl - Recheck Cond: (j @> '{}'::integer[]) - -> Bitmap Index Scan on t_gin_test_tbl_i_j_idx - Index Cond: (j @> '{}'::integer[]) -(5 rows) - -select count(*) from t_gin_test_tbl where j @> '{}'::int[]; - count -------- - 20006 -(1 row) - --- test vacuuming of posting trees -delete from t_gin_test_tbl where j @> array[2]; -vacuum t_gin_test_tbl; -select count(*) from t_gin_test_tbl where j @> array[50]; - count -------- - 0 -(1 row) - -select count(*) from t_gin_test_tbl where j @> array[2]; - count -------- - 0 -(1 row) - -select count(*) from t_gin_test_tbl where j @> '{}'::int[]; - count -------- - 6 -(1 row) - -reset enable_seqscan; -reset enable_bitmapscan; -drop table t_gin_test_tbl; +server closed the connection unexpectedly + This probably means the server terminated abnormally + before or while processing the request. +connection to server was lost diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/privileges.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/privileges.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/privileges.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/privileges.out 2023-02-20 19:46:20.889212526 -0500 @@ -445,14 +445,18 @@ union all (select b.q2 as x from int8_tbl b offset 0)) ss where false; -ERROR: permission denied for table int8_tbl +ERROR: relation "int8_tbl" does not exist +LINE 2: ((select a.q1 as x from int8_tbl a offset 0) + ^ set constraint_exclusion = on; select * from ((select a.q1 as x, random() from int8_tbl a where q1 > 0) union all (select b.q2 as x, random() from int8_tbl b where q2 > 0)) ss where x < 0; -ERROR: permission denied for table int8_tbl +ERROR: relation "int8_tbl" does not exist +LINE 2: ((select a.q1 as x, random() from int8_tbl a where q1 > 0) + ^ reset constraint_exclusion; CREATE VIEW atestv4 AS SELECT * FROM atestv3; -- nested view SELECT * FROM atestv4; -- ok @@ -1493,1001 +1497,10 @@ -- Do the same concurrently CREATE INDEX CONCURRENTLY sro_idx ON sro_tab ((sro_ifun(a) + sro_ifun(0))) WHERE sro_ifun(a + 10) > sro_ifun(10); --- REINDEX -REINDEX TABLE sro_tab; -REINDEX INDEX sro_idx; -REINDEX TABLE CONCURRENTLY sro_tab; -DROP INDEX sro_idx; --- CLUSTER -CREATE INDEX sro_cluster_idx ON sro_tab ((sro_ifun(a) + sro_ifun(0))); -CLUSTER sro_tab USING sro_cluster_idx; -DROP INDEX sro_cluster_idx; --- BRIN index -CREATE INDEX sro_brin ON sro_tab USING brin ((sro_ifun(a) + sro_ifun(0))); -SELECT brin_desummarize_range('sro_brin', 0); - brin_desummarize_range ------------------------- - -(1 row) - -SELECT brin_summarize_range('sro_brin', 0); - brin_summarize_range ----------------------- - 1 -(1 row) - -DROP TABLE sro_tab; --- Check with a partitioned table -CREATE TABLE sro_ptab (a int) PARTITION BY RANGE (a); -ALTER TABLE sro_ptab OWNER TO regress_sro_user; -CREATE TABLE sro_part PARTITION OF sro_ptab FOR VALUES FROM (1) TO (10); -ALTER TABLE sro_part OWNER TO regress_sro_user; -INSERT INTO sro_ptab VALUES (1), (2), (3); -CREATE INDEX sro_pidx ON sro_ptab ((sro_ifun(a) + sro_ifun(0))) - WHERE sro_ifun(a + 10) > sro_ifun(10); -REINDEX TABLE sro_ptab; -REINDEX INDEX CONCURRENTLY sro_pidx; -SET SESSION AUTHORIZATION regress_sro_user; -CREATE FUNCTION unwanted_grant() RETURNS void LANGUAGE sql AS - 'GRANT regress_priv_group2 TO regress_sro_user'; -CREATE FUNCTION mv_action() RETURNS bool LANGUAGE sql AS - 'DECLARE c CURSOR WITH HOLD FOR SELECT unwanted_grant(); SELECT true'; --- REFRESH of this MV will queue a GRANT at end of transaction -CREATE MATERIALIZED VIEW sro_mv AS SELECT mv_action() WITH NO DATA; -REFRESH MATERIALIZED VIEW sro_mv; -ERROR: cannot create a cursor WITH HOLD within security-restricted operation -CONTEXT: SQL function "mv_action" statement 1 -\c - -REFRESH MATERIALIZED VIEW sro_mv; -ERROR: cannot create a cursor WITH HOLD within security-restricted operation -CONTEXT: SQL function "mv_action" statement 1 -SET SESSION AUTHORIZATION regress_sro_user; --- INSERT to this table will queue a GRANT at end of transaction -CREATE TABLE sro_trojan_table (); -CREATE FUNCTION sro_trojan() RETURNS trigger LANGUAGE plpgsql AS - 'BEGIN PERFORM unwanted_grant(); RETURN NULL; END'; -CREATE CONSTRAINT TRIGGER t AFTER INSERT ON sro_trojan_table - INITIALLY DEFERRED FOR EACH ROW EXECUTE PROCEDURE sro_trojan(); --- Now, REFRESH will issue such an INSERT, queueing the GRANT -CREATE OR REPLACE FUNCTION mv_action() RETURNS bool LANGUAGE sql AS - 'INSERT INTO sro_trojan_table DEFAULT VALUES; SELECT true'; -REFRESH MATERIALIZED VIEW sro_mv; -ERROR: cannot fire deferred trigger within security-restricted operation -CONTEXT: SQL function "mv_action" statement 1 -\c - -REFRESH MATERIALIZED VIEW sro_mv; -ERROR: cannot fire deferred trigger within security-restricted operation -CONTEXT: SQL function "mv_action" statement 1 -BEGIN; SET CONSTRAINTS ALL IMMEDIATE; REFRESH MATERIALIZED VIEW sro_mv; COMMIT; -ERROR: must have admin option on role "regress_priv_group2" -CONTEXT: SQL function "unwanted_grant" statement 1 -SQL statement "SELECT unwanted_grant()" -PL/pgSQL function sro_trojan() line 1 at PERFORM -SQL function "mv_action" statement 1 --- REFRESH MATERIALIZED VIEW CONCURRENTLY use of eval_const_expressions() -SET SESSION AUTHORIZATION regress_sro_user; -CREATE FUNCTION unwanted_grant_nofail(int) RETURNS int - IMMUTABLE LANGUAGE plpgsql AS $$ -BEGIN - PERFORM unwanted_grant(); - RAISE WARNING 'owned'; - RETURN 1; -EXCEPTION WHEN OTHERS THEN - RETURN 2; -END$$; -CREATE MATERIALIZED VIEW sro_index_mv AS SELECT 1 AS c; -CREATE UNIQUE INDEX ON sro_index_mv (c) WHERE unwanted_grant_nofail(1) > 0; -\c - -REFRESH MATERIALIZED VIEW CONCURRENTLY sro_index_mv; -REFRESH MATERIALIZED VIEW sro_index_mv; -DROP OWNED BY regress_sro_user; -DROP ROLE regress_sro_user; --- Admin options -SET SESSION AUTHORIZATION regress_priv_user4; -CREATE FUNCTION dogrant_ok() RETURNS void LANGUAGE sql SECURITY DEFINER AS - 'GRANT regress_priv_group2 TO regress_priv_user5'; -GRANT regress_priv_group2 TO regress_priv_user5; -- ok: had ADMIN OPTION -SET ROLE regress_priv_group2; -GRANT regress_priv_group2 TO regress_priv_user5; -- fails: SET ROLE suspended privilege -ERROR: must have admin option on role "regress_priv_group2" -SET SESSION AUTHORIZATION regress_priv_user1; -GRANT regress_priv_group2 TO regress_priv_user5; -- fails: no ADMIN OPTION -ERROR: must have admin option on role "regress_priv_group2" -SELECT dogrant_ok(); -- ok: SECURITY DEFINER conveys ADMIN -NOTICE: role "regress_priv_user5" is already a member of role "regress_priv_group2" - dogrant_ok ------------- - -(1 row) - -SET ROLE regress_priv_group2; -GRANT regress_priv_group2 TO regress_priv_user5; -- fails: SET ROLE did not help -ERROR: must have admin option on role "regress_priv_group2" -SET SESSION AUTHORIZATION regress_priv_group2; -GRANT regress_priv_group2 TO regress_priv_user5; -- ok: a role can self-admin -NOTICE: role "regress_priv_user5" is already a member of role "regress_priv_group2" -CREATE FUNCTION dogrant_fails() RETURNS void LANGUAGE sql SECURITY DEFINER AS - 'GRANT regress_priv_group2 TO regress_priv_user5'; -SELECT dogrant_fails(); -- fails: no self-admin in SECURITY DEFINER -ERROR: must have admin option on role "regress_priv_group2" -CONTEXT: SQL function "dogrant_fails" statement 1 -DROP FUNCTION dogrant_fails(); -SET SESSION AUTHORIZATION regress_priv_user4; -DROP FUNCTION dogrant_ok(); -REVOKE regress_priv_group2 FROM regress_priv_user5; --- has_sequence_privilege tests -\c - -CREATE SEQUENCE x_seq; -GRANT USAGE on x_seq to regress_priv_user2; -SELECT has_sequence_privilege('regress_priv_user1', 'atest1', 'SELECT'); -ERROR: "atest1" is not a sequence -SELECT has_sequence_privilege('regress_priv_user1', 'x_seq', 'INSERT'); -ERROR: unrecognized privilege type: "INSERT" -SELECT has_sequence_privilege('regress_priv_user1', 'x_seq', 'SELECT'); - has_sequence_privilege ------------------------- - f -(1 row) - -SET SESSION AUTHORIZATION regress_priv_user2; -SELECT has_sequence_privilege('x_seq', 'USAGE'); - has_sequence_privilege ------------------------- - t -(1 row) - --- largeobject privilege tests -\c - -SET SESSION AUTHORIZATION regress_priv_user1; -SELECT lo_create(1001); - lo_create ------------ - 1001 -(1 row) - -SELECT lo_create(1002); - lo_create ------------ - 1002 -(1 row) - -SELECT lo_create(1003); - lo_create ------------ - 1003 -(1 row) - -SELECT lo_create(1004); - lo_create ------------ - 1004 -(1 row) - -SELECT lo_create(1005); - lo_create ------------ - 1005 -(1 row) - -GRANT ALL ON LARGE OBJECT 1001 TO PUBLIC; -GRANT SELECT ON LARGE OBJECT 1003 TO regress_priv_user2; -GRANT SELECT,UPDATE ON LARGE OBJECT 1004 TO regress_priv_user2; -GRANT ALL ON LARGE OBJECT 1005 TO regress_priv_user2; -GRANT SELECT ON LARGE OBJECT 1005 TO regress_priv_user2 WITH GRANT OPTION; -GRANT SELECT, INSERT ON LARGE OBJECT 1001 TO PUBLIC; -- to be failed -ERROR: invalid privilege type INSERT for large object -GRANT SELECT, UPDATE ON LARGE OBJECT 1001 TO nosuchuser; -- to be failed -ERROR: role "nosuchuser" does not exist -GRANT SELECT, UPDATE ON LARGE OBJECT 999 TO PUBLIC; -- to be failed -ERROR: large object 999 does not exist -\c - -SET SESSION AUTHORIZATION regress_priv_user2; -SELECT lo_create(2001); - lo_create ------------ - 2001 -(1 row) - -SELECT lo_create(2002); - lo_create ------------ - 2002 -(1 row) - -SELECT loread(lo_open(1001, x'20000'::int), 32); -- allowed, for now - loread --------- - \x -(1 row) - -SELECT lowrite(lo_open(1001, x'40000'::int), 'abcd'); -- fail, wrong mode -ERROR: large object descriptor 0 was not opened for writing -SELECT loread(lo_open(1001, x'40000'::int), 32); - loread --------- - \x -(1 row) - -SELECT loread(lo_open(1002, x'40000'::int), 32); -- to be denied -ERROR: permission denied for large object 1002 -SELECT loread(lo_open(1003, x'40000'::int), 32); - loread --------- - \x -(1 row) - -SELECT loread(lo_open(1004, x'40000'::int), 32); - loread --------- - \x -(1 row) - -SELECT lowrite(lo_open(1001, x'20000'::int), 'abcd'); - lowrite ---------- - 4 -(1 row) - -SELECT lowrite(lo_open(1002, x'20000'::int), 'abcd'); -- to be denied -ERROR: permission denied for large object 1002 -SELECT lowrite(lo_open(1003, x'20000'::int), 'abcd'); -- to be denied -ERROR: permission denied for large object 1003 -SELECT lowrite(lo_open(1004, x'20000'::int), 'abcd'); - lowrite ---------- - 4 -(1 row) - -GRANT SELECT ON LARGE OBJECT 1005 TO regress_priv_user3; -GRANT UPDATE ON LARGE OBJECT 1006 TO regress_priv_user3; -- to be denied -ERROR: large object 1006 does not exist -REVOKE ALL ON LARGE OBJECT 2001, 2002 FROM PUBLIC; -GRANT ALL ON LARGE OBJECT 2001 TO regress_priv_user3; -SELECT lo_unlink(1001); -- to be denied -ERROR: must be owner of large object 1001 -SELECT lo_unlink(2002); - lo_unlink ------------ - 1 -(1 row) - -\c - --- confirm ACL setting -SELECT oid, pg_get_userbyid(lomowner) ownername, lomacl FROM pg_largeobject_metadata WHERE oid >= 1000 AND oid < 3000 ORDER BY oid; - oid | ownername | lomacl -------+--------------------+------------------------------------------------------------------------------------------------------------------------------ - 1001 | regress_priv_user1 | {regress_priv_user1=rw/regress_priv_user1,=rw/regress_priv_user1} - 1002 | regress_priv_user1 | - 1003 | regress_priv_user1 | {regress_priv_user1=rw/regress_priv_user1,regress_priv_user2=r/regress_priv_user1} - 1004 | regress_priv_user1 | {regress_priv_user1=rw/regress_priv_user1,regress_priv_user2=rw/regress_priv_user1} - 1005 | regress_priv_user1 | {regress_priv_user1=rw/regress_priv_user1,regress_priv_user2=r*w/regress_priv_user1,regress_priv_user3=r/regress_priv_user2} - 2001 | regress_priv_user2 | {regress_priv_user2=rw/regress_priv_user2,regress_priv_user3=rw/regress_priv_user2} -(6 rows) - -SET SESSION AUTHORIZATION regress_priv_user3; -SELECT loread(lo_open(1001, x'40000'::int), 32); - loread ------------- - \x61626364 -(1 row) - -SELECT loread(lo_open(1003, x'40000'::int), 32); -- to be denied -ERROR: permission denied for large object 1003 -SELECT loread(lo_open(1005, x'40000'::int), 32); - loread --------- - \x -(1 row) - -SELECT lo_truncate(lo_open(1005, x'20000'::int), 10); -- to be denied -ERROR: permission denied for large object 1005 -SELECT lo_truncate(lo_open(2001, x'20000'::int), 10); - lo_truncate -------------- - 0 -(1 row) - --- compatibility mode in largeobject permission -\c - -SET lo_compat_privileges = false; -- default setting -SET SESSION AUTHORIZATION regress_priv_user4; -SELECT loread(lo_open(1002, x'40000'::int), 32); -- to be denied -ERROR: permission denied for large object 1002 -SELECT lowrite(lo_open(1002, x'20000'::int), 'abcd'); -- to be denied -ERROR: permission denied for large object 1002 -SELECT lo_truncate(lo_open(1002, x'20000'::int), 10); -- to be denied -ERROR: permission denied for large object 1002 -SELECT lo_put(1002, 1, 'abcd'); -- to be denied -ERROR: permission denied for large object 1002 -SELECT lo_unlink(1002); -- to be denied -ERROR: must be owner of large object 1002 -SELECT lo_export(1001, '/dev/null'); -- to be denied -ERROR: permission denied for function lo_export -SELECT lo_import('/dev/null'); -- to be denied -ERROR: permission denied for function lo_import -SELECT lo_import('/dev/null', 2003); -- to be denied -ERROR: permission denied for function lo_import -\c - -SET lo_compat_privileges = true; -- compatibility mode -SET SESSION AUTHORIZATION regress_priv_user4; -SELECT loread(lo_open(1002, x'40000'::int), 32); - loread --------- - \x -(1 row) - -SELECT lowrite(lo_open(1002, x'20000'::int), 'abcd'); - lowrite ---------- - 4 -(1 row) - -SELECT lo_truncate(lo_open(1002, x'20000'::int), 10); - lo_truncate -------------- - 0 -(1 row) - -SELECT lo_unlink(1002); - lo_unlink ------------ - 1 -(1 row) - -SELECT lo_export(1001, '/dev/null'); -- to be denied -ERROR: permission denied for function lo_export --- don't allow unpriv users to access pg_largeobject contents -\c - -SELECT * FROM pg_largeobject LIMIT 0; - loid | pageno | data -------+--------+------ -(0 rows) - -SET SESSION AUTHORIZATION regress_priv_user1; -SELECT * FROM pg_largeobject LIMIT 0; -- to be denied -ERROR: permission denied for table pg_largeobject --- test pg_database_owner -RESET SESSION AUTHORIZATION; -GRANT pg_database_owner TO regress_priv_user1; -ERROR: role "pg_database_owner" cannot have explicit members -GRANT regress_priv_user1 TO pg_database_owner; -ERROR: role "pg_database_owner" cannot be a member of any role -CREATE TABLE datdba_only (); -ALTER TABLE datdba_only OWNER TO pg_database_owner; -REVOKE DELETE ON datdba_only FROM pg_database_owner; -SELECT - pg_has_role('regress_priv_user1', 'pg_database_owner', 'USAGE') as priv, - pg_has_role('regress_priv_user1', 'pg_database_owner', 'MEMBER') as mem, - pg_has_role('regress_priv_user1', 'pg_database_owner', - 'MEMBER WITH ADMIN OPTION') as admin; - priv | mem | admin -------+-----+------- - f | f | f -(1 row) - -BEGIN; -DO $$BEGIN EXECUTE format( - 'ALTER DATABASE %I OWNER TO regress_priv_group2', current_catalog); END$$; -SELECT - pg_has_role('regress_priv_user1', 'pg_database_owner', 'USAGE') as priv, - pg_has_role('regress_priv_user1', 'pg_database_owner', 'MEMBER') as mem, - pg_has_role('regress_priv_user1', 'pg_database_owner', - 'MEMBER WITH ADMIN OPTION') as admin; - priv | mem | admin -------+-----+------- - t | t | f -(1 row) - -SET SESSION AUTHORIZATION regress_priv_user1; -TABLE information_schema.enabled_roles ORDER BY role_name COLLATE "C"; - role_name ---------------------- - pg_database_owner - regress_priv_group2 - regress_priv_user1 -(3 rows) - -TABLE information_schema.applicable_roles ORDER BY role_name COLLATE "C"; - grantee | role_name | is_grantable ----------------------+---------------------+-------------- - regress_priv_group2 | pg_database_owner | NO - regress_priv_user1 | regress_priv_group2 | NO -(2 rows) - -INSERT INTO datdba_only DEFAULT VALUES; -SAVEPOINT q; DELETE FROM datdba_only; ROLLBACK TO q; -ERROR: permission denied for table datdba_only -SET SESSION AUTHORIZATION regress_priv_user2; -TABLE information_schema.enabled_roles; - role_name --------------------- - regress_priv_user2 -(1 row) - -INSERT INTO datdba_only DEFAULT VALUES; -ERROR: permission denied for table datdba_only -ROLLBACK; --- test default ACLs -\c - -CREATE SCHEMA testns; -GRANT ALL ON SCHEMA testns TO regress_priv_user1; -CREATE TABLE testns.acltest1 (x int); -SELECT has_table_privilege('regress_priv_user1', 'testns.acltest1', 'SELECT'); -- no - has_table_privilege ---------------------- - f -(1 row) - -SELECT has_table_privilege('regress_priv_user1', 'testns.acltest1', 'INSERT'); -- no - has_table_privilege ---------------------- - f -(1 row) - --- placeholder for test with duplicated schema and role names -ALTER DEFAULT PRIVILEGES IN SCHEMA testns,testns GRANT SELECT ON TABLES TO public,public; -SELECT has_table_privilege('regress_priv_user1', 'testns.acltest1', 'SELECT'); -- no - has_table_privilege ---------------------- - f -(1 row) - -SELECT has_table_privilege('regress_priv_user1', 'testns.acltest1', 'INSERT'); -- no - has_table_privilege ---------------------- - f -(1 row) - -DROP TABLE testns.acltest1; -CREATE TABLE testns.acltest1 (x int); -SELECT has_table_privilege('regress_priv_user1', 'testns.acltest1', 'SELECT'); -- yes - has_table_privilege ---------------------- - t -(1 row) - -SELECT has_table_privilege('regress_priv_user1', 'testns.acltest1', 'INSERT'); -- no - has_table_privilege ---------------------- - f -(1 row) - -ALTER DEFAULT PRIVILEGES IN SCHEMA testns GRANT INSERT ON TABLES TO regress_priv_user1; -DROP TABLE testns.acltest1; -CREATE TABLE testns.acltest1 (x int); -SELECT has_table_privilege('regress_priv_user1', 'testns.acltest1', 'SELECT'); -- yes - has_table_privilege ---------------------- - t -(1 row) - -SELECT has_table_privilege('regress_priv_user1', 'testns.acltest1', 'INSERT'); -- yes - has_table_privilege ---------------------- - t -(1 row) - -ALTER DEFAULT PRIVILEGES IN SCHEMA testns REVOKE INSERT ON TABLES FROM regress_priv_user1; -DROP TABLE testns.acltest1; -CREATE TABLE testns.acltest1 (x int); -SELECT has_table_privilege('regress_priv_user1', 'testns.acltest1', 'SELECT'); -- yes - has_table_privilege ---------------------- - t -(1 row) - -SELECT has_table_privilege('regress_priv_user1', 'testns.acltest1', 'INSERT'); -- no - has_table_privilege ---------------------- - f -(1 row) - -ALTER DEFAULT PRIVILEGES FOR ROLE regress_priv_user1 REVOKE EXECUTE ON FUNCTIONS FROM public; -ALTER DEFAULT PRIVILEGES IN SCHEMA testns GRANT USAGE ON SCHEMAS TO regress_priv_user2; -- error -ERROR: cannot use IN SCHEMA clause when using GRANT/REVOKE ON SCHEMAS --- --- Testing blanket default grants is very hazardous since it might change --- the privileges attached to objects created by concurrent regression tests. --- To avoid that, be sure to revoke the privileges again before committing. --- -BEGIN; -ALTER DEFAULT PRIVILEGES GRANT USAGE ON SCHEMAS TO regress_priv_user2; -CREATE SCHEMA testns2; -SELECT has_schema_privilege('regress_priv_user2', 'testns2', 'USAGE'); -- yes - has_schema_privilege ----------------------- - t -(1 row) - -SELECT has_schema_privilege('regress_priv_user6', 'testns2', 'USAGE'); -- yes - has_schema_privilege ----------------------- - t -(1 row) - -SELECT has_schema_privilege('regress_priv_user2', 'testns2', 'CREATE'); -- no - has_schema_privilege ----------------------- - f -(1 row) - -ALTER DEFAULT PRIVILEGES REVOKE USAGE ON SCHEMAS FROM regress_priv_user2; -CREATE SCHEMA testns3; -SELECT has_schema_privilege('regress_priv_user2', 'testns3', 'USAGE'); -- no - has_schema_privilege ----------------------- - f -(1 row) - -SELECT has_schema_privilege('regress_priv_user2', 'testns3', 'CREATE'); -- no - has_schema_privilege ----------------------- - f -(1 row) - -ALTER DEFAULT PRIVILEGES GRANT ALL ON SCHEMAS TO regress_priv_user2; -CREATE SCHEMA testns4; -SELECT has_schema_privilege('regress_priv_user2', 'testns4', 'USAGE'); -- yes - has_schema_privilege ----------------------- - t -(1 row) - -SELECT has_schema_privilege('regress_priv_user2', 'testns4', 'CREATE'); -- yes - has_schema_privilege ----------------------- - t -(1 row) - -ALTER DEFAULT PRIVILEGES REVOKE ALL ON SCHEMAS FROM regress_priv_user2; -COMMIT; --- Test for DROP OWNED BY with shared dependencies. This is done in a --- separate, rollbacked, transaction to avoid any trouble with other --- regression sessions. -BEGIN; -ALTER DEFAULT PRIVILEGES GRANT ALL ON FUNCTIONS TO regress_priv_user2; -ALTER DEFAULT PRIVILEGES GRANT ALL ON SCHEMAS TO regress_priv_user2; -ALTER DEFAULT PRIVILEGES GRANT ALL ON SEQUENCES TO regress_priv_user2; -ALTER DEFAULT PRIVILEGES GRANT ALL ON TABLES TO regress_priv_user2; -ALTER DEFAULT PRIVILEGES GRANT ALL ON TYPES TO regress_priv_user2; -SELECT count(*) FROM pg_shdepend - WHERE deptype = 'a' AND - refobjid = 'regress_priv_user2'::regrole AND - classid = 'pg_default_acl'::regclass; - count -------- - 5 -(1 row) - -DROP OWNED BY regress_priv_user2, regress_priv_user2; -SELECT count(*) FROM pg_shdepend - WHERE deptype = 'a' AND - refobjid = 'regress_priv_user2'::regrole AND - classid = 'pg_default_acl'::regclass; - count -------- - 0 -(1 row) - -ROLLBACK; -CREATE SCHEMA testns5; -SELECT has_schema_privilege('regress_priv_user2', 'testns5', 'USAGE'); -- no - has_schema_privilege ----------------------- - f -(1 row) - -SELECT has_schema_privilege('regress_priv_user2', 'testns5', 'CREATE'); -- no - has_schema_privilege ----------------------- - f -(1 row) - -SET ROLE regress_priv_user1; -CREATE FUNCTION testns.foo() RETURNS int AS 'select 1' LANGUAGE sql; -CREATE AGGREGATE testns.agg1(int) (sfunc = int4pl, stype = int4); -CREATE PROCEDURE testns.bar() AS 'select 1' LANGUAGE sql; -SELECT has_function_privilege('regress_priv_user2', 'testns.foo()', 'EXECUTE'); -- no - has_function_privilege ------------------------- - f -(1 row) - -SELECT has_function_privilege('regress_priv_user2', 'testns.agg1(int)', 'EXECUTE'); -- no - has_function_privilege ------------------------- - f -(1 row) - -SELECT has_function_privilege('regress_priv_user2', 'testns.bar()', 'EXECUTE'); -- no - has_function_privilege ------------------------- - f -(1 row) - -ALTER DEFAULT PRIVILEGES IN SCHEMA testns GRANT EXECUTE ON ROUTINES to public; -DROP FUNCTION testns.foo(); -CREATE FUNCTION testns.foo() RETURNS int AS 'select 1' LANGUAGE sql; -DROP AGGREGATE testns.agg1(int); -CREATE AGGREGATE testns.agg1(int) (sfunc = int4pl, stype = int4); -DROP PROCEDURE testns.bar(); -CREATE PROCEDURE testns.bar() AS 'select 1' LANGUAGE sql; -SELECT has_function_privilege('regress_priv_user2', 'testns.foo()', 'EXECUTE'); -- yes - has_function_privilege ------------------------- - t -(1 row) - -SELECT has_function_privilege('regress_priv_user2', 'testns.agg1(int)', 'EXECUTE'); -- yes - has_function_privilege ------------------------- - t -(1 row) - -SELECT has_function_privilege('regress_priv_user2', 'testns.bar()', 'EXECUTE'); -- yes (counts as function here) - has_function_privilege ------------------------- - t -(1 row) - -DROP FUNCTION testns.foo(); -DROP AGGREGATE testns.agg1(int); -DROP PROCEDURE testns.bar(); -ALTER DEFAULT PRIVILEGES FOR ROLE regress_priv_user1 REVOKE USAGE ON TYPES FROM public; -CREATE DOMAIN testns.priv_testdomain1 AS int; -SELECT has_type_privilege('regress_priv_user2', 'testns.priv_testdomain1', 'USAGE'); -- no - has_type_privilege --------------------- - f -(1 row) - -ALTER DEFAULT PRIVILEGES IN SCHEMA testns GRANT USAGE ON TYPES to public; -DROP DOMAIN testns.priv_testdomain1; -CREATE DOMAIN testns.priv_testdomain1 AS int; -SELECT has_type_privilege('regress_priv_user2', 'testns.priv_testdomain1', 'USAGE'); -- yes - has_type_privilege --------------------- - t -(1 row) - -DROP DOMAIN testns.priv_testdomain1; -RESET ROLE; -SELECT count(*) - FROM pg_default_acl d LEFT JOIN pg_namespace n ON defaclnamespace = n.oid - WHERE nspname = 'testns'; - count -------- - 3 -(1 row) - -DROP SCHEMA testns CASCADE; -NOTICE: drop cascades to table testns.acltest1 -DROP SCHEMA testns2 CASCADE; -DROP SCHEMA testns3 CASCADE; -DROP SCHEMA testns4 CASCADE; -DROP SCHEMA testns5 CASCADE; -SELECT d.* -- check that entries went away - FROM pg_default_acl d LEFT JOIN pg_namespace n ON defaclnamespace = n.oid - WHERE nspname IS NULL AND defaclnamespace != 0; - oid | defaclrole | defaclnamespace | defaclobjtype | defaclacl ------+------------+-----------------+---------------+----------- -(0 rows) - --- Grant on all objects of given type in a schema -\c - -CREATE SCHEMA testns; -CREATE TABLE testns.t1 (f1 int); -CREATE TABLE testns.t2 (f1 int); -SELECT has_table_privilege('regress_priv_user1', 'testns.t1', 'SELECT'); -- false - has_table_privilege ---------------------- - f -(1 row) - -GRANT ALL ON ALL TABLES IN SCHEMA testns TO regress_priv_user1; -SELECT has_table_privilege('regress_priv_user1', 'testns.t1', 'SELECT'); -- true - has_table_privilege ---------------------- - t -(1 row) - -SELECT has_table_privilege('regress_priv_user1', 'testns.t2', 'SELECT'); -- true - has_table_privilege ---------------------- - t -(1 row) - -REVOKE ALL ON ALL TABLES IN SCHEMA testns FROM regress_priv_user1; -SELECT has_table_privilege('regress_priv_user1', 'testns.t1', 'SELECT'); -- false - has_table_privilege ---------------------- - f -(1 row) - -SELECT has_table_privilege('regress_priv_user1', 'testns.t2', 'SELECT'); -- false - has_table_privilege ---------------------- - f -(1 row) - -CREATE FUNCTION testns.priv_testfunc(int) RETURNS int AS 'select 3 * $1;' LANGUAGE sql; -CREATE AGGREGATE testns.priv_testagg(int) (sfunc = int4pl, stype = int4); -CREATE PROCEDURE testns.priv_testproc(int) AS 'select 3' LANGUAGE sql; -SELECT has_function_privilege('regress_priv_user1', 'testns.priv_testfunc(int)', 'EXECUTE'); -- true by default - has_function_privilege ------------------------- - t -(1 row) - -SELECT has_function_privilege('regress_priv_user1', 'testns.priv_testagg(int)', 'EXECUTE'); -- true by default - has_function_privilege ------------------------- - t -(1 row) - -SELECT has_function_privilege('regress_priv_user1', 'testns.priv_testproc(int)', 'EXECUTE'); -- true by default - has_function_privilege ------------------------- - t -(1 row) - -REVOKE ALL ON ALL FUNCTIONS IN SCHEMA testns FROM PUBLIC; -SELECT has_function_privilege('regress_priv_user1', 'testns.priv_testfunc(int)', 'EXECUTE'); -- false - has_function_privilege ------------------------- - f -(1 row) - -SELECT has_function_privilege('regress_priv_user1', 'testns.priv_testagg(int)', 'EXECUTE'); -- false - has_function_privilege ------------------------- - f -(1 row) - -SELECT has_function_privilege('regress_priv_user1', 'testns.priv_testproc(int)', 'EXECUTE'); -- still true, not a function - has_function_privilege ------------------------- - t -(1 row) - -REVOKE ALL ON ALL PROCEDURES IN SCHEMA testns FROM PUBLIC; -SELECT has_function_privilege('regress_priv_user1', 'testns.priv_testproc(int)', 'EXECUTE'); -- now false - has_function_privilege ------------------------- - f -(1 row) - -GRANT ALL ON ALL ROUTINES IN SCHEMA testns TO PUBLIC; -SELECT has_function_privilege('regress_priv_user1', 'testns.priv_testfunc(int)', 'EXECUTE'); -- true - has_function_privilege ------------------------- - t -(1 row) - -SELECT has_function_privilege('regress_priv_user1', 'testns.priv_testagg(int)', 'EXECUTE'); -- true - has_function_privilege ------------------------- - t -(1 row) - -SELECT has_function_privilege('regress_priv_user1', 'testns.priv_testproc(int)', 'EXECUTE'); -- true - has_function_privilege ------------------------- - t -(1 row) - -DROP SCHEMA testns CASCADE; -NOTICE: drop cascades to 5 other objects -DETAIL: drop cascades to table testns.t1 -drop cascades to table testns.t2 -drop cascades to function testns.priv_testfunc(integer) -drop cascades to function testns.priv_testagg(integer) -drop cascades to function testns.priv_testproc(integer) --- Change owner of the schema & and rename of new schema owner -\c - -CREATE ROLE regress_schemauser1 superuser login; -CREATE ROLE regress_schemauser2 superuser login; -SET SESSION ROLE regress_schemauser1; -CREATE SCHEMA testns; -SELECT nspname, rolname FROM pg_namespace, pg_roles WHERE pg_namespace.nspname = 'testns' AND pg_namespace.nspowner = pg_roles.oid; - nspname | rolname ----------+--------------------- - testns | regress_schemauser1 -(1 row) - -ALTER SCHEMA testns OWNER TO regress_schemauser2; -ALTER ROLE regress_schemauser2 RENAME TO regress_schemauser_renamed; -SELECT nspname, rolname FROM pg_namespace, pg_roles WHERE pg_namespace.nspname = 'testns' AND pg_namespace.nspowner = pg_roles.oid; - nspname | rolname ----------+---------------------------- - testns | regress_schemauser_renamed -(1 row) - -set session role regress_schemauser_renamed; -DROP SCHEMA testns CASCADE; --- clean up -\c - -DROP ROLE regress_schemauser1; -DROP ROLE regress_schemauser_renamed; --- test that dependent privileges are revoked (or not) properly -\c - -set session role regress_priv_user1; -create table dep_priv_test (a int); -grant select on dep_priv_test to regress_priv_user2 with grant option; -grant select on dep_priv_test to regress_priv_user3 with grant option; -set session role regress_priv_user2; -grant select on dep_priv_test to regress_priv_user4 with grant option; -set session role regress_priv_user3; -grant select on dep_priv_test to regress_priv_user4 with grant option; -set session role regress_priv_user4; -grant select on dep_priv_test to regress_priv_user5; -\dp dep_priv_test - Access privileges - Schema | Name | Type | Access privileges | Column privileges | Policies ---------+---------------+-------+-----------------------------------------------+-------------------+---------- - public | dep_priv_test | table | regress_priv_user1=arwdDxt/regress_priv_user1+| | - | | | regress_priv_user2=r*/regress_priv_user1 +| | - | | | regress_priv_user3=r*/regress_priv_user1 +| | - | | | regress_priv_user4=r*/regress_priv_user2 +| | - | | | regress_priv_user4=r*/regress_priv_user3 +| | - | | | regress_priv_user5=r/regress_priv_user4 | | -(1 row) - -set session role regress_priv_user2; -revoke select on dep_priv_test from regress_priv_user4 cascade; -\dp dep_priv_test - Access privileges - Schema | Name | Type | Access privileges | Column privileges | Policies ---------+---------------+-------+-----------------------------------------------+-------------------+---------- - public | dep_priv_test | table | regress_priv_user1=arwdDxt/regress_priv_user1+| | - | | | regress_priv_user2=r*/regress_priv_user1 +| | - | | | regress_priv_user3=r*/regress_priv_user1 +| | - | | | regress_priv_user4=r*/regress_priv_user3 +| | - | | | regress_priv_user5=r/regress_priv_user4 | | -(1 row) - -set session role regress_priv_user3; -revoke select on dep_priv_test from regress_priv_user4 cascade; -\dp dep_priv_test - Access privileges - Schema | Name | Type | Access privileges | Column privileges | Policies ---------+---------------+-------+-----------------------------------------------+-------------------+---------- - public | dep_priv_test | table | regress_priv_user1=arwdDxt/regress_priv_user1+| | - | | | regress_priv_user2=r*/regress_priv_user1 +| | - | | | regress_priv_user3=r*/regress_priv_user1 | | -(1 row) - -set session role regress_priv_user1; -drop table dep_priv_test; --- clean up -\c -drop sequence x_seq; -DROP AGGREGATE priv_testagg1(int); -DROP FUNCTION priv_testfunc2(int); -DROP FUNCTION priv_testfunc4(boolean); -DROP PROCEDURE priv_testproc1(int); -DROP VIEW atestv0; -DROP VIEW atestv1; -DROP VIEW atestv2; --- this should cascade to drop atestv4 -DROP VIEW atestv3 CASCADE; -NOTICE: drop cascades to view atestv4 --- this should complain "does not exist" -DROP VIEW atestv4; -ERROR: view "atestv4" does not exist -DROP TABLE atest1; -DROP TABLE atest2; -DROP TABLE atest3; -DROP TABLE atest4; -DROP TABLE atest5; -DROP TABLE atest6; -DROP TABLE atestc; -DROP TABLE atestp1; -DROP TABLE atestp2; -SELECT lo_unlink(oid) FROM pg_largeobject_metadata WHERE oid >= 1000 AND oid < 3000 ORDER BY oid; - lo_unlink ------------ - 1 - 1 - 1 - 1 - 1 -(5 rows) - -DROP GROUP regress_priv_group1; -DROP GROUP regress_priv_group2; --- these are needed to clean up permissions -REVOKE USAGE ON LANGUAGE sql FROM regress_priv_user1; -DROP OWNED BY regress_priv_user1; -DROP USER regress_priv_user1; -DROP USER regress_priv_user2; -DROP USER regress_priv_user3; -DROP USER regress_priv_user4; -DROP USER regress_priv_user5; -DROP USER regress_priv_user6; -DROP USER regress_priv_user7; -DROP USER regress_priv_user8; -- does not exist -ERROR: role "regress_priv_user8" does not exist --- permissions with LOCK TABLE -CREATE USER regress_locktable_user; -CREATE TABLE lock_table (a int); --- LOCK TABLE and SELECT permission -GRANT SELECT ON lock_table TO regress_locktable_user; -SET SESSION AUTHORIZATION regress_locktable_user; -BEGIN; -LOCK TABLE lock_table IN ROW EXCLUSIVE MODE; -- should fail -ERROR: permission denied for table lock_table -ROLLBACK; -BEGIN; -LOCK TABLE lock_table IN ACCESS SHARE MODE; -- should pass -COMMIT; -BEGIN; -LOCK TABLE lock_table IN ACCESS EXCLUSIVE MODE; -- should fail -ERROR: permission denied for table lock_table -ROLLBACK; -\c -REVOKE SELECT ON lock_table FROM regress_locktable_user; --- LOCK TABLE and INSERT permission -GRANT INSERT ON lock_table TO regress_locktable_user; -SET SESSION AUTHORIZATION regress_locktable_user; -BEGIN; -LOCK TABLE lock_table IN ROW EXCLUSIVE MODE; -- should pass -COMMIT; -BEGIN; -LOCK TABLE lock_table IN ACCESS SHARE MODE; -- should fail -ERROR: permission denied for table lock_table -ROLLBACK; -BEGIN; -LOCK TABLE lock_table IN ACCESS EXCLUSIVE MODE; -- should fail -ERROR: permission denied for table lock_table -ROLLBACK; -\c -REVOKE INSERT ON lock_table FROM regress_locktable_user; --- LOCK TABLE and UPDATE permission -GRANT UPDATE ON lock_table TO regress_locktable_user; -SET SESSION AUTHORIZATION regress_locktable_user; -BEGIN; -LOCK TABLE lock_table IN ROW EXCLUSIVE MODE; -- should pass -COMMIT; -BEGIN; -LOCK TABLE lock_table IN ACCESS SHARE MODE; -- should fail -ERROR: permission denied for table lock_table -ROLLBACK; -BEGIN; -LOCK TABLE lock_table IN ACCESS EXCLUSIVE MODE; -- should pass -COMMIT; -\c -REVOKE UPDATE ON lock_table FROM regress_locktable_user; --- LOCK TABLE and DELETE permission -GRANT DELETE ON lock_table TO regress_locktable_user; -SET SESSION AUTHORIZATION regress_locktable_user; -BEGIN; -LOCK TABLE lock_table IN ROW EXCLUSIVE MODE; -- should pass -COMMIT; -BEGIN; -LOCK TABLE lock_table IN ACCESS SHARE MODE; -- should fail -ERROR: permission denied for table lock_table -ROLLBACK; -BEGIN; -LOCK TABLE lock_table IN ACCESS EXCLUSIVE MODE; -- should pass -COMMIT; -\c -REVOKE DELETE ON lock_table FROM regress_locktable_user; --- LOCK TABLE and TRUNCATE permission -GRANT TRUNCATE ON lock_table TO regress_locktable_user; -SET SESSION AUTHORIZATION regress_locktable_user; -BEGIN; -LOCK TABLE lock_table IN ROW EXCLUSIVE MODE; -- should pass -COMMIT; -BEGIN; -LOCK TABLE lock_table IN ACCESS SHARE MODE; -- should fail -ERROR: permission denied for table lock_table -ROLLBACK; -BEGIN; -LOCK TABLE lock_table IN ACCESS EXCLUSIVE MODE; -- should pass -COMMIT; -\c -REVOKE TRUNCATE ON lock_table FROM regress_locktable_user; --- clean up -DROP TABLE lock_table; -DROP USER regress_locktable_user; +WARNING: terminating connection because of crash of another server process +DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory. +HINT: In a moment you should be able to reconnect to the database and repeat your command. +server closed the connection unexpectedly + This probably means the server terminated abnormally + before or while processing the request. +connection to server was lost diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/init_privs.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/init_privs.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/init_privs.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/init_privs.out 2023-02-20 19:46:21.619212557 -0500 @@ -1,12 +1 @@ --- Test initial privileges --- There should always be some initial privileges, set up by initdb -SELECT count(*) > 0 FROM pg_init_privs; - ?column? ----------- - t -(1 row) - --- Intentionally include some non-initial privs for pg_dump to dump out -GRANT SELECT ON pg_proc TO CURRENT_USER; -GRANT SELECT (prosrc) ON pg_proc TO CURRENT_USER; -GRANT SELECT (rolname, rolsuper) ON pg_authid TO CURRENT_USER; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/security_label.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/security_label.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/security_label.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/security_label.out 2023-02-20 19:46:21.629212557 -0500 @@ -1,44 +1 @@ --- --- Test for facilities of security label --- --- initial setups -SET client_min_messages TO 'warning'; -DROP ROLE IF EXISTS regress_seclabel_user1; -DROP ROLE IF EXISTS regress_seclabel_user2; -RESET client_min_messages; -CREATE USER regress_seclabel_user1 WITH CREATEROLE; -CREATE USER regress_seclabel_user2; -CREATE TABLE seclabel_tbl1 (a int, b text); -CREATE TABLE seclabel_tbl2 (x int, y text); -CREATE VIEW seclabel_view1 AS SELECT * FROM seclabel_tbl2; -CREATE FUNCTION seclabel_four() RETURNS integer AS $$SELECT 4$$ language sql; -CREATE DOMAIN seclabel_domain AS text; -ALTER TABLE seclabel_tbl1 OWNER TO regress_seclabel_user1; -ALTER TABLE seclabel_tbl2 OWNER TO regress_seclabel_user2; --- --- Test of SECURITY LABEL statement without a plugin --- -SECURITY LABEL ON TABLE seclabel_tbl1 IS 'classified'; -- fail -ERROR: no security label providers have been loaded -SECURITY LABEL FOR 'dummy' ON TABLE seclabel_tbl1 IS 'classified'; -- fail -ERROR: security label provider "dummy" is not loaded -SECURITY LABEL ON TABLE seclabel_tbl1 IS '...invalid label...'; -- fail -ERROR: no security label providers have been loaded -SECURITY LABEL ON TABLE seclabel_tbl3 IS 'unclassified'; -- fail -ERROR: no security label providers have been loaded -SECURITY LABEL ON ROLE regress_seclabel_user1 IS 'classified'; -- fail -ERROR: no security label providers have been loaded -SECURITY LABEL FOR 'dummy' ON ROLE regress_seclabel_user1 IS 'classified'; -- fail -ERROR: security label provider "dummy" is not loaded -SECURITY LABEL ON ROLE regress_seclabel_user1 IS '...invalid label...'; -- fail -ERROR: no security label providers have been loaded -SECURITY LABEL ON ROLE regress_seclabel_user3 IS 'unclassified'; -- fail -ERROR: no security label providers have been loaded --- clean up objects -DROP FUNCTION seclabel_four(); -DROP DOMAIN seclabel_domain; -DROP VIEW seclabel_view1; -DROP TABLE seclabel_tbl1; -DROP TABLE seclabel_tbl2; -DROP USER regress_seclabel_user1; -DROP USER regress_seclabel_user2; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/collate.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/collate.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/collate.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/collate.out 2023-02-20 19:46:21.639212558 -0500 @@ -1,729 +1 @@ -/* - * This test is intended to pass on all platforms supported by Postgres. - * We can therefore only assume that the default, C, and POSIX collations - * are available --- and since the regression tests are often run in a - * C-locale database, these may well all have the same behavior. But - * fortunately, the system doesn't know that and will treat them as - * incompatible collations. It is therefore at least possible to test - * parser behaviors such as collation conflict resolution. This test will, - * however, be more revealing when run in a database with non-C locale, - * since any departure from C sorting behavior will show as a failure. - */ -CREATE SCHEMA collate_tests; -SET search_path = collate_tests; -CREATE TABLE collate_test1 ( - a int, - b text COLLATE "C" NOT NULL -); -\d collate_test1 - Table "collate_tests.collate_test1" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | - b | text | C | not null | - -CREATE TABLE collate_test_fail ( - a int COLLATE "C", - b text -); -ERROR: collations are not supported by type integer -LINE 2: a int COLLATE "C", - ^ -CREATE TABLE collate_test_like ( - LIKE collate_test1 -); -\d collate_test_like - Table "collate_tests.collate_test_like" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | - b | text | C | not null | - -CREATE TABLE collate_test2 ( - a int, - b text COLLATE "POSIX" -); -INSERT INTO collate_test1 VALUES (1, 'abc'), (2, 'Abc'), (3, 'bbc'), (4, 'ABD'); -INSERT INTO collate_test2 SELECT * FROM collate_test1; -SELECT * FROM collate_test1 WHERE b COLLATE "C" >= 'abc'; - a | b ----+----- - 1 | abc - 3 | bbc -(2 rows) - -SELECT * FROM collate_test1 WHERE b >= 'abc' COLLATE "C"; - a | b ----+----- - 1 | abc - 3 | bbc -(2 rows) - -SELECT * FROM collate_test1 WHERE b COLLATE "C" >= 'abc' COLLATE "C"; - a | b ----+----- - 1 | abc - 3 | bbc -(2 rows) - -SELECT * FROM collate_test1 WHERE b COLLATE "C" >= 'bbc' COLLATE "POSIX"; -- fail -ERROR: collation mismatch between explicit collations "C" and "POSIX" -LINE 1: ...* FROM collate_test1 WHERE b COLLATE "C" >= 'bbc' COLLATE "P... - ^ -CREATE DOMAIN testdomain_p AS text COLLATE "POSIX"; -CREATE DOMAIN testdomain_i AS int COLLATE "POSIX"; -- fail -ERROR: collations are not supported by type integer -CREATE TABLE collate_test4 ( - a int, - b testdomain_p -); -INSERT INTO collate_test4 SELECT * FROM collate_test1; -SELECT a, b FROM collate_test4 ORDER BY b; - a | b ----+----- - 4 | ABD - 2 | Abc - 1 | abc - 3 | bbc -(4 rows) - -CREATE TABLE collate_test5 ( - a int, - b testdomain_p COLLATE "C" -); -INSERT INTO collate_test5 SELECT * FROM collate_test1; -SELECT a, b FROM collate_test5 ORDER BY b; - a | b ----+----- - 4 | ABD - 2 | Abc - 1 | abc - 3 | bbc -(4 rows) - -SELECT a, b FROM collate_test1 ORDER BY b; - a | b ----+----- - 4 | ABD - 2 | Abc - 1 | abc - 3 | bbc -(4 rows) - -SELECT a, b FROM collate_test2 ORDER BY b; - a | b ----+----- - 4 | ABD - 2 | Abc - 1 | abc - 3 | bbc -(4 rows) - -SELECT a, b FROM collate_test1 ORDER BY b COLLATE "C"; - a | b ----+----- - 4 | ABD - 2 | Abc - 1 | abc - 3 | bbc -(4 rows) - --- star expansion -SELECT * FROM collate_test1 ORDER BY b; - a | b ----+----- - 4 | ABD - 2 | Abc - 1 | abc - 3 | bbc -(4 rows) - -SELECT * FROM collate_test2 ORDER BY b; - a | b ----+----- - 4 | ABD - 2 | Abc - 1 | abc - 3 | bbc -(4 rows) - --- constant expression folding -SELECT 'bbc' COLLATE "C" > 'Abc' COLLATE "C" AS "true"; - true ------- - t -(1 row) - -SELECT 'bbc' COLLATE "POSIX" < 'Abc' COLLATE "POSIX" AS "false"; - false -------- - f -(1 row) - --- upper/lower -CREATE TABLE collate_test10 ( - a int, - x text COLLATE "C", - y text COLLATE "POSIX" -); -INSERT INTO collate_test10 VALUES (1, 'hij', 'hij'), (2, 'HIJ', 'HIJ'); -SELECT a, lower(x), lower(y), upper(x), upper(y), initcap(x), initcap(y) FROM collate_test10; - a | lower | lower | upper | upper | initcap | initcap ----+-------+-------+-------+-------+---------+--------- - 1 | hij | hij | HIJ | HIJ | Hij | Hij - 2 | hij | hij | HIJ | HIJ | Hij | Hij -(2 rows) - -SELECT a, lower(x COLLATE "C"), lower(y COLLATE "C") FROM collate_test10; - a | lower | lower ----+-------+------- - 1 | hij | hij - 2 | hij | hij -(2 rows) - -SELECT a, x, y FROM collate_test10 ORDER BY lower(y), a; - a | x | y ----+-----+----- - 1 | hij | hij - 2 | HIJ | HIJ -(2 rows) - --- backwards parsing -CREATE VIEW collview1 AS SELECT * FROM collate_test1 WHERE b COLLATE "C" >= 'bbc'; -CREATE VIEW collview2 AS SELECT a, b FROM collate_test1 ORDER BY b COLLATE "C"; -CREATE VIEW collview3 AS SELECT a, lower((x || x) COLLATE "POSIX") FROM collate_test10; -SELECT table_name, view_definition FROM information_schema.views - WHERE table_name LIKE 'collview%' ORDER BY 1; - table_name | view_definition -------------+------------------------------------------------------------------------------ - collview1 | SELECT collate_test1.a, + - | collate_test1.b + - | FROM collate_test1 + - | WHERE ((collate_test1.b COLLATE "C") >= 'bbc'::text); - collview2 | SELECT collate_test1.a, + - | collate_test1.b + - | FROM collate_test1 + - | ORDER BY (collate_test1.b COLLATE "C"); - collview3 | SELECT collate_test10.a, + - | lower(((collate_test10.x || collate_test10.x) COLLATE "POSIX")) AS lower+ - | FROM collate_test10; -(3 rows) - --- collation propagation in various expression types -SELECT a, coalesce(b, 'foo') FROM collate_test1 ORDER BY 2; - a | coalesce ----+---------- - 4 | ABD - 2 | Abc - 1 | abc - 3 | bbc -(4 rows) - -SELECT a, coalesce(b, 'foo') FROM collate_test2 ORDER BY 2; - a | coalesce ----+---------- - 4 | ABD - 2 | Abc - 1 | abc - 3 | bbc -(4 rows) - -SELECT a, lower(coalesce(x, 'foo')), lower(coalesce(y, 'foo')) FROM collate_test10; - a | lower | lower ----+-------+------- - 1 | hij | hij - 2 | hij | hij -(2 rows) - -SELECT a, b, greatest(b, 'CCC') FROM collate_test1 ORDER BY 3; - a | b | greatest ----+-----+---------- - 2 | Abc | CCC - 4 | ABD | CCC - 1 | abc | abc - 3 | bbc | bbc -(4 rows) - -SELECT a, b, greatest(b, 'CCC') FROM collate_test2 ORDER BY 3; - a | b | greatest ----+-----+---------- - 2 | Abc | CCC - 4 | ABD | CCC - 1 | abc | abc - 3 | bbc | bbc -(4 rows) - -SELECT a, x, y, lower(greatest(x, 'foo')), lower(greatest(y, 'foo')) FROM collate_test10; - a | x | y | lower | lower ----+-----+-----+-------+------- - 1 | hij | hij | hij | hij - 2 | HIJ | HIJ | foo | foo -(2 rows) - -SELECT a, nullif(b, 'abc') FROM collate_test1 ORDER BY 2; - a | nullif ----+-------- - 4 | ABD - 2 | Abc - 3 | bbc - 1 | -(4 rows) - -SELECT a, nullif(b, 'abc') FROM collate_test2 ORDER BY 2; - a | nullif ----+-------- - 4 | ABD - 2 | Abc - 3 | bbc - 1 | -(4 rows) - -SELECT a, lower(nullif(x, 'foo')), lower(nullif(y, 'foo')) FROM collate_test10; - a | lower | lower ----+-------+------- - 1 | hij | hij - 2 | hij | hij -(2 rows) - -SELECT a, CASE b WHEN 'abc' THEN 'abcd' ELSE b END FROM collate_test1 ORDER BY 2; - a | b ----+------ - 4 | ABD - 2 | Abc - 1 | abcd - 3 | bbc -(4 rows) - -SELECT a, CASE b WHEN 'abc' THEN 'abcd' ELSE b END FROM collate_test2 ORDER BY 2; - a | b ----+------ - 4 | ABD - 2 | Abc - 1 | abcd - 3 | bbc -(4 rows) - -CREATE DOMAIN testdomain AS text; -SELECT a, b::testdomain FROM collate_test1 ORDER BY 2; - a | b ----+----- - 4 | ABD - 2 | Abc - 1 | abc - 3 | bbc -(4 rows) - -SELECT a, b::testdomain FROM collate_test2 ORDER BY 2; - a | b ----+----- - 4 | ABD - 2 | Abc - 1 | abc - 3 | bbc -(4 rows) - -SELECT a, b::testdomain_p FROM collate_test2 ORDER BY 2; - a | b ----+----- - 4 | ABD - 2 | Abc - 1 | abc - 3 | bbc -(4 rows) - -SELECT a, lower(x::testdomain), lower(y::testdomain) FROM collate_test10; - a | lower | lower ----+-------+------- - 1 | hij | hij - 2 | hij | hij -(2 rows) - -SELECT min(b), max(b) FROM collate_test1; - min | max ------+----- - ABD | bbc -(1 row) - -SELECT min(b), max(b) FROM collate_test2; - min | max ------+----- - ABD | bbc -(1 row) - -SELECT array_agg(b ORDER BY b) FROM collate_test1; - array_agg -------------------- - {ABD,Abc,abc,bbc} -(1 row) - -SELECT array_agg(b ORDER BY b) FROM collate_test2; - array_agg -------------------- - {ABD,Abc,abc,bbc} -(1 row) - --- In aggregates, ORDER BY expressions don't affect aggregate's collation -SELECT string_agg(x COLLATE "C", y COLLATE "POSIX") FROM collate_test10; -- fail -ERROR: collation mismatch between explicit collations "C" and "POSIX" -LINE 1: SELECT string_agg(x COLLATE "C", y COLLATE "POSIX") FROM col... - ^ -SELECT array_agg(x COLLATE "C" ORDER BY y COLLATE "POSIX") FROM collate_test10; - array_agg ------------ - {HIJ,hij} -(1 row) - -SELECT array_agg(a ORDER BY x COLLATE "C", y COLLATE "POSIX") FROM collate_test10; - array_agg ------------ - {2,1} -(1 row) - -SELECT array_agg(a ORDER BY x||y) FROM collate_test10; -- fail -ERROR: collation mismatch between implicit collations "C" and "POSIX" -LINE 1: SELECT array_agg(a ORDER BY x||y) FROM collate_test10; - ^ -HINT: You can choose the collation by applying the COLLATE clause to one or both expressions. -SELECT a, b FROM collate_test1 UNION ALL SELECT a, b FROM collate_test1 ORDER BY 2; - a | b ----+----- - 4 | ABD - 4 | ABD - 2 | Abc - 2 | Abc - 1 | abc - 1 | abc - 3 | bbc - 3 | bbc -(8 rows) - -SELECT a, b FROM collate_test2 UNION SELECT a, b FROM collate_test2 ORDER BY 2; - a | b ----+----- - 4 | ABD - 2 | Abc - 1 | abc - 3 | bbc -(4 rows) - -SELECT a, b FROM collate_test2 WHERE a < 4 INTERSECT SELECT a, b FROM collate_test2 WHERE a > 1 ORDER BY 2; - a | b ----+----- - 2 | Abc - 3 | bbc -(2 rows) - -SELECT a, b FROM collate_test2 EXCEPT SELECT a, b FROM collate_test2 WHERE a < 2 ORDER BY 2; - a | b ----+----- - 4 | ABD - 2 | Abc - 3 | bbc -(3 rows) - -SELECT a, b FROM collate_test1 UNION ALL SELECT a, b FROM collate_test2 ORDER BY 2; -- fail -ERROR: could not determine which collation to use for string comparison -HINT: Use the COLLATE clause to set the collation explicitly. -SELECT a, b FROM collate_test1 UNION ALL SELECT a, b FROM collate_test2; -- ok - a | b ----+----- - 1 | abc - 2 | Abc - 3 | bbc - 4 | ABD - 1 | abc - 2 | Abc - 3 | bbc - 4 | ABD -(8 rows) - -SELECT a, b FROM collate_test1 UNION SELECT a, b FROM collate_test2 ORDER BY 2; -- fail -ERROR: collation mismatch between implicit collations "C" and "POSIX" -LINE 1: SELECT a, b FROM collate_test1 UNION SELECT a, b FROM collat... - ^ -HINT: You can choose the collation by applying the COLLATE clause to one or both expressions. -SELECT a, b COLLATE "C" FROM collate_test1 UNION SELECT a, b FROM collate_test2 ORDER BY 2; -- ok - a | b ----+----- - 4 | ABD - 2 | Abc - 1 | abc - 3 | bbc -(4 rows) - -SELECT a, b FROM collate_test1 INTERSECT SELECT a, b FROM collate_test2 ORDER BY 2; -- fail -ERROR: collation mismatch between implicit collations "C" and "POSIX" -LINE 1: ...ELECT a, b FROM collate_test1 INTERSECT SELECT a, b FROM col... - ^ -HINT: You can choose the collation by applying the COLLATE clause to one or both expressions. -SELECT a, b FROM collate_test1 EXCEPT SELECT a, b FROM collate_test2 ORDER BY 2; -- fail -ERROR: collation mismatch between implicit collations "C" and "POSIX" -LINE 1: SELECT a, b FROM collate_test1 EXCEPT SELECT a, b FROM colla... - ^ -HINT: You can choose the collation by applying the COLLATE clause to one or both expressions. -CREATE TABLE test_u AS SELECT a, b FROM collate_test1 UNION ALL SELECT a, b FROM collate_test2; -- fail -ERROR: no collation was derived for column "b" with collatable type text -HINT: Use the COLLATE clause to set the collation explicitly. --- ideally this would be a parse-time error, but for now it must be run-time: -select x < y from collate_test10; -- fail -ERROR: could not determine which collation to use for string comparison -HINT: Use the COLLATE clause to set the collation explicitly. -select x || y from collate_test10; -- ok, because || is not collation aware - ?column? ----------- - hijhij - HIJHIJ -(2 rows) - -select x, y from collate_test10 order by x || y; -- not so ok -ERROR: collation mismatch between implicit collations "C" and "POSIX" -LINE 1: select x, y from collate_test10 order by x || y; - ^ -HINT: You can choose the collation by applying the COLLATE clause to one or both expressions. --- collation mismatch between recursive and non-recursive term -WITH RECURSIVE foo(x) AS - (SELECT x FROM (VALUES('a' COLLATE "C"),('b')) t(x) - UNION ALL - SELECT (x || 'c') COLLATE "POSIX" FROM foo WHERE length(x) < 10) -SELECT * FROM foo; -ERROR: recursive query "foo" column 1 has collation "C" in non-recursive term but collation "POSIX" overall -LINE 2: (SELECT x FROM (VALUES('a' COLLATE "C"),('b')) t(x) - ^ -HINT: Use the COLLATE clause to set the collation of the non-recursive term. -SELECT a, b, a < b as lt FROM - (VALUES ('a', 'B'), ('A', 'b' COLLATE "C")) v(a,b); - a | b | lt ----+---+---- - a | B | f - A | b | t -(2 rows) - --- collation mismatch in subselects -SELECT * FROM collate_test10 WHERE (x, y) NOT IN (SELECT y, x FROM collate_test10); -ERROR: could not determine which collation to use for string hashing -HINT: Use the COLLATE clause to set the collation explicitly. --- now it works with overrides -SELECT * FROM collate_test10 WHERE (x COLLATE "POSIX", y COLLATE "C") NOT IN (SELECT y, x FROM collate_test10); - a | x | y ----+---+--- -(0 rows) - -SELECT * FROM collate_test10 WHERE (x, y) NOT IN (SELECT y COLLATE "C", x COLLATE "POSIX" FROM collate_test10); - a | x | y ----+---+--- -(0 rows) - --- casting -SELECT CAST('42' AS text COLLATE "C"); -ERROR: syntax error at or near "COLLATE" -LINE 1: SELECT CAST('42' AS text COLLATE "C"); - ^ -SELECT a, CAST(b AS varchar) FROM collate_test1 ORDER BY 2; - a | b ----+----- - 4 | ABD - 2 | Abc - 1 | abc - 3 | bbc -(4 rows) - -SELECT a, CAST(b AS varchar) FROM collate_test2 ORDER BY 2; - a | b ----+----- - 4 | ABD - 2 | Abc - 1 | abc - 3 | bbc -(4 rows) - --- result of a SQL function -CREATE FUNCTION vc (text) RETURNS text LANGUAGE sql - AS 'select $1::varchar'; -SELECT a, b FROM collate_test1 ORDER BY a, vc(b); - a | b ----+----- - 1 | abc - 2 | Abc - 3 | bbc - 4 | ABD -(4 rows) - --- polymorphism -SELECT * FROM unnest((SELECT array_agg(b ORDER BY b) FROM collate_test1)) ORDER BY 1; - unnest --------- - ABD - Abc - abc - bbc -(4 rows) - -SELECT * FROM unnest((SELECT array_agg(b ORDER BY b) FROM collate_test2)) ORDER BY 1; - unnest --------- - ABD - Abc - abc - bbc -(4 rows) - -CREATE FUNCTION dup (anyelement) RETURNS anyelement - AS 'select $1' LANGUAGE sql; -SELECT a, dup(b) FROM collate_test1 ORDER BY 2; - a | dup ----+----- - 4 | ABD - 2 | Abc - 1 | abc - 3 | bbc -(4 rows) - -SELECT a, dup(b) FROM collate_test2 ORDER BY 2; - a | dup ----+----- - 4 | ABD - 2 | Abc - 1 | abc - 3 | bbc -(4 rows) - --- indexes -CREATE INDEX collate_test1_idx1 ON collate_test1 (b); -CREATE INDEX collate_test1_idx2 ON collate_test1 (b COLLATE "POSIX"); -CREATE INDEX collate_test1_idx3 ON collate_test1 ((b COLLATE "POSIX")); -- this is different grammatically -CREATE INDEX collate_test1_idx4 ON collate_test1 (((b||'foo') COLLATE "POSIX")); -CREATE INDEX collate_test1_idx5 ON collate_test1 (a COLLATE "POSIX"); -- fail -ERROR: collations are not supported by type integer -CREATE INDEX collate_test1_idx6 ON collate_test1 ((a COLLATE "POSIX")); -- fail -ERROR: collations are not supported by type integer -LINE 1: ...ATE INDEX collate_test1_idx6 ON collate_test1 ((a COLLATE "P... - ^ -SELECT relname, pg_get_indexdef(oid) FROM pg_class WHERE relname LIKE 'collate_test%_idx%' ORDER BY 1; - relname | pg_get_indexdef ---------------------+------------------------------------------------------------------------------------------------------------------- - collate_test1_idx1 | CREATE INDEX collate_test1_idx1 ON collate_tests.collate_test1 USING btree (b) - collate_test1_idx2 | CREATE INDEX collate_test1_idx2 ON collate_tests.collate_test1 USING btree (b COLLATE "POSIX") - collate_test1_idx3 | CREATE INDEX collate_test1_idx3 ON collate_tests.collate_test1 USING btree (b COLLATE "POSIX") - collate_test1_idx4 | CREATE INDEX collate_test1_idx4 ON collate_tests.collate_test1 USING btree (((b || 'foo'::text)) COLLATE "POSIX") -(4 rows) - --- foreign keys --- force indexes and mergejoins to be used for FK checking queries, --- else they might not exercise collation-dependent operators -SET enable_seqscan TO 0; -SET enable_hashjoin TO 0; -SET enable_nestloop TO 0; -CREATE TABLE collate_test20 (f1 text COLLATE "C" PRIMARY KEY); -INSERT INTO collate_test20 VALUES ('foo'), ('bar'); -CREATE TABLE collate_test21 (f2 text COLLATE "POSIX" REFERENCES collate_test20); -INSERT INTO collate_test21 VALUES ('foo'), ('bar'); -INSERT INTO collate_test21 VALUES ('baz'); -- fail -ERROR: insert or update on table "collate_test21" violates foreign key constraint "collate_test21_f2_fkey" -DETAIL: Key (f2)=(baz) is not present in table "collate_test20". -CREATE TABLE collate_test22 (f2 text COLLATE "POSIX"); -INSERT INTO collate_test22 VALUES ('foo'), ('bar'), ('baz'); -ALTER TABLE collate_test22 ADD FOREIGN KEY (f2) REFERENCES collate_test20; -- fail -ERROR: insert or update on table "collate_test22" violates foreign key constraint "collate_test22_f2_fkey" -DETAIL: Key (f2)=(baz) is not present in table "collate_test20". -DELETE FROM collate_test22 WHERE f2 = 'baz'; -ALTER TABLE collate_test22 ADD FOREIGN KEY (f2) REFERENCES collate_test20; -RESET enable_seqscan; -RESET enable_hashjoin; -RESET enable_nestloop; --- EXPLAIN -EXPLAIN (COSTS OFF) - SELECT * FROM collate_test10 ORDER BY x, y; - QUERY PLAN ----------------------------------------------- - Sort - Sort Key: x COLLATE "C", y COLLATE "POSIX" - -> Seq Scan on collate_test10 -(3 rows) - -EXPLAIN (COSTS OFF) - SELECT * FROM collate_test10 ORDER BY x DESC, y COLLATE "C" ASC NULLS FIRST; - QUERY PLAN ------------------------------------------------------------ - Sort - Sort Key: x COLLATE "C" DESC, y COLLATE "C" NULLS FIRST - -> Seq Scan on collate_test10 -(3 rows) - --- CREATE/DROP COLLATION -CREATE COLLATION mycoll1 FROM "C"; -CREATE COLLATION mycoll2 ( LC_COLLATE = "POSIX", LC_CTYPE = "POSIX" ); -CREATE COLLATION mycoll3 FROM "default"; -- intentionally unsupported -ERROR: collation "default" cannot be copied -DROP COLLATION mycoll1; -CREATE TABLE collate_test23 (f1 text collate mycoll2); -DROP COLLATION mycoll2; -- fail -ERROR: cannot drop collation mycoll2 because other objects depend on it -DETAIL: column f1 of table collate_test23 depends on collation mycoll2 -HINT: Use DROP ... CASCADE to drop the dependent objects too. --- invalid: non-lowercase quoted identifiers -CREATE COLLATION case_coll ("Lc_Collate" = "POSIX", "Lc_Ctype" = "POSIX"); -ERROR: collation attribute "Lc_Collate" not recognized -LINE 1: CREATE COLLATION case_coll ("Lc_Collate" = "POSIX", "Lc_Ctyp... - ^ --- 9.1 bug with useless COLLATE in an expression subject to length coercion -CREATE TEMP TABLE vctable (f1 varchar(25)); -INSERT INTO vctable VALUES ('foo' COLLATE "C"); -SELECT collation for ('foo'); -- unknown type - null - pg_collation_for ------------------- - -(1 row) - -SELECT collation for ('foo'::text); - pg_collation_for ------------------- - "default" -(1 row) - -SELECT collation for ((SELECT a FROM collate_test1 LIMIT 1)); -- non-collatable type - error -ERROR: collations are not supported by type integer -SELECT collation for ((SELECT b FROM collate_test1 LIMIT 1)); - pg_collation_for ------------------- - "C" -(1 row) - --- old bug with not dropping COLLATE when coercing to non-collatable type -CREATE VIEW collate_on_int AS -SELECT c1+1 AS c1p FROM - (SELECT ('4' COLLATE "C")::INT AS c1) ss; -\d+ collate_on_int - View "collate_tests.collate_on_int" - Column | Type | Collation | Nullable | Default | Storage | Description ---------+---------+-----------+----------+---------+---------+------------- - c1p | integer | | | | plain | -View definition: - SELECT ss.c1 + 1 AS c1p - FROM ( SELECT 4 AS c1) ss; - --- --- Clean up. Many of these table names will be re-used if the user is --- trying to run any platform-specific collation tests later, so we --- must get rid of them. --- -DROP SCHEMA collate_tests CASCADE; -NOTICE: drop cascades to 19 other objects -DETAIL: drop cascades to table collate_test1 -drop cascades to table collate_test_like -drop cascades to table collate_test2 -drop cascades to type testdomain_p -drop cascades to table collate_test4 -drop cascades to table collate_test5 -drop cascades to table collate_test10 -drop cascades to view collview1 -drop cascades to view collview2 -drop cascades to view collview3 -drop cascades to type testdomain -drop cascades to function vc(text) -drop cascades to function dup(anyelement) -drop cascades to table collate_test20 -drop cascades to table collate_test21 -drop cascades to table collate_test22 -drop cascades to collation mycoll2 -drop cascades to table collate_test23 -drop cascades to view collate_on_int +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/matview.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/matview.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/matview.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/matview.out 2023-02-20 19:46:21.649212558 -0500 @@ -1,678 +1 @@ --- create a table to use as a basis for views and materialized views in various combinations -CREATE TABLE mvtest_t (id int NOT NULL PRIMARY KEY, type text NOT NULL, amt numeric NOT NULL); -INSERT INTO mvtest_t VALUES - (1, 'x', 2), - (2, 'x', 3), - (3, 'y', 5), - (4, 'y', 7), - (5, 'z', 11); --- we want a view based on the table, too, since views present additional challenges -CREATE VIEW mvtest_tv AS SELECT type, sum(amt) AS totamt FROM mvtest_t GROUP BY type; -SELECT * FROM mvtest_tv ORDER BY type; - type | totamt -------+-------- - x | 5 - y | 12 - z | 11 -(3 rows) - --- create a materialized view with no data, and confirm correct behavior -EXPLAIN (costs off) - CREATE MATERIALIZED VIEW mvtest_tm AS SELECT type, sum(amt) AS totamt FROM mvtest_t GROUP BY type WITH NO DATA; - QUERY PLAN ----------------------------- - HashAggregate - Group Key: type - -> Seq Scan on mvtest_t -(3 rows) - -CREATE MATERIALIZED VIEW mvtest_tm AS SELECT type, sum(amt) AS totamt FROM mvtest_t GROUP BY type WITH NO DATA; -SELECT relispopulated FROM pg_class WHERE oid = 'mvtest_tm'::regclass; - relispopulated ----------------- - f -(1 row) - -SELECT * FROM mvtest_tm ORDER BY type; -ERROR: materialized view "mvtest_tm" has not been populated -HINT: Use the REFRESH MATERIALIZED VIEW command. -REFRESH MATERIALIZED VIEW mvtest_tm; -SELECT relispopulated FROM pg_class WHERE oid = 'mvtest_tm'::regclass; - relispopulated ----------------- - t -(1 row) - -CREATE UNIQUE INDEX mvtest_tm_type ON mvtest_tm (type); -SELECT * FROM mvtest_tm ORDER BY type; - type | totamt -------+-------- - x | 5 - y | 12 - z | 11 -(3 rows) - --- create various views -EXPLAIN (costs off) - CREATE MATERIALIZED VIEW mvtest_tvm AS SELECT * FROM mvtest_tv ORDER BY type; - QUERY PLAN ----------------------------------- - Sort - Sort Key: mvtest_t.type - -> HashAggregate - Group Key: mvtest_t.type - -> Seq Scan on mvtest_t -(5 rows) - -CREATE MATERIALIZED VIEW mvtest_tvm AS SELECT * FROM mvtest_tv ORDER BY type; -SELECT * FROM mvtest_tvm; - type | totamt -------+-------- - x | 5 - y | 12 - z | 11 -(3 rows) - -CREATE MATERIALIZED VIEW mvtest_tmm AS SELECT sum(totamt) AS grandtot FROM mvtest_tm; -CREATE MATERIALIZED VIEW mvtest_tvmm AS SELECT sum(totamt) AS grandtot FROM mvtest_tvm; -CREATE UNIQUE INDEX mvtest_tvmm_expr ON mvtest_tvmm ((grandtot > 0)); -CREATE UNIQUE INDEX mvtest_tvmm_pred ON mvtest_tvmm (grandtot) WHERE grandtot < 0; -CREATE VIEW mvtest_tvv AS SELECT sum(totamt) AS grandtot FROM mvtest_tv; -EXPLAIN (costs off) - CREATE MATERIALIZED VIEW mvtest_tvvm AS SELECT * FROM mvtest_tvv; - QUERY PLAN ----------------------------------- - Aggregate - -> HashAggregate - Group Key: mvtest_t.type - -> Seq Scan on mvtest_t -(4 rows) - -CREATE MATERIALIZED VIEW mvtest_tvvm AS SELECT * FROM mvtest_tvv; -CREATE VIEW mvtest_tvvmv AS SELECT * FROM mvtest_tvvm; -CREATE MATERIALIZED VIEW mvtest_bb AS SELECT * FROM mvtest_tvvmv; -CREATE INDEX mvtest_aa ON mvtest_bb (grandtot); --- check that plans seem reasonable -\d+ mvtest_tvm - Materialized view "public.mvtest_tvm" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+---------+----------+--------------+------------- - type | text | | | | extended | | - totamt | numeric | | | | main | | -View definition: - SELECT mvtest_tv.type, - mvtest_tv.totamt - FROM mvtest_tv - ORDER BY mvtest_tv.type; - -\d+ mvtest_tvm - Materialized view "public.mvtest_tvm" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+---------+----------+--------------+------------- - type | text | | | | extended | | - totamt | numeric | | | | main | | -View definition: - SELECT mvtest_tv.type, - mvtest_tv.totamt - FROM mvtest_tv - ORDER BY mvtest_tv.type; - -\d+ mvtest_tvvm - Materialized view "public.mvtest_tvvm" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description -----------+---------+-----------+----------+---------+---------+--------------+------------- - grandtot | numeric | | | | main | | -View definition: - SELECT mvtest_tvv.grandtot - FROM mvtest_tvv; - -\d+ mvtest_bb - Materialized view "public.mvtest_bb" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description -----------+---------+-----------+----------+---------+---------+--------------+------------- - grandtot | numeric | | | | main | | -Indexes: - "mvtest_aa" btree (grandtot) -View definition: - SELECT mvtest_tvvmv.grandtot - FROM mvtest_tvvmv; - --- test schema behavior -CREATE SCHEMA mvtest_mvschema; -ALTER MATERIALIZED VIEW mvtest_tvm SET SCHEMA mvtest_mvschema; -\d+ mvtest_tvm -\d+ mvtest_tvmm - Materialized view "public.mvtest_tvmm" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description -----------+---------+-----------+----------+---------+---------+--------------+------------- - grandtot | numeric | | | | main | | -Indexes: - "mvtest_tvmm_expr" UNIQUE, btree ((grandtot > 0::numeric)) - "mvtest_tvmm_pred" UNIQUE, btree (grandtot) WHERE grandtot < 0::numeric -View definition: - SELECT sum(mvtest_tvm.totamt) AS grandtot - FROM mvtest_mvschema.mvtest_tvm; - -SET search_path = mvtest_mvschema, public; -\d+ mvtest_tvm - Materialized view "mvtest_mvschema.mvtest_tvm" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+---------+----------+--------------+------------- - type | text | | | | extended | | - totamt | numeric | | | | main | | -View definition: - SELECT mvtest_tv.type, - mvtest_tv.totamt - FROM mvtest_tv - ORDER BY mvtest_tv.type; - --- modify the underlying table data -INSERT INTO mvtest_t VALUES (6, 'z', 13); --- confirm pre- and post-refresh contents of fairly simple materialized views -SELECT * FROM mvtest_tm ORDER BY type; - type | totamt -------+-------- - x | 5 - y | 12 - z | 11 -(3 rows) - -SELECT * FROM mvtest_tvm ORDER BY type; - type | totamt -------+-------- - x | 5 - y | 12 - z | 11 -(3 rows) - -REFRESH MATERIALIZED VIEW CONCURRENTLY mvtest_tm; -REFRESH MATERIALIZED VIEW mvtest_tvm; -SELECT * FROM mvtest_tm ORDER BY type; - type | totamt -------+-------- - x | 5 - y | 12 - z | 24 -(3 rows) - -SELECT * FROM mvtest_tvm ORDER BY type; - type | totamt -------+-------- - x | 5 - y | 12 - z | 24 -(3 rows) - -RESET search_path; --- confirm pre- and post-refresh contents of nested materialized views -EXPLAIN (costs off) - SELECT * FROM mvtest_tmm; - QUERY PLAN ------------------------- - Seq Scan on mvtest_tmm -(1 row) - -EXPLAIN (costs off) - SELECT * FROM mvtest_tvmm; - QUERY PLAN -------------------------- - Seq Scan on mvtest_tvmm -(1 row) - -EXPLAIN (costs off) - SELECT * FROM mvtest_tvvm; - QUERY PLAN -------------------------- - Seq Scan on mvtest_tvvm -(1 row) - -SELECT * FROM mvtest_tmm; - grandtot ----------- - 28 -(1 row) - -SELECT * FROM mvtest_tvmm; - grandtot ----------- - 28 -(1 row) - -SELECT * FROM mvtest_tvvm; - grandtot ----------- - 28 -(1 row) - -REFRESH MATERIALIZED VIEW mvtest_tmm; -REFRESH MATERIALIZED VIEW CONCURRENTLY mvtest_tvmm; -ERROR: cannot refresh materialized view "public.mvtest_tvmm" concurrently -HINT: Create a unique index with no WHERE clause on one or more columns of the materialized view. -REFRESH MATERIALIZED VIEW mvtest_tvmm; -REFRESH MATERIALIZED VIEW mvtest_tvvm; -EXPLAIN (costs off) - SELECT * FROM mvtest_tmm; - QUERY PLAN ------------------------- - Seq Scan on mvtest_tmm -(1 row) - -EXPLAIN (costs off) - SELECT * FROM mvtest_tvmm; - QUERY PLAN -------------------------- - Seq Scan on mvtest_tvmm -(1 row) - -EXPLAIN (costs off) - SELECT * FROM mvtest_tvvm; - QUERY PLAN -------------------------- - Seq Scan on mvtest_tvvm -(1 row) - -SELECT * FROM mvtest_tmm; - grandtot ----------- - 41 -(1 row) - -SELECT * FROM mvtest_tvmm; - grandtot ----------- - 41 -(1 row) - -SELECT * FROM mvtest_tvvm; - grandtot ----------- - 41 -(1 row) - --- test diemv when the mv does not exist -DROP MATERIALIZED VIEW IF EXISTS no_such_mv; -NOTICE: materialized view "no_such_mv" does not exist, skipping --- make sure invalid combination of options is prohibited -REFRESH MATERIALIZED VIEW CONCURRENTLY mvtest_tvmm WITH NO DATA; -ERROR: CONCURRENTLY and WITH NO DATA options cannot be used together --- no tuple locks on materialized views -SELECT * FROM mvtest_tvvm FOR SHARE; -ERROR: cannot lock rows in materialized view "mvtest_tvvm" --- test join of mv and view -SELECT type, m.totamt AS mtot, v.totamt AS vtot FROM mvtest_tm m LEFT JOIN mvtest_tv v USING (type) ORDER BY type; - type | mtot | vtot -------+------+------ - x | 5 | 5 - y | 12 | 12 - z | 24 | 24 -(3 rows) - --- make sure that dependencies are reported properly when they block the drop -DROP TABLE mvtest_t; -ERROR: cannot drop table mvtest_t because other objects depend on it -DETAIL: view mvtest_tv depends on table mvtest_t -materialized view mvtest_mvschema.mvtest_tvm depends on view mvtest_tv -materialized view mvtest_tvmm depends on materialized view mvtest_mvschema.mvtest_tvm -view mvtest_tvv depends on view mvtest_tv -materialized view mvtest_tvvm depends on view mvtest_tvv -view mvtest_tvvmv depends on materialized view mvtest_tvvm -materialized view mvtest_bb depends on view mvtest_tvvmv -materialized view mvtest_tm depends on table mvtest_t -materialized view mvtest_tmm depends on materialized view mvtest_tm -HINT: Use DROP ... CASCADE to drop the dependent objects too. --- make sure dependencies are dropped and reported --- and make sure that transactional behavior is correct on rollback --- incidentally leaving some interesting materialized views for pg_dump testing -BEGIN; -DROP TABLE mvtest_t CASCADE; -NOTICE: drop cascades to 9 other objects -DETAIL: drop cascades to view mvtest_tv -drop cascades to materialized view mvtest_mvschema.mvtest_tvm -drop cascades to materialized view mvtest_tvmm -drop cascades to view mvtest_tvv -drop cascades to materialized view mvtest_tvvm -drop cascades to view mvtest_tvvmv -drop cascades to materialized view mvtest_bb -drop cascades to materialized view mvtest_tm -drop cascades to materialized view mvtest_tmm -ROLLBACK; --- some additional tests not using base tables -CREATE VIEW mvtest_vt1 AS SELECT 1 moo; -CREATE VIEW mvtest_vt2 AS SELECT moo, 2*moo FROM mvtest_vt1 UNION ALL SELECT moo, 3*moo FROM mvtest_vt1; -\d+ mvtest_vt2 - View "public.mvtest_vt2" - Column | Type | Collation | Nullable | Default | Storage | Description -----------+---------+-----------+----------+---------+---------+------------- - moo | integer | | | | plain | - ?column? | integer | | | | plain | -View definition: - SELECT mvtest_vt1.moo, - 2 * mvtest_vt1.moo - FROM mvtest_vt1 -UNION ALL - SELECT mvtest_vt1.moo, - 3 * mvtest_vt1.moo - FROM mvtest_vt1; - -CREATE MATERIALIZED VIEW mv_test2 AS SELECT moo, 2*moo FROM mvtest_vt2 UNION ALL SELECT moo, 3*moo FROM mvtest_vt2; -\d+ mv_test2 - Materialized view "public.mv_test2" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description -----------+---------+-----------+----------+---------+---------+--------------+------------- - moo | integer | | | | plain | | - ?column? | integer | | | | plain | | -View definition: - SELECT mvtest_vt2.moo, - 2 * mvtest_vt2.moo - FROM mvtest_vt2 -UNION ALL - SELECT mvtest_vt2.moo, - 3 * mvtest_vt2.moo - FROM mvtest_vt2; - -CREATE MATERIALIZED VIEW mv_test3 AS SELECT * FROM mv_test2 WHERE moo = 12345; -SELECT relispopulated FROM pg_class WHERE oid = 'mv_test3'::regclass; - relispopulated ----------------- - t -(1 row) - -DROP VIEW mvtest_vt1 CASCADE; -NOTICE: drop cascades to 3 other objects -DETAIL: drop cascades to view mvtest_vt2 -drop cascades to materialized view mv_test2 -drop cascades to materialized view mv_test3 --- test that duplicate values on unique index prevent refresh -CREATE TABLE mvtest_foo(a, b) AS VALUES(1, 10); -CREATE MATERIALIZED VIEW mvtest_mv AS SELECT * FROM mvtest_foo; -CREATE UNIQUE INDEX ON mvtest_mv(a); -INSERT INTO mvtest_foo SELECT * FROM mvtest_foo; -REFRESH MATERIALIZED VIEW mvtest_mv; -ERROR: could not create unique index "mvtest_mv_a_idx" -DETAIL: Key (a)=(1) is duplicated. -REFRESH MATERIALIZED VIEW CONCURRENTLY mvtest_mv; -ERROR: new data for materialized view "mvtest_mv" contains duplicate rows without any null columns -DETAIL: Row: (1,10) -DROP TABLE mvtest_foo CASCADE; -NOTICE: drop cascades to materialized view mvtest_mv --- make sure that all columns covered by unique indexes works -CREATE TABLE mvtest_foo(a, b, c) AS VALUES(1, 2, 3); -CREATE MATERIALIZED VIEW mvtest_mv AS SELECT * FROM mvtest_foo; -CREATE UNIQUE INDEX ON mvtest_mv (a); -CREATE UNIQUE INDEX ON mvtest_mv (b); -CREATE UNIQUE INDEX on mvtest_mv (c); -INSERT INTO mvtest_foo VALUES(2, 3, 4); -INSERT INTO mvtest_foo VALUES(3, 4, 5); -REFRESH MATERIALIZED VIEW mvtest_mv; -REFRESH MATERIALIZED VIEW CONCURRENTLY mvtest_mv; -DROP TABLE mvtest_foo CASCADE; -NOTICE: drop cascades to materialized view mvtest_mv --- allow subquery to reference unpopulated matview if WITH NO DATA is specified -CREATE MATERIALIZED VIEW mvtest_mv1 AS SELECT 1 AS col1 WITH NO DATA; -CREATE MATERIALIZED VIEW mvtest_mv2 AS SELECT * FROM mvtest_mv1 - WHERE col1 = (SELECT LEAST(col1) FROM mvtest_mv1) WITH NO DATA; -DROP MATERIALIZED VIEW mvtest_mv1 CASCADE; -NOTICE: drop cascades to materialized view mvtest_mv2 --- make sure that types with unusual equality tests work -CREATE TABLE mvtest_boxes (id serial primary key, b box); -INSERT INTO mvtest_boxes (b) VALUES - ('(32,32),(31,31)'), - ('(2.0000004,2.0000004),(1,1)'), - ('(1.9999996,1.9999996),(1,1)'); -CREATE MATERIALIZED VIEW mvtest_boxmv AS SELECT * FROM mvtest_boxes; -CREATE UNIQUE INDEX mvtest_boxmv_id ON mvtest_boxmv (id); -UPDATE mvtest_boxes SET b = '(2,2),(1,1)' WHERE id = 2; -REFRESH MATERIALIZED VIEW CONCURRENTLY mvtest_boxmv; -SELECT * FROM mvtest_boxmv ORDER BY id; - id | b -----+----------------------------- - 1 | (32,32),(31,31) - 2 | (2,2),(1,1) - 3 | (1.9999996,1.9999996),(1,1) -(3 rows) - -DROP TABLE mvtest_boxes CASCADE; -NOTICE: drop cascades to materialized view mvtest_boxmv --- make sure that column names are handled correctly -CREATE TABLE mvtest_v (i int, j int); -CREATE MATERIALIZED VIEW mvtest_mv_v (ii, jj, kk) AS SELECT i, j FROM mvtest_v; -- error -ERROR: too many column names were specified -CREATE MATERIALIZED VIEW mvtest_mv_v (ii, jj) AS SELECT i, j FROM mvtest_v; -- ok -CREATE MATERIALIZED VIEW mvtest_mv_v_2 (ii) AS SELECT i, j FROM mvtest_v; -- ok -CREATE MATERIALIZED VIEW mvtest_mv_v_3 (ii, jj, kk) AS SELECT i, j FROM mvtest_v WITH NO DATA; -- error -ERROR: too many column names were specified -CREATE MATERIALIZED VIEW mvtest_mv_v_3 (ii, jj) AS SELECT i, j FROM mvtest_v WITH NO DATA; -- ok -CREATE MATERIALIZED VIEW mvtest_mv_v_4 (ii) AS SELECT i, j FROM mvtest_v WITH NO DATA; -- ok -ALTER TABLE mvtest_v RENAME COLUMN i TO x; -INSERT INTO mvtest_v values (1, 2); -CREATE UNIQUE INDEX mvtest_mv_v_ii ON mvtest_mv_v (ii); -REFRESH MATERIALIZED VIEW mvtest_mv_v; -UPDATE mvtest_v SET j = 3 WHERE x = 1; -REFRESH MATERIALIZED VIEW CONCURRENTLY mvtest_mv_v; -REFRESH MATERIALIZED VIEW mvtest_mv_v_2; -REFRESH MATERIALIZED VIEW mvtest_mv_v_3; -REFRESH MATERIALIZED VIEW mvtest_mv_v_4; -SELECT * FROM mvtest_v; - x | j ----+--- - 1 | 3 -(1 row) - -SELECT * FROM mvtest_mv_v; - ii | jj -----+---- - 1 | 3 -(1 row) - -SELECT * FROM mvtest_mv_v_2; - ii | j -----+--- - 1 | 3 -(1 row) - -SELECT * FROM mvtest_mv_v_3; - ii | jj -----+---- - 1 | 3 -(1 row) - -SELECT * FROM mvtest_mv_v_4; - ii | j -----+--- - 1 | 3 -(1 row) - -DROP TABLE mvtest_v CASCADE; -NOTICE: drop cascades to 4 other objects -DETAIL: drop cascades to materialized view mvtest_mv_v -drop cascades to materialized view mvtest_mv_v_2 -drop cascades to materialized view mvtest_mv_v_3 -drop cascades to materialized view mvtest_mv_v_4 --- Check that unknown literals are converted to "text" in CREATE MATVIEW, --- so that we don't end up with unknown-type columns. -CREATE MATERIALIZED VIEW mv_unspecified_types AS - SELECT 42 as i, 42.5 as num, 'foo' as u, 'foo'::unknown as u2, null as n; -\d+ mv_unspecified_types - Materialized view "public.mv_unspecified_types" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+---------+----------+--------------+------------- - i | integer | | | | plain | | - num | numeric | | | | main | | - u | text | | | | extended | | - u2 | text | | | | extended | | - n | text | | | | extended | | -View definition: - SELECT 42 AS i, - 42.5 AS num, - 'foo'::text AS u, - 'foo'::text AS u2, - NULL::text AS n; - -SELECT * FROM mv_unspecified_types; - i | num | u | u2 | n -----+------+-----+-----+--- - 42 | 42.5 | foo | foo | -(1 row) - -DROP MATERIALIZED VIEW mv_unspecified_types; --- make sure that create WITH NO DATA does not plan the query (bug #13907) -create materialized view mvtest_error as select 1/0 as x; -- fail -ERROR: division by zero -create materialized view mvtest_error as select 1/0 as x with no data; -refresh materialized view mvtest_error; -- fail here -ERROR: division by zero -drop materialized view mvtest_error; --- make sure that matview rows can be referenced as source rows (bug #9398) -CREATE TABLE mvtest_v AS SELECT generate_series(1,10) AS a; -CREATE MATERIALIZED VIEW mvtest_mv_v AS SELECT a FROM mvtest_v WHERE a <= 5; -DELETE FROM mvtest_v WHERE EXISTS ( SELECT * FROM mvtest_mv_v WHERE mvtest_mv_v.a = mvtest_v.a ); -SELECT * FROM mvtest_v; - a ----- - 6 - 7 - 8 - 9 - 10 -(5 rows) - -SELECT * FROM mvtest_mv_v; - a ---- - 1 - 2 - 3 - 4 - 5 -(5 rows) - -DROP TABLE mvtest_v CASCADE; -NOTICE: drop cascades to materialized view mvtest_mv_v --- make sure running as superuser works when MV owned by another role (bug #11208) -CREATE ROLE regress_user_mvtest; -SET ROLE regress_user_mvtest; --- this test case also checks for ambiguity in the queries issued by --- refresh_by_match_merge(), by choosing column names that intentionally --- duplicate all the aliases used in those queries -CREATE TABLE mvtest_foo_data AS SELECT i, - i+1 AS tid, - md5(random()::text) AS mv, - md5(random()::text) AS newdata, - md5(random()::text) AS newdata2, - md5(random()::text) AS diff - FROM generate_series(1, 10) i; -CREATE MATERIALIZED VIEW mvtest_mv_foo AS SELECT * FROM mvtest_foo_data; -CREATE MATERIALIZED VIEW mvtest_mv_foo AS SELECT * FROM mvtest_foo_data; -ERROR: relation "mvtest_mv_foo" already exists -CREATE MATERIALIZED VIEW IF NOT EXISTS mvtest_mv_foo AS SELECT * FROM mvtest_foo_data; -NOTICE: relation "mvtest_mv_foo" already exists, skipping -CREATE UNIQUE INDEX ON mvtest_mv_foo (i); -RESET ROLE; -REFRESH MATERIALIZED VIEW mvtest_mv_foo; -REFRESH MATERIALIZED VIEW CONCURRENTLY mvtest_mv_foo; -DROP OWNED BY regress_user_mvtest CASCADE; -DROP ROLE regress_user_mvtest; --- make sure that create WITH NO DATA works via SPI -BEGIN; -CREATE FUNCTION mvtest_func() - RETURNS void AS $$ -BEGIN - CREATE MATERIALIZED VIEW mvtest1 AS SELECT 1 AS x; - CREATE MATERIALIZED VIEW mvtest2 AS SELECT 1 AS x WITH NO DATA; -END; -$$ LANGUAGE plpgsql; -SELECT mvtest_func(); - mvtest_func -------------- - -(1 row) - -SELECT * FROM mvtest1; - x ---- - 1 -(1 row) - -SELECT * FROM mvtest2; -ERROR: materialized view "mvtest2" has not been populated -HINT: Use the REFRESH MATERIALIZED VIEW command. -ROLLBACK; --- INSERT privileges if relation owner is not allowed to insert. -CREATE SCHEMA matview_schema; -CREATE USER regress_matview_user; -ALTER DEFAULT PRIVILEGES FOR ROLE regress_matview_user - REVOKE INSERT ON TABLES FROM regress_matview_user; -GRANT ALL ON SCHEMA matview_schema TO public; -SET SESSION AUTHORIZATION regress_matview_user; -CREATE MATERIALIZED VIEW matview_schema.mv_withdata1 (a) AS - SELECT generate_series(1, 10) WITH DATA; -EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) - CREATE MATERIALIZED VIEW matview_schema.mv_withdata2 (a) AS - SELECT generate_series(1, 10) WITH DATA; - QUERY PLAN --------------------------------------- - ProjectSet (actual rows=10 loops=1) - -> Result (actual rows=1 loops=1) -(2 rows) - -REFRESH MATERIALIZED VIEW matview_schema.mv_withdata2; -CREATE MATERIALIZED VIEW matview_schema.mv_nodata1 (a) AS - SELECT generate_series(1, 10) WITH NO DATA; -EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) - CREATE MATERIALIZED VIEW matview_schema.mv_nodata2 (a) AS - SELECT generate_series(1, 10) WITH NO DATA; - QUERY PLAN -------------------------------- - ProjectSet (never executed) - -> Result (never executed) -(2 rows) - -REFRESH MATERIALIZED VIEW matview_schema.mv_nodata2; -RESET SESSION AUTHORIZATION; -ALTER DEFAULT PRIVILEGES FOR ROLE regress_matview_user - GRANT INSERT ON TABLES TO regress_matview_user; -DROP SCHEMA matview_schema CASCADE; -NOTICE: drop cascades to 4 other objects -DETAIL: drop cascades to materialized view matview_schema.mv_withdata1 -drop cascades to materialized view matview_schema.mv_withdata2 -drop cascades to materialized view matview_schema.mv_nodata1 -drop cascades to materialized view matview_schema.mv_nodata2 -DROP USER regress_matview_user; --- CREATE MATERIALIZED VIEW ... IF NOT EXISTS -CREATE MATERIALIZED VIEW matview_ine_tab AS SELECT 1; -CREATE MATERIALIZED VIEW matview_ine_tab AS SELECT 1 / 0; -- error -ERROR: relation "matview_ine_tab" already exists -CREATE MATERIALIZED VIEW IF NOT EXISTS matview_ine_tab AS - SELECT 1 / 0; -- ok -NOTICE: relation "matview_ine_tab" already exists, skipping -CREATE MATERIALIZED VIEW matview_ine_tab AS - SELECT 1 / 0 WITH NO DATA; -- error -ERROR: relation "matview_ine_tab" already exists -CREATE MATERIALIZED VIEW IF NOT EXISTS matview_ine_tab AS - SELECT 1 / 0 WITH NO DATA; -- ok -NOTICE: relation "matview_ine_tab" already exists, skipping -EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) - CREATE MATERIALIZED VIEW matview_ine_tab AS - SELECT 1 / 0; -- error -ERROR: relation "matview_ine_tab" already exists -EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) - CREATE MATERIALIZED VIEW IF NOT EXISTS matview_ine_tab AS - SELECT 1 / 0; -- ok -NOTICE: relation "matview_ine_tab" already exists, skipping - QUERY PLAN ------------- -(0 rows) - -EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) - CREATE MATERIALIZED VIEW matview_ine_tab AS - SELECT 1 / 0 WITH NO DATA; -- error -ERROR: relation "matview_ine_tab" already exists -EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) - CREATE MATERIALIZED VIEW IF NOT EXISTS matview_ine_tab AS - SELECT 1 / 0 WITH NO DATA; -- ok -NOTICE: relation "matview_ine_tab" already exists, skipping - QUERY PLAN ------------- -(0 rows) - -DROP MATERIALIZED VIEW matview_ine_tab; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/lock.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/lock.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/lock.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/lock.out 2023-02-20 19:46:21.619212557 -0500 @@ -1,178 +1 @@ --- --- Test the LOCK statement --- --- Setup -CREATE SCHEMA lock_schema1; -SET search_path = lock_schema1; -CREATE TABLE lock_tbl1 (a BIGINT); -CREATE TABLE lock_tbl1a (a BIGINT); -CREATE VIEW lock_view1 AS SELECT * FROM lock_tbl1; -CREATE VIEW lock_view2(a,b) AS SELECT * FROM lock_tbl1, lock_tbl1a; -CREATE VIEW lock_view3 AS SELECT * from lock_view2; -CREATE VIEW lock_view4 AS SELECT (select a from lock_tbl1a limit 1) from lock_tbl1; -CREATE VIEW lock_view5 AS SELECT * from lock_tbl1 where a in (select * from lock_tbl1a); -CREATE VIEW lock_view6 AS SELECT * from (select * from lock_tbl1) sub; -CREATE ROLE regress_rol_lock1; -ALTER ROLE regress_rol_lock1 SET search_path = lock_schema1; -GRANT USAGE ON SCHEMA lock_schema1 TO regress_rol_lock1; --- Try all valid lock options; also try omitting the optional TABLE keyword. -BEGIN TRANSACTION; -LOCK TABLE lock_tbl1 IN ACCESS SHARE MODE; -LOCK lock_tbl1 IN ROW SHARE MODE; -LOCK TABLE lock_tbl1 IN ROW EXCLUSIVE MODE; -LOCK TABLE lock_tbl1 IN SHARE UPDATE EXCLUSIVE MODE; -LOCK TABLE lock_tbl1 IN SHARE MODE; -LOCK lock_tbl1 IN SHARE ROW EXCLUSIVE MODE; -LOCK TABLE lock_tbl1 IN EXCLUSIVE MODE; -LOCK TABLE lock_tbl1 IN ACCESS EXCLUSIVE MODE; -ROLLBACK; --- Try using NOWAIT along with valid options. -BEGIN TRANSACTION; -LOCK TABLE lock_tbl1 IN ACCESS SHARE MODE NOWAIT; -LOCK TABLE lock_tbl1 IN ROW SHARE MODE NOWAIT; -LOCK TABLE lock_tbl1 IN ROW EXCLUSIVE MODE NOWAIT; -LOCK TABLE lock_tbl1 IN SHARE UPDATE EXCLUSIVE MODE NOWAIT; -LOCK TABLE lock_tbl1 IN SHARE MODE NOWAIT; -LOCK TABLE lock_tbl1 IN SHARE ROW EXCLUSIVE MODE NOWAIT; -LOCK TABLE lock_tbl1 IN EXCLUSIVE MODE NOWAIT; -LOCK TABLE lock_tbl1 IN ACCESS EXCLUSIVE MODE NOWAIT; -ROLLBACK; --- Verify that we can lock views. -BEGIN TRANSACTION; -LOCK TABLE lock_view1 IN EXCLUSIVE MODE; --- lock_view1 and lock_tbl1 are locked. -select relname from pg_locks l, pg_class c - where l.relation = c.oid and relname like '%lock_%' and mode = 'ExclusiveLock' - order by relname; - relname ------------- - lock_tbl1 - lock_view1 -(2 rows) - -ROLLBACK; -BEGIN TRANSACTION; -LOCK TABLE lock_view2 IN EXCLUSIVE MODE; --- lock_view1, lock_tbl1, and lock_tbl1a are locked. -select relname from pg_locks l, pg_class c - where l.relation = c.oid and relname like '%lock_%' and mode = 'ExclusiveLock' - order by relname; - relname ------------- - lock_tbl1 - lock_tbl1a - lock_view2 -(3 rows) - -ROLLBACK; -BEGIN TRANSACTION; -LOCK TABLE lock_view3 IN EXCLUSIVE MODE; --- lock_view3, lock_view2, lock_tbl1, and lock_tbl1a are locked recursively. -select relname from pg_locks l, pg_class c - where l.relation = c.oid and relname like '%lock_%' and mode = 'ExclusiveLock' - order by relname; - relname ------------- - lock_tbl1 - lock_tbl1a - lock_view2 - lock_view3 -(4 rows) - -ROLLBACK; -BEGIN TRANSACTION; -LOCK TABLE lock_view4 IN EXCLUSIVE MODE; --- lock_view4, lock_tbl1, and lock_tbl1a are locked. -select relname from pg_locks l, pg_class c - where l.relation = c.oid and relname like '%lock_%' and mode = 'ExclusiveLock' - order by relname; - relname ------------- - lock_tbl1 - lock_tbl1a - lock_view4 -(3 rows) - -ROLLBACK; -BEGIN TRANSACTION; -LOCK TABLE lock_view5 IN EXCLUSIVE MODE; --- lock_view5, lock_tbl1, and lock_tbl1a are locked. -select relname from pg_locks l, pg_class c - where l.relation = c.oid and relname like '%lock_%' and mode = 'ExclusiveLock' - order by relname; - relname ------------- - lock_tbl1 - lock_tbl1a - lock_view5 -(3 rows) - -ROLLBACK; -BEGIN TRANSACTION; -LOCK TABLE lock_view6 IN EXCLUSIVE MODE; --- lock_view6 an lock_tbl1 are locked. -select relname from pg_locks l, pg_class c - where l.relation = c.oid and relname like '%lock_%' and mode = 'ExclusiveLock' - order by relname; - relname ------------- - lock_tbl1 - lock_view6 -(2 rows) - -ROLLBACK; --- Verify that we cope with infinite recursion in view definitions. -CREATE OR REPLACE VIEW lock_view2 AS SELECT * from lock_view3; -BEGIN TRANSACTION; -LOCK TABLE lock_view2 IN EXCLUSIVE MODE; -ROLLBACK; -CREATE VIEW lock_view7 AS SELECT * from lock_view2; -BEGIN TRANSACTION; -LOCK TABLE lock_view7 IN EXCLUSIVE MODE; -ROLLBACK; --- Verify that we can lock a table with inheritance children. -CREATE TABLE lock_tbl2 (b BIGINT) INHERITS (lock_tbl1); -CREATE TABLE lock_tbl3 () INHERITS (lock_tbl2); -BEGIN TRANSACTION; -LOCK TABLE lock_tbl1 * IN ACCESS EXCLUSIVE MODE; -ROLLBACK; --- Child tables are locked without granting explicit permission to do so as --- long as we have permission to lock the parent. -GRANT UPDATE ON TABLE lock_tbl1 TO regress_rol_lock1; -SET ROLE regress_rol_lock1; --- fail when child locked directly -BEGIN; -LOCK TABLE lock_tbl2; -ERROR: permission denied for table lock_tbl2 -ROLLBACK; -BEGIN; -LOCK TABLE lock_tbl1 * IN ACCESS EXCLUSIVE MODE; -ROLLBACK; -BEGIN; -LOCK TABLE ONLY lock_tbl1; -ROLLBACK; -RESET ROLE; --- --- Clean up --- -DROP VIEW lock_view7; -DROP VIEW lock_view6; -DROP VIEW lock_view5; -DROP VIEW lock_view4; -DROP VIEW lock_view3 CASCADE; -NOTICE: drop cascades to view lock_view2 -DROP VIEW lock_view1; -DROP TABLE lock_tbl3; -DROP TABLE lock_tbl2; -DROP TABLE lock_tbl1; -DROP TABLE lock_tbl1a; -DROP SCHEMA lock_schema1 CASCADE; -DROP ROLE regress_rol_lock1; --- atomic ops tests -RESET search_path; -SELECT test_atomic_ops(); - test_atomic_ops ------------------ - t -(1 row) - +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/replica_identity.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/replica_identity.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/replica_identity.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/replica_identity.out 2023-02-20 19:46:21.939212571 -0500 @@ -1,233 +1 @@ -CREATE TABLE test_replica_identity ( - id serial primary key, - keya text not null, - keyb text not null, - nonkey text, - CONSTRAINT test_replica_identity_unique_defer UNIQUE (keya, keyb) DEFERRABLE, - CONSTRAINT test_replica_identity_unique_nondefer UNIQUE (keya, keyb) -) ; -CREATE TABLE test_replica_identity_othertable (id serial primary key); -CREATE INDEX test_replica_identity_keyab ON test_replica_identity (keya, keyb); -CREATE UNIQUE INDEX test_replica_identity_keyab_key ON test_replica_identity (keya, keyb); -CREATE UNIQUE INDEX test_replica_identity_nonkey ON test_replica_identity (keya, nonkey); -CREATE INDEX test_replica_identity_hash ON test_replica_identity USING hash (nonkey); -CREATE UNIQUE INDEX test_replica_identity_expr ON test_replica_identity (keya, keyb, (3)); -CREATE UNIQUE INDEX test_replica_identity_partial ON test_replica_identity (keya, keyb) WHERE keyb != '3'; --- default is 'd'/DEFAULT for user created tables -SELECT relreplident FROM pg_class WHERE oid = 'test_replica_identity'::regclass; - relreplident --------------- - d -(1 row) - --- but 'none' for system tables -SELECT relreplident FROM pg_class WHERE oid = 'pg_class'::regclass; - relreplident --------------- - n -(1 row) - -SELECT relreplident FROM pg_class WHERE oid = 'pg_constraint'::regclass; - relreplident --------------- - n -(1 row) - ----- --- Make sure we detect ineligible indexes ----- --- fail, not unique -ALTER TABLE test_replica_identity REPLICA IDENTITY USING INDEX test_replica_identity_keyab; -ERROR: cannot use non-unique index "test_replica_identity_keyab" as replica identity --- fail, not a candidate key, nullable column -ALTER TABLE test_replica_identity REPLICA IDENTITY USING INDEX test_replica_identity_nonkey; -ERROR: index "test_replica_identity_nonkey" cannot be used as replica identity because column "nonkey" is nullable --- fail, hash indexes cannot do uniqueness -ALTER TABLE test_replica_identity REPLICA IDENTITY USING INDEX test_replica_identity_hash; -ERROR: cannot use non-unique index "test_replica_identity_hash" as replica identity --- fail, expression index -ALTER TABLE test_replica_identity REPLICA IDENTITY USING INDEX test_replica_identity_expr; -ERROR: cannot use expression index "test_replica_identity_expr" as replica identity --- fail, partial index -ALTER TABLE test_replica_identity REPLICA IDENTITY USING INDEX test_replica_identity_partial; -ERROR: cannot use partial index "test_replica_identity_partial" as replica identity --- fail, not our index -ALTER TABLE test_replica_identity REPLICA IDENTITY USING INDEX test_replica_identity_othertable_pkey; -ERROR: "test_replica_identity_othertable_pkey" is not an index for table "test_replica_identity" --- fail, deferrable -ALTER TABLE test_replica_identity REPLICA IDENTITY USING INDEX test_replica_identity_unique_defer; -ERROR: cannot use non-immediate index "test_replica_identity_unique_defer" as replica identity -SELECT relreplident FROM pg_class WHERE oid = 'test_replica_identity'::regclass; - relreplident --------------- - d -(1 row) - ----- --- Make sure index cases succeed ----- --- succeed, primary key -ALTER TABLE test_replica_identity REPLICA IDENTITY USING INDEX test_replica_identity_pkey; -SELECT relreplident FROM pg_class WHERE oid = 'test_replica_identity'::regclass; - relreplident --------------- - i -(1 row) - -\d test_replica_identity - Table "public.test_replica_identity" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------------------------------------------------- - id | integer | | not null | nextval('test_replica_identity_id_seq'::regclass) - keya | text | | not null | - keyb | text | | not null | - nonkey | text | | | -Indexes: - "test_replica_identity_pkey" PRIMARY KEY, btree (id) REPLICA IDENTITY - "test_replica_identity_expr" UNIQUE, btree (keya, keyb, (3)) - "test_replica_identity_hash" hash (nonkey) - "test_replica_identity_keyab" btree (keya, keyb) - "test_replica_identity_keyab_key" UNIQUE, btree (keya, keyb) - "test_replica_identity_nonkey" UNIQUE, btree (keya, nonkey) - "test_replica_identity_partial" UNIQUE, btree (keya, keyb) WHERE keyb <> '3'::text - "test_replica_identity_unique_defer" UNIQUE CONSTRAINT, btree (keya, keyb) DEFERRABLE - "test_replica_identity_unique_nondefer" UNIQUE CONSTRAINT, btree (keya, keyb) - --- succeed, nondeferrable unique constraint over nonnullable cols -ALTER TABLE test_replica_identity REPLICA IDENTITY USING INDEX test_replica_identity_unique_nondefer; --- succeed unique index over nonnullable cols -ALTER TABLE test_replica_identity REPLICA IDENTITY USING INDEX test_replica_identity_keyab_key; -ALTER TABLE test_replica_identity REPLICA IDENTITY USING INDEX test_replica_identity_keyab_key; -SELECT relreplident FROM pg_class WHERE oid = 'test_replica_identity'::regclass; - relreplident --------------- - i -(1 row) - -\d test_replica_identity - Table "public.test_replica_identity" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------------------------------------------------- - id | integer | | not null | nextval('test_replica_identity_id_seq'::regclass) - keya | text | | not null | - keyb | text | | not null | - nonkey | text | | | -Indexes: - "test_replica_identity_pkey" PRIMARY KEY, btree (id) - "test_replica_identity_expr" UNIQUE, btree (keya, keyb, (3)) - "test_replica_identity_hash" hash (nonkey) - "test_replica_identity_keyab" btree (keya, keyb) - "test_replica_identity_keyab_key" UNIQUE, btree (keya, keyb) REPLICA IDENTITY - "test_replica_identity_nonkey" UNIQUE, btree (keya, nonkey) - "test_replica_identity_partial" UNIQUE, btree (keya, keyb) WHERE keyb <> '3'::text - "test_replica_identity_unique_defer" UNIQUE CONSTRAINT, btree (keya, keyb) DEFERRABLE - "test_replica_identity_unique_nondefer" UNIQUE CONSTRAINT, btree (keya, keyb) - -SELECT count(*) FROM pg_index WHERE indrelid = 'test_replica_identity'::regclass AND indisreplident; - count -------- - 1 -(1 row) - ----- --- Make sure non index cases work ----- -ALTER TABLE test_replica_identity REPLICA IDENTITY DEFAULT; -SELECT relreplident FROM pg_class WHERE oid = 'test_replica_identity'::regclass; - relreplident --------------- - d -(1 row) - -SELECT count(*) FROM pg_index WHERE indrelid = 'test_replica_identity'::regclass AND indisreplident; - count -------- - 0 -(1 row) - -ALTER TABLE test_replica_identity REPLICA IDENTITY FULL; -SELECT relreplident FROM pg_class WHERE oid = 'test_replica_identity'::regclass; - relreplident --------------- - f -(1 row) - -\d+ test_replica_identity - Table "public.test_replica_identity" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+---------------------------------------------------+----------+--------------+------------- - id | integer | | not null | nextval('test_replica_identity_id_seq'::regclass) | plain | | - keya | text | | not null | | extended | | - keyb | text | | not null | | extended | | - nonkey | text | | | | extended | | -Indexes: - "test_replica_identity_pkey" PRIMARY KEY, btree (id) - "test_replica_identity_expr" UNIQUE, btree (keya, keyb, (3)) - "test_replica_identity_hash" hash (nonkey) - "test_replica_identity_keyab" btree (keya, keyb) - "test_replica_identity_keyab_key" UNIQUE, btree (keya, keyb) - "test_replica_identity_nonkey" UNIQUE, btree (keya, nonkey) - "test_replica_identity_partial" UNIQUE, btree (keya, keyb) WHERE keyb <> '3'::text - "test_replica_identity_unique_defer" UNIQUE CONSTRAINT, btree (keya, keyb) DEFERRABLE - "test_replica_identity_unique_nondefer" UNIQUE CONSTRAINT, btree (keya, keyb) -Replica Identity: FULL - -ALTER TABLE test_replica_identity REPLICA IDENTITY NOTHING; -SELECT relreplident FROM pg_class WHERE oid = 'test_replica_identity'::regclass; - relreplident --------------- - n -(1 row) - ---- --- Test that ALTER TABLE rewrite preserves nondefault replica identity ---- --- constraint variant -CREATE TABLE test_replica_identity2 (id int UNIQUE NOT NULL); -ALTER TABLE test_replica_identity2 REPLICA IDENTITY USING INDEX test_replica_identity2_id_key; -\d test_replica_identity2 - Table "public.test_replica_identity2" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - id | integer | | not null | -Indexes: - "test_replica_identity2_id_key" UNIQUE CONSTRAINT, btree (id) REPLICA IDENTITY - -ALTER TABLE test_replica_identity2 ALTER COLUMN id TYPE bigint; -\d test_replica_identity2 - Table "public.test_replica_identity2" - Column | Type | Collation | Nullable | Default ---------+--------+-----------+----------+--------- - id | bigint | | not null | -Indexes: - "test_replica_identity2_id_key" UNIQUE CONSTRAINT, btree (id) REPLICA IDENTITY - --- straight index variant -CREATE TABLE test_replica_identity3 (id int NOT NULL); -CREATE UNIQUE INDEX test_replica_identity3_id_key ON test_replica_identity3 (id); -ALTER TABLE test_replica_identity3 REPLICA IDENTITY USING INDEX test_replica_identity3_id_key; -\d test_replica_identity3 - Table "public.test_replica_identity3" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - id | integer | | not null | -Indexes: - "test_replica_identity3_id_key" UNIQUE, btree (id) REPLICA IDENTITY - -ALTER TABLE test_replica_identity3 ALTER COLUMN id TYPE bigint; -\d test_replica_identity3 - Table "public.test_replica_identity3" - Column | Type | Collation | Nullable | Default ---------+--------+-----------+----------+--------- - id | bigint | | not null | -Indexes: - "test_replica_identity3_id_key" UNIQUE, btree (id) REPLICA IDENTITY - --- ALTER TABLE DROP NOT NULL is not allowed for columns part of an index --- used as replica identity. -ALTER TABLE test_replica_identity3 ALTER COLUMN id DROP NOT NULL; -ERROR: column "id" is in index used as replica identity -DROP TABLE test_replica_identity; -DROP TABLE test_replica_identity2; -DROP TABLE test_replica_identity3; -DROP TABLE test_replica_identity_othertable; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/rowsecurity.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/rowsecurity.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/rowsecurity.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/rowsecurity.out 2023-02-20 19:46:22.069212576 -0500 @@ -1,4042 +1 @@ --- --- Test of Row-level security feature --- --- Clean up in case a prior regression run failed --- Suppress NOTICE messages when users/groups don't exist -SET client_min_messages TO 'warning'; -DROP USER IF EXISTS regress_rls_alice; -DROP USER IF EXISTS regress_rls_bob; -DROP USER IF EXISTS regress_rls_carol; -DROP USER IF EXISTS regress_rls_dave; -DROP USER IF EXISTS regress_rls_exempt_user; -DROP ROLE IF EXISTS regress_rls_group1; -DROP ROLE IF EXISTS regress_rls_group2; -DROP SCHEMA IF EXISTS regress_rls_schema CASCADE; -RESET client_min_messages; --- initial setup -CREATE USER regress_rls_alice NOLOGIN; -CREATE USER regress_rls_bob NOLOGIN; -CREATE USER regress_rls_carol NOLOGIN; -CREATE USER regress_rls_dave NOLOGIN; -CREATE USER regress_rls_exempt_user BYPASSRLS NOLOGIN; -CREATE ROLE regress_rls_group1 NOLOGIN; -CREATE ROLE regress_rls_group2 NOLOGIN; -GRANT regress_rls_group1 TO regress_rls_bob; -GRANT regress_rls_group2 TO regress_rls_carol; -CREATE SCHEMA regress_rls_schema; -GRANT ALL ON SCHEMA regress_rls_schema to public; -SET search_path = regress_rls_schema; --- setup of malicious function -CREATE OR REPLACE FUNCTION f_leak(text) RETURNS bool - COST 0.0000001 LANGUAGE plpgsql - AS 'BEGIN RAISE NOTICE ''f_leak => %'', $1; RETURN true; END'; -GRANT EXECUTE ON FUNCTION f_leak(text) TO public; --- BASIC Row-Level Security Scenario -SET SESSION AUTHORIZATION regress_rls_alice; -CREATE TABLE uaccount ( - pguser name primary key, - seclv int -); -GRANT SELECT ON uaccount TO public; -INSERT INTO uaccount VALUES - ('regress_rls_alice', 99), - ('regress_rls_bob', 1), - ('regress_rls_carol', 2), - ('regress_rls_dave', 3); -CREATE TABLE category ( - cid int primary key, - cname text -); -GRANT ALL ON category TO public; -INSERT INTO category VALUES - (11, 'novel'), - (22, 'science fiction'), - (33, 'technology'), - (44, 'manga'); -CREATE TABLE document ( - did int primary key, - cid int references category(cid), - dlevel int not null, - dauthor name, - dtitle text -); -GRANT ALL ON document TO public; -INSERT INTO document VALUES - ( 1, 11, 1, 'regress_rls_bob', 'my first novel'), - ( 2, 11, 2, 'regress_rls_bob', 'my second novel'), - ( 3, 22, 2, 'regress_rls_bob', 'my science fiction'), - ( 4, 44, 1, 'regress_rls_bob', 'my first manga'), - ( 5, 44, 2, 'regress_rls_bob', 'my second manga'), - ( 6, 22, 1, 'regress_rls_carol', 'great science fiction'), - ( 7, 33, 2, 'regress_rls_carol', 'great technology book'), - ( 8, 44, 1, 'regress_rls_carol', 'great manga'), - ( 9, 22, 1, 'regress_rls_dave', 'awesome science fiction'), - (10, 33, 2, 'regress_rls_dave', 'awesome technology book'); -ALTER TABLE document ENABLE ROW LEVEL SECURITY; --- user's security level must be higher than or equal to document's -CREATE POLICY p1 ON document AS PERMISSIVE - USING (dlevel <= (SELECT seclv FROM uaccount WHERE pguser = current_user)); --- try to create a policy of bogus type -CREATE POLICY p1 ON document AS UGLY - USING (dlevel <= (SELECT seclv FROM uaccount WHERE pguser = current_user)); -ERROR: unrecognized row security option "ugly" -LINE 1: CREATE POLICY p1 ON document AS UGLY - ^ -HINT: Only PERMISSIVE or RESTRICTIVE policies are supported currently. --- but Dave isn't allowed to anything at cid 50 or above --- this is to make sure that we sort the policies by name first --- when applying WITH CHECK, a later INSERT by Dave should fail due --- to p1r first -CREATE POLICY p2r ON document AS RESTRICTIVE TO regress_rls_dave - USING (cid <> 44 AND cid < 50); --- and Dave isn't allowed to see manga documents -CREATE POLICY p1r ON document AS RESTRICTIVE TO regress_rls_dave - USING (cid <> 44); -\dp - Access privileges - Schema | Name | Type | Access privileges | Column privileges | Policies ---------------------+----------+-------+---------------------------------------------+-------------------+-------------------------------------------- - regress_rls_schema | category | table | regress_rls_alice=arwdDxt/regress_rls_alice+| | - | | | =arwdDxt/regress_rls_alice | | - regress_rls_schema | document | table | regress_rls_alice=arwdDxt/regress_rls_alice+| | p1: + - | | | =arwdDxt/regress_rls_alice | | (u): (dlevel <= ( SELECT uaccount.seclv + - | | | | | FROM uaccount + - | | | | | WHERE (uaccount.pguser = CURRENT_USER)))+ - | | | | | p2r (RESTRICTIVE): + - | | | | | (u): ((cid <> 44) AND (cid < 50)) + - | | | | | to: regress_rls_dave + - | | | | | p1r (RESTRICTIVE): + - | | | | | (u): (cid <> 44) + - | | | | | to: regress_rls_dave - regress_rls_schema | uaccount | table | regress_rls_alice=arwdDxt/regress_rls_alice+| | - | | | =r/regress_rls_alice | | -(3 rows) - -\d document - Table "regress_rls_schema.document" - Column | Type | Collation | Nullable | Default ----------+---------+-----------+----------+--------- - did | integer | | not null | - cid | integer | | | - dlevel | integer | | not null | - dauthor | name | | | - dtitle | text | | | -Indexes: - "document_pkey" PRIMARY KEY, btree (did) -Foreign-key constraints: - "document_cid_fkey" FOREIGN KEY (cid) REFERENCES category(cid) -Policies: - POLICY "p1" - USING ((dlevel <= ( SELECT uaccount.seclv - FROM uaccount - WHERE (uaccount.pguser = CURRENT_USER)))) - POLICY "p1r" AS RESTRICTIVE - TO regress_rls_dave - USING ((cid <> 44)) - POLICY "p2r" AS RESTRICTIVE - TO regress_rls_dave - USING (((cid <> 44) AND (cid < 50))) - -SELECT * FROM pg_policies WHERE schemaname = 'regress_rls_schema' AND tablename = 'document' ORDER BY policyname; - schemaname | tablename | policyname | permissive | roles | cmd | qual | with_check ---------------------+-----------+------------+-------------+--------------------+-----+--------------------------------------------+------------ - regress_rls_schema | document | p1 | PERMISSIVE | {public} | ALL | (dlevel <= ( SELECT uaccount.seclv +| - | | | | | | FROM uaccount +| - | | | | | | WHERE (uaccount.pguser = CURRENT_USER))) | - regress_rls_schema | document | p1r | RESTRICTIVE | {regress_rls_dave} | ALL | (cid <> 44) | - regress_rls_schema | document | p2r | RESTRICTIVE | {regress_rls_dave} | ALL | ((cid <> 44) AND (cid < 50)) | -(3 rows) - --- viewpoint from regress_rls_bob -SET SESSION AUTHORIZATION regress_rls_bob; -SET row_security TO ON; -SELECT * FROM document WHERE f_leak(dtitle) ORDER BY did; -NOTICE: f_leak => my first novel -NOTICE: f_leak => my first manga -NOTICE: f_leak => great science fiction -NOTICE: f_leak => great manga -NOTICE: f_leak => awesome science fiction - did | cid | dlevel | dauthor | dtitle ------+-----+--------+-------------------+------------------------- - 1 | 11 | 1 | regress_rls_bob | my first novel - 4 | 44 | 1 | regress_rls_bob | my first manga - 6 | 22 | 1 | regress_rls_carol | great science fiction - 8 | 44 | 1 | regress_rls_carol | great manga - 9 | 22 | 1 | regress_rls_dave | awesome science fiction -(5 rows) - -SELECT * FROM document NATURAL JOIN category WHERE f_leak(dtitle) ORDER BY did; -NOTICE: f_leak => my first novel -NOTICE: f_leak => my first manga -NOTICE: f_leak => great science fiction -NOTICE: f_leak => great manga -NOTICE: f_leak => awesome science fiction - cid | did | dlevel | dauthor | dtitle | cname ------+-----+--------+-------------------+-------------------------+----------------- - 11 | 1 | 1 | regress_rls_bob | my first novel | novel - 44 | 4 | 1 | regress_rls_bob | my first manga | manga - 22 | 6 | 1 | regress_rls_carol | great science fiction | science fiction - 44 | 8 | 1 | regress_rls_carol | great manga | manga - 22 | 9 | 1 | regress_rls_dave | awesome science fiction | science fiction -(5 rows) - --- try a sampled version -SELECT * FROM document TABLESAMPLE BERNOULLI(50) REPEATABLE(0) - WHERE f_leak(dtitle) ORDER BY did; -NOTICE: f_leak => my first manga -NOTICE: f_leak => great science fiction -NOTICE: f_leak => great manga -NOTICE: f_leak => awesome science fiction - did | cid | dlevel | dauthor | dtitle ------+-----+--------+-------------------+------------------------- - 4 | 44 | 1 | regress_rls_bob | my first manga - 6 | 22 | 1 | regress_rls_carol | great science fiction - 8 | 44 | 1 | regress_rls_carol | great manga - 9 | 22 | 1 | regress_rls_dave | awesome science fiction -(4 rows) - --- viewpoint from regress_rls_carol -SET SESSION AUTHORIZATION regress_rls_carol; -SELECT * FROM document WHERE f_leak(dtitle) ORDER BY did; -NOTICE: f_leak => my first novel -NOTICE: f_leak => my second novel -NOTICE: f_leak => my science fiction -NOTICE: f_leak => my first manga -NOTICE: f_leak => my second manga -NOTICE: f_leak => great science fiction -NOTICE: f_leak => great technology book -NOTICE: f_leak => great manga -NOTICE: f_leak => awesome science fiction -NOTICE: f_leak => awesome technology book - did | cid | dlevel | dauthor | dtitle ------+-----+--------+-------------------+------------------------- - 1 | 11 | 1 | regress_rls_bob | my first novel - 2 | 11 | 2 | regress_rls_bob | my second novel - 3 | 22 | 2 | regress_rls_bob | my science fiction - 4 | 44 | 1 | regress_rls_bob | my first manga - 5 | 44 | 2 | regress_rls_bob | my second manga - 6 | 22 | 1 | regress_rls_carol | great science fiction - 7 | 33 | 2 | regress_rls_carol | great technology book - 8 | 44 | 1 | regress_rls_carol | great manga - 9 | 22 | 1 | regress_rls_dave | awesome science fiction - 10 | 33 | 2 | regress_rls_dave | awesome technology book -(10 rows) - -SELECT * FROM document NATURAL JOIN category WHERE f_leak(dtitle) ORDER BY did; -NOTICE: f_leak => my first novel -NOTICE: f_leak => my second novel -NOTICE: f_leak => my science fiction -NOTICE: f_leak => my first manga -NOTICE: f_leak => my second manga -NOTICE: f_leak => great science fiction -NOTICE: f_leak => great technology book -NOTICE: f_leak => great manga -NOTICE: f_leak => awesome science fiction -NOTICE: f_leak => awesome technology book - cid | did | dlevel | dauthor | dtitle | cname ------+-----+--------+-------------------+-------------------------+----------------- - 11 | 1 | 1 | regress_rls_bob | my first novel | novel - 11 | 2 | 2 | regress_rls_bob | my second novel | novel - 22 | 3 | 2 | regress_rls_bob | my science fiction | science fiction - 44 | 4 | 1 | regress_rls_bob | my first manga | manga - 44 | 5 | 2 | regress_rls_bob | my second manga | manga - 22 | 6 | 1 | regress_rls_carol | great science fiction | science fiction - 33 | 7 | 2 | regress_rls_carol | great technology book | technology - 44 | 8 | 1 | regress_rls_carol | great manga | manga - 22 | 9 | 1 | regress_rls_dave | awesome science fiction | science fiction - 33 | 10 | 2 | regress_rls_dave | awesome technology book | technology -(10 rows) - --- try a sampled version -SELECT * FROM document TABLESAMPLE BERNOULLI(50) REPEATABLE(0) - WHERE f_leak(dtitle) ORDER BY did; -NOTICE: f_leak => my first manga -NOTICE: f_leak => my second manga -NOTICE: f_leak => great science fiction -NOTICE: f_leak => great manga -NOTICE: f_leak => awesome science fiction - did | cid | dlevel | dauthor | dtitle ------+-----+--------+-------------------+------------------------- - 4 | 44 | 1 | regress_rls_bob | my first manga - 5 | 44 | 2 | regress_rls_bob | my second manga - 6 | 22 | 1 | regress_rls_carol | great science fiction - 8 | 44 | 1 | regress_rls_carol | great manga - 9 | 22 | 1 | regress_rls_dave | awesome science fiction -(5 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM document WHERE f_leak(dtitle); - QUERY PLAN ----------------------------------------------------- - Seq Scan on document - Filter: ((dlevel <= $0) AND f_leak(dtitle)) - InitPlan 1 (returns $0) - -> Index Scan using uaccount_pkey on uaccount - Index Cond: (pguser = CURRENT_USER) -(5 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM document NATURAL JOIN category WHERE f_leak(dtitle); - QUERY PLAN ------------------------------------------------------------ - Hash Join - Hash Cond: (category.cid = document.cid) - InitPlan 1 (returns $0) - -> Index Scan using uaccount_pkey on uaccount - Index Cond: (pguser = CURRENT_USER) - -> Seq Scan on category - -> Hash - -> Seq Scan on document - Filter: ((dlevel <= $0) AND f_leak(dtitle)) -(9 rows) - --- viewpoint from regress_rls_dave -SET SESSION AUTHORIZATION regress_rls_dave; -SELECT * FROM document WHERE f_leak(dtitle) ORDER BY did; -NOTICE: f_leak => my first novel -NOTICE: f_leak => my second novel -NOTICE: f_leak => my science fiction -NOTICE: f_leak => great science fiction -NOTICE: f_leak => great technology book -NOTICE: f_leak => awesome science fiction -NOTICE: f_leak => awesome technology book - did | cid | dlevel | dauthor | dtitle ------+-----+--------+-------------------+------------------------- - 1 | 11 | 1 | regress_rls_bob | my first novel - 2 | 11 | 2 | regress_rls_bob | my second novel - 3 | 22 | 2 | regress_rls_bob | my science fiction - 6 | 22 | 1 | regress_rls_carol | great science fiction - 7 | 33 | 2 | regress_rls_carol | great technology book - 9 | 22 | 1 | regress_rls_dave | awesome science fiction - 10 | 33 | 2 | regress_rls_dave | awesome technology book -(7 rows) - -SELECT * FROM document NATURAL JOIN category WHERE f_leak(dtitle) ORDER BY did; -NOTICE: f_leak => my first novel -NOTICE: f_leak => my second novel -NOTICE: f_leak => my science fiction -NOTICE: f_leak => great science fiction -NOTICE: f_leak => great technology book -NOTICE: f_leak => awesome science fiction -NOTICE: f_leak => awesome technology book - cid | did | dlevel | dauthor | dtitle | cname ------+-----+--------+-------------------+-------------------------+----------------- - 11 | 1 | 1 | regress_rls_bob | my first novel | novel - 11 | 2 | 2 | regress_rls_bob | my second novel | novel - 22 | 3 | 2 | regress_rls_bob | my science fiction | science fiction - 22 | 6 | 1 | regress_rls_carol | great science fiction | science fiction - 33 | 7 | 2 | regress_rls_carol | great technology book | technology - 22 | 9 | 1 | regress_rls_dave | awesome science fiction | science fiction - 33 | 10 | 2 | regress_rls_dave | awesome technology book | technology -(7 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM document WHERE f_leak(dtitle); - QUERY PLAN ----------------------------------------------------------------------------------------------- - Seq Scan on document - Filter: ((cid <> 44) AND (cid <> 44) AND (cid < 50) AND (dlevel <= $0) AND f_leak(dtitle)) - InitPlan 1 (returns $0) - -> Index Scan using uaccount_pkey on uaccount - Index Cond: (pguser = CURRENT_USER) -(5 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM document NATURAL JOIN category WHERE f_leak(dtitle); - QUERY PLAN ----------------------------------------------------------------------------------------------------------- - Hash Join - Hash Cond: (category.cid = document.cid) - InitPlan 1 (returns $0) - -> Index Scan using uaccount_pkey on uaccount - Index Cond: (pguser = CURRENT_USER) - -> Seq Scan on category - -> Hash - -> Seq Scan on document - Filter: ((cid <> 44) AND (cid <> 44) AND (cid < 50) AND (dlevel <= $0) AND f_leak(dtitle)) -(9 rows) - --- 44 would technically fail for both p2r and p1r, but we should get an error --- back from p1r for this because it sorts first -INSERT INTO document VALUES (100, 44, 1, 'regress_rls_dave', 'testing sorting of policies'); -- fail -ERROR: new row violates row-level security policy "p1r" for table "document" --- Just to see a p2r error -INSERT INTO document VALUES (100, 55, 1, 'regress_rls_dave', 'testing sorting of policies'); -- fail -ERROR: new row violates row-level security policy "p2r" for table "document" --- only owner can change policies -ALTER POLICY p1 ON document USING (true); --fail -ERROR: must be owner of table document -DROP POLICY p1 ON document; --fail -ERROR: must be owner of relation document -SET SESSION AUTHORIZATION regress_rls_alice; -ALTER POLICY p1 ON document USING (dauthor = current_user); --- viewpoint from regress_rls_bob again -SET SESSION AUTHORIZATION regress_rls_bob; -SELECT * FROM document WHERE f_leak(dtitle) ORDER BY did; -NOTICE: f_leak => my first novel -NOTICE: f_leak => my second novel -NOTICE: f_leak => my science fiction -NOTICE: f_leak => my first manga -NOTICE: f_leak => my second manga - did | cid | dlevel | dauthor | dtitle ------+-----+--------+-----------------+-------------------- - 1 | 11 | 1 | regress_rls_bob | my first novel - 2 | 11 | 2 | regress_rls_bob | my second novel - 3 | 22 | 2 | regress_rls_bob | my science fiction - 4 | 44 | 1 | regress_rls_bob | my first manga - 5 | 44 | 2 | regress_rls_bob | my second manga -(5 rows) - -SELECT * FROM document NATURAL JOIN category WHERE f_leak(dtitle) ORDER by did; -NOTICE: f_leak => my first novel -NOTICE: f_leak => my second novel -NOTICE: f_leak => my science fiction -NOTICE: f_leak => my first manga -NOTICE: f_leak => my second manga - cid | did | dlevel | dauthor | dtitle | cname ------+-----+--------+-----------------+--------------------+----------------- - 11 | 1 | 1 | regress_rls_bob | my first novel | novel - 11 | 2 | 2 | regress_rls_bob | my second novel | novel - 22 | 3 | 2 | regress_rls_bob | my science fiction | science fiction - 44 | 4 | 1 | regress_rls_bob | my first manga | manga - 44 | 5 | 2 | regress_rls_bob | my second manga | manga -(5 rows) - --- viewpoint from rls_regres_carol again -SET SESSION AUTHORIZATION regress_rls_carol; -SELECT * FROM document WHERE f_leak(dtitle) ORDER BY did; -NOTICE: f_leak => great science fiction -NOTICE: f_leak => great technology book -NOTICE: f_leak => great manga - did | cid | dlevel | dauthor | dtitle ------+-----+--------+-------------------+----------------------- - 6 | 22 | 1 | regress_rls_carol | great science fiction - 7 | 33 | 2 | regress_rls_carol | great technology book - 8 | 44 | 1 | regress_rls_carol | great manga -(3 rows) - -SELECT * FROM document NATURAL JOIN category WHERE f_leak(dtitle) ORDER by did; -NOTICE: f_leak => great science fiction -NOTICE: f_leak => great technology book -NOTICE: f_leak => great manga - cid | did | dlevel | dauthor | dtitle | cname ------+-----+--------+-------------------+-----------------------+----------------- - 22 | 6 | 1 | regress_rls_carol | great science fiction | science fiction - 33 | 7 | 2 | regress_rls_carol | great technology book | technology - 44 | 8 | 1 | regress_rls_carol | great manga | manga -(3 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM document WHERE f_leak(dtitle); - QUERY PLAN ---------------------------------------------------------- - Seq Scan on document - Filter: ((dauthor = CURRENT_USER) AND f_leak(dtitle)) -(2 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM document NATURAL JOIN category WHERE f_leak(dtitle); - QUERY PLAN ---------------------------------------------------------------- - Nested Loop - -> Seq Scan on document - Filter: ((dauthor = CURRENT_USER) AND f_leak(dtitle)) - -> Index Scan using category_pkey on category - Index Cond: (cid = document.cid) -(5 rows) - --- interaction of FK/PK constraints -SET SESSION AUTHORIZATION regress_rls_alice; -CREATE POLICY p2 ON category - USING (CASE WHEN current_user = 'regress_rls_bob' THEN cid IN (11, 33) - WHEN current_user = 'regress_rls_carol' THEN cid IN (22, 44) - ELSE false END); -ALTER TABLE category ENABLE ROW LEVEL SECURITY; --- cannot delete PK referenced by invisible FK -SET SESSION AUTHORIZATION regress_rls_bob; -SELECT * FROM document d FULL OUTER JOIN category c on d.cid = c.cid ORDER BY d.did, c.cid; - did | cid | dlevel | dauthor | dtitle | cid | cname ------+-----+--------+-----------------+--------------------+-----+------------ - 1 | 11 | 1 | regress_rls_bob | my first novel | 11 | novel - 2 | 11 | 2 | regress_rls_bob | my second novel | 11 | novel - 3 | 22 | 2 | regress_rls_bob | my science fiction | | - 4 | 44 | 1 | regress_rls_bob | my first manga | | - 5 | 44 | 2 | regress_rls_bob | my second manga | | - | | | | | 33 | technology -(6 rows) - -DELETE FROM category WHERE cid = 33; -- fails with FK violation -ERROR: update or delete on table "category" violates foreign key constraint "document_cid_fkey" on table "document" -DETAIL: Key is still referenced from table "document". --- can insert FK referencing invisible PK -SET SESSION AUTHORIZATION regress_rls_carol; -SELECT * FROM document d FULL OUTER JOIN category c on d.cid = c.cid ORDER BY d.did, c.cid; - did | cid | dlevel | dauthor | dtitle | cid | cname ------+-----+--------+-------------------+-----------------------+-----+----------------- - 6 | 22 | 1 | regress_rls_carol | great science fiction | 22 | science fiction - 7 | 33 | 2 | regress_rls_carol | great technology book | | - 8 | 44 | 1 | regress_rls_carol | great manga | 44 | manga -(3 rows) - -INSERT INTO document VALUES (11, 33, 1, current_user, 'hoge'); --- UNIQUE or PRIMARY KEY constraint violation DOES reveal presence of row -SET SESSION AUTHORIZATION regress_rls_bob; -INSERT INTO document VALUES (8, 44, 1, 'regress_rls_bob', 'my third manga'); -- Must fail with unique violation, revealing presence of did we can't see -ERROR: duplicate key value violates unique constraint "document_pkey" -SELECT * FROM document WHERE did = 8; -- and confirm we can't see it - did | cid | dlevel | dauthor | dtitle ------+-----+--------+---------+-------- -(0 rows) - --- RLS policies are checked before constraints -INSERT INTO document VALUES (8, 44, 1, 'regress_rls_carol', 'my third manga'); -- Should fail with RLS check violation, not duplicate key violation -ERROR: new row violates row-level security policy for table "document" -UPDATE document SET did = 8, dauthor = 'regress_rls_carol' WHERE did = 5; -- Should fail with RLS check violation, not duplicate key violation -ERROR: new row violates row-level security policy for table "document" --- database superuser does bypass RLS policy when enabled -RESET SESSION AUTHORIZATION; -SET row_security TO ON; -SELECT * FROM document; - did | cid | dlevel | dauthor | dtitle ------+-----+--------+-------------------+------------------------- - 1 | 11 | 1 | regress_rls_bob | my first novel - 2 | 11 | 2 | regress_rls_bob | my second novel - 3 | 22 | 2 | regress_rls_bob | my science fiction - 4 | 44 | 1 | regress_rls_bob | my first manga - 5 | 44 | 2 | regress_rls_bob | my second manga - 6 | 22 | 1 | regress_rls_carol | great science fiction - 7 | 33 | 2 | regress_rls_carol | great technology book - 8 | 44 | 1 | regress_rls_carol | great manga - 9 | 22 | 1 | regress_rls_dave | awesome science fiction - 10 | 33 | 2 | regress_rls_dave | awesome technology book - 11 | 33 | 1 | regress_rls_carol | hoge -(11 rows) - -SELECT * FROM category; - cid | cname ------+----------------- - 11 | novel - 22 | science fiction - 33 | technology - 44 | manga -(4 rows) - --- database superuser does bypass RLS policy when disabled -RESET SESSION AUTHORIZATION; -SET row_security TO OFF; -SELECT * FROM document; - did | cid | dlevel | dauthor | dtitle ------+-----+--------+-------------------+------------------------- - 1 | 11 | 1 | regress_rls_bob | my first novel - 2 | 11 | 2 | regress_rls_bob | my second novel - 3 | 22 | 2 | regress_rls_bob | my science fiction - 4 | 44 | 1 | regress_rls_bob | my first manga - 5 | 44 | 2 | regress_rls_bob | my second manga - 6 | 22 | 1 | regress_rls_carol | great science fiction - 7 | 33 | 2 | regress_rls_carol | great technology book - 8 | 44 | 1 | regress_rls_carol | great manga - 9 | 22 | 1 | regress_rls_dave | awesome science fiction - 10 | 33 | 2 | regress_rls_dave | awesome technology book - 11 | 33 | 1 | regress_rls_carol | hoge -(11 rows) - -SELECT * FROM category; - cid | cname ------+----------------- - 11 | novel - 22 | science fiction - 33 | technology - 44 | manga -(4 rows) - --- database non-superuser with bypass privilege can bypass RLS policy when disabled -SET SESSION AUTHORIZATION regress_rls_exempt_user; -SET row_security TO OFF; -SELECT * FROM document; - did | cid | dlevel | dauthor | dtitle ------+-----+--------+-------------------+------------------------- - 1 | 11 | 1 | regress_rls_bob | my first novel - 2 | 11 | 2 | regress_rls_bob | my second novel - 3 | 22 | 2 | regress_rls_bob | my science fiction - 4 | 44 | 1 | regress_rls_bob | my first manga - 5 | 44 | 2 | regress_rls_bob | my second manga - 6 | 22 | 1 | regress_rls_carol | great science fiction - 7 | 33 | 2 | regress_rls_carol | great technology book - 8 | 44 | 1 | regress_rls_carol | great manga - 9 | 22 | 1 | regress_rls_dave | awesome science fiction - 10 | 33 | 2 | regress_rls_dave | awesome technology book - 11 | 33 | 1 | regress_rls_carol | hoge -(11 rows) - -SELECT * FROM category; - cid | cname ------+----------------- - 11 | novel - 22 | science fiction - 33 | technology - 44 | manga -(4 rows) - --- RLS policy does not apply to table owner when RLS enabled. -SET SESSION AUTHORIZATION regress_rls_alice; -SET row_security TO ON; -SELECT * FROM document; - did | cid | dlevel | dauthor | dtitle ------+-----+--------+-------------------+------------------------- - 1 | 11 | 1 | regress_rls_bob | my first novel - 2 | 11 | 2 | regress_rls_bob | my second novel - 3 | 22 | 2 | regress_rls_bob | my science fiction - 4 | 44 | 1 | regress_rls_bob | my first manga - 5 | 44 | 2 | regress_rls_bob | my second manga - 6 | 22 | 1 | regress_rls_carol | great science fiction - 7 | 33 | 2 | regress_rls_carol | great technology book - 8 | 44 | 1 | regress_rls_carol | great manga - 9 | 22 | 1 | regress_rls_dave | awesome science fiction - 10 | 33 | 2 | regress_rls_dave | awesome technology book - 11 | 33 | 1 | regress_rls_carol | hoge -(11 rows) - -SELECT * FROM category; - cid | cname ------+----------------- - 11 | novel - 22 | science fiction - 33 | technology - 44 | manga -(4 rows) - --- RLS policy does not apply to table owner when RLS disabled. -SET SESSION AUTHORIZATION regress_rls_alice; -SET row_security TO OFF; -SELECT * FROM document; - did | cid | dlevel | dauthor | dtitle ------+-----+--------+-------------------+------------------------- - 1 | 11 | 1 | regress_rls_bob | my first novel - 2 | 11 | 2 | regress_rls_bob | my second novel - 3 | 22 | 2 | regress_rls_bob | my science fiction - 4 | 44 | 1 | regress_rls_bob | my first manga - 5 | 44 | 2 | regress_rls_bob | my second manga - 6 | 22 | 1 | regress_rls_carol | great science fiction - 7 | 33 | 2 | regress_rls_carol | great technology book - 8 | 44 | 1 | regress_rls_carol | great manga - 9 | 22 | 1 | regress_rls_dave | awesome science fiction - 10 | 33 | 2 | regress_rls_dave | awesome technology book - 11 | 33 | 1 | regress_rls_carol | hoge -(11 rows) - -SELECT * FROM category; - cid | cname ------+----------------- - 11 | novel - 22 | science fiction - 33 | technology - 44 | manga -(4 rows) - --- --- Table inheritance and RLS policy --- -SET SESSION AUTHORIZATION regress_rls_alice; -SET row_security TO ON; -CREATE TABLE t1 (id int not null primary key, a int, junk1 text, b text); -ALTER TABLE t1 DROP COLUMN junk1; -- just a disturbing factor -GRANT ALL ON t1 TO public; -COPY t1 FROM stdin WITH ; -CREATE TABLE t2 (c float) INHERITS (t1); -GRANT ALL ON t2 TO public; -COPY t2 FROM stdin; -CREATE TABLE t3 (id int not null primary key, c text, b text, a int); -ALTER TABLE t3 INHERIT t1; -GRANT ALL ON t3 TO public; -COPY t3(id, a,b,c) FROM stdin; -CREATE POLICY p1 ON t1 FOR ALL TO PUBLIC USING (a % 2 = 0); -- be even number -CREATE POLICY p2 ON t2 FOR ALL TO PUBLIC USING (a % 2 = 1); -- be odd number -ALTER TABLE t1 ENABLE ROW LEVEL SECURITY; -ALTER TABLE t2 ENABLE ROW LEVEL SECURITY; -SET SESSION AUTHORIZATION regress_rls_bob; -SELECT * FROM t1; - id | a | b ------+---+----- - 102 | 2 | bbb - 104 | 4 | dad - 202 | 2 | bcd - 204 | 4 | def - 302 | 2 | yyy -(5 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM t1; - QUERY PLAN -------------------------------- - Append - -> Seq Scan on t1 t1_1 - Filter: ((a % 2) = 0) - -> Seq Scan on t2 t1_2 - Filter: ((a % 2) = 0) - -> Seq Scan on t3 t1_3 - Filter: ((a % 2) = 0) -(7 rows) - -SELECT * FROM t1 WHERE f_leak(b); -NOTICE: f_leak => bbb -NOTICE: f_leak => dad -NOTICE: f_leak => bcd -NOTICE: f_leak => def -NOTICE: f_leak => yyy - id | a | b ------+---+----- - 102 | 2 | bbb - 104 | 4 | dad - 202 | 2 | bcd - 204 | 4 | def - 302 | 2 | yyy -(5 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM t1 WHERE f_leak(b); - QUERY PLAN ------------------------------------------------ - Append - -> Seq Scan on t1 t1_1 - Filter: (((a % 2) = 0) AND f_leak(b)) - -> Seq Scan on t2 t1_2 - Filter: (((a % 2) = 0) AND f_leak(b)) - -> Seq Scan on t3 t1_3 - Filter: (((a % 2) = 0) AND f_leak(b)) -(7 rows) - --- reference to system column -SELECT tableoid::regclass, * FROM t1; - tableoid | id | a | b -----------+-----+---+----- - t1 | 102 | 2 | bbb - t1 | 104 | 4 | dad - t2 | 202 | 2 | bcd - t2 | 204 | 4 | def - t3 | 302 | 2 | yyy -(5 rows) - -EXPLAIN (COSTS OFF) SELECT *, t1 FROM t1; - QUERY PLAN -------------------------------- - Append - -> Seq Scan on t1 t1_1 - Filter: ((a % 2) = 0) - -> Seq Scan on t2 t1_2 - Filter: ((a % 2) = 0) - -> Seq Scan on t3 t1_3 - Filter: ((a % 2) = 0) -(7 rows) - --- reference to whole-row reference -SELECT *, t1 FROM t1; - id | a | b | t1 ------+---+-----+------------- - 102 | 2 | bbb | (102,2,bbb) - 104 | 4 | dad | (104,4,dad) - 202 | 2 | bcd | (202,2,bcd) - 204 | 4 | def | (204,4,def) - 302 | 2 | yyy | (302,2,yyy) -(5 rows) - -EXPLAIN (COSTS OFF) SELECT *, t1 FROM t1; - QUERY PLAN -------------------------------- - Append - -> Seq Scan on t1 t1_1 - Filter: ((a % 2) = 0) - -> Seq Scan on t2 t1_2 - Filter: ((a % 2) = 0) - -> Seq Scan on t3 t1_3 - Filter: ((a % 2) = 0) -(7 rows) - --- for share/update lock -SELECT * FROM t1 FOR SHARE; - id | a | b ------+---+----- - 102 | 2 | bbb - 104 | 4 | dad - 202 | 2 | bcd - 204 | 4 | def - 302 | 2 | yyy -(5 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM t1 FOR SHARE; - QUERY PLAN -------------------------------------- - LockRows - -> Append - -> Seq Scan on t1 t1_1 - Filter: ((a % 2) = 0) - -> Seq Scan on t2 t1_2 - Filter: ((a % 2) = 0) - -> Seq Scan on t3 t1_3 - Filter: ((a % 2) = 0) -(8 rows) - -SELECT * FROM t1 WHERE f_leak(b) FOR SHARE; -NOTICE: f_leak => bbb -NOTICE: f_leak => dad -NOTICE: f_leak => bcd -NOTICE: f_leak => def -NOTICE: f_leak => yyy - id | a | b ------+---+----- - 102 | 2 | bbb - 104 | 4 | dad - 202 | 2 | bcd - 204 | 4 | def - 302 | 2 | yyy -(5 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM t1 WHERE f_leak(b) FOR SHARE; - QUERY PLAN ------------------------------------------------------ - LockRows - -> Append - -> Seq Scan on t1 t1_1 - Filter: (((a % 2) = 0) AND f_leak(b)) - -> Seq Scan on t2 t1_2 - Filter: (((a % 2) = 0) AND f_leak(b)) - -> Seq Scan on t3 t1_3 - Filter: (((a % 2) = 0) AND f_leak(b)) -(8 rows) - --- union all query -SELECT a, b, tableoid::regclass FROM t2 UNION ALL SELECT a, b, tableoid::regclass FROM t3; - a | b | tableoid ----+-----+---------- - 1 | abc | t2 - 3 | cde | t2 - 1 | xxx | t3 - 2 | yyy | t3 - 3 | zzz | t3 -(5 rows) - -EXPLAIN (COSTS OFF) SELECT a, b, tableoid::regclass FROM t2 UNION ALL SELECT a, b, tableoid::regclass FROM t3; - QUERY PLAN -------------------------------- - Append - -> Seq Scan on t2 - Filter: ((a % 2) = 1) - -> Seq Scan on t3 -(4 rows) - --- superuser is allowed to bypass RLS checks -RESET SESSION AUTHORIZATION; -SET row_security TO OFF; -SELECT * FROM t1 WHERE f_leak(b); -NOTICE: f_leak => aba -NOTICE: f_leak => bbb -NOTICE: f_leak => ccc -NOTICE: f_leak => dad -NOTICE: f_leak => abc -NOTICE: f_leak => bcd -NOTICE: f_leak => cde -NOTICE: f_leak => def -NOTICE: f_leak => xxx -NOTICE: f_leak => yyy -NOTICE: f_leak => zzz - id | a | b ------+---+----- - 101 | 1 | aba - 102 | 2 | bbb - 103 | 3 | ccc - 104 | 4 | dad - 201 | 1 | abc - 202 | 2 | bcd - 203 | 3 | cde - 204 | 4 | def - 301 | 1 | xxx - 302 | 2 | yyy - 303 | 3 | zzz -(11 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM t1 WHERE f_leak(b); - QUERY PLAN ---------------------------- - Append - -> Seq Scan on t1 t1_1 - Filter: f_leak(b) - -> Seq Scan on t2 t1_2 - Filter: f_leak(b) - -> Seq Scan on t3 t1_3 - Filter: f_leak(b) -(7 rows) - --- non-superuser with bypass privilege can bypass RLS policy when disabled -SET SESSION AUTHORIZATION regress_rls_exempt_user; -SET row_security TO OFF; -SELECT * FROM t1 WHERE f_leak(b); -NOTICE: f_leak => aba -NOTICE: f_leak => bbb -NOTICE: f_leak => ccc -NOTICE: f_leak => dad -NOTICE: f_leak => abc -NOTICE: f_leak => bcd -NOTICE: f_leak => cde -NOTICE: f_leak => def -NOTICE: f_leak => xxx -NOTICE: f_leak => yyy -NOTICE: f_leak => zzz - id | a | b ------+---+----- - 101 | 1 | aba - 102 | 2 | bbb - 103 | 3 | ccc - 104 | 4 | dad - 201 | 1 | abc - 202 | 2 | bcd - 203 | 3 | cde - 204 | 4 | def - 301 | 1 | xxx - 302 | 2 | yyy - 303 | 3 | zzz -(11 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM t1 WHERE f_leak(b); - QUERY PLAN ---------------------------- - Append - -> Seq Scan on t1 t1_1 - Filter: f_leak(b) - -> Seq Scan on t2 t1_2 - Filter: f_leak(b) - -> Seq Scan on t3 t1_3 - Filter: f_leak(b) -(7 rows) - --- --- Partitioned Tables --- -SET SESSION AUTHORIZATION regress_rls_alice; -CREATE TABLE part_document ( - did int, - cid int, - dlevel int not null, - dauthor name, - dtitle text -) PARTITION BY RANGE (cid); -GRANT ALL ON part_document TO public; --- Create partitions for document categories -CREATE TABLE part_document_fiction PARTITION OF part_document FOR VALUES FROM (11) to (12); -CREATE TABLE part_document_satire PARTITION OF part_document FOR VALUES FROM (55) to (56); -CREATE TABLE part_document_nonfiction PARTITION OF part_document FOR VALUES FROM (99) to (100); -GRANT ALL ON part_document_fiction TO public; -GRANT ALL ON part_document_satire TO public; -GRANT ALL ON part_document_nonfiction TO public; -INSERT INTO part_document VALUES - ( 1, 11, 1, 'regress_rls_bob', 'my first novel'), - ( 2, 11, 2, 'regress_rls_bob', 'my second novel'), - ( 3, 99, 2, 'regress_rls_bob', 'my science textbook'), - ( 4, 55, 1, 'regress_rls_bob', 'my first satire'), - ( 5, 99, 2, 'regress_rls_bob', 'my history book'), - ( 6, 11, 1, 'regress_rls_carol', 'great science fiction'), - ( 7, 99, 2, 'regress_rls_carol', 'great technology book'), - ( 8, 55, 2, 'regress_rls_carol', 'great satire'), - ( 9, 11, 1, 'regress_rls_dave', 'awesome science fiction'), - (10, 99, 2, 'regress_rls_dave', 'awesome technology book'); -ALTER TABLE part_document ENABLE ROW LEVEL SECURITY; --- Create policy on parent --- user's security level must be higher than or equal to document's -CREATE POLICY pp1 ON part_document AS PERMISSIVE - USING (dlevel <= (SELECT seclv FROM uaccount WHERE pguser = current_user)); --- Dave is only allowed to see cid < 55 -CREATE POLICY pp1r ON part_document AS RESTRICTIVE TO regress_rls_dave - USING (cid < 55); -\d+ part_document - Partitioned table "regress_rls_schema.part_document" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ----------+---------+-----------+----------+---------+----------+--------------+------------- - did | integer | | | | plain | | - cid | integer | | | | plain | | - dlevel | integer | | not null | | plain | | - dauthor | name | | | | plain | | - dtitle | text | | | | extended | | -Partition key: RANGE (cid) -Policies: - POLICY "pp1" - USING ((dlevel <= ( SELECT uaccount.seclv - FROM uaccount - WHERE (uaccount.pguser = CURRENT_USER)))) - POLICY "pp1r" AS RESTRICTIVE - TO regress_rls_dave - USING ((cid < 55)) -Partitions: part_document_fiction FOR VALUES FROM (11) TO (12), - part_document_nonfiction FOR VALUES FROM (99) TO (100), - part_document_satire FOR VALUES FROM (55) TO (56) - -SELECT * FROM pg_policies WHERE schemaname = 'regress_rls_schema' AND tablename like '%part_document%' ORDER BY policyname; - schemaname | tablename | policyname | permissive | roles | cmd | qual | with_check ---------------------+---------------+------------+-------------+--------------------+-----+--------------------------------------------+------------ - regress_rls_schema | part_document | pp1 | PERMISSIVE | {public} | ALL | (dlevel <= ( SELECT uaccount.seclv +| - | | | | | | FROM uaccount +| - | | | | | | WHERE (uaccount.pguser = CURRENT_USER))) | - regress_rls_schema | part_document | pp1r | RESTRICTIVE | {regress_rls_dave} | ALL | (cid < 55) | -(2 rows) - --- viewpoint from regress_rls_bob -SET SESSION AUTHORIZATION regress_rls_bob; -SET row_security TO ON; -SELECT * FROM part_document WHERE f_leak(dtitle) ORDER BY did; -NOTICE: f_leak => my first novel -NOTICE: f_leak => great science fiction -NOTICE: f_leak => awesome science fiction -NOTICE: f_leak => my first satire - did | cid | dlevel | dauthor | dtitle ------+-----+--------+-------------------+------------------------- - 1 | 11 | 1 | regress_rls_bob | my first novel - 4 | 55 | 1 | regress_rls_bob | my first satire - 6 | 11 | 1 | regress_rls_carol | great science fiction - 9 | 11 | 1 | regress_rls_dave | awesome science fiction -(4 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM part_document WHERE f_leak(dtitle); - QUERY PLAN ------------------------------------------------------------- - Append - InitPlan 1 (returns $0) - -> Index Scan using uaccount_pkey on uaccount - Index Cond: (pguser = CURRENT_USER) - -> Seq Scan on part_document_fiction part_document_1 - Filter: ((dlevel <= $0) AND f_leak(dtitle)) - -> Seq Scan on part_document_satire part_document_2 - Filter: ((dlevel <= $0) AND f_leak(dtitle)) - -> Seq Scan on part_document_nonfiction part_document_3 - Filter: ((dlevel <= $0) AND f_leak(dtitle)) -(10 rows) - --- viewpoint from regress_rls_carol -SET SESSION AUTHORIZATION regress_rls_carol; -SELECT * FROM part_document WHERE f_leak(dtitle) ORDER BY did; -NOTICE: f_leak => my first novel -NOTICE: f_leak => my second novel -NOTICE: f_leak => great science fiction -NOTICE: f_leak => awesome science fiction -NOTICE: f_leak => my first satire -NOTICE: f_leak => great satire -NOTICE: f_leak => my science textbook -NOTICE: f_leak => my history book -NOTICE: f_leak => great technology book -NOTICE: f_leak => awesome technology book - did | cid | dlevel | dauthor | dtitle ------+-----+--------+-------------------+------------------------- - 1 | 11 | 1 | regress_rls_bob | my first novel - 2 | 11 | 2 | regress_rls_bob | my second novel - 3 | 99 | 2 | regress_rls_bob | my science textbook - 4 | 55 | 1 | regress_rls_bob | my first satire - 5 | 99 | 2 | regress_rls_bob | my history book - 6 | 11 | 1 | regress_rls_carol | great science fiction - 7 | 99 | 2 | regress_rls_carol | great technology book - 8 | 55 | 2 | regress_rls_carol | great satire - 9 | 11 | 1 | regress_rls_dave | awesome science fiction - 10 | 99 | 2 | regress_rls_dave | awesome technology book -(10 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM part_document WHERE f_leak(dtitle); - QUERY PLAN ------------------------------------------------------------- - Append - InitPlan 1 (returns $0) - -> Index Scan using uaccount_pkey on uaccount - Index Cond: (pguser = CURRENT_USER) - -> Seq Scan on part_document_fiction part_document_1 - Filter: ((dlevel <= $0) AND f_leak(dtitle)) - -> Seq Scan on part_document_satire part_document_2 - Filter: ((dlevel <= $0) AND f_leak(dtitle)) - -> Seq Scan on part_document_nonfiction part_document_3 - Filter: ((dlevel <= $0) AND f_leak(dtitle)) -(10 rows) - --- viewpoint from regress_rls_dave -SET SESSION AUTHORIZATION regress_rls_dave; -SELECT * FROM part_document WHERE f_leak(dtitle) ORDER BY did; -NOTICE: f_leak => my first novel -NOTICE: f_leak => my second novel -NOTICE: f_leak => great science fiction -NOTICE: f_leak => awesome science fiction - did | cid | dlevel | dauthor | dtitle ------+-----+--------+-------------------+------------------------- - 1 | 11 | 1 | regress_rls_bob | my first novel - 2 | 11 | 2 | regress_rls_bob | my second novel - 6 | 11 | 1 | regress_rls_carol | great science fiction - 9 | 11 | 1 | regress_rls_dave | awesome science fiction -(4 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM part_document WHERE f_leak(dtitle); - QUERY PLAN --------------------------------------------------------------- - Seq Scan on part_document_fiction part_document - Filter: ((cid < 55) AND (dlevel <= $0) AND f_leak(dtitle)) - InitPlan 1 (returns $0) - -> Index Scan using uaccount_pkey on uaccount - Index Cond: (pguser = CURRENT_USER) -(5 rows) - --- pp1 ERROR -INSERT INTO part_document VALUES (100, 11, 5, 'regress_rls_dave', 'testing pp1'); -- fail -ERROR: new row violates row-level security policy for table "part_document" --- pp1r ERROR -INSERT INTO part_document VALUES (100, 99, 1, 'regress_rls_dave', 'testing pp1r'); -- fail -ERROR: new row violates row-level security policy "pp1r" for table "part_document" --- Show that RLS policy does not apply for direct inserts to children --- This should fail with RLS POLICY pp1r violation. -INSERT INTO part_document VALUES (100, 55, 1, 'regress_rls_dave', 'testing RLS with partitions'); -- fail -ERROR: new row violates row-level security policy "pp1r" for table "part_document" --- But this should succeed. -INSERT INTO part_document_satire VALUES (100, 55, 1, 'regress_rls_dave', 'testing RLS with partitions'); -- success --- We still cannot see the row using the parent -SELECT * FROM part_document WHERE f_leak(dtitle) ORDER BY did; -NOTICE: f_leak => my first novel -NOTICE: f_leak => my second novel -NOTICE: f_leak => great science fiction -NOTICE: f_leak => awesome science fiction - did | cid | dlevel | dauthor | dtitle ------+-----+--------+-------------------+------------------------- - 1 | 11 | 1 | regress_rls_bob | my first novel - 2 | 11 | 2 | regress_rls_bob | my second novel - 6 | 11 | 1 | regress_rls_carol | great science fiction - 9 | 11 | 1 | regress_rls_dave | awesome science fiction -(4 rows) - --- But we can if we look directly -SELECT * FROM part_document_satire WHERE f_leak(dtitle) ORDER BY did; -NOTICE: f_leak => my first satire -NOTICE: f_leak => great satire -NOTICE: f_leak => testing RLS with partitions - did | cid | dlevel | dauthor | dtitle ------+-----+--------+-------------------+----------------------------- - 4 | 55 | 1 | regress_rls_bob | my first satire - 8 | 55 | 2 | regress_rls_carol | great satire - 100 | 55 | 1 | regress_rls_dave | testing RLS with partitions -(3 rows) - --- Turn on RLS and create policy on child to show RLS is checked before constraints -SET SESSION AUTHORIZATION regress_rls_alice; -ALTER TABLE part_document_satire ENABLE ROW LEVEL SECURITY; -CREATE POLICY pp3 ON part_document_satire AS RESTRICTIVE - USING (cid < 55); --- This should fail with RLS violation now. -SET SESSION AUTHORIZATION regress_rls_dave; -INSERT INTO part_document_satire VALUES (101, 55, 1, 'regress_rls_dave', 'testing RLS with partitions'); -- fail -ERROR: new row violates row-level security policy for table "part_document_satire" --- And now we cannot see directly into the partition either, due to RLS -SELECT * FROM part_document_satire WHERE f_leak(dtitle) ORDER BY did; - did | cid | dlevel | dauthor | dtitle ------+-----+--------+---------+-------- -(0 rows) - --- The parent looks same as before --- viewpoint from regress_rls_dave -SELECT * FROM part_document WHERE f_leak(dtitle) ORDER BY did; -NOTICE: f_leak => my first novel -NOTICE: f_leak => my second novel -NOTICE: f_leak => great science fiction -NOTICE: f_leak => awesome science fiction - did | cid | dlevel | dauthor | dtitle ------+-----+--------+-------------------+------------------------- - 1 | 11 | 1 | regress_rls_bob | my first novel - 2 | 11 | 2 | regress_rls_bob | my second novel - 6 | 11 | 1 | regress_rls_carol | great science fiction - 9 | 11 | 1 | regress_rls_dave | awesome science fiction -(4 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM part_document WHERE f_leak(dtitle); - QUERY PLAN --------------------------------------------------------------- - Seq Scan on part_document_fiction part_document - Filter: ((cid < 55) AND (dlevel <= $0) AND f_leak(dtitle)) - InitPlan 1 (returns $0) - -> Index Scan using uaccount_pkey on uaccount - Index Cond: (pguser = CURRENT_USER) -(5 rows) - --- viewpoint from regress_rls_carol -SET SESSION AUTHORIZATION regress_rls_carol; -SELECT * FROM part_document WHERE f_leak(dtitle) ORDER BY did; -NOTICE: f_leak => my first novel -NOTICE: f_leak => my second novel -NOTICE: f_leak => great science fiction -NOTICE: f_leak => awesome science fiction -NOTICE: f_leak => my first satire -NOTICE: f_leak => great satire -NOTICE: f_leak => testing RLS with partitions -NOTICE: f_leak => my science textbook -NOTICE: f_leak => my history book -NOTICE: f_leak => great technology book -NOTICE: f_leak => awesome technology book - did | cid | dlevel | dauthor | dtitle ------+-----+--------+-------------------+----------------------------- - 1 | 11 | 1 | regress_rls_bob | my first novel - 2 | 11 | 2 | regress_rls_bob | my second novel - 3 | 99 | 2 | regress_rls_bob | my science textbook - 4 | 55 | 1 | regress_rls_bob | my first satire - 5 | 99 | 2 | regress_rls_bob | my history book - 6 | 11 | 1 | regress_rls_carol | great science fiction - 7 | 99 | 2 | regress_rls_carol | great technology book - 8 | 55 | 2 | regress_rls_carol | great satire - 9 | 11 | 1 | regress_rls_dave | awesome science fiction - 10 | 99 | 2 | regress_rls_dave | awesome technology book - 100 | 55 | 1 | regress_rls_dave | testing RLS with partitions -(11 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM part_document WHERE f_leak(dtitle); - QUERY PLAN ------------------------------------------------------------- - Append - InitPlan 1 (returns $0) - -> Index Scan using uaccount_pkey on uaccount - Index Cond: (pguser = CURRENT_USER) - -> Seq Scan on part_document_fiction part_document_1 - Filter: ((dlevel <= $0) AND f_leak(dtitle)) - -> Seq Scan on part_document_satire part_document_2 - Filter: ((dlevel <= $0) AND f_leak(dtitle)) - -> Seq Scan on part_document_nonfiction part_document_3 - Filter: ((dlevel <= $0) AND f_leak(dtitle)) -(10 rows) - --- only owner can change policies -ALTER POLICY pp1 ON part_document USING (true); --fail -ERROR: must be owner of table part_document -DROP POLICY pp1 ON part_document; --fail -ERROR: must be owner of relation part_document -SET SESSION AUTHORIZATION regress_rls_alice; -ALTER POLICY pp1 ON part_document USING (dauthor = current_user); --- viewpoint from regress_rls_bob again -SET SESSION AUTHORIZATION regress_rls_bob; -SELECT * FROM part_document WHERE f_leak(dtitle) ORDER BY did; -NOTICE: f_leak => my first novel -NOTICE: f_leak => my second novel -NOTICE: f_leak => my first satire -NOTICE: f_leak => my science textbook -NOTICE: f_leak => my history book - did | cid | dlevel | dauthor | dtitle ------+-----+--------+-----------------+--------------------- - 1 | 11 | 1 | regress_rls_bob | my first novel - 2 | 11 | 2 | regress_rls_bob | my second novel - 3 | 99 | 2 | regress_rls_bob | my science textbook - 4 | 55 | 1 | regress_rls_bob | my first satire - 5 | 99 | 2 | regress_rls_bob | my history book -(5 rows) - --- viewpoint from rls_regres_carol again -SET SESSION AUTHORIZATION regress_rls_carol; -SELECT * FROM part_document WHERE f_leak(dtitle) ORDER BY did; -NOTICE: f_leak => great science fiction -NOTICE: f_leak => great satire -NOTICE: f_leak => great technology book - did | cid | dlevel | dauthor | dtitle ------+-----+--------+-------------------+----------------------- - 6 | 11 | 1 | regress_rls_carol | great science fiction - 7 | 99 | 2 | regress_rls_carol | great technology book - 8 | 55 | 2 | regress_rls_carol | great satire -(3 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM part_document WHERE f_leak(dtitle); - QUERY PLAN ---------------------------------------------------------------- - Append - -> Seq Scan on part_document_fiction part_document_1 - Filter: ((dauthor = CURRENT_USER) AND f_leak(dtitle)) - -> Seq Scan on part_document_satire part_document_2 - Filter: ((dauthor = CURRENT_USER) AND f_leak(dtitle)) - -> Seq Scan on part_document_nonfiction part_document_3 - Filter: ((dauthor = CURRENT_USER) AND f_leak(dtitle)) -(7 rows) - --- database superuser does bypass RLS policy when enabled -RESET SESSION AUTHORIZATION; -SET row_security TO ON; -SELECT * FROM part_document ORDER BY did; - did | cid | dlevel | dauthor | dtitle ------+-----+--------+-------------------+----------------------------- - 1 | 11 | 1 | regress_rls_bob | my first novel - 2 | 11 | 2 | regress_rls_bob | my second novel - 3 | 99 | 2 | regress_rls_bob | my science textbook - 4 | 55 | 1 | regress_rls_bob | my first satire - 5 | 99 | 2 | regress_rls_bob | my history book - 6 | 11 | 1 | regress_rls_carol | great science fiction - 7 | 99 | 2 | regress_rls_carol | great technology book - 8 | 55 | 2 | regress_rls_carol | great satire - 9 | 11 | 1 | regress_rls_dave | awesome science fiction - 10 | 99 | 2 | regress_rls_dave | awesome technology book - 100 | 55 | 1 | regress_rls_dave | testing RLS with partitions -(11 rows) - -SELECT * FROM part_document_satire ORDER by did; - did | cid | dlevel | dauthor | dtitle ------+-----+--------+-------------------+----------------------------- - 4 | 55 | 1 | regress_rls_bob | my first satire - 8 | 55 | 2 | regress_rls_carol | great satire - 100 | 55 | 1 | regress_rls_dave | testing RLS with partitions -(3 rows) - --- database non-superuser with bypass privilege can bypass RLS policy when disabled -SET SESSION AUTHORIZATION regress_rls_exempt_user; -SET row_security TO OFF; -SELECT * FROM part_document ORDER BY did; - did | cid | dlevel | dauthor | dtitle ------+-----+--------+-------------------+----------------------------- - 1 | 11 | 1 | regress_rls_bob | my first novel - 2 | 11 | 2 | regress_rls_bob | my second novel - 3 | 99 | 2 | regress_rls_bob | my science textbook - 4 | 55 | 1 | regress_rls_bob | my first satire - 5 | 99 | 2 | regress_rls_bob | my history book - 6 | 11 | 1 | regress_rls_carol | great science fiction - 7 | 99 | 2 | regress_rls_carol | great technology book - 8 | 55 | 2 | regress_rls_carol | great satire - 9 | 11 | 1 | regress_rls_dave | awesome science fiction - 10 | 99 | 2 | regress_rls_dave | awesome technology book - 100 | 55 | 1 | regress_rls_dave | testing RLS with partitions -(11 rows) - -SELECT * FROM part_document_satire ORDER by did; - did | cid | dlevel | dauthor | dtitle ------+-----+--------+-------------------+----------------------------- - 4 | 55 | 1 | regress_rls_bob | my first satire - 8 | 55 | 2 | regress_rls_carol | great satire - 100 | 55 | 1 | regress_rls_dave | testing RLS with partitions -(3 rows) - --- RLS policy does not apply to table owner when RLS enabled. -SET SESSION AUTHORIZATION regress_rls_alice; -SET row_security TO ON; -SELECT * FROM part_document ORDER by did; - did | cid | dlevel | dauthor | dtitle ------+-----+--------+-------------------+----------------------------- - 1 | 11 | 1 | regress_rls_bob | my first novel - 2 | 11 | 2 | regress_rls_bob | my second novel - 3 | 99 | 2 | regress_rls_bob | my science textbook - 4 | 55 | 1 | regress_rls_bob | my first satire - 5 | 99 | 2 | regress_rls_bob | my history book - 6 | 11 | 1 | regress_rls_carol | great science fiction - 7 | 99 | 2 | regress_rls_carol | great technology book - 8 | 55 | 2 | regress_rls_carol | great satire - 9 | 11 | 1 | regress_rls_dave | awesome science fiction - 10 | 99 | 2 | regress_rls_dave | awesome technology book - 100 | 55 | 1 | regress_rls_dave | testing RLS with partitions -(11 rows) - -SELECT * FROM part_document_satire ORDER by did; - did | cid | dlevel | dauthor | dtitle ------+-----+--------+-------------------+----------------------------- - 4 | 55 | 1 | regress_rls_bob | my first satire - 8 | 55 | 2 | regress_rls_carol | great satire - 100 | 55 | 1 | regress_rls_dave | testing RLS with partitions -(3 rows) - --- When RLS disabled, other users get ERROR. -SET SESSION AUTHORIZATION regress_rls_dave; -SET row_security TO OFF; -SELECT * FROM part_document ORDER by did; -ERROR: query would be affected by row-level security policy for table "part_document" -SELECT * FROM part_document_satire ORDER by did; -ERROR: query would be affected by row-level security policy for table "part_document_satire" --- Check behavior with a policy that uses a SubPlan not an InitPlan. -SET SESSION AUTHORIZATION regress_rls_alice; -SET row_security TO ON; -CREATE POLICY pp3 ON part_document AS RESTRICTIVE - USING ((SELECT dlevel <= seclv FROM uaccount WHERE pguser = current_user)); -SET SESSION AUTHORIZATION regress_rls_carol; -INSERT INTO part_document VALUES (100, 11, 5, 'regress_rls_carol', 'testing pp3'); -- fail -ERROR: new row violates row-level security policy "pp3" for table "part_document" ------ Dependencies ----- -SET SESSION AUTHORIZATION regress_rls_alice; -SET row_security TO ON; -CREATE TABLE dependee (x integer, y integer); -CREATE TABLE dependent (x integer, y integer); -CREATE POLICY d1 ON dependent FOR ALL - TO PUBLIC - USING (x = (SELECT d.x FROM dependee d WHERE d.y = y)); -DROP TABLE dependee; -- Should fail without CASCADE due to dependency on row security qual? -ERROR: cannot drop table dependee because other objects depend on it -DETAIL: policy d1 on table dependent depends on table dependee -HINT: Use DROP ... CASCADE to drop the dependent objects too. -DROP TABLE dependee CASCADE; -NOTICE: drop cascades to policy d1 on table dependent -EXPLAIN (COSTS OFF) SELECT * FROM dependent; -- After drop, should be unqualified - QUERY PLAN ------------------------ - Seq Scan on dependent -(1 row) - ------ RECURSION ---- --- --- Simple recursion --- -SET SESSION AUTHORIZATION regress_rls_alice; -CREATE TABLE rec1 (x integer, y integer); -CREATE POLICY r1 ON rec1 USING (x = (SELECT r.x FROM rec1 r WHERE y = r.y)); -ALTER TABLE rec1 ENABLE ROW LEVEL SECURITY; -SET SESSION AUTHORIZATION regress_rls_bob; -SELECT * FROM rec1; -- fail, direct recursion -ERROR: infinite recursion detected in policy for relation "rec1" --- --- Mutual recursion --- -SET SESSION AUTHORIZATION regress_rls_alice; -CREATE TABLE rec2 (a integer, b integer); -ALTER POLICY r1 ON rec1 USING (x = (SELECT a FROM rec2 WHERE b = y)); -CREATE POLICY r2 ON rec2 USING (a = (SELECT x FROM rec1 WHERE y = b)); -ALTER TABLE rec2 ENABLE ROW LEVEL SECURITY; -SET SESSION AUTHORIZATION regress_rls_bob; -SELECT * FROM rec1; -- fail, mutual recursion -ERROR: infinite recursion detected in policy for relation "rec1" --- --- Mutual recursion via views --- -SET SESSION AUTHORIZATION regress_rls_bob; -CREATE VIEW rec1v AS SELECT * FROM rec1; -CREATE VIEW rec2v AS SELECT * FROM rec2; -SET SESSION AUTHORIZATION regress_rls_alice; -ALTER POLICY r1 ON rec1 USING (x = (SELECT a FROM rec2v WHERE b = y)); -ALTER POLICY r2 ON rec2 USING (a = (SELECT x FROM rec1v WHERE y = b)); -SET SESSION AUTHORIZATION regress_rls_bob; -SELECT * FROM rec1; -- fail, mutual recursion via views -ERROR: infinite recursion detected in policy for relation "rec1" --- --- Mutual recursion via .s.b views --- -SET SESSION AUTHORIZATION regress_rls_bob; -DROP VIEW rec1v, rec2v CASCADE; -NOTICE: drop cascades to 2 other objects -DETAIL: drop cascades to policy r1 on table rec1 -drop cascades to policy r2 on table rec2 -CREATE VIEW rec1v WITH (security_barrier) AS SELECT * FROM rec1; -CREATE VIEW rec2v WITH (security_barrier) AS SELECT * FROM rec2; -SET SESSION AUTHORIZATION regress_rls_alice; -CREATE POLICY r1 ON rec1 USING (x = (SELECT a FROM rec2v WHERE b = y)); -CREATE POLICY r2 ON rec2 USING (a = (SELECT x FROM rec1v WHERE y = b)); -SET SESSION AUTHORIZATION regress_rls_bob; -SELECT * FROM rec1; -- fail, mutual recursion via s.b. views -ERROR: infinite recursion detected in policy for relation "rec1" --- --- recursive RLS and VIEWs in policy --- -SET SESSION AUTHORIZATION regress_rls_alice; -CREATE TABLE s1 (a int, b text); -INSERT INTO s1 (SELECT x, md5(x::text) FROM generate_series(-10,10) x); -CREATE TABLE s2 (x int, y text); -INSERT INTO s2 (SELECT x, md5(x::text) FROM generate_series(-6,6) x); -GRANT SELECT ON s1, s2 TO regress_rls_bob; -CREATE POLICY p1 ON s1 USING (a in (select x from s2 where y like '%2f%')); -CREATE POLICY p2 ON s2 USING (x in (select a from s1 where b like '%22%')); -CREATE POLICY p3 ON s1 FOR INSERT WITH CHECK (a = (SELECT a FROM s1)); -ALTER TABLE s1 ENABLE ROW LEVEL SECURITY; -ALTER TABLE s2 ENABLE ROW LEVEL SECURITY; -SET SESSION AUTHORIZATION regress_rls_bob; -CREATE VIEW v2 AS SELECT * FROM s2 WHERE y like '%af%'; -SELECT * FROM s1 WHERE f_leak(b); -- fail (infinite recursion) -ERROR: infinite recursion detected in policy for relation "s1" -INSERT INTO s1 VALUES (1, 'foo'); -- fail (infinite recursion) -ERROR: infinite recursion detected in policy for relation "s1" -SET SESSION AUTHORIZATION regress_rls_alice; -DROP POLICY p3 on s1; -ALTER POLICY p2 ON s2 USING (x % 2 = 0); -SET SESSION AUTHORIZATION regress_rls_bob; -SELECT * FROM s1 WHERE f_leak(b); -- OK -NOTICE: f_leak => c81e728d9d4c2f636f067f89cc14862c -NOTICE: f_leak => a87ff679a2f3e71d9181a67b7542122c - a | b ----+---------------------------------- - 2 | c81e728d9d4c2f636f067f89cc14862c - 4 | a87ff679a2f3e71d9181a67b7542122c -(2 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM only s1 WHERE f_leak(b); - QUERY PLAN ------------------------------------------------------------ - Seq Scan on s1 - Filter: ((hashed SubPlan 1) AND f_leak(b)) - SubPlan 1 - -> Seq Scan on s2 - Filter: (((x % 2) = 0) AND (y ~~ '%2f%'::text)) -(5 rows) - -SET SESSION AUTHORIZATION regress_rls_alice; -ALTER POLICY p1 ON s1 USING (a in (select x from v2)); -- using VIEW in RLS policy -SET SESSION AUTHORIZATION regress_rls_bob; -SELECT * FROM s1 WHERE f_leak(b); -- OK -NOTICE: f_leak => 0267aaf632e87a63288a08331f22c7c3 -NOTICE: f_leak => 1679091c5a880faf6fb5e6087eb1b2dc - a | b -----+---------------------------------- - -4 | 0267aaf632e87a63288a08331f22c7c3 - 6 | 1679091c5a880faf6fb5e6087eb1b2dc -(2 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM s1 WHERE f_leak(b); - QUERY PLAN ------------------------------------------------------------ - Seq Scan on s1 - Filter: ((hashed SubPlan 1) AND f_leak(b)) - SubPlan 1 - -> Seq Scan on s2 - Filter: (((x % 2) = 0) AND (y ~~ '%af%'::text)) -(5 rows) - -SELECT (SELECT x FROM s1 LIMIT 1) xx, * FROM s2 WHERE y like '%28%'; - xx | x | y -----+----+---------------------------------- - -6 | -6 | 596a3d04481816330f07e4f97510c28f - -4 | -4 | 0267aaf632e87a63288a08331f22c7c3 - 2 | 2 | c81e728d9d4c2f636f067f89cc14862c -(3 rows) - -EXPLAIN (COSTS OFF) SELECT (SELECT x FROM s1 LIMIT 1) xx, * FROM s2 WHERE y like '%28%'; - QUERY PLAN -------------------------------------------------------------------------- - Seq Scan on s2 - Filter: (((x % 2) = 0) AND (y ~~ '%28%'::text)) - SubPlan 2 - -> Limit - -> Seq Scan on s1 - Filter: (hashed SubPlan 1) - SubPlan 1 - -> Seq Scan on s2 s2_1 - Filter: (((x % 2) = 0) AND (y ~~ '%af%'::text)) -(9 rows) - -SET SESSION AUTHORIZATION regress_rls_alice; -ALTER POLICY p2 ON s2 USING (x in (select a from s1 where b like '%d2%')); -SET SESSION AUTHORIZATION regress_rls_bob; -SELECT * FROM s1 WHERE f_leak(b); -- fail (infinite recursion via view) -ERROR: infinite recursion detected in policy for relation "s1" --- prepared statement with regress_rls_alice privilege -PREPARE p1(int) AS SELECT * FROM t1 WHERE a <= $1; -EXECUTE p1(2); - id | a | b ------+---+----- - 102 | 2 | bbb - 202 | 2 | bcd - 302 | 2 | yyy -(3 rows) - -EXPLAIN (COSTS OFF) EXECUTE p1(2); - QUERY PLAN ----------------------------------------------- - Append - -> Seq Scan on t1 t1_1 - Filter: ((a <= 2) AND ((a % 2) = 0)) - -> Seq Scan on t2 t1_2 - Filter: ((a <= 2) AND ((a % 2) = 0)) - -> Seq Scan on t3 t1_3 - Filter: ((a <= 2) AND ((a % 2) = 0)) -(7 rows) - --- superuser is allowed to bypass RLS checks -RESET SESSION AUTHORIZATION; -SET row_security TO OFF; -SELECT * FROM t1 WHERE f_leak(b); -NOTICE: f_leak => aba -NOTICE: f_leak => bbb -NOTICE: f_leak => ccc -NOTICE: f_leak => dad -NOTICE: f_leak => abc -NOTICE: f_leak => bcd -NOTICE: f_leak => cde -NOTICE: f_leak => def -NOTICE: f_leak => xxx -NOTICE: f_leak => yyy -NOTICE: f_leak => zzz - id | a | b ------+---+----- - 101 | 1 | aba - 102 | 2 | bbb - 103 | 3 | ccc - 104 | 4 | dad - 201 | 1 | abc - 202 | 2 | bcd - 203 | 3 | cde - 204 | 4 | def - 301 | 1 | xxx - 302 | 2 | yyy - 303 | 3 | zzz -(11 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM t1 WHERE f_leak(b); - QUERY PLAN ---------------------------- - Append - -> Seq Scan on t1 t1_1 - Filter: f_leak(b) - -> Seq Scan on t2 t1_2 - Filter: f_leak(b) - -> Seq Scan on t3 t1_3 - Filter: f_leak(b) -(7 rows) - --- plan cache should be invalidated -EXECUTE p1(2); - id | a | b ------+---+----- - 101 | 1 | aba - 102 | 2 | bbb - 201 | 1 | abc - 202 | 2 | bcd - 301 | 1 | xxx - 302 | 2 | yyy -(6 rows) - -EXPLAIN (COSTS OFF) EXECUTE p1(2); - QUERY PLAN ---------------------------- - Append - -> Seq Scan on t1 t1_1 - Filter: (a <= 2) - -> Seq Scan on t2 t1_2 - Filter: (a <= 2) - -> Seq Scan on t3 t1_3 - Filter: (a <= 2) -(7 rows) - -PREPARE p2(int) AS SELECT * FROM t1 WHERE a = $1; -EXECUTE p2(2); - id | a | b ------+---+----- - 102 | 2 | bbb - 202 | 2 | bcd - 302 | 2 | yyy -(3 rows) - -EXPLAIN (COSTS OFF) EXECUTE p2(2); - QUERY PLAN ---------------------------- - Append - -> Seq Scan on t1 t1_1 - Filter: (a = 2) - -> Seq Scan on t2 t1_2 - Filter: (a = 2) - -> Seq Scan on t3 t1_3 - Filter: (a = 2) -(7 rows) - --- also, case when privilege switch from superuser -SET SESSION AUTHORIZATION regress_rls_bob; -SET row_security TO ON; -EXECUTE p2(2); - id | a | b ------+---+----- - 102 | 2 | bbb - 202 | 2 | bcd - 302 | 2 | yyy -(3 rows) - -EXPLAIN (COSTS OFF) EXECUTE p2(2); - QUERY PLAN ---------------------------------------------- - Append - -> Seq Scan on t1 t1_1 - Filter: ((a = 2) AND ((a % 2) = 0)) - -> Seq Scan on t2 t1_2 - Filter: ((a = 2) AND ((a % 2) = 0)) - -> Seq Scan on t3 t1_3 - Filter: ((a = 2) AND ((a % 2) = 0)) -(7 rows) - --- --- UPDATE / DELETE and Row-level security --- -SET SESSION AUTHORIZATION regress_rls_bob; -EXPLAIN (COSTS OFF) UPDATE t1 SET b = b || b WHERE f_leak(b); - QUERY PLAN ------------------------------------------------------------ - Update on t1 - Update on t1 t1_1 - Update on t2 t1_2 - Update on t3 t1_3 - -> Result - -> Append - -> Seq Scan on t1 t1_1 - Filter: (((a % 2) = 0) AND f_leak(b)) - -> Seq Scan on t2 t1_2 - Filter: (((a % 2) = 0) AND f_leak(b)) - -> Seq Scan on t3 t1_3 - Filter: (((a % 2) = 0) AND f_leak(b)) -(12 rows) - -UPDATE t1 SET b = b || b WHERE f_leak(b); -NOTICE: f_leak => bbb -NOTICE: f_leak => dad -NOTICE: f_leak => bcd -NOTICE: f_leak => def -NOTICE: f_leak => yyy -EXPLAIN (COSTS OFF) UPDATE only t1 SET b = b || '_updt' WHERE f_leak(b); - QUERY PLAN ------------------------------------------------ - Update on t1 - -> Seq Scan on t1 - Filter: (((a % 2) = 0) AND f_leak(b)) -(3 rows) - -UPDATE only t1 SET b = b || '_updt' WHERE f_leak(b); -NOTICE: f_leak => bbbbbb -NOTICE: f_leak => daddad --- returning clause with system column -UPDATE only t1 SET b = b WHERE f_leak(b) RETURNING tableoid::regclass, *, t1; -NOTICE: f_leak => bbbbbb_updt -NOTICE: f_leak => daddad_updt - tableoid | id | a | b | t1 -----------+-----+---+-------------+--------------------- - t1 | 102 | 2 | bbbbbb_updt | (102,2,bbbbbb_updt) - t1 | 104 | 4 | daddad_updt | (104,4,daddad_updt) -(2 rows) - -UPDATE t1 SET b = b WHERE f_leak(b) RETURNING *; -NOTICE: f_leak => bbbbbb_updt -NOTICE: f_leak => daddad_updt -NOTICE: f_leak => bcdbcd -NOTICE: f_leak => defdef -NOTICE: f_leak => yyyyyy - id | a | b ------+---+------------- - 102 | 2 | bbbbbb_updt - 104 | 4 | daddad_updt - 202 | 2 | bcdbcd - 204 | 4 | defdef - 302 | 2 | yyyyyy -(5 rows) - -UPDATE t1 SET b = b WHERE f_leak(b) RETURNING tableoid::regclass, *, t1; -NOTICE: f_leak => bbbbbb_updt -NOTICE: f_leak => daddad_updt -NOTICE: f_leak => bcdbcd -NOTICE: f_leak => defdef -NOTICE: f_leak => yyyyyy - tableoid | id | a | b | t1 -----------+-----+---+-------------+--------------------- - t1 | 102 | 2 | bbbbbb_updt | (102,2,bbbbbb_updt) - t1 | 104 | 4 | daddad_updt | (104,4,daddad_updt) - t2 | 202 | 2 | bcdbcd | (202,2,bcdbcd) - t2 | 204 | 4 | defdef | (204,4,defdef) - t3 | 302 | 2 | yyyyyy | (302,2,yyyyyy) -(5 rows) - --- updates with from clause -EXPLAIN (COSTS OFF) UPDATE t2 SET b=t2.b FROM t3 -WHERE t2.a = 3 and t3.a = 2 AND f_leak(t2.b) AND f_leak(t3.b); - QUERY PLAN ------------------------------------------------------------------ - Update on t2 - -> Nested Loop - -> Seq Scan on t2 - Filter: ((a = 3) AND ((a % 2) = 1) AND f_leak(b)) - -> Seq Scan on t3 - Filter: ((a = 2) AND f_leak(b)) -(6 rows) - -UPDATE t2 SET b=t2.b FROM t3 -WHERE t2.a = 3 and t3.a = 2 AND f_leak(t2.b) AND f_leak(t3.b); -NOTICE: f_leak => cde -NOTICE: f_leak => yyyyyy -EXPLAIN (COSTS OFF) UPDATE t1 SET b=t1.b FROM t2 -WHERE t1.a = 3 and t2.a = 3 AND f_leak(t1.b) AND f_leak(t2.b); - QUERY PLAN ------------------------------------------------------------------------ - Update on t1 - Update on t1 t1_1 - Update on t2 t1_2 - Update on t3 t1_3 - -> Nested Loop - -> Seq Scan on t2 - Filter: ((a = 3) AND ((a % 2) = 1) AND f_leak(b)) - -> Append - -> Seq Scan on t1 t1_1 - Filter: ((a = 3) AND ((a % 2) = 0) AND f_leak(b)) - -> Seq Scan on t2 t1_2 - Filter: ((a = 3) AND ((a % 2) = 0) AND f_leak(b)) - -> Seq Scan on t3 t1_3 - Filter: ((a = 3) AND ((a % 2) = 0) AND f_leak(b)) -(14 rows) - -UPDATE t1 SET b=t1.b FROM t2 -WHERE t1.a = 3 and t2.a = 3 AND f_leak(t1.b) AND f_leak(t2.b); -NOTICE: f_leak => cde -EXPLAIN (COSTS OFF) UPDATE t2 SET b=t2.b FROM t1 -WHERE t1.a = 3 and t2.a = 3 AND f_leak(t1.b) AND f_leak(t2.b); - QUERY PLAN ------------------------------------------------------------------------ - Update on t2 - -> Nested Loop - -> Seq Scan on t2 - Filter: ((a = 3) AND ((a % 2) = 1) AND f_leak(b)) - -> Append - -> Seq Scan on t1 t1_1 - Filter: ((a = 3) AND ((a % 2) = 0) AND f_leak(b)) - -> Seq Scan on t2 t1_2 - Filter: ((a = 3) AND ((a % 2) = 0) AND f_leak(b)) - -> Seq Scan on t3 t1_3 - Filter: ((a = 3) AND ((a % 2) = 0) AND f_leak(b)) -(11 rows) - -UPDATE t2 SET b=t2.b FROM t1 -WHERE t1.a = 3 and t2.a = 3 AND f_leak(t1.b) AND f_leak(t2.b); -NOTICE: f_leak => cde --- updates with from clause self join -EXPLAIN (COSTS OFF) UPDATE t2 t2_1 SET b = t2_2.b FROM t2 t2_2 -WHERE t2_1.a = 3 AND t2_2.a = t2_1.a AND t2_2.b = t2_1.b -AND f_leak(t2_1.b) AND f_leak(t2_2.b) RETURNING *, t2_1, t2_2; - QUERY PLAN ------------------------------------------------------------------ - Update on t2 t2_1 - -> Nested Loop - Join Filter: (t2_1.b = t2_2.b) - -> Seq Scan on t2 t2_1 - Filter: ((a = 3) AND ((a % 2) = 1) AND f_leak(b)) - -> Seq Scan on t2 t2_2 - Filter: ((a = 3) AND ((a % 2) = 1) AND f_leak(b)) -(7 rows) - -UPDATE t2 t2_1 SET b = t2_2.b FROM t2 t2_2 -WHERE t2_1.a = 3 AND t2_2.a = t2_1.a AND t2_2.b = t2_1.b -AND f_leak(t2_1.b) AND f_leak(t2_2.b) RETURNING *, t2_1, t2_2; -NOTICE: f_leak => cde -NOTICE: f_leak => cde - id | a | b | c | id | a | b | c | t2_1 | t2_2 ------+---+-----+-----+-----+---+-----+-----+-----------------+----------------- - 203 | 3 | cde | 3.3 | 203 | 3 | cde | 3.3 | (203,3,cde,3.3) | (203,3,cde,3.3) -(1 row) - -EXPLAIN (COSTS OFF) UPDATE t1 t1_1 SET b = t1_2.b FROM t1 t1_2 -WHERE t1_1.a = 4 AND t1_2.a = t1_1.a AND t1_2.b = t1_1.b -AND f_leak(t1_1.b) AND f_leak(t1_2.b) RETURNING *, t1_1, t1_2; - QUERY PLAN ------------------------------------------------------------------------------ - Update on t1 t1_1 - Update on t1 t1_1_1 - Update on t2 t1_1_2 - Update on t3 t1_1_3 - -> Nested Loop - Join Filter: (t1_1.b = t1_2.b) - -> Append - -> Seq Scan on t1 t1_1_1 - Filter: ((a = 4) AND ((a % 2) = 0) AND f_leak(b)) - -> Seq Scan on t2 t1_1_2 - Filter: ((a = 4) AND ((a % 2) = 0) AND f_leak(b)) - -> Seq Scan on t3 t1_1_3 - Filter: ((a = 4) AND ((a % 2) = 0) AND f_leak(b)) - -> Materialize - -> Append - -> Seq Scan on t1 t1_2_1 - Filter: ((a = 4) AND ((a % 2) = 0) AND f_leak(b)) - -> Seq Scan on t2 t1_2_2 - Filter: ((a = 4) AND ((a % 2) = 0) AND f_leak(b)) - -> Seq Scan on t3 t1_2_3 - Filter: ((a = 4) AND ((a % 2) = 0) AND f_leak(b)) -(21 rows) - -UPDATE t1 t1_1 SET b = t1_2.b FROM t1 t1_2 -WHERE t1_1.a = 4 AND t1_2.a = t1_1.a AND t1_2.b = t1_1.b -AND f_leak(t1_1.b) AND f_leak(t1_2.b) RETURNING *, t1_1, t1_2; -NOTICE: f_leak => daddad_updt -NOTICE: f_leak => daddad_updt -NOTICE: f_leak => defdef -NOTICE: f_leak => defdef - id | a | b | id | a | b | t1_1 | t1_2 ------+---+-------------+-----+---+-------------+---------------------+--------------------- - 104 | 4 | daddad_updt | 104 | 4 | daddad_updt | (104,4,daddad_updt) | (104,4,daddad_updt) - 204 | 4 | defdef | 204 | 4 | defdef | (204,4,defdef) | (204,4,defdef) -(2 rows) - -RESET SESSION AUTHORIZATION; -SET row_security TO OFF; -SELECT * FROM t1 ORDER BY a,b; - id | a | b ------+---+------------- - 101 | 1 | aba - 201 | 1 | abc - 301 | 1 | xxx - 102 | 2 | bbbbbb_updt - 202 | 2 | bcdbcd - 302 | 2 | yyyyyy - 103 | 3 | ccc - 203 | 3 | cde - 303 | 3 | zzz - 104 | 4 | daddad_updt - 204 | 4 | defdef -(11 rows) - -SET SESSION AUTHORIZATION regress_rls_bob; -SET row_security TO ON; -EXPLAIN (COSTS OFF) DELETE FROM only t1 WHERE f_leak(b); - QUERY PLAN ------------------------------------------------ - Delete on t1 - -> Seq Scan on t1 - Filter: (((a % 2) = 0) AND f_leak(b)) -(3 rows) - -EXPLAIN (COSTS OFF) DELETE FROM t1 WHERE f_leak(b); - QUERY PLAN ------------------------------------------------------ - Delete on t1 - Delete on t1 t1_1 - Delete on t2 t1_2 - Delete on t3 t1_3 - -> Append - -> Seq Scan on t1 t1_1 - Filter: (((a % 2) = 0) AND f_leak(b)) - -> Seq Scan on t2 t1_2 - Filter: (((a % 2) = 0) AND f_leak(b)) - -> Seq Scan on t3 t1_3 - Filter: (((a % 2) = 0) AND f_leak(b)) -(11 rows) - -DELETE FROM only t1 WHERE f_leak(b) RETURNING tableoid::regclass, *, t1; -NOTICE: f_leak => bbbbbb_updt -NOTICE: f_leak => daddad_updt - tableoid | id | a | b | t1 -----------+-----+---+-------------+--------------------- - t1 | 102 | 2 | bbbbbb_updt | (102,2,bbbbbb_updt) - t1 | 104 | 4 | daddad_updt | (104,4,daddad_updt) -(2 rows) - -DELETE FROM t1 WHERE f_leak(b) RETURNING tableoid::regclass, *, t1; -NOTICE: f_leak => bcdbcd -NOTICE: f_leak => defdef -NOTICE: f_leak => yyyyyy - tableoid | id | a | b | t1 -----------+-----+---+--------+---------------- - t2 | 202 | 2 | bcdbcd | (202,2,bcdbcd) - t2 | 204 | 4 | defdef | (204,4,defdef) - t3 | 302 | 2 | yyyyyy | (302,2,yyyyyy) -(3 rows) - --- --- S.b. view on top of Row-level security --- -SET SESSION AUTHORIZATION regress_rls_alice; -CREATE TABLE b1 (a int, b text); -INSERT INTO b1 (SELECT x, md5(x::text) FROM generate_series(-10,10) x); -CREATE POLICY p1 ON b1 USING (a % 2 = 0); -ALTER TABLE b1 ENABLE ROW LEVEL SECURITY; -GRANT ALL ON b1 TO regress_rls_bob; -SET SESSION AUTHORIZATION regress_rls_bob; -CREATE VIEW bv1 WITH (security_barrier) AS SELECT * FROM b1 WHERE a > 0 WITH CHECK OPTION; -GRANT ALL ON bv1 TO regress_rls_carol; -SET SESSION AUTHORIZATION regress_rls_carol; -EXPLAIN (COSTS OFF) SELECT * FROM bv1 WHERE f_leak(b); - QUERY PLAN ---------------------------------------------- - Subquery Scan on bv1 - Filter: f_leak(bv1.b) - -> Seq Scan on b1 - Filter: ((a > 0) AND ((a % 2) = 0)) -(4 rows) - -SELECT * FROM bv1 WHERE f_leak(b); -NOTICE: f_leak => c81e728d9d4c2f636f067f89cc14862c -NOTICE: f_leak => a87ff679a2f3e71d9181a67b7542122c -NOTICE: f_leak => 1679091c5a880faf6fb5e6087eb1b2dc -NOTICE: f_leak => c9f0f895fb98ab9159f51fd0297e236d -NOTICE: f_leak => d3d9446802a44259755d38e6d163e820 - a | b -----+---------------------------------- - 2 | c81e728d9d4c2f636f067f89cc14862c - 4 | a87ff679a2f3e71d9181a67b7542122c - 6 | 1679091c5a880faf6fb5e6087eb1b2dc - 8 | c9f0f895fb98ab9159f51fd0297e236d - 10 | d3d9446802a44259755d38e6d163e820 -(5 rows) - -INSERT INTO bv1 VALUES (-1, 'xxx'); -- should fail view WCO -ERROR: new row violates row-level security policy for table "b1" -INSERT INTO bv1 VALUES (11, 'xxx'); -- should fail RLS check -ERROR: new row violates row-level security policy for table "b1" -INSERT INTO bv1 VALUES (12, 'xxx'); -- ok -EXPLAIN (COSTS OFF) UPDATE bv1 SET b = 'yyy' WHERE a = 4 AND f_leak(b); - QUERY PLAN ------------------------------------------------------------------------ - Update on b1 - -> Seq Scan on b1 - Filter: ((a > 0) AND (a = 4) AND ((a % 2) = 0) AND f_leak(b)) -(3 rows) - -UPDATE bv1 SET b = 'yyy' WHERE a = 4 AND f_leak(b); -NOTICE: f_leak => a87ff679a2f3e71d9181a67b7542122c -EXPLAIN (COSTS OFF) DELETE FROM bv1 WHERE a = 6 AND f_leak(b); - QUERY PLAN ------------------------------------------------------------------------ - Delete on b1 - -> Seq Scan on b1 - Filter: ((a > 0) AND (a = 6) AND ((a % 2) = 0) AND f_leak(b)) -(3 rows) - -DELETE FROM bv1 WHERE a = 6 AND f_leak(b); -NOTICE: f_leak => 1679091c5a880faf6fb5e6087eb1b2dc -SET SESSION AUTHORIZATION regress_rls_alice; -SELECT * FROM b1; - a | b ------+---------------------------------- - -10 | 1b0fd9efa5279c4203b7c70233f86dbf - -9 | 252e691406782824eec43d7eadc3d256 - -8 | a8d2ec85eaf98407310b72eb73dda247 - -7 | 74687a12d3915d3c4d83f1af7b3683d5 - -6 | 596a3d04481816330f07e4f97510c28f - -5 | 47c1b025fa18ea96c33fbb6718688c0f - -4 | 0267aaf632e87a63288a08331f22c7c3 - -3 | b3149ecea4628efd23d2f86e5a723472 - -2 | 5d7b9adcbe1c629ec722529dd12e5129 - -1 | 6bb61e3b7bce0931da574d19d1d82c88 - 0 | cfcd208495d565ef66e7dff9f98764da - 1 | c4ca4238a0b923820dcc509a6f75849b - 2 | c81e728d9d4c2f636f067f89cc14862c - 3 | eccbc87e4b5ce2fe28308fd9f2a7baf3 - 5 | e4da3b7fbbce2345d7772b0674a318d5 - 7 | 8f14e45fceea167a5a36dedd4bea2543 - 8 | c9f0f895fb98ab9159f51fd0297e236d - 9 | 45c48cce2e2d7fbdea1afc51c7c6ad26 - 10 | d3d9446802a44259755d38e6d163e820 - 12 | xxx - 4 | yyy -(21 rows) - --- --- INSERT ... ON CONFLICT DO UPDATE and Row-level security --- -SET SESSION AUTHORIZATION regress_rls_alice; -DROP POLICY p1 ON document; -DROP POLICY p1r ON document; -CREATE POLICY p1 ON document FOR SELECT USING (true); -CREATE POLICY p2 ON document FOR INSERT WITH CHECK (dauthor = current_user); -CREATE POLICY p3 ON document FOR UPDATE - USING (cid = (SELECT cid from category WHERE cname = 'novel')) - WITH CHECK (dauthor = current_user); -SET SESSION AUTHORIZATION regress_rls_bob; --- Exists... -SELECT * FROM document WHERE did = 2; - did | cid | dlevel | dauthor | dtitle ------+-----+--------+-----------------+----------------- - 2 | 11 | 2 | regress_rls_bob | my second novel -(1 row) - --- ...so violates actual WITH CHECK OPTION within UPDATE (not INSERT, since --- alternative UPDATE path happens to be taken): -INSERT INTO document VALUES (2, (SELECT cid from category WHERE cname = 'novel'), 1, 'regress_rls_carol', 'my first novel') - ON CONFLICT (did) DO UPDATE SET dtitle = EXCLUDED.dtitle, dauthor = EXCLUDED.dauthor; -ERROR: new row violates row-level security policy for table "document" --- Violates USING qual for UPDATE policy p3. --- --- UPDATE path is taken, but UPDATE fails purely because *existing* row to be --- updated is not a "novel"/cid 11 (row is not leaked, even though we have --- SELECT privileges sufficient to see the row in this instance): -INSERT INTO document VALUES (33, 22, 1, 'regress_rls_bob', 'okay science fiction'); -- preparation for next statement -INSERT INTO document VALUES (33, (SELECT cid from category WHERE cname = 'novel'), 1, 'regress_rls_bob', 'Some novel, replaces sci-fi') -- takes UPDATE path - ON CONFLICT (did) DO UPDATE SET dtitle = EXCLUDED.dtitle; -ERROR: new row violates row-level security policy (USING expression) for table "document" --- Fine (we UPDATE, since INSERT WCOs and UPDATE security barrier quals + WCOs --- not violated): -INSERT INTO document VALUES (2, (SELECT cid from category WHERE cname = 'novel'), 1, 'regress_rls_bob', 'my first novel') - ON CONFLICT (did) DO UPDATE SET dtitle = EXCLUDED.dtitle RETURNING *; - did | cid | dlevel | dauthor | dtitle ------+-----+--------+-----------------+---------------- - 2 | 11 | 2 | regress_rls_bob | my first novel -(1 row) - --- Fine (we INSERT, so "cid = 33" ("technology") isn't evaluated): -INSERT INTO document VALUES (78, (SELECT cid from category WHERE cname = 'novel'), 1, 'regress_rls_bob', 'some technology novel') - ON CONFLICT (did) DO UPDATE SET dtitle = EXCLUDED.dtitle, cid = 33 RETURNING *; - did | cid | dlevel | dauthor | dtitle ------+-----+--------+-----------------+----------------------- - 78 | 11 | 1 | regress_rls_bob | some technology novel -(1 row) - --- Fine (same query, but we UPDATE, so "cid = 33", ("technology") is not the --- case in respect of *existing* tuple): -INSERT INTO document VALUES (78, (SELECT cid from category WHERE cname = 'novel'), 1, 'regress_rls_bob', 'some technology novel') - ON CONFLICT (did) DO UPDATE SET dtitle = EXCLUDED.dtitle, cid = 33 RETURNING *; - did | cid | dlevel | dauthor | dtitle ------+-----+--------+-----------------+----------------------- - 78 | 33 | 1 | regress_rls_bob | some technology novel -(1 row) - --- Same query a third time, but now fails due to existing tuple finally not --- passing quals: -INSERT INTO document VALUES (78, (SELECT cid from category WHERE cname = 'novel'), 1, 'regress_rls_bob', 'some technology novel') - ON CONFLICT (did) DO UPDATE SET dtitle = EXCLUDED.dtitle, cid = 33 RETURNING *; -ERROR: new row violates row-level security policy (USING expression) for table "document" --- Don't fail just because INSERT doesn't satisfy WITH CHECK option that --- originated as a barrier/USING() qual from the UPDATE. Note that the UPDATE --- path *isn't* taken, and so UPDATE-related policy does not apply: -INSERT INTO document VALUES (79, (SELECT cid from category WHERE cname = 'technology'), 1, 'regress_rls_bob', 'technology book, can only insert') - ON CONFLICT (did) DO UPDATE SET dtitle = EXCLUDED.dtitle RETURNING *; - did | cid | dlevel | dauthor | dtitle ------+-----+--------+-----------------+---------------------------------- - 79 | 33 | 1 | regress_rls_bob | technology book, can only insert -(1 row) - --- But this time, the same statement fails, because the UPDATE path is taken, --- and updating the row just inserted falls afoul of security barrier qual --- (enforced as WCO) -- what we might have updated target tuple to is --- irrelevant, in fact. -INSERT INTO document VALUES (79, (SELECT cid from category WHERE cname = 'technology'), 1, 'regress_rls_bob', 'technology book, can only insert') - ON CONFLICT (did) DO UPDATE SET dtitle = EXCLUDED.dtitle RETURNING *; -ERROR: new row violates row-level security policy (USING expression) for table "document" --- Test default USING qual enforced as WCO -SET SESSION AUTHORIZATION regress_rls_alice; -DROP POLICY p1 ON document; -DROP POLICY p2 ON document; -DROP POLICY p3 ON document; -CREATE POLICY p3_with_default ON document FOR UPDATE - USING (cid = (SELECT cid from category WHERE cname = 'novel')); -SET SESSION AUTHORIZATION regress_rls_bob; --- Just because WCO-style enforcement of USING quals occurs with --- existing/target tuple does not mean that the implementation can be allowed --- to fail to also enforce this qual against the final tuple appended to --- relation (since in the absence of an explicit WCO, this is also interpreted --- as an UPDATE/ALL WCO in general). --- --- UPDATE path is taken here (fails due to existing tuple). Note that this is --- not reported as a "USING expression", because it's an RLS UPDATE check that originated as --- a USING qual for the purposes of RLS in general, as opposed to an explicit --- USING qual that is ordinarily a security barrier. We leave it up to the --- UPDATE to make this fail: -INSERT INTO document VALUES (79, (SELECT cid from category WHERE cname = 'technology'), 1, 'regress_rls_bob', 'technology book, can only insert') - ON CONFLICT (did) DO UPDATE SET dtitle = EXCLUDED.dtitle RETURNING *; -ERROR: new row violates row-level security policy for table "document" --- UPDATE path is taken here. Existing tuple passes, since its cid --- corresponds to "novel", but default USING qual is enforced against --- post-UPDATE tuple too (as always when updating with a policy that lacks an --- explicit WCO), and so this fails: -INSERT INTO document VALUES (2, (SELECT cid from category WHERE cname = 'technology'), 1, 'regress_rls_bob', 'my first novel') - ON CONFLICT (did) DO UPDATE SET cid = EXCLUDED.cid, dtitle = EXCLUDED.dtitle RETURNING *; -ERROR: new row violates row-level security policy for table "document" -SET SESSION AUTHORIZATION regress_rls_alice; -DROP POLICY p3_with_default ON document; --- --- Test ALL policies with ON CONFLICT DO UPDATE (much the same as existing UPDATE --- tests) --- -CREATE POLICY p3_with_all ON document FOR ALL - USING (cid = (SELECT cid from category WHERE cname = 'novel')) - WITH CHECK (dauthor = current_user); -SET SESSION AUTHORIZATION regress_rls_bob; --- Fails, since ALL WCO is enforced in insert path: -INSERT INTO document VALUES (80, (SELECT cid from category WHERE cname = 'novel'), 1, 'regress_rls_carol', 'my first novel') - ON CONFLICT (did) DO UPDATE SET dtitle = EXCLUDED.dtitle, cid = 33; -ERROR: new row violates row-level security policy for table "document" --- Fails, since ALL policy USING qual is enforced (existing, target tuple is in --- violation, since it has the "manga" cid): -INSERT INTO document VALUES (4, (SELECT cid from category WHERE cname = 'novel'), 1, 'regress_rls_bob', 'my first novel') - ON CONFLICT (did) DO UPDATE SET dtitle = EXCLUDED.dtitle; -ERROR: new row violates row-level security policy (USING expression) for table "document" --- Fails, since ALL WCO are enforced: -INSERT INTO document VALUES (1, (SELECT cid from category WHERE cname = 'novel'), 1, 'regress_rls_bob', 'my first novel') - ON CONFLICT (did) DO UPDATE SET dauthor = 'regress_rls_carol'; -ERROR: new row violates row-level security policy for table "document" --- --- ROLE/GROUP --- -SET SESSION AUTHORIZATION regress_rls_alice; -CREATE TABLE z1 (a int, b text); -CREATE TABLE z2 (a int, b text); -GRANT SELECT ON z1,z2 TO regress_rls_group1, regress_rls_group2, - regress_rls_bob, regress_rls_carol; -INSERT INTO z1 VALUES - (1, 'aba'), - (2, 'bbb'), - (3, 'ccc'), - (4, 'dad'); -CREATE POLICY p1 ON z1 TO regress_rls_group1 USING (a % 2 = 0); -CREATE POLICY p2 ON z1 TO regress_rls_group2 USING (a % 2 = 1); -ALTER TABLE z1 ENABLE ROW LEVEL SECURITY; -SET SESSION AUTHORIZATION regress_rls_bob; -SELECT * FROM z1 WHERE f_leak(b); -NOTICE: f_leak => bbb -NOTICE: f_leak => dad - a | b ----+----- - 2 | bbb - 4 | dad -(2 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM z1 WHERE f_leak(b); - QUERY PLAN ------------------------------------------ - Seq Scan on z1 - Filter: (((a % 2) = 0) AND f_leak(b)) -(2 rows) - -PREPARE plancache_test AS SELECT * FROM z1 WHERE f_leak(b); -EXPLAIN (COSTS OFF) EXECUTE plancache_test; - QUERY PLAN ------------------------------------------ - Seq Scan on z1 - Filter: (((a % 2) = 0) AND f_leak(b)) -(2 rows) - -PREPARE plancache_test2 AS WITH q AS MATERIALIZED (SELECT * FROM z1 WHERE f_leak(b)) SELECT * FROM q,z2; -EXPLAIN (COSTS OFF) EXECUTE plancache_test2; - QUERY PLAN -------------------------------------------------- - Nested Loop - CTE q - -> Seq Scan on z1 - Filter: (((a % 2) = 0) AND f_leak(b)) - -> CTE Scan on q - -> Materialize - -> Seq Scan on z2 -(7 rows) - -PREPARE plancache_test3 AS WITH q AS MATERIALIZED (SELECT * FROM z2) SELECT * FROM q,z1 WHERE f_leak(z1.b); -EXPLAIN (COSTS OFF) EXECUTE plancache_test3; - QUERY PLAN ------------------------------------------------------ - Nested Loop - CTE q - -> Seq Scan on z2 - -> CTE Scan on q - -> Materialize - -> Seq Scan on z1 - Filter: (((a % 2) = 0) AND f_leak(b)) -(7 rows) - -SET ROLE regress_rls_group1; -SELECT * FROM z1 WHERE f_leak(b); -NOTICE: f_leak => bbb -NOTICE: f_leak => dad - a | b ----+----- - 2 | bbb - 4 | dad -(2 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM z1 WHERE f_leak(b); - QUERY PLAN ------------------------------------------ - Seq Scan on z1 - Filter: (((a % 2) = 0) AND f_leak(b)) -(2 rows) - -EXPLAIN (COSTS OFF) EXECUTE plancache_test; - QUERY PLAN ------------------------------------------ - Seq Scan on z1 - Filter: (((a % 2) = 0) AND f_leak(b)) -(2 rows) - -EXPLAIN (COSTS OFF) EXECUTE plancache_test2; - QUERY PLAN -------------------------------------------------- - Nested Loop - CTE q - -> Seq Scan on z1 - Filter: (((a % 2) = 0) AND f_leak(b)) - -> CTE Scan on q - -> Materialize - -> Seq Scan on z2 -(7 rows) - -EXPLAIN (COSTS OFF) EXECUTE plancache_test3; - QUERY PLAN ------------------------------------------------------ - Nested Loop - CTE q - -> Seq Scan on z2 - -> CTE Scan on q - -> Materialize - -> Seq Scan on z1 - Filter: (((a % 2) = 0) AND f_leak(b)) -(7 rows) - -SET SESSION AUTHORIZATION regress_rls_carol; -SELECT * FROM z1 WHERE f_leak(b); -NOTICE: f_leak => aba -NOTICE: f_leak => ccc - a | b ----+----- - 1 | aba - 3 | ccc -(2 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM z1 WHERE f_leak(b); - QUERY PLAN ------------------------------------------ - Seq Scan on z1 - Filter: (((a % 2) = 1) AND f_leak(b)) -(2 rows) - -EXPLAIN (COSTS OFF) EXECUTE plancache_test; - QUERY PLAN ------------------------------------------ - Seq Scan on z1 - Filter: (((a % 2) = 1) AND f_leak(b)) -(2 rows) - -EXPLAIN (COSTS OFF) EXECUTE plancache_test2; - QUERY PLAN -------------------------------------------------- - Nested Loop - CTE q - -> Seq Scan on z1 - Filter: (((a % 2) = 1) AND f_leak(b)) - -> CTE Scan on q - -> Materialize - -> Seq Scan on z2 -(7 rows) - -EXPLAIN (COSTS OFF) EXECUTE plancache_test3; - QUERY PLAN ------------------------------------------------------ - Nested Loop - CTE q - -> Seq Scan on z2 - -> CTE Scan on q - -> Materialize - -> Seq Scan on z1 - Filter: (((a % 2) = 1) AND f_leak(b)) -(7 rows) - -SET ROLE regress_rls_group2; -SELECT * FROM z1 WHERE f_leak(b); -NOTICE: f_leak => aba -NOTICE: f_leak => ccc - a | b ----+----- - 1 | aba - 3 | ccc -(2 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM z1 WHERE f_leak(b); - QUERY PLAN ------------------------------------------ - Seq Scan on z1 - Filter: (((a % 2) = 1) AND f_leak(b)) -(2 rows) - -EXPLAIN (COSTS OFF) EXECUTE plancache_test; - QUERY PLAN ------------------------------------------ - Seq Scan on z1 - Filter: (((a % 2) = 1) AND f_leak(b)) -(2 rows) - -EXPLAIN (COSTS OFF) EXECUTE plancache_test2; - QUERY PLAN -------------------------------------------------- - Nested Loop - CTE q - -> Seq Scan on z1 - Filter: (((a % 2) = 1) AND f_leak(b)) - -> CTE Scan on q - -> Materialize - -> Seq Scan on z2 -(7 rows) - -EXPLAIN (COSTS OFF) EXECUTE plancache_test3; - QUERY PLAN ------------------------------------------------------ - Nested Loop - CTE q - -> Seq Scan on z2 - -> CTE Scan on q - -> Materialize - -> Seq Scan on z1 - Filter: (((a % 2) = 1) AND f_leak(b)) -(7 rows) - --- --- Views should follow policy for view owner. --- --- View and Table owner are the same. -SET SESSION AUTHORIZATION regress_rls_alice; -CREATE VIEW rls_view AS SELECT * FROM z1 WHERE f_leak(b); -GRANT SELECT ON rls_view TO regress_rls_bob; --- Query as role that is not owner of view or table. Should return all records. -SET SESSION AUTHORIZATION regress_rls_bob; -SELECT * FROM rls_view; -NOTICE: f_leak => aba -NOTICE: f_leak => bbb -NOTICE: f_leak => ccc -NOTICE: f_leak => dad - a | b ----+----- - 1 | aba - 2 | bbb - 3 | ccc - 4 | dad -(4 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM rls_view; - QUERY PLAN ---------------------- - Seq Scan on z1 - Filter: f_leak(b) -(2 rows) - --- Query as view/table owner. Should return all records. -SET SESSION AUTHORIZATION regress_rls_alice; -SELECT * FROM rls_view; -NOTICE: f_leak => aba -NOTICE: f_leak => bbb -NOTICE: f_leak => ccc -NOTICE: f_leak => dad - a | b ----+----- - 1 | aba - 2 | bbb - 3 | ccc - 4 | dad -(4 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM rls_view; - QUERY PLAN ---------------------- - Seq Scan on z1 - Filter: f_leak(b) -(2 rows) - -DROP VIEW rls_view; --- View and Table owners are different. -SET SESSION AUTHORIZATION regress_rls_bob; -CREATE VIEW rls_view AS SELECT * FROM z1 WHERE f_leak(b); -GRANT SELECT ON rls_view TO regress_rls_alice; --- Query as role that is not owner of view but is owner of table. --- Should return records based on view owner policies. -SET SESSION AUTHORIZATION regress_rls_alice; -SELECT * FROM rls_view; -NOTICE: f_leak => bbb -NOTICE: f_leak => dad - a | b ----+----- - 2 | bbb - 4 | dad -(2 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM rls_view; - QUERY PLAN ------------------------------------------ - Seq Scan on z1 - Filter: (((a % 2) = 0) AND f_leak(b)) -(2 rows) - --- Query as role that is not owner of table but is owner of view. --- Should return records based on view owner policies. -SET SESSION AUTHORIZATION regress_rls_bob; -SELECT * FROM rls_view; -NOTICE: f_leak => bbb -NOTICE: f_leak => dad - a | b ----+----- - 2 | bbb - 4 | dad -(2 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM rls_view; - QUERY PLAN ------------------------------------------ - Seq Scan on z1 - Filter: (((a % 2) = 0) AND f_leak(b)) -(2 rows) - --- Query as role that is not the owner of the table or view without permissions. -SET SESSION AUTHORIZATION regress_rls_carol; -SELECT * FROM rls_view; --fail - permission denied. -ERROR: permission denied for view rls_view -EXPLAIN (COSTS OFF) SELECT * FROM rls_view; --fail - permission denied. -ERROR: permission denied for view rls_view --- Query as role that is not the owner of the table or view with permissions. -SET SESSION AUTHORIZATION regress_rls_bob; -GRANT SELECT ON rls_view TO regress_rls_carol; -SELECT * FROM rls_view; -NOTICE: f_leak => bbb -NOTICE: f_leak => dad - a | b ----+----- - 2 | bbb - 4 | dad -(2 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM rls_view; - QUERY PLAN ------------------------------------------ - Seq Scan on z1 - Filter: (((a % 2) = 0) AND f_leak(b)) -(2 rows) - -SET SESSION AUTHORIZATION regress_rls_bob; -DROP VIEW rls_view; --- --- Command specific --- -SET SESSION AUTHORIZATION regress_rls_alice; -CREATE TABLE x1 (a int, b text, c text); -GRANT ALL ON x1 TO PUBLIC; -INSERT INTO x1 VALUES - (1, 'abc', 'regress_rls_bob'), - (2, 'bcd', 'regress_rls_bob'), - (3, 'cde', 'regress_rls_carol'), - (4, 'def', 'regress_rls_carol'), - (5, 'efg', 'regress_rls_bob'), - (6, 'fgh', 'regress_rls_bob'), - (7, 'fgh', 'regress_rls_carol'), - (8, 'fgh', 'regress_rls_carol'); -CREATE POLICY p0 ON x1 FOR ALL USING (c = current_user); -CREATE POLICY p1 ON x1 FOR SELECT USING (a % 2 = 0); -CREATE POLICY p2 ON x1 FOR INSERT WITH CHECK (a % 2 = 1); -CREATE POLICY p3 ON x1 FOR UPDATE USING (a % 2 = 0); -CREATE POLICY p4 ON x1 FOR DELETE USING (a < 8); -ALTER TABLE x1 ENABLE ROW LEVEL SECURITY; -SET SESSION AUTHORIZATION regress_rls_bob; -SELECT * FROM x1 WHERE f_leak(b) ORDER BY a ASC; -NOTICE: f_leak => abc -NOTICE: f_leak => bcd -NOTICE: f_leak => def -NOTICE: f_leak => efg -NOTICE: f_leak => fgh -NOTICE: f_leak => fgh - a | b | c ----+-----+------------------- - 1 | abc | regress_rls_bob - 2 | bcd | regress_rls_bob - 4 | def | regress_rls_carol - 5 | efg | regress_rls_bob - 6 | fgh | regress_rls_bob - 8 | fgh | regress_rls_carol -(6 rows) - -UPDATE x1 SET b = b || '_updt' WHERE f_leak(b) RETURNING *; -NOTICE: f_leak => abc -NOTICE: f_leak => bcd -NOTICE: f_leak => def -NOTICE: f_leak => efg -NOTICE: f_leak => fgh -NOTICE: f_leak => fgh - a | b | c ----+----------+------------------- - 1 | abc_updt | regress_rls_bob - 2 | bcd_updt | regress_rls_bob - 4 | def_updt | regress_rls_carol - 5 | efg_updt | regress_rls_bob - 6 | fgh_updt | regress_rls_bob - 8 | fgh_updt | regress_rls_carol -(6 rows) - -SET SESSION AUTHORIZATION regress_rls_carol; -SELECT * FROM x1 WHERE f_leak(b) ORDER BY a ASC; -NOTICE: f_leak => cde -NOTICE: f_leak => fgh -NOTICE: f_leak => bcd_updt -NOTICE: f_leak => def_updt -NOTICE: f_leak => fgh_updt -NOTICE: f_leak => fgh_updt - a | b | c ----+----------+------------------- - 2 | bcd_updt | regress_rls_bob - 3 | cde | regress_rls_carol - 4 | def_updt | regress_rls_carol - 6 | fgh_updt | regress_rls_bob - 7 | fgh | regress_rls_carol - 8 | fgh_updt | regress_rls_carol -(6 rows) - -UPDATE x1 SET b = b || '_updt' WHERE f_leak(b) RETURNING *; -NOTICE: f_leak => cde -NOTICE: f_leak => fgh -NOTICE: f_leak => bcd_updt -NOTICE: f_leak => def_updt -NOTICE: f_leak => fgh_updt -NOTICE: f_leak => fgh_updt - a | b | c ----+---------------+------------------- - 3 | cde_updt | regress_rls_carol - 7 | fgh_updt | regress_rls_carol - 2 | bcd_updt_updt | regress_rls_bob - 4 | def_updt_updt | regress_rls_carol - 6 | fgh_updt_updt | regress_rls_bob - 8 | fgh_updt_updt | regress_rls_carol -(6 rows) - -DELETE FROM x1 WHERE f_leak(b) RETURNING *; -NOTICE: f_leak => cde_updt -NOTICE: f_leak => fgh_updt -NOTICE: f_leak => bcd_updt_updt -NOTICE: f_leak => def_updt_updt -NOTICE: f_leak => fgh_updt_updt -NOTICE: f_leak => fgh_updt_updt - a | b | c ----+---------------+------------------- - 3 | cde_updt | regress_rls_carol - 7 | fgh_updt | regress_rls_carol - 2 | bcd_updt_updt | regress_rls_bob - 4 | def_updt_updt | regress_rls_carol - 6 | fgh_updt_updt | regress_rls_bob - 8 | fgh_updt_updt | regress_rls_carol -(6 rows) - --- --- Duplicate Policy Names --- -SET SESSION AUTHORIZATION regress_rls_alice; -CREATE TABLE y1 (a int, b text); -CREATE TABLE y2 (a int, b text); -GRANT ALL ON y1, y2 TO regress_rls_bob; -CREATE POLICY p1 ON y1 FOR ALL USING (a % 2 = 0); -CREATE POLICY p2 ON y1 FOR SELECT USING (a > 2); -CREATE POLICY p1 ON y1 FOR SELECT USING (a % 2 = 1); --fail -ERROR: policy "p1" for table "y1" already exists -CREATE POLICY p1 ON y2 FOR ALL USING (a % 2 = 0); --OK -ALTER TABLE y1 ENABLE ROW LEVEL SECURITY; -ALTER TABLE y2 ENABLE ROW LEVEL SECURITY; --- --- Expression structure with SBV --- --- Create view as table owner. RLS should NOT be applied. -SET SESSION AUTHORIZATION regress_rls_alice; -CREATE VIEW rls_sbv WITH (security_barrier) AS - SELECT * FROM y1 WHERE f_leak(b); -EXPLAIN (COSTS OFF) SELECT * FROM rls_sbv WHERE (a = 1); - QUERY PLAN ------------------------------------ - Seq Scan on y1 - Filter: (f_leak(b) AND (a = 1)) -(2 rows) - -DROP VIEW rls_sbv; --- Create view as role that does not own table. RLS should be applied. -SET SESSION AUTHORIZATION regress_rls_bob; -CREATE VIEW rls_sbv WITH (security_barrier) AS - SELECT * FROM y1 WHERE f_leak(b); -EXPLAIN (COSTS OFF) SELECT * FROM rls_sbv WHERE (a = 1); - QUERY PLAN ------------------------------------------------------------------- - Seq Scan on y1 - Filter: ((a = 1) AND ((a > 2) OR ((a % 2) = 0)) AND f_leak(b)) -(2 rows) - -DROP VIEW rls_sbv; --- --- Expression structure --- -SET SESSION AUTHORIZATION regress_rls_alice; -INSERT INTO y2 (SELECT x, md5(x::text) FROM generate_series(0,20) x); -CREATE POLICY p2 ON y2 USING (a % 3 = 0); -CREATE POLICY p3 ON y2 USING (a % 4 = 0); -SET SESSION AUTHORIZATION regress_rls_bob; -SELECT * FROM y2 WHERE f_leak(b); -NOTICE: f_leak => cfcd208495d565ef66e7dff9f98764da -NOTICE: f_leak => c81e728d9d4c2f636f067f89cc14862c -NOTICE: f_leak => eccbc87e4b5ce2fe28308fd9f2a7baf3 -NOTICE: f_leak => a87ff679a2f3e71d9181a67b7542122c -NOTICE: f_leak => 1679091c5a880faf6fb5e6087eb1b2dc -NOTICE: f_leak => c9f0f895fb98ab9159f51fd0297e236d -NOTICE: f_leak => 45c48cce2e2d7fbdea1afc51c7c6ad26 -NOTICE: f_leak => d3d9446802a44259755d38e6d163e820 -NOTICE: f_leak => c20ad4d76fe97759aa27a0c99bff6710 -NOTICE: f_leak => aab3238922bcc25a6f606eb525ffdc56 -NOTICE: f_leak => 9bf31c7ff062936a96d3c8bd1f8f2ff3 -NOTICE: f_leak => c74d97b01eae257e44aa9d5bade97baf -NOTICE: f_leak => 6f4922f45568161a8cdf4ad2299f6d23 -NOTICE: f_leak => 98f13708210194c475687be6106a3b84 - a | b -----+---------------------------------- - 0 | cfcd208495d565ef66e7dff9f98764da - 2 | c81e728d9d4c2f636f067f89cc14862c - 3 | eccbc87e4b5ce2fe28308fd9f2a7baf3 - 4 | a87ff679a2f3e71d9181a67b7542122c - 6 | 1679091c5a880faf6fb5e6087eb1b2dc - 8 | c9f0f895fb98ab9159f51fd0297e236d - 9 | 45c48cce2e2d7fbdea1afc51c7c6ad26 - 10 | d3d9446802a44259755d38e6d163e820 - 12 | c20ad4d76fe97759aa27a0c99bff6710 - 14 | aab3238922bcc25a6f606eb525ffdc56 - 15 | 9bf31c7ff062936a96d3c8bd1f8f2ff3 - 16 | c74d97b01eae257e44aa9d5bade97baf - 18 | 6f4922f45568161a8cdf4ad2299f6d23 - 20 | 98f13708210194c475687be6106a3b84 -(14 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM y2 WHERE f_leak(b); - QUERY PLAN ------------------------------------------------------------------------------ - Seq Scan on y2 - Filter: ((((a % 4) = 0) OR ((a % 3) = 0) OR ((a % 2) = 0)) AND f_leak(b)) -(2 rows) - --- --- Qual push-down of leaky functions, when not referring to table --- -SELECT * FROM y2 WHERE f_leak('abc'); -NOTICE: f_leak => abc -NOTICE: f_leak => abc -NOTICE: f_leak => abc -NOTICE: f_leak => abc -NOTICE: f_leak => abc -NOTICE: f_leak => abc -NOTICE: f_leak => abc -NOTICE: f_leak => abc -NOTICE: f_leak => abc -NOTICE: f_leak => abc -NOTICE: f_leak => abc -NOTICE: f_leak => abc -NOTICE: f_leak => abc -NOTICE: f_leak => abc -NOTICE: f_leak => abc -NOTICE: f_leak => abc -NOTICE: f_leak => abc -NOTICE: f_leak => abc -NOTICE: f_leak => abc -NOTICE: f_leak => abc -NOTICE: f_leak => abc - a | b -----+---------------------------------- - 0 | cfcd208495d565ef66e7dff9f98764da - 2 | c81e728d9d4c2f636f067f89cc14862c - 3 | eccbc87e4b5ce2fe28308fd9f2a7baf3 - 4 | a87ff679a2f3e71d9181a67b7542122c - 6 | 1679091c5a880faf6fb5e6087eb1b2dc - 8 | c9f0f895fb98ab9159f51fd0297e236d - 9 | 45c48cce2e2d7fbdea1afc51c7c6ad26 - 10 | d3d9446802a44259755d38e6d163e820 - 12 | c20ad4d76fe97759aa27a0c99bff6710 - 14 | aab3238922bcc25a6f606eb525ffdc56 - 15 | 9bf31c7ff062936a96d3c8bd1f8f2ff3 - 16 | c74d97b01eae257e44aa9d5bade97baf - 18 | 6f4922f45568161a8cdf4ad2299f6d23 - 20 | 98f13708210194c475687be6106a3b84 -(14 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM y2 WHERE f_leak('abc'); - QUERY PLAN ---------------------------------------------------------------------------------------- - Seq Scan on y2 - Filter: (f_leak('abc'::text) AND (((a % 4) = 0) OR ((a % 3) = 0) OR ((a % 2) = 0))) -(2 rows) - -CREATE TABLE test_qual_pushdown ( - abc text -); -INSERT INTO test_qual_pushdown VALUES ('abc'),('def'); -SELECT * FROM y2 JOIN test_qual_pushdown ON (b = abc) WHERE f_leak(abc); -NOTICE: f_leak => abc -NOTICE: f_leak => def - a | b | abc ----+---+----- -(0 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM y2 JOIN test_qual_pushdown ON (b = abc) WHERE f_leak(abc); - QUERY PLAN -------------------------------------------------------------------------- - Hash Join - Hash Cond: (test_qual_pushdown.abc = y2.b) - -> Seq Scan on test_qual_pushdown - Filter: f_leak(abc) - -> Hash - -> Seq Scan on y2 - Filter: (((a % 4) = 0) OR ((a % 3) = 0) OR ((a % 2) = 0)) -(7 rows) - -SELECT * FROM y2 JOIN test_qual_pushdown ON (b = abc) WHERE f_leak(b); -NOTICE: f_leak => cfcd208495d565ef66e7dff9f98764da -NOTICE: f_leak => c81e728d9d4c2f636f067f89cc14862c -NOTICE: f_leak => eccbc87e4b5ce2fe28308fd9f2a7baf3 -NOTICE: f_leak => a87ff679a2f3e71d9181a67b7542122c -NOTICE: f_leak => 1679091c5a880faf6fb5e6087eb1b2dc -NOTICE: f_leak => c9f0f895fb98ab9159f51fd0297e236d -NOTICE: f_leak => 45c48cce2e2d7fbdea1afc51c7c6ad26 -NOTICE: f_leak => d3d9446802a44259755d38e6d163e820 -NOTICE: f_leak => c20ad4d76fe97759aa27a0c99bff6710 -NOTICE: f_leak => aab3238922bcc25a6f606eb525ffdc56 -NOTICE: f_leak => 9bf31c7ff062936a96d3c8bd1f8f2ff3 -NOTICE: f_leak => c74d97b01eae257e44aa9d5bade97baf -NOTICE: f_leak => 6f4922f45568161a8cdf4ad2299f6d23 -NOTICE: f_leak => 98f13708210194c475687be6106a3b84 - a | b | abc ----+---+----- -(0 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM y2 JOIN test_qual_pushdown ON (b = abc) WHERE f_leak(b); - QUERY PLAN ------------------------------------------------------------------------------------------ - Hash Join - Hash Cond: (test_qual_pushdown.abc = y2.b) - -> Seq Scan on test_qual_pushdown - -> Hash - -> Seq Scan on y2 - Filter: ((((a % 4) = 0) OR ((a % 3) = 0) OR ((a % 2) = 0)) AND f_leak(b)) -(6 rows) - -DROP TABLE test_qual_pushdown; --- --- Plancache invalidate on user change. --- -RESET SESSION AUTHORIZATION; -DROP TABLE t1 CASCADE; -NOTICE: drop cascades to 2 other objects -DETAIL: drop cascades to table t2 -drop cascades to table t3 -CREATE TABLE t1 (a integer); -GRANT SELECT ON t1 TO regress_rls_bob, regress_rls_carol; -CREATE POLICY p1 ON t1 TO regress_rls_bob USING ((a % 2) = 0); -CREATE POLICY p2 ON t1 TO regress_rls_carol USING ((a % 4) = 0); -ALTER TABLE t1 ENABLE ROW LEVEL SECURITY; --- Prepare as regress_rls_bob -SET ROLE regress_rls_bob; -PREPARE role_inval AS SELECT * FROM t1; --- Check plan -EXPLAIN (COSTS OFF) EXECUTE role_inval; - QUERY PLAN -------------------------- - Seq Scan on t1 - Filter: ((a % 2) = 0) -(2 rows) - --- Change to regress_rls_carol -SET ROLE regress_rls_carol; --- Check plan- should be different -EXPLAIN (COSTS OFF) EXECUTE role_inval; - QUERY PLAN -------------------------- - Seq Scan on t1 - Filter: ((a % 4) = 0) -(2 rows) - --- Change back to regress_rls_bob -SET ROLE regress_rls_bob; --- Check plan- should be back to original -EXPLAIN (COSTS OFF) EXECUTE role_inval; - QUERY PLAN -------------------------- - Seq Scan on t1 - Filter: ((a % 2) = 0) -(2 rows) - --- --- CTE and RLS --- -RESET SESSION AUTHORIZATION; -DROP TABLE t1 CASCADE; -CREATE TABLE t1 (a integer, b text); -CREATE POLICY p1 ON t1 USING (a % 2 = 0); -ALTER TABLE t1 ENABLE ROW LEVEL SECURITY; -GRANT ALL ON t1 TO regress_rls_bob; -INSERT INTO t1 (SELECT x, md5(x::text) FROM generate_series(0,20) x); -SET SESSION AUTHORIZATION regress_rls_bob; -WITH cte1 AS MATERIALIZED (SELECT * FROM t1 WHERE f_leak(b)) SELECT * FROM cte1; -NOTICE: f_leak => cfcd208495d565ef66e7dff9f98764da -NOTICE: f_leak => c81e728d9d4c2f636f067f89cc14862c -NOTICE: f_leak => a87ff679a2f3e71d9181a67b7542122c -NOTICE: f_leak => 1679091c5a880faf6fb5e6087eb1b2dc -NOTICE: f_leak => c9f0f895fb98ab9159f51fd0297e236d -NOTICE: f_leak => d3d9446802a44259755d38e6d163e820 -NOTICE: f_leak => c20ad4d76fe97759aa27a0c99bff6710 -NOTICE: f_leak => aab3238922bcc25a6f606eb525ffdc56 -NOTICE: f_leak => c74d97b01eae257e44aa9d5bade97baf -NOTICE: f_leak => 6f4922f45568161a8cdf4ad2299f6d23 -NOTICE: f_leak => 98f13708210194c475687be6106a3b84 - a | b -----+---------------------------------- - 0 | cfcd208495d565ef66e7dff9f98764da - 2 | c81e728d9d4c2f636f067f89cc14862c - 4 | a87ff679a2f3e71d9181a67b7542122c - 6 | 1679091c5a880faf6fb5e6087eb1b2dc - 8 | c9f0f895fb98ab9159f51fd0297e236d - 10 | d3d9446802a44259755d38e6d163e820 - 12 | c20ad4d76fe97759aa27a0c99bff6710 - 14 | aab3238922bcc25a6f606eb525ffdc56 - 16 | c74d97b01eae257e44aa9d5bade97baf - 18 | 6f4922f45568161a8cdf4ad2299f6d23 - 20 | 98f13708210194c475687be6106a3b84 -(11 rows) - -EXPLAIN (COSTS OFF) -WITH cte1 AS MATERIALIZED (SELECT * FROM t1 WHERE f_leak(b)) SELECT * FROM cte1; - QUERY PLAN -------------------------------------------------- - CTE Scan on cte1 - CTE cte1 - -> Seq Scan on t1 - Filter: (((a % 2) = 0) AND f_leak(b)) -(4 rows) - -WITH cte1 AS (UPDATE t1 SET a = a + 1 RETURNING *) SELECT * FROM cte1; --fail -ERROR: new row violates row-level security policy for table "t1" -WITH cte1 AS (UPDATE t1 SET a = a RETURNING *) SELECT * FROM cte1; --ok - a | b -----+---------------------------------- - 0 | cfcd208495d565ef66e7dff9f98764da - 2 | c81e728d9d4c2f636f067f89cc14862c - 4 | a87ff679a2f3e71d9181a67b7542122c - 6 | 1679091c5a880faf6fb5e6087eb1b2dc - 8 | c9f0f895fb98ab9159f51fd0297e236d - 10 | d3d9446802a44259755d38e6d163e820 - 12 | c20ad4d76fe97759aa27a0c99bff6710 - 14 | aab3238922bcc25a6f606eb525ffdc56 - 16 | c74d97b01eae257e44aa9d5bade97baf - 18 | 6f4922f45568161a8cdf4ad2299f6d23 - 20 | 98f13708210194c475687be6106a3b84 -(11 rows) - -WITH cte1 AS (INSERT INTO t1 VALUES (21, 'Fail') RETURNING *) SELECT * FROM cte1; --fail -ERROR: new row violates row-level security policy for table "t1" -WITH cte1 AS (INSERT INTO t1 VALUES (20, 'Success') RETURNING *) SELECT * FROM cte1; --ok - a | b -----+--------- - 20 | Success -(1 row) - --- --- Rename Policy --- -RESET SESSION AUTHORIZATION; -ALTER POLICY p1 ON t1 RENAME TO p1; --fail -ERROR: policy "p1" for table "t1" already exists -SELECT polname, relname - FROM pg_policy pol - JOIN pg_class pc ON (pc.oid = pol.polrelid) - WHERE relname = 't1'; - polname | relname ----------+--------- - p1 | t1 -(1 row) - -ALTER POLICY p1 ON t1 RENAME TO p2; --ok -SELECT polname, relname - FROM pg_policy pol - JOIN pg_class pc ON (pc.oid = pol.polrelid) - WHERE relname = 't1'; - polname | relname ----------+--------- - p2 | t1 -(1 row) - --- --- Check INSERT SELECT --- -SET SESSION AUTHORIZATION regress_rls_bob; -CREATE TABLE t2 (a integer, b text); -INSERT INTO t2 (SELECT * FROM t1); -EXPLAIN (COSTS OFF) INSERT INTO t2 (SELECT * FROM t1); - QUERY PLAN -------------------------------- - Insert on t2 - -> Seq Scan on t1 - Filter: ((a % 2) = 0) -(3 rows) - -SELECT * FROM t2; - a | b -----+---------------------------------- - 0 | cfcd208495d565ef66e7dff9f98764da - 2 | c81e728d9d4c2f636f067f89cc14862c - 4 | a87ff679a2f3e71d9181a67b7542122c - 6 | 1679091c5a880faf6fb5e6087eb1b2dc - 8 | c9f0f895fb98ab9159f51fd0297e236d - 10 | d3d9446802a44259755d38e6d163e820 - 12 | c20ad4d76fe97759aa27a0c99bff6710 - 14 | aab3238922bcc25a6f606eb525ffdc56 - 16 | c74d97b01eae257e44aa9d5bade97baf - 18 | 6f4922f45568161a8cdf4ad2299f6d23 - 20 | 98f13708210194c475687be6106a3b84 - 20 | Success -(12 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM t2; - QUERY PLAN ----------------- - Seq Scan on t2 -(1 row) - -CREATE TABLE t3 AS SELECT * FROM t1; -SELECT * FROM t3; - a | b -----+---------------------------------- - 0 | cfcd208495d565ef66e7dff9f98764da - 2 | c81e728d9d4c2f636f067f89cc14862c - 4 | a87ff679a2f3e71d9181a67b7542122c - 6 | 1679091c5a880faf6fb5e6087eb1b2dc - 8 | c9f0f895fb98ab9159f51fd0297e236d - 10 | d3d9446802a44259755d38e6d163e820 - 12 | c20ad4d76fe97759aa27a0c99bff6710 - 14 | aab3238922bcc25a6f606eb525ffdc56 - 16 | c74d97b01eae257e44aa9d5bade97baf - 18 | 6f4922f45568161a8cdf4ad2299f6d23 - 20 | 98f13708210194c475687be6106a3b84 - 20 | Success -(12 rows) - -SELECT * INTO t4 FROM t1; -SELECT * FROM t4; - a | b -----+---------------------------------- - 0 | cfcd208495d565ef66e7dff9f98764da - 2 | c81e728d9d4c2f636f067f89cc14862c - 4 | a87ff679a2f3e71d9181a67b7542122c - 6 | 1679091c5a880faf6fb5e6087eb1b2dc - 8 | c9f0f895fb98ab9159f51fd0297e236d - 10 | d3d9446802a44259755d38e6d163e820 - 12 | c20ad4d76fe97759aa27a0c99bff6710 - 14 | aab3238922bcc25a6f606eb525ffdc56 - 16 | c74d97b01eae257e44aa9d5bade97baf - 18 | 6f4922f45568161a8cdf4ad2299f6d23 - 20 | 98f13708210194c475687be6106a3b84 - 20 | Success -(12 rows) - --- --- RLS with JOIN --- -SET SESSION AUTHORIZATION regress_rls_alice; -CREATE TABLE blog (id integer, author text, post text); -CREATE TABLE comment (blog_id integer, message text); -GRANT ALL ON blog, comment TO regress_rls_bob; -CREATE POLICY blog_1 ON blog USING (id % 2 = 0); -ALTER TABLE blog ENABLE ROW LEVEL SECURITY; -INSERT INTO blog VALUES - (1, 'alice', 'blog #1'), - (2, 'bob', 'blog #1'), - (3, 'alice', 'blog #2'), - (4, 'alice', 'blog #3'), - (5, 'john', 'blog #1'); -INSERT INTO comment VALUES - (1, 'cool blog'), - (1, 'fun blog'), - (3, 'crazy blog'), - (5, 'what?'), - (4, 'insane!'), - (2, 'who did it?'); -SET SESSION AUTHORIZATION regress_rls_bob; --- Check RLS JOIN with Non-RLS. -SELECT id, author, message FROM blog JOIN comment ON id = blog_id; - id | author | message -----+--------+------------- - 4 | alice | insane! - 2 | bob | who did it? -(2 rows) - --- Check Non-RLS JOIN with RLS. -SELECT id, author, message FROM comment JOIN blog ON id = blog_id; - id | author | message -----+--------+------------- - 4 | alice | insane! - 2 | bob | who did it? -(2 rows) - -SET SESSION AUTHORIZATION regress_rls_alice; -CREATE POLICY comment_1 ON comment USING (blog_id < 4); -ALTER TABLE comment ENABLE ROW LEVEL SECURITY; -SET SESSION AUTHORIZATION regress_rls_bob; --- Check RLS JOIN RLS -SELECT id, author, message FROM blog JOIN comment ON id = blog_id; - id | author | message -----+--------+------------- - 2 | bob | who did it? -(1 row) - -SELECT id, author, message FROM comment JOIN blog ON id = blog_id; - id | author | message -----+--------+------------- - 2 | bob | who did it? -(1 row) - -SET SESSION AUTHORIZATION regress_rls_alice; -DROP TABLE blog, comment; --- --- Default Deny Policy --- -RESET SESSION AUTHORIZATION; -DROP POLICY p2 ON t1; -ALTER TABLE t1 OWNER TO regress_rls_alice; --- Check that default deny does not apply to superuser. -RESET SESSION AUTHORIZATION; -SELECT * FROM t1; - a | b -----+---------------------------------- - 1 | c4ca4238a0b923820dcc509a6f75849b - 3 | eccbc87e4b5ce2fe28308fd9f2a7baf3 - 5 | e4da3b7fbbce2345d7772b0674a318d5 - 7 | 8f14e45fceea167a5a36dedd4bea2543 - 9 | 45c48cce2e2d7fbdea1afc51c7c6ad26 - 11 | 6512bd43d9caa6e02c990b0a82652dca - 13 | c51ce410c124a10e0db5e4b97fc2af39 - 15 | 9bf31c7ff062936a96d3c8bd1f8f2ff3 - 17 | 70efdf2ec9b086079795c442636b55fb - 19 | 1f0e3dad99908345f7439f8ffabdffc4 - 0 | cfcd208495d565ef66e7dff9f98764da - 2 | c81e728d9d4c2f636f067f89cc14862c - 4 | a87ff679a2f3e71d9181a67b7542122c - 6 | 1679091c5a880faf6fb5e6087eb1b2dc - 8 | c9f0f895fb98ab9159f51fd0297e236d - 10 | d3d9446802a44259755d38e6d163e820 - 12 | c20ad4d76fe97759aa27a0c99bff6710 - 14 | aab3238922bcc25a6f606eb525ffdc56 - 16 | c74d97b01eae257e44aa9d5bade97baf - 18 | 6f4922f45568161a8cdf4ad2299f6d23 - 20 | 98f13708210194c475687be6106a3b84 - 20 | Success -(22 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM t1; - QUERY PLAN ----------------- - Seq Scan on t1 -(1 row) - --- Check that default deny does not apply to table owner. -SET SESSION AUTHORIZATION regress_rls_alice; -SELECT * FROM t1; - a | b -----+---------------------------------- - 1 | c4ca4238a0b923820dcc509a6f75849b - 3 | eccbc87e4b5ce2fe28308fd9f2a7baf3 - 5 | e4da3b7fbbce2345d7772b0674a318d5 - 7 | 8f14e45fceea167a5a36dedd4bea2543 - 9 | 45c48cce2e2d7fbdea1afc51c7c6ad26 - 11 | 6512bd43d9caa6e02c990b0a82652dca - 13 | c51ce410c124a10e0db5e4b97fc2af39 - 15 | 9bf31c7ff062936a96d3c8bd1f8f2ff3 - 17 | 70efdf2ec9b086079795c442636b55fb - 19 | 1f0e3dad99908345f7439f8ffabdffc4 - 0 | cfcd208495d565ef66e7dff9f98764da - 2 | c81e728d9d4c2f636f067f89cc14862c - 4 | a87ff679a2f3e71d9181a67b7542122c - 6 | 1679091c5a880faf6fb5e6087eb1b2dc - 8 | c9f0f895fb98ab9159f51fd0297e236d - 10 | d3d9446802a44259755d38e6d163e820 - 12 | c20ad4d76fe97759aa27a0c99bff6710 - 14 | aab3238922bcc25a6f606eb525ffdc56 - 16 | c74d97b01eae257e44aa9d5bade97baf - 18 | 6f4922f45568161a8cdf4ad2299f6d23 - 20 | 98f13708210194c475687be6106a3b84 - 20 | Success -(22 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM t1; - QUERY PLAN ----------------- - Seq Scan on t1 -(1 row) - --- Check that default deny applies to non-owner/non-superuser when RLS on. -SET SESSION AUTHORIZATION regress_rls_bob; -SET row_security TO ON; -SELECT * FROM t1; - a | b ----+--- -(0 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM t1; - QUERY PLAN --------------------------- - Result - One-Time Filter: false -(2 rows) - -SET SESSION AUTHORIZATION regress_rls_bob; -SELECT * FROM t1; - a | b ----+--- -(0 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM t1; - QUERY PLAN --------------------------- - Result - One-Time Filter: false -(2 rows) - --- --- COPY TO/FROM --- -RESET SESSION AUTHORIZATION; -DROP TABLE copy_t CASCADE; -ERROR: table "copy_t" does not exist -CREATE TABLE copy_t (a integer, b text); -CREATE POLICY p1 ON copy_t USING (a % 2 = 0); -ALTER TABLE copy_t ENABLE ROW LEVEL SECURITY; -GRANT ALL ON copy_t TO regress_rls_bob, regress_rls_exempt_user; -INSERT INTO copy_t (SELECT x, md5(x::text) FROM generate_series(0,10) x); --- Check COPY TO as Superuser/owner. -RESET SESSION AUTHORIZATION; -SET row_security TO OFF; -COPY (SELECT * FROM copy_t ORDER BY a ASC) TO STDOUT WITH DELIMITER ','; -0,cfcd208495d565ef66e7dff9f98764da -1,c4ca4238a0b923820dcc509a6f75849b -2,c81e728d9d4c2f636f067f89cc14862c -3,eccbc87e4b5ce2fe28308fd9f2a7baf3 -4,a87ff679a2f3e71d9181a67b7542122c -5,e4da3b7fbbce2345d7772b0674a318d5 -6,1679091c5a880faf6fb5e6087eb1b2dc -7,8f14e45fceea167a5a36dedd4bea2543 -8,c9f0f895fb98ab9159f51fd0297e236d -9,45c48cce2e2d7fbdea1afc51c7c6ad26 -10,d3d9446802a44259755d38e6d163e820 -SET row_security TO ON; -COPY (SELECT * FROM copy_t ORDER BY a ASC) TO STDOUT WITH DELIMITER ','; -0,cfcd208495d565ef66e7dff9f98764da -1,c4ca4238a0b923820dcc509a6f75849b -2,c81e728d9d4c2f636f067f89cc14862c -3,eccbc87e4b5ce2fe28308fd9f2a7baf3 -4,a87ff679a2f3e71d9181a67b7542122c -5,e4da3b7fbbce2345d7772b0674a318d5 -6,1679091c5a880faf6fb5e6087eb1b2dc -7,8f14e45fceea167a5a36dedd4bea2543 -8,c9f0f895fb98ab9159f51fd0297e236d -9,45c48cce2e2d7fbdea1afc51c7c6ad26 -10,d3d9446802a44259755d38e6d163e820 --- Check COPY TO as user with permissions. -SET SESSION AUTHORIZATION regress_rls_bob; -SET row_security TO OFF; -COPY (SELECT * FROM copy_t ORDER BY a ASC) TO STDOUT WITH DELIMITER ','; --fail - would be affected by RLS -ERROR: query would be affected by row-level security policy for table "copy_t" -SET row_security TO ON; -COPY (SELECT * FROM copy_t ORDER BY a ASC) TO STDOUT WITH DELIMITER ','; --ok -0,cfcd208495d565ef66e7dff9f98764da -2,c81e728d9d4c2f636f067f89cc14862c -4,a87ff679a2f3e71d9181a67b7542122c -6,1679091c5a880faf6fb5e6087eb1b2dc -8,c9f0f895fb98ab9159f51fd0297e236d -10,d3d9446802a44259755d38e6d163e820 --- Check COPY TO as user with permissions and BYPASSRLS -SET SESSION AUTHORIZATION regress_rls_exempt_user; -SET row_security TO OFF; -COPY (SELECT * FROM copy_t ORDER BY a ASC) TO STDOUT WITH DELIMITER ','; --ok -0,cfcd208495d565ef66e7dff9f98764da -1,c4ca4238a0b923820dcc509a6f75849b -2,c81e728d9d4c2f636f067f89cc14862c -3,eccbc87e4b5ce2fe28308fd9f2a7baf3 -4,a87ff679a2f3e71d9181a67b7542122c -5,e4da3b7fbbce2345d7772b0674a318d5 -6,1679091c5a880faf6fb5e6087eb1b2dc -7,8f14e45fceea167a5a36dedd4bea2543 -8,c9f0f895fb98ab9159f51fd0297e236d -9,45c48cce2e2d7fbdea1afc51c7c6ad26 -10,d3d9446802a44259755d38e6d163e820 -SET row_security TO ON; -COPY (SELECT * FROM copy_t ORDER BY a ASC) TO STDOUT WITH DELIMITER ','; --ok -0,cfcd208495d565ef66e7dff9f98764da -1,c4ca4238a0b923820dcc509a6f75849b -2,c81e728d9d4c2f636f067f89cc14862c -3,eccbc87e4b5ce2fe28308fd9f2a7baf3 -4,a87ff679a2f3e71d9181a67b7542122c -5,e4da3b7fbbce2345d7772b0674a318d5 -6,1679091c5a880faf6fb5e6087eb1b2dc -7,8f14e45fceea167a5a36dedd4bea2543 -8,c9f0f895fb98ab9159f51fd0297e236d -9,45c48cce2e2d7fbdea1afc51c7c6ad26 -10,d3d9446802a44259755d38e6d163e820 --- Check COPY TO as user without permissions. SET row_security TO OFF; -SET SESSION AUTHORIZATION regress_rls_carol; -SET row_security TO OFF; -COPY (SELECT * FROM copy_t ORDER BY a ASC) TO STDOUT WITH DELIMITER ','; --fail - would be affected by RLS -ERROR: query would be affected by row-level security policy for table "copy_t" -SET row_security TO ON; -COPY (SELECT * FROM copy_t ORDER BY a ASC) TO STDOUT WITH DELIMITER ','; --fail - permission denied -ERROR: permission denied for table copy_t --- Check COPY relation TO; keep it just one row to avoid reordering issues -RESET SESSION AUTHORIZATION; -SET row_security TO ON; -CREATE TABLE copy_rel_to (a integer, b text); -CREATE POLICY p1 ON copy_rel_to USING (a % 2 = 0); -ALTER TABLE copy_rel_to ENABLE ROW LEVEL SECURITY; -GRANT ALL ON copy_rel_to TO regress_rls_bob, regress_rls_exempt_user; -INSERT INTO copy_rel_to VALUES (1, md5('1')); --- Check COPY TO as Superuser/owner. -RESET SESSION AUTHORIZATION; -SET row_security TO OFF; -COPY copy_rel_to TO STDOUT WITH DELIMITER ','; -1,c4ca4238a0b923820dcc509a6f75849b -SET row_security TO ON; -COPY copy_rel_to TO STDOUT WITH DELIMITER ','; -1,c4ca4238a0b923820dcc509a6f75849b --- Check COPY TO as user with permissions. -SET SESSION AUTHORIZATION regress_rls_bob; -SET row_security TO OFF; -COPY copy_rel_to TO STDOUT WITH DELIMITER ','; --fail - would be affected by RLS -ERROR: query would be affected by row-level security policy for table "copy_rel_to" -SET row_security TO ON; -COPY copy_rel_to TO STDOUT WITH DELIMITER ','; --ok --- Check COPY TO as user with permissions and BYPASSRLS -SET SESSION AUTHORIZATION regress_rls_exempt_user; -SET row_security TO OFF; -COPY copy_rel_to TO STDOUT WITH DELIMITER ','; --ok -1,c4ca4238a0b923820dcc509a6f75849b -SET row_security TO ON; -COPY copy_rel_to TO STDOUT WITH DELIMITER ','; --ok -1,c4ca4238a0b923820dcc509a6f75849b --- Check COPY TO as user without permissions. SET row_security TO OFF; -SET SESSION AUTHORIZATION regress_rls_carol; -SET row_security TO OFF; -COPY copy_rel_to TO STDOUT WITH DELIMITER ','; --fail - permission denied -ERROR: permission denied for table copy_rel_to -SET row_security TO ON; -COPY copy_rel_to TO STDOUT WITH DELIMITER ','; --fail - permission denied -ERROR: permission denied for table copy_rel_to --- Check COPY FROM as Superuser/owner. -RESET SESSION AUTHORIZATION; -SET row_security TO OFF; -COPY copy_t FROM STDIN; --ok -SET row_security TO ON; -COPY copy_t FROM STDIN; --ok --- Check COPY FROM as user with permissions. -SET SESSION AUTHORIZATION regress_rls_bob; -SET row_security TO OFF; -COPY copy_t FROM STDIN; --fail - would be affected by RLS. -ERROR: query would be affected by row-level security policy for table "copy_t" -SET row_security TO ON; -COPY copy_t FROM STDIN; --fail - COPY FROM not supported by RLS. -ERROR: COPY FROM not supported with row-level security -HINT: Use INSERT statements instead. --- Check COPY FROM as user with permissions and BYPASSRLS -SET SESSION AUTHORIZATION regress_rls_exempt_user; -SET row_security TO ON; -COPY copy_t FROM STDIN; --ok --- Check COPY FROM as user without permissions. -SET SESSION AUTHORIZATION regress_rls_carol; -SET row_security TO OFF; -COPY copy_t FROM STDIN; --fail - permission denied. -ERROR: permission denied for table copy_t -SET row_security TO ON; -COPY copy_t FROM STDIN; --fail - permission denied. -ERROR: permission denied for table copy_t -RESET SESSION AUTHORIZATION; -DROP TABLE copy_t; -DROP TABLE copy_rel_to CASCADE; --- Check WHERE CURRENT OF -SET SESSION AUTHORIZATION regress_rls_alice; -CREATE TABLE current_check (currentid int, payload text, rlsuser text); -GRANT ALL ON current_check TO PUBLIC; -INSERT INTO current_check VALUES - (1, 'abc', 'regress_rls_bob'), - (2, 'bcd', 'regress_rls_bob'), - (3, 'cde', 'regress_rls_bob'), - (4, 'def', 'regress_rls_bob'); -CREATE POLICY p1 ON current_check FOR SELECT USING (currentid % 2 = 0); -CREATE POLICY p2 ON current_check FOR DELETE USING (currentid = 4 AND rlsuser = current_user); -CREATE POLICY p3 ON current_check FOR UPDATE USING (currentid = 4) WITH CHECK (rlsuser = current_user); -ALTER TABLE current_check ENABLE ROW LEVEL SECURITY; -SET SESSION AUTHORIZATION regress_rls_bob; --- Can SELECT even rows -SELECT * FROM current_check; - currentid | payload | rlsuser ------------+---------+----------------- - 2 | bcd | regress_rls_bob - 4 | def | regress_rls_bob -(2 rows) - --- Cannot UPDATE row 2 -UPDATE current_check SET payload = payload || '_new' WHERE currentid = 2 RETURNING *; - currentid | payload | rlsuser ------------+---------+--------- -(0 rows) - -BEGIN; -DECLARE current_check_cursor SCROLL CURSOR FOR SELECT * FROM current_check; --- Returns rows that can be seen according to SELECT policy, like plain SELECT --- above (even rows) -FETCH ABSOLUTE 1 FROM current_check_cursor; - currentid | payload | rlsuser ------------+---------+----------------- - 2 | bcd | regress_rls_bob -(1 row) - --- Still cannot UPDATE row 2 through cursor -UPDATE current_check SET payload = payload || '_new' WHERE CURRENT OF current_check_cursor RETURNING *; - currentid | payload | rlsuser ------------+---------+--------- -(0 rows) - --- Can update row 4 through cursor, which is the next visible row -FETCH RELATIVE 1 FROM current_check_cursor; - currentid | payload | rlsuser ------------+---------+----------------- - 4 | def | regress_rls_bob -(1 row) - -UPDATE current_check SET payload = payload || '_new' WHERE CURRENT OF current_check_cursor RETURNING *; - currentid | payload | rlsuser ------------+---------+----------------- - 4 | def_new | regress_rls_bob -(1 row) - -SELECT * FROM current_check; - currentid | payload | rlsuser ------------+---------+----------------- - 2 | bcd | regress_rls_bob - 4 | def_new | regress_rls_bob -(2 rows) - --- Plan should be a subquery TID scan -EXPLAIN (COSTS OFF) UPDATE current_check SET payload = payload WHERE CURRENT OF current_check_cursor; - QUERY PLAN -------------------------------------------------------------- - Update on current_check - -> Tid Scan on current_check - TID Cond: CURRENT OF current_check_cursor - Filter: ((currentid = 4) AND ((currentid % 2) = 0)) -(4 rows) - --- Similarly can only delete row 4 -FETCH ABSOLUTE 1 FROM current_check_cursor; - currentid | payload | rlsuser ------------+---------+----------------- - 2 | bcd | regress_rls_bob -(1 row) - -DELETE FROM current_check WHERE CURRENT OF current_check_cursor RETURNING *; - currentid | payload | rlsuser ------------+---------+--------- -(0 rows) - -FETCH RELATIVE 1 FROM current_check_cursor; - currentid | payload | rlsuser ------------+---------+----------------- - 4 | def | regress_rls_bob -(1 row) - -DELETE FROM current_check WHERE CURRENT OF current_check_cursor RETURNING *; - currentid | payload | rlsuser ------------+---------+----------------- - 4 | def_new | regress_rls_bob -(1 row) - -SELECT * FROM current_check; - currentid | payload | rlsuser ------------+---------+----------------- - 2 | bcd | regress_rls_bob -(1 row) - -COMMIT; --- --- check pg_stats view filtering --- -SET row_security TO ON; -SET SESSION AUTHORIZATION regress_rls_alice; -ANALYZE current_check; --- Stats visible -SELECT row_security_active('current_check'); - row_security_active ---------------------- - f -(1 row) - -SELECT attname, most_common_vals FROM pg_stats - WHERE tablename = 'current_check' - ORDER BY 1; - attname | most_common_vals ------------+------------------- - currentid | - payload | - rlsuser | {regress_rls_bob} -(3 rows) - -SET SESSION AUTHORIZATION regress_rls_bob; --- Stats not visible -SELECT row_security_active('current_check'); - row_security_active ---------------------- - t -(1 row) - -SELECT attname, most_common_vals FROM pg_stats - WHERE tablename = 'current_check' - ORDER BY 1; - attname | most_common_vals ----------+------------------ -(0 rows) - --- --- Collation support --- -BEGIN; -CREATE TABLE coll_t (c) AS VALUES ('bar'::text); -CREATE POLICY coll_p ON coll_t USING (c < ('foo'::text COLLATE "C")); -ALTER TABLE coll_t ENABLE ROW LEVEL SECURITY; -GRANT SELECT ON coll_t TO regress_rls_alice; -SELECT (string_to_array(polqual, ':'))[7] AS inputcollid FROM pg_policy WHERE polrelid = 'coll_t'::regclass; - inputcollid ------------------- - inputcollid 950 -(1 row) - -SET SESSION AUTHORIZATION regress_rls_alice; -SELECT * FROM coll_t; - c ------ - bar -(1 row) - -ROLLBACK; --- --- Shared Object Dependencies --- -RESET SESSION AUTHORIZATION; -BEGIN; -CREATE ROLE regress_rls_eve; -CREATE ROLE regress_rls_frank; -CREATE TABLE tbl1 (c) AS VALUES ('bar'::text); -GRANT SELECT ON TABLE tbl1 TO regress_rls_eve; -CREATE POLICY P ON tbl1 TO regress_rls_eve, regress_rls_frank USING (true); -SELECT refclassid::regclass, deptype - FROM pg_depend - WHERE classid = 'pg_policy'::regclass - AND refobjid = 'tbl1'::regclass; - refclassid | deptype -------------+--------- - pg_class | a -(1 row) - -SELECT refclassid::regclass, deptype - FROM pg_shdepend - WHERE classid = 'pg_policy'::regclass - AND refobjid IN ('regress_rls_eve'::regrole, 'regress_rls_frank'::regrole); - refclassid | deptype -------------+--------- - pg_authid | r - pg_authid | r -(2 rows) - -SAVEPOINT q; -DROP ROLE regress_rls_eve; --fails due to dependency on POLICY p -ERROR: role "regress_rls_eve" cannot be dropped because some objects depend on it -DETAIL: privileges for table tbl1 -target of policy p on table tbl1 -ROLLBACK TO q; -ALTER POLICY p ON tbl1 TO regress_rls_frank USING (true); -SAVEPOINT q; -DROP ROLE regress_rls_eve; --fails due to dependency on GRANT SELECT -ERROR: role "regress_rls_eve" cannot be dropped because some objects depend on it -DETAIL: privileges for table tbl1 -ROLLBACK TO q; -REVOKE ALL ON TABLE tbl1 FROM regress_rls_eve; -SAVEPOINT q; -DROP ROLE regress_rls_eve; --succeeds -ROLLBACK TO q; -SAVEPOINT q; -DROP ROLE regress_rls_frank; --fails due to dependency on POLICY p -ERROR: role "regress_rls_frank" cannot be dropped because some objects depend on it -DETAIL: target of policy p on table tbl1 -ROLLBACK TO q; -DROP POLICY p ON tbl1; -SAVEPOINT q; -DROP ROLE regress_rls_frank; -- succeeds -ROLLBACK TO q; -ROLLBACK; -- cleanup --- --- Converting table to view --- -BEGIN; -CREATE TABLE t (c int); -CREATE POLICY p ON t USING (c % 2 = 1); -ALTER TABLE t ENABLE ROW LEVEL SECURITY; -SAVEPOINT q; -CREATE RULE "_RETURN" AS ON SELECT TO t DO INSTEAD - SELECT * FROM generate_series(1,5) t0(c); -- fails due to row-level security enabled -ERROR: could not convert table "t" to a view because it has row security enabled -ROLLBACK TO q; -ALTER TABLE t DISABLE ROW LEVEL SECURITY; -SAVEPOINT q; -CREATE RULE "_RETURN" AS ON SELECT TO t DO INSTEAD - SELECT * FROM generate_series(1,5) t0(c); -- fails due to policy p on t -ERROR: could not convert table "t" to a view because it has row security policies -ROLLBACK TO q; -DROP POLICY p ON t; -CREATE RULE "_RETURN" AS ON SELECT TO t DO INSTEAD - SELECT * FROM generate_series(1,5) t0(c); -- succeeds -ROLLBACK; --- --- Policy expression handling --- -BEGIN; -CREATE TABLE t (c) AS VALUES ('bar'::text); -CREATE POLICY p ON t USING (max(c)); -- fails: aggregate functions are not allowed in policy expressions -ERROR: aggregate functions are not allowed in policy expressions -ROLLBACK; --- --- Non-target relations are only subject to SELECT policies --- -SET SESSION AUTHORIZATION regress_rls_alice; -CREATE TABLE r1 (a int); -CREATE TABLE r2 (a int); -INSERT INTO r1 VALUES (10), (20); -INSERT INTO r2 VALUES (10), (20); -GRANT ALL ON r1, r2 TO regress_rls_bob; -CREATE POLICY p1 ON r1 USING (true); -ALTER TABLE r1 ENABLE ROW LEVEL SECURITY; -CREATE POLICY p1 ON r2 FOR SELECT USING (true); -CREATE POLICY p2 ON r2 FOR INSERT WITH CHECK (false); -CREATE POLICY p3 ON r2 FOR UPDATE USING (false); -CREATE POLICY p4 ON r2 FOR DELETE USING (false); -ALTER TABLE r2 ENABLE ROW LEVEL SECURITY; -SET SESSION AUTHORIZATION regress_rls_bob; -SELECT * FROM r1; - a ----- - 10 - 20 -(2 rows) - -SELECT * FROM r2; - a ----- - 10 - 20 -(2 rows) - --- r2 is read-only -INSERT INTO r2 VALUES (2); -- Not allowed -ERROR: new row violates row-level security policy for table "r2" -UPDATE r2 SET a = 2 RETURNING *; -- Updates nothing - a ---- -(0 rows) - -DELETE FROM r2 RETURNING *; -- Deletes nothing - a ---- -(0 rows) - --- r2 can be used as a non-target relation in DML -INSERT INTO r1 SELECT a + 1 FROM r2 RETURNING *; -- OK - a ----- - 11 - 21 -(2 rows) - -UPDATE r1 SET a = r2.a + 2 FROM r2 WHERE r1.a = r2.a RETURNING *; -- OK - a | a -----+---- - 12 | 10 - 22 | 20 -(2 rows) - -DELETE FROM r1 USING r2 WHERE r1.a = r2.a + 2 RETURNING *; -- OK - a | a -----+---- - 12 | 10 - 22 | 20 -(2 rows) - -SELECT * FROM r1; - a ----- - 11 - 21 -(2 rows) - -SELECT * FROM r2; - a ----- - 10 - 20 -(2 rows) - -SET SESSION AUTHORIZATION regress_rls_alice; -DROP TABLE r1; -DROP TABLE r2; --- --- FORCE ROW LEVEL SECURITY applies RLS to owners too --- -SET SESSION AUTHORIZATION regress_rls_alice; -SET row_security = on; -CREATE TABLE r1 (a int); -INSERT INTO r1 VALUES (10), (20); -CREATE POLICY p1 ON r1 USING (false); -ALTER TABLE r1 ENABLE ROW LEVEL SECURITY; -ALTER TABLE r1 FORCE ROW LEVEL SECURITY; --- No error, but no rows -TABLE r1; - a ---- -(0 rows) - --- RLS error -INSERT INTO r1 VALUES (1); -ERROR: new row violates row-level security policy for table "r1" --- No error (unable to see any rows to update) -UPDATE r1 SET a = 1; -TABLE r1; - a ---- -(0 rows) - --- No error (unable to see any rows to delete) -DELETE FROM r1; -TABLE r1; - a ---- -(0 rows) - -SET row_security = off; --- these all fail, would be affected by RLS -TABLE r1; -ERROR: query would be affected by row-level security policy for table "r1" -HINT: To disable the policy for the table's owner, use ALTER TABLE NO FORCE ROW LEVEL SECURITY. -UPDATE r1 SET a = 1; -ERROR: query would be affected by row-level security policy for table "r1" -HINT: To disable the policy for the table's owner, use ALTER TABLE NO FORCE ROW LEVEL SECURITY. -DELETE FROM r1; -ERROR: query would be affected by row-level security policy for table "r1" -HINT: To disable the policy for the table's owner, use ALTER TABLE NO FORCE ROW LEVEL SECURITY. -DROP TABLE r1; --- --- FORCE ROW LEVEL SECURITY does not break RI --- -SET SESSION AUTHORIZATION regress_rls_alice; -SET row_security = on; -CREATE TABLE r1 (a int PRIMARY KEY); -CREATE TABLE r2 (a int REFERENCES r1); -INSERT INTO r1 VALUES (10), (20); -INSERT INTO r2 VALUES (10), (20); --- Create policies on r2 which prevent the --- owner from seeing any rows, but RI should --- still see them. -CREATE POLICY p1 ON r2 USING (false); -ALTER TABLE r2 ENABLE ROW LEVEL SECURITY; -ALTER TABLE r2 FORCE ROW LEVEL SECURITY; --- Errors due to rows in r2 -DELETE FROM r1; -ERROR: update or delete on table "r1" violates foreign key constraint "r2_a_fkey" on table "r2" -DETAIL: Key (a)=(10) is still referenced from table "r2". --- Reset r2 to no-RLS -DROP POLICY p1 ON r2; -ALTER TABLE r2 NO FORCE ROW LEVEL SECURITY; -ALTER TABLE r2 DISABLE ROW LEVEL SECURITY; --- clean out r2 for INSERT test below -DELETE FROM r2; --- Change r1 to not allow rows to be seen -CREATE POLICY p1 ON r1 USING (false); -ALTER TABLE r1 ENABLE ROW LEVEL SECURITY; -ALTER TABLE r1 FORCE ROW LEVEL SECURITY; --- No rows seen -TABLE r1; - a ---- -(0 rows) - --- No error, RI still sees that row exists in r1 -INSERT INTO r2 VALUES (10); -DROP TABLE r2; -DROP TABLE r1; --- Ensure cascaded DELETE works -CREATE TABLE r1 (a int PRIMARY KEY); -CREATE TABLE r2 (a int REFERENCES r1 ON DELETE CASCADE); -INSERT INTO r1 VALUES (10), (20); -INSERT INTO r2 VALUES (10), (20); --- Create policies on r2 which prevent the --- owner from seeing any rows, but RI should --- still see them. -CREATE POLICY p1 ON r2 USING (false); -ALTER TABLE r2 ENABLE ROW LEVEL SECURITY; -ALTER TABLE r2 FORCE ROW LEVEL SECURITY; --- Deletes all records from both -DELETE FROM r1; --- Remove FORCE from r2 -ALTER TABLE r2 NO FORCE ROW LEVEL SECURITY; --- As owner, we now bypass RLS --- verify no rows in r2 now -TABLE r2; - a ---- -(0 rows) - -DROP TABLE r2; -DROP TABLE r1; --- Ensure cascaded UPDATE works -CREATE TABLE r1 (a int PRIMARY KEY); -CREATE TABLE r2 (a int REFERENCES r1 ON UPDATE CASCADE); -INSERT INTO r1 VALUES (10), (20); -INSERT INTO r2 VALUES (10), (20); --- Create policies on r2 which prevent the --- owner from seeing any rows, but RI should --- still see them. -CREATE POLICY p1 ON r2 USING (false); -ALTER TABLE r2 ENABLE ROW LEVEL SECURITY; -ALTER TABLE r2 FORCE ROW LEVEL SECURITY; --- Updates records in both -UPDATE r1 SET a = a+5; --- Remove FORCE from r2 -ALTER TABLE r2 NO FORCE ROW LEVEL SECURITY; --- As owner, we now bypass RLS --- verify records in r2 updated -TABLE r2; - a ----- - 15 - 25 -(2 rows) - -DROP TABLE r2; -DROP TABLE r1; --- --- Test INSERT+RETURNING applies SELECT policies as --- WithCheckOptions (meaning an error is thrown) --- -SET SESSION AUTHORIZATION regress_rls_alice; -SET row_security = on; -CREATE TABLE r1 (a int); -CREATE POLICY p1 ON r1 FOR SELECT USING (false); -CREATE POLICY p2 ON r1 FOR INSERT WITH CHECK (true); -ALTER TABLE r1 ENABLE ROW LEVEL SECURITY; -ALTER TABLE r1 FORCE ROW LEVEL SECURITY; --- Works fine -INSERT INTO r1 VALUES (10), (20); --- No error, but no rows -TABLE r1; - a ---- -(0 rows) - -SET row_security = off; --- fail, would be affected by RLS -TABLE r1; -ERROR: query would be affected by row-level security policy for table "r1" -HINT: To disable the policy for the table's owner, use ALTER TABLE NO FORCE ROW LEVEL SECURITY. -SET row_security = on; --- Error -INSERT INTO r1 VALUES (10), (20) RETURNING *; -ERROR: new row violates row-level security policy for table "r1" -DROP TABLE r1; --- --- Test UPDATE+RETURNING applies SELECT policies as --- WithCheckOptions (meaning an error is thrown) --- -SET SESSION AUTHORIZATION regress_rls_alice; -SET row_security = on; -CREATE TABLE r1 (a int PRIMARY KEY); -CREATE POLICY p1 ON r1 FOR SELECT USING (a < 20); -CREATE POLICY p2 ON r1 FOR UPDATE USING (a < 20) WITH CHECK (true); -CREATE POLICY p3 ON r1 FOR INSERT WITH CHECK (true); -INSERT INTO r1 VALUES (10); -ALTER TABLE r1 ENABLE ROW LEVEL SECURITY; -ALTER TABLE r1 FORCE ROW LEVEL SECURITY; --- Works fine -UPDATE r1 SET a = 30; --- Show updated rows -ALTER TABLE r1 NO FORCE ROW LEVEL SECURITY; -TABLE r1; - a ----- - 30 -(1 row) - --- reset value in r1 for test with RETURNING -UPDATE r1 SET a = 10; --- Verify row reset -TABLE r1; - a ----- - 10 -(1 row) - -ALTER TABLE r1 FORCE ROW LEVEL SECURITY; --- Error -UPDATE r1 SET a = 30 RETURNING *; -ERROR: new row violates row-level security policy for table "r1" --- UPDATE path of INSERT ... ON CONFLICT DO UPDATE should also error out -INSERT INTO r1 VALUES (10) - ON CONFLICT (a) DO UPDATE SET a = 30 RETURNING *; -ERROR: new row violates row-level security policy for table "r1" --- Should still error out without RETURNING (use of arbiter always requires --- SELECT permissions) -INSERT INTO r1 VALUES (10) - ON CONFLICT (a) DO UPDATE SET a = 30; -ERROR: new row violates row-level security policy for table "r1" -INSERT INTO r1 VALUES (10) - ON CONFLICT ON CONSTRAINT r1_pkey DO UPDATE SET a = 30; -ERROR: new row violates row-level security policy for table "r1" -DROP TABLE r1; --- Check dependency handling -RESET SESSION AUTHORIZATION; -CREATE TABLE dep1 (c1 int); -CREATE TABLE dep2 (c1 int); -CREATE POLICY dep_p1 ON dep1 TO regress_rls_bob USING (c1 > (select max(dep2.c1) from dep2)); -ALTER POLICY dep_p1 ON dep1 TO regress_rls_bob,regress_rls_carol; --- Should return one -SELECT count(*) = 1 FROM pg_depend - WHERE objid = (SELECT oid FROM pg_policy WHERE polname = 'dep_p1') - AND refobjid = (SELECT oid FROM pg_class WHERE relname = 'dep2'); - ?column? ----------- - t -(1 row) - -ALTER POLICY dep_p1 ON dep1 USING (true); --- Should return one -SELECT count(*) = 1 FROM pg_shdepend - WHERE objid = (SELECT oid FROM pg_policy WHERE polname = 'dep_p1') - AND refobjid = (SELECT oid FROM pg_authid WHERE rolname = 'regress_rls_bob'); - ?column? ----------- - t -(1 row) - --- Should return one -SELECT count(*) = 1 FROM pg_shdepend - WHERE objid = (SELECT oid FROM pg_policy WHERE polname = 'dep_p1') - AND refobjid = (SELECT oid FROM pg_authid WHERE rolname = 'regress_rls_carol'); - ?column? ----------- - t -(1 row) - --- Should return zero -SELECT count(*) = 0 FROM pg_depend - WHERE objid = (SELECT oid FROM pg_policy WHERE polname = 'dep_p1') - AND refobjid = (SELECT oid FROM pg_class WHERE relname = 'dep2'); - ?column? ----------- - t -(1 row) - --- DROP OWNED BY testing -RESET SESSION AUTHORIZATION; -CREATE ROLE regress_rls_dob_role1; -CREATE ROLE regress_rls_dob_role2; -CREATE TABLE dob_t1 (c1 int); -CREATE TABLE dob_t2 (c1 int) PARTITION BY RANGE (c1); -CREATE POLICY p1 ON dob_t1 TO regress_rls_dob_role1 USING (true); -DROP OWNED BY regress_rls_dob_role1; -DROP POLICY p1 ON dob_t1; -- should fail, already gone -ERROR: policy "p1" for table "dob_t1" does not exist -CREATE POLICY p1 ON dob_t1 TO regress_rls_dob_role1,regress_rls_dob_role2 USING (true); -DROP OWNED BY regress_rls_dob_role1; -DROP POLICY p1 ON dob_t1; -- should succeed --- same cases with duplicate polroles entries -CREATE POLICY p1 ON dob_t1 TO regress_rls_dob_role1,regress_rls_dob_role1 USING (true); -DROP OWNED BY regress_rls_dob_role1; -DROP POLICY p1 ON dob_t1; -- should fail, already gone -ERROR: policy "p1" for table "dob_t1" does not exist -CREATE POLICY p1 ON dob_t1 TO regress_rls_dob_role1,regress_rls_dob_role1,regress_rls_dob_role2 USING (true); -DROP OWNED BY regress_rls_dob_role1; -DROP POLICY p1 ON dob_t1; -- should succeed --- partitioned target -CREATE POLICY p1 ON dob_t2 TO regress_rls_dob_role1,regress_rls_dob_role2 USING (true); -DROP OWNED BY regress_rls_dob_role1; -DROP POLICY p1 ON dob_t2; -- should succeed -DROP USER regress_rls_dob_role1; -DROP USER regress_rls_dob_role2; --- Bug #15708: view + table with RLS should check policies as view owner -CREATE TABLE ref_tbl (a int); -INSERT INTO ref_tbl VALUES (1); -CREATE TABLE rls_tbl (a int); -INSERT INTO rls_tbl VALUES (10); -ALTER TABLE rls_tbl ENABLE ROW LEVEL SECURITY; -CREATE POLICY p1 ON rls_tbl USING (EXISTS (SELECT 1 FROM ref_tbl)); -GRANT SELECT ON ref_tbl TO regress_rls_bob; -GRANT SELECT ON rls_tbl TO regress_rls_bob; -CREATE VIEW rls_view AS SELECT * FROM rls_tbl; -ALTER VIEW rls_view OWNER TO regress_rls_bob; -GRANT SELECT ON rls_view TO regress_rls_alice; -SET SESSION AUTHORIZATION regress_rls_alice; -SELECT * FROM ref_tbl; -- Permission denied -ERROR: permission denied for table ref_tbl -SELECT * FROM rls_tbl; -- Permission denied -ERROR: permission denied for table rls_tbl -SELECT * FROM rls_view; -- OK - a ----- - 10 -(1 row) - -RESET SESSION AUTHORIZATION; -DROP VIEW rls_view; -DROP TABLE rls_tbl; -DROP TABLE ref_tbl; --- Leaky operator test -CREATE TABLE rls_tbl (a int); -INSERT INTO rls_tbl SELECT x/10 FROM generate_series(1, 100) x; -ANALYZE rls_tbl; -ALTER TABLE rls_tbl ENABLE ROW LEVEL SECURITY; -GRANT SELECT ON rls_tbl TO regress_rls_alice; -SET SESSION AUTHORIZATION regress_rls_alice; -CREATE FUNCTION op_leak(int, int) RETURNS bool - AS 'BEGIN RAISE NOTICE ''op_leak => %, %'', $1, $2; RETURN $1 < $2; END' - LANGUAGE plpgsql; -CREATE OPERATOR <<< (procedure = op_leak, leftarg = int, rightarg = int, - restrict = scalarltsel); -SELECT * FROM rls_tbl WHERE a <<< 1000; - a ---- -(0 rows) - -DROP OPERATOR <<< (int, int); -DROP FUNCTION op_leak(int, int); -RESET SESSION AUTHORIZATION; -DROP TABLE rls_tbl; --- Bug #16006: whole-row Vars in a policy don't play nice with sub-selects -SET SESSION AUTHORIZATION regress_rls_alice; -CREATE TABLE rls_tbl (a int, b int, c int); -CREATE POLICY p1 ON rls_tbl USING (rls_tbl >= ROW(1,1,1)); -ALTER TABLE rls_tbl ENABLE ROW LEVEL SECURITY; -ALTER TABLE rls_tbl FORCE ROW LEVEL SECURITY; -INSERT INTO rls_tbl SELECT 10, 20, 30; -EXPLAIN (VERBOSE, COSTS OFF) -INSERT INTO rls_tbl - SELECT * FROM (SELECT b, c FROM rls_tbl ORDER BY a) ss; - QUERY PLAN --------------------------------------------------------------------- - Insert on regress_rls_schema.rls_tbl - -> Subquery Scan on ss - Output: ss.b, ss.c, NULL::integer - -> Sort - Output: rls_tbl_1.b, rls_tbl_1.c, rls_tbl_1.a - Sort Key: rls_tbl_1.a - -> Seq Scan on regress_rls_schema.rls_tbl rls_tbl_1 - Output: rls_tbl_1.b, rls_tbl_1.c, rls_tbl_1.a - Filter: (rls_tbl_1.* >= '(1,1,1)'::record) -(9 rows) - -INSERT INTO rls_tbl - SELECT * FROM (SELECT b, c FROM rls_tbl ORDER BY a) ss; -SELECT * FROM rls_tbl; - a | b | c -----+----+---- - 10 | 20 | 30 - 20 | 30 | -(2 rows) - -DROP TABLE rls_tbl; -RESET SESSION AUTHORIZATION; --- --- Clean up objects --- -RESET SESSION AUTHORIZATION; -DROP SCHEMA regress_rls_schema CASCADE; -NOTICE: drop cascades to 29 other objects -DETAIL: drop cascades to function f_leak(text) -drop cascades to table uaccount -drop cascades to table category -drop cascades to table document -drop cascades to table part_document -drop cascades to table dependent -drop cascades to table rec1 -drop cascades to table rec2 -drop cascades to view rec1v -drop cascades to view rec2v -drop cascades to table s1 -drop cascades to table s2 -drop cascades to view v2 -drop cascades to table b1 -drop cascades to view bv1 -drop cascades to table z1 -drop cascades to table z2 -drop cascades to table x1 -drop cascades to table y1 -drop cascades to table y2 -drop cascades to table t1 -drop cascades to table t2 -drop cascades to table t3 -drop cascades to table t4 -drop cascades to table current_check -drop cascades to table dep1 -drop cascades to table dep2 -drop cascades to table dob_t1 -drop cascades to table dob_t2 -DROP USER regress_rls_alice; -DROP USER regress_rls_bob; -DROP USER regress_rls_carol; -DROP USER regress_rls_dave; -DROP USER regress_rls_exempt_user; -DROP ROLE regress_rls_group1; -DROP ROLE regress_rls_group2; --- Arrange to have a few policies left over, for testing --- pg_dump/pg_restore -CREATE SCHEMA regress_rls_schema; -CREATE TABLE rls_tbl (c1 int); -ALTER TABLE rls_tbl ENABLE ROW LEVEL SECURITY; -CREATE POLICY p1 ON rls_tbl USING (c1 > 5); -CREATE POLICY p2 ON rls_tbl FOR SELECT USING (c1 <= 3); -CREATE POLICY p3 ON rls_tbl FOR UPDATE USING (c1 <= 3) WITH CHECK (c1 > 5); -CREATE POLICY p4 ON rls_tbl FOR DELETE USING (c1 <= 3); -CREATE TABLE rls_tbl_force (c1 int); -ALTER TABLE rls_tbl_force ENABLE ROW LEVEL SECURITY; -ALTER TABLE rls_tbl_force FORCE ROW LEVEL SECURITY; -CREATE POLICY p1 ON rls_tbl_force USING (c1 = 5) WITH CHECK (c1 < 5); -CREATE POLICY p2 ON rls_tbl_force FOR SELECT USING (c1 = 8); -CREATE POLICY p3 ON rls_tbl_force FOR UPDATE USING (c1 = 8) WITH CHECK (c1 >= 5); -CREATE POLICY p4 ON rls_tbl_force FOR DELETE USING (c1 = 8); +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/object_address.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/object_address.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/object_address.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/object_address.out 2023-02-20 19:46:21.939212571 -0500 @@ -1,623 +1 @@ --- --- Test for pg_get_object_address --- --- Clean up in case a prior regression run failed -SET client_min_messages TO 'warning'; -DROP ROLE IF EXISTS regress_addr_user; -RESET client_min_messages; -CREATE USER regress_addr_user; --- Test generic object addressing/identification functions -CREATE SCHEMA addr_nsp; -SET search_path TO 'addr_nsp'; -CREATE FOREIGN DATA WRAPPER addr_fdw; -CREATE SERVER addr_fserv FOREIGN DATA WRAPPER addr_fdw; -CREATE TEXT SEARCH DICTIONARY addr_ts_dict (template=simple); -CREATE TEXT SEARCH CONFIGURATION addr_ts_conf (copy=english); -CREATE TEXT SEARCH TEMPLATE addr_ts_temp (lexize=dsimple_lexize); -CREATE TEXT SEARCH PARSER addr_ts_prs - (start = prsd_start, gettoken = prsd_nexttoken, end = prsd_end, lextypes = prsd_lextype); -CREATE TABLE addr_nsp.gentable ( - a serial primary key CONSTRAINT a_chk CHECK (a > 0), - b text DEFAULT 'hello'); -CREATE TABLE addr_nsp.parttable ( - a int PRIMARY KEY -) PARTITION BY RANGE (a); -CREATE VIEW addr_nsp.genview AS SELECT * from addr_nsp.gentable; -CREATE MATERIALIZED VIEW addr_nsp.genmatview AS SELECT * FROM addr_nsp.gentable; -CREATE TYPE addr_nsp.gencomptype AS (a int); -CREATE TYPE addr_nsp.genenum AS ENUM ('one', 'two'); -CREATE FOREIGN TABLE addr_nsp.genftable (a int) SERVER addr_fserv; -CREATE AGGREGATE addr_nsp.genaggr(int4) (sfunc = int4pl, stype = int4); -CREATE DOMAIN addr_nsp.gendomain AS int4 CONSTRAINT domconstr CHECK (value > 0); -CREATE FUNCTION addr_nsp.trig() RETURNS TRIGGER LANGUAGE plpgsql AS $$ BEGIN END; $$; -CREATE TRIGGER t BEFORE INSERT ON addr_nsp.gentable FOR EACH ROW EXECUTE PROCEDURE addr_nsp.trig(); -CREATE POLICY genpol ON addr_nsp.gentable; -CREATE PROCEDURE addr_nsp.proc(int4) LANGUAGE SQL AS $$ $$; -CREATE SERVER "integer" FOREIGN DATA WRAPPER addr_fdw; -CREATE USER MAPPING FOR regress_addr_user SERVER "integer"; -ALTER DEFAULT PRIVILEGES FOR ROLE regress_addr_user IN SCHEMA public GRANT ALL ON TABLES TO regress_addr_user; -ALTER DEFAULT PRIVILEGES FOR ROLE regress_addr_user REVOKE DELETE ON TABLES FROM regress_addr_user; --- this transform would be quite unsafe to leave lying around, --- except that the SQL language pays no attention to transforms: -CREATE TRANSFORM FOR int LANGUAGE SQL ( - FROM SQL WITH FUNCTION prsd_lextype(internal), - TO SQL WITH FUNCTION int4recv(internal)); --- suppress warning that depends on wal_level -SET client_min_messages = 'ERROR'; -CREATE PUBLICATION addr_pub FOR TABLE addr_nsp.gentable; -RESET client_min_messages; -CREATE SUBSCRIPTION regress_addr_sub CONNECTION '' PUBLICATION bar WITH (connect = false, slot_name = NONE); -WARNING: tables were not subscribed, you will have to run ALTER SUBSCRIPTION ... REFRESH PUBLICATION to subscribe the tables -CREATE STATISTICS addr_nsp.gentable_stat ON a, b FROM addr_nsp.gentable; --- test some error cases -SELECT pg_get_object_address('stone', '{}', '{}'); -ERROR: unrecognized object type "stone" -SELECT pg_get_object_address('table', '{}', '{}'); -ERROR: name list length must be at least 1 -SELECT pg_get_object_address('table', '{NULL}', '{}'); -ERROR: name or argument lists may not contain nulls --- unrecognized object types -DO $$ -DECLARE - objtype text; -BEGIN - FOR objtype IN VALUES ('toast table'), ('index column'), ('sequence column'), - ('toast table column'), ('view column'), ('materialized view column') - LOOP - BEGIN - PERFORM pg_get_object_address(objtype, '{one}', '{}'); - EXCEPTION WHEN invalid_parameter_value THEN - RAISE WARNING 'error for %: %', objtype, sqlerrm; - END; - END LOOP; -END; -$$; -WARNING: error for toast table: unsupported object type "toast table" -WARNING: error for index column: unsupported object type "index column" -WARNING: error for sequence column: unsupported object type "sequence column" -WARNING: error for toast table column: unsupported object type "toast table column" -WARNING: error for view column: unsupported object type "view column" -WARNING: error for materialized view column: unsupported object type "materialized view column" --- miscellaneous other errors -select * from pg_get_object_address('operator of access method', '{btree,integer_ops,1}', '{int4,bool}'); -ERROR: operator 1 (int4, bool) of operator family integer_ops for access method btree does not exist -select * from pg_get_object_address('operator of access method', '{btree,integer_ops,99}', '{int4,int4}'); -ERROR: operator 99 (int4, int4) of operator family integer_ops for access method btree does not exist -select * from pg_get_object_address('function of access method', '{btree,integer_ops,1}', '{int4,bool}'); -ERROR: function 1 (int4, bool) of operator family integer_ops for access method btree does not exist -select * from pg_get_object_address('function of access method', '{btree,integer_ops,99}', '{int4,int4}'); -ERROR: function 99 (int4, int4) of operator family integer_ops for access method btree does not exist -DO $$ -DECLARE - objtype text; - names text[]; - args text[]; -BEGIN - FOR objtype IN VALUES - ('table'), ('index'), ('sequence'), ('view'), - ('materialized view'), ('foreign table'), - ('table column'), ('foreign table column'), - ('aggregate'), ('function'), ('procedure'), ('type'), ('cast'), - ('table constraint'), ('domain constraint'), ('conversion'), ('default value'), - ('operator'), ('operator class'), ('operator family'), ('rule'), ('trigger'), - ('text search parser'), ('text search dictionary'), - ('text search template'), ('text search configuration'), - ('policy'), ('user mapping'), ('default acl'), ('transform'), - ('operator of access method'), ('function of access method'), - ('publication relation') - LOOP - FOR names IN VALUES ('{eins}'), ('{addr_nsp, zwei}'), ('{eins, zwei, drei}') - LOOP - FOR args IN VALUES ('{}'), ('{integer}') - LOOP - BEGIN - PERFORM pg_get_object_address(objtype, names, args); - EXCEPTION WHEN OTHERS THEN - RAISE WARNING 'error for %,%,%: %', objtype, names, args, sqlerrm; - END; - END LOOP; - END LOOP; - END LOOP; -END; -$$; -WARNING: error for table,{eins},{}: relation "eins" does not exist -WARNING: error for table,{eins},{integer}: relation "eins" does not exist -WARNING: error for table,{addr_nsp,zwei},{}: relation "addr_nsp.zwei" does not exist -WARNING: error for table,{addr_nsp,zwei},{integer}: relation "addr_nsp.zwei" does not exist -WARNING: error for table,{eins,zwei,drei},{}: cross-database references are not implemented: "eins.zwei.drei" -WARNING: error for table,{eins,zwei,drei},{integer}: cross-database references are not implemented: "eins.zwei.drei" -WARNING: error for index,{eins},{}: relation "eins" does not exist -WARNING: error for index,{eins},{integer}: relation "eins" does not exist -WARNING: error for index,{addr_nsp,zwei},{}: relation "addr_nsp.zwei" does not exist -WARNING: error for index,{addr_nsp,zwei},{integer}: relation "addr_nsp.zwei" does not exist -WARNING: error for index,{eins,zwei,drei},{}: cross-database references are not implemented: "eins.zwei.drei" -WARNING: error for index,{eins,zwei,drei},{integer}: cross-database references are not implemented: "eins.zwei.drei" -WARNING: error for sequence,{eins},{}: relation "eins" does not exist -WARNING: error for sequence,{eins},{integer}: relation "eins" does not exist -WARNING: error for sequence,{addr_nsp,zwei},{}: relation "addr_nsp.zwei" does not exist -WARNING: error for sequence,{addr_nsp,zwei},{integer}: relation "addr_nsp.zwei" does not exist -WARNING: error for sequence,{eins,zwei,drei},{}: cross-database references are not implemented: "eins.zwei.drei" -WARNING: error for sequence,{eins,zwei,drei},{integer}: cross-database references are not implemented: "eins.zwei.drei" -WARNING: error for view,{eins},{}: relation "eins" does not exist -WARNING: error for view,{eins},{integer}: relation "eins" does not exist -WARNING: error for view,{addr_nsp,zwei},{}: relation "addr_nsp.zwei" does not exist -WARNING: error for view,{addr_nsp,zwei},{integer}: relation "addr_nsp.zwei" does not exist -WARNING: error for view,{eins,zwei,drei},{}: cross-database references are not implemented: "eins.zwei.drei" -WARNING: error for view,{eins,zwei,drei},{integer}: cross-database references are not implemented: "eins.zwei.drei" -WARNING: error for materialized view,{eins},{}: relation "eins" does not exist -WARNING: error for materialized view,{eins},{integer}: relation "eins" does not exist -WARNING: error for materialized view,{addr_nsp,zwei},{}: relation "addr_nsp.zwei" does not exist -WARNING: error for materialized view,{addr_nsp,zwei},{integer}: relation "addr_nsp.zwei" does not exist -WARNING: error for materialized view,{eins,zwei,drei},{}: cross-database references are not implemented: "eins.zwei.drei" -WARNING: error for materialized view,{eins,zwei,drei},{integer}: cross-database references are not implemented: "eins.zwei.drei" -WARNING: error for foreign table,{eins},{}: relation "eins" does not exist -WARNING: error for foreign table,{eins},{integer}: relation "eins" does not exist -WARNING: error for foreign table,{addr_nsp,zwei},{}: relation "addr_nsp.zwei" does not exist -WARNING: error for foreign table,{addr_nsp,zwei},{integer}: relation "addr_nsp.zwei" does not exist -WARNING: error for foreign table,{eins,zwei,drei},{}: cross-database references are not implemented: "eins.zwei.drei" -WARNING: error for foreign table,{eins,zwei,drei},{integer}: cross-database references are not implemented: "eins.zwei.drei" -WARNING: error for table column,{eins},{}: column name must be qualified -WARNING: error for table column,{eins},{integer}: column name must be qualified -WARNING: error for table column,{addr_nsp,zwei},{}: relation "addr_nsp" does not exist -WARNING: error for table column,{addr_nsp,zwei},{integer}: relation "addr_nsp" does not exist -WARNING: error for table column,{eins,zwei,drei},{}: schema "eins" does not exist -WARNING: error for table column,{eins,zwei,drei},{integer}: schema "eins" does not exist -WARNING: error for foreign table column,{eins},{}: column name must be qualified -WARNING: error for foreign table column,{eins},{integer}: column name must be qualified -WARNING: error for foreign table column,{addr_nsp,zwei},{}: relation "addr_nsp" does not exist -WARNING: error for foreign table column,{addr_nsp,zwei},{integer}: relation "addr_nsp" does not exist -WARNING: error for foreign table column,{eins,zwei,drei},{}: schema "eins" does not exist -WARNING: error for foreign table column,{eins,zwei,drei},{integer}: schema "eins" does not exist -WARNING: error for aggregate,{eins},{}: aggregate eins(*) does not exist -WARNING: error for aggregate,{eins},{integer}: aggregate eins(integer) does not exist -WARNING: error for aggregate,{addr_nsp,zwei},{}: aggregate addr_nsp.zwei(*) does not exist -WARNING: error for aggregate,{addr_nsp,zwei},{integer}: aggregate addr_nsp.zwei(integer) does not exist -WARNING: error for aggregate,{eins,zwei,drei},{}: cross-database references are not implemented: eins.zwei.drei -WARNING: error for aggregate,{eins,zwei,drei},{integer}: cross-database references are not implemented: eins.zwei.drei -WARNING: error for function,{eins},{}: function eins() does not exist -WARNING: error for function,{eins},{integer}: function eins(integer) does not exist -WARNING: error for function,{addr_nsp,zwei},{}: function addr_nsp.zwei() does not exist -WARNING: error for function,{addr_nsp,zwei},{integer}: function addr_nsp.zwei(integer) does not exist -WARNING: error for function,{eins,zwei,drei},{}: cross-database references are not implemented: eins.zwei.drei -WARNING: error for function,{eins,zwei,drei},{integer}: cross-database references are not implemented: eins.zwei.drei -WARNING: error for procedure,{eins},{}: procedure eins() does not exist -WARNING: error for procedure,{eins},{integer}: procedure eins(integer) does not exist -WARNING: error for procedure,{addr_nsp,zwei},{}: procedure addr_nsp.zwei() does not exist -WARNING: error for procedure,{addr_nsp,zwei},{integer}: procedure addr_nsp.zwei(integer) does not exist -WARNING: error for procedure,{eins,zwei,drei},{}: cross-database references are not implemented: eins.zwei.drei -WARNING: error for procedure,{eins,zwei,drei},{integer}: cross-database references are not implemented: eins.zwei.drei -WARNING: error for type,{eins},{}: type "eins" does not exist -WARNING: error for type,{eins},{integer}: type "eins" does not exist -WARNING: error for type,{addr_nsp,zwei},{}: name list length must be exactly 1 -WARNING: error for type,{addr_nsp,zwei},{integer}: name list length must be exactly 1 -WARNING: error for type,{eins,zwei,drei},{}: name list length must be exactly 1 -WARNING: error for type,{eins,zwei,drei},{integer}: name list length must be exactly 1 -WARNING: error for cast,{eins},{}: argument list length must be exactly 1 -WARNING: error for cast,{eins},{integer}: type "eins" does not exist -WARNING: error for cast,{addr_nsp,zwei},{}: name list length must be exactly 1 -WARNING: error for cast,{addr_nsp,zwei},{integer}: name list length must be exactly 1 -WARNING: error for cast,{eins,zwei,drei},{}: name list length must be exactly 1 -WARNING: error for cast,{eins,zwei,drei},{integer}: name list length must be exactly 1 -WARNING: error for table constraint,{eins},{}: must specify relation and object name -WARNING: error for table constraint,{eins},{integer}: must specify relation and object name -WARNING: error for table constraint,{addr_nsp,zwei},{}: relation "addr_nsp" does not exist -WARNING: error for table constraint,{addr_nsp,zwei},{integer}: relation "addr_nsp" does not exist -WARNING: error for table constraint,{eins,zwei,drei},{}: schema "eins" does not exist -WARNING: error for table constraint,{eins,zwei,drei},{integer}: schema "eins" does not exist -WARNING: error for domain constraint,{eins},{}: argument list length must be exactly 1 -WARNING: error for domain constraint,{eins},{integer}: type "eins" does not exist -WARNING: error for domain constraint,{addr_nsp,zwei},{}: name list length must be exactly 1 -WARNING: error for domain constraint,{addr_nsp,zwei},{integer}: name list length must be exactly 1 -WARNING: error for domain constraint,{eins,zwei,drei},{}: name list length must be exactly 1 -WARNING: error for domain constraint,{eins,zwei,drei},{integer}: name list length must be exactly 1 -WARNING: error for conversion,{eins},{}: conversion "eins" does not exist -WARNING: error for conversion,{eins},{integer}: conversion "eins" does not exist -WARNING: error for conversion,{addr_nsp,zwei},{}: conversion "addr_nsp.zwei" does not exist -WARNING: error for conversion,{addr_nsp,zwei},{integer}: conversion "addr_nsp.zwei" does not exist -WARNING: error for conversion,{eins,zwei,drei},{}: cross-database references are not implemented: eins.zwei.drei -WARNING: error for conversion,{eins,zwei,drei},{integer}: cross-database references are not implemented: eins.zwei.drei -WARNING: error for default value,{eins},{}: column name must be qualified -WARNING: error for default value,{eins},{integer}: column name must be qualified -WARNING: error for default value,{addr_nsp,zwei},{}: relation "addr_nsp" does not exist -WARNING: error for default value,{addr_nsp,zwei},{integer}: relation "addr_nsp" does not exist -WARNING: error for default value,{eins,zwei,drei},{}: schema "eins" does not exist -WARNING: error for default value,{eins,zwei,drei},{integer}: schema "eins" does not exist -WARNING: error for operator,{eins},{}: argument list length must be exactly 2 -WARNING: error for operator,{eins},{integer}: argument list length must be exactly 2 -WARNING: error for operator,{addr_nsp,zwei},{}: argument list length must be exactly 2 -WARNING: error for operator,{addr_nsp,zwei},{integer}: argument list length must be exactly 2 -WARNING: error for operator,{eins,zwei,drei},{}: argument list length must be exactly 2 -WARNING: error for operator,{eins,zwei,drei},{integer}: argument list length must be exactly 2 -WARNING: error for operator class,{eins},{}: name list length must be at least 2 -WARNING: error for operator class,{eins},{integer}: name list length must be at least 2 -WARNING: error for operator class,{addr_nsp,zwei},{}: access method "addr_nsp" does not exist -WARNING: error for operator class,{addr_nsp,zwei},{integer}: access method "addr_nsp" does not exist -WARNING: error for operator class,{eins,zwei,drei},{}: access method "eins" does not exist -WARNING: error for operator class,{eins,zwei,drei},{integer}: access method "eins" does not exist -WARNING: error for operator family,{eins},{}: name list length must be at least 2 -WARNING: error for operator family,{eins},{integer}: name list length must be at least 2 -WARNING: error for operator family,{addr_nsp,zwei},{}: access method "addr_nsp" does not exist -WARNING: error for operator family,{addr_nsp,zwei},{integer}: access method "addr_nsp" does not exist -WARNING: error for operator family,{eins,zwei,drei},{}: access method "eins" does not exist -WARNING: error for operator family,{eins,zwei,drei},{integer}: access method "eins" does not exist -WARNING: error for rule,{eins},{}: must specify relation and object name -WARNING: error for rule,{eins},{integer}: must specify relation and object name -WARNING: error for rule,{addr_nsp,zwei},{}: relation "addr_nsp" does not exist -WARNING: error for rule,{addr_nsp,zwei},{integer}: relation "addr_nsp" does not exist -WARNING: error for rule,{eins,zwei,drei},{}: schema "eins" does not exist -WARNING: error for rule,{eins,zwei,drei},{integer}: schema "eins" does not exist -WARNING: error for trigger,{eins},{}: must specify relation and object name -WARNING: error for trigger,{eins},{integer}: must specify relation and object name -WARNING: error for trigger,{addr_nsp,zwei},{}: relation "addr_nsp" does not exist -WARNING: error for trigger,{addr_nsp,zwei},{integer}: relation "addr_nsp" does not exist -WARNING: error for trigger,{eins,zwei,drei},{}: schema "eins" does not exist -WARNING: error for trigger,{eins,zwei,drei},{integer}: schema "eins" does not exist -WARNING: error for text search parser,{eins},{}: text search parser "eins" does not exist -WARNING: error for text search parser,{eins},{integer}: text search parser "eins" does not exist -WARNING: error for text search parser,{addr_nsp,zwei},{}: text search parser "addr_nsp.zwei" does not exist -WARNING: error for text search parser,{addr_nsp,zwei},{integer}: text search parser "addr_nsp.zwei" does not exist -WARNING: error for text search parser,{eins,zwei,drei},{}: cross-database references are not implemented: eins.zwei.drei -WARNING: error for text search parser,{eins,zwei,drei},{integer}: cross-database references are not implemented: eins.zwei.drei -WARNING: error for text search dictionary,{eins},{}: text search dictionary "eins" does not exist -WARNING: error for text search dictionary,{eins},{integer}: text search dictionary "eins" does not exist -WARNING: error for text search dictionary,{addr_nsp,zwei},{}: text search dictionary "addr_nsp.zwei" does not exist -WARNING: error for text search dictionary,{addr_nsp,zwei},{integer}: text search dictionary "addr_nsp.zwei" does not exist -WARNING: error for text search dictionary,{eins,zwei,drei},{}: cross-database references are not implemented: eins.zwei.drei -WARNING: error for text search dictionary,{eins,zwei,drei},{integer}: cross-database references are not implemented: eins.zwei.drei -WARNING: error for text search template,{eins},{}: text search template "eins" does not exist -WARNING: error for text search template,{eins},{integer}: text search template "eins" does not exist -WARNING: error for text search template,{addr_nsp,zwei},{}: text search template "addr_nsp.zwei" does not exist -WARNING: error for text search template,{addr_nsp,zwei},{integer}: text search template "addr_nsp.zwei" does not exist -WARNING: error for text search template,{eins,zwei,drei},{}: cross-database references are not implemented: eins.zwei.drei -WARNING: error for text search template,{eins,zwei,drei},{integer}: cross-database references are not implemented: eins.zwei.drei -WARNING: error for text search configuration,{eins},{}: text search configuration "eins" does not exist -WARNING: error for text search configuration,{eins},{integer}: text search configuration "eins" does not exist -WARNING: error for text search configuration,{addr_nsp,zwei},{}: text search configuration "addr_nsp.zwei" does not exist -WARNING: error for text search configuration,{addr_nsp,zwei},{integer}: text search configuration "addr_nsp.zwei" does not exist -WARNING: error for text search configuration,{eins,zwei,drei},{}: cross-database references are not implemented: eins.zwei.drei -WARNING: error for text search configuration,{eins,zwei,drei},{integer}: cross-database references are not implemented: eins.zwei.drei -WARNING: error for policy,{eins},{}: must specify relation and object name -WARNING: error for policy,{eins},{integer}: must specify relation and object name -WARNING: error for policy,{addr_nsp,zwei},{}: relation "addr_nsp" does not exist -WARNING: error for policy,{addr_nsp,zwei},{integer}: relation "addr_nsp" does not exist -WARNING: error for policy,{eins,zwei,drei},{}: schema "eins" does not exist -WARNING: error for policy,{eins,zwei,drei},{integer}: schema "eins" does not exist -WARNING: error for user mapping,{eins},{}: argument list length must be exactly 1 -WARNING: error for user mapping,{eins},{integer}: user mapping for user "eins" on server "integer" does not exist -WARNING: error for user mapping,{addr_nsp,zwei},{}: argument list length must be exactly 1 -WARNING: error for user mapping,{addr_nsp,zwei},{integer}: user mapping for user "addr_nsp" on server "integer" does not exist -WARNING: error for user mapping,{eins,zwei,drei},{}: argument list length must be exactly 1 -WARNING: error for user mapping,{eins,zwei,drei},{integer}: user mapping for user "eins" on server "integer" does not exist -WARNING: error for default acl,{eins},{}: argument list length must be exactly 1 -WARNING: error for default acl,{eins},{integer}: unrecognized default ACL object type "i" -WARNING: error for default acl,{addr_nsp,zwei},{}: argument list length must be exactly 1 -WARNING: error for default acl,{addr_nsp,zwei},{integer}: unrecognized default ACL object type "i" -WARNING: error for default acl,{eins,zwei,drei},{}: argument list length must be exactly 1 -WARNING: error for default acl,{eins,zwei,drei},{integer}: unrecognized default ACL object type "i" -WARNING: error for transform,{eins},{}: argument list length must be exactly 1 -WARNING: error for transform,{eins},{integer}: type "eins" does not exist -WARNING: error for transform,{addr_nsp,zwei},{}: name list length must be exactly 1 -WARNING: error for transform,{addr_nsp,zwei},{integer}: name list length must be exactly 1 -WARNING: error for transform,{eins,zwei,drei},{}: name list length must be exactly 1 -WARNING: error for transform,{eins,zwei,drei},{integer}: name list length must be exactly 1 -WARNING: error for operator of access method,{eins},{}: name list length must be at least 3 -WARNING: error for operator of access method,{eins},{integer}: name list length must be at least 3 -WARNING: error for operator of access method,{addr_nsp,zwei},{}: name list length must be at least 3 -WARNING: error for operator of access method,{addr_nsp,zwei},{integer}: name list length must be at least 3 -WARNING: error for operator of access method,{eins,zwei,drei},{}: argument list length must be exactly 2 -WARNING: error for operator of access method,{eins,zwei,drei},{integer}: argument list length must be exactly 2 -WARNING: error for function of access method,{eins},{}: name list length must be at least 3 -WARNING: error for function of access method,{eins},{integer}: name list length must be at least 3 -WARNING: error for function of access method,{addr_nsp,zwei},{}: name list length must be at least 3 -WARNING: error for function of access method,{addr_nsp,zwei},{integer}: name list length must be at least 3 -WARNING: error for function of access method,{eins,zwei,drei},{}: argument list length must be exactly 2 -WARNING: error for function of access method,{eins,zwei,drei},{integer}: argument list length must be exactly 2 -WARNING: error for publication relation,{eins},{}: argument list length must be exactly 1 -WARNING: error for publication relation,{eins},{integer}: relation "eins" does not exist -WARNING: error for publication relation,{addr_nsp,zwei},{}: argument list length must be exactly 1 -WARNING: error for publication relation,{addr_nsp,zwei},{integer}: relation "addr_nsp.zwei" does not exist -WARNING: error for publication relation,{eins,zwei,drei},{}: argument list length must be exactly 1 -WARNING: error for publication relation,{eins,zwei,drei},{integer}: cross-database references are not implemented: "eins.zwei.drei" --- these object types cannot be qualified names -SELECT pg_get_object_address('language', '{one}', '{}'); -ERROR: language "one" does not exist -SELECT pg_get_object_address('language', '{one,two}', '{}'); -ERROR: name list length must be exactly 1 -SELECT pg_get_object_address('large object', '{123}', '{}'); -ERROR: large object 123 does not exist -SELECT pg_get_object_address('large object', '{123,456}', '{}'); -ERROR: name list length must be exactly 1 -SELECT pg_get_object_address('large object', '{blargh}', '{}'); -ERROR: invalid input syntax for type oid: "blargh" -SELECT pg_get_object_address('schema', '{one}', '{}'); -ERROR: schema "one" does not exist -SELECT pg_get_object_address('schema', '{one,two}', '{}'); -ERROR: name list length must be exactly 1 -SELECT pg_get_object_address('role', '{one}', '{}'); -ERROR: role "one" does not exist -SELECT pg_get_object_address('role', '{one,two}', '{}'); -ERROR: name list length must be exactly 1 -SELECT pg_get_object_address('database', '{one}', '{}'); -ERROR: database "one" does not exist -SELECT pg_get_object_address('database', '{one,two}', '{}'); -ERROR: name list length must be exactly 1 -SELECT pg_get_object_address('tablespace', '{one}', '{}'); -ERROR: tablespace "one" does not exist -SELECT pg_get_object_address('tablespace', '{one,two}', '{}'); -ERROR: name list length must be exactly 1 -SELECT pg_get_object_address('foreign-data wrapper', '{one}', '{}'); -ERROR: foreign-data wrapper "one" does not exist -SELECT pg_get_object_address('foreign-data wrapper', '{one,two}', '{}'); -ERROR: name list length must be exactly 1 -SELECT pg_get_object_address('server', '{one}', '{}'); -ERROR: server "one" does not exist -SELECT pg_get_object_address('server', '{one,two}', '{}'); -ERROR: name list length must be exactly 1 -SELECT pg_get_object_address('extension', '{one}', '{}'); -ERROR: extension "one" does not exist -SELECT pg_get_object_address('extension', '{one,two}', '{}'); -ERROR: name list length must be exactly 1 -SELECT pg_get_object_address('event trigger', '{one}', '{}'); -ERROR: event trigger "one" does not exist -SELECT pg_get_object_address('event trigger', '{one,two}', '{}'); -ERROR: name list length must be exactly 1 -SELECT pg_get_object_address('access method', '{one}', '{}'); -ERROR: access method "one" does not exist -SELECT pg_get_object_address('access method', '{one,two}', '{}'); -ERROR: name list length must be exactly 1 -SELECT pg_get_object_address('publication', '{one}', '{}'); -ERROR: publication "one" does not exist -SELECT pg_get_object_address('publication', '{one,two}', '{}'); -ERROR: name list length must be exactly 1 -SELECT pg_get_object_address('subscription', '{one}', '{}'); -ERROR: subscription "one" does not exist -SELECT pg_get_object_address('subscription', '{one,two}', '{}'); -ERROR: name list length must be exactly 1 --- test successful cases -WITH objects (type, name, args) AS (VALUES - ('table', '{addr_nsp, gentable}'::text[], '{}'::text[]), - ('table', '{addr_nsp, parttable}'::text[], '{}'::text[]), - ('index', '{addr_nsp, gentable_pkey}', '{}'), - ('index', '{addr_nsp, parttable_pkey}', '{}'), - ('sequence', '{addr_nsp, gentable_a_seq}', '{}'), - -- toast table - ('view', '{addr_nsp, genview}', '{}'), - ('materialized view', '{addr_nsp, genmatview}', '{}'), - ('foreign table', '{addr_nsp, genftable}', '{}'), - ('table column', '{addr_nsp, gentable, b}', '{}'), - ('foreign table column', '{addr_nsp, genftable, a}', '{}'), - ('aggregate', '{addr_nsp, genaggr}', '{int4}'), - ('function', '{pg_catalog, pg_identify_object}', '{pg_catalog.oid, pg_catalog.oid, int4}'), - ('procedure', '{addr_nsp, proc}', '{int4}'), - ('type', '{pg_catalog._int4}', '{}'), - ('type', '{addr_nsp.gendomain}', '{}'), - ('type', '{addr_nsp.gencomptype}', '{}'), - ('type', '{addr_nsp.genenum}', '{}'), - ('cast', '{int8}', '{int4}'), - ('collation', '{default}', '{}'), - ('table constraint', '{addr_nsp, gentable, a_chk}', '{}'), - ('domain constraint', '{addr_nsp.gendomain}', '{domconstr}'), - ('conversion', '{pg_catalog, koi8_r_to_mic}', '{}'), - ('default value', '{addr_nsp, gentable, b}', '{}'), - ('language', '{plpgsql}', '{}'), - -- large object - ('operator', '{+}', '{int4, int4}'), - ('operator class', '{btree, int4_ops}', '{}'), - ('operator family', '{btree, integer_ops}', '{}'), - ('operator of access method', '{btree,integer_ops,1}', '{integer,integer}'), - ('function of access method', '{btree,integer_ops,2}', '{integer,integer}'), - ('rule', '{addr_nsp, genview, _RETURN}', '{}'), - ('trigger', '{addr_nsp, gentable, t}', '{}'), - ('schema', '{addr_nsp}', '{}'), - ('text search parser', '{addr_ts_prs}', '{}'), - ('text search dictionary', '{addr_ts_dict}', '{}'), - ('text search template', '{addr_ts_temp}', '{}'), - ('text search configuration', '{addr_ts_conf}', '{}'), - ('role', '{regress_addr_user}', '{}'), - -- database - -- tablespace - ('foreign-data wrapper', '{addr_fdw}', '{}'), - ('server', '{addr_fserv}', '{}'), - ('user mapping', '{regress_addr_user}', '{integer}'), - ('default acl', '{regress_addr_user,public}', '{r}'), - ('default acl', '{regress_addr_user}', '{r}'), - -- extension - -- event trigger - ('policy', '{addr_nsp, gentable, genpol}', '{}'), - ('transform', '{int}', '{sql}'), - ('access method', '{btree}', '{}'), - ('publication', '{addr_pub}', '{}'), - ('publication relation', '{addr_nsp, gentable}', '{addr_pub}'), - ('subscription', '{regress_addr_sub}', '{}'), - ('statistics object', '{addr_nsp, gentable_stat}', '{}') - ) -SELECT (pg_identify_object(addr1.classid, addr1.objid, addr1.objsubid)).*, - -- test roundtrip through pg_identify_object_as_address - ROW(pg_identify_object(addr1.classid, addr1.objid, addr1.objsubid)) = - ROW(pg_identify_object(addr2.classid, addr2.objid, addr2.objsubid)) - FROM objects, pg_get_object_address(type, name, args) addr1, - pg_identify_object_as_address(classid, objid, objsubid) ioa(typ,nms,args), - pg_get_object_address(typ, nms, ioa.args) as addr2 - ORDER BY addr1.classid, addr1.objid, addr1.objsubid; - type | schema | name | identity | ?column? ----------------------------+------------+-------------------+----------------------------------------------------------------------+---------- - default acl | | | for role regress_addr_user in schema public on tables | t - default acl | | | for role regress_addr_user on tables | t - type | pg_catalog | _int4 | integer[] | t - type | addr_nsp | gencomptype | addr_nsp.gencomptype | t - type | addr_nsp | genenum | addr_nsp.genenum | t - type | addr_nsp | gendomain | addr_nsp.gendomain | t - function | pg_catalog | | pg_catalog.pg_identify_object(pg_catalog.oid,pg_catalog.oid,integer) | t - aggregate | addr_nsp | | addr_nsp.genaggr(integer) | t - procedure | addr_nsp | | addr_nsp.proc(integer) | t - sequence | addr_nsp | gentable_a_seq | addr_nsp.gentable_a_seq | t - table | addr_nsp | gentable | addr_nsp.gentable | t - table column | addr_nsp | gentable | addr_nsp.gentable.b | t - index | addr_nsp | gentable_pkey | addr_nsp.gentable_pkey | t - table | addr_nsp | parttable | addr_nsp.parttable | t - index | addr_nsp | parttable_pkey | addr_nsp.parttable_pkey | t - view | addr_nsp | genview | addr_nsp.genview | t - materialized view | addr_nsp | genmatview | addr_nsp.genmatview | t - foreign table | addr_nsp | genftable | addr_nsp.genftable | t - foreign table column | addr_nsp | genftable | addr_nsp.genftable.a | t - role | | regress_addr_user | regress_addr_user | t - server | | addr_fserv | addr_fserv | t - user mapping | | | regress_addr_user on server integer | t - foreign-data wrapper | | addr_fdw | addr_fdw | t - access method | | btree | btree | t - operator of access method | | | operator 1 (integer, integer) of pg_catalog.integer_ops USING btree | t - function of access method | | | function 2 (integer, integer) of pg_catalog.integer_ops USING btree | t - default value | | | for addr_nsp.gentable.b | t - cast | | | (bigint AS integer) | t - table constraint | addr_nsp | | a_chk on addr_nsp.gentable | t - domain constraint | addr_nsp | | domconstr on addr_nsp.gendomain | t - conversion | pg_catalog | koi8_r_to_mic | pg_catalog.koi8_r_to_mic | t - language | | plpgsql | plpgsql | t - schema | | addr_nsp | addr_nsp | t - operator class | pg_catalog | int4_ops | pg_catalog.int4_ops USING btree | t - operator | pg_catalog | | pg_catalog.+(integer,integer) | t - rule | | | "_RETURN" on addr_nsp.genview | t - trigger | | | t on addr_nsp.gentable | t - operator family | pg_catalog | integer_ops | pg_catalog.integer_ops USING btree | t - policy | | | genpol on addr_nsp.gentable | t - statistics object | addr_nsp | gentable_stat | addr_nsp.gentable_stat | t - collation | pg_catalog | "default" | pg_catalog."default" | t - transform | | | for integer on language sql | t - text search dictionary | addr_nsp | addr_ts_dict | addr_nsp.addr_ts_dict | t - text search parser | addr_nsp | addr_ts_prs | addr_nsp.addr_ts_prs | t - text search configuration | addr_nsp | addr_ts_conf | addr_nsp.addr_ts_conf | t - text search template | addr_nsp | addr_ts_temp | addr_nsp.addr_ts_temp | t - subscription | | regress_addr_sub | regress_addr_sub | t - publication | | addr_pub | addr_pub | t - publication relation | | | addr_nsp.gentable in publication addr_pub | t -(49 rows) - ---- ---- Cleanup resources ---- -DROP FOREIGN DATA WRAPPER addr_fdw CASCADE; -NOTICE: drop cascades to 4 other objects -DETAIL: drop cascades to server addr_fserv -drop cascades to foreign table genftable -drop cascades to server integer -drop cascades to user mapping for regress_addr_user on server integer -DROP PUBLICATION addr_pub; -DROP SUBSCRIPTION regress_addr_sub; -DROP SCHEMA addr_nsp CASCADE; -NOTICE: drop cascades to 14 other objects -DETAIL: drop cascades to text search dictionary addr_ts_dict -drop cascades to text search configuration addr_ts_conf -drop cascades to text search template addr_ts_temp -drop cascades to text search parser addr_ts_prs -drop cascades to table gentable -drop cascades to table parttable -drop cascades to view genview -drop cascades to materialized view genmatview -drop cascades to type gencomptype -drop cascades to type genenum -drop cascades to function genaggr(integer) -drop cascades to type gendomain -drop cascades to function trig() -drop cascades to function proc(integer) -DROP OWNED BY regress_addr_user; -DROP USER regress_addr_user; --- --- Checks for invalid objects --- --- Make sure that NULL handling is correct. -\pset null 'NULL' --- Temporarily disable fancy output, so as future additions never create --- a large amount of diffs. -\a\t --- Keep this list in the same order as getObjectIdentityParts() --- in objectaddress.c. -WITH objects (classid, objid, objsubid) AS (VALUES - ('pg_class'::regclass, 0, 0), -- no relation - ('pg_class'::regclass, 'pg_class'::regclass, 100), -- no column for relation - ('pg_proc'::regclass, 0, 0), -- no function - ('pg_type'::regclass, 0, 0), -- no type - ('pg_cast'::regclass, 0, 0), -- no cast - ('pg_collation'::regclass, 0, 0), -- no collation - ('pg_constraint'::regclass, 0, 0), -- no constraint - ('pg_conversion'::regclass, 0, 0), -- no conversion - ('pg_attrdef'::regclass, 0, 0), -- no default attribute - ('pg_language'::regclass, 0, 0), -- no language - ('pg_largeobject'::regclass, 0, 0), -- no large object, no error - ('pg_operator'::regclass, 0, 0), -- no operator - ('pg_opclass'::regclass, 0, 0), -- no opclass, no need to check for no access method - ('pg_opfamily'::regclass, 0, 0), -- no opfamily - ('pg_am'::regclass, 0, 0), -- no access method - ('pg_amop'::regclass, 0, 0), -- no AM operator - ('pg_amproc'::regclass, 0, 0), -- no AM proc - ('pg_rewrite'::regclass, 0, 0), -- no rewrite - ('pg_trigger'::regclass, 0, 0), -- no trigger - ('pg_namespace'::regclass, 0, 0), -- no schema - ('pg_statistic_ext'::regclass, 0, 0), -- no statistics - ('pg_ts_parser'::regclass, 0, 0), -- no TS parser - ('pg_ts_dict'::regclass, 0, 0), -- no TS dictionnary - ('pg_ts_template'::regclass, 0, 0), -- no TS template - ('pg_ts_config'::regclass, 0, 0), -- no TS configuration - ('pg_authid'::regclass, 0, 0), -- no role - ('pg_database'::regclass, 0, 0), -- no database - ('pg_tablespace'::regclass, 0, 0), -- no tablespace - ('pg_foreign_data_wrapper'::regclass, 0, 0), -- no FDW - ('pg_foreign_server'::regclass, 0, 0), -- no server - ('pg_user_mapping'::regclass, 0, 0), -- no user mapping - ('pg_default_acl'::regclass, 0, 0), -- no default ACL - ('pg_extension'::regclass, 0, 0), -- no extension - ('pg_event_trigger'::regclass, 0, 0), -- no event trigger - ('pg_policy'::regclass, 0, 0), -- no policy - ('pg_publication'::regclass, 0, 0), -- no publication - ('pg_publication_rel'::regclass, 0, 0), -- no publication relation - ('pg_subscription'::regclass, 0, 0), -- no subscription - ('pg_transform'::regclass, 0, 0) -- no transformation - ) -SELECT ROW(pg_identify_object(objects.classid, objects.objid, objects.objsubid)) - AS ident, - ROW(pg_identify_object_as_address(objects.classid, objects.objid, objects.objsubid)) - AS addr, - pg_describe_object(objects.classid, objects.objid, objects.objsubid) - AS descr -FROM objects -ORDER BY objects.classid, objects.objid, objects.objsubid; -("(""default acl"",,,)")|("(""default acl"",,)")|NULL -("(tablespace,,,)")|("(tablespace,,)")|NULL -("(type,,,)")|("(type,,)")|NULL -("(routine,,,)")|("(routine,,)")|NULL -("(relation,,,)")|("(relation,,)")|NULL -("(""table column"",,,)")|("(""table column"",,)")|NULL -("(role,,,)")|("(role,,)")|NULL -("(database,,,)")|("(database,,)")|NULL -("(server,,,)")|("(server,,)")|NULL -("(""user mapping"",,,)")|("(""user mapping"",,)")|NULL -("(""foreign-data wrapper"",,,)")|("(""foreign-data wrapper"",,)")|NULL -("(""access method"",,,)")|("(""access method"",,)")|NULL -("(""operator of access method"",,,)")|("(""operator of access method"",,)")|NULL -("(""function of access method"",,,)")|("(""function of access method"",,)")|NULL -("(""default value"",,,)")|("(""default value"",,)")|NULL -("(cast,,,)")|("(cast,,)")|NULL -("(constraint,,,)")|("(constraint,,)")|NULL -("(conversion,,,)")|("(conversion,,)")|NULL -("(language,,,)")|("(language,,)")|NULL -("(""large object"",,,)")|("(""large object"",,)")|NULL -("(schema,,,)")|("(schema,,)")|NULL -("(""operator class"",,,)")|("(""operator class"",,)")|NULL -("(operator,,,)")|("(operator,,)")|NULL -("(rule,,,)")|("(rule,,)")|NULL -("(trigger,,,)")|("(trigger,,)")|NULL -("(""operator family"",,,)")|("(""operator family"",,)")|NULL -("(extension,,,)")|("(extension,,)")|NULL -("(policy,,,)")|("(policy,,)")|NULL -("(""statistics object"",,,)")|("(""statistics object"",,)")|NULL -("(collation,,,)")|("(collation,,)")|NULL -("(""event trigger"",,,)")|("(""event trigger"",,)")|NULL -("(transform,,,)")|("(transform,,)")|NULL -("(""text search dictionary"",,,)")|("(""text search dictionary"",,)")|NULL -("(""text search parser"",,,)")|("(""text search parser"",,)")|NULL -("(""text search configuration"",,,)")|("(""text search configuration"",,)")|NULL -("(""text search template"",,,)")|("(""text search template"",,)")|NULL -("(subscription,,,)")|("(subscription,,)")|NULL -("(publication,,,)")|("(publication,,)")|NULL -("(""publication relation"",,,)")|("(""publication relation"",,)")|NULL --- restore normal output mode -\a\t +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/tablesample.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/tablesample.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/tablesample.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/tablesample.out 2023-02-20 19:46:21.979212572 -0500 @@ -1,331 +1 @@ -CREATE TABLE test_tablesample (id int, name text) WITH (fillfactor=10); --- use fillfactor so we don't have to load too much data to get multiple pages -INSERT INTO test_tablesample - SELECT i, repeat(i::text, 200) FROM generate_series(0, 9) s(i); -SELECT t.id FROM test_tablesample AS t TABLESAMPLE SYSTEM (50) REPEATABLE (0); - id ----- - 3 - 4 - 5 - 6 - 7 - 8 -(6 rows) - -SELECT id FROM test_tablesample TABLESAMPLE SYSTEM (100.0/11) REPEATABLE (0); - id ----- -(0 rows) - -SELECT id FROM test_tablesample TABLESAMPLE SYSTEM (50) REPEATABLE (0); - id ----- - 3 - 4 - 5 - 6 - 7 - 8 -(6 rows) - -SELECT id FROM test_tablesample TABLESAMPLE BERNOULLI (50) REPEATABLE (0); - id ----- - 4 - 5 - 6 - 7 - 8 -(5 rows) - -SELECT id FROM test_tablesample TABLESAMPLE BERNOULLI (5.5) REPEATABLE (0); - id ----- - 7 -(1 row) - --- 100% should give repeatable count results (ie, all rows) in any case -SELECT count(*) FROM test_tablesample TABLESAMPLE SYSTEM (100); - count -------- - 10 -(1 row) - -SELECT count(*) FROM test_tablesample TABLESAMPLE SYSTEM (100) REPEATABLE (1+2); - count -------- - 10 -(1 row) - -SELECT count(*) FROM test_tablesample TABLESAMPLE SYSTEM (100) REPEATABLE (0.4); - count -------- - 10 -(1 row) - -CREATE VIEW test_tablesample_v1 AS - SELECT id FROM test_tablesample TABLESAMPLE SYSTEM (10*2) REPEATABLE (2); -CREATE VIEW test_tablesample_v2 AS - SELECT id FROM test_tablesample TABLESAMPLE SYSTEM (99); -\d+ test_tablesample_v1 - View "public.test_tablesample_v1" - Column | Type | Collation | Nullable | Default | Storage | Description ---------+---------+-----------+----------+---------+---------+------------- - id | integer | | | | plain | -View definition: - SELECT test_tablesample.id - FROM test_tablesample TABLESAMPLE system ((10 * 2)) REPEATABLE (2); - -\d+ test_tablesample_v2 - View "public.test_tablesample_v2" - Column | Type | Collation | Nullable | Default | Storage | Description ---------+---------+-----------+----------+---------+---------+------------- - id | integer | | | | plain | -View definition: - SELECT test_tablesample.id - FROM test_tablesample TABLESAMPLE system (99); - --- check a sampled query doesn't affect cursor in progress -BEGIN; -DECLARE tablesample_cur CURSOR FOR - SELECT id FROM test_tablesample TABLESAMPLE SYSTEM (50) REPEATABLE (0); -FETCH FIRST FROM tablesample_cur; - id ----- - 3 -(1 row) - -FETCH NEXT FROM tablesample_cur; - id ----- - 4 -(1 row) - -FETCH NEXT FROM tablesample_cur; - id ----- - 5 -(1 row) - -SELECT id FROM test_tablesample TABLESAMPLE SYSTEM (50) REPEATABLE (0); - id ----- - 3 - 4 - 5 - 6 - 7 - 8 -(6 rows) - -FETCH NEXT FROM tablesample_cur; - id ----- - 6 -(1 row) - -FETCH NEXT FROM tablesample_cur; - id ----- - 7 -(1 row) - -FETCH NEXT FROM tablesample_cur; - id ----- - 8 -(1 row) - -FETCH FIRST FROM tablesample_cur; - id ----- - 3 -(1 row) - -FETCH NEXT FROM tablesample_cur; - id ----- - 4 -(1 row) - -FETCH NEXT FROM tablesample_cur; - id ----- - 5 -(1 row) - -FETCH NEXT FROM tablesample_cur; - id ----- - 6 -(1 row) - -FETCH NEXT FROM tablesample_cur; - id ----- - 7 -(1 row) - -FETCH NEXT FROM tablesample_cur; - id ----- - 8 -(1 row) - -CLOSE tablesample_cur; -END; -EXPLAIN (COSTS OFF) - SELECT id FROM test_tablesample TABLESAMPLE SYSTEM (50) REPEATABLE (2); - QUERY PLAN --------------------------------------------------------------------- - Sample Scan on test_tablesample - Sampling: system ('50'::real) REPEATABLE ('2'::double precision) -(2 rows) - -EXPLAIN (COSTS OFF) - SELECT * FROM test_tablesample_v1; - QUERY PLAN --------------------------------------------------------------------- - Sample Scan on test_tablesample - Sampling: system ('20'::real) REPEATABLE ('2'::double precision) -(2 rows) - --- check inheritance behavior -explain (costs off) - select count(*) from person tablesample bernoulli (100); - QUERY PLAN -------------------------------------------------- - Aggregate - -> Append - -> Sample Scan on person person_1 - Sampling: bernoulli ('100'::real) - -> Sample Scan on emp person_2 - Sampling: bernoulli ('100'::real) - -> Sample Scan on student person_3 - Sampling: bernoulli ('100'::real) - -> Sample Scan on stud_emp person_4 - Sampling: bernoulli ('100'::real) -(10 rows) - -select count(*) from person tablesample bernoulli (100); - count -------- - 58 -(1 row) - -select count(*) from person; - count -------- - 58 -(1 row) - --- check that collations get assigned within the tablesample arguments -SELECT count(*) FROM test_tablesample TABLESAMPLE bernoulli (('1'::text < '0'::text)::int); - count -------- - 0 -(1 row) - --- check behavior during rescans, as well as correct handling of min/max pct -select * from - (values (0),(100)) v(pct), - lateral (select count(*) from tenk1 tablesample bernoulli (pct)) ss; - pct | count ------+------- - 0 | 0 - 100 | 10000 -(2 rows) - -select * from - (values (0),(100)) v(pct), - lateral (select count(*) from tenk1 tablesample system (pct)) ss; - pct | count ------+------- - 0 | 0 - 100 | 10000 -(2 rows) - -explain (costs off) -select pct, count(unique1) from - (values (0),(100)) v(pct), - lateral (select * from tenk1 tablesample bernoulli (pct)) ss - group by pct; - QUERY PLAN --------------------------------------------------------- - HashAggregate - Group Key: "*VALUES*".column1 - -> Nested Loop - -> Values Scan on "*VALUES*" - -> Sample Scan on tenk1 - Sampling: bernoulli ("*VALUES*".column1) -(6 rows) - -select pct, count(unique1) from - (values (0),(100)) v(pct), - lateral (select * from tenk1 tablesample bernoulli (pct)) ss - group by pct; - pct | count ------+------- - 100 | 10000 -(1 row) - -select pct, count(unique1) from - (values (0),(100)) v(pct), - lateral (select * from tenk1 tablesample system (pct)) ss - group by pct; - pct | count ------+------- - 100 | 10000 -(1 row) - --- errors -SELECT id FROM test_tablesample TABLESAMPLE FOOBAR (1); -ERROR: tablesample method foobar does not exist -LINE 1: SELECT id FROM test_tablesample TABLESAMPLE FOOBAR (1); - ^ -SELECT id FROM test_tablesample TABLESAMPLE SYSTEM (NULL); -ERROR: TABLESAMPLE parameter cannot be null -SELECT id FROM test_tablesample TABLESAMPLE SYSTEM (50) REPEATABLE (NULL); -ERROR: TABLESAMPLE REPEATABLE parameter cannot be null -SELECT id FROM test_tablesample TABLESAMPLE BERNOULLI (-1); -ERROR: sample percentage must be between 0 and 100 -SELECT id FROM test_tablesample TABLESAMPLE BERNOULLI (200); -ERROR: sample percentage must be between 0 and 100 -SELECT id FROM test_tablesample TABLESAMPLE SYSTEM (-1); -ERROR: sample percentage must be between 0 and 100 -SELECT id FROM test_tablesample TABLESAMPLE SYSTEM (200); -ERROR: sample percentage must be between 0 and 100 -SELECT id FROM test_tablesample_v1 TABLESAMPLE BERNOULLI (1); -ERROR: TABLESAMPLE clause can only be applied to tables and materialized views -LINE 1: SELECT id FROM test_tablesample_v1 TABLESAMPLE BERNOULLI (1)... - ^ -INSERT INTO test_tablesample_v1 VALUES(1); -ERROR: cannot insert into view "test_tablesample_v1" -DETAIL: Views containing TABLESAMPLE are not automatically updatable. -HINT: To enable inserting into the view, provide an INSTEAD OF INSERT trigger or an unconditional ON INSERT DO INSTEAD rule. -WITH query_select AS (SELECT * FROM test_tablesample) -SELECT * FROM query_select TABLESAMPLE BERNOULLI (5.5) REPEATABLE (1); -ERROR: TABLESAMPLE clause can only be applied to tables and materialized views -LINE 2: SELECT * FROM query_select TABLESAMPLE BERNOULLI (5.5) REPEA... - ^ -SELECT q.* FROM (SELECT * FROM test_tablesample) as q TABLESAMPLE BERNOULLI (5); -ERROR: syntax error at or near "TABLESAMPLE" -LINE 1: ...CT q.* FROM (SELECT * FROM test_tablesample) as q TABLESAMPL... - ^ --- check partitioned tables support tablesample -create table parted_sample (a int) partition by list (a); -create table parted_sample_1 partition of parted_sample for values in (1); -create table parted_sample_2 partition of parted_sample for values in (2); -explain (costs off) - select * from parted_sample tablesample bernoulli (100); - QUERY PLAN -------------------------------------------- - Append - -> Sample Scan on parted_sample_1 - Sampling: bernoulli ('100'::real) - -> Sample Scan on parted_sample_2 - Sampling: bernoulli ('100'::real) -(5 rows) - -drop table parted_sample, parted_sample_1, parted_sample_2; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/groupingsets.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/groupingsets.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/groupingsets.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/groupingsets.out 2023-02-20 19:46:22.089212577 -0500 @@ -1,2088 +1 @@ --- --- grouping sets --- --- test data sources -create temp view gstest1(a,b,v) - as values (1,1,10),(1,1,11),(1,2,12),(1,2,13),(1,3,14), - (2,3,15), - (3,3,16),(3,4,17), - (4,1,18),(4,1,19); -create temp table gstest2 (a integer, b integer, c integer, d integer, - e integer, f integer, g integer, h integer); -copy gstest2 from stdin; -create temp table gstest3 (a integer, b integer, c integer, d integer); -copy gstest3 from stdin; -alter table gstest3 add primary key (a); -create temp table gstest4(id integer, v integer, - unhashable_col bit(4), unsortable_col xid); -insert into gstest4 -values (1,1,b'0000','1'), (2,2,b'0001','1'), - (3,4,b'0010','2'), (4,8,b'0011','2'), - (5,16,b'0000','2'), (6,32,b'0001','2'), - (7,64,b'0010','1'), (8,128,b'0011','1'); -create temp table gstest_empty (a integer, b integer, v integer); -create function gstest_data(v integer, out a integer, out b integer) - returns setof record - as $f$ - begin - return query select v, i from generate_series(1,3) i; - end; - $f$ language plpgsql; --- basic functionality -set enable_hashagg = false; -- test hashing explicitly later --- simple rollup with multiple plain aggregates, with and without ordering --- (and with ordering differing from grouping) -select a, b, grouping(a,b), sum(v), count(*), max(v) - from gstest1 group by rollup (a,b); - a | b | grouping | sum | count | max ----+---+----------+-----+-------+----- - 1 | 1 | 0 | 21 | 2 | 11 - 1 | 2 | 0 | 25 | 2 | 13 - 1 | 3 | 0 | 14 | 1 | 14 - 1 | | 1 | 60 | 5 | 14 - 2 | 3 | 0 | 15 | 1 | 15 - 2 | | 1 | 15 | 1 | 15 - 3 | 3 | 0 | 16 | 1 | 16 - 3 | 4 | 0 | 17 | 1 | 17 - 3 | | 1 | 33 | 2 | 17 - 4 | 1 | 0 | 37 | 2 | 19 - 4 | | 1 | 37 | 2 | 19 - | | 3 | 145 | 10 | 19 -(12 rows) - -select a, b, grouping(a,b), sum(v), count(*), max(v) - from gstest1 group by rollup (a,b) order by a,b; - a | b | grouping | sum | count | max ----+---+----------+-----+-------+----- - 1 | 1 | 0 | 21 | 2 | 11 - 1 | 2 | 0 | 25 | 2 | 13 - 1 | 3 | 0 | 14 | 1 | 14 - 1 | | 1 | 60 | 5 | 14 - 2 | 3 | 0 | 15 | 1 | 15 - 2 | | 1 | 15 | 1 | 15 - 3 | 3 | 0 | 16 | 1 | 16 - 3 | 4 | 0 | 17 | 1 | 17 - 3 | | 1 | 33 | 2 | 17 - 4 | 1 | 0 | 37 | 2 | 19 - 4 | | 1 | 37 | 2 | 19 - | | 3 | 145 | 10 | 19 -(12 rows) - -select a, b, grouping(a,b), sum(v), count(*), max(v) - from gstest1 group by rollup (a,b) order by b desc, a; - a | b | grouping | sum | count | max ----+---+----------+-----+-------+----- - 1 | | 1 | 60 | 5 | 14 - 2 | | 1 | 15 | 1 | 15 - 3 | | 1 | 33 | 2 | 17 - 4 | | 1 | 37 | 2 | 19 - | | 3 | 145 | 10 | 19 - 3 | 4 | 0 | 17 | 1 | 17 - 1 | 3 | 0 | 14 | 1 | 14 - 2 | 3 | 0 | 15 | 1 | 15 - 3 | 3 | 0 | 16 | 1 | 16 - 1 | 2 | 0 | 25 | 2 | 13 - 1 | 1 | 0 | 21 | 2 | 11 - 4 | 1 | 0 | 37 | 2 | 19 -(12 rows) - -select a, b, grouping(a,b), sum(v), count(*), max(v) - from gstest1 group by rollup (a,b) order by coalesce(a,0)+coalesce(b,0); - a | b | grouping | sum | count | max ----+---+----------+-----+-------+----- - | | 3 | 145 | 10 | 19 - 1 | | 1 | 60 | 5 | 14 - 1 | 1 | 0 | 21 | 2 | 11 - 2 | | 1 | 15 | 1 | 15 - 3 | | 1 | 33 | 2 | 17 - 1 | 2 | 0 | 25 | 2 | 13 - 1 | 3 | 0 | 14 | 1 | 14 - 4 | | 1 | 37 | 2 | 19 - 4 | 1 | 0 | 37 | 2 | 19 - 2 | 3 | 0 | 15 | 1 | 15 - 3 | 3 | 0 | 16 | 1 | 16 - 3 | 4 | 0 | 17 | 1 | 17 -(12 rows) - --- various types of ordered aggs -select a, b, grouping(a,b), - array_agg(v order by v), - string_agg(v::text, ':' order by v desc), - percentile_disc(0.5) within group (order by v), - rank(1,2,12) within group (order by a,b,v) - from gstest1 group by rollup (a,b) order by a,b; - a | b | grouping | array_agg | string_agg | percentile_disc | rank ----+---+----------+---------------------------------+-------------------------------+-----------------+------ - 1 | 1 | 0 | {10,11} | 11:10 | 10 | 3 - 1 | 2 | 0 | {12,13} | 13:12 | 12 | 1 - 1 | 3 | 0 | {14} | 14 | 14 | 1 - 1 | | 1 | {10,11,12,13,14} | 14:13:12:11:10 | 12 | 3 - 2 | 3 | 0 | {15} | 15 | 15 | 1 - 2 | | 1 | {15} | 15 | 15 | 1 - 3 | 3 | 0 | {16} | 16 | 16 | 1 - 3 | 4 | 0 | {17} | 17 | 17 | 1 - 3 | | 1 | {16,17} | 17:16 | 16 | 1 - 4 | 1 | 0 | {18,19} | 19:18 | 18 | 1 - 4 | | 1 | {18,19} | 19:18 | 18 | 1 - | | 3 | {10,11,12,13,14,15,16,17,18,19} | 19:18:17:16:15:14:13:12:11:10 | 14 | 3 -(12 rows) - --- test usage of grouped columns in direct args of aggs -select grouping(a), a, array_agg(b), - rank(a) within group (order by b nulls first), - rank(a) within group (order by b nulls last) - from (values (1,1),(1,4),(1,5),(3,1),(3,2)) v(a,b) - group by rollup (a) order by a; - grouping | a | array_agg | rank | rank -----------+---+-------------+------+------ - 0 | 1 | {1,4,5} | 1 | 1 - 0 | 3 | {1,2} | 3 | 3 - 1 | | {1,4,5,1,2} | 1 | 6 -(3 rows) - --- nesting with window functions -select a, b, sum(c), sum(sum(c)) over (order by a,b) as rsum - from gstest2 group by rollup (a,b) order by rsum, a, b; - a | b | sum | rsum ----+---+-----+------ - 1 | 1 | 8 | 8 - 1 | 2 | 2 | 10 - 1 | | 10 | 20 - 2 | 2 | 2 | 22 - 2 | | 2 | 24 - | | 12 | 36 -(6 rows) - --- nesting with grouping sets -select sum(c) from gstest2 - group by grouping sets((), grouping sets((), grouping sets(()))) - order by 1 desc; - sum ------ - 12 - 12 - 12 -(3 rows) - -select sum(c) from gstest2 - group by grouping sets((), grouping sets((), grouping sets(((a, b))))) - order by 1 desc; - sum ------ - 12 - 12 - 8 - 2 - 2 -(5 rows) - -select sum(c) from gstest2 - group by grouping sets(grouping sets(rollup(c), grouping sets(cube(c)))) - order by 1 desc; - sum ------ - 12 - 12 - 6 - 6 - 6 - 6 -(6 rows) - -select sum(c) from gstest2 - group by grouping sets(a, grouping sets(a, cube(b))) - order by 1 desc; - sum ------ - 12 - 10 - 10 - 8 - 4 - 2 - 2 -(7 rows) - -select sum(c) from gstest2 - group by grouping sets(grouping sets((a, (b)))) - order by 1 desc; - sum ------ - 8 - 2 - 2 -(3 rows) - -select sum(c) from gstest2 - group by grouping sets(grouping sets((a, b))) - order by 1 desc; - sum ------ - 8 - 2 - 2 -(3 rows) - -select sum(c) from gstest2 - group by grouping sets(grouping sets(a, grouping sets(a), a)) - order by 1 desc; - sum ------ - 10 - 10 - 10 - 2 - 2 - 2 -(6 rows) - -select sum(c) from gstest2 - group by grouping sets(grouping sets(a, grouping sets(a, grouping sets(a), ((a)), a, grouping sets(a), (a)), a)) - order by 1 desc; - sum ------ - 10 - 10 - 10 - 10 - 10 - 10 - 10 - 10 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 -(16 rows) - -select sum(c) from gstest2 - group by grouping sets((a,(a,b)), grouping sets((a,(a,b)),a)) - order by 1 desc; - sum ------ - 10 - 8 - 8 - 2 - 2 - 2 - 2 - 2 -(8 rows) - --- empty input: first is 0 rows, second 1, third 3 etc. -select a, b, sum(v), count(*) from gstest_empty group by grouping sets ((a,b),a); - a | b | sum | count ----+---+-----+------- -(0 rows) - -select a, b, sum(v), count(*) from gstest_empty group by grouping sets ((a,b),()); - a | b | sum | count ----+---+-----+------- - | | | 0 -(1 row) - -select a, b, sum(v), count(*) from gstest_empty group by grouping sets ((a,b),(),(),()); - a | b | sum | count ----+---+-----+------- - | | | 0 - | | | 0 - | | | 0 -(3 rows) - -select sum(v), count(*) from gstest_empty group by grouping sets ((),(),()); - sum | count ------+------- - | 0 - | 0 - | 0 -(3 rows) - --- empty input with joins tests some important code paths -select t1.a, t2.b, sum(t1.v), count(*) from gstest_empty t1, gstest_empty t2 - group by grouping sets ((t1.a,t2.b),()); - a | b | sum | count ----+---+-----+------- - | | | 0 -(1 row) - --- simple joins, var resolution, GROUPING on join vars -select t1.a, t2.b, grouping(t1.a, t2.b), sum(t1.v), max(t2.a) - from gstest1 t1, gstest2 t2 - group by grouping sets ((t1.a, t2.b), ()); - a | b | grouping | sum | max ----+---+----------+------+----- - 1 | 1 | 0 | 420 | 1 - 1 | 2 | 0 | 120 | 2 - 2 | 1 | 0 | 105 | 1 - 2 | 2 | 0 | 30 | 2 - 3 | 1 | 0 | 231 | 1 - 3 | 2 | 0 | 66 | 2 - 4 | 1 | 0 | 259 | 1 - 4 | 2 | 0 | 74 | 2 - | | 3 | 1305 | 2 -(9 rows) - -select t1.a, t2.b, grouping(t1.a, t2.b), sum(t1.v), max(t2.a) - from gstest1 t1 join gstest2 t2 on (t1.a=t2.a) - group by grouping sets ((t1.a, t2.b), ()); - a | b | grouping | sum | max ----+---+----------+-----+----- - 1 | 1 | 0 | 420 | 1 - 1 | 2 | 0 | 60 | 1 - 2 | 2 | 0 | 15 | 2 - | | 3 | 495 | 2 -(4 rows) - -select a, b, grouping(a, b), sum(t1.v), max(t2.c) - from gstest1 t1 join gstest2 t2 using (a,b) - group by grouping sets ((a, b), ()); - a | b | grouping | sum | max ----+---+----------+-----+----- - 1 | 1 | 0 | 147 | 2 - 1 | 2 | 0 | 25 | 2 - | | 3 | 172 | 2 -(3 rows) - --- check that functionally dependent cols are not nulled -select a, d, grouping(a,b,c) - from gstest3 - group by grouping sets ((a,b), (a,c)); - a | d | grouping ----+---+---------- - 1 | 1 | 1 - 2 | 2 | 1 - 1 | 1 | 2 - 2 | 2 | 2 -(4 rows) - --- check that distinct grouping columns are kept separate --- even if they are equal() -explain (costs off) -select g as alias1, g as alias2 - from generate_series(1,3) g - group by alias1, rollup(alias2); - QUERY PLAN ------------------------------------------------- - GroupAggregate - Group Key: g, g - Group Key: g - -> Sort - Sort Key: g - -> Function Scan on generate_series g -(6 rows) - -select g as alias1, g as alias2 - from generate_series(1,3) g - group by alias1, rollup(alias2); - alias1 | alias2 ---------+-------- - 1 | 1 - 1 | - 2 | 2 - 2 | - 3 | 3 - 3 | -(6 rows) - --- check that pulled-up subquery outputs still go to null when appropriate -select four, x - from (select four, ten, 'foo'::text as x from tenk1) as t - group by grouping sets (four, x) - having x = 'foo'; - four | x -------+----- - | foo -(1 row) - -select four, x || 'x' - from (select four, ten, 'foo'::text as x from tenk1) as t - group by grouping sets (four, x) - order by four; - four | ?column? -------+---------- - 0 | - 1 | - 2 | - 3 | - | foox -(5 rows) - -select (x+y)*1, sum(z) - from (select 1 as x, 2 as y, 3 as z) s - group by grouping sets (x+y, x); - ?column? | sum -----------+----- - 3 | 3 - | 3 -(2 rows) - -select x, not x as not_x, q2 from - (select *, q1 = 1 as x from int8_tbl i1) as t - group by grouping sets(x, q2) - order by x, q2; - x | not_x | q2 ----+-------+------------------- - f | t | - | | -4567890123456789 - | | 123 - | | 456 - | | 4567890123456789 -(5 rows) - --- check qual push-down rules for a subquery with grouping sets -explain (verbose, costs off) -select * from ( - select 1 as x, q1, sum(q2) - from int8_tbl i1 - group by grouping sets(1, 2) -) ss -where x = 1 and q1 = 123; - QUERY PLAN --------------------------------------------- - Subquery Scan on ss - Output: ss.x, ss.q1, ss.sum - Filter: ((ss.x = 1) AND (ss.q1 = 123)) - -> GroupAggregate - Output: (1), i1.q1, sum(i1.q2) - Group Key: 1 - Sort Key: i1.q1 - Group Key: i1.q1 - -> Seq Scan on public.int8_tbl i1 - Output: 1, i1.q1, i1.q2 -(10 rows) - -select * from ( - select 1 as x, q1, sum(q2) - from int8_tbl i1 - group by grouping sets(1, 2) -) ss -where x = 1 and q1 = 123; - x | q1 | sum ----+----+----- -(0 rows) - --- simple rescan tests -select a, b, sum(v.x) - from (values (1),(2)) v(x), gstest_data(v.x) - group by rollup (a,b); - a | b | sum ----+---+----- - 1 | 1 | 1 - 1 | 2 | 1 - 1 | 3 | 1 - 1 | | 3 - 2 | 1 | 2 - 2 | 2 | 2 - 2 | 3 | 2 - 2 | | 6 - | | 9 -(9 rows) - -select * - from (values (1),(2)) v(x), - lateral (select a, b, sum(v.x) from gstest_data(v.x) group by rollup (a,b)) s; -ERROR: aggregate functions are not allowed in FROM clause of their own query level -LINE 3: lateral (select a, b, sum(v.x) from gstest_data(v.x) ... - ^ --- min max optimization should still work with GROUP BY () -explain (costs off) - select min(unique1) from tenk1 GROUP BY (); - QUERY PLAN ------------------------------------------------------------- - Result - InitPlan 1 (returns $0) - -> Limit - -> Index Only Scan using tenk1_unique1 on tenk1 - Index Cond: (unique1 IS NOT NULL) -(5 rows) - --- Views with GROUPING SET queries -CREATE VIEW gstest_view AS select a, b, grouping(a,b), sum(c), count(*), max(c) - from gstest2 group by rollup ((a,b,c),(c,d)); -NOTICE: view "gstest_view" will be a temporary view -select pg_get_viewdef('gstest_view'::regclass, true); - pg_get_viewdef -------------------------------------------------------------------------------- - SELECT gstest2.a, + - gstest2.b, + - GROUPING(gstest2.a, gstest2.b) AS "grouping", + - sum(gstest2.c) AS sum, + - count(*) AS count, + - max(gstest2.c) AS max + - FROM gstest2 + - GROUP BY ROLLUP((gstest2.a, gstest2.b, gstest2.c), (gstest2.c, gstest2.d)); -(1 row) - --- Nested queries with 3 or more levels of nesting -select(select (select grouping(a,b) from (values (1)) v2(c)) from (values (1,2)) v1(a,b) group by (a,b)) from (values(6,7)) v3(e,f) GROUP BY ROLLUP(e,f); - grouping ----------- - 0 - 0 - 0 -(3 rows) - -select(select (select grouping(e,f) from (values (1)) v2(c)) from (values (1,2)) v1(a,b) group by (a,b)) from (values(6,7)) v3(e,f) GROUP BY ROLLUP(e,f); - grouping ----------- - 0 - 1 - 3 -(3 rows) - -select(select (select grouping(c) from (values (1)) v2(c) GROUP BY c) from (values (1,2)) v1(a,b) group by (a,b)) from (values(6,7)) v3(e,f) GROUP BY ROLLUP(e,f); - grouping ----------- - 0 - 0 - 0 -(3 rows) - --- Combinations of operations -select a, b, c, d from gstest2 group by rollup(a,b),grouping sets(c,d); - a | b | c | d ----+---+---+--- - 1 | 1 | 1 | - 1 | | 1 | - | | 1 | - 1 | 1 | 2 | - 1 | 2 | 2 | - 1 | | 2 | - 2 | 2 | 2 | - 2 | | 2 | - | | 2 | - 1 | 1 | | 1 - 1 | | | 1 - | | | 1 - 1 | 1 | | 2 - 1 | 2 | | 2 - 1 | | | 2 - 2 | 2 | | 2 - 2 | | | 2 - | | | 2 -(18 rows) - -select a, b from (values (1,2),(2,3)) v(a,b) group by a,b, grouping sets(a); - a | b ----+--- - 1 | 2 - 2 | 3 -(2 rows) - --- Tests for chained aggregates -select a, b, grouping(a,b), sum(v), count(*), max(v) - from gstest1 group by grouping sets ((a,b),(a+1,b+1),(a+2,b+2)) order by 3,6; - a | b | grouping | sum | count | max ----+---+----------+-----+-------+----- - 1 | 1 | 0 | 21 | 2 | 11 - 1 | 2 | 0 | 25 | 2 | 13 - 1 | 3 | 0 | 14 | 1 | 14 - 2 | 3 | 0 | 15 | 1 | 15 - 3 | 3 | 0 | 16 | 1 | 16 - 3 | 4 | 0 | 17 | 1 | 17 - 4 | 1 | 0 | 37 | 2 | 19 - | | 3 | 21 | 2 | 11 - | | 3 | 21 | 2 | 11 - | | 3 | 25 | 2 | 13 - | | 3 | 25 | 2 | 13 - | | 3 | 14 | 1 | 14 - | | 3 | 14 | 1 | 14 - | | 3 | 15 | 1 | 15 - | | 3 | 15 | 1 | 15 - | | 3 | 16 | 1 | 16 - | | 3 | 16 | 1 | 16 - | | 3 | 17 | 1 | 17 - | | 3 | 17 | 1 | 17 - | | 3 | 37 | 2 | 19 - | | 3 | 37 | 2 | 19 -(21 rows) - -select(select (select grouping(a,b) from (values (1)) v2(c)) from (values (1,2)) v1(a,b) group by (a,b)) from (values(6,7)) v3(e,f) GROUP BY ROLLUP((e+1),(f+1)); - grouping ----------- - 0 - 0 - 0 -(3 rows) - -select(select (select grouping(a,b) from (values (1)) v2(c)) from (values (1,2)) v1(a,b) group by (a,b)) from (values(6,7)) v3(e,f) GROUP BY CUBE((e+1),(f+1)) ORDER BY (e+1),(f+1); - grouping ----------- - 0 - 0 - 0 - 0 -(4 rows) - -select a, b, sum(c), sum(sum(c)) over (order by a,b) as rsum - from gstest2 group by cube (a,b) order by rsum, a, b; - a | b | sum | rsum ----+---+-----+------ - 1 | 1 | 8 | 8 - 1 | 2 | 2 | 10 - 1 | | 10 | 20 - 2 | 2 | 2 | 22 - 2 | | 2 | 24 - | 1 | 8 | 32 - | 2 | 4 | 36 - | | 12 | 48 -(8 rows) - -select a, b, sum(c) from (values (1,1,10),(1,1,11),(1,2,12),(1,2,13),(1,3,14),(2,3,15),(3,3,16),(3,4,17),(4,1,18),(4,1,19)) v(a,b,c) group by rollup (a,b); - a | b | sum ----+---+----- - 1 | 1 | 21 - 1 | 2 | 25 - 1 | 3 | 14 - 1 | | 60 - 2 | 3 | 15 - 2 | | 15 - 3 | 3 | 16 - 3 | 4 | 17 - 3 | | 33 - 4 | 1 | 37 - 4 | | 37 - | | 145 -(12 rows) - -select a, b, sum(v.x) - from (values (1),(2)) v(x), gstest_data(v.x) - group by cube (a,b) order by a,b; - a | b | sum ----+---+----- - 1 | 1 | 1 - 1 | 2 | 1 - 1 | 3 | 1 - 1 | | 3 - 2 | 1 | 2 - 2 | 2 | 2 - 2 | 3 | 2 - 2 | | 6 - | 1 | 3 - | 2 | 3 - | 3 | 3 - | | 9 -(12 rows) - --- Test reordering of grouping sets -explain (costs off) -select * from gstest1 group by grouping sets((a,b,v),(v)) order by v,b,a; - QUERY PLAN ------------------------------------------------------------------------------- - GroupAggregate - Group Key: "*VALUES*".column3, "*VALUES*".column2, "*VALUES*".column1 - Group Key: "*VALUES*".column3 - -> Sort - Sort Key: "*VALUES*".column3, "*VALUES*".column2, "*VALUES*".column1 - -> Values Scan on "*VALUES*" -(6 rows) - --- Agg level check. This query should error out. -select (select grouping(a,b) from gstest2) from gstest2 group by a,b; -ERROR: arguments to GROUPING must be grouping expressions of the associated query level -LINE 1: select (select grouping(a,b) from gstest2) from gstest2 grou... - ^ ---Nested queries -select a, b, sum(c), count(*) from gstest2 group by grouping sets (rollup(a,b),a); - a | b | sum | count ----+---+-----+------- - 1 | 1 | 8 | 7 - 1 | 2 | 2 | 1 - 1 | | 10 | 8 - 1 | | 10 | 8 - 2 | 2 | 2 | 1 - 2 | | 2 | 1 - 2 | | 2 | 1 - | | 12 | 9 -(8 rows) - --- HAVING queries -select ten, sum(distinct four) from onek a -group by grouping sets((ten,four),(ten)) -having exists (select 1 from onek b where sum(distinct a.four) = b.four); - ten | sum ------+----- - 0 | 0 - 0 | 2 - 0 | 2 - 1 | 1 - 1 | 3 - 2 | 0 - 2 | 2 - 2 | 2 - 3 | 1 - 3 | 3 - 4 | 0 - 4 | 2 - 4 | 2 - 5 | 1 - 5 | 3 - 6 | 0 - 6 | 2 - 6 | 2 - 7 | 1 - 7 | 3 - 8 | 0 - 8 | 2 - 8 | 2 - 9 | 1 - 9 | 3 -(25 rows) - --- Tests around pushdown of HAVING clauses, partially testing against previous bugs -select a,count(*) from gstest2 group by rollup(a) order by a; - a | count ----+------- - 1 | 8 - 2 | 1 - | 9 -(3 rows) - -select a,count(*) from gstest2 group by rollup(a) having a is distinct from 1 order by a; - a | count ----+------- - 2 | 1 - | 9 -(2 rows) - -explain (costs off) - select a,count(*) from gstest2 group by rollup(a) having a is distinct from 1 order by a; - QUERY PLAN ----------------------------------- - GroupAggregate - Group Key: a - Group Key: () - Filter: (a IS DISTINCT FROM 1) - -> Sort - Sort Key: a - -> Seq Scan on gstest2 -(7 rows) - -select v.c, (select count(*) from gstest2 group by () having v.c) - from (values (false),(true)) v(c) order by v.c; - c | count ----+------- - f | - t | 9 -(2 rows) - -explain (costs off) - select v.c, (select count(*) from gstest2 group by () having v.c) - from (values (false),(true)) v(c) order by v.c; - QUERY PLAN ------------------------------------------------------------ - Sort - Sort Key: "*VALUES*".column1 - -> Values Scan on "*VALUES*" - SubPlan 1 - -> Aggregate - Group Key: () - Filter: "*VALUES*".column1 - -> Result - One-Time Filter: "*VALUES*".column1 - -> Seq Scan on gstest2 -(10 rows) - --- HAVING with GROUPING queries -select ten, grouping(ten) from onek -group by grouping sets(ten) having grouping(ten) >= 0 -order by 2,1; - ten | grouping ------+---------- - 0 | 0 - 1 | 0 - 2 | 0 - 3 | 0 - 4 | 0 - 5 | 0 - 6 | 0 - 7 | 0 - 8 | 0 - 9 | 0 -(10 rows) - -select ten, grouping(ten) from onek -group by grouping sets(ten, four) having grouping(ten) > 0 -order by 2,1; - ten | grouping ------+---------- - | 1 - | 1 - | 1 - | 1 -(4 rows) - -select ten, grouping(ten) from onek -group by rollup(ten) having grouping(ten) > 0 -order by 2,1; - ten | grouping ------+---------- - | 1 -(1 row) - -select ten, grouping(ten) from onek -group by cube(ten) having grouping(ten) > 0 -order by 2,1; - ten | grouping ------+---------- - | 1 -(1 row) - -select ten, grouping(ten) from onek -group by (ten) having grouping(ten) >= 0 -order by 2,1; - ten | grouping ------+---------- - 0 | 0 - 1 | 0 - 2 | 0 - 3 | 0 - 4 | 0 - 5 | 0 - 6 | 0 - 7 | 0 - 8 | 0 - 9 | 0 -(10 rows) - --- FILTER queries -select ten, sum(distinct four) filter (where four::text ~ '123') from onek a -group by rollup(ten); - ten | sum ------+----- - 0 | - 1 | - 2 | - 3 | - 4 | - 5 | - 6 | - 7 | - 8 | - 9 | - | -(11 rows) - --- More rescan tests -select * from (values (1),(2)) v(a) left join lateral (select v.a, four, ten, count(*) from onek group by cube(four,ten)) s on true order by v.a,four,ten; - a | a | four | ten | count ----+---+------+-----+------- - 1 | 1 | 0 | 0 | 50 - 1 | 1 | 0 | 2 | 50 - 1 | 1 | 0 | 4 | 50 - 1 | 1 | 0 | 6 | 50 - 1 | 1 | 0 | 8 | 50 - 1 | 1 | 0 | | 250 - 1 | 1 | 1 | 1 | 50 - 1 | 1 | 1 | 3 | 50 - 1 | 1 | 1 | 5 | 50 - 1 | 1 | 1 | 7 | 50 - 1 | 1 | 1 | 9 | 50 - 1 | 1 | 1 | | 250 - 1 | 1 | 2 | 0 | 50 - 1 | 1 | 2 | 2 | 50 - 1 | 1 | 2 | 4 | 50 - 1 | 1 | 2 | 6 | 50 - 1 | 1 | 2 | 8 | 50 - 1 | 1 | 2 | | 250 - 1 | 1 | 3 | 1 | 50 - 1 | 1 | 3 | 3 | 50 - 1 | 1 | 3 | 5 | 50 - 1 | 1 | 3 | 7 | 50 - 1 | 1 | 3 | 9 | 50 - 1 | 1 | 3 | | 250 - 1 | 1 | | 0 | 100 - 1 | 1 | | 1 | 100 - 1 | 1 | | 2 | 100 - 1 | 1 | | 3 | 100 - 1 | 1 | | 4 | 100 - 1 | 1 | | 5 | 100 - 1 | 1 | | 6 | 100 - 1 | 1 | | 7 | 100 - 1 | 1 | | 8 | 100 - 1 | 1 | | 9 | 100 - 1 | 1 | | | 1000 - 2 | 2 | 0 | 0 | 50 - 2 | 2 | 0 | 2 | 50 - 2 | 2 | 0 | 4 | 50 - 2 | 2 | 0 | 6 | 50 - 2 | 2 | 0 | 8 | 50 - 2 | 2 | 0 | | 250 - 2 | 2 | 1 | 1 | 50 - 2 | 2 | 1 | 3 | 50 - 2 | 2 | 1 | 5 | 50 - 2 | 2 | 1 | 7 | 50 - 2 | 2 | 1 | 9 | 50 - 2 | 2 | 1 | | 250 - 2 | 2 | 2 | 0 | 50 - 2 | 2 | 2 | 2 | 50 - 2 | 2 | 2 | 4 | 50 - 2 | 2 | 2 | 6 | 50 - 2 | 2 | 2 | 8 | 50 - 2 | 2 | 2 | | 250 - 2 | 2 | 3 | 1 | 50 - 2 | 2 | 3 | 3 | 50 - 2 | 2 | 3 | 5 | 50 - 2 | 2 | 3 | 7 | 50 - 2 | 2 | 3 | 9 | 50 - 2 | 2 | 3 | | 250 - 2 | 2 | | 0 | 100 - 2 | 2 | | 1 | 100 - 2 | 2 | | 2 | 100 - 2 | 2 | | 3 | 100 - 2 | 2 | | 4 | 100 - 2 | 2 | | 5 | 100 - 2 | 2 | | 6 | 100 - 2 | 2 | | 7 | 100 - 2 | 2 | | 8 | 100 - 2 | 2 | | 9 | 100 - 2 | 2 | | | 1000 -(70 rows) - -select array(select row(v.a,s1.*) from (select two,four, count(*) from onek group by cube(two,four) order by two,four) s1) from (values (1),(2)) v(a); - array ------------------------------------------------------------------------------------------------------------------------------------------------------- - {"(1,0,0,250)","(1,0,2,250)","(1,0,,500)","(1,1,1,250)","(1,1,3,250)","(1,1,,500)","(1,,0,250)","(1,,1,250)","(1,,2,250)","(1,,3,250)","(1,,,1000)"} - {"(2,0,0,250)","(2,0,2,250)","(2,0,,500)","(2,1,1,250)","(2,1,3,250)","(2,1,,500)","(2,,0,250)","(2,,1,250)","(2,,2,250)","(2,,3,250)","(2,,,1000)"} -(2 rows) - --- Grouping on text columns -select sum(ten) from onek group by two, rollup(four::text) order by 1; - sum ------- - 1000 - 1000 - 1250 - 1250 - 2000 - 2500 -(6 rows) - -select sum(ten) from onek group by rollup(four::text), two order by 1; - sum ------- - 1000 - 1000 - 1250 - 1250 - 2000 - 2500 -(6 rows) - --- hashing support -set enable_hashagg = true; --- failure cases -select count(*) from gstest4 group by rollup(unhashable_col,unsortable_col); -ERROR: could not implement GROUP BY -DETAIL: Some of the datatypes only support hashing, while others only support sorting. -select array_agg(v order by v) from gstest4 group by grouping sets ((id,unsortable_col),(id)); -ERROR: could not implement GROUP BY -DETAIL: Some of the datatypes only support hashing, while others only support sorting. --- simple cases -select a, b, grouping(a,b), sum(v), count(*), max(v) - from gstest1 group by grouping sets ((a),(b)) order by 3,1,2; - a | b | grouping | sum | count | max ----+---+----------+-----+-------+----- - 1 | | 1 | 60 | 5 | 14 - 2 | | 1 | 15 | 1 | 15 - 3 | | 1 | 33 | 2 | 17 - 4 | | 1 | 37 | 2 | 19 - | 1 | 2 | 58 | 4 | 19 - | 2 | 2 | 25 | 2 | 13 - | 3 | 2 | 45 | 3 | 16 - | 4 | 2 | 17 | 1 | 17 -(8 rows) - -explain (costs off) select a, b, grouping(a,b), sum(v), count(*), max(v) - from gstest1 group by grouping sets ((a),(b)) order by 3,1,2; - QUERY PLAN --------------------------------------------------------------------------------------------------------- - Sort - Sort Key: (GROUPING("*VALUES*".column1, "*VALUES*".column2)), "*VALUES*".column1, "*VALUES*".column2 - -> HashAggregate - Hash Key: "*VALUES*".column1 - Hash Key: "*VALUES*".column2 - -> Values Scan on "*VALUES*" -(6 rows) - -select a, b, grouping(a,b), sum(v), count(*), max(v) - from gstest1 group by cube(a,b) order by 3,1,2; - a | b | grouping | sum | count | max ----+---+----------+-----+-------+----- - 1 | 1 | 0 | 21 | 2 | 11 - 1 | 2 | 0 | 25 | 2 | 13 - 1 | 3 | 0 | 14 | 1 | 14 - 2 | 3 | 0 | 15 | 1 | 15 - 3 | 3 | 0 | 16 | 1 | 16 - 3 | 4 | 0 | 17 | 1 | 17 - 4 | 1 | 0 | 37 | 2 | 19 - 1 | | 1 | 60 | 5 | 14 - 2 | | 1 | 15 | 1 | 15 - 3 | | 1 | 33 | 2 | 17 - 4 | | 1 | 37 | 2 | 19 - | 1 | 2 | 58 | 4 | 19 - | 2 | 2 | 25 | 2 | 13 - | 3 | 2 | 45 | 3 | 16 - | 4 | 2 | 17 | 1 | 17 - | | 3 | 145 | 10 | 19 -(16 rows) - -explain (costs off) select a, b, grouping(a,b), sum(v), count(*), max(v) - from gstest1 group by cube(a,b) order by 3,1,2; - QUERY PLAN --------------------------------------------------------------------------------------------------------- - Sort - Sort Key: (GROUPING("*VALUES*".column1, "*VALUES*".column2)), "*VALUES*".column1, "*VALUES*".column2 - -> MixedAggregate - Hash Key: "*VALUES*".column1, "*VALUES*".column2 - Hash Key: "*VALUES*".column1 - Hash Key: "*VALUES*".column2 - Group Key: () - -> Values Scan on "*VALUES*" -(8 rows) - --- shouldn't try and hash -explain (costs off) - select a, b, grouping(a,b), array_agg(v order by v) - from gstest1 group by cube(a,b); - QUERY PLAN ----------------------------------------------------------- - GroupAggregate - Group Key: "*VALUES*".column1, "*VALUES*".column2 - Group Key: "*VALUES*".column1 - Group Key: () - Sort Key: "*VALUES*".column2 - Group Key: "*VALUES*".column2 - -> Sort - Sort Key: "*VALUES*".column1, "*VALUES*".column2 - -> Values Scan on "*VALUES*" -(9 rows) - --- unsortable cases -select unsortable_col, count(*) - from gstest4 group by grouping sets ((unsortable_col),(unsortable_col)) - order by unsortable_col::text; - unsortable_col | count -----------------+------- - 1 | 4 - 1 | 4 - 2 | 4 - 2 | 4 -(4 rows) - --- mixed hashable/sortable cases -select unhashable_col, unsortable_col, - grouping(unhashable_col, unsortable_col), - count(*), sum(v) - from gstest4 group by grouping sets ((unhashable_col),(unsortable_col)) - order by 3, 5; - unhashable_col | unsortable_col | grouping | count | sum -----------------+----------------+----------+-------+----- - 0000 | | 1 | 2 | 17 - 0001 | | 1 | 2 | 34 - 0010 | | 1 | 2 | 68 - 0011 | | 1 | 2 | 136 - | 2 | 2 | 4 | 60 - | 1 | 2 | 4 | 195 -(6 rows) - -explain (costs off) - select unhashable_col, unsortable_col, - grouping(unhashable_col, unsortable_col), - count(*), sum(v) - from gstest4 group by grouping sets ((unhashable_col),(unsortable_col)) - order by 3,5; - QUERY PLAN ------------------------------------------------------------------- - Sort - Sort Key: (GROUPING(unhashable_col, unsortable_col)), (sum(v)) - -> MixedAggregate - Hash Key: unsortable_col - Group Key: unhashable_col - -> Sort - Sort Key: unhashable_col - -> Seq Scan on gstest4 -(8 rows) - -select unhashable_col, unsortable_col, - grouping(unhashable_col, unsortable_col), - count(*), sum(v) - from gstest4 group by grouping sets ((v,unhashable_col),(v,unsortable_col)) - order by 3,5; - unhashable_col | unsortable_col | grouping | count | sum -----------------+----------------+----------+-------+----- - 0000 | | 1 | 1 | 1 - 0001 | | 1 | 1 | 2 - 0010 | | 1 | 1 | 4 - 0011 | | 1 | 1 | 8 - 0000 | | 1 | 1 | 16 - 0001 | | 1 | 1 | 32 - 0010 | | 1 | 1 | 64 - 0011 | | 1 | 1 | 128 - | 1 | 2 | 1 | 1 - | 1 | 2 | 1 | 2 - | 2 | 2 | 1 | 4 - | 2 | 2 | 1 | 8 - | 2 | 2 | 1 | 16 - | 2 | 2 | 1 | 32 - | 1 | 2 | 1 | 64 - | 1 | 2 | 1 | 128 -(16 rows) - -explain (costs off) - select unhashable_col, unsortable_col, - grouping(unhashable_col, unsortable_col), - count(*), sum(v) - from gstest4 group by grouping sets ((v,unhashable_col),(v,unsortable_col)) - order by 3,5; - QUERY PLAN ------------------------------------------------------------------- - Sort - Sort Key: (GROUPING(unhashable_col, unsortable_col)), (sum(v)) - -> MixedAggregate - Hash Key: v, unsortable_col - Group Key: v, unhashable_col - -> Sort - Sort Key: v, unhashable_col - -> Seq Scan on gstest4 -(8 rows) - --- empty input: first is 0 rows, second 1, third 3 etc. -select a, b, sum(v), count(*) from gstest_empty group by grouping sets ((a,b),a); - a | b | sum | count ----+---+-----+------- -(0 rows) - -explain (costs off) - select a, b, sum(v), count(*) from gstest_empty group by grouping sets ((a,b),a); - QUERY PLAN --------------------------------- - HashAggregate - Hash Key: a, b - Hash Key: a - -> Seq Scan on gstest_empty -(4 rows) - -select a, b, sum(v), count(*) from gstest_empty group by grouping sets ((a,b),()); - a | b | sum | count ----+---+-----+------- - | | | 0 -(1 row) - -select a, b, sum(v), count(*) from gstest_empty group by grouping sets ((a,b),(),(),()); - a | b | sum | count ----+---+-----+------- - | | | 0 - | | | 0 - | | | 0 -(3 rows) - -explain (costs off) - select a, b, sum(v), count(*) from gstest_empty group by grouping sets ((a,b),(),(),()); - QUERY PLAN --------------------------------- - MixedAggregate - Hash Key: a, b - Group Key: () - Group Key: () - Group Key: () - -> Seq Scan on gstest_empty -(6 rows) - -select sum(v), count(*) from gstest_empty group by grouping sets ((),(),()); - sum | count ------+------- - | 0 - | 0 - | 0 -(3 rows) - -explain (costs off) - select sum(v), count(*) from gstest_empty group by grouping sets ((),(),()); - QUERY PLAN --------------------------------- - Aggregate - Group Key: () - Group Key: () - Group Key: () - -> Seq Scan on gstest_empty -(5 rows) - --- check that functionally dependent cols are not nulled -select a, d, grouping(a,b,c) - from gstest3 - group by grouping sets ((a,b), (a,c)); - a | d | grouping ----+---+---------- - 1 | 1 | 1 - 2 | 2 | 1 - 1 | 1 | 2 - 2 | 2 | 2 -(4 rows) - -explain (costs off) - select a, d, grouping(a,b,c) - from gstest3 - group by grouping sets ((a,b), (a,c)); - QUERY PLAN ---------------------------- - HashAggregate - Hash Key: a, b - Hash Key: a, c - -> Seq Scan on gstest3 -(4 rows) - --- simple rescan tests -select a, b, sum(v.x) - from (values (1),(2)) v(x), gstest_data(v.x) - group by grouping sets (a,b) - order by 1, 2, 3; - a | b | sum ----+---+----- - 1 | | 3 - 2 | | 6 - | 1 | 3 - | 2 | 3 - | 3 | 3 -(5 rows) - -explain (costs off) - select a, b, sum(v.x) - from (values (1),(2)) v(x), gstest_data(v.x) - group by grouping sets (a,b) - order by 3, 1, 2; - QUERY PLAN ---------------------------------------------------------------------- - Sort - Sort Key: (sum("*VALUES*".column1)), gstest_data.a, gstest_data.b - -> HashAggregate - Hash Key: gstest_data.a - Hash Key: gstest_data.b - -> Nested Loop - -> Values Scan on "*VALUES*" - -> Function Scan on gstest_data -(8 rows) - -select * - from (values (1),(2)) v(x), - lateral (select a, b, sum(v.x) from gstest_data(v.x) group by grouping sets (a,b)) s; -ERROR: aggregate functions are not allowed in FROM clause of their own query level -LINE 3: lateral (select a, b, sum(v.x) from gstest_data(v.x) ... - ^ -explain (costs off) - select * - from (values (1),(2)) v(x), - lateral (select a, b, sum(v.x) from gstest_data(v.x) group by grouping sets (a,b)) s; -ERROR: aggregate functions are not allowed in FROM clause of their own query level -LINE 4: lateral (select a, b, sum(v.x) from gstest_data(v.x... - ^ --- Tests for chained aggregates -select a, b, grouping(a,b), sum(v), count(*), max(v) - from gstest1 group by grouping sets ((a,b),(a+1,b+1),(a+2,b+2)) order by 3,6; - a | b | grouping | sum | count | max ----+---+----------+-----+-------+----- - 1 | 1 | 0 | 21 | 2 | 11 - 1 | 2 | 0 | 25 | 2 | 13 - 1 | 3 | 0 | 14 | 1 | 14 - 2 | 3 | 0 | 15 | 1 | 15 - 3 | 3 | 0 | 16 | 1 | 16 - 3 | 4 | 0 | 17 | 1 | 17 - 4 | 1 | 0 | 37 | 2 | 19 - | | 3 | 21 | 2 | 11 - | | 3 | 21 | 2 | 11 - | | 3 | 25 | 2 | 13 - | | 3 | 25 | 2 | 13 - | | 3 | 14 | 1 | 14 - | | 3 | 14 | 1 | 14 - | | 3 | 15 | 1 | 15 - | | 3 | 15 | 1 | 15 - | | 3 | 16 | 1 | 16 - | | 3 | 16 | 1 | 16 - | | 3 | 17 | 1 | 17 - | | 3 | 17 | 1 | 17 - | | 3 | 37 | 2 | 19 - | | 3 | 37 | 2 | 19 -(21 rows) - -explain (costs off) - select a, b, grouping(a,b), sum(v), count(*), max(v) - from gstest1 group by grouping sets ((a,b),(a+1,b+1),(a+2,b+2)) order by 3,6; - QUERY PLAN -------------------------------------------------------------------------------------------- - Sort - Sort Key: (GROUPING("*VALUES*".column1, "*VALUES*".column2)), (max("*VALUES*".column3)) - -> HashAggregate - Hash Key: "*VALUES*".column1, "*VALUES*".column2 - Hash Key: ("*VALUES*".column1 + 1), ("*VALUES*".column2 + 1) - Hash Key: ("*VALUES*".column1 + 2), ("*VALUES*".column2 + 2) - -> Values Scan on "*VALUES*" -(7 rows) - -select a, b, sum(c), sum(sum(c)) over (order by a,b) as rsum - from gstest2 group by cube (a,b) order by rsum, a, b; - a | b | sum | rsum ----+---+-----+------ - 1 | 1 | 8 | 8 - 1 | 2 | 2 | 10 - 1 | | 10 | 20 - 2 | 2 | 2 | 22 - 2 | | 2 | 24 - | 1 | 8 | 32 - | 2 | 4 | 36 - | | 12 | 48 -(8 rows) - -explain (costs off) - select a, b, sum(c), sum(sum(c)) over (order by a,b) as rsum - from gstest2 group by cube (a,b) order by rsum, a, b; - QUERY PLAN ---------------------------------------------- - Sort - Sort Key: (sum((sum(c))) OVER (?)), a, b - -> WindowAgg - -> Sort - Sort Key: a, b - -> MixedAggregate - Hash Key: a, b - Hash Key: a - Hash Key: b - Group Key: () - -> Seq Scan on gstest2 -(11 rows) - -select a, b, sum(v.x) - from (values (1),(2)) v(x), gstest_data(v.x) - group by cube (a,b) order by a,b; - a | b | sum ----+---+----- - 1 | 1 | 1 - 1 | 2 | 1 - 1 | 3 | 1 - 1 | | 3 - 2 | 1 | 2 - 2 | 2 | 2 - 2 | 3 | 2 - 2 | | 6 - | 1 | 3 - | 2 | 3 - | 3 | 3 - | | 9 -(12 rows) - -explain (costs off) - select a, b, sum(v.x) - from (values (1),(2)) v(x), gstest_data(v.x) - group by cube (a,b) order by a,b; - QUERY PLAN ------------------------------------------------- - Sort - Sort Key: gstest_data.a, gstest_data.b - -> MixedAggregate - Hash Key: gstest_data.a, gstest_data.b - Hash Key: gstest_data.a - Hash Key: gstest_data.b - Group Key: () - -> Nested Loop - -> Values Scan on "*VALUES*" - -> Function Scan on gstest_data -(10 rows) - --- Verify that we correctly handle the child node returning a --- non-minimal slot, which happens if the input is pre-sorted, --- e.g. due to an index scan. -BEGIN; -SET LOCAL enable_hashagg = false; -EXPLAIN (COSTS OFF) SELECT a, b, count(*), max(a), max(b) FROM gstest3 GROUP BY GROUPING SETS(a, b,()) ORDER BY a, b; - QUERY PLAN ---------------------------------------- - Sort - Sort Key: a, b - -> GroupAggregate - Group Key: a - Group Key: () - Sort Key: b - Group Key: b - -> Sort - Sort Key: a - -> Seq Scan on gstest3 -(10 rows) - -SELECT a, b, count(*), max(a), max(b) FROM gstest3 GROUP BY GROUPING SETS(a, b,()) ORDER BY a, b; - a | b | count | max | max ----+---+-------+-----+----- - 1 | | 1 | 1 | 1 - 2 | | 1 | 2 | 2 - | 1 | 1 | 1 | 1 - | 2 | 1 | 2 | 2 - | | 2 | 2 | 2 -(5 rows) - -SET LOCAL enable_seqscan = false; -EXPLAIN (COSTS OFF) SELECT a, b, count(*), max(a), max(b) FROM gstest3 GROUP BY GROUPING SETS(a, b,()) ORDER BY a, b; - QUERY PLAN ------------------------------------------------------- - Sort - Sort Key: a, b - -> GroupAggregate - Group Key: a - Group Key: () - Sort Key: b - Group Key: b - -> Index Scan using gstest3_pkey on gstest3 -(8 rows) - -SELECT a, b, count(*), max(a), max(b) FROM gstest3 GROUP BY GROUPING SETS(a, b,()) ORDER BY a, b; - a | b | count | max | max ----+---+-------+-----+----- - 1 | | 1 | 1 | 1 - 2 | | 1 | 2 | 2 - | 1 | 1 | 1 | 1 - | 2 | 1 | 2 | 2 - | | 2 | 2 | 2 -(5 rows) - -COMMIT; --- More rescan tests -select * from (values (1),(2)) v(a) left join lateral (select v.a, four, ten, count(*) from onek group by cube(four,ten)) s on true order by v.a,four,ten; - a | a | four | ten | count ----+---+------+-----+------- - 1 | 1 | 0 | 0 | 50 - 1 | 1 | 0 | 2 | 50 - 1 | 1 | 0 | 4 | 50 - 1 | 1 | 0 | 6 | 50 - 1 | 1 | 0 | 8 | 50 - 1 | 1 | 0 | | 250 - 1 | 1 | 1 | 1 | 50 - 1 | 1 | 1 | 3 | 50 - 1 | 1 | 1 | 5 | 50 - 1 | 1 | 1 | 7 | 50 - 1 | 1 | 1 | 9 | 50 - 1 | 1 | 1 | | 250 - 1 | 1 | 2 | 0 | 50 - 1 | 1 | 2 | 2 | 50 - 1 | 1 | 2 | 4 | 50 - 1 | 1 | 2 | 6 | 50 - 1 | 1 | 2 | 8 | 50 - 1 | 1 | 2 | | 250 - 1 | 1 | 3 | 1 | 50 - 1 | 1 | 3 | 3 | 50 - 1 | 1 | 3 | 5 | 50 - 1 | 1 | 3 | 7 | 50 - 1 | 1 | 3 | 9 | 50 - 1 | 1 | 3 | | 250 - 1 | 1 | | 0 | 100 - 1 | 1 | | 1 | 100 - 1 | 1 | | 2 | 100 - 1 | 1 | | 3 | 100 - 1 | 1 | | 4 | 100 - 1 | 1 | | 5 | 100 - 1 | 1 | | 6 | 100 - 1 | 1 | | 7 | 100 - 1 | 1 | | 8 | 100 - 1 | 1 | | 9 | 100 - 1 | 1 | | | 1000 - 2 | 2 | 0 | 0 | 50 - 2 | 2 | 0 | 2 | 50 - 2 | 2 | 0 | 4 | 50 - 2 | 2 | 0 | 6 | 50 - 2 | 2 | 0 | 8 | 50 - 2 | 2 | 0 | | 250 - 2 | 2 | 1 | 1 | 50 - 2 | 2 | 1 | 3 | 50 - 2 | 2 | 1 | 5 | 50 - 2 | 2 | 1 | 7 | 50 - 2 | 2 | 1 | 9 | 50 - 2 | 2 | 1 | | 250 - 2 | 2 | 2 | 0 | 50 - 2 | 2 | 2 | 2 | 50 - 2 | 2 | 2 | 4 | 50 - 2 | 2 | 2 | 6 | 50 - 2 | 2 | 2 | 8 | 50 - 2 | 2 | 2 | | 250 - 2 | 2 | 3 | 1 | 50 - 2 | 2 | 3 | 3 | 50 - 2 | 2 | 3 | 5 | 50 - 2 | 2 | 3 | 7 | 50 - 2 | 2 | 3 | 9 | 50 - 2 | 2 | 3 | | 250 - 2 | 2 | | 0 | 100 - 2 | 2 | | 1 | 100 - 2 | 2 | | 2 | 100 - 2 | 2 | | 3 | 100 - 2 | 2 | | 4 | 100 - 2 | 2 | | 5 | 100 - 2 | 2 | | 6 | 100 - 2 | 2 | | 7 | 100 - 2 | 2 | | 8 | 100 - 2 | 2 | | 9 | 100 - 2 | 2 | | | 1000 -(70 rows) - -select array(select row(v.a,s1.*) from (select two,four, count(*) from onek group by cube(two,four) order by two,four) s1) from (values (1),(2)) v(a); - array ------------------------------------------------------------------------------------------------------------------------------------------------------- - {"(1,0,0,250)","(1,0,2,250)","(1,0,,500)","(1,1,1,250)","(1,1,3,250)","(1,1,,500)","(1,,0,250)","(1,,1,250)","(1,,2,250)","(1,,3,250)","(1,,,1000)"} - {"(2,0,0,250)","(2,0,2,250)","(2,0,,500)","(2,1,1,250)","(2,1,3,250)","(2,1,,500)","(2,,0,250)","(2,,1,250)","(2,,2,250)","(2,,3,250)","(2,,,1000)"} -(2 rows) - --- Rescan logic changes when there are no empty grouping sets, so test --- that too: -select * from (values (1),(2)) v(a) left join lateral (select v.a, four, ten, count(*) from onek group by grouping sets(four,ten)) s on true order by v.a,four,ten; - a | a | four | ten | count ----+---+------+-----+------- - 1 | 1 | 0 | | 250 - 1 | 1 | 1 | | 250 - 1 | 1 | 2 | | 250 - 1 | 1 | 3 | | 250 - 1 | 1 | | 0 | 100 - 1 | 1 | | 1 | 100 - 1 | 1 | | 2 | 100 - 1 | 1 | | 3 | 100 - 1 | 1 | | 4 | 100 - 1 | 1 | | 5 | 100 - 1 | 1 | | 6 | 100 - 1 | 1 | | 7 | 100 - 1 | 1 | | 8 | 100 - 1 | 1 | | 9 | 100 - 2 | 2 | 0 | | 250 - 2 | 2 | 1 | | 250 - 2 | 2 | 2 | | 250 - 2 | 2 | 3 | | 250 - 2 | 2 | | 0 | 100 - 2 | 2 | | 1 | 100 - 2 | 2 | | 2 | 100 - 2 | 2 | | 3 | 100 - 2 | 2 | | 4 | 100 - 2 | 2 | | 5 | 100 - 2 | 2 | | 6 | 100 - 2 | 2 | | 7 | 100 - 2 | 2 | | 8 | 100 - 2 | 2 | | 9 | 100 -(28 rows) - -select array(select row(v.a,s1.*) from (select two,four, count(*) from onek group by grouping sets(two,four) order by two,four) s1) from (values (1),(2)) v(a); - array ---------------------------------------------------------------------------------- - {"(1,0,,500)","(1,1,,500)","(1,,0,250)","(1,,1,250)","(1,,2,250)","(1,,3,250)"} - {"(2,0,,500)","(2,1,,500)","(2,,0,250)","(2,,1,250)","(2,,2,250)","(2,,3,250)"} -(2 rows) - --- test the knapsack -set enable_indexscan = false; -set work_mem = '64kB'; -explain (costs off) - select unique1, - count(two), count(four), count(ten), - count(hundred), count(thousand), count(twothousand), - count(*) - from tenk1 group by grouping sets (unique1,twothousand,thousand,hundred,ten,four,two); - QUERY PLAN -------------------------------- - MixedAggregate - Hash Key: two - Hash Key: four - Hash Key: ten - Hash Key: hundred - Group Key: unique1 - Sort Key: twothousand - Group Key: twothousand - Sort Key: thousand - Group Key: thousand - -> Sort - Sort Key: unique1 - -> Seq Scan on tenk1 -(13 rows) - -explain (costs off) - select unique1, - count(two), count(four), count(ten), - count(hundred), count(thousand), count(twothousand), - count(*) - from tenk1 group by grouping sets (unique1,hundred,ten,four,two); - QUERY PLAN -------------------------------- - MixedAggregate - Hash Key: two - Hash Key: four - Hash Key: ten - Hash Key: hundred - Group Key: unique1 - -> Sort - Sort Key: unique1 - -> Seq Scan on tenk1 -(9 rows) - -set work_mem = '384kB'; -explain (costs off) - select unique1, - count(two), count(four), count(ten), - count(hundred), count(thousand), count(twothousand), - count(*) - from tenk1 group by grouping sets (unique1,twothousand,thousand,hundred,ten,four,two); - QUERY PLAN -------------------------------- - MixedAggregate - Hash Key: two - Hash Key: four - Hash Key: ten - Hash Key: hundred - Hash Key: thousand - Group Key: unique1 - Sort Key: twothousand - Group Key: twothousand - -> Sort - Sort Key: unique1 - -> Seq Scan on tenk1 -(12 rows) - --- check collation-sensitive matching between grouping expressions --- (similar to a check for aggregates, but there are additional code --- paths for GROUPING, so check again here) -select v||'a', case grouping(v||'a') when 1 then 1 else 0 end, count(*) - from unnest(array[1,1], array['a','b']) u(i,v) - group by rollup(i, v||'a') order by 1,3; - ?column? | case | count -----------+------+------- - aa | 0 | 1 - ba | 0 | 1 - | 1 | 2 - | 1 | 2 -(4 rows) - -select v||'a', case when grouping(v||'a') = 1 then 1 else 0 end, count(*) - from unnest(array[1,1], array['a','b']) u(i,v) - group by rollup(i, v||'a') order by 1,3; - ?column? | case | count -----------+------+------- - aa | 0 | 1 - ba | 0 | 1 - | 1 | 2 - | 1 | 2 -(4 rows) - --- Bug #16784 -create table bug_16784(i int, j int); -analyze bug_16784; -alter table bug_16784 set (autovacuum_enabled = 'false'); -update pg_class set reltuples = 10 where relname='bug_16784'; -insert into bug_16784 select g/10, g from generate_series(1,40) g; -set work_mem='64kB'; -set enable_sort = false; -select * from - (values (1),(2)) v(a), - lateral (select a, i, j, count(*) from - bug_16784 group by cube(i,j)) s - order by v.a, i, j; - a | a | i | j | count ----+---+---+----+------- - 1 | 1 | 0 | 1 | 1 - 1 | 1 | 0 | 2 | 1 - 1 | 1 | 0 | 3 | 1 - 1 | 1 | 0 | 4 | 1 - 1 | 1 | 0 | 5 | 1 - 1 | 1 | 0 | 6 | 1 - 1 | 1 | 0 | 7 | 1 - 1 | 1 | 0 | 8 | 1 - 1 | 1 | 0 | 9 | 1 - 1 | 1 | 0 | | 9 - 1 | 1 | 1 | 10 | 1 - 1 | 1 | 1 | 11 | 1 - 1 | 1 | 1 | 12 | 1 - 1 | 1 | 1 | 13 | 1 - 1 | 1 | 1 | 14 | 1 - 1 | 1 | 1 | 15 | 1 - 1 | 1 | 1 | 16 | 1 - 1 | 1 | 1 | 17 | 1 - 1 | 1 | 1 | 18 | 1 - 1 | 1 | 1 | 19 | 1 - 1 | 1 | 1 | | 10 - 1 | 1 | 2 | 20 | 1 - 1 | 1 | 2 | 21 | 1 - 1 | 1 | 2 | 22 | 1 - 1 | 1 | 2 | 23 | 1 - 1 | 1 | 2 | 24 | 1 - 1 | 1 | 2 | 25 | 1 - 1 | 1 | 2 | 26 | 1 - 1 | 1 | 2 | 27 | 1 - 1 | 1 | 2 | 28 | 1 - 1 | 1 | 2 | 29 | 1 - 1 | 1 | 2 | | 10 - 1 | 1 | 3 | 30 | 1 - 1 | 1 | 3 | 31 | 1 - 1 | 1 | 3 | 32 | 1 - 1 | 1 | 3 | 33 | 1 - 1 | 1 | 3 | 34 | 1 - 1 | 1 | 3 | 35 | 1 - 1 | 1 | 3 | 36 | 1 - 1 | 1 | 3 | 37 | 1 - 1 | 1 | 3 | 38 | 1 - 1 | 1 | 3 | 39 | 1 - 1 | 1 | 3 | | 10 - 1 | 1 | 4 | 40 | 1 - 1 | 1 | 4 | | 1 - 1 | 1 | | 1 | 1 - 1 | 1 | | 2 | 1 - 1 | 1 | | 3 | 1 - 1 | 1 | | 4 | 1 - 1 | 1 | | 5 | 1 - 1 | 1 | | 6 | 1 - 1 | 1 | | 7 | 1 - 1 | 1 | | 8 | 1 - 1 | 1 | | 9 | 1 - 1 | 1 | | 10 | 1 - 1 | 1 | | 11 | 1 - 1 | 1 | | 12 | 1 - 1 | 1 | | 13 | 1 - 1 | 1 | | 14 | 1 - 1 | 1 | | 15 | 1 - 1 | 1 | | 16 | 1 - 1 | 1 | | 17 | 1 - 1 | 1 | | 18 | 1 - 1 | 1 | | 19 | 1 - 1 | 1 | | 20 | 1 - 1 | 1 | | 21 | 1 - 1 | 1 | | 22 | 1 - 1 | 1 | | 23 | 1 - 1 | 1 | | 24 | 1 - 1 | 1 | | 25 | 1 - 1 | 1 | | 26 | 1 - 1 | 1 | | 27 | 1 - 1 | 1 | | 28 | 1 - 1 | 1 | | 29 | 1 - 1 | 1 | | 30 | 1 - 1 | 1 | | 31 | 1 - 1 | 1 | | 32 | 1 - 1 | 1 | | 33 | 1 - 1 | 1 | | 34 | 1 - 1 | 1 | | 35 | 1 - 1 | 1 | | 36 | 1 - 1 | 1 | | 37 | 1 - 1 | 1 | | 38 | 1 - 1 | 1 | | 39 | 1 - 1 | 1 | | 40 | 1 - 1 | 1 | | | 40 - 2 | 2 | 0 | 1 | 1 - 2 | 2 | 0 | 2 | 1 - 2 | 2 | 0 | 3 | 1 - 2 | 2 | 0 | 4 | 1 - 2 | 2 | 0 | 5 | 1 - 2 | 2 | 0 | 6 | 1 - 2 | 2 | 0 | 7 | 1 - 2 | 2 | 0 | 8 | 1 - 2 | 2 | 0 | 9 | 1 - 2 | 2 | 0 | | 9 - 2 | 2 | 1 | 10 | 1 - 2 | 2 | 1 | 11 | 1 - 2 | 2 | 1 | 12 | 1 - 2 | 2 | 1 | 13 | 1 - 2 | 2 | 1 | 14 | 1 - 2 | 2 | 1 | 15 | 1 - 2 | 2 | 1 | 16 | 1 - 2 | 2 | 1 | 17 | 1 - 2 | 2 | 1 | 18 | 1 - 2 | 2 | 1 | 19 | 1 - 2 | 2 | 1 | | 10 - 2 | 2 | 2 | 20 | 1 - 2 | 2 | 2 | 21 | 1 - 2 | 2 | 2 | 22 | 1 - 2 | 2 | 2 | 23 | 1 - 2 | 2 | 2 | 24 | 1 - 2 | 2 | 2 | 25 | 1 - 2 | 2 | 2 | 26 | 1 - 2 | 2 | 2 | 27 | 1 - 2 | 2 | 2 | 28 | 1 - 2 | 2 | 2 | 29 | 1 - 2 | 2 | 2 | | 10 - 2 | 2 | 3 | 30 | 1 - 2 | 2 | 3 | 31 | 1 - 2 | 2 | 3 | 32 | 1 - 2 | 2 | 3 | 33 | 1 - 2 | 2 | 3 | 34 | 1 - 2 | 2 | 3 | 35 | 1 - 2 | 2 | 3 | 36 | 1 - 2 | 2 | 3 | 37 | 1 - 2 | 2 | 3 | 38 | 1 - 2 | 2 | 3 | 39 | 1 - 2 | 2 | 3 | | 10 - 2 | 2 | 4 | 40 | 1 - 2 | 2 | 4 | | 1 - 2 | 2 | | 1 | 1 - 2 | 2 | | 2 | 1 - 2 | 2 | | 3 | 1 - 2 | 2 | | 4 | 1 - 2 | 2 | | 5 | 1 - 2 | 2 | | 6 | 1 - 2 | 2 | | 7 | 1 - 2 | 2 | | 8 | 1 - 2 | 2 | | 9 | 1 - 2 | 2 | | 10 | 1 - 2 | 2 | | 11 | 1 - 2 | 2 | | 12 | 1 - 2 | 2 | | 13 | 1 - 2 | 2 | | 14 | 1 - 2 | 2 | | 15 | 1 - 2 | 2 | | 16 | 1 - 2 | 2 | | 17 | 1 - 2 | 2 | | 18 | 1 - 2 | 2 | | 19 | 1 - 2 | 2 | | 20 | 1 - 2 | 2 | | 21 | 1 - 2 | 2 | | 22 | 1 - 2 | 2 | | 23 | 1 - 2 | 2 | | 24 | 1 - 2 | 2 | | 25 | 1 - 2 | 2 | | 26 | 1 - 2 | 2 | | 27 | 1 - 2 | 2 | | 28 | 1 - 2 | 2 | | 29 | 1 - 2 | 2 | | 30 | 1 - 2 | 2 | | 31 | 1 - 2 | 2 | | 32 | 1 - 2 | 2 | | 33 | 1 - 2 | 2 | | 34 | 1 - 2 | 2 | | 35 | 1 - 2 | 2 | | 36 | 1 - 2 | 2 | | 37 | 1 - 2 | 2 | | 38 | 1 - 2 | 2 | | 39 | 1 - 2 | 2 | | 40 | 1 - 2 | 2 | | | 40 -(172 rows) - --- --- Compare results between plans using sorting and plans using hash --- aggregation. Force spilling in both cases by setting work_mem low --- and altering the statistics. --- -create table gs_data_1 as -select g%1000 as g1000, g%100 as g100, g%10 as g10, g - from generate_series(0,1999) g; -analyze gs_data_1; -alter table gs_data_1 set (autovacuum_enabled = 'false'); -update pg_class set reltuples = 10 where relname='gs_data_1'; -set work_mem='64kB'; --- Produce results with sorting. -set enable_sort = true; -set enable_hashagg = false; -set jit_above_cost = 0; -explain (costs off) -select g100, g10, sum(g::numeric), count(*), max(g::text) -from gs_data_1 group by cube (g1000, g100,g10); - QUERY PLAN ------------------------------------- - GroupAggregate - Group Key: g1000, g100, g10 - Group Key: g1000, g100 - Group Key: g1000 - Group Key: () - Sort Key: g100, g10 - Group Key: g100, g10 - Group Key: g100 - Sort Key: g10, g1000 - Group Key: g10, g1000 - Group Key: g10 - -> Sort - Sort Key: g1000, g100, g10 - -> Seq Scan on gs_data_1 -(14 rows) - -create table gs_group_1 as -select g100, g10, sum(g::numeric), count(*), max(g::text) -from gs_data_1 group by cube (g1000, g100,g10); --- Produce results with hash aggregation. -set enable_hashagg = true; -set enable_sort = false; -explain (costs off) -select g100, g10, sum(g::numeric), count(*), max(g::text) -from gs_data_1 group by cube (g1000, g100,g10); - QUERY PLAN ------------------------------- - MixedAggregate - Hash Key: g1000, g100, g10 - Hash Key: g1000, g100 - Hash Key: g1000 - Hash Key: g100, g10 - Hash Key: g100 - Hash Key: g10, g1000 - Hash Key: g10 - Group Key: () - -> Seq Scan on gs_data_1 -(10 rows) - -create table gs_hash_1 as -select g100, g10, sum(g::numeric), count(*), max(g::text) -from gs_data_1 group by cube (g1000, g100,g10); -set enable_sort = true; -set work_mem to default; --- Compare results -(select * from gs_hash_1 except select * from gs_group_1) - union all -(select * from gs_group_1 except select * from gs_hash_1); - g100 | g10 | sum | count | max -------+-----+-----+-------+----- -(0 rows) - -drop table gs_group_1; -drop table gs_hash_1; --- GROUP BY DISTINCT --- "normal" behavior... -select a, b, c -from (values (1, 2, 3), (4, null, 6), (7, 8, 9)) as t (a, b, c) -group by all rollup(a, b), rollup(a, c) -order by a, b, c; - a | b | c ----+---+--- - 1 | 2 | 3 - 1 | 2 | - 1 | 2 | - 1 | | 3 - 1 | | 3 - 1 | | - 1 | | - 1 | | - 4 | | 6 - 4 | | 6 - 4 | | 6 - 4 | | - 4 | | - 4 | | - 4 | | - 4 | | - 7 | 8 | 9 - 7 | 8 | - 7 | 8 | - 7 | | 9 - 7 | | 9 - 7 | | - 7 | | - 7 | | - | | -(25 rows) - --- ...which is also the default -select a, b, c -from (values (1, 2, 3), (4, null, 6), (7, 8, 9)) as t (a, b, c) -group by rollup(a, b), rollup(a, c) -order by a, b, c; - a | b | c ----+---+--- - 1 | 2 | 3 - 1 | 2 | - 1 | 2 | - 1 | | 3 - 1 | | 3 - 1 | | - 1 | | - 1 | | - 4 | | 6 - 4 | | 6 - 4 | | 6 - 4 | | - 4 | | - 4 | | - 4 | | - 4 | | - 7 | 8 | 9 - 7 | 8 | - 7 | 8 | - 7 | | 9 - 7 | | 9 - 7 | | - 7 | | - 7 | | - | | -(25 rows) - --- "group by distinct" behavior... -select a, b, c -from (values (1, 2, 3), (4, null, 6), (7, 8, 9)) as t (a, b, c) -group by distinct rollup(a, b), rollup(a, c) -order by a, b, c; - a | b | c ----+---+--- - 1 | 2 | 3 - 1 | 2 | - 1 | | 3 - 1 | | - 4 | | 6 - 4 | | 6 - 4 | | - 4 | | - 7 | 8 | 9 - 7 | 8 | - 7 | | 9 - 7 | | - | | -(13 rows) - --- ...which is not the same as "select distinct" -select distinct a, b, c -from (values (1, 2, 3), (4, null, 6), (7, 8, 9)) as t (a, b, c) -group by rollup(a, b), rollup(a, c) -order by a, b, c; - a | b | c ----+---+--- - 1 | 2 | 3 - 1 | 2 | - 1 | | 3 - 1 | | - 4 | | 6 - 4 | | - 7 | 8 | 9 - 7 | 8 | - 7 | | 9 - 7 | | - | | -(11 rows) - --- test handling of outer GroupingFunc within subqueries -explain (costs off) -select (select grouping(v1)) from (values ((select 1))) v(v1) group by cube(v1); - QUERY PLAN ---------------------------- - MixedAggregate - Hash Key: $2 - Group Key: () - InitPlan 1 (returns $1) - -> Result - InitPlan 3 (returns $2) - -> Result - -> Result - SubPlan 2 - -> Result -(10 rows) - -select (select grouping(v1)) from (values ((select 1))) v(v1) group by cube(v1); - grouping ----------- - 1 - 0 -(2 rows) - -explain (costs off) -select (select grouping(v1)) from (values ((select 1))) v(v1) group by v1; - QUERY PLAN ---------------------------- - GroupAggregate - Group Key: $2 - InitPlan 1 (returns $1) - -> Result - InitPlan 3 (returns $2) - -> Result - -> Result - SubPlan 2 - -> Result -(9 rows) - -select (select grouping(v1)) from (values ((select 1))) v(v1) group by v1; - grouping ----------- - 0 -(1 row) - --- end +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/drop_operator.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/drop_operator.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/drop_operator.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/drop_operator.out 2023-02-20 19:46:22.459212593 -0500 @@ -1,61 +1 @@ -CREATE OPERATOR === ( - PROCEDURE = int8eq, - LEFTARG = bigint, - RIGHTARG = bigint, - COMMUTATOR = === -); -CREATE OPERATOR !== ( - PROCEDURE = int8ne, - LEFTARG = bigint, - RIGHTARG = bigint, - NEGATOR = ===, - COMMUTATOR = !== -); -DROP OPERATOR !==(bigint, bigint); -SELECT ctid, oprcom -FROM pg_catalog.pg_operator fk -WHERE oprcom != 0 AND - NOT EXISTS(SELECT 1 FROM pg_catalog.pg_operator pk WHERE pk.oid = fk.oprcom); - ctid | oprcom -------+-------- -(0 rows) - -SELECT ctid, oprnegate -FROM pg_catalog.pg_operator fk -WHERE oprnegate != 0 AND - NOT EXISTS(SELECT 1 FROM pg_catalog.pg_operator pk WHERE pk.oid = fk.oprnegate); - ctid | oprnegate -------+----------- -(0 rows) - -DROP OPERATOR ===(bigint, bigint); -CREATE OPERATOR <| ( - PROCEDURE = int8lt, - LEFTARG = bigint, - RIGHTARG = bigint -); -CREATE OPERATOR |> ( - PROCEDURE = int8gt, - LEFTARG = bigint, - RIGHTARG = bigint, - NEGATOR = <|, - COMMUTATOR = <| -); -DROP OPERATOR |>(bigint, bigint); -SELECT ctid, oprcom -FROM pg_catalog.pg_operator fk -WHERE oprcom != 0 AND - NOT EXISTS(SELECT 1 FROM pg_catalog.pg_operator pk WHERE pk.oid = fk.oprcom); - ctid | oprcom -------+-------- -(0 rows) - -SELECT ctid, oprnegate -FROM pg_catalog.pg_operator fk -WHERE oprnegate != 0 AND - NOT EXISTS(SELECT 1 FROM pg_catalog.pg_operator pk WHERE pk.oid = fk.oprnegate); - ctid | oprnegate -------+----------- -(0 rows) - -DROP OPERATOR <|(bigint, bigint); +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/password.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/password.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/password.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/password.out 2023-02-20 19:46:22.389212590 -0500 @@ -1,144 +1 @@ --- --- Tests for password types --- --- Tests for GUC password_encryption -SET password_encryption = 'novalue'; -- error -ERROR: invalid value for parameter "password_encryption": "novalue" -HINT: Available values: md5, scram-sha-256. -SET password_encryption = true; -- error -ERROR: invalid value for parameter "password_encryption": "true" -HINT: Available values: md5, scram-sha-256. -SET password_encryption = 'md5'; -- ok -SET password_encryption = 'scram-sha-256'; -- ok --- consistency of password entries -SET password_encryption = 'md5'; -CREATE ROLE regress_passwd1 PASSWORD 'role_pwd1'; -CREATE ROLE regress_passwd2 PASSWORD 'role_pwd2'; -SET password_encryption = 'scram-sha-256'; -CREATE ROLE regress_passwd3 PASSWORD 'role_pwd3'; -CREATE ROLE regress_passwd4 PASSWORD NULL; --- check list of created entries --- --- The scram secret will look something like: --- SCRAM-SHA-256$4096:E4HxLGtnRzsYwg==$6YtlR4t69SguDiwFvbVgVZtuz6gpJQQqUMZ7IQJK5yI=:ps75jrHeYU4lXCcXI4O8oIdJ3eO8o2jirjruw9phBTo= --- --- Since the salt is random, the exact value stored will be different on every test --- run. Use a regular expression to mask the changing parts. -SELECT rolname, regexp_replace(rolpassword, '(SCRAM-SHA-256)\$(\d+):([a-zA-Z0-9+/=]+)\$([a-zA-Z0-9+=/]+):([a-zA-Z0-9+/=]+)', '\1$\2:$:') as rolpassword_masked - FROM pg_authid - WHERE rolname LIKE 'regress_passwd%' - ORDER BY rolname, rolpassword; - rolname | rolpassword_masked ------------------+--------------------------------------------------- - regress_passwd1 | md5783277baca28003b33453252be4dbb34 - regress_passwd2 | md54044304ba511dd062133eb5b4b84a2a3 - regress_passwd3 | SCRAM-SHA-256$4096:$: - regress_passwd4 | -(4 rows) - --- Rename a role -ALTER ROLE regress_passwd2 RENAME TO regress_passwd2_new; -NOTICE: MD5 password cleared because of role rename --- md5 entry should have been removed -SELECT rolname, rolpassword - FROM pg_authid - WHERE rolname LIKE 'regress_passwd2_new' - ORDER BY rolname, rolpassword; - rolname | rolpassword ----------------------+------------- - regress_passwd2_new | -(1 row) - -ALTER ROLE regress_passwd2_new RENAME TO regress_passwd2; --- Change passwords with ALTER USER. With plaintext or already-encrypted --- passwords. -SET password_encryption = 'md5'; --- encrypt with MD5 -ALTER ROLE regress_passwd2 PASSWORD 'foo'; --- already encrypted, use as they are -ALTER ROLE regress_passwd1 PASSWORD 'md5cd3578025fe2c3d7ed1b9a9b26238b70'; -ALTER ROLE regress_passwd3 PASSWORD 'SCRAM-SHA-256$4096:VLK4RMaQLCvNtQ==$6YtlR4t69SguDiwFvbVgVZtuz6gpJQQqUMZ7IQJK5yI=:ps75jrHeYU4lXCcXI4O8oIdJ3eO8o2jirjruw9phBTo='; -SET password_encryption = 'scram-sha-256'; --- create SCRAM secret -ALTER ROLE regress_passwd4 PASSWORD 'foo'; --- already encrypted with MD5, use as it is -CREATE ROLE regress_passwd5 PASSWORD 'md5e73a4b11df52a6068f8b39f90be36023'; --- This looks like a valid SCRAM-SHA-256 secret, but it is not --- so it should be hashed with SCRAM-SHA-256. -CREATE ROLE regress_passwd6 PASSWORD 'SCRAM-SHA-256$1234'; --- These may look like valid MD5 secrets, but they are not, so they --- should be hashed with SCRAM-SHA-256. --- trailing garbage at the end -CREATE ROLE regress_passwd7 PASSWORD 'md5012345678901234567890123456789zz'; --- invalid length -CREATE ROLE regress_passwd8 PASSWORD 'md501234567890123456789012345678901zz'; -SELECT rolname, regexp_replace(rolpassword, '(SCRAM-SHA-256)\$(\d+):([a-zA-Z0-9+/=]+)\$([a-zA-Z0-9+=/]+):([a-zA-Z0-9+/=]+)', '\1$\2:$:') as rolpassword_masked - FROM pg_authid - WHERE rolname LIKE 'regress_passwd%' - ORDER BY rolname, rolpassword; - rolname | rolpassword_masked ------------------+--------------------------------------------------- - regress_passwd1 | md5cd3578025fe2c3d7ed1b9a9b26238b70 - regress_passwd2 | md5dfa155cadd5f4ad57860162f3fab9cdb - regress_passwd3 | SCRAM-SHA-256$4096:$: - regress_passwd4 | SCRAM-SHA-256$4096:$: - regress_passwd5 | md5e73a4b11df52a6068f8b39f90be36023 - regress_passwd6 | SCRAM-SHA-256$4096:$: - regress_passwd7 | SCRAM-SHA-256$4096:$: - regress_passwd8 | SCRAM-SHA-256$4096:$: -(8 rows) - --- An empty password is not allowed, in any form -CREATE ROLE regress_passwd_empty PASSWORD ''; -NOTICE: empty string is not a valid password, clearing password -ALTER ROLE regress_passwd_empty PASSWORD 'md585939a5ce845f1a1b620742e3c659e0a'; -NOTICE: empty string is not a valid password, clearing password -ALTER ROLE regress_passwd_empty PASSWORD 'SCRAM-SHA-256$4096:hpFyHTUsSWcR7O9P$LgZFIt6Oqdo27ZFKbZ2nV+vtnYM995pDh9ca6WSi120=:qVV5NeluNfUPkwm7Vqat25RjSPLkGeoZBQs6wVv+um4='; -NOTICE: empty string is not a valid password, clearing password -SELECT rolpassword FROM pg_authid WHERE rolname='regress_passwd_empty'; - rolpassword -------------- - -(1 row) - --- Test with invalid stored and server keys. --- --- The first is valid, to act as a control. The others have too long --- stored/server keys. They will be re-hashed. -CREATE ROLE regress_passwd_sha_len0 PASSWORD 'SCRAM-SHA-256$4096:A6xHKoH/494E941doaPOYg==$Ky+A30sewHIH3VHQLRN9vYsuzlgNyGNKCh37dy96Rqw=:COPdlNiIkrsacU5QoxydEuOH6e/KfiipeETb/bPw8ZI='; -CREATE ROLE regress_passwd_sha_len1 PASSWORD 'SCRAM-SHA-256$4096:A6xHKoH/494E941doaPOYg==$Ky+A30sewHIH3VHQLRN9vYsuzlgNyGNKCh37dy96RqwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=:COPdlNiIkrsacU5QoxydEuOH6e/KfiipeETb/bPw8ZI='; -CREATE ROLE regress_passwd_sha_len2 PASSWORD 'SCRAM-SHA-256$4096:A6xHKoH/494E941doaPOYg==$Ky+A30sewHIH3VHQLRN9vYsuzlgNyGNKCh37dy96Rqw=:COPdlNiIkrsacU5QoxydEuOH6e/KfiipeETb/bPw8ZIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA='; --- Check that the invalid secrets were re-hashed. A re-hashed secret --- should not contain the original salt. -SELECT rolname, rolpassword not like '%A6xHKoH/494E941doaPOYg==%' as is_rolpassword_rehashed - FROM pg_authid - WHERE rolname LIKE 'regress_passwd_sha_len%' - ORDER BY rolname; - rolname | is_rolpassword_rehashed --------------------------+------------------------- - regress_passwd_sha_len0 | f - regress_passwd_sha_len1 | t - regress_passwd_sha_len2 | t -(3 rows) - -DROP ROLE regress_passwd1; -DROP ROLE regress_passwd2; -DROP ROLE regress_passwd3; -DROP ROLE regress_passwd4; -DROP ROLE regress_passwd5; -DROP ROLE regress_passwd6; -DROP ROLE regress_passwd7; -DROP ROLE regress_passwd8; -DROP ROLE regress_passwd_empty; -DROP ROLE regress_passwd_sha_len0; -DROP ROLE regress_passwd_sha_len1; -DROP ROLE regress_passwd_sha_len2; --- all entries should have been removed -SELECT rolname, rolpassword - FROM pg_authid - WHERE rolname LIKE 'regress_passwd%' - ORDER BY rolname, rolpassword; - rolname | rolpassword ----------+------------- -(0 rows) - +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/identity.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/identity.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/identity.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/identity.out 2023-02-20 19:46:22.429212592 -0500 @@ -1,562 +1 @@ --- sanity check of system catalog -SELECT attrelid, attname, attidentity FROM pg_attribute WHERE attidentity NOT IN ('', 'a', 'd'); - attrelid | attname | attidentity -----------+---------+------------- -(0 rows) - -CREATE TABLE itest1 (a int generated by default as identity, b text); -CREATE TABLE itest2 (a bigint generated always as identity, b text); -CREATE TABLE itest3 (a smallint generated by default as identity (start with 7 increment by 5), b text); -ALTER TABLE itest3 ALTER COLUMN a ADD GENERATED ALWAYS AS IDENTITY; -- error -ERROR: column "a" of relation "itest3" is already an identity column -SELECT table_name, column_name, column_default, is_nullable, is_identity, identity_generation, identity_start, identity_increment, identity_maximum, identity_minimum, identity_cycle FROM information_schema.columns WHERE table_name LIKE 'itest_' ORDER BY 1, 2; - table_name | column_name | column_default | is_nullable | is_identity | identity_generation | identity_start | identity_increment | identity_maximum | identity_minimum | identity_cycle -------------+-------------+----------------+-------------+-------------+---------------------+----------------+--------------------+---------------------+------------------+---------------- - itest1 | a | | NO | YES | BY DEFAULT | 1 | 1 | 2147483647 | 1 | NO - itest1 | b | | YES | NO | | | | | | NO - itest2 | a | | NO | YES | ALWAYS | 1 | 1 | 9223372036854775807 | 1 | NO - itest2 | b | | YES | NO | | | | | | NO - itest3 | a | | NO | YES | BY DEFAULT | 7 | 5 | 32767 | 1 | NO - itest3 | b | | YES | NO | | | | | | NO -(6 rows) - --- internal sequences should not be shown here -SELECT sequence_name FROM information_schema.sequences WHERE sequence_name LIKE 'itest%'; - sequence_name ---------------- -(0 rows) - -SELECT pg_get_serial_sequence('itest1', 'a'); - pg_get_serial_sequence ------------------------- - public.itest1_a_seq -(1 row) - -\d itest1_a_seq - Sequence "public.itest1_a_seq" - Type | Start | Minimum | Maximum | Increment | Cycles? | Cache ----------+-------+---------+------------+-----------+---------+------- - integer | 1 | 1 | 2147483647 | 1 | no | 1 -Sequence for identity column: public.itest1.a - -CREATE TABLE itest4 (a int, b text); -ALTER TABLE itest4 ALTER COLUMN a ADD GENERATED ALWAYS AS IDENTITY; -- error, requires NOT NULL -ERROR: column "a" of relation "itest4" must be declared NOT NULL before identity can be added -ALTER TABLE itest4 ALTER COLUMN a SET NOT NULL; -ALTER TABLE itest4 ALTER COLUMN a ADD GENERATED ALWAYS AS IDENTITY; -- ok -ALTER TABLE itest4 ALTER COLUMN a DROP NOT NULL; -- error, disallowed -ERROR: column "a" of relation "itest4" is an identity column -ALTER TABLE itest4 ALTER COLUMN a ADD GENERATED ALWAYS AS IDENTITY; -- error, already set -ERROR: column "a" of relation "itest4" is already an identity column -ALTER TABLE itest4 ALTER COLUMN b ADD GENERATED ALWAYS AS IDENTITY; -- error, wrong data type -ERROR: identity column type must be smallint, integer, or bigint --- for later -ALTER TABLE itest4 ALTER COLUMN b SET DEFAULT ''; --- invalid column type -CREATE TABLE itest_err_1 (a text generated by default as identity); -ERROR: identity column type must be smallint, integer, or bigint --- duplicate identity -CREATE TABLE itest_err_2 (a int generated always as identity generated by default as identity); -ERROR: multiple identity specifications for column "a" of table "itest_err_2" -LINE 1: ...E itest_err_2 (a int generated always as identity generated ... - ^ --- cannot have default and identity -CREATE TABLE itest_err_3 (a int default 5 generated by default as identity); -ERROR: both default and identity specified for column "a" of table "itest_err_3" -LINE 1: CREATE TABLE itest_err_3 (a int default 5 generated by defau... - ^ --- cannot combine serial and identity -CREATE TABLE itest_err_4 (a serial generated by default as identity); -ERROR: both default and identity specified for column "a" of table "itest_err_4" -INSERT INTO itest1 DEFAULT VALUES; -INSERT INTO itest1 DEFAULT VALUES; -INSERT INTO itest2 DEFAULT VALUES; -INSERT INTO itest2 DEFAULT VALUES; -INSERT INTO itest3 DEFAULT VALUES; -INSERT INTO itest3 DEFAULT VALUES; -INSERT INTO itest4 DEFAULT VALUES; -INSERT INTO itest4 DEFAULT VALUES; -SELECT * FROM itest1; - a | b ----+--- - 1 | - 2 | -(2 rows) - -SELECT * FROM itest2; - a | b ----+--- - 1 | - 2 | -(2 rows) - -SELECT * FROM itest3; - a | b -----+--- - 7 | - 12 | -(2 rows) - -SELECT * FROM itest4; - a | b ----+--- - 1 | - 2 | -(2 rows) - --- VALUES RTEs -CREATE TABLE itest5 (a int generated always as identity, b text); -INSERT INTO itest5 VALUES (1, 'a'); -- error -ERROR: cannot insert a non-DEFAULT value into column "a" -DETAIL: Column "a" is an identity column defined as GENERATED ALWAYS. -HINT: Use OVERRIDING SYSTEM VALUE to override. -INSERT INTO itest5 VALUES (DEFAULT, 'a'); -- ok -INSERT INTO itest5 VALUES (2, 'b'), (3, 'c'); -- error -ERROR: cannot insert a non-DEFAULT value into column "a" -DETAIL: Column "a" is an identity column defined as GENERATED ALWAYS. -HINT: Use OVERRIDING SYSTEM VALUE to override. -INSERT INTO itest5 VALUES (DEFAULT, 'b'), (3, 'c'); -- error -ERROR: cannot insert a non-DEFAULT value into column "a" -DETAIL: Column "a" is an identity column defined as GENERATED ALWAYS. -HINT: Use OVERRIDING SYSTEM VALUE to override. -INSERT INTO itest5 VALUES (2, 'b'), (DEFAULT, 'c'); -- error -ERROR: cannot insert a non-DEFAULT value into column "a" -DETAIL: Column "a" is an identity column defined as GENERATED ALWAYS. -HINT: Use OVERRIDING SYSTEM VALUE to override. -INSERT INTO itest5 VALUES (DEFAULT, 'b'), (DEFAULT, 'c'); -- ok -INSERT INTO itest5 OVERRIDING SYSTEM VALUE VALUES (-1, 'aa'); -INSERT INTO itest5 OVERRIDING SYSTEM VALUE VALUES (-2, 'bb'), (-3, 'cc'); -INSERT INTO itest5 OVERRIDING SYSTEM VALUE VALUES (DEFAULT, 'dd'), (-4, 'ee'); -INSERT INTO itest5 OVERRIDING SYSTEM VALUE VALUES (-5, 'ff'), (DEFAULT, 'gg'); -INSERT INTO itest5 OVERRIDING SYSTEM VALUE VALUES (DEFAULT, 'hh'), (DEFAULT, 'ii'); -INSERT INTO itest5 OVERRIDING USER VALUE VALUES (-1, 'aaa'); -INSERT INTO itest5 OVERRIDING USER VALUE VALUES (-2, 'bbb'), (-3, 'ccc'); -INSERT INTO itest5 OVERRIDING USER VALUE VALUES (DEFAULT, 'ddd'), (-4, 'eee'); -INSERT INTO itest5 OVERRIDING USER VALUE VALUES (-5, 'fff'), (DEFAULT, 'ggg'); -INSERT INTO itest5 OVERRIDING USER VALUE VALUES (DEFAULT, 'hhh'), (DEFAULT, 'iii'); -SELECT * FROM itest5; - a | b -----+----- - 1 | a - 2 | b - 3 | c - -1 | aa - -2 | bb - -3 | cc - 4 | dd - -4 | ee - -5 | ff - 5 | gg - 6 | hh - 7 | ii - 8 | aaa - 9 | bbb - 10 | ccc - 11 | ddd - 12 | eee - 13 | fff - 14 | ggg - 15 | hhh - 16 | iii -(21 rows) - -DROP TABLE itest5; -INSERT INTO itest3 VALUES (DEFAULT, 'a'); -INSERT INTO itest3 VALUES (DEFAULT, 'b'), (DEFAULT, 'c'); -SELECT * FROM itest3; - a | b -----+--- - 7 | - 12 | - 17 | a - 22 | b - 27 | c -(5 rows) - --- OVERRIDING tests --- GENERATED BY DEFAULT --- This inserts the row as presented: -INSERT INTO itest1 VALUES (10, 'xyz'); --- With GENERATED BY DEFAULT, OVERRIDING SYSTEM VALUE is not allowed --- by the standard, but we allow it as a no-op, since it is of use if --- there are multiple identity columns in a table, which is also an --- extension. -INSERT INTO itest1 OVERRIDING SYSTEM VALUE VALUES (20, 'xyz'); --- This ignores the 30 and uses the sequence value instead: -INSERT INTO itest1 OVERRIDING USER VALUE VALUES (30, 'xyz'); -SELECT * FROM itest1; - a | b -----+----- - 1 | - 2 | - 10 | xyz - 20 | xyz - 3 | xyz -(5 rows) - --- GENERATED ALWAYS --- This is an error: -INSERT INTO itest2 VALUES (10, 'xyz'); -ERROR: cannot insert a non-DEFAULT value into column "a" -DETAIL: Column "a" is an identity column defined as GENERATED ALWAYS. -HINT: Use OVERRIDING SYSTEM VALUE to override. --- This inserts the row as presented: -INSERT INTO itest2 OVERRIDING SYSTEM VALUE VALUES (20, 'xyz'); --- This ignores the 30 and uses the sequence value instead: -INSERT INTO itest2 OVERRIDING USER VALUE VALUES (30, 'xyz'); -SELECT * FROM itest2; - a | b -----+----- - 1 | - 2 | - 20 | xyz - 3 | xyz -(4 rows) - --- UPDATE tests --- GENERATED BY DEFAULT is not restricted. -UPDATE itest1 SET a = 101 WHERE a = 1; -UPDATE itest1 SET a = DEFAULT WHERE a = 2; -SELECT * FROM itest1; - a | b ------+----- - 10 | xyz - 20 | xyz - 3 | xyz - 101 | - 4 | -(5 rows) - --- GENERATED ALWAYS allows only DEFAULT. -UPDATE itest2 SET a = 101 WHERE a = 1; -- error -ERROR: column "a" can only be updated to DEFAULT -DETAIL: Column "a" is an identity column defined as GENERATED ALWAYS. -UPDATE itest2 SET a = DEFAULT WHERE a = 2; -- ok -SELECT * FROM itest2; - a | b -----+----- - 1 | - 20 | xyz - 3 | xyz - 4 | -(4 rows) - --- COPY tests -CREATE TABLE itest9 (a int GENERATED ALWAYS AS IDENTITY, b text, c bigint); -COPY itest9 FROM stdin; -COPY itest9 (b, c) FROM stdin; -SELECT * FROM itest9 ORDER BY c; - a | b | c ------+------+----- - 100 | foo | 200 - 101 | bar | 201 - 1 | foo2 | 202 - 2 | bar2 | 203 -(4 rows) - --- DROP IDENTITY tests -ALTER TABLE itest4 ALTER COLUMN a DROP IDENTITY; -ALTER TABLE itest4 ALTER COLUMN a DROP IDENTITY; -- error -ERROR: column "a" of relation "itest4" is not an identity column -ALTER TABLE itest4 ALTER COLUMN a DROP IDENTITY IF EXISTS; -- noop -NOTICE: column "a" of relation "itest4" is not an identity column, skipping -INSERT INTO itest4 DEFAULT VALUES; -- fails because NOT NULL is not dropped -ERROR: null value in column "a" of relation "itest4" violates not-null constraint -DETAIL: Failing row contains (null, ). -ALTER TABLE itest4 ALTER COLUMN a DROP NOT NULL; -INSERT INTO itest4 DEFAULT VALUES; -SELECT * FROM itest4; - a | b ----+--- - 1 | - 2 | - | -(3 rows) - --- check that sequence is removed -SELECT sequence_name FROM itest4_a_seq; -ERROR: relation "itest4_a_seq" does not exist -LINE 1: SELECT sequence_name FROM itest4_a_seq; - ^ --- test views -CREATE TABLE itest10 (a int generated by default as identity, b text); -CREATE TABLE itest11 (a int generated always as identity, b text); -CREATE VIEW itestv10 AS SELECT * FROM itest10; -CREATE VIEW itestv11 AS SELECT * FROM itest11; -INSERT INTO itestv10 DEFAULT VALUES; -INSERT INTO itestv10 DEFAULT VALUES; -INSERT INTO itestv11 DEFAULT VALUES; -INSERT INTO itestv11 DEFAULT VALUES; -SELECT * FROM itestv10; - a | b ----+--- - 1 | - 2 | -(2 rows) - -SELECT * FROM itestv11; - a | b ----+--- - 1 | - 2 | -(2 rows) - -INSERT INTO itestv10 VALUES (10, 'xyz'); -INSERT INTO itestv10 OVERRIDING USER VALUE VALUES (11, 'xyz'); -SELECT * FROM itestv10; - a | b -----+----- - 1 | - 2 | - 10 | xyz - 3 | xyz -(4 rows) - -INSERT INTO itestv11 VALUES (10, 'xyz'); -ERROR: cannot insert a non-DEFAULT value into column "a" -DETAIL: Column "a" is an identity column defined as GENERATED ALWAYS. -HINT: Use OVERRIDING SYSTEM VALUE to override. -INSERT INTO itestv11 OVERRIDING SYSTEM VALUE VALUES (11, 'xyz'); -SELECT * FROM itestv11; - a | b -----+----- - 1 | - 2 | - 11 | xyz -(3 rows) - -DROP VIEW itestv10, itestv11; --- ADD COLUMN -CREATE TABLE itest13 (a int); --- add column to empty table -ALTER TABLE itest13 ADD COLUMN b int GENERATED BY DEFAULT AS IDENTITY; -INSERT INTO itest13 VALUES (1), (2), (3); --- add column to populated table -ALTER TABLE itest13 ADD COLUMN c int GENERATED BY DEFAULT AS IDENTITY; -SELECT * FROM itest13; - a | b | c ----+---+--- - 1 | 1 | 1 - 2 | 2 | 2 - 3 | 3 | 3 -(3 rows) - --- various ALTER COLUMN tests --- fail, not allowed for identity columns -ALTER TABLE itest1 ALTER COLUMN a SET DEFAULT 1; -ERROR: column "a" of relation "itest1" is an identity column --- fail, not allowed, already has a default -CREATE TABLE itest5 (a serial, b text); -ALTER TABLE itest5 ALTER COLUMN a ADD GENERATED ALWAYS AS IDENTITY; -ERROR: column "a" of relation "itest5" already has a default value -ALTER TABLE itest3 ALTER COLUMN a TYPE int; -SELECT seqtypid::regtype FROM pg_sequence WHERE seqrelid = 'itest3_a_seq'::regclass; - seqtypid ----------- - integer -(1 row) - -\d itest3 - Table "public.itest3" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+---------------------------------- - a | integer | | not null | generated by default as identity - b | text | | | - -ALTER TABLE itest3 ALTER COLUMN a TYPE text; -- error -ERROR: identity column type must be smallint, integer, or bigint --- kinda silly to change property in the same command, but it should work -ALTER TABLE itest3 - ADD COLUMN c int GENERATED BY DEFAULT AS IDENTITY, - ALTER COLUMN c SET GENERATED ALWAYS; -\d itest3 - Table "public.itest3" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+---------------------------------- - a | integer | | not null | generated by default as identity - b | text | | | - c | integer | | not null | generated always as identity - --- ALTER COLUMN ... SET -CREATE TABLE itest6 (a int GENERATED ALWAYS AS IDENTITY, b text); -INSERT INTO itest6 DEFAULT VALUES; -ALTER TABLE itest6 ALTER COLUMN a SET GENERATED BY DEFAULT SET INCREMENT BY 2 SET START WITH 100 RESTART; -INSERT INTO itest6 DEFAULT VALUES; -INSERT INTO itest6 DEFAULT VALUES; -SELECT * FROM itest6; - a | b ------+--- - 1 | - 100 | - 102 | -(3 rows) - -SELECT table_name, column_name, is_identity, identity_generation FROM information_schema.columns WHERE table_name = 'itest6' ORDER BY 1, 2; - table_name | column_name | is_identity | identity_generation -------------+-------------+-------------+--------------------- - itest6 | a | YES | BY DEFAULT - itest6 | b | NO | -(2 rows) - -ALTER TABLE itest6 ALTER COLUMN b SET INCREMENT BY 2; -- fail, not identity -ERROR: column "b" of relation "itest6" is not an identity column --- prohibited direct modification of sequence -ALTER SEQUENCE itest6_a_seq OWNED BY NONE; -ERROR: cannot change ownership of identity sequence -DETAIL: Sequence "itest6_a_seq" is linked to table "itest6". --- inheritance -CREATE TABLE itest7 (a int GENERATED ALWAYS AS IDENTITY); -INSERT INTO itest7 DEFAULT VALUES; -SELECT * FROM itest7; - a ---- - 1 -(1 row) - --- identity property is not inherited -CREATE TABLE itest7a (b text) INHERITS (itest7); --- make column identity in child table -CREATE TABLE itest7b (a int); -CREATE TABLE itest7c (a int GENERATED ALWAYS AS IDENTITY) INHERITS (itest7b); -NOTICE: merging column "a" with inherited definition -INSERT INTO itest7c DEFAULT VALUES; -SELECT * FROM itest7c; - a ---- - 1 -(1 row) - -CREATE TABLE itest7d (a int not null); -CREATE TABLE itest7e () INHERITS (itest7d); -ALTER TABLE itest7d ALTER COLUMN a ADD GENERATED ALWAYS AS IDENTITY; -ALTER TABLE itest7d ADD COLUMN b int GENERATED ALWAYS AS IDENTITY; -- error -ERROR: cannot recursively add identity column to table that has child tables -SELECT table_name, column_name, is_nullable, is_identity, identity_generation FROM information_schema.columns WHERE table_name LIKE 'itest7%' ORDER BY 1, 2; - table_name | column_name | is_nullable | is_identity | identity_generation -------------+-------------+-------------+-------------+--------------------- - itest7 | a | NO | YES | ALWAYS - itest7a | a | NO | NO | - itest7a | b | YES | NO | - itest7b | a | YES | NO | - itest7c | a | NO | YES | ALWAYS - itest7d | a | NO | YES | ALWAYS - itest7e | a | NO | NO | -(7 rows) - --- These ALTER TABLE variants will not recurse. -ALTER TABLE itest7 ALTER COLUMN a SET GENERATED BY DEFAULT; -ALTER TABLE itest7 ALTER COLUMN a RESTART; -ALTER TABLE itest7 ALTER COLUMN a DROP IDENTITY; --- privileges -CREATE USER regress_identity_user1; -CREATE TABLE itest8 (a int GENERATED ALWAYS AS IDENTITY, b text); -GRANT SELECT, INSERT ON itest8 TO regress_identity_user1; -SET ROLE regress_identity_user1; -INSERT INTO itest8 DEFAULT VALUES; -SELECT * FROM itest8; - a | b ----+--- - 1 | -(1 row) - -RESET ROLE; -DROP TABLE itest8; -DROP USER regress_identity_user1; --- multiple steps in ALTER TABLE -CREATE TABLE itest8 (f1 int); -ALTER TABLE itest8 - ADD COLUMN f2 int NOT NULL, - ALTER COLUMN f2 ADD GENERATED ALWAYS AS IDENTITY; -ALTER TABLE itest8 - ADD COLUMN f3 int NOT NULL, - ALTER COLUMN f3 ADD GENERATED ALWAYS AS IDENTITY, - ALTER COLUMN f3 SET GENERATED BY DEFAULT SET INCREMENT 10; -ALTER TABLE itest8 - ADD COLUMN f4 int; -ALTER TABLE itest8 - ALTER COLUMN f4 SET NOT NULL, - ALTER COLUMN f4 ADD GENERATED ALWAYS AS IDENTITY, - ALTER COLUMN f4 SET DATA TYPE bigint; -ALTER TABLE itest8 - ADD COLUMN f5 int GENERATED ALWAYS AS IDENTITY; -ALTER TABLE itest8 - ALTER COLUMN f5 DROP IDENTITY, - ALTER COLUMN f5 DROP NOT NULL, - ALTER COLUMN f5 SET DATA TYPE bigint; -INSERT INTO itest8 VALUES(0), (1); --- This does not work when the table isn't empty. That's intentional, --- since ADD GENERATED should only affect later insertions: -ALTER TABLE itest8 - ADD COLUMN f22 int NOT NULL, - ALTER COLUMN f22 ADD GENERATED ALWAYS AS IDENTITY; -ERROR: column "f22" of relation "itest8" contains null values -TABLE itest8; - f1 | f2 | f3 | f4 | f5 -----+----+----+----+---- - 0 | 1 | 1 | 1 | - 1 | 2 | 11 | 2 | -(2 rows) - -\d+ itest8 - Table "public.itest8" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+----------------------------------+---------+--------------+------------- - f1 | integer | | | | plain | | - f2 | integer | | not null | generated always as identity | plain | | - f3 | integer | | not null | generated by default as identity | plain | | - f4 | bigint | | not null | generated always as identity | plain | | - f5 | bigint | | | | plain | | - -\d itest8_f2_seq - Sequence "public.itest8_f2_seq" - Type | Start | Minimum | Maximum | Increment | Cycles? | Cache ----------+-------+---------+------------+-----------+---------+------- - integer | 1 | 1 | 2147483647 | 1 | no | 1 -Sequence for identity column: public.itest8.f2 - -\d itest8_f3_seq - Sequence "public.itest8_f3_seq" - Type | Start | Minimum | Maximum | Increment | Cycles? | Cache ----------+-------+---------+------------+-----------+---------+------- - integer | 1 | 1 | 2147483647 | 10 | no | 1 -Sequence for identity column: public.itest8.f3 - -\d itest8_f4_seq - Sequence "public.itest8_f4_seq" - Type | Start | Minimum | Maximum | Increment | Cycles? | Cache ---------+-------+---------+---------------------+-----------+---------+------- - bigint | 1 | 1 | 9223372036854775807 | 1 | no | 1 -Sequence for identity column: public.itest8.f4 - -\d itest8_f5_seq -DROP TABLE itest8; --- typed tables (currently not supported) -CREATE TYPE itest_type AS (f1 integer, f2 text, f3 bigint); -CREATE TABLE itest12 OF itest_type (f1 WITH OPTIONS GENERATED ALWAYS AS IDENTITY); -- error -ERROR: identity columns are not supported on typed tables -DROP TYPE itest_type CASCADE; --- table partitions (currently not supported) -CREATE TABLE itest_parent (f1 date NOT NULL, f2 text, f3 bigint) PARTITION BY RANGE (f1); -CREATE TABLE itest_child PARTITION OF itest_parent ( - f3 WITH OPTIONS GENERATED ALWAYS AS IDENTITY -) FOR VALUES FROM ('2016-07-01') TO ('2016-08-01'); -- error -ERROR: identity columns are not supported on partitions -DROP TABLE itest_parent; --- test that sequence of half-dropped serial column is properly ignored -CREATE TABLE itest14 (id serial); -ALTER TABLE itest14 ALTER id DROP DEFAULT; -ALTER TABLE itest14 ALTER id ADD GENERATED BY DEFAULT AS IDENTITY; -INSERT INTO itest14 (id) VALUES (DEFAULT); --- Identity columns must be NOT NULL (cf bug #16913) -CREATE TABLE itest15 (id integer GENERATED ALWAYS AS IDENTITY NULL); -- fail -ERROR: conflicting NULL/NOT NULL declarations for column "id" of table "itest15" -LINE 1: ...ABLE itest15 (id integer GENERATED ALWAYS AS IDENTITY NULL); - ^ -CREATE TABLE itest15 (id integer NULL GENERATED ALWAYS AS IDENTITY); -- fail -ERROR: conflicting NULL/NOT NULL declarations for column "id" of table "itest15" -LINE 1: CREATE TABLE itest15 (id integer NULL GENERATED ALWAYS AS ID... - ^ -CREATE TABLE itest15 (id integer GENERATED ALWAYS AS IDENTITY NOT NULL); -DROP TABLE itest15; -CREATE TABLE itest15 (id integer NOT NULL GENERATED ALWAYS AS IDENTITY); -DROP TABLE itest15; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/generated.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/generated.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/generated.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/generated.out 2023-02-20 19:46:22.419212591 -0500 @@ -1,1065 +1 @@ --- sanity check of system catalog -SELECT attrelid, attname, attgenerated FROM pg_attribute WHERE attgenerated NOT IN ('', 's'); - attrelid | attname | attgenerated -----------+---------+-------------- -(0 rows) - -CREATE TABLE gtest0 (a int PRIMARY KEY, b int GENERATED ALWAYS AS (55) STORED); -CREATE TABLE gtest1 (a int PRIMARY KEY, b int GENERATED ALWAYS AS (a * 2) STORED); -SELECT table_name, column_name, column_default, is_nullable, is_generated, generation_expression FROM information_schema.columns WHERE table_name LIKE 'gtest_' ORDER BY 1, 2; - table_name | column_name | column_default | is_nullable | is_generated | generation_expression -------------+-------------+----------------+-------------+--------------+----------------------- - gtest0 | a | | NO | NEVER | - gtest0 | b | | YES | ALWAYS | 55 - gtest1 | a | | NO | NEVER | - gtest1 | b | | YES | ALWAYS | (a * 2) -(4 rows) - -SELECT table_name, column_name, dependent_column FROM information_schema.column_column_usage ORDER BY 1, 2, 3; - table_name | column_name | dependent_column -------------+-------------+------------------ - gtest1 | a | b -(1 row) - -\d gtest1 - Table "public.gtest1" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+------------------------------------ - a | integer | | not null | - b | integer | | | generated always as (a * 2) stored -Indexes: - "gtest1_pkey" PRIMARY KEY, btree (a) - --- duplicate generated -CREATE TABLE gtest_err_1 (a int PRIMARY KEY, b int GENERATED ALWAYS AS (a * 2) STORED GENERATED ALWAYS AS (a * 3) STORED); -ERROR: multiple generation clauses specified for column "b" of table "gtest_err_1" -LINE 1: ...ARY KEY, b int GENERATED ALWAYS AS (a * 2) STORED GENERATED ... - ^ --- references to other generated columns, including self-references -CREATE TABLE gtest_err_2a (a int PRIMARY KEY, b int GENERATED ALWAYS AS (b * 2) STORED); -ERROR: cannot use generated column "b" in column generation expression -LINE 1: ...2a (a int PRIMARY KEY, b int GENERATED ALWAYS AS (b * 2) STO... - ^ -DETAIL: A generated column cannot reference another generated column. -CREATE TABLE gtest_err_2b (a int PRIMARY KEY, b int GENERATED ALWAYS AS (a * 2) STORED, c int GENERATED ALWAYS AS (b * 3) STORED); -ERROR: cannot use generated column "b" in column generation expression -LINE 1: ...AYS AS (a * 2) STORED, c int GENERATED ALWAYS AS (b * 3) STO... - ^ -DETAIL: A generated column cannot reference another generated column. --- a whole-row var is a self-reference on steroids, so disallow that too -CREATE TABLE gtest_err_2c (a int PRIMARY KEY, - b int GENERATED ALWAYS AS (num_nulls(gtest_err_2c)) STORED); -ERROR: cannot use whole-row variable in column generation expression -LINE 2: b int GENERATED ALWAYS AS (num_nulls(gtest_err_2c)) STOR... - ^ -DETAIL: This would cause the generated column to depend on its own value. --- invalid reference -CREATE TABLE gtest_err_3 (a int PRIMARY KEY, b int GENERATED ALWAYS AS (c * 2) STORED); -ERROR: column "c" does not exist -LINE 1: ..._3 (a int PRIMARY KEY, b int GENERATED ALWAYS AS (c * 2) STO... - ^ --- generation expression must be immutable -CREATE TABLE gtest_err_4 (a int PRIMARY KEY, b double precision GENERATED ALWAYS AS (random()) STORED); -ERROR: generation expression is not immutable --- cannot have default/identity and generated -CREATE TABLE gtest_err_5a (a int PRIMARY KEY, b int DEFAULT 5 GENERATED ALWAYS AS (a * 2) STORED); -ERROR: both default and generation expression specified for column "b" of table "gtest_err_5a" -LINE 1: ... gtest_err_5a (a int PRIMARY KEY, b int DEFAULT 5 GENERATED ... - ^ -CREATE TABLE gtest_err_5b (a int PRIMARY KEY, b int GENERATED ALWAYS AS identity GENERATED ALWAYS AS (a * 2) STORED); -ERROR: both identity and generation expression specified for column "b" of table "gtest_err_5b" -LINE 1: ...t PRIMARY KEY, b int GENERATED ALWAYS AS identity GENERATED ... - ^ --- reference to system column not allowed in generated column --- (except tableoid, which we test below) -CREATE TABLE gtest_err_6a (a int PRIMARY KEY, b bool GENERATED ALWAYS AS (xmin <> 37) STORED); -ERROR: cannot use system column "xmin" in column generation expression -LINE 1: ...a (a int PRIMARY KEY, b bool GENERATED ALWAYS AS (xmin <> 37... - ^ --- various prohibited constructs -CREATE TABLE gtest_err_7a (a int PRIMARY KEY, b int GENERATED ALWAYS AS (avg(a)) STORED); -ERROR: aggregate functions are not allowed in column generation expressions -LINE 1: ...7a (a int PRIMARY KEY, b int GENERATED ALWAYS AS (avg(a)) ST... - ^ -CREATE TABLE gtest_err_7b (a int PRIMARY KEY, b int GENERATED ALWAYS AS (row_number() OVER (ORDER BY a)) STORED); -ERROR: window functions are not allowed in column generation expressions -LINE 1: ...7b (a int PRIMARY KEY, b int GENERATED ALWAYS AS (row_number... - ^ -CREATE TABLE gtest_err_7c (a int PRIMARY KEY, b int GENERATED ALWAYS AS ((SELECT a)) STORED); -ERROR: cannot use subquery in column generation expression -LINE 1: ...7c (a int PRIMARY KEY, b int GENERATED ALWAYS AS ((SELECT a)... - ^ -CREATE TABLE gtest_err_7d (a int PRIMARY KEY, b int GENERATED ALWAYS AS (generate_series(1, a)) STORED); -ERROR: set-returning functions are not allowed in column generation expressions -LINE 1: ...7d (a int PRIMARY KEY, b int GENERATED ALWAYS AS (generate_s... - ^ --- GENERATED BY DEFAULT not allowed -CREATE TABLE gtest_err_8 (a int PRIMARY KEY, b int GENERATED BY DEFAULT AS (a * 2) STORED); -ERROR: for a generated column, GENERATED ALWAYS must be specified -LINE 1: ...E gtest_err_8 (a int PRIMARY KEY, b int GENERATED BY DEFAULT... - ^ -INSERT INTO gtest1 VALUES (1); -INSERT INTO gtest1 VALUES (2, DEFAULT); -- ok -INSERT INTO gtest1 VALUES (3, 33); -- error -ERROR: cannot insert a non-DEFAULT value into column "b" -DETAIL: Column "b" is a generated column. -INSERT INTO gtest1 VALUES (3, 33), (4, 44); -- error -ERROR: cannot insert a non-DEFAULT value into column "b" -DETAIL: Column "b" is a generated column. -INSERT INTO gtest1 VALUES (3, DEFAULT), (4, 44); -- error -ERROR: cannot insert a non-DEFAULT value into column "b" -DETAIL: Column "b" is a generated column. -INSERT INTO gtest1 VALUES (3, 33), (4, DEFAULT); -- error -ERROR: cannot insert a non-DEFAULT value into column "b" -DETAIL: Column "b" is a generated column. -INSERT INTO gtest1 VALUES (3, DEFAULT), (4, DEFAULT); -- ok -SELECT * FROM gtest1 ORDER BY a; - a | b ----+--- - 1 | 2 - 2 | 4 - 3 | 6 - 4 | 8 -(4 rows) - -DELETE FROM gtest1 WHERE a >= 3; -UPDATE gtest1 SET b = DEFAULT WHERE a = 1; -UPDATE gtest1 SET b = 11 WHERE a = 1; -- error -ERROR: column "b" can only be updated to DEFAULT -DETAIL: Column "b" is a generated column. -SELECT * FROM gtest1 ORDER BY a; - a | b ----+--- - 1 | 2 - 2 | 4 -(2 rows) - -SELECT a, b, b * 2 AS b2 FROM gtest1 ORDER BY a; - a | b | b2 ----+---+---- - 1 | 2 | 4 - 2 | 4 | 8 -(2 rows) - -SELECT a, b FROM gtest1 WHERE b = 4 ORDER BY a; - a | b ----+--- - 2 | 4 -(1 row) - --- test that overflow error happens on write -INSERT INTO gtest1 VALUES (2000000000); -ERROR: integer out of range -SELECT * FROM gtest1; - a | b ----+--- - 2 | 4 - 1 | 2 -(2 rows) - -DELETE FROM gtest1 WHERE a = 2000000000; --- test with joins -CREATE TABLE gtestx (x int, y int); -INSERT INTO gtestx VALUES (11, 1), (22, 2), (33, 3); -SELECT * FROM gtestx, gtest1 WHERE gtestx.y = gtest1.a; - x | y | a | b -----+---+---+--- - 11 | 1 | 1 | 2 - 22 | 2 | 2 | 4 -(2 rows) - -DROP TABLE gtestx; --- test UPDATE/DELETE quals -SELECT * FROM gtest1 ORDER BY a; - a | b ----+--- - 1 | 2 - 2 | 4 -(2 rows) - -UPDATE gtest1 SET a = 3 WHERE b = 4; -SELECT * FROM gtest1 ORDER BY a; - a | b ----+--- - 1 | 2 - 3 | 6 -(2 rows) - -DELETE FROM gtest1 WHERE b = 2; -SELECT * FROM gtest1 ORDER BY a; - a | b ----+--- - 3 | 6 -(1 row) - --- views -CREATE VIEW gtest1v AS SELECT * FROM gtest1; -SELECT * FROM gtest1v; - a | b ----+--- - 3 | 6 -(1 row) - -INSERT INTO gtest1v VALUES (4, 8); -- error -ERROR: cannot insert a non-DEFAULT value into column "b" -DETAIL: Column "b" is a generated column. -INSERT INTO gtest1v VALUES (5, DEFAULT); -- ok -INSERT INTO gtest1v VALUES (6, 66), (7, 77); -- error -ERROR: cannot insert a non-DEFAULT value into column "b" -DETAIL: Column "b" is a generated column. -INSERT INTO gtest1v VALUES (6, DEFAULT), (7, 77); -- error -ERROR: cannot insert a non-DEFAULT value into column "b" -DETAIL: Column "b" is a generated column. -INSERT INTO gtest1v VALUES (6, 66), (7, DEFAULT); -- error -ERROR: cannot insert a non-DEFAULT value into column "b" -DETAIL: Column "b" is a generated column. -INSERT INTO gtest1v VALUES (6, DEFAULT), (7, DEFAULT); -- ok -ALTER VIEW gtest1v ALTER COLUMN b SET DEFAULT 100; -INSERT INTO gtest1v VALUES (8, DEFAULT); -- error -ERROR: cannot insert a non-DEFAULT value into column "b" -DETAIL: Column "b" is a generated column. -INSERT INTO gtest1v VALUES (8, DEFAULT), (9, DEFAULT); -- error -ERROR: cannot insert a non-DEFAULT value into column "b" -DETAIL: Column "b" is a generated column. -SELECT * FROM gtest1v; - a | b ----+---- - 3 | 6 - 5 | 10 - 6 | 12 - 7 | 14 -(4 rows) - -DELETE FROM gtest1v WHERE a >= 5; -DROP VIEW gtest1v; --- CTEs -WITH foo AS (SELECT * FROM gtest1) SELECT * FROM foo; - a | b ----+--- - 3 | 6 -(1 row) - --- inheritance -CREATE TABLE gtest1_1 () INHERITS (gtest1); -SELECT * FROM gtest1_1; - a | b ----+--- -(0 rows) - -\d gtest1_1 - Table "public.gtest1_1" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+------------------------------------ - a | integer | | not null | - b | integer | | | generated always as (a * 2) stored -Inherits: gtest1 - -INSERT INTO gtest1_1 VALUES (4); -SELECT * FROM gtest1_1; - a | b ----+--- - 4 | 8 -(1 row) - -SELECT * FROM gtest1; - a | b ----+--- - 3 | 6 - 4 | 8 -(2 rows) - -CREATE TABLE gtest_normal (a int, b int); -CREATE TABLE gtest_normal_child (a int, b int GENERATED ALWAYS AS (a * 2) STORED) INHERITS (gtest_normal); -NOTICE: merging column "a" with inherited definition -NOTICE: merging column "b" with inherited definition -\d gtest_normal_child - Table "public.gtest_normal_child" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+------------------------------------ - a | integer | | | - b | integer | | | generated always as (a * 2) stored -Inherits: gtest_normal - -INSERT INTO gtest_normal (a) VALUES (1); -INSERT INTO gtest_normal_child (a) VALUES (2); -SELECT * FROM gtest_normal; - a | b ----+--- - 1 | - 2 | 4 -(2 rows) - -CREATE TABLE gtest_normal_child2 (a int, b int GENERATED ALWAYS AS (a * 3) STORED); -ALTER TABLE gtest_normal_child2 INHERIT gtest_normal; -INSERT INTO gtest_normal_child2 (a) VALUES (3); -SELECT * FROM gtest_normal; - a | b ----+--- - 1 | - 2 | 4 - 3 | 9 -(3 rows) - --- test inheritance mismatches between parent and child -CREATE TABLE gtestx (x int, b int GENERATED ALWAYS AS (a * 22) STORED) INHERITS (gtest1); -- error -NOTICE: merging column "b" with inherited definition -ERROR: child column "b" specifies generation expression -HINT: Omit the generation expression in the definition of the child table column to inherit the generation expression from the parent table. -CREATE TABLE gtestx (x int, b int DEFAULT 10) INHERITS (gtest1); -- error -NOTICE: merging column "b" with inherited definition -ERROR: column "b" inherits from generated column but specifies default -CREATE TABLE gtestx (x int, b int GENERATED ALWAYS AS IDENTITY) INHERITS (gtest1); -- error -NOTICE: merging column "b" with inherited definition -ERROR: column "b" inherits from generated column but specifies identity -CREATE TABLE gtestxx_1 (a int NOT NULL, b int); -ALTER TABLE gtestxx_1 INHERIT gtest1; -- error -ERROR: column "b" in child table must be a generated column -CREATE TABLE gtestxx_2 (a int NOT NULL, b int GENERATED ALWAYS AS (a * 22) STORED); -ALTER TABLE gtestxx_2 INHERIT gtest1; -- error -ERROR: column "b" in child table has a conflicting generation expression -CREATE TABLE gtestxx_3 (a int NOT NULL, b int GENERATED ALWAYS AS (a * 2) STORED); -ALTER TABLE gtestxx_3 INHERIT gtest1; -- ok -CREATE TABLE gtestxx_4 (b int GENERATED ALWAYS AS (a * 2) STORED, a int NOT NULL); -ALTER TABLE gtestxx_4 INHERIT gtest1; -- ok --- test multiple inheritance mismatches -CREATE TABLE gtesty (x int, b int); -CREATE TABLE gtest1_2 () INHERITS (gtest1, gtesty); -- error -NOTICE: merging multiple inherited definitions of column "b" -ERROR: inherited column "b" has a generation conflict -DROP TABLE gtesty; -CREATE TABLE gtesty (x int, b int GENERATED ALWAYS AS (x * 22) STORED); -CREATE TABLE gtest1_2 () INHERITS (gtest1, gtesty); -- error -NOTICE: merging multiple inherited definitions of column "b" -ERROR: column "b" inherits conflicting generation expressions -DROP TABLE gtesty; -CREATE TABLE gtesty (x int, b int DEFAULT 55); -CREATE TABLE gtest1_2 () INHERITS (gtest0, gtesty); -- error -NOTICE: merging multiple inherited definitions of column "b" -ERROR: inherited column "b" has a generation conflict -DROP TABLE gtesty; --- test stored update -CREATE TABLE gtest3 (a int, b int GENERATED ALWAYS AS (a * 3) STORED); -INSERT INTO gtest3 (a) VALUES (1), (2), (3), (NULL); -SELECT * FROM gtest3 ORDER BY a; - a | b ----+--- - 1 | 3 - 2 | 6 - 3 | 9 - | -(4 rows) - -UPDATE gtest3 SET a = 22 WHERE a = 2; -SELECT * FROM gtest3 ORDER BY a; - a | b -----+---- - 1 | 3 - 3 | 9 - 22 | 66 - | -(4 rows) - -CREATE TABLE gtest3a (a text, b text GENERATED ALWAYS AS (a || '+' || a) STORED); -INSERT INTO gtest3a (a) VALUES ('a'), ('b'), ('c'), (NULL); -SELECT * FROM gtest3a ORDER BY a; - a | b ----+----- - a | a+a - b | b+b - c | c+c - | -(4 rows) - -UPDATE gtest3a SET a = 'bb' WHERE a = 'b'; -SELECT * FROM gtest3a ORDER BY a; - a | b -----+------- - a | a+a - bb | bb+bb - c | c+c - | -(4 rows) - --- COPY -TRUNCATE gtest1; -INSERT INTO gtest1 (a) VALUES (1), (2); -COPY gtest1 TO stdout; -1 -2 -COPY gtest1 (a, b) TO stdout; -ERROR: column "b" is a generated column -DETAIL: Generated columns cannot be used in COPY. -COPY gtest1 FROM stdin; -COPY gtest1 (a, b) FROM stdin; -ERROR: column "b" is a generated column -DETAIL: Generated columns cannot be used in COPY. -SELECT * FROM gtest1 ORDER BY a; - a | b ----+--- - 1 | 2 - 2 | 4 - 3 | 6 - 4 | 8 -(4 rows) - -TRUNCATE gtest3; -INSERT INTO gtest3 (a) VALUES (1), (2); -COPY gtest3 TO stdout; -1 -2 -COPY gtest3 (a, b) TO stdout; -ERROR: column "b" is a generated column -DETAIL: Generated columns cannot be used in COPY. -COPY gtest3 FROM stdin; -COPY gtest3 (a, b) FROM stdin; -ERROR: column "b" is a generated column -DETAIL: Generated columns cannot be used in COPY. -SELECT * FROM gtest3 ORDER BY a; - a | b ----+---- - 1 | 3 - 2 | 6 - 3 | 9 - 4 | 12 -(4 rows) - --- null values -CREATE TABLE gtest2 (a int PRIMARY KEY, b int GENERATED ALWAYS AS (NULL) STORED); -INSERT INTO gtest2 VALUES (1); -SELECT * FROM gtest2; - a | b ----+--- - 1 | -(1 row) - --- simple column reference for varlena types -CREATE TABLE gtest_varlena (a varchar, b varchar GENERATED ALWAYS AS (a) STORED); -INSERT INTO gtest_varlena (a) VALUES('01234567890123456789'); -INSERT INTO gtest_varlena (a) VALUES(NULL); -SELECT * FROM gtest_varlena ORDER BY a; - a | b -----------------------+---------------------- - 01234567890123456789 | 01234567890123456789 - | -(2 rows) - -DROP TABLE gtest_varlena; --- composite types -CREATE TYPE double_int as (a int, b int); -CREATE TABLE gtest4 ( - a int, - b double_int GENERATED ALWAYS AS ((a * 2, a * 3)) STORED -); -INSERT INTO gtest4 VALUES (1), (6); -SELECT * FROM gtest4; - a | b ----+--------- - 1 | (2,3) - 6 | (12,18) -(2 rows) - -DROP TABLE gtest4; -DROP TYPE double_int; --- using tableoid is allowed -CREATE TABLE gtest_tableoid ( - a int PRIMARY KEY, - b bool GENERATED ALWAYS AS (tableoid = 'gtest_tableoid'::regclass) STORED -); -INSERT INTO gtest_tableoid VALUES (1), (2); -ALTER TABLE gtest_tableoid ADD COLUMN - c regclass GENERATED ALWAYS AS (tableoid) STORED; -SELECT * FROM gtest_tableoid; - a | b | c ----+---+---------------- - 1 | t | gtest_tableoid - 2 | t | gtest_tableoid -(2 rows) - --- drop column behavior -CREATE TABLE gtest10 (a int PRIMARY KEY, b int, c int GENERATED ALWAYS AS (b * 2) STORED); -ALTER TABLE gtest10 DROP COLUMN b; -\d gtest10 - Table "public.gtest10" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | not null | -Indexes: - "gtest10_pkey" PRIMARY KEY, btree (a) - -CREATE TABLE gtest10a (a int PRIMARY KEY, b int GENERATED ALWAYS AS (a * 2) STORED); -ALTER TABLE gtest10a DROP COLUMN b; -INSERT INTO gtest10a (a) VALUES (1); --- privileges -CREATE USER regress_user11; -CREATE TABLE gtest11s (a int PRIMARY KEY, b int, c int GENERATED ALWAYS AS (b * 2) STORED); -INSERT INTO gtest11s VALUES (1, 10), (2, 20); -GRANT SELECT (a, c) ON gtest11s TO regress_user11; -CREATE FUNCTION gf1(a int) RETURNS int AS $$ SELECT a * 3 $$ IMMUTABLE LANGUAGE SQL; -REVOKE ALL ON FUNCTION gf1(int) FROM PUBLIC; -CREATE TABLE gtest12s (a int PRIMARY KEY, b int, c int GENERATED ALWAYS AS (gf1(b)) STORED); -INSERT INTO gtest12s VALUES (1, 10), (2, 20); -GRANT SELECT (a, c) ON gtest12s TO regress_user11; -SET ROLE regress_user11; -SELECT a, b FROM gtest11s; -- not allowed -ERROR: permission denied for table gtest11s -SELECT a, c FROM gtest11s; -- allowed - a | c ----+---- - 1 | 20 - 2 | 40 -(2 rows) - -SELECT gf1(10); -- not allowed -ERROR: permission denied for function gf1 -SELECT a, c FROM gtest12s; -- allowed - a | c ----+---- - 1 | 30 - 2 | 60 -(2 rows) - -RESET ROLE; -DROP TABLE gtest11s, gtest12s; -DROP FUNCTION gf1(int); -DROP USER regress_user11; --- check constraints -CREATE TABLE gtest20 (a int PRIMARY KEY, b int GENERATED ALWAYS AS (a * 2) STORED CHECK (b < 50)); -INSERT INTO gtest20 (a) VALUES (10); -- ok -INSERT INTO gtest20 (a) VALUES (30); -- violates constraint -ERROR: new row for relation "gtest20" violates check constraint "gtest20_b_check" -DETAIL: Failing row contains (30, 60). -CREATE TABLE gtest20a (a int PRIMARY KEY, b int GENERATED ALWAYS AS (a * 2) STORED); -INSERT INTO gtest20a (a) VALUES (10); -INSERT INTO gtest20a (a) VALUES (30); -ALTER TABLE gtest20a ADD CHECK (b < 50); -- fails on existing row -ERROR: check constraint "gtest20a_b_check" of relation "gtest20a" is violated by some row -CREATE TABLE gtest20b (a int PRIMARY KEY, b int GENERATED ALWAYS AS (a * 2) STORED); -INSERT INTO gtest20b (a) VALUES (10); -INSERT INTO gtest20b (a) VALUES (30); -ALTER TABLE gtest20b ADD CONSTRAINT chk CHECK (b < 50) NOT VALID; -ALTER TABLE gtest20b VALIDATE CONSTRAINT chk; -- fails on existing row -ERROR: check constraint "chk" of relation "gtest20b" is violated by some row --- not-null constraints -CREATE TABLE gtest21a (a int PRIMARY KEY, b int GENERATED ALWAYS AS (nullif(a, 0)) STORED NOT NULL); -INSERT INTO gtest21a (a) VALUES (1); -- ok -INSERT INTO gtest21a (a) VALUES (0); -- violates constraint -ERROR: null value in column "b" of relation "gtest21a" violates not-null constraint -DETAIL: Failing row contains (0, null). -CREATE TABLE gtest21b (a int PRIMARY KEY, b int GENERATED ALWAYS AS (nullif(a, 0)) STORED); -ALTER TABLE gtest21b ALTER COLUMN b SET NOT NULL; -INSERT INTO gtest21b (a) VALUES (1); -- ok -INSERT INTO gtest21b (a) VALUES (0); -- violates constraint -ERROR: null value in column "b" of relation "gtest21b" violates not-null constraint -DETAIL: Failing row contains (0, null). -ALTER TABLE gtest21b ALTER COLUMN b DROP NOT NULL; -INSERT INTO gtest21b (a) VALUES (0); -- ok now --- index constraints -CREATE TABLE gtest22a (a int PRIMARY KEY, b int GENERATED ALWAYS AS (a / 2) STORED UNIQUE); -INSERT INTO gtest22a VALUES (2); -INSERT INTO gtest22a VALUES (3); -ERROR: duplicate key value violates unique constraint "gtest22a_b_key" -DETAIL: Key (b)=(1) already exists. -INSERT INTO gtest22a VALUES (4); -CREATE TABLE gtest22b (a int, b int GENERATED ALWAYS AS (a / 2) STORED, PRIMARY KEY (a, b)); -INSERT INTO gtest22b VALUES (2); -INSERT INTO gtest22b VALUES (2); -ERROR: duplicate key value violates unique constraint "gtest22b_pkey" -DETAIL: Key (a, b)=(2, 1) already exists. --- indexes -CREATE TABLE gtest22c (a int, b int GENERATED ALWAYS AS (a * 2) STORED); -CREATE INDEX gtest22c_b_idx ON gtest22c (b); -CREATE INDEX gtest22c_expr_idx ON gtest22c ((b * 3)); -CREATE INDEX gtest22c_pred_idx ON gtest22c (a) WHERE b > 0; -\d gtest22c - Table "public.gtest22c" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+------------------------------------ - a | integer | | | - b | integer | | | generated always as (a * 2) stored -Indexes: - "gtest22c_b_idx" btree (b) - "gtest22c_expr_idx" btree ((b * 3)) - "gtest22c_pred_idx" btree (a) WHERE b > 0 - -INSERT INTO gtest22c VALUES (1), (2), (3); -SET enable_seqscan TO off; -SET enable_bitmapscan TO off; -EXPLAIN (COSTS OFF) SELECT * FROM gtest22c WHERE b = 4; - QUERY PLAN ---------------------------------------------- - Index Scan using gtest22c_b_idx on gtest22c - Index Cond: (b = 4) -(2 rows) - -SELECT * FROM gtest22c WHERE b = 4; - a | b ----+--- - 2 | 4 -(1 row) - -EXPLAIN (COSTS OFF) SELECT * FROM gtest22c WHERE b * 3 = 6; - QUERY PLAN ------------------------------------------------- - Index Scan using gtest22c_expr_idx on gtest22c - Index Cond: ((b * 3) = 6) -(2 rows) - -SELECT * FROM gtest22c WHERE b * 3 = 6; - a | b ----+--- - 1 | 2 -(1 row) - -EXPLAIN (COSTS OFF) SELECT * FROM gtest22c WHERE a = 1 AND b > 0; - QUERY PLAN ------------------------------------------------- - Index Scan using gtest22c_pred_idx on gtest22c - Index Cond: (a = 1) -(2 rows) - -SELECT * FROM gtest22c WHERE a = 1 AND b > 0; - a | b ----+--- - 1 | 2 -(1 row) - -RESET enable_seqscan; -RESET enable_bitmapscan; --- foreign keys -CREATE TABLE gtest23a (x int PRIMARY KEY, y int); -INSERT INTO gtest23a VALUES (1, 11), (2, 22), (3, 33); -CREATE TABLE gtest23x (a int PRIMARY KEY, b int GENERATED ALWAYS AS (a * 2) STORED REFERENCES gtest23a (x) ON UPDATE CASCADE); -- error -ERROR: invalid ON UPDATE action for foreign key constraint containing generated column -CREATE TABLE gtest23x (a int PRIMARY KEY, b int GENERATED ALWAYS AS (a * 2) STORED REFERENCES gtest23a (x) ON DELETE SET NULL); -- error -ERROR: invalid ON DELETE action for foreign key constraint containing generated column -CREATE TABLE gtest23b (a int PRIMARY KEY, b int GENERATED ALWAYS AS (a * 2) STORED REFERENCES gtest23a (x)); -\d gtest23b - Table "public.gtest23b" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+------------------------------------ - a | integer | | not null | - b | integer | | | generated always as (a * 2) stored -Indexes: - "gtest23b_pkey" PRIMARY KEY, btree (a) -Foreign-key constraints: - "gtest23b_b_fkey" FOREIGN KEY (b) REFERENCES gtest23a(x) - -INSERT INTO gtest23b VALUES (1); -- ok -INSERT INTO gtest23b VALUES (5); -- error -ERROR: insert or update on table "gtest23b" violates foreign key constraint "gtest23b_b_fkey" -DETAIL: Key (b)=(10) is not present in table "gtest23a". -DROP TABLE gtest23b; -DROP TABLE gtest23a; -CREATE TABLE gtest23p (x int, y int GENERATED ALWAYS AS (x * 2) STORED, PRIMARY KEY (y)); -INSERT INTO gtest23p VALUES (1), (2), (3); -CREATE TABLE gtest23q (a int PRIMARY KEY, b int REFERENCES gtest23p (y)); -INSERT INTO gtest23q VALUES (1, 2); -- ok -INSERT INTO gtest23q VALUES (2, 5); -- error -ERROR: insert or update on table "gtest23q" violates foreign key constraint "gtest23q_b_fkey" -DETAIL: Key (b)=(5) is not present in table "gtest23p". --- domains -CREATE DOMAIN gtestdomain1 AS int CHECK (VALUE < 10); -CREATE TABLE gtest24 (a int PRIMARY KEY, b gtestdomain1 GENERATED ALWAYS AS (a * 2) STORED); -INSERT INTO gtest24 (a) VALUES (4); -- ok -INSERT INTO gtest24 (a) VALUES (6); -- error -ERROR: value for domain gtestdomain1 violates check constraint "gtestdomain1_check" --- typed tables (currently not supported) -CREATE TYPE gtest_type AS (f1 integer, f2 text, f3 bigint); -CREATE TABLE gtest28 OF gtest_type (f1 WITH OPTIONS GENERATED ALWAYS AS (f2 *2) STORED); -ERROR: generated columns are not supported on typed tables -DROP TYPE gtest_type CASCADE; --- table partitions (currently not supported) -CREATE TABLE gtest_parent (f1 date NOT NULL, f2 text, f3 bigint) PARTITION BY RANGE (f1); -CREATE TABLE gtest_child PARTITION OF gtest_parent ( - f3 WITH OPTIONS GENERATED ALWAYS AS (f2 * 2) STORED -) FOR VALUES FROM ('2016-07-01') TO ('2016-08-01'); -- error -ERROR: generated columns are not supported on partitions -DROP TABLE gtest_parent; --- partitioned table -CREATE TABLE gtest_parent (f1 date NOT NULL, f2 bigint, f3 bigint GENERATED ALWAYS AS (f2 * 2) STORED) PARTITION BY RANGE (f1); -CREATE TABLE gtest_child PARTITION OF gtest_parent FOR VALUES FROM ('2016-07-01') TO ('2016-08-01'); -INSERT INTO gtest_parent (f1, f2) VALUES ('2016-07-15', 1); -SELECT * FROM gtest_parent; - f1 | f2 | f3 -------------+----+---- - 07-15-2016 | 1 | 2 -(1 row) - -SELECT * FROM gtest_child; - f1 | f2 | f3 -------------+----+---- - 07-15-2016 | 1 | 2 -(1 row) - -DROP TABLE gtest_parent; --- generated columns in partition key (not allowed) -CREATE TABLE gtest_parent (f1 date NOT NULL, f2 bigint, f3 bigint GENERATED ALWAYS AS (f2 * 2) STORED) PARTITION BY RANGE (f3); -ERROR: cannot use generated column in partition key -LINE 1: ...ENERATED ALWAYS AS (f2 * 2) STORED) PARTITION BY RANGE (f3); - ^ -DETAIL: Column "f3" is a generated column. -CREATE TABLE gtest_parent (f1 date NOT NULL, f2 bigint, f3 bigint GENERATED ALWAYS AS (f2 * 2) STORED) PARTITION BY RANGE ((f3 * 3)); -ERROR: cannot use generated column in partition key -LINE 1: ...ED ALWAYS AS (f2 * 2) STORED) PARTITION BY RANGE ((f3 * 3)); - ^ -DETAIL: Column "f3" is a generated column. --- ALTER TABLE ... ADD COLUMN -CREATE TABLE gtest25 (a int PRIMARY KEY); -INSERT INTO gtest25 VALUES (3), (4); -ALTER TABLE gtest25 ADD COLUMN b int GENERATED ALWAYS AS (a * 3) STORED; -SELECT * FROM gtest25 ORDER BY a; - a | b ----+---- - 3 | 9 - 4 | 12 -(2 rows) - -ALTER TABLE gtest25 ADD COLUMN x int GENERATED ALWAYS AS (b * 4) STORED; -- error -ERROR: cannot use generated column "b" in column generation expression -DETAIL: A generated column cannot reference another generated column. -ALTER TABLE gtest25 ADD COLUMN x int GENERATED ALWAYS AS (z * 4) STORED; -- error -ERROR: column "z" does not exist -ALTER TABLE gtest25 ADD COLUMN c int DEFAULT 42, - ADD COLUMN x int GENERATED ALWAYS AS (c * 4) STORED; -ALTER TABLE gtest25 ADD COLUMN d int DEFAULT 101; -ALTER TABLE gtest25 ALTER COLUMN d SET DATA TYPE float8, - ADD COLUMN y float8 GENERATED ALWAYS AS (d * 4) STORED; -SELECT * FROM gtest25 ORDER BY a; - a | b | c | x | d | y ----+----+----+-----+-----+----- - 3 | 9 | 42 | 168 | 101 | 404 - 4 | 12 | 42 | 168 | 101 | 404 -(2 rows) - -\d gtest25 - Table "public.gtest25" - Column | Type | Collation | Nullable | Default ---------+------------------+-----------+----------+------------------------------------------------------ - a | integer | | not null | - b | integer | | | generated always as (a * 3) stored - c | integer | | | 42 - x | integer | | | generated always as (c * 4) stored - d | double precision | | | 101 - y | double precision | | | generated always as (d * 4::double precision) stored -Indexes: - "gtest25_pkey" PRIMARY KEY, btree (a) - --- ALTER TABLE ... ALTER COLUMN -CREATE TABLE gtest27 ( - a int, - b int, - x int GENERATED ALWAYS AS ((a + b) * 2) STORED -); -INSERT INTO gtest27 (a, b) VALUES (3, 7), (4, 11); -ALTER TABLE gtest27 ALTER COLUMN a TYPE text; -- error -ERROR: cannot alter type of a column used by a generated column -DETAIL: Column "a" is used by generated column "x". -ALTER TABLE gtest27 ALTER COLUMN x TYPE numeric; -\d gtest27 - Table "public.gtest27" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+-------------------------------------------- - a | integer | | | - b | integer | | | - x | numeric | | | generated always as (((a + b) * 2)) stored - -SELECT * FROM gtest27; - a | b | x ----+----+---- - 3 | 7 | 20 - 4 | 11 | 30 -(2 rows) - -ALTER TABLE gtest27 ALTER COLUMN x TYPE boolean USING x <> 0; -- error -ERROR: generation expression for column "x" cannot be cast automatically to type boolean -ALTER TABLE gtest27 ALTER COLUMN x DROP DEFAULT; -- error -ERROR: column "x" of relation "gtest27" is a generated column -HINT: Use ALTER TABLE ... ALTER COLUMN ... DROP EXPRESSION instead. --- It's possible to alter the column types this way: -ALTER TABLE gtest27 - DROP COLUMN x, - ALTER COLUMN a TYPE bigint, - ALTER COLUMN b TYPE bigint, - ADD COLUMN x bigint GENERATED ALWAYS AS ((a + b) * 2) STORED; -\d gtest27 - Table "public.gtest27" - Column | Type | Collation | Nullable | Default ---------+--------+-----------+----------+------------------------------------------ - a | bigint | | | - b | bigint | | | - x | bigint | | | generated always as ((a + b) * 2) stored - --- Ideally you could just do this, but not today (and should x change type?): -ALTER TABLE gtest27 - ALTER COLUMN a TYPE float8, - ALTER COLUMN b TYPE float8; -- error -ERROR: cannot alter type of a column used by a generated column -DETAIL: Column "a" is used by generated column "x". -\d gtest27 - Table "public.gtest27" - Column | Type | Collation | Nullable | Default ---------+--------+-----------+----------+------------------------------------------ - a | bigint | | | - b | bigint | | | - x | bigint | | | generated always as ((a + b) * 2) stored - -SELECT * FROM gtest27; - a | b | x ----+----+---- - 3 | 7 | 20 - 4 | 11 | 30 -(2 rows) - --- ALTER TABLE ... ALTER COLUMN ... DROP EXPRESSION -CREATE TABLE gtest29 ( - a int, - b int GENERATED ALWAYS AS (a * 2) STORED -); -INSERT INTO gtest29 (a) VALUES (3), (4); -ALTER TABLE gtest29 ALTER COLUMN a DROP EXPRESSION; -- error -ERROR: column "a" of relation "gtest29" is not a stored generated column -ALTER TABLE gtest29 ALTER COLUMN a DROP EXPRESSION IF EXISTS; -- notice -NOTICE: column "a" of relation "gtest29" is not a stored generated column, skipping -ALTER TABLE gtest29 ALTER COLUMN b DROP EXPRESSION; -INSERT INTO gtest29 (a) VALUES (5); -INSERT INTO gtest29 (a, b) VALUES (6, 66); -SELECT * FROM gtest29; - a | b ----+---- - 3 | 6 - 4 | 8 - 5 | - 6 | 66 -(4 rows) - -\d gtest29 - Table "public.gtest29" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | - b | integer | | | - --- check that dependencies between columns have also been removed -ALTER TABLE gtest29 DROP COLUMN a; -- should not drop b -\d gtest29 - Table "public.gtest29" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - b | integer | | | - --- with inheritance -CREATE TABLE gtest30 ( - a int, - b int GENERATED ALWAYS AS (a * 2) STORED -); -CREATE TABLE gtest30_1 () INHERITS (gtest30); -ALTER TABLE gtest30 ALTER COLUMN b DROP EXPRESSION; -\d gtest30 - Table "public.gtest30" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | - b | integer | | | -Number of child tables: 1 (Use \d+ to list them.) - -\d gtest30_1 - Table "public.gtest30_1" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | - b | integer | | | -Inherits: gtest30 - -DROP TABLE gtest30 CASCADE; -NOTICE: drop cascades to table gtest30_1 -CREATE TABLE gtest30 ( - a int, - b int GENERATED ALWAYS AS (a * 2) STORED -); -CREATE TABLE gtest30_1 () INHERITS (gtest30); -ALTER TABLE ONLY gtest30 ALTER COLUMN b DROP EXPRESSION; -- error -ERROR: ALTER TABLE / DROP EXPRESSION must be applied to child tables too -\d gtest30 - Table "public.gtest30" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+------------------------------------ - a | integer | | | - b | integer | | | generated always as (a * 2) stored -Number of child tables: 1 (Use \d+ to list them.) - -\d gtest30_1 - Table "public.gtest30_1" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+------------------------------------ - a | integer | | | - b | integer | | | generated always as (a * 2) stored -Inherits: gtest30 - -ALTER TABLE gtest30_1 ALTER COLUMN b DROP EXPRESSION; -- error -ERROR: cannot drop generation expression from inherited column --- triggers -CREATE TABLE gtest26 ( - a int PRIMARY KEY, - b int GENERATED ALWAYS AS (a * 2) STORED -); -CREATE FUNCTION gtest_trigger_func() RETURNS trigger - LANGUAGE plpgsql -AS $$ -BEGIN - IF tg_op IN ('DELETE', 'UPDATE') THEN - RAISE INFO '%: %: old = %', TG_NAME, TG_WHEN, OLD; - END IF; - IF tg_op IN ('INSERT', 'UPDATE') THEN - RAISE INFO '%: %: new = %', TG_NAME, TG_WHEN, NEW; - END IF; - IF tg_op = 'DELETE' THEN - RETURN OLD; - ELSE - RETURN NEW; - END IF; -END -$$; -CREATE TRIGGER gtest1 BEFORE DELETE OR UPDATE ON gtest26 - FOR EACH ROW - WHEN (OLD.b < 0) -- ok - EXECUTE PROCEDURE gtest_trigger_func(); -CREATE TRIGGER gtest2a BEFORE INSERT OR UPDATE ON gtest26 - FOR EACH ROW - WHEN (NEW.b < 0) -- error - EXECUTE PROCEDURE gtest_trigger_func(); -ERROR: BEFORE trigger's WHEN condition cannot reference NEW generated columns -LINE 3: WHEN (NEW.b < 0) - ^ -DETAIL: Column "b" is a generated column. -CREATE TRIGGER gtest2b BEFORE INSERT OR UPDATE ON gtest26 - FOR EACH ROW - WHEN (NEW.* IS NOT NULL) -- error - EXECUTE PROCEDURE gtest_trigger_func(); -ERROR: BEFORE trigger's WHEN condition cannot reference NEW generated columns -LINE 3: WHEN (NEW.* IS NOT NULL) - ^ -DETAIL: A whole-row reference is used and the table contains generated columns. -CREATE TRIGGER gtest2 BEFORE INSERT ON gtest26 - FOR EACH ROW - WHEN (NEW.a < 0) - EXECUTE PROCEDURE gtest_trigger_func(); -CREATE TRIGGER gtest3 AFTER DELETE OR UPDATE ON gtest26 - FOR EACH ROW - WHEN (OLD.b < 0) -- ok - EXECUTE PROCEDURE gtest_trigger_func(); -CREATE TRIGGER gtest4 AFTER INSERT OR UPDATE ON gtest26 - FOR EACH ROW - WHEN (NEW.b < 0) -- ok - EXECUTE PROCEDURE gtest_trigger_func(); -INSERT INTO gtest26 (a) VALUES (-2), (0), (3); -INFO: gtest2: BEFORE: new = (-2,) -INFO: gtest4: AFTER: new = (-2,-4) -SELECT * FROM gtest26 ORDER BY a; - a | b -----+---- - -2 | -4 - 0 | 0 - 3 | 6 -(3 rows) - -UPDATE gtest26 SET a = a * -2; -INFO: gtest1: BEFORE: old = (-2,-4) -INFO: gtest1: BEFORE: new = (4,) -INFO: gtest3: AFTER: old = (-2,-4) -INFO: gtest3: AFTER: new = (4,8) -INFO: gtest4: AFTER: old = (3,6) -INFO: gtest4: AFTER: new = (-6,-12) -SELECT * FROM gtest26 ORDER BY a; - a | b -----+----- - -6 | -12 - 0 | 0 - 4 | 8 -(3 rows) - -DELETE FROM gtest26 WHERE a = -6; -INFO: gtest1: BEFORE: old = (-6,-12) -INFO: gtest3: AFTER: old = (-6,-12) -SELECT * FROM gtest26 ORDER BY a; - a | b ----+--- - 0 | 0 - 4 | 8 -(2 rows) - -DROP TRIGGER gtest1 ON gtest26; -DROP TRIGGER gtest2 ON gtest26; -DROP TRIGGER gtest3 ON gtest26; --- Check that an UPDATE of "a" fires the trigger for UPDATE OF b, per --- SQL standard. -CREATE FUNCTION gtest_trigger_func3() RETURNS trigger - LANGUAGE plpgsql -AS $$ -BEGIN - RAISE NOTICE 'OK'; - RETURN NEW; -END -$$; -CREATE TRIGGER gtest11 BEFORE UPDATE OF b ON gtest26 - FOR EACH ROW - EXECUTE PROCEDURE gtest_trigger_func3(); -UPDATE gtest26 SET a = 1 WHERE a = 0; -NOTICE: OK -DROP TRIGGER gtest11 ON gtest26; -TRUNCATE gtest26; --- check that modifications of stored generated columns in triggers do --- not get propagated -CREATE FUNCTION gtest_trigger_func4() RETURNS trigger - LANGUAGE plpgsql -AS $$ -BEGIN - NEW.a = 10; - NEW.b = 300; - RETURN NEW; -END; -$$; -CREATE TRIGGER gtest12_01 BEFORE UPDATE ON gtest26 - FOR EACH ROW - EXECUTE PROCEDURE gtest_trigger_func(); -CREATE TRIGGER gtest12_02 BEFORE UPDATE ON gtest26 - FOR EACH ROW - EXECUTE PROCEDURE gtest_trigger_func4(); -CREATE TRIGGER gtest12_03 BEFORE UPDATE ON gtest26 - FOR EACH ROW - EXECUTE PROCEDURE gtest_trigger_func(); -INSERT INTO gtest26 (a) VALUES (1); -UPDATE gtest26 SET a = 11 WHERE a = 1; -INFO: gtest12_01: BEFORE: old = (1,2) -INFO: gtest12_01: BEFORE: new = (11,) -INFO: gtest12_03: BEFORE: old = (1,2) -INFO: gtest12_03: BEFORE: new = (10,) -SELECT * FROM gtest26 ORDER BY a; - a | b -----+---- - 10 | 20 -(1 row) - --- LIKE INCLUDING GENERATED and dropped column handling -CREATE TABLE gtest28a ( - a int, - b int, - c int, - x int GENERATED ALWAYS AS (b * 2) STORED -); -ALTER TABLE gtest28a DROP COLUMN a; -CREATE TABLE gtest28b (LIKE gtest28a INCLUDING GENERATED); -\d gtest28* - Table "public.gtest28a" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+------------------------------------ - b | integer | | | - c | integer | | | - x | integer | | | generated always as (b * 2) stored - - Table "public.gtest28b" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+------------------------------------ - b | integer | | | - c | integer | | | - x | integer | | | generated always as (b * 2) stored - +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/join_hash.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/join_hash.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/join_hash.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/join_hash.out 2023-02-20 19:46:22.429212592 -0500 @@ -1,1015 +1 @@ --- --- exercises for the hash join code --- -begin; -set local min_parallel_table_scan_size = 0; -set local parallel_setup_cost = 0; -set local enable_hashjoin = on; --- Extract bucket and batch counts from an explain analyze plan. In --- general we can't make assertions about how many batches (or --- buckets) will be required because it can vary, but we can in some --- special cases and we can check for growth. -create or replace function find_hash(node json) -returns json language plpgsql -as -$$ -declare - x json; - child json; -begin - if node->>'Node Type' = 'Hash' then - return node; - else - for child in select json_array_elements(node->'Plans') - loop - x := find_hash(child); - if x is not null then - return x; - end if; - end loop; - return null; - end if; -end; -$$; -create or replace function hash_join_batches(query text) -returns table (original int, final int) language plpgsql -as -$$ -declare - whole_plan json; - hash_node json; -begin - for whole_plan in - execute 'explain (analyze, format ''json'') ' || query - loop - hash_node := find_hash(json_extract_path(whole_plan, '0', 'Plan')); - original := hash_node->>'Original Hash Batches'; - final := hash_node->>'Hash Batches'; - return next; - end loop; -end; -$$; --- Make a simple relation with well distributed keys and correctly --- estimated size. -create table simple as - select generate_series(1, 20000) AS id, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'; -alter table simple set (parallel_workers = 2); -analyze simple; --- Make a relation whose size we will under-estimate. We want stats --- to say 1000 rows, but actually there are 20,000 rows. -create table bigger_than_it_looks as - select generate_series(1, 20000) as id, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'; -alter table bigger_than_it_looks set (autovacuum_enabled = 'false'); -alter table bigger_than_it_looks set (parallel_workers = 2); -analyze bigger_than_it_looks; -update pg_class set reltuples = 1000 where relname = 'bigger_than_it_looks'; --- Make a relation whose size we underestimate and that also has a --- kind of skew that breaks our batching scheme. We want stats to say --- 2 rows, but actually there are 20,000 rows with the same key. -create table extremely_skewed (id int, t text); -alter table extremely_skewed set (autovacuum_enabled = 'false'); -alter table extremely_skewed set (parallel_workers = 2); -analyze extremely_skewed; -insert into extremely_skewed - select 42 as id, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' - from generate_series(1, 20000); -update pg_class - set reltuples = 2, relpages = pg_relation_size('extremely_skewed') / 8192 - where relname = 'extremely_skewed'; --- Make a relation with a couple of enormous tuples. -create table wide as select generate_series(1, 2) as id, rpad('', 320000, 'x') as t; -alter table wide set (parallel_workers = 2); --- The "optimal" case: the hash table fits in memory; we plan for 1 --- batch, we stick to that number, and peak memory usage stays within --- our work_mem budget --- non-parallel -savepoint settings; -set local max_parallel_workers_per_gather = 0; -set local work_mem = '4MB'; -explain (costs off) - select count(*) from simple r join simple s using (id); - QUERY PLAN ----------------------------------------- - Aggregate - -> Hash Join - Hash Cond: (r.id = s.id) - -> Seq Scan on simple r - -> Hash - -> Seq Scan on simple s -(6 rows) - -select count(*) from simple r join simple s using (id); - count -------- - 20000 -(1 row) - -select original > 1 as initially_multibatch, final > original as increased_batches - from hash_join_batches( -$$ - select count(*) from simple r join simple s using (id); -$$); - initially_multibatch | increased_batches -----------------------+------------------- - f | f -(1 row) - -rollback to settings; --- parallel with parallel-oblivious hash join -savepoint settings; -set local max_parallel_workers_per_gather = 2; -set local work_mem = '4MB'; -set local enable_parallel_hash = off; -explain (costs off) - select count(*) from simple r join simple s using (id); - QUERY PLAN -------------------------------------------------------- - Finalize Aggregate - -> Gather - Workers Planned: 2 - -> Partial Aggregate - -> Hash Join - Hash Cond: (r.id = s.id) - -> Parallel Seq Scan on simple r - -> Hash - -> Seq Scan on simple s -(9 rows) - -select count(*) from simple r join simple s using (id); - count -------- - 20000 -(1 row) - -select original > 1 as initially_multibatch, final > original as increased_batches - from hash_join_batches( -$$ - select count(*) from simple r join simple s using (id); -$$); - initially_multibatch | increased_batches -----------------------+------------------- - f | f -(1 row) - -rollback to settings; --- parallel with parallel-aware hash join -savepoint settings; -set local max_parallel_workers_per_gather = 2; -set local work_mem = '4MB'; -set local enable_parallel_hash = on; -explain (costs off) - select count(*) from simple r join simple s using (id); - QUERY PLAN -------------------------------------------------------------- - Finalize Aggregate - -> Gather - Workers Planned: 2 - -> Partial Aggregate - -> Parallel Hash Join - Hash Cond: (r.id = s.id) - -> Parallel Seq Scan on simple r - -> Parallel Hash - -> Parallel Seq Scan on simple s -(9 rows) - -select count(*) from simple r join simple s using (id); - count -------- - 20000 -(1 row) - -select original > 1 as initially_multibatch, final > original as increased_batches - from hash_join_batches( -$$ - select count(*) from simple r join simple s using (id); -$$); - initially_multibatch | increased_batches -----------------------+------------------- - f | f -(1 row) - -rollback to settings; --- The "good" case: batches required, but we plan the right number; we --- plan for some number of batches, and we stick to that number, and --- peak memory usage says within our work_mem budget --- non-parallel -savepoint settings; -set local max_parallel_workers_per_gather = 0; -set local work_mem = '128kB'; -explain (costs off) - select count(*) from simple r join simple s using (id); - QUERY PLAN ----------------------------------------- - Aggregate - -> Hash Join - Hash Cond: (r.id = s.id) - -> Seq Scan on simple r - -> Hash - -> Seq Scan on simple s -(6 rows) - -select count(*) from simple r join simple s using (id); - count -------- - 20000 -(1 row) - -select original > 1 as initially_multibatch, final > original as increased_batches - from hash_join_batches( -$$ - select count(*) from simple r join simple s using (id); -$$); - initially_multibatch | increased_batches -----------------------+------------------- - t | f -(1 row) - -rollback to settings; --- parallel with parallel-oblivious hash join -savepoint settings; -set local max_parallel_workers_per_gather = 2; -set local work_mem = '128kB'; -set local enable_parallel_hash = off; -explain (costs off) - select count(*) from simple r join simple s using (id); - QUERY PLAN -------------------------------------------------------- - Finalize Aggregate - -> Gather - Workers Planned: 2 - -> Partial Aggregate - -> Hash Join - Hash Cond: (r.id = s.id) - -> Parallel Seq Scan on simple r - -> Hash - -> Seq Scan on simple s -(9 rows) - -select count(*) from simple r join simple s using (id); - count -------- - 20000 -(1 row) - -select original > 1 as initially_multibatch, final > original as increased_batches - from hash_join_batches( -$$ - select count(*) from simple r join simple s using (id); -$$); - initially_multibatch | increased_batches -----------------------+------------------- - t | f -(1 row) - -rollback to settings; --- parallel with parallel-aware hash join -savepoint settings; -set local max_parallel_workers_per_gather = 2; -set local work_mem = '192kB'; -set local enable_parallel_hash = on; -explain (costs off) - select count(*) from simple r join simple s using (id); - QUERY PLAN -------------------------------------------------------------- - Finalize Aggregate - -> Gather - Workers Planned: 2 - -> Partial Aggregate - -> Parallel Hash Join - Hash Cond: (r.id = s.id) - -> Parallel Seq Scan on simple r - -> Parallel Hash - -> Parallel Seq Scan on simple s -(9 rows) - -select count(*) from simple r join simple s using (id); - count -------- - 20000 -(1 row) - -select original > 1 as initially_multibatch, final > original as increased_batches - from hash_join_batches( -$$ - select count(*) from simple r join simple s using (id); -$$); - initially_multibatch | increased_batches -----------------------+------------------- - t | f -(1 row) - -rollback to settings; --- The "bad" case: during execution we need to increase number of --- batches; in this case we plan for 1 batch, and increase at least a --- couple of times, and peak memory usage stays within our work_mem --- budget --- non-parallel -savepoint settings; -set local max_parallel_workers_per_gather = 0; -set local work_mem = '128kB'; -explain (costs off) - select count(*) FROM simple r JOIN bigger_than_it_looks s USING (id); - QUERY PLAN ------------------------------------------------------- - Aggregate - -> Hash Join - Hash Cond: (r.id = s.id) - -> Seq Scan on simple r - -> Hash - -> Seq Scan on bigger_than_it_looks s -(6 rows) - -select count(*) FROM simple r JOIN bigger_than_it_looks s USING (id); - count -------- - 20000 -(1 row) - -select original > 1 as initially_multibatch, final > original as increased_batches - from hash_join_batches( -$$ - select count(*) FROM simple r JOIN bigger_than_it_looks s USING (id); -$$); - initially_multibatch | increased_batches -----------------------+------------------- - f | t -(1 row) - -rollback to settings; --- parallel with parallel-oblivious hash join -savepoint settings; -set local max_parallel_workers_per_gather = 2; -set local work_mem = '128kB'; -set local enable_parallel_hash = off; -explain (costs off) - select count(*) from simple r join bigger_than_it_looks s using (id); - QUERY PLAN ------------------------------------------------------------------- - Finalize Aggregate - -> Gather - Workers Planned: 2 - -> Partial Aggregate - -> Hash Join - Hash Cond: (r.id = s.id) - -> Parallel Seq Scan on simple r - -> Hash - -> Seq Scan on bigger_than_it_looks s -(9 rows) - -select count(*) from simple r join bigger_than_it_looks s using (id); - count -------- - 20000 -(1 row) - -select original > 1 as initially_multibatch, final > original as increased_batches - from hash_join_batches( -$$ - select count(*) from simple r join bigger_than_it_looks s using (id); -$$); - initially_multibatch | increased_batches -----------------------+------------------- - f | t -(1 row) - -rollback to settings; --- parallel with parallel-aware hash join -savepoint settings; -set local max_parallel_workers_per_gather = 1; -set local work_mem = '192kB'; -set local enable_parallel_hash = on; -explain (costs off) - select count(*) from simple r join bigger_than_it_looks s using (id); - QUERY PLAN ---------------------------------------------------------------------------- - Finalize Aggregate - -> Gather - Workers Planned: 1 - -> Partial Aggregate - -> Parallel Hash Join - Hash Cond: (r.id = s.id) - -> Parallel Seq Scan on simple r - -> Parallel Hash - -> Parallel Seq Scan on bigger_than_it_looks s -(9 rows) - -select count(*) from simple r join bigger_than_it_looks s using (id); - count -------- - 20000 -(1 row) - -select original > 1 as initially_multibatch, final > original as increased_batches - from hash_join_batches( -$$ - select count(*) from simple r join bigger_than_it_looks s using (id); -$$); - initially_multibatch | increased_batches -----------------------+------------------- - f | t -(1 row) - -rollback to settings; --- The "ugly" case: increasing the number of batches during execution --- doesn't help, so stop trying to fit in work_mem and hope for the --- best; in this case we plan for 1 batch, increases just once and --- then stop increasing because that didn't help at all, so we blow --- right through the work_mem budget and hope for the best... --- non-parallel -savepoint settings; -set local max_parallel_workers_per_gather = 0; -set local work_mem = '128kB'; -explain (costs off) - select count(*) from simple r join extremely_skewed s using (id); - QUERY PLAN --------------------------------------------------- - Aggregate - -> Hash Join - Hash Cond: (r.id = s.id) - -> Seq Scan on simple r - -> Hash - -> Seq Scan on extremely_skewed s -(6 rows) - -select count(*) from simple r join extremely_skewed s using (id); - count -------- - 20000 -(1 row) - -select * from hash_join_batches( -$$ - select count(*) from simple r join extremely_skewed s using (id); -$$); - original | final -----------+------- - 1 | 2 -(1 row) - -rollback to settings; --- parallel with parallel-oblivious hash join -savepoint settings; -set local max_parallel_workers_per_gather = 2; -set local work_mem = '128kB'; -set local enable_parallel_hash = off; -explain (costs off) - select count(*) from simple r join extremely_skewed s using (id); - QUERY PLAN --------------------------------------------------------- - Aggregate - -> Gather - Workers Planned: 2 - -> Hash Join - Hash Cond: (r.id = s.id) - -> Parallel Seq Scan on simple r - -> Hash - -> Seq Scan on extremely_skewed s -(8 rows) - -select count(*) from simple r join extremely_skewed s using (id); - count -------- - 20000 -(1 row) - -select * from hash_join_batches( -$$ - select count(*) from simple r join extremely_skewed s using (id); -$$); - original | final -----------+------- - 1 | 2 -(1 row) - -rollback to settings; --- parallel with parallel-aware hash join -savepoint settings; -set local max_parallel_workers_per_gather = 1; -set local work_mem = '128kB'; -set local enable_parallel_hash = on; -explain (costs off) - select count(*) from simple r join extremely_skewed s using (id); - QUERY PLAN ------------------------------------------------------------------------ - Finalize Aggregate - -> Gather - Workers Planned: 1 - -> Partial Aggregate - -> Parallel Hash Join - Hash Cond: (r.id = s.id) - -> Parallel Seq Scan on simple r - -> Parallel Hash - -> Parallel Seq Scan on extremely_skewed s -(9 rows) - -select count(*) from simple r join extremely_skewed s using (id); - count -------- - 20000 -(1 row) - -select * from hash_join_batches( -$$ - select count(*) from simple r join extremely_skewed s using (id); -$$); - original | final -----------+------- - 1 | 4 -(1 row) - -rollback to settings; --- A couple of other hash join tests unrelated to work_mem management. --- Check that EXPLAIN ANALYZE has data even if the leader doesn't participate -savepoint settings; -set local max_parallel_workers_per_gather = 2; -set local work_mem = '4MB'; -set local parallel_leader_participation = off; -select * from hash_join_batches( -$$ - select count(*) from simple r join simple s using (id); -$$); - original | final -----------+------- - 1 | 1 -(1 row) - -rollback to settings; --- Exercise rescans. We'll turn off parallel_leader_participation so --- that we can check that instrumentation comes back correctly. -create table join_foo as select generate_series(1, 3) as id, 'xxxxx'::text as t; -alter table join_foo set (parallel_workers = 0); -create table join_bar as select generate_series(1, 10000) as id, 'xxxxx'::text as t; -alter table join_bar set (parallel_workers = 2); --- multi-batch with rescan, parallel-oblivious -savepoint settings; -set enable_parallel_hash = off; -set parallel_leader_participation = off; -set min_parallel_table_scan_size = 0; -set parallel_setup_cost = 0; -set parallel_tuple_cost = 0; -set max_parallel_workers_per_gather = 2; -set enable_material = off; -set enable_mergejoin = off; -set work_mem = '64kB'; -explain (costs off) - select count(*) from join_foo - left join (select b1.id, b1.t from join_bar b1 join join_bar b2 using (id)) ss - on join_foo.id < ss.id + 1 and join_foo.id > ss.id - 1; - QUERY PLAN ------------------------------------------------------------------------------------- - Aggregate - -> Nested Loop Left Join - Join Filter: ((join_foo.id < (b1.id + 1)) AND (join_foo.id > (b1.id - 1))) - -> Seq Scan on join_foo - -> Gather - Workers Planned: 2 - -> Hash Join - Hash Cond: (b1.id = b2.id) - -> Parallel Seq Scan on join_bar b1 - -> Hash - -> Seq Scan on join_bar b2 -(11 rows) - -select count(*) from join_foo - left join (select b1.id, b1.t from join_bar b1 join join_bar b2 using (id)) ss - on join_foo.id < ss.id + 1 and join_foo.id > ss.id - 1; - count -------- - 3 -(1 row) - -select final > 1 as multibatch - from hash_join_batches( -$$ - select count(*) from join_foo - left join (select b1.id, b1.t from join_bar b1 join join_bar b2 using (id)) ss - on join_foo.id < ss.id + 1 and join_foo.id > ss.id - 1; -$$); - multibatch ------------- - t -(1 row) - -rollback to settings; --- single-batch with rescan, parallel-oblivious -savepoint settings; -set enable_parallel_hash = off; -set parallel_leader_participation = off; -set min_parallel_table_scan_size = 0; -set parallel_setup_cost = 0; -set parallel_tuple_cost = 0; -set max_parallel_workers_per_gather = 2; -set enable_material = off; -set enable_mergejoin = off; -set work_mem = '4MB'; -explain (costs off) - select count(*) from join_foo - left join (select b1.id, b1.t from join_bar b1 join join_bar b2 using (id)) ss - on join_foo.id < ss.id + 1 and join_foo.id > ss.id - 1; - QUERY PLAN ------------------------------------------------------------------------------------- - Aggregate - -> Nested Loop Left Join - Join Filter: ((join_foo.id < (b1.id + 1)) AND (join_foo.id > (b1.id - 1))) - -> Seq Scan on join_foo - -> Gather - Workers Planned: 2 - -> Hash Join - Hash Cond: (b1.id = b2.id) - -> Parallel Seq Scan on join_bar b1 - -> Hash - -> Seq Scan on join_bar b2 -(11 rows) - -select count(*) from join_foo - left join (select b1.id, b1.t from join_bar b1 join join_bar b2 using (id)) ss - on join_foo.id < ss.id + 1 and join_foo.id > ss.id - 1; - count -------- - 3 -(1 row) - -select final > 1 as multibatch - from hash_join_batches( -$$ - select count(*) from join_foo - left join (select b1.id, b1.t from join_bar b1 join join_bar b2 using (id)) ss - on join_foo.id < ss.id + 1 and join_foo.id > ss.id - 1; -$$); - multibatch ------------- - f -(1 row) - -rollback to settings; --- multi-batch with rescan, parallel-aware -savepoint settings; -set enable_parallel_hash = on; -set parallel_leader_participation = off; -set min_parallel_table_scan_size = 0; -set parallel_setup_cost = 0; -set parallel_tuple_cost = 0; -set max_parallel_workers_per_gather = 2; -set enable_material = off; -set enable_mergejoin = off; -set work_mem = '64kB'; -explain (costs off) - select count(*) from join_foo - left join (select b1.id, b1.t from join_bar b1 join join_bar b2 using (id)) ss - on join_foo.id < ss.id + 1 and join_foo.id > ss.id - 1; - QUERY PLAN ------------------------------------------------------------------------------------- - Aggregate - -> Nested Loop Left Join - Join Filter: ((join_foo.id < (b1.id + 1)) AND (join_foo.id > (b1.id - 1))) - -> Seq Scan on join_foo - -> Gather - Workers Planned: 2 - -> Parallel Hash Join - Hash Cond: (b1.id = b2.id) - -> Parallel Seq Scan on join_bar b1 - -> Parallel Hash - -> Parallel Seq Scan on join_bar b2 -(11 rows) - -select count(*) from join_foo - left join (select b1.id, b1.t from join_bar b1 join join_bar b2 using (id)) ss - on join_foo.id < ss.id + 1 and join_foo.id > ss.id - 1; - count -------- - 3 -(1 row) - -select final > 1 as multibatch - from hash_join_batches( -$$ - select count(*) from join_foo - left join (select b1.id, b1.t from join_bar b1 join join_bar b2 using (id)) ss - on join_foo.id < ss.id + 1 and join_foo.id > ss.id - 1; -$$); - multibatch ------------- - t -(1 row) - -rollback to settings; --- single-batch with rescan, parallel-aware -savepoint settings; -set enable_parallel_hash = on; -set parallel_leader_participation = off; -set min_parallel_table_scan_size = 0; -set parallel_setup_cost = 0; -set parallel_tuple_cost = 0; -set max_parallel_workers_per_gather = 2; -set enable_material = off; -set enable_mergejoin = off; -set work_mem = '4MB'; -explain (costs off) - select count(*) from join_foo - left join (select b1.id, b1.t from join_bar b1 join join_bar b2 using (id)) ss - on join_foo.id < ss.id + 1 and join_foo.id > ss.id - 1; - QUERY PLAN ------------------------------------------------------------------------------------- - Aggregate - -> Nested Loop Left Join - Join Filter: ((join_foo.id < (b1.id + 1)) AND (join_foo.id > (b1.id - 1))) - -> Seq Scan on join_foo - -> Gather - Workers Planned: 2 - -> Parallel Hash Join - Hash Cond: (b1.id = b2.id) - -> Parallel Seq Scan on join_bar b1 - -> Parallel Hash - -> Parallel Seq Scan on join_bar b2 -(11 rows) - -select count(*) from join_foo - left join (select b1.id, b1.t from join_bar b1 join join_bar b2 using (id)) ss - on join_foo.id < ss.id + 1 and join_foo.id > ss.id - 1; - count -------- - 3 -(1 row) - -select final > 1 as multibatch - from hash_join_batches( -$$ - select count(*) from join_foo - left join (select b1.id, b1.t from join_bar b1 join join_bar b2 using (id)) ss - on join_foo.id < ss.id + 1 and join_foo.id > ss.id - 1; -$$); - multibatch ------------- - f -(1 row) - -rollback to settings; --- A full outer join where every record is matched. --- non-parallel -savepoint settings; -set local max_parallel_workers_per_gather = 0; -explain (costs off) - select count(*) from simple r full outer join simple s using (id); - QUERY PLAN ----------------------------------------- - Aggregate - -> Hash Full Join - Hash Cond: (r.id = s.id) - -> Seq Scan on simple r - -> Hash - -> Seq Scan on simple s -(6 rows) - -select count(*) from simple r full outer join simple s using (id); - count -------- - 20000 -(1 row) - -rollback to settings; --- parallelism not possible with parallel-oblivious outer hash join -savepoint settings; -set local max_parallel_workers_per_gather = 2; -explain (costs off) - select count(*) from simple r full outer join simple s using (id); - QUERY PLAN ----------------------------------------- - Aggregate - -> Hash Full Join - Hash Cond: (r.id = s.id) - -> Seq Scan on simple r - -> Hash - -> Seq Scan on simple s -(6 rows) - -select count(*) from simple r full outer join simple s using (id); - count -------- - 20000 -(1 row) - -rollback to settings; --- An full outer join where every record is not matched. --- non-parallel -savepoint settings; -set local max_parallel_workers_per_gather = 0; -explain (costs off) - select count(*) from simple r full outer join simple s on (r.id = 0 - s.id); - QUERY PLAN ----------------------------------------- - Aggregate - -> Hash Full Join - Hash Cond: ((0 - s.id) = r.id) - -> Seq Scan on simple s - -> Hash - -> Seq Scan on simple r -(6 rows) - -select count(*) from simple r full outer join simple s on (r.id = 0 - s.id); - count -------- - 40000 -(1 row) - -rollback to settings; --- parallelism not possible with parallel-oblivious outer hash join -savepoint settings; -set local max_parallel_workers_per_gather = 2; -explain (costs off) - select count(*) from simple r full outer join simple s on (r.id = 0 - s.id); - QUERY PLAN ----------------------------------------- - Aggregate - -> Hash Full Join - Hash Cond: ((0 - s.id) = r.id) - -> Seq Scan on simple s - -> Hash - -> Seq Scan on simple r -(6 rows) - -select count(*) from simple r full outer join simple s on (r.id = 0 - s.id); - count -------- - 40000 -(1 row) - -rollback to settings; --- exercise special code paths for huge tuples (note use of non-strict --- expression and left join required to get the detoasted tuple into --- the hash table) --- parallel with parallel-aware hash join (hits ExecParallelHashLoadTuple and --- sts_puttuple oversized tuple cases because it's multi-batch) -savepoint settings; -set max_parallel_workers_per_gather = 2; -set enable_parallel_hash = on; -set work_mem = '128kB'; -explain (costs off) - select length(max(s.t)) - from wide left join (select id, coalesce(t, '') || '' as t from wide) s using (id); - QUERY PLAN ----------------------------------------------------------------- - Finalize Aggregate - -> Gather - Workers Planned: 2 - -> Partial Aggregate - -> Parallel Hash Left Join - Hash Cond: (wide.id = wide_1.id) - -> Parallel Seq Scan on wide - -> Parallel Hash - -> Parallel Seq Scan on wide wide_1 -(9 rows) - -select length(max(s.t)) -from wide left join (select id, coalesce(t, '') || '' as t from wide) s using (id); - length --------- - 320000 -(1 row) - -select final > 1 as multibatch - from hash_join_batches( -$$ - select length(max(s.t)) - from wide left join (select id, coalesce(t, '') || '' as t from wide) s using (id); -$$); - multibatch ------------- - t -(1 row) - -rollback to settings; -rollback; --- Verify that hash key expressions reference the correct --- nodes. Hashjoin's hashkeys need to reference its outer plan, Hash's --- need to reference Hash's outer plan (which is below HashJoin's --- inner plan). It's not trivial to verify that the references are --- correct (we don't display the hashkeys themselves), but if the --- hashkeys contain subplan references, those will be displayed. Force --- subplans to appear just about everywhere. --- --- Bug report: --- https://www.postgresql.org/message-id/CAPpHfdvGVegF_TKKRiBrSmatJL2dR9uwFCuR%2BteQ_8tEXU8mxg%40mail.gmail.com --- -BEGIN; -SET LOCAL enable_sort = OFF; -- avoid mergejoins -SET LOCAL from_collapse_limit = 1; -- allows easy changing of join order -CREATE TABLE hjtest_1 (a text, b int, id int, c bool); -CREATE TABLE hjtest_2 (a bool, id int, b text, c int); -INSERT INTO hjtest_1(a, b, id, c) VALUES ('text', 2, 1, false); -- matches -INSERT INTO hjtest_1(a, b, id, c) VALUES ('text', 1, 2, false); -- fails id join condition -INSERT INTO hjtest_1(a, b, id, c) VALUES ('text', 20, 1, false); -- fails < 50 -INSERT INTO hjtest_1(a, b, id, c) VALUES ('text', 1, 1, false); -- fails (SELECT hjtest_1.b * 5) = (SELECT hjtest_2.c*5) -INSERT INTO hjtest_2(a, id, b, c) VALUES (true, 1, 'another', 2); -- matches -INSERT INTO hjtest_2(a, id, b, c) VALUES (true, 3, 'another', 7); -- fails id join condition -INSERT INTO hjtest_2(a, id, b, c) VALUES (true, 1, 'another', 90); -- fails < 55 -INSERT INTO hjtest_2(a, id, b, c) VALUES (true, 1, 'another', 3); -- fails (SELECT hjtest_1.b * 5) = (SELECT hjtest_2.c*5) -INSERT INTO hjtest_2(a, id, b, c) VALUES (true, 1, 'text', 1); -- fails hjtest_1.a <> hjtest_2.b; -EXPLAIN (COSTS OFF, VERBOSE) -SELECT hjtest_1.a a1, hjtest_2.a a2,hjtest_1.tableoid::regclass t1, hjtest_2.tableoid::regclass t2 -FROM hjtest_1, hjtest_2 -WHERE - hjtest_1.id = (SELECT 1 WHERE hjtest_2.id = 1) - AND (SELECT hjtest_1.b * 5) = (SELECT hjtest_2.c*5) - AND (SELECT hjtest_1.b * 5) < 50 - AND (SELECT hjtest_2.c * 5) < 55 - AND hjtest_1.a <> hjtest_2.b; - QUERY PLAN ------------------------------------------------------------------------------------------------- - Hash Join - Output: hjtest_1.a, hjtest_2.a, (hjtest_1.tableoid)::regclass, (hjtest_2.tableoid)::regclass - Hash Cond: ((hjtest_1.id = (SubPlan 1)) AND ((SubPlan 2) = (SubPlan 3))) - Join Filter: (hjtest_1.a <> hjtest_2.b) - -> Seq Scan on public.hjtest_1 - Output: hjtest_1.a, hjtest_1.tableoid, hjtest_1.id, hjtest_1.b - Filter: ((SubPlan 4) < 50) - SubPlan 4 - -> Result - Output: (hjtest_1.b * 5) - -> Hash - Output: hjtest_2.a, hjtest_2.tableoid, hjtest_2.id, hjtest_2.c, hjtest_2.b - -> Seq Scan on public.hjtest_2 - Output: hjtest_2.a, hjtest_2.tableoid, hjtest_2.id, hjtest_2.c, hjtest_2.b - Filter: ((SubPlan 5) < 55) - SubPlan 5 - -> Result - Output: (hjtest_2.c * 5) - SubPlan 1 - -> Result - Output: 1 - One-Time Filter: (hjtest_2.id = 1) - SubPlan 3 - -> Result - Output: (hjtest_2.c * 5) - SubPlan 2 - -> Result - Output: (hjtest_1.b * 5) -(28 rows) - -SELECT hjtest_1.a a1, hjtest_2.a a2,hjtest_1.tableoid::regclass t1, hjtest_2.tableoid::regclass t2 -FROM hjtest_1, hjtest_2 -WHERE - hjtest_1.id = (SELECT 1 WHERE hjtest_2.id = 1) - AND (SELECT hjtest_1.b * 5) = (SELECT hjtest_2.c*5) - AND (SELECT hjtest_1.b * 5) < 50 - AND (SELECT hjtest_2.c * 5) < 55 - AND hjtest_1.a <> hjtest_2.b; - a1 | a2 | t1 | t2 -------+----+----------+---------- - text | t | hjtest_1 | hjtest_2 -(1 row) - -EXPLAIN (COSTS OFF, VERBOSE) -SELECT hjtest_1.a a1, hjtest_2.a a2,hjtest_1.tableoid::regclass t1, hjtest_2.tableoid::regclass t2 -FROM hjtest_2, hjtest_1 -WHERE - hjtest_1.id = (SELECT 1 WHERE hjtest_2.id = 1) - AND (SELECT hjtest_1.b * 5) = (SELECT hjtest_2.c*5) - AND (SELECT hjtest_1.b * 5) < 50 - AND (SELECT hjtest_2.c * 5) < 55 - AND hjtest_1.a <> hjtest_2.b; - QUERY PLAN ------------------------------------------------------------------------------------------------- - Hash Join - Output: hjtest_1.a, hjtest_2.a, (hjtest_1.tableoid)::regclass, (hjtest_2.tableoid)::regclass - Hash Cond: (((SubPlan 1) = hjtest_1.id) AND ((SubPlan 3) = (SubPlan 2))) - Join Filter: (hjtest_1.a <> hjtest_2.b) - -> Seq Scan on public.hjtest_2 - Output: hjtest_2.a, hjtest_2.tableoid, hjtest_2.id, hjtest_2.c, hjtest_2.b - Filter: ((SubPlan 5) < 55) - SubPlan 5 - -> Result - Output: (hjtest_2.c * 5) - -> Hash - Output: hjtest_1.a, hjtest_1.tableoid, hjtest_1.id, hjtest_1.b - -> Seq Scan on public.hjtest_1 - Output: hjtest_1.a, hjtest_1.tableoid, hjtest_1.id, hjtest_1.b - Filter: ((SubPlan 4) < 50) - SubPlan 4 - -> Result - Output: (hjtest_1.b * 5) - SubPlan 2 - -> Result - Output: (hjtest_1.b * 5) - SubPlan 1 - -> Result - Output: 1 - One-Time Filter: (hjtest_2.id = 1) - SubPlan 3 - -> Result - Output: (hjtest_2.c * 5) -(28 rows) - -SELECT hjtest_1.a a1, hjtest_2.a a2,hjtest_1.tableoid::regclass t1, hjtest_2.tableoid::regclass t2 -FROM hjtest_2, hjtest_1 -WHERE - hjtest_1.id = (SELECT 1 WHERE hjtest_2.id = 1) - AND (SELECT hjtest_1.b * 5) = (SELECT hjtest_2.c*5) - AND (SELECT hjtest_1.b * 5) < 50 - AND (SELECT hjtest_2.c * 5) < 55 - AND hjtest_1.a <> hjtest_2.b; - a1 | a2 | t1 | t2 -------+----+----------+---------- - text | t | hjtest_1 | hjtest_2 -(1 row) - -ROLLBACK; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/alter_generic.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/alter_generic.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/alter_generic.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/alter_generic.out 2023-02-20 19:46:38.369213276 -0500 @@ -510,7 +510,9 @@ ALTER OPERATOR FAMILY alt_opf19 USING btree ADD FUNCTION 5 (int4, int2) btint42cmp(int4, int2); ERROR: left and right associated data types for operator class options parsing functions must match ALTER OPERATOR FAMILY alt_opf19 USING btree ADD FUNCTION 5 (int4) test_opclass_options_func(internal); -- Ok +ERROR: function test_opclass_options_func(internal) does not exist ALTER OPERATOR FAMILY alt_opf19 USING btree DROP FUNCTION 5 (int4, int4); +ERROR: function 5(integer,integer) does not exist in operator family "alt_opf19" DROP OPERATOR FAMILY alt_opf19 USING btree; -- -- Statistics diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/misc.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/misc.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/misc.out 2023-02-20 19:42:50.369203493 -0500 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/misc.out 2023-02-20 19:46:55.359214005 -0500 @@ -27,12 +27,19 @@ FROM onek WHERE onek.stringu1 = 'JBAAAA' and onek.stringu1 = tmp.stringu1; +ERROR: relation "tmp" does not exist +LINE 1: UPDATE tmp + ^ UPDATE tmp SET stringu1 = reverse_name(onek2.stringu1) FROM onek2 WHERE onek2.stringu1 = 'JCAAAA' and onek2.stringu1 = tmp.stringu1; +ERROR: relation "tmp" does not exist +LINE 1: UPDATE tmp + ^ DROP TABLE tmp; +ERROR: table "tmp" does not exist --UPDATE person* -- SET age = age + 1; --UPDATE person* @@ -508,185 +515,7 @@ -- everyone else is fine. -- SELECT p.name, name(p.hobbies), name(equipment(p.hobbies)) FROM ONLY person p; - name | name | name --------+-------------+--------------- - mike | posthacking | advil - mike | posthacking | peet's coffee - joe | basketball | hightops - sally | basketball | hightops -(4 rows) - --- --- as above, but jeff needs advil and peet's coffee as well. --- -SELECT p.name, name(p.hobbies), name(equipment(p.hobbies)) FROM person* p; - name | name | name --------+-------------+--------------- - mike | posthacking | advil - mike | posthacking | peet's coffee - joe | basketball | hightops - sally | basketball | hightops - jeff | posthacking | advil - jeff | posthacking | peet's coffee -(6 rows) - --- --- just like the last two, but make sure that the target list fixup and --- unflattening is being done correctly. --- -SELECT name(equipment(p.hobbies)), p.name, name(p.hobbies) FROM ONLY person p; - name | name | name ----------------+-------+------------- - advil | mike | posthacking - peet's coffee | mike | posthacking - hightops | joe | basketball - hightops | sally | basketball -(4 rows) - -SELECT (p.hobbies).equipment.name, p.name, name(p.hobbies) FROM person* p; - name | name | name ----------------+-------+------------- - advil | mike | posthacking - peet's coffee | mike | posthacking - hightops | joe | basketball - hightops | sally | basketball - advil | jeff | posthacking - peet's coffee | jeff | posthacking -(6 rows) - -SELECT (p.hobbies).equipment.name, name(p.hobbies), p.name FROM ONLY person p; - name | name | name ----------------+-------------+------- - advil | posthacking | mike - peet's coffee | posthacking | mike - hightops | basketball | joe - hightops | basketball | sally -(4 rows) - -SELECT name(equipment(p.hobbies)), name(p.hobbies), p.name FROM person* p; - name | name | name ----------------+-------------+------- - advil | posthacking | mike - peet's coffee | posthacking | mike - hightops | basketball | joe - hightops | basketball | sally - advil | posthacking | jeff - peet's coffee | posthacking | jeff -(6 rows) - -SELECT name(equipment(hobby_construct(text 'skywalking', text 'mer'))); - name ------- - guts -(1 row) - -SELECT name(equipment(hobby_construct_named(text 'skywalking', text 'mer'))); - name ------- - guts -(1 row) - -SELECT name(equipment_named(hobby_construct_named(text 'skywalking', text 'mer'))); - name ------- - guts -(1 row) - -SELECT name(equipment_named_ambiguous_1a(hobby_construct_named(text 'skywalking', text 'mer'))); - name ------- - guts -(1 row) - -SELECT name(equipment_named_ambiguous_1b(hobby_construct_named(text 'skywalking', text 'mer'))); - name ------- - guts -(1 row) - -SELECT name(equipment_named_ambiguous_1c(hobby_construct_named(text 'skywalking', text 'mer'))); - name ------- - guts -(1 row) - -SELECT name(equipment_named_ambiguous_2a(text 'skywalking')); - name ------- - guts -(1 row) - -SELECT name(equipment_named_ambiguous_2b(text 'skywalking')); - name ---------------- - advil - peet's coffee - hightops - guts -(4 rows) - -SELECT hobbies_by_name('basketball'); - hobbies_by_name ------------------ - joe -(1 row) - -SELECT name, overpaid(emp.*) FROM emp; - name | overpaid ---------+---------- - sharon | t - sam | t - bill | t - jeff | f - cim | f - linda | f -(6 rows) - --- --- Try a few cases with SQL-spec row constructor expressions --- -SELECT * FROM equipment(ROW('skywalking', 'mer')); - name | hobby -------+------------ - guts | skywalking -(1 row) - -SELECT name(equipment(ROW('skywalking', 'mer'))); - name ------- - guts -(1 row) - -SELECT *, name(equipment(h.*)) FROM hobbies_r h; - name | person | name --------------+--------+--------------- - posthacking | mike | advil - posthacking | mike | peet's coffee - posthacking | jeff | advil - posthacking | jeff | peet's coffee - basketball | joe | hightops - basketball | sally | hightops - skywalking | | guts -(7 rows) - -SELECT *, (equipment(CAST((h.*) AS hobbies_r))).name FROM hobbies_r h; - name | person | name --------------+--------+--------------- - posthacking | mike | advil - posthacking | mike | peet's coffee - posthacking | jeff | advil - posthacking | jeff | peet's coffee - basketball | joe | hightops - basketball | sally | hightops - skywalking | | guts -(7 rows) - --- --- functional joins --- --- --- instance rules --- --- --- rewrite rules --- +server closed the connection unexpectedly + This probably means the server terminated abnormally + before or while processing the request. +connection to server was lost diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/dbsize.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/dbsize.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/dbsize.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/dbsize.out 2023-02-20 19:46:55.979214031 -0500 @@ -1,188 +1 @@ -SELECT size, pg_size_pretty(size), pg_size_pretty(-1 * size) FROM - (VALUES (10::bigint), (1000::bigint), (1000000::bigint), - (1000000000::bigint), (1000000000000::bigint), - (1000000000000000::bigint)) x(size); - size | pg_size_pretty | pg_size_pretty -------------------+----------------+---------------- - 10 | 10 bytes | -10 bytes - 1000 | 1000 bytes | -1000 bytes - 1000000 | 977 kB | -977 kB - 1000000000 | 954 MB | -954 MB - 1000000000000 | 931 GB | -931 GB - 1000000000000000 | 909 TB | -909 TB -(6 rows) - -SELECT size, pg_size_pretty(size), pg_size_pretty(-1 * size) FROM - (VALUES (10::numeric), (1000::numeric), (1000000::numeric), - (1000000000::numeric), (1000000000000::numeric), - (1000000000000000::numeric), - (10.5::numeric), (1000.5::numeric), (1000000.5::numeric), - (1000000000.5::numeric), (1000000000000.5::numeric), - (1000000000000000.5::numeric)) x(size); - size | pg_size_pretty | pg_size_pretty ---------------------+----------------+---------------- - 10 | 10 bytes | -10 bytes - 1000 | 1000 bytes | -1000 bytes - 1000000 | 977 kB | -977 kB - 1000000000 | 954 MB | -954 MB - 1000000000000 | 931 GB | -931 GB - 1000000000000000 | 909 TB | -909 TB - 10.5 | 10.5 bytes | -10.5 bytes - 1000.5 | 1000.5 bytes | -1000.5 bytes - 1000000.5 | 977 kB | -977 kB - 1000000000.5 | 954 MB | -954 MB - 1000000000000.5 | 931 GB | -931 GB - 1000000000000000.5 | 909 TB | -909 TB -(12 rows) - --- test where units change up -SELECT size, pg_size_pretty(size), pg_size_pretty(-1 * size) FROM - (VALUES (10239::bigint), (10240::bigint), - (10485247::bigint), (10485248::bigint), - (10736893951::bigint), (10736893952::bigint), - (10994579406847::bigint), (10994579406848::bigint), - (11258449312612351::bigint), (11258449312612352::bigint)) x(size); - size | pg_size_pretty | pg_size_pretty --------------------+----------------+---------------- - 10239 | 10239 bytes | -10239 bytes - 10240 | 10 kB | -10 kB - 10485247 | 10239 kB | -10239 kB - 10485248 | 10 MB | -10 MB - 10736893951 | 10239 MB | -10239 MB - 10736893952 | 10 GB | -10 GB - 10994579406847 | 10239 GB | -10239 GB - 10994579406848 | 10 TB | -10 TB - 11258449312612351 | 10239 TB | -10239 TB - 11258449312612352 | 10240 TB | -10240 TB -(10 rows) - -SELECT size, pg_size_pretty(size), pg_size_pretty(-1 * size) FROM - (VALUES (10239::numeric), (10240::numeric), - (10485247::numeric), (10485248::numeric), - (10736893951::numeric), (10736893952::numeric), - (10994579406847::numeric), (10994579406848::numeric), - (11258449312612351::numeric), (11258449312612352::numeric)) x(size); - size | pg_size_pretty | pg_size_pretty --------------------+----------------+---------------- - 10239 | 10239 bytes | -10239 bytes - 10240 | 10 kB | -10 kB - 10485247 | 10239 kB | -10239 kB - 10485248 | 10 MB | -10 MB - 10736893951 | 10239 MB | -10239 MB - 10736893952 | 10 GB | -10 GB - 10994579406847 | 10239 GB | -10239 GB - 10994579406848 | 10 TB | -10 TB - 11258449312612351 | 10239 TB | -10239 TB - 11258449312612352 | 10240 TB | -10240 TB -(10 rows) - --- pg_size_bytes() tests -SELECT size, pg_size_bytes(size) FROM - (VALUES ('1'), ('123bytes'), ('1kB'), ('1MB'), (' 1 GB'), ('1.5 GB '), - ('1TB'), ('3000 TB'), ('1e6 MB')) x(size); - size | pg_size_bytes -----------+------------------ - 1 | 1 - 123bytes | 123 - 1kB | 1024 - 1MB | 1048576 - 1 GB | 1073741824 - 1.5 GB | 1610612736 - 1TB | 1099511627776 - 3000 TB | 3298534883328000 - 1e6 MB | 1048576000000 -(9 rows) - --- case-insensitive units are supported -SELECT size, pg_size_bytes(size) FROM - (VALUES ('1'), ('123bYteS'), ('1kb'), ('1mb'), (' 1 Gb'), ('1.5 gB '), - ('1tb'), ('3000 tb'), ('1e6 mb')) x(size); - size | pg_size_bytes -----------+------------------ - 1 | 1 - 123bYteS | 123 - 1kb | 1024 - 1mb | 1048576 - 1 Gb | 1073741824 - 1.5 gB | 1610612736 - 1tb | 1099511627776 - 3000 tb | 3298534883328000 - 1e6 mb | 1048576000000 -(9 rows) - --- negative numbers are supported -SELECT size, pg_size_bytes(size) FROM - (VALUES ('-1'), ('-123bytes'), ('-1kb'), ('-1mb'), (' -1 Gb'), ('-1.5 gB '), - ('-1tb'), ('-3000 TB'), ('-10e-1 MB')) x(size); - size | pg_size_bytes ------------+------------------- - -1 | -1 - -123bytes | -123 - -1kb | -1024 - -1mb | -1048576 - -1 Gb | -1073741824 - -1.5 gB | -1610612736 - -1tb | -1099511627776 - -3000 TB | -3298534883328000 - -10e-1 MB | -1048576 -(9 rows) - --- different cases with allowed points -SELECT size, pg_size_bytes(size) FROM - (VALUES ('-1.'), ('-1.kb'), ('-1. kb'), ('-0. gb'), - ('-.1'), ('-.1kb'), ('-.1 kb'), ('-.0 gb')) x(size); - size | pg_size_bytes ---------+--------------- - -1. | -1 - -1.kb | -1024 - -1. kb | -1024 - -0. gb | 0 - -.1 | 0 - -.1kb | -102 - -.1 kb | -102 - -.0 gb | 0 -(8 rows) - --- invalid inputs -SELECT pg_size_bytes('1 AB'); -ERROR: invalid size: "1 AB" -DETAIL: Invalid size unit: "AB". -HINT: Valid units are "bytes", "kB", "MB", "GB", and "TB". -SELECT pg_size_bytes('1 AB A'); -ERROR: invalid size: "1 AB A" -DETAIL: Invalid size unit: "AB A". -HINT: Valid units are "bytes", "kB", "MB", "GB", and "TB". -SELECT pg_size_bytes('1 AB A '); -ERROR: invalid size: "1 AB A " -DETAIL: Invalid size unit: "AB A". -HINT: Valid units are "bytes", "kB", "MB", "GB", and "TB". -SELECT pg_size_bytes('9223372036854775807.9'); -ERROR: bigint out of range -SELECT pg_size_bytes('1e100'); -ERROR: bigint out of range -SELECT pg_size_bytes('1e1000000000000000000'); -ERROR: value overflows numeric format -SELECT pg_size_bytes('1 byte'); -- the singular "byte" is not supported -ERROR: invalid size: "1 byte" -DETAIL: Invalid size unit: "byte". -HINT: Valid units are "bytes", "kB", "MB", "GB", and "TB". -SELECT pg_size_bytes(''); -ERROR: invalid size: "" -SELECT pg_size_bytes('kb'); -ERROR: invalid size: "kb" -SELECT pg_size_bytes('..'); -ERROR: invalid size: ".." -SELECT pg_size_bytes('-.'); -ERROR: invalid size: "-." -SELECT pg_size_bytes('-.kb'); -ERROR: invalid size: "-.kb" -SELECT pg_size_bytes('-. kb'); -ERROR: invalid size: "-. kb" -SELECT pg_size_bytes('.+912'); -ERROR: invalid size: ".+912" -SELECT pg_size_bytes('+912+ kB'); -ERROR: invalid size: "+912+ kB" -DETAIL: Invalid size unit: "+ kB". -HINT: Valid units are "bytes", "kB", "MB", "GB", and "TB". -SELECT pg_size_bytes('++123 kB'); -ERROR: invalid size: "++123 kB" +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/misc_functions.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/misc_functions.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/misc_functions.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/misc_functions.out 2023-02-20 19:46:55.979214031 -0500 @@ -1,276 +1 @@ --- --- num_nulls() --- -SELECT num_nonnulls(NULL); - num_nonnulls --------------- - 0 -(1 row) - -SELECT num_nonnulls('1'); - num_nonnulls --------------- - 1 -(1 row) - -SELECT num_nonnulls(NULL::text); - num_nonnulls --------------- - 0 -(1 row) - -SELECT num_nonnulls(NULL::text, NULL::int); - num_nonnulls --------------- - 0 -(1 row) - -SELECT num_nonnulls(1, 2, NULL::text, NULL::point, '', int8 '9', 1.0 / NULL); - num_nonnulls --------------- - 4 -(1 row) - -SELECT num_nonnulls(VARIADIC '{1,2,NULL,3}'::int[]); - num_nonnulls --------------- - 3 -(1 row) - -SELECT num_nonnulls(VARIADIC '{"1","2","3","4"}'::text[]); - num_nonnulls --------------- - 4 -(1 row) - -SELECT num_nonnulls(VARIADIC ARRAY(SELECT CASE WHEN i <> 40 THEN i END FROM generate_series(1, 100) i)); - num_nonnulls --------------- - 99 -(1 row) - -SELECT num_nulls(NULL); - num_nulls ------------ - 1 -(1 row) - -SELECT num_nulls('1'); - num_nulls ------------ - 0 -(1 row) - -SELECT num_nulls(NULL::text); - num_nulls ------------ - 1 -(1 row) - -SELECT num_nulls(NULL::text, NULL::int); - num_nulls ------------ - 2 -(1 row) - -SELECT num_nulls(1, 2, NULL::text, NULL::point, '', int8 '9', 1.0 / NULL); - num_nulls ------------ - 3 -(1 row) - -SELECT num_nulls(VARIADIC '{1,2,NULL,3}'::int[]); - num_nulls ------------ - 1 -(1 row) - -SELECT num_nulls(VARIADIC '{"1","2","3","4"}'::text[]); - num_nulls ------------ - 0 -(1 row) - -SELECT num_nulls(VARIADIC ARRAY(SELECT CASE WHEN i <> 40 THEN i END FROM generate_series(1, 100) i)); - num_nulls ------------ - 1 -(1 row) - --- special cases -SELECT num_nonnulls(VARIADIC NULL::text[]); - num_nonnulls --------------- - -(1 row) - -SELECT num_nonnulls(VARIADIC '{}'::int[]); - num_nonnulls --------------- - 0 -(1 row) - -SELECT num_nulls(VARIADIC NULL::text[]); - num_nulls ------------ - -(1 row) - -SELECT num_nulls(VARIADIC '{}'::int[]); - num_nulls ------------ - 0 -(1 row) - --- should fail, one or more arguments is required -SELECT num_nonnulls(); -ERROR: function num_nonnulls() does not exist -LINE 1: SELECT num_nonnulls(); - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. -SELECT num_nulls(); -ERROR: function num_nulls() does not exist -LINE 1: SELECT num_nulls(); - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. --- --- pg_log_backend_memory_contexts() --- --- Memory contexts are logged and they are not returned to the function. --- Furthermore, their contents can vary depending on the timing. However, --- we can at least verify that the code doesn't fail. --- -SELECT * FROM pg_log_backend_memory_contexts(pg_backend_pid()); - pg_log_backend_memory_contexts --------------------------------- - t -(1 row) - --- --- Test some built-in SRFs --- --- The outputs of these are variable, so we can't just print their results --- directly, but we can at least verify that the code doesn't fail. --- -select setting as segsize -from pg_settings where name = 'wal_segment_size' -\gset -select count(*) > 0 as ok from pg_ls_waldir(); - ok ----- - t -(1 row) - --- Test ProjectSet as well as FunctionScan -select count(*) > 0 as ok from (select pg_ls_waldir()) ss; - ok ----- - t -(1 row) - --- Test not-run-to-completion cases. -select * from pg_ls_waldir() limit 0; - name | size | modification -------+------+-------------- -(0 rows) - -select count(*) > 0 as ok from (select * from pg_ls_waldir() limit 1) ss; - ok ----- - t -(1 row) - -select (w).size = :segsize as ok -from (select pg_ls_waldir() w) ss where length((w).name) = 24 limit 1; - ok ----- - t -(1 row) - -select count(*) >= 0 as ok from pg_ls_archive_statusdir(); - ok ----- - t -(1 row) - -select * from (select pg_ls_dir('.') a) a where a = 'base' limit 1; - a ------- - base -(1 row) - -select * from (select (pg_timezone_names()).name) ptn where name='UTC' limit 1; - name ------- - UTC -(1 row) - -select count(*) > 0 from - (select pg_tablespace_databases(oid) as pts from pg_tablespace - where spcname = 'pg_default') pts - join pg_database db on pts.pts = db.oid; - ?column? ----------- - t -(1 row) - --- --- Test adding a support function to a subject function --- -CREATE FUNCTION my_int_eq(int, int) RETURNS bool - LANGUAGE internal STRICT IMMUTABLE PARALLEL SAFE - AS $$int4eq$$; --- By default, planner does not think that's selective -EXPLAIN (COSTS OFF) -SELECT * FROM tenk1 a JOIN tenk1 b ON a.unique1 = b.unique1 -WHERE my_int_eq(a.unique2, 42); - QUERY PLAN ----------------------------------------------- - Hash Join - Hash Cond: (b.unique1 = a.unique1) - -> Seq Scan on tenk1 b - -> Hash - -> Seq Scan on tenk1 a - Filter: my_int_eq(unique2, 42) -(6 rows) - --- With support function that knows it's int4eq, we get a different plan -ALTER FUNCTION my_int_eq(int, int) SUPPORT test_support_func; -EXPLAIN (COSTS OFF) -SELECT * FROM tenk1 a JOIN tenk1 b ON a.unique1 = b.unique1 -WHERE my_int_eq(a.unique2, 42); - QUERY PLAN -------------------------------------------------- - Nested Loop - -> Seq Scan on tenk1 a - Filter: my_int_eq(unique2, 42) - -> Index Scan using tenk1_unique1 on tenk1 b - Index Cond: (unique1 = a.unique1) -(5 rows) - --- Also test non-default rowcount estimate -CREATE FUNCTION my_gen_series(int, int) RETURNS SETOF integer - LANGUAGE internal STRICT IMMUTABLE PARALLEL SAFE - AS $$generate_series_int4$$ - SUPPORT test_support_func; -EXPLAIN (COSTS OFF) -SELECT * FROM tenk1 a JOIN my_gen_series(1,1000) g ON a.unique1 = g; - QUERY PLAN ----------------------------------------- - Hash Join - Hash Cond: (g.g = a.unique1) - -> Function Scan on my_gen_series g - -> Hash - -> Seq Scan on tenk1 a -(5 rows) - -EXPLAIN (COSTS OFF) -SELECT * FROM tenk1 a JOIN my_gen_series(1,10) g ON a.unique1 = g; - QUERY PLAN -------------------------------------------------- - Nested Loop - -> Function Scan on my_gen_series g - -> Index Scan using tenk1_unique1 on tenk1 a - Index Cond: (unique1 = g.g) -(4 rows) - +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/sysviews.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/sysviews.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/sysviews.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/sysviews.out 2023-02-20 19:46:55.969214031 -0500 @@ -1,159 +1 @@ --- --- Test assorted system views --- --- This test is mainly meant to provide some code coverage for the --- set-returning functions that underlie certain system views. --- The output of most of these functions is very environment-dependent, --- so our ability to test with fixed expected output is pretty limited; --- but even a trivial check of count(*) will exercise the normal code path --- through the SRF. -select count(*) >= 0 as ok from pg_available_extension_versions; - ok ----- - t -(1 row) - -select count(*) >= 0 as ok from pg_available_extensions; - ok ----- - t -(1 row) - --- The entire output of pg_backend_memory_contexts is not stable, --- we test only the existance and basic condition of TopMemoryContext. -select name, ident, parent, level, total_bytes >= free_bytes - from pg_backend_memory_contexts where level = 0; - name | ident | parent | level | ?column? -------------------+-------+--------+-------+---------- - TopMemoryContext | | | 0 | t -(1 row) - --- At introduction, pg_config had 23 entries; it may grow -select count(*) > 20 as ok from pg_config; - ok ----- - t -(1 row) - --- We expect no cursors in this test; see also portals.sql -select count(*) = 0 as ok from pg_cursors; - ok ----- - t -(1 row) - -select count(*) >= 0 as ok from pg_file_settings; - ok ----- - t -(1 row) - --- There will surely be at least one rule -select count(*) > 0 as ok from pg_hba_file_rules; - ok ----- - t -(1 row) - --- There will surely be at least one active lock -select count(*) > 0 as ok from pg_locks; - ok ----- - t -(1 row) - --- We expect no prepared statements in this test; see also prepare.sql -select count(*) = 0 as ok from pg_prepared_statements; - ok ----- - t -(1 row) - --- See also prepared_xacts.sql -select count(*) >= 0 as ok from pg_prepared_xacts; - ok ----- - t -(1 row) - --- There will surely be at least one SLRU cache -select count(*) > 0 as ok from pg_stat_slru; - ok ----- - t -(1 row) - --- There must be only one record -select count(*) = 1 as ok from pg_stat_wal; - ok ----- - t -(1 row) - --- We expect no walreceiver running in this test -select count(*) = 0 as ok from pg_stat_wal_receiver; - ok ----- - t -(1 row) - --- This is to record the prevailing planner enable_foo settings during --- a regression test run. -select name, setting from pg_settings where name like 'enable%'; - name | setting ---------------------------------+--------- - enable_async_append | on - enable_bitmapscan | on - enable_gathermerge | on - enable_hashagg | on - enable_hashjoin | on - enable_incremental_sort | on - enable_indexonlyscan | on - enable_indexscan | on - enable_material | on - enable_memoize | on - enable_mergejoin | on - enable_nestloop | on - enable_parallel_append | on - enable_parallel_hash | on - enable_partition_pruning | on - enable_partitionwise_aggregate | off - enable_partitionwise_join | off - enable_seqscan | on - enable_sort | on - enable_tidscan | on -(20 rows) - --- Test that the pg_timezone_names and pg_timezone_abbrevs views are --- more-or-less working. We can't test their contents in any great detail --- without the outputs changing anytime IANA updates the underlying data, --- but it seems reasonable to expect at least one entry per major meridian. --- (At the time of writing, the actual counts are around 38 because of --- zones using fractional GMT offsets, so this is a pretty loose test.) -select count(distinct utc_offset) >= 24 as ok from pg_timezone_names; - ok ----- - t -(1 row) - -select count(distinct utc_offset) >= 24 as ok from pg_timezone_abbrevs; - ok ----- - t -(1 row) - --- Let's check the non-default timezone abbreviation sets, too -set timezone_abbreviations = 'Australia'; -select count(distinct utc_offset) >= 24 as ok from pg_timezone_abbrevs; - ok ----- - t -(1 row) - -set timezone_abbreviations = 'India'; -select count(distinct utc_offset) >= 24 as ok from pg_timezone_abbrevs; - ok ----- - t -(1 row) - +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/tsrf.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/tsrf.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/tsrf.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/tsrf.out 2023-02-20 19:46:55.979214031 -0500 @@ -1,712 +1 @@ --- --- tsrf - targetlist set returning function tests --- --- simple srf -SELECT generate_series(1, 3); - generate_series ------------------ - 1 - 2 - 3 -(3 rows) - --- parallel iteration -SELECT generate_series(1, 3), generate_series(3,5); - generate_series | generate_series ------------------+----------------- - 1 | 3 - 2 | 4 - 3 | 5 -(3 rows) - --- parallel iteration, different number of rows -SELECT generate_series(1, 2), generate_series(1,4); - generate_series | generate_series ------------------+----------------- - 1 | 1 - 2 | 2 - | 3 - | 4 -(4 rows) - --- srf, with SRF argument -SELECT generate_series(1, generate_series(1, 3)); - generate_series ------------------ - 1 - 1 - 2 - 1 - 2 - 3 -(6 rows) - --- but we've traditionally rejected the same in FROM -SELECT * FROM generate_series(1, generate_series(1, 3)); -ERROR: set-returning functions must appear at top level of FROM -LINE 1: SELECT * FROM generate_series(1, generate_series(1, 3)); - ^ --- srf, with two SRF arguments -SELECT generate_series(generate_series(1,3), generate_series(2, 4)); - generate_series ------------------ - 1 - 2 - 2 - 3 - 3 - 4 -(6 rows) - --- check proper nesting of SRFs in different expressions -explain (verbose, costs off) -SELECT generate_series(1, generate_series(1, 3)), generate_series(2, 4); - QUERY PLAN --------------------------------------------------------------------------------- - ProjectSet - Output: generate_series(1, (generate_series(1, 3))), (generate_series(2, 4)) - -> ProjectSet - Output: generate_series(1, 3), generate_series(2, 4) - -> Result -(5 rows) - -SELECT generate_series(1, generate_series(1, 3)), generate_series(2, 4); - generate_series | generate_series ------------------+----------------- - 1 | 2 - 1 | 3 - 2 | 3 - 1 | 4 - 2 | 4 - 3 | 4 -(6 rows) - -CREATE TABLE few(id int, dataa text, datab text); -INSERT INTO few VALUES(1, 'a', 'foo'),(2, 'a', 'bar'),(3, 'b', 'bar'); --- SRF with a provably-dummy relation -explain (verbose, costs off) -SELECT unnest(ARRAY[1, 2]) FROM few WHERE false; - QUERY PLAN --------------------------------------- - ProjectSet - Output: unnest('{1,2}'::integer[]) - -> Result - One-Time Filter: false -(4 rows) - -SELECT unnest(ARRAY[1, 2]) FROM few WHERE false; - unnest --------- -(0 rows) - --- SRF shouldn't prevent upper query from recognizing lower as dummy -explain (verbose, costs off) -SELECT * FROM few f1, - (SELECT unnest(ARRAY[1,2]) FROM few f2 WHERE false OFFSET 0) ss; - QUERY PLAN ------------------------------------------------- - Result - Output: f1.id, f1.dataa, f1.datab, ss.unnest - One-Time Filter: false -(3 rows) - -SELECT * FROM few f1, - (SELECT unnest(ARRAY[1,2]) FROM few f2 WHERE false OFFSET 0) ss; - id | dataa | datab | unnest -----+-------+-------+-------- -(0 rows) - --- SRF output order of sorting is maintained, if SRF is not referenced -SELECT few.id, generate_series(1,3) g FROM few ORDER BY id DESC; - id | g -----+--- - 3 | 1 - 3 | 2 - 3 | 3 - 2 | 1 - 2 | 2 - 2 | 3 - 1 | 1 - 1 | 2 - 1 | 3 -(9 rows) - --- but SRFs can be referenced in sort -SELECT few.id, generate_series(1,3) g FROM few ORDER BY id, g DESC; - id | g -----+--- - 1 | 3 - 1 | 2 - 1 | 1 - 2 | 3 - 2 | 2 - 2 | 1 - 3 | 3 - 3 | 2 - 3 | 1 -(9 rows) - -SELECT few.id, generate_series(1,3) g FROM few ORDER BY id, generate_series(1,3) DESC; - id | g -----+--- - 1 | 3 - 1 | 2 - 1 | 1 - 2 | 3 - 2 | 2 - 2 | 1 - 3 | 3 - 3 | 2 - 3 | 1 -(9 rows) - --- it's weird to have ORDER BYs that increase the number of results -SELECT few.id FROM few ORDER BY id, generate_series(1,3) DESC; - id ----- - 1 - 1 - 1 - 2 - 2 - 2 - 3 - 3 - 3 -(9 rows) - --- SRFs are computed after aggregation -SET enable_hashagg TO 0; -- stable output order -SELECT few.dataa, count(*), min(id), max(id), unnest('{1,1,3}'::int[]) FROM few WHERE few.id = 1 GROUP BY few.dataa; - dataa | count | min | max | unnest --------+-------+-----+-----+-------- - a | 1 | 1 | 1 | 1 - a | 1 | 1 | 1 | 1 - a | 1 | 1 | 1 | 3 -(3 rows) - --- unless referenced in GROUP BY clause -SELECT few.dataa, count(*), min(id), max(id), unnest('{1,1,3}'::int[]) FROM few WHERE few.id = 1 GROUP BY few.dataa, unnest('{1,1,3}'::int[]); - dataa | count | min | max | unnest --------+-------+-----+-----+-------- - a | 2 | 1 | 1 | 1 - a | 1 | 1 | 1 | 3 -(2 rows) - -SELECT few.dataa, count(*), min(id), max(id), unnest('{1,1,3}'::int[]) FROM few WHERE few.id = 1 GROUP BY few.dataa, 5; - dataa | count | min | max | unnest --------+-------+-----+-----+-------- - a | 2 | 1 | 1 | 1 - a | 1 | 1 | 1 | 3 -(2 rows) - -RESET enable_hashagg; --- check HAVING works when GROUP BY does [not] reference SRF output -SELECT dataa, generate_series(1,1), count(*) FROM few GROUP BY 1 HAVING count(*) > 1; - dataa | generate_series | count --------+-----------------+------- - a | 1 | 2 -(1 row) - -SELECT dataa, generate_series(1,1), count(*) FROM few GROUP BY 1, 2 HAVING count(*) > 1; - dataa | generate_series | count --------+-----------------+------- - a | 1 | 2 -(1 row) - --- it's weird to have GROUP BYs that increase the number of results -SELECT few.dataa, count(*) FROM few WHERE dataa = 'a' GROUP BY few.dataa ORDER BY 2; - dataa | count --------+------- - a | 2 -(1 row) - -SELECT few.dataa, count(*) FROM few WHERE dataa = 'a' GROUP BY few.dataa, unnest('{1,1,3}'::int[]) ORDER BY 2; - dataa | count --------+------- - a | 2 - a | 4 -(2 rows) - --- SRFs are not allowed if they'd need to be conditionally executed -SELECT q1, case when q1 > 0 then generate_series(1,3) else 0 end FROM int8_tbl; -ERROR: set-returning functions are not allowed in CASE -LINE 1: SELECT q1, case when q1 > 0 then generate_series(1,3) else 0... - ^ -HINT: You might be able to move the set-returning function into a LATERAL FROM item. -SELECT q1, coalesce(generate_series(1,3), 0) FROM int8_tbl; -ERROR: set-returning functions are not allowed in COALESCE -LINE 1: SELECT q1, coalesce(generate_series(1,3), 0) FROM int8_tbl; - ^ -HINT: You might be able to move the set-returning function into a LATERAL FROM item. --- SRFs are not allowed in aggregate arguments -SELECT min(generate_series(1, 3)) FROM few; -ERROR: aggregate function calls cannot contain set-returning function calls -LINE 1: SELECT min(generate_series(1, 3)) FROM few; - ^ -HINT: You might be able to move the set-returning function into a LATERAL FROM item. --- ... unless they're within a sub-select -SELECT sum((3 = ANY(SELECT generate_series(1,4)))::int); - sum ------ - 1 -(1 row) - -SELECT sum((3 = ANY(SELECT lag(x) over(order by x) - FROM generate_series(1,4) x))::int); - sum ------ - 1 -(1 row) - --- SRFs are not allowed in window function arguments, either -SELECT min(generate_series(1, 3)) OVER() FROM few; -ERROR: window function calls cannot contain set-returning function calls -LINE 1: SELECT min(generate_series(1, 3)) OVER() FROM few; - ^ -HINT: You might be able to move the set-returning function into a LATERAL FROM item. --- SRFs are normally computed after window functions -SELECT id,lag(id) OVER(), count(*) OVER(), generate_series(1,3) FROM few; - id | lag | count | generate_series -----+-----+-------+----------------- - 1 | | 3 | 1 - 1 | | 3 | 2 - 1 | | 3 | 3 - 2 | 1 | 3 | 1 - 2 | 1 | 3 | 2 - 2 | 1 | 3 | 3 - 3 | 2 | 3 | 1 - 3 | 2 | 3 | 2 - 3 | 2 | 3 | 3 -(9 rows) - --- unless referencing SRFs -SELECT SUM(count(*)) OVER(PARTITION BY generate_series(1,3) ORDER BY generate_series(1,3)), generate_series(1,3) g FROM few GROUP BY g; - sum | g ------+--- - 3 | 1 - 3 | 2 - 3 | 3 -(3 rows) - --- sorting + grouping -SELECT few.dataa, count(*), min(id), max(id), generate_series(1,3) FROM few GROUP BY few.dataa ORDER BY 5, 1; - dataa | count | min | max | generate_series --------+-------+-----+-----+----------------- - a | 2 | 1 | 2 | 1 - b | 1 | 3 | 3 | 1 - a | 2 | 1 | 2 | 2 - b | 1 | 3 | 3 | 2 - a | 2 | 1 | 2 | 3 - b | 1 | 3 | 3 | 3 -(6 rows) - --- grouping sets are a bit special, they produce NULLs in columns not actually NULL -set enable_hashagg = false; -SELECT dataa, datab b, generate_series(1,2) g, count(*) FROM few GROUP BY CUBE(dataa, datab); - dataa | b | g | count --------+-----+---+------- - a | bar | 1 | 1 - a | bar | 2 | 1 - a | foo | 1 | 1 - a | foo | 2 | 1 - a | | 1 | 2 - a | | 2 | 2 - b | bar | 1 | 1 - b | bar | 2 | 1 - b | | 1 | 1 - b | | 2 | 1 - | | 1 | 3 - | | 2 | 3 - | bar | 1 | 2 - | bar | 2 | 2 - | foo | 1 | 1 - | foo | 2 | 1 -(16 rows) - -SELECT dataa, datab b, generate_series(1,2) g, count(*) FROM few GROUP BY CUBE(dataa, datab) ORDER BY dataa; - dataa | b | g | count --------+-----+---+------- - a | bar | 1 | 1 - a | bar | 2 | 1 - a | foo | 1 | 1 - a | foo | 2 | 1 - a | | 1 | 2 - a | | 2 | 2 - b | bar | 1 | 1 - b | bar | 2 | 1 - b | | 1 | 1 - b | | 2 | 1 - | | 1 | 3 - | | 2 | 3 - | bar | 1 | 2 - | bar | 2 | 2 - | foo | 1 | 1 - | foo | 2 | 1 -(16 rows) - -SELECT dataa, datab b, generate_series(1,2) g, count(*) FROM few GROUP BY CUBE(dataa, datab) ORDER BY g; - dataa | b | g | count --------+-----+---+------- - a | bar | 1 | 1 - a | foo | 1 | 1 - a | | 1 | 2 - b | bar | 1 | 1 - b | | 1 | 1 - | | 1 | 3 - | bar | 1 | 2 - | foo | 1 | 1 - | foo | 2 | 1 - a | bar | 2 | 1 - b | | 2 | 1 - a | foo | 2 | 1 - | bar | 2 | 2 - a | | 2 | 2 - | | 2 | 3 - b | bar | 2 | 1 -(16 rows) - -SELECT dataa, datab b, generate_series(1,2) g, count(*) FROM few GROUP BY CUBE(dataa, datab, g); - dataa | b | g | count --------+-----+---+------- - a | bar | 1 | 1 - a | bar | 2 | 1 - a | bar | | 2 - a | foo | 1 | 1 - a | foo | 2 | 1 - a | foo | | 2 - a | | | 4 - b | bar | 1 | 1 - b | bar | 2 | 1 - b | bar | | 2 - b | | | 2 - | | | 6 - | bar | 1 | 2 - | bar | 2 | 2 - | bar | | 4 - | foo | 1 | 1 - | foo | 2 | 1 - | foo | | 2 - a | | 1 | 2 - b | | 1 | 1 - | | 1 | 3 - a | | 2 | 2 - b | | 2 | 1 - | | 2 | 3 -(24 rows) - -SELECT dataa, datab b, generate_series(1,2) g, count(*) FROM few GROUP BY CUBE(dataa, datab, g) ORDER BY dataa; - dataa | b | g | count --------+-----+---+------- - a | foo | | 2 - a | | | 4 - a | | 2 | 2 - a | bar | 1 | 1 - a | bar | 2 | 1 - a | bar | | 2 - a | foo | 1 | 1 - a | foo | 2 | 1 - a | | 1 | 2 - b | bar | 1 | 1 - b | | | 2 - b | | 1 | 1 - b | bar | 2 | 1 - b | bar | | 2 - b | | 2 | 1 - | | 2 | 3 - | | | 6 - | bar | 1 | 2 - | bar | 2 | 2 - | bar | | 4 - | foo | 1 | 1 - | foo | 2 | 1 - | foo | | 2 - | | 1 | 3 -(24 rows) - -SELECT dataa, datab b, generate_series(1,2) g, count(*) FROM few GROUP BY CUBE(dataa, datab, g) ORDER BY g; - dataa | b | g | count --------+-----+---+------- - a | bar | 1 | 1 - a | foo | 1 | 1 - b | bar | 1 | 1 - | bar | 1 | 2 - | foo | 1 | 1 - a | | 1 | 2 - b | | 1 | 1 - | | 1 | 3 - a | | 2 | 2 - b | | 2 | 1 - | bar | 2 | 2 - | | 2 | 3 - | foo | 2 | 1 - a | bar | 2 | 1 - a | foo | 2 | 1 - b | bar | 2 | 1 - a | | | 4 - b | bar | | 2 - b | | | 2 - | | | 6 - a | foo | | 2 - a | bar | | 2 - | bar | | 4 - | foo | | 2 -(24 rows) - -reset enable_hashagg; --- case with degenerate ORDER BY -explain (verbose, costs off) -select 'foo' as f, generate_series(1,2) as g from few order by 1; - QUERY PLAN ----------------------------------------------- - ProjectSet - Output: 'foo'::text, generate_series(1, 2) - -> Seq Scan on public.few - Output: id, dataa, datab -(4 rows) - -select 'foo' as f, generate_series(1,2) as g from few order by 1; - f | g ------+--- - foo | 1 - foo | 2 - foo | 1 - foo | 2 - foo | 1 - foo | 2 -(6 rows) - --- data modification -CREATE TABLE fewmore AS SELECT generate_series(1,3) AS data; -INSERT INTO fewmore VALUES(generate_series(4,5)); -SELECT * FROM fewmore; - data ------- - 1 - 2 - 3 - 4 - 5 -(5 rows) - --- SRFs are not allowed in UPDATE (they once were, but it was nonsense) -UPDATE fewmore SET data = generate_series(4,9); -ERROR: set-returning functions are not allowed in UPDATE -LINE 1: UPDATE fewmore SET data = generate_series(4,9); - ^ --- SRFs are not allowed in RETURNING -INSERT INTO fewmore VALUES(1) RETURNING generate_series(1,3); -ERROR: set-returning functions are not allowed in RETURNING -LINE 1: INSERT INTO fewmore VALUES(1) RETURNING generate_series(1,3)... - ^ --- nor standalone VALUES (but surely this is a bug?) -VALUES(1, generate_series(1,2)); -ERROR: set-returning functions are not allowed in VALUES -LINE 1: VALUES(1, generate_series(1,2)); - ^ --- We allow tSRFs that are not at top level -SELECT int4mul(generate_series(1,2), 10); - int4mul ---------- - 10 - 20 -(2 rows) - -SELECT generate_series(1,3) IS DISTINCT FROM 2; - ?column? ----------- - t - f - t -(3 rows) - --- but SRFs in function RTEs must be at top level (annoying restriction) -SELECT * FROM int4mul(generate_series(1,2), 10); -ERROR: set-returning functions must appear at top level of FROM -LINE 1: SELECT * FROM int4mul(generate_series(1,2), 10); - ^ --- DISTINCT ON is evaluated before tSRF evaluation if SRF is not --- referenced either in ORDER BY or in the DISTINCT ON list. The ORDER --- BY reference can be implicitly generated, if there's no other ORDER BY. --- implicit reference (via implicit ORDER) to all columns -SELECT DISTINCT ON (a) a, b, generate_series(1,3) g -FROM (VALUES (3, 2), (3,1), (1,1), (1,4), (5,3), (5,1)) AS t(a, b); - a | b | g ----+---+--- - 1 | 1 | 1 - 3 | 2 | 1 - 5 | 3 | 1 -(3 rows) - --- unreferenced in DISTINCT ON or ORDER BY -SELECT DISTINCT ON (a) a, b, generate_series(1,3) g -FROM (VALUES (3, 2), (3,1), (1,1), (1,4), (5,3), (5,1)) AS t(a, b) -ORDER BY a, b DESC; - a | b | g ----+---+--- - 1 | 4 | 1 - 1 | 4 | 2 - 1 | 4 | 3 - 3 | 2 | 1 - 3 | 2 | 2 - 3 | 2 | 3 - 5 | 3 | 1 - 5 | 3 | 2 - 5 | 3 | 3 -(9 rows) - --- referenced in ORDER BY -SELECT DISTINCT ON (a) a, b, generate_series(1,3) g -FROM (VALUES (3, 2), (3,1), (1,1), (1,4), (5,3), (5,1)) AS t(a, b) -ORDER BY a, b DESC, g DESC; - a | b | g ----+---+--- - 1 | 4 | 3 - 3 | 2 | 3 - 5 | 3 | 3 -(3 rows) - --- referenced in ORDER BY and DISTINCT ON -SELECT DISTINCT ON (a, b, g) a, b, generate_series(1,3) g -FROM (VALUES (3, 2), (3,1), (1,1), (1,4), (5,3), (5,1)) AS t(a, b) -ORDER BY a, b DESC, g DESC; - a | b | g ----+---+--- - 1 | 4 | 3 - 1 | 4 | 2 - 1 | 4 | 1 - 1 | 1 | 3 - 1 | 1 | 2 - 1 | 1 | 1 - 3 | 2 | 3 - 3 | 2 | 2 - 3 | 2 | 1 - 3 | 1 | 3 - 3 | 1 | 2 - 3 | 1 | 1 - 5 | 3 | 3 - 5 | 3 | 2 - 5 | 3 | 1 - 5 | 1 | 3 - 5 | 1 | 2 - 5 | 1 | 1 -(18 rows) - --- only SRF mentioned in DISTINCT ON -SELECT DISTINCT ON (g) a, b, generate_series(1,3) g -FROM (VALUES (3, 2), (3,1), (1,1), (1,4), (5,3), (5,1)) AS t(a, b); - a | b | g ----+---+--- - 3 | 2 | 1 - 5 | 1 | 2 - 3 | 1 | 3 -(3 rows) - --- LIMIT / OFFSET is evaluated after SRF evaluation -SELECT a, generate_series(1,2) FROM (VALUES(1),(2),(3)) r(a) LIMIT 2 OFFSET 2; - a | generate_series ----+----------------- - 2 | 1 - 2 | 2 -(2 rows) - --- SRFs are not allowed in LIMIT. -SELECT 1 LIMIT generate_series(1,3); -ERROR: set-returning functions are not allowed in LIMIT -LINE 1: SELECT 1 LIMIT generate_series(1,3); - ^ --- tSRF in correlated subquery, referencing table outside -SELECT (SELECT generate_series(1,3) LIMIT 1 OFFSET few.id) FROM few; - generate_series ------------------ - 2 - 3 - -(3 rows) - --- tSRF in correlated subquery, referencing SRF outside -SELECT (SELECT generate_series(1,3) LIMIT 1 OFFSET g.i) FROM generate_series(0,3) g(i); - generate_series ------------------ - 1 - 2 - 3 - -(4 rows) - --- Operators can return sets too -CREATE OPERATOR |@| (PROCEDURE = unnest, RIGHTARG = ANYARRAY); -SELECT |@|ARRAY[1,2,3]; - ?column? ----------- - 1 - 2 - 3 -(3 rows) - --- Some fun cases involving duplicate SRF calls -explain (verbose, costs off) -select generate_series(1,3) as x, generate_series(1,3) + 1 as xp1; - QUERY PLAN ------------------------------------------------------------------- - Result - Output: (generate_series(1, 3)), ((generate_series(1, 3)) + 1) - -> ProjectSet - Output: generate_series(1, 3) - -> Result -(5 rows) - -select generate_series(1,3) as x, generate_series(1,3) + 1 as xp1; - x | xp1 ----+----- - 1 | 2 - 2 | 3 - 3 | 4 -(3 rows) - -explain (verbose, costs off) -select generate_series(1,3)+1 order by generate_series(1,3); - QUERY PLAN ------------------------------------------------------------------------- - Sort - Output: (((generate_series(1, 3)) + 1)), (generate_series(1, 3)) - Sort Key: (generate_series(1, 3)) - -> Result - Output: ((generate_series(1, 3)) + 1), (generate_series(1, 3)) - -> ProjectSet - Output: generate_series(1, 3) - -> Result -(8 rows) - -select generate_series(1,3)+1 order by generate_series(1,3); - ?column? ----------- - 2 - 3 - 4 -(3 rows) - --- Check that SRFs of same nesting level run in lockstep -explain (verbose, costs off) -select generate_series(1,3) as x, generate_series(3,6) + 1 as y; - QUERY PLAN ------------------------------------------------------------------- - Result - Output: (generate_series(1, 3)), ((generate_series(3, 6)) + 1) - -> ProjectSet - Output: generate_series(1, 3), generate_series(3, 6) - -> Result -(5 rows) - -select generate_series(1,3) as x, generate_series(3,6) + 1 as y; - x | y ----+--- - 1 | 4 - 2 | 5 - 3 | 6 - | 7 -(4 rows) - --- Clean up -DROP TABLE few; -DROP TABLE fewmore; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/tid.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/tid.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/tid.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/tid.out 2023-02-20 19:46:55.999214032 -0500 @@ -1,76 +1 @@ --- tests for functions related to TID handling -CREATE TABLE tid_tab (a int); --- min() and max() for TIDs -INSERT INTO tid_tab VALUES (1), (2); -SELECT min(ctid) FROM tid_tab; - min -------- - (0,1) -(1 row) - -SELECT max(ctid) FROM tid_tab; - max -------- - (0,2) -(1 row) - -TRUNCATE tid_tab; --- Tests for currtid2() with various relation kinds --- Materialized view -CREATE MATERIALIZED VIEW tid_matview AS SELECT a FROM tid_tab; -SELECT currtid2('tid_matview'::text, '(0,1)'::tid); -- fails -ERROR: tid (0, 1) is not valid for relation "tid_matview" -INSERT INTO tid_tab VALUES (1); -REFRESH MATERIALIZED VIEW tid_matview; -SELECT currtid2('tid_matview'::text, '(0,1)'::tid); -- ok - currtid2 ----------- - (0,1) -(1 row) - -DROP MATERIALIZED VIEW tid_matview; -TRUNCATE tid_tab; --- Sequence -CREATE SEQUENCE tid_seq; -SELECT currtid2('tid_seq'::text, '(0,1)'::tid); -- ok - currtid2 ----------- - (0,1) -(1 row) - -DROP SEQUENCE tid_seq; --- Index, fails with incorrect relation type -CREATE INDEX tid_ind ON tid_tab(a); -SELECT currtid2('tid_ind'::text, '(0,1)'::tid); -- fails -ERROR: "tid_ind" is an index -DROP INDEX tid_ind; --- Partitioned table, no storage -CREATE TABLE tid_part (a int) PARTITION BY RANGE (a); -SELECT currtid2('tid_part'::text, '(0,1)'::tid); -- fails -ERROR: cannot look at latest visible tid for relation "public.tid_part" -DROP TABLE tid_part; --- Views --- ctid not defined in the view -CREATE VIEW tid_view_no_ctid AS SELECT a FROM tid_tab; -SELECT currtid2('tid_view_no_ctid'::text, '(0,1)'::tid); -- fails -ERROR: currtid cannot handle views with no CTID -DROP VIEW tid_view_no_ctid; --- ctid fetched directly from the source table. -CREATE VIEW tid_view_with_ctid AS SELECT ctid, a FROM tid_tab; -SELECT currtid2('tid_view_with_ctid'::text, '(0,1)'::tid); -- fails -ERROR: tid (0, 1) is not valid for relation "tid_tab" -INSERT INTO tid_tab VALUES (1); -SELECT currtid2('tid_view_with_ctid'::text, '(0,1)'::tid); -- ok - currtid2 ----------- - (0,1) -(1 row) - -DROP VIEW tid_view_with_ctid; -TRUNCATE tid_tab; --- ctid attribute with incorrect data type -CREATE VIEW tid_view_fake_ctid AS SELECT 1 AS ctid, 2 AS a; -SELECT currtid2('tid_view_fake_ctid'::text, '(0,1)'::tid); -- fails -ERROR: ctid isn't of type TID -DROP VIEW tid_view_fake_ctid; -DROP TABLE tid_tab CASCADE; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/tidscan.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/tidscan.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/tidscan.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/tidscan.out 2023-02-20 19:46:56.279214044 -0500 @@ -1,296 +1 @@ --- tests for tidscans -CREATE TABLE tidscan(id integer); --- only insert a few rows, we don't want to spill onto a second table page -INSERT INTO tidscan VALUES (1), (2), (3); --- show ctids -SELECT ctid, * FROM tidscan; - ctid | id --------+---- - (0,1) | 1 - (0,2) | 2 - (0,3) | 3 -(3 rows) - --- ctid equality - implemented as tidscan -EXPLAIN (COSTS OFF) -SELECT ctid, * FROM tidscan WHERE ctid = '(0,1)'; - QUERY PLAN ------------------------------------ - Tid Scan on tidscan - TID Cond: (ctid = '(0,1)'::tid) -(2 rows) - -SELECT ctid, * FROM tidscan WHERE ctid = '(0,1)'; - ctid | id --------+---- - (0,1) | 1 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT ctid, * FROM tidscan WHERE '(0,1)' = ctid; - QUERY PLAN ------------------------------------ - Tid Scan on tidscan - TID Cond: ('(0,1)'::tid = ctid) -(2 rows) - -SELECT ctid, * FROM tidscan WHERE '(0,1)' = ctid; - ctid | id --------+---- - (0,1) | 1 -(1 row) - --- OR'd clauses -EXPLAIN (COSTS OFF) -SELECT ctid, * FROM tidscan WHERE ctid = '(0,2)' OR '(0,1)' = ctid; - QUERY PLAN --------------------------------------------------------------- - Tid Scan on tidscan - TID Cond: ((ctid = '(0,2)'::tid) OR ('(0,1)'::tid = ctid)) -(2 rows) - -SELECT ctid, * FROM tidscan WHERE ctid = '(0,2)' OR '(0,1)' = ctid; - ctid | id --------+---- - (0,1) | 1 - (0,2) | 2 -(2 rows) - --- ctid = ScalarArrayOp - implemented as tidscan -EXPLAIN (COSTS OFF) -SELECT ctid, * FROM tidscan WHERE ctid = ANY(ARRAY['(0,1)', '(0,2)']::tid[]); - QUERY PLAN -------------------------------------------------------- - Tid Scan on tidscan - TID Cond: (ctid = ANY ('{"(0,1)","(0,2)"}'::tid[])) -(2 rows) - -SELECT ctid, * FROM tidscan WHERE ctid = ANY(ARRAY['(0,1)', '(0,2)']::tid[]); - ctid | id --------+---- - (0,1) | 1 - (0,2) | 2 -(2 rows) - --- ctid != ScalarArrayOp - can't be implemented as tidscan -EXPLAIN (COSTS OFF) -SELECT ctid, * FROM tidscan WHERE ctid != ANY(ARRAY['(0,1)', '(0,2)']::tid[]); - QUERY PLAN ------------------------------------------------------- - Seq Scan on tidscan - Filter: (ctid <> ANY ('{"(0,1)","(0,2)"}'::tid[])) -(2 rows) - -SELECT ctid, * FROM tidscan WHERE ctid != ANY(ARRAY['(0,1)', '(0,2)']::tid[]); - ctid | id --------+---- - (0,1) | 1 - (0,2) | 2 - (0,3) | 3 -(3 rows) - --- tid equality extracted from sub-AND clauses -EXPLAIN (COSTS OFF) -SELECT ctid, * FROM tidscan -WHERE (id = 3 AND ctid IN ('(0,2)', '(0,3)')) OR (ctid = '(0,1)' AND id = 1); - QUERY PLAN --------------------------------------------------------------------------------------------------------------- - Tid Scan on tidscan - TID Cond: ((ctid = ANY ('{"(0,2)","(0,3)"}'::tid[])) OR (ctid = '(0,1)'::tid)) - Filter: (((id = 3) AND (ctid = ANY ('{"(0,2)","(0,3)"}'::tid[]))) OR ((ctid = '(0,1)'::tid) AND (id = 1))) -(3 rows) - -SELECT ctid, * FROM tidscan -WHERE (id = 3 AND ctid IN ('(0,2)', '(0,3)')) OR (ctid = '(0,1)' AND id = 1); - ctid | id --------+---- - (0,1) | 1 - (0,3) | 3 -(2 rows) - --- nestloop-with-inner-tidscan joins on tid -SET enable_hashjoin TO off; -- otherwise hash join might win -EXPLAIN (COSTS OFF) -SELECT t1.ctid, t1.*, t2.ctid, t2.* -FROM tidscan t1 JOIN tidscan t2 ON t1.ctid = t2.ctid WHERE t1.id = 1; - QUERY PLAN ------------------------------------- - Nested Loop - -> Seq Scan on tidscan t1 - Filter: (id = 1) - -> Tid Scan on tidscan t2 - TID Cond: (ctid = t1.ctid) -(5 rows) - -SELECT t1.ctid, t1.*, t2.ctid, t2.* -FROM tidscan t1 JOIN tidscan t2 ON t1.ctid = t2.ctid WHERE t1.id = 1; - ctid | id | ctid | id --------+----+-------+---- - (0,1) | 1 | (0,1) | 1 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT t1.ctid, t1.*, t2.ctid, t2.* -FROM tidscan t1 LEFT JOIN tidscan t2 ON t1.ctid = t2.ctid WHERE t1.id = 1; - QUERY PLAN ------------------------------------- - Nested Loop Left Join - -> Seq Scan on tidscan t1 - Filter: (id = 1) - -> Tid Scan on tidscan t2 - TID Cond: (t1.ctid = ctid) -(5 rows) - -SELECT t1.ctid, t1.*, t2.ctid, t2.* -FROM tidscan t1 LEFT JOIN tidscan t2 ON t1.ctid = t2.ctid WHERE t1.id = 1; - ctid | id | ctid | id --------+----+-------+---- - (0,1) | 1 | (0,1) | 1 -(1 row) - -RESET enable_hashjoin; --- exercise backward scan and rewind -BEGIN; -DECLARE c CURSOR FOR -SELECT ctid, * FROM tidscan WHERE ctid = ANY(ARRAY['(0,1)', '(0,2)']::tid[]); -FETCH ALL FROM c; - ctid | id --------+---- - (0,1) | 1 - (0,2) | 2 -(2 rows) - -FETCH BACKWARD 1 FROM c; - ctid | id --------+---- - (0,2) | 2 -(1 row) - -FETCH FIRST FROM c; - ctid | id --------+---- - (0,1) | 1 -(1 row) - -ROLLBACK; --- tidscan via CURRENT OF -BEGIN; -DECLARE c CURSOR FOR SELECT ctid, * FROM tidscan; -FETCH NEXT FROM c; -- skip one row - ctid | id --------+---- - (0,1) | 1 -(1 row) - -FETCH NEXT FROM c; - ctid | id --------+---- - (0,2) | 2 -(1 row) - --- perform update -EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) -UPDATE tidscan SET id = -id WHERE CURRENT OF c RETURNING *; - QUERY PLAN ---------------------------------------------------- - Update on tidscan (actual rows=1 loops=1) - -> Tid Scan on tidscan (actual rows=1 loops=1) - TID Cond: CURRENT OF c -(3 rows) - -FETCH NEXT FROM c; - ctid | id --------+---- - (0,3) | 3 -(1 row) - --- perform update -EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) -UPDATE tidscan SET id = -id WHERE CURRENT OF c RETURNING *; - QUERY PLAN ---------------------------------------------------- - Update on tidscan (actual rows=1 loops=1) - -> Tid Scan on tidscan (actual rows=1 loops=1) - TID Cond: CURRENT OF c -(3 rows) - -SELECT * FROM tidscan; - id ----- - 1 - -2 - -3 -(3 rows) - --- position cursor past any rows -FETCH NEXT FROM c; - ctid | id -------+---- -(0 rows) - --- should error out -EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) -UPDATE tidscan SET id = -id WHERE CURRENT OF c RETURNING *; -ERROR: cursor "c" is not positioned on a row -ROLLBACK; --- bulk joins on CTID --- (these plans don't use TID scans, but this still seems like an --- appropriate place for these tests) -EXPLAIN (COSTS OFF) -SELECT count(*) FROM tenk1 t1 JOIN tenk1 t2 ON t1.ctid = t2.ctid; - QUERY PLAN ----------------------------------------- - Aggregate - -> Hash Join - Hash Cond: (t1.ctid = t2.ctid) - -> Seq Scan on tenk1 t1 - -> Hash - -> Seq Scan on tenk1 t2 -(6 rows) - -SELECT count(*) FROM tenk1 t1 JOIN tenk1 t2 ON t1.ctid = t2.ctid; - count -------- - 10000 -(1 row) - -SET enable_hashjoin TO off; -EXPLAIN (COSTS OFF) -SELECT count(*) FROM tenk1 t1 JOIN tenk1 t2 ON t1.ctid = t2.ctid; - QUERY PLAN ------------------------------------------ - Aggregate - -> Merge Join - Merge Cond: (t1.ctid = t2.ctid) - -> Sort - Sort Key: t1.ctid - -> Seq Scan on tenk1 t1 - -> Sort - Sort Key: t2.ctid - -> Seq Scan on tenk1 t2 -(9 rows) - -SELECT count(*) FROM tenk1 t1 JOIN tenk1 t2 ON t1.ctid = t2.ctid; - count -------- - 10000 -(1 row) - -RESET enable_hashjoin; --- check predicate lock on CTID -BEGIN ISOLATION LEVEL SERIALIZABLE; -SELECT * FROM tidscan WHERE ctid = '(0,1)'; - id ----- - 1 -(1 row) - --- locktype should be 'tuple' -SELECT locktype, mode FROM pg_locks WHERE pid = pg_backend_pid() AND mode = 'SIReadLock'; - locktype | mode -----------+------------ - tuple | SIReadLock -(1 row) - -ROLLBACK; -DROP TABLE tidscan; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/tidrangescan.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/tidrangescan.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/tidrangescan.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/tidrangescan.out 2023-02-20 19:46:56.309214045 -0500 @@ -1,300 +1 @@ --- tests for tidrangescans -SET enable_seqscan TO off; -CREATE TABLE tidrangescan(id integer, data text); --- empty table -EXPLAIN (COSTS OFF) -SELECT ctid FROM tidrangescan WHERE ctid < '(1, 0)'; - QUERY PLAN ------------------------------------ - Tid Range Scan on tidrangescan - TID Cond: (ctid < '(1,0)'::tid) -(2 rows) - -SELECT ctid FROM tidrangescan WHERE ctid < '(1, 0)'; - ctid ------- -(0 rows) - -EXPLAIN (COSTS OFF) -SELECT ctid FROM tidrangescan WHERE ctid > '(9, 0)'; - QUERY PLAN ------------------------------------ - Tid Range Scan on tidrangescan - TID Cond: (ctid > '(9,0)'::tid) -(2 rows) - -SELECT ctid FROM tidrangescan WHERE ctid > '(9, 0)'; - ctid ------- -(0 rows) - --- insert enough tuples to fill at least two pages -INSERT INTO tidrangescan SELECT i,repeat('x', 100) FROM generate_series(1,200) AS s(i); --- remove all tuples after the 10th tuple on each page. Trying to ensure --- we get the same layout with all CPU architectures and smaller than standard --- page sizes. -DELETE FROM tidrangescan -WHERE substring(ctid::text FROM ',(\d+)\)')::integer > 10 OR substring(ctid::text FROM '\((\d+),')::integer > 2; -VACUUM tidrangescan; --- range scans with upper bound -EXPLAIN (COSTS OFF) -SELECT ctid FROM tidrangescan WHERE ctid < '(1,0)'; - QUERY PLAN ------------------------------------ - Tid Range Scan on tidrangescan - TID Cond: (ctid < '(1,0)'::tid) -(2 rows) - -SELECT ctid FROM tidrangescan WHERE ctid < '(1,0)'; - ctid --------- - (0,1) - (0,2) - (0,3) - (0,4) - (0,5) - (0,6) - (0,7) - (0,8) - (0,9) - (0,10) -(10 rows) - -EXPLAIN (COSTS OFF) -SELECT ctid FROM tidrangescan WHERE ctid <= '(1,5)'; - QUERY PLAN ------------------------------------- - Tid Range Scan on tidrangescan - TID Cond: (ctid <= '(1,5)'::tid) -(2 rows) - -SELECT ctid FROM tidrangescan WHERE ctid <= '(1,5)'; - ctid --------- - (0,1) - (0,2) - (0,3) - (0,4) - (0,5) - (0,6) - (0,7) - (0,8) - (0,9) - (0,10) - (1,1) - (1,2) - (1,3) - (1,4) - (1,5) -(15 rows) - -EXPLAIN (COSTS OFF) -SELECT ctid FROM tidrangescan WHERE ctid < '(0,0)'; - QUERY PLAN ------------------------------------ - Tid Range Scan on tidrangescan - TID Cond: (ctid < '(0,0)'::tid) -(2 rows) - -SELECT ctid FROM tidrangescan WHERE ctid < '(0,0)'; - ctid ------- -(0 rows) - --- range scans with lower bound -EXPLAIN (COSTS OFF) -SELECT ctid FROM tidrangescan WHERE ctid > '(2,8)'; - QUERY PLAN ------------------------------------ - Tid Range Scan on tidrangescan - TID Cond: (ctid > '(2,8)'::tid) -(2 rows) - -SELECT ctid FROM tidrangescan WHERE ctid > '(2,8)'; - ctid --------- - (2,9) - (2,10) -(2 rows) - -EXPLAIN (COSTS OFF) -SELECT ctid FROM tidrangescan WHERE '(2,8)' < ctid; - QUERY PLAN ------------------------------------ - Tid Range Scan on tidrangescan - TID Cond: ('(2,8)'::tid < ctid) -(2 rows) - -SELECT ctid FROM tidrangescan WHERE '(2,8)' < ctid; - ctid --------- - (2,9) - (2,10) -(2 rows) - -EXPLAIN (COSTS OFF) -SELECT ctid FROM tidrangescan WHERE ctid >= '(2,8)'; - QUERY PLAN ------------------------------------- - Tid Range Scan on tidrangescan - TID Cond: (ctid >= '(2,8)'::tid) -(2 rows) - -SELECT ctid FROM tidrangescan WHERE ctid >= '(2,8)'; - ctid --------- - (2,8) - (2,9) - (2,10) -(3 rows) - -EXPLAIN (COSTS OFF) -SELECT ctid FROM tidrangescan WHERE ctid >= '(100,0)'; - QUERY PLAN --------------------------------------- - Tid Range Scan on tidrangescan - TID Cond: (ctid >= '(100,0)'::tid) -(2 rows) - -SELECT ctid FROM tidrangescan WHERE ctid >= '(100,0)'; - ctid ------- -(0 rows) - --- range scans with both bounds -EXPLAIN (COSTS OFF) -SELECT ctid FROM tidrangescan WHERE ctid > '(1,4)' AND '(1,7)' >= ctid; - QUERY PLAN ----------------------------------------------------------------- - Tid Range Scan on tidrangescan - TID Cond: ((ctid > '(1,4)'::tid) AND ('(1,7)'::tid >= ctid)) -(2 rows) - -SELECT ctid FROM tidrangescan WHERE ctid > '(1,4)' AND '(1,7)' >= ctid; - ctid -------- - (1,5) - (1,6) - (1,7) -(3 rows) - -EXPLAIN (COSTS OFF) -SELECT ctid FROM tidrangescan WHERE '(1,7)' >= ctid AND ctid > '(1,4)'; - QUERY PLAN ----------------------------------------------------------------- - Tid Range Scan on tidrangescan - TID Cond: (('(1,7)'::tid >= ctid) AND (ctid > '(1,4)'::tid)) -(2 rows) - -SELECT ctid FROM tidrangescan WHERE '(1,7)' >= ctid AND ctid > '(1,4)'; - ctid -------- - (1,5) - (1,6) - (1,7) -(3 rows) - --- extreme offsets -SELECT ctid FROM tidrangescan WHERE ctid > '(0,65535)' AND ctid < '(1,0)' LIMIT 1; - ctid ------- -(0 rows) - -SELECT ctid FROM tidrangescan WHERE ctid < '(0,0)' LIMIT 1; - ctid ------- -(0 rows) - -SELECT ctid FROM tidrangescan WHERE ctid > '(4294967295,65535)'; - ctid ------- -(0 rows) - -SELECT ctid FROM tidrangescan WHERE ctid < '(0,0)'; - ctid ------- -(0 rows) - --- NULLs in the range cannot return tuples -SELECT ctid FROM tidrangescan WHERE ctid >= (SELECT NULL::tid); - ctid ------- -(0 rows) - --- rescans -EXPLAIN (COSTS OFF) -SELECT t.ctid,t2.c FROM tidrangescan t, -LATERAL (SELECT count(*) c FROM tidrangescan t2 WHERE t2.ctid <= t.ctid) t2 -WHERE t.ctid < '(1,0)'; - QUERY PLAN ------------------------------------------------ - Nested Loop - -> Tid Range Scan on tidrangescan t - TID Cond: (ctid < '(1,0)'::tid) - -> Aggregate - -> Tid Range Scan on tidrangescan t2 - TID Cond: (ctid <= t.ctid) -(6 rows) - -SELECT t.ctid,t2.c FROM tidrangescan t, -LATERAL (SELECT count(*) c FROM tidrangescan t2 WHERE t2.ctid <= t.ctid) t2 -WHERE t.ctid < '(1,0)'; - ctid | c ---------+---- - (0,1) | 1 - (0,2) | 2 - (0,3) | 3 - (0,4) | 4 - (0,5) | 5 - (0,6) | 6 - (0,7) | 7 - (0,8) | 8 - (0,9) | 9 - (0,10) | 10 -(10 rows) - --- cursors --- Ensure we get a TID Range scan without a Materialize node. -EXPLAIN (COSTS OFF) -DECLARE c SCROLL CURSOR FOR SELECT ctid FROM tidrangescan WHERE ctid < '(1,0)'; - QUERY PLAN ------------------------------------ - Tid Range Scan on tidrangescan - TID Cond: (ctid < '(1,0)'::tid) -(2 rows) - -BEGIN; -DECLARE c SCROLL CURSOR FOR SELECT ctid FROM tidrangescan WHERE ctid < '(1,0)'; -FETCH NEXT c; - ctid -------- - (0,1) -(1 row) - -FETCH NEXT c; - ctid -------- - (0,2) -(1 row) - -FETCH PRIOR c; - ctid -------- - (0,1) -(1 row) - -FETCH FIRST c; - ctid -------- - (0,1) -(1 row) - -FETCH LAST c; - ctid --------- - (0,10) -(1 row) - -COMMIT; -DROP TABLE tidrangescan; -RESET enable_seqscan; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/collate.icu.utf8_1.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/collate.icu.utf8.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/collate.icu.utf8_1.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/collate.icu.utf8.out 2023-02-20 19:46:56.319214046 -0500 @@ -1,9 +1 @@ -/* - * This test is for ICU collations. - */ -/* skip test if not UTF8 server encoding or no ICU collations installed */ -SELECT getdatabaseencoding() <> 'UTF8' OR - (SELECT count(*) FROM pg_collation WHERE collprovider = 'i') = 0 - AS skip_test \gset -\if :skip_test -\quit +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/incremental_sort.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/incremental_sort.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/incremental_sort.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/incremental_sort.out 2023-02-20 19:46:56.389214049 -0500 @@ -1,1688 +1 @@ --- When we have to sort the entire table, incremental sort will --- be slower than plain sort, so it should not be used. -explain (costs off) -select * from (select * from tenk1 order by four) t order by four, ten; - QUERY PLAN ------------------------------------ - Sort - Sort Key: tenk1.four, tenk1.ten - -> Sort - Sort Key: tenk1.four - -> Seq Scan on tenk1 -(5 rows) - --- When there is a LIMIT clause, incremental sort is beneficial because --- it only has to sort some of the groups, and not the entire table. -explain (costs off) -select * from (select * from tenk1 order by four) t order by four, ten -limit 1; - QUERY PLAN ------------------------------------------ - Limit - -> Incremental Sort - Sort Key: tenk1.four, tenk1.ten - Presorted Key: tenk1.four - -> Sort - Sort Key: tenk1.four - -> Seq Scan on tenk1 -(7 rows) - --- When work_mem is not enough to sort the entire table, incremental sort --- may be faster if individual groups still fit into work_mem. -set work_mem to '2MB'; -explain (costs off) -select * from (select * from tenk1 order by four) t order by four, ten; - QUERY PLAN ------------------------------------ - Incremental Sort - Sort Key: tenk1.four, tenk1.ten - Presorted Key: tenk1.four - -> Sort - Sort Key: tenk1.four - -> Seq Scan on tenk1 -(6 rows) - -reset work_mem; -create table t(a integer, b integer); -create or replace function explain_analyze_without_memory(query text) -returns table (out_line text) language plpgsql -as -$$ -declare - line text; -begin - for line in - execute 'explain (analyze, costs off, summary off, timing off) ' || query - loop - out_line := regexp_replace(line, '\d+kB', 'NNkB', 'g'); - return next; - end loop; -end; -$$; -create or replace function explain_analyze_inc_sort_nodes(query text) -returns jsonb language plpgsql -as -$$ -declare - elements jsonb; - element jsonb; - matching_nodes jsonb := '[]'::jsonb; -begin - execute 'explain (analyze, costs off, summary off, timing off, format ''json'') ' || query into strict elements; - while jsonb_array_length(elements) > 0 loop - element := elements->0; - elements := elements - 0; - case jsonb_typeof(element) - when 'array' then - if jsonb_array_length(element) > 0 then - elements := elements || element; - end if; - when 'object' then - if element ? 'Plan' then - elements := elements || jsonb_build_array(element->'Plan'); - element := element - 'Plan'; - else - if element ? 'Plans' then - elements := elements || jsonb_build_array(element->'Plans'); - element := element - 'Plans'; - end if; - if (element->>'Node Type')::text = 'Incremental Sort' then - matching_nodes := matching_nodes || element; - end if; - end if; - end case; - end loop; - return matching_nodes; -end; -$$; -create or replace function explain_analyze_inc_sort_nodes_without_memory(query text) -returns jsonb language plpgsql -as -$$ -declare - nodes jsonb := '[]'::jsonb; - node jsonb; - group_key text; - space_key text; -begin - for node in select * from jsonb_array_elements(explain_analyze_inc_sort_nodes(query)) t loop - for group_key in select unnest(array['Full-sort Groups', 'Pre-sorted Groups']::text[]) t loop - for space_key in select unnest(array['Sort Space Memory', 'Sort Space Disk']::text[]) t loop - node := jsonb_set(node, array[group_key, space_key, 'Average Sort Space Used'], '"NN"', false); - node := jsonb_set(node, array[group_key, space_key, 'Peak Sort Space Used'], '"NN"', false); - end loop; - end loop; - nodes := nodes || node; - end loop; - return nodes; -end; -$$; -create or replace function explain_analyze_inc_sort_nodes_verify_invariants(query text) -returns bool language plpgsql -as -$$ -declare - node jsonb; - group_stats jsonb; - group_key text; - space_key text; -begin - for node in select * from jsonb_array_elements(explain_analyze_inc_sort_nodes(query)) t loop - for group_key in select unnest(array['Full-sort Groups', 'Pre-sorted Groups']::text[]) t loop - group_stats := node->group_key; - for space_key in select unnest(array['Sort Space Memory', 'Sort Space Disk']::text[]) t loop - if (group_stats->space_key->'Peak Sort Space Used')::bigint < (group_stats->space_key->'Peak Sort Space Used')::bigint then - raise exception '% has invalid max space < average space', group_key; - end if; - end loop; - end loop; - end loop; - return true; -end; -$$; --- A single large group tested around each mode transition point. -insert into t(a, b) select i/100 + 1, i + 1 from generate_series(0, 999) n(i); -analyze t; -explain (costs off) select * from (select * from t order by a) s order by a, b limit 31; - QUERY PLAN ---------------------------------- - Limit - -> Incremental Sort - Sort Key: t.a, t.b - Presorted Key: t.a - -> Sort - Sort Key: t.a - -> Seq Scan on t -(7 rows) - -select * from (select * from t order by a) s order by a, b limit 31; - a | b ----+---- - 1 | 1 - 1 | 2 - 1 | 3 - 1 | 4 - 1 | 5 - 1 | 6 - 1 | 7 - 1 | 8 - 1 | 9 - 1 | 10 - 1 | 11 - 1 | 12 - 1 | 13 - 1 | 14 - 1 | 15 - 1 | 16 - 1 | 17 - 1 | 18 - 1 | 19 - 1 | 20 - 1 | 21 - 1 | 22 - 1 | 23 - 1 | 24 - 1 | 25 - 1 | 26 - 1 | 27 - 1 | 28 - 1 | 29 - 1 | 30 - 1 | 31 -(31 rows) - -explain (costs off) select * from (select * from t order by a) s order by a, b limit 32; - QUERY PLAN ---------------------------------- - Limit - -> Incremental Sort - Sort Key: t.a, t.b - Presorted Key: t.a - -> Sort - Sort Key: t.a - -> Seq Scan on t -(7 rows) - -select * from (select * from t order by a) s order by a, b limit 32; - a | b ----+---- - 1 | 1 - 1 | 2 - 1 | 3 - 1 | 4 - 1 | 5 - 1 | 6 - 1 | 7 - 1 | 8 - 1 | 9 - 1 | 10 - 1 | 11 - 1 | 12 - 1 | 13 - 1 | 14 - 1 | 15 - 1 | 16 - 1 | 17 - 1 | 18 - 1 | 19 - 1 | 20 - 1 | 21 - 1 | 22 - 1 | 23 - 1 | 24 - 1 | 25 - 1 | 26 - 1 | 27 - 1 | 28 - 1 | 29 - 1 | 30 - 1 | 31 - 1 | 32 -(32 rows) - -explain (costs off) select * from (select * from t order by a) s order by a, b limit 33; - QUERY PLAN ---------------------------------- - Limit - -> Incremental Sort - Sort Key: t.a, t.b - Presorted Key: t.a - -> Sort - Sort Key: t.a - -> Seq Scan on t -(7 rows) - -select * from (select * from t order by a) s order by a, b limit 33; - a | b ----+---- - 1 | 1 - 1 | 2 - 1 | 3 - 1 | 4 - 1 | 5 - 1 | 6 - 1 | 7 - 1 | 8 - 1 | 9 - 1 | 10 - 1 | 11 - 1 | 12 - 1 | 13 - 1 | 14 - 1 | 15 - 1 | 16 - 1 | 17 - 1 | 18 - 1 | 19 - 1 | 20 - 1 | 21 - 1 | 22 - 1 | 23 - 1 | 24 - 1 | 25 - 1 | 26 - 1 | 27 - 1 | 28 - 1 | 29 - 1 | 30 - 1 | 31 - 1 | 32 - 1 | 33 -(33 rows) - -explain (costs off) select * from (select * from t order by a) s order by a, b limit 65; - QUERY PLAN ---------------------------------- - Limit - -> Incremental Sort - Sort Key: t.a, t.b - Presorted Key: t.a - -> Sort - Sort Key: t.a - -> Seq Scan on t -(7 rows) - -select * from (select * from t order by a) s order by a, b limit 65; - a | b ----+---- - 1 | 1 - 1 | 2 - 1 | 3 - 1 | 4 - 1 | 5 - 1 | 6 - 1 | 7 - 1 | 8 - 1 | 9 - 1 | 10 - 1 | 11 - 1 | 12 - 1 | 13 - 1 | 14 - 1 | 15 - 1 | 16 - 1 | 17 - 1 | 18 - 1 | 19 - 1 | 20 - 1 | 21 - 1 | 22 - 1 | 23 - 1 | 24 - 1 | 25 - 1 | 26 - 1 | 27 - 1 | 28 - 1 | 29 - 1 | 30 - 1 | 31 - 1 | 32 - 1 | 33 - 1 | 34 - 1 | 35 - 1 | 36 - 1 | 37 - 1 | 38 - 1 | 39 - 1 | 40 - 1 | 41 - 1 | 42 - 1 | 43 - 1 | 44 - 1 | 45 - 1 | 46 - 1 | 47 - 1 | 48 - 1 | 49 - 1 | 50 - 1 | 51 - 1 | 52 - 1 | 53 - 1 | 54 - 1 | 55 - 1 | 56 - 1 | 57 - 1 | 58 - 1 | 59 - 1 | 60 - 1 | 61 - 1 | 62 - 1 | 63 - 1 | 64 - 1 | 65 -(65 rows) - -explain (costs off) select * from (select * from t order by a) s order by a, b limit 66; - QUERY PLAN ---------------------------------- - Limit - -> Incremental Sort - Sort Key: t.a, t.b - Presorted Key: t.a - -> Sort - Sort Key: t.a - -> Seq Scan on t -(7 rows) - -select * from (select * from t order by a) s order by a, b limit 66; - a | b ----+---- - 1 | 1 - 1 | 2 - 1 | 3 - 1 | 4 - 1 | 5 - 1 | 6 - 1 | 7 - 1 | 8 - 1 | 9 - 1 | 10 - 1 | 11 - 1 | 12 - 1 | 13 - 1 | 14 - 1 | 15 - 1 | 16 - 1 | 17 - 1 | 18 - 1 | 19 - 1 | 20 - 1 | 21 - 1 | 22 - 1 | 23 - 1 | 24 - 1 | 25 - 1 | 26 - 1 | 27 - 1 | 28 - 1 | 29 - 1 | 30 - 1 | 31 - 1 | 32 - 1 | 33 - 1 | 34 - 1 | 35 - 1 | 36 - 1 | 37 - 1 | 38 - 1 | 39 - 1 | 40 - 1 | 41 - 1 | 42 - 1 | 43 - 1 | 44 - 1 | 45 - 1 | 46 - 1 | 47 - 1 | 48 - 1 | 49 - 1 | 50 - 1 | 51 - 1 | 52 - 1 | 53 - 1 | 54 - 1 | 55 - 1 | 56 - 1 | 57 - 1 | 58 - 1 | 59 - 1 | 60 - 1 | 61 - 1 | 62 - 1 | 63 - 1 | 64 - 1 | 65 - 1 | 66 -(66 rows) - -delete from t; --- An initial large group followed by a small group. -insert into t(a, b) select i/50 + 1, i + 1 from generate_series(0, 999) n(i); -analyze t; -explain (costs off) select * from (select * from t order by a) s order by a, b limit 55; - QUERY PLAN ---------------------------------- - Limit - -> Incremental Sort - Sort Key: t.a, t.b - Presorted Key: t.a - -> Sort - Sort Key: t.a - -> Seq Scan on t -(7 rows) - -select * from (select * from t order by a) s order by a, b limit 55; - a | b ----+---- - 1 | 1 - 1 | 2 - 1 | 3 - 1 | 4 - 1 | 5 - 1 | 6 - 1 | 7 - 1 | 8 - 1 | 9 - 1 | 10 - 1 | 11 - 1 | 12 - 1 | 13 - 1 | 14 - 1 | 15 - 1 | 16 - 1 | 17 - 1 | 18 - 1 | 19 - 1 | 20 - 1 | 21 - 1 | 22 - 1 | 23 - 1 | 24 - 1 | 25 - 1 | 26 - 1 | 27 - 1 | 28 - 1 | 29 - 1 | 30 - 1 | 31 - 1 | 32 - 1 | 33 - 1 | 34 - 1 | 35 - 1 | 36 - 1 | 37 - 1 | 38 - 1 | 39 - 1 | 40 - 1 | 41 - 1 | 42 - 1 | 43 - 1 | 44 - 1 | 45 - 1 | 46 - 1 | 47 - 1 | 48 - 1 | 49 - 1 | 50 - 2 | 51 - 2 | 52 - 2 | 53 - 2 | 54 - 2 | 55 -(55 rows) - --- Test EXPLAIN ANALYZE with only a fullsort group. -select explain_analyze_without_memory('select * from (select * from t order by a) s order by a, b limit 55'); - explain_analyze_without_memory ---------------------------------------------------------------------------------------------------------------- - Limit (actual rows=55 loops=1) - -> Incremental Sort (actual rows=55 loops=1) - Sort Key: t.a, t.b - Presorted Key: t.a - Full-sort Groups: 2 Sort Methods: top-N heapsort, quicksort Average Memory: NNkB Peak Memory: NNkB - -> Sort (actual rows=101 loops=1) - Sort Key: t.a - Sort Method: quicksort Memory: NNkB - -> Seq Scan on t (actual rows=1000 loops=1) -(9 rows) - -select jsonb_pretty(explain_analyze_inc_sort_nodes_without_memory('select * from (select * from t order by a) s order by a, b limit 55')); - jsonb_pretty -------------------------------------------------- - [ + - { + - "Sort Key": [ + - "t.a", + - "t.b" + - ], + - "Node Type": "Incremental Sort", + - "Actual Rows": 55, + - "Actual Loops": 1, + - "Async Capable": false, + - "Presorted Key": [ + - "t.a" + - ], + - "Parallel Aware": false, + - "Full-sort Groups": { + - "Group Count": 2, + - "Sort Methods Used": [ + - "top-N heapsort", + - "quicksort" + - ], + - "Sort Space Memory": { + - "Peak Sort Space Used": "NN", + - "Average Sort Space Used": "NN"+ - } + - }, + - "Parent Relationship": "Outer" + - } + - ] -(1 row) - -select explain_analyze_inc_sort_nodes_verify_invariants('select * from (select * from t order by a) s order by a, b limit 55'); - explain_analyze_inc_sort_nodes_verify_invariants --------------------------------------------------- - t -(1 row) - -delete from t; --- An initial small group followed by a large group. -insert into t(a, b) select (case when i < 5 then i else 9 end), i from generate_series(1, 1000) n(i); -analyze t; -explain (costs off) select * from (select * from t order by a) s order by a, b limit 70; - QUERY PLAN ---------------------------------- - Limit - -> Incremental Sort - Sort Key: t.a, t.b - Presorted Key: t.a - -> Sort - Sort Key: t.a - -> Seq Scan on t -(7 rows) - -select * from (select * from t order by a) s order by a, b limit 70; - a | b ----+---- - 1 | 1 - 2 | 2 - 3 | 3 - 4 | 4 - 9 | 5 - 9 | 6 - 9 | 7 - 9 | 8 - 9 | 9 - 9 | 10 - 9 | 11 - 9 | 12 - 9 | 13 - 9 | 14 - 9 | 15 - 9 | 16 - 9 | 17 - 9 | 18 - 9 | 19 - 9 | 20 - 9 | 21 - 9 | 22 - 9 | 23 - 9 | 24 - 9 | 25 - 9 | 26 - 9 | 27 - 9 | 28 - 9 | 29 - 9 | 30 - 9 | 31 - 9 | 32 - 9 | 33 - 9 | 34 - 9 | 35 - 9 | 36 - 9 | 37 - 9 | 38 - 9 | 39 - 9 | 40 - 9 | 41 - 9 | 42 - 9 | 43 - 9 | 44 - 9 | 45 - 9 | 46 - 9 | 47 - 9 | 48 - 9 | 49 - 9 | 50 - 9 | 51 - 9 | 52 - 9 | 53 - 9 | 54 - 9 | 55 - 9 | 56 - 9 | 57 - 9 | 58 - 9 | 59 - 9 | 60 - 9 | 61 - 9 | 62 - 9 | 63 - 9 | 64 - 9 | 65 - 9 | 66 - 9 | 67 - 9 | 68 - 9 | 69 - 9 | 70 -(70 rows) - --- Checks case where we hit a group boundary at the last tuple of a batch. --- Because the full sort state is bounded, we scan 64 tuples (the mode --- transition point) but only retain 5. Thus when we transition modes, all --- tuples in the full sort state have different prefix keys. -explain (costs off) select * from (select * from t order by a) s order by a, b limit 5; - QUERY PLAN ---------------------------------- - Limit - -> Incremental Sort - Sort Key: t.a, t.b - Presorted Key: t.a - -> Sort - Sort Key: t.a - -> Seq Scan on t -(7 rows) - -select * from (select * from t order by a) s order by a, b limit 5; - a | b ----+--- - 1 | 1 - 2 | 2 - 3 | 3 - 4 | 4 - 9 | 5 -(5 rows) - --- Test rescan. -begin; --- We force the planner to choose a plan with incremental sort on the right side --- of a nested loop join node. That way we trigger the rescan code path. -set local enable_hashjoin = off; -set local enable_mergejoin = off; -set local enable_material = off; -set local enable_sort = off; -explain (costs off) select * from t left join (select * from (select * from t order by a) v order by a, b) s on s.a = t.a where t.a in (1, 2); - QUERY PLAN ------------------------------------------------- - Nested Loop Left Join - Join Filter: (t_1.a = t.a) - -> Seq Scan on t - Filter: (a = ANY ('{1,2}'::integer[])) - -> Incremental Sort - Sort Key: t_1.a, t_1.b - Presorted Key: t_1.a - -> Sort - Sort Key: t_1.a - -> Seq Scan on t t_1 -(10 rows) - -select * from t left join (select * from (select * from t order by a) v order by a, b) s on s.a = t.a where t.a in (1, 2); - a | b | a | b ----+---+---+--- - 1 | 1 | 1 | 1 - 2 | 2 | 2 | 2 -(2 rows) - -rollback; --- Test EXPLAIN ANALYZE with both fullsort and presorted groups. -select explain_analyze_without_memory('select * from (select * from t order by a) s order by a, b limit 70'); - explain_analyze_without_memory ----------------------------------------------------------------------------------------------------------------- - Limit (actual rows=70 loops=1) - -> Incremental Sort (actual rows=70 loops=1) - Sort Key: t.a, t.b - Presorted Key: t.a - Full-sort Groups: 1 Sort Method: quicksort Average Memory: NNkB Peak Memory: NNkB - Pre-sorted Groups: 5 Sort Methods: top-N heapsort, quicksort Average Memory: NNkB Peak Memory: NNkB - -> Sort (actual rows=1000 loops=1) - Sort Key: t.a - Sort Method: quicksort Memory: NNkB - -> Seq Scan on t (actual rows=1000 loops=1) -(10 rows) - -select jsonb_pretty(explain_analyze_inc_sort_nodes_without_memory('select * from (select * from t order by a) s order by a, b limit 70')); - jsonb_pretty -------------------------------------------------- - [ + - { + - "Sort Key": [ + - "t.a", + - "t.b" + - ], + - "Node Type": "Incremental Sort", + - "Actual Rows": 70, + - "Actual Loops": 1, + - "Async Capable": false, + - "Presorted Key": [ + - "t.a" + - ], + - "Parallel Aware": false, + - "Full-sort Groups": { + - "Group Count": 1, + - "Sort Methods Used": [ + - "quicksort" + - ], + - "Sort Space Memory": { + - "Peak Sort Space Used": "NN", + - "Average Sort Space Used": "NN"+ - } + - }, + - "Pre-sorted Groups": { + - "Group Count": 5, + - "Sort Methods Used": [ + - "top-N heapsort", + - "quicksort" + - ], + - "Sort Space Memory": { + - "Peak Sort Space Used": "NN", + - "Average Sort Space Used": "NN"+ - } + - }, + - "Parent Relationship": "Outer" + - } + - ] -(1 row) - -select explain_analyze_inc_sort_nodes_verify_invariants('select * from (select * from t order by a) s order by a, b limit 70'); - explain_analyze_inc_sort_nodes_verify_invariants --------------------------------------------------- - t -(1 row) - -delete from t; --- Small groups of 10 tuples each tested around each mode transition point. -insert into t(a, b) select i / 10, i from generate_series(1, 1000) n(i); -analyze t; -explain (costs off) select * from (select * from t order by a) s order by a, b limit 31; - QUERY PLAN ---------------------------------- - Limit - -> Incremental Sort - Sort Key: t.a, t.b - Presorted Key: t.a - -> Sort - Sort Key: t.a - -> Seq Scan on t -(7 rows) - -select * from (select * from t order by a) s order by a, b limit 31; - a | b ----+---- - 0 | 1 - 0 | 2 - 0 | 3 - 0 | 4 - 0 | 5 - 0 | 6 - 0 | 7 - 0 | 8 - 0 | 9 - 1 | 10 - 1 | 11 - 1 | 12 - 1 | 13 - 1 | 14 - 1 | 15 - 1 | 16 - 1 | 17 - 1 | 18 - 1 | 19 - 2 | 20 - 2 | 21 - 2 | 22 - 2 | 23 - 2 | 24 - 2 | 25 - 2 | 26 - 2 | 27 - 2 | 28 - 2 | 29 - 3 | 30 - 3 | 31 -(31 rows) - -explain (costs off) select * from (select * from t order by a) s order by a, b limit 32; - QUERY PLAN ---------------------------------- - Limit - -> Incremental Sort - Sort Key: t.a, t.b - Presorted Key: t.a - -> Sort - Sort Key: t.a - -> Seq Scan on t -(7 rows) - -select * from (select * from t order by a) s order by a, b limit 32; - a | b ----+---- - 0 | 1 - 0 | 2 - 0 | 3 - 0 | 4 - 0 | 5 - 0 | 6 - 0 | 7 - 0 | 8 - 0 | 9 - 1 | 10 - 1 | 11 - 1 | 12 - 1 | 13 - 1 | 14 - 1 | 15 - 1 | 16 - 1 | 17 - 1 | 18 - 1 | 19 - 2 | 20 - 2 | 21 - 2 | 22 - 2 | 23 - 2 | 24 - 2 | 25 - 2 | 26 - 2 | 27 - 2 | 28 - 2 | 29 - 3 | 30 - 3 | 31 - 3 | 32 -(32 rows) - -explain (costs off) select * from (select * from t order by a) s order by a, b limit 33; - QUERY PLAN ---------------------------------- - Limit - -> Incremental Sort - Sort Key: t.a, t.b - Presorted Key: t.a - -> Sort - Sort Key: t.a - -> Seq Scan on t -(7 rows) - -select * from (select * from t order by a) s order by a, b limit 33; - a | b ----+---- - 0 | 1 - 0 | 2 - 0 | 3 - 0 | 4 - 0 | 5 - 0 | 6 - 0 | 7 - 0 | 8 - 0 | 9 - 1 | 10 - 1 | 11 - 1 | 12 - 1 | 13 - 1 | 14 - 1 | 15 - 1 | 16 - 1 | 17 - 1 | 18 - 1 | 19 - 2 | 20 - 2 | 21 - 2 | 22 - 2 | 23 - 2 | 24 - 2 | 25 - 2 | 26 - 2 | 27 - 2 | 28 - 2 | 29 - 3 | 30 - 3 | 31 - 3 | 32 - 3 | 33 -(33 rows) - -explain (costs off) select * from (select * from t order by a) s order by a, b limit 65; - QUERY PLAN ---------------------------------- - Limit - -> Incremental Sort - Sort Key: t.a, t.b - Presorted Key: t.a - -> Sort - Sort Key: t.a - -> Seq Scan on t -(7 rows) - -select * from (select * from t order by a) s order by a, b limit 65; - a | b ----+---- - 0 | 1 - 0 | 2 - 0 | 3 - 0 | 4 - 0 | 5 - 0 | 6 - 0 | 7 - 0 | 8 - 0 | 9 - 1 | 10 - 1 | 11 - 1 | 12 - 1 | 13 - 1 | 14 - 1 | 15 - 1 | 16 - 1 | 17 - 1 | 18 - 1 | 19 - 2 | 20 - 2 | 21 - 2 | 22 - 2 | 23 - 2 | 24 - 2 | 25 - 2 | 26 - 2 | 27 - 2 | 28 - 2 | 29 - 3 | 30 - 3 | 31 - 3 | 32 - 3 | 33 - 3 | 34 - 3 | 35 - 3 | 36 - 3 | 37 - 3 | 38 - 3 | 39 - 4 | 40 - 4 | 41 - 4 | 42 - 4 | 43 - 4 | 44 - 4 | 45 - 4 | 46 - 4 | 47 - 4 | 48 - 4 | 49 - 5 | 50 - 5 | 51 - 5 | 52 - 5 | 53 - 5 | 54 - 5 | 55 - 5 | 56 - 5 | 57 - 5 | 58 - 5 | 59 - 6 | 60 - 6 | 61 - 6 | 62 - 6 | 63 - 6 | 64 - 6 | 65 -(65 rows) - -explain (costs off) select * from (select * from t order by a) s order by a, b limit 66; - QUERY PLAN ---------------------------------- - Limit - -> Incremental Sort - Sort Key: t.a, t.b - Presorted Key: t.a - -> Sort - Sort Key: t.a - -> Seq Scan on t -(7 rows) - -select * from (select * from t order by a) s order by a, b limit 66; - a | b ----+---- - 0 | 1 - 0 | 2 - 0 | 3 - 0 | 4 - 0 | 5 - 0 | 6 - 0 | 7 - 0 | 8 - 0 | 9 - 1 | 10 - 1 | 11 - 1 | 12 - 1 | 13 - 1 | 14 - 1 | 15 - 1 | 16 - 1 | 17 - 1 | 18 - 1 | 19 - 2 | 20 - 2 | 21 - 2 | 22 - 2 | 23 - 2 | 24 - 2 | 25 - 2 | 26 - 2 | 27 - 2 | 28 - 2 | 29 - 3 | 30 - 3 | 31 - 3 | 32 - 3 | 33 - 3 | 34 - 3 | 35 - 3 | 36 - 3 | 37 - 3 | 38 - 3 | 39 - 4 | 40 - 4 | 41 - 4 | 42 - 4 | 43 - 4 | 44 - 4 | 45 - 4 | 46 - 4 | 47 - 4 | 48 - 4 | 49 - 5 | 50 - 5 | 51 - 5 | 52 - 5 | 53 - 5 | 54 - 5 | 55 - 5 | 56 - 5 | 57 - 5 | 58 - 5 | 59 - 6 | 60 - 6 | 61 - 6 | 62 - 6 | 63 - 6 | 64 - 6 | 65 - 6 | 66 -(66 rows) - -delete from t; --- Small groups of only 1 tuple each tested around each mode transition point. -insert into t(a, b) select i, i from generate_series(1, 1000) n(i); -analyze t; -explain (costs off) select * from (select * from t order by a) s order by a, b limit 31; - QUERY PLAN ---------------------------------- - Limit - -> Incremental Sort - Sort Key: t.a, t.b - Presorted Key: t.a - -> Sort - Sort Key: t.a - -> Seq Scan on t -(7 rows) - -select * from (select * from t order by a) s order by a, b limit 31; - a | b -----+---- - 1 | 1 - 2 | 2 - 3 | 3 - 4 | 4 - 5 | 5 - 6 | 6 - 7 | 7 - 8 | 8 - 9 | 9 - 10 | 10 - 11 | 11 - 12 | 12 - 13 | 13 - 14 | 14 - 15 | 15 - 16 | 16 - 17 | 17 - 18 | 18 - 19 | 19 - 20 | 20 - 21 | 21 - 22 | 22 - 23 | 23 - 24 | 24 - 25 | 25 - 26 | 26 - 27 | 27 - 28 | 28 - 29 | 29 - 30 | 30 - 31 | 31 -(31 rows) - -explain (costs off) select * from (select * from t order by a) s order by a, b limit 32; - QUERY PLAN ---------------------------------- - Limit - -> Incremental Sort - Sort Key: t.a, t.b - Presorted Key: t.a - -> Sort - Sort Key: t.a - -> Seq Scan on t -(7 rows) - -select * from (select * from t order by a) s order by a, b limit 32; - a | b -----+---- - 1 | 1 - 2 | 2 - 3 | 3 - 4 | 4 - 5 | 5 - 6 | 6 - 7 | 7 - 8 | 8 - 9 | 9 - 10 | 10 - 11 | 11 - 12 | 12 - 13 | 13 - 14 | 14 - 15 | 15 - 16 | 16 - 17 | 17 - 18 | 18 - 19 | 19 - 20 | 20 - 21 | 21 - 22 | 22 - 23 | 23 - 24 | 24 - 25 | 25 - 26 | 26 - 27 | 27 - 28 | 28 - 29 | 29 - 30 | 30 - 31 | 31 - 32 | 32 -(32 rows) - -explain (costs off) select * from (select * from t order by a) s order by a, b limit 33; - QUERY PLAN ---------------------------------- - Limit - -> Incremental Sort - Sort Key: t.a, t.b - Presorted Key: t.a - -> Sort - Sort Key: t.a - -> Seq Scan on t -(7 rows) - -select * from (select * from t order by a) s order by a, b limit 33; - a | b -----+---- - 1 | 1 - 2 | 2 - 3 | 3 - 4 | 4 - 5 | 5 - 6 | 6 - 7 | 7 - 8 | 8 - 9 | 9 - 10 | 10 - 11 | 11 - 12 | 12 - 13 | 13 - 14 | 14 - 15 | 15 - 16 | 16 - 17 | 17 - 18 | 18 - 19 | 19 - 20 | 20 - 21 | 21 - 22 | 22 - 23 | 23 - 24 | 24 - 25 | 25 - 26 | 26 - 27 | 27 - 28 | 28 - 29 | 29 - 30 | 30 - 31 | 31 - 32 | 32 - 33 | 33 -(33 rows) - -explain (costs off) select * from (select * from t order by a) s order by a, b limit 65; - QUERY PLAN ---------------------------------- - Limit - -> Incremental Sort - Sort Key: t.a, t.b - Presorted Key: t.a - -> Sort - Sort Key: t.a - -> Seq Scan on t -(7 rows) - -select * from (select * from t order by a) s order by a, b limit 65; - a | b -----+---- - 1 | 1 - 2 | 2 - 3 | 3 - 4 | 4 - 5 | 5 - 6 | 6 - 7 | 7 - 8 | 8 - 9 | 9 - 10 | 10 - 11 | 11 - 12 | 12 - 13 | 13 - 14 | 14 - 15 | 15 - 16 | 16 - 17 | 17 - 18 | 18 - 19 | 19 - 20 | 20 - 21 | 21 - 22 | 22 - 23 | 23 - 24 | 24 - 25 | 25 - 26 | 26 - 27 | 27 - 28 | 28 - 29 | 29 - 30 | 30 - 31 | 31 - 32 | 32 - 33 | 33 - 34 | 34 - 35 | 35 - 36 | 36 - 37 | 37 - 38 | 38 - 39 | 39 - 40 | 40 - 41 | 41 - 42 | 42 - 43 | 43 - 44 | 44 - 45 | 45 - 46 | 46 - 47 | 47 - 48 | 48 - 49 | 49 - 50 | 50 - 51 | 51 - 52 | 52 - 53 | 53 - 54 | 54 - 55 | 55 - 56 | 56 - 57 | 57 - 58 | 58 - 59 | 59 - 60 | 60 - 61 | 61 - 62 | 62 - 63 | 63 - 64 | 64 - 65 | 65 -(65 rows) - -explain (costs off) select * from (select * from t order by a) s order by a, b limit 66; - QUERY PLAN ---------------------------------- - Limit - -> Incremental Sort - Sort Key: t.a, t.b - Presorted Key: t.a - -> Sort - Sort Key: t.a - -> Seq Scan on t -(7 rows) - -select * from (select * from t order by a) s order by a, b limit 66; - a | b -----+---- - 1 | 1 - 2 | 2 - 3 | 3 - 4 | 4 - 5 | 5 - 6 | 6 - 7 | 7 - 8 | 8 - 9 | 9 - 10 | 10 - 11 | 11 - 12 | 12 - 13 | 13 - 14 | 14 - 15 | 15 - 16 | 16 - 17 | 17 - 18 | 18 - 19 | 19 - 20 | 20 - 21 | 21 - 22 | 22 - 23 | 23 - 24 | 24 - 25 | 25 - 26 | 26 - 27 | 27 - 28 | 28 - 29 | 29 - 30 | 30 - 31 | 31 - 32 | 32 - 33 | 33 - 34 | 34 - 35 | 35 - 36 | 36 - 37 | 37 - 38 | 38 - 39 | 39 - 40 | 40 - 41 | 41 - 42 | 42 - 43 | 43 - 44 | 44 - 45 | 45 - 46 | 46 - 47 | 47 - 48 | 48 - 49 | 49 - 50 | 50 - 51 | 51 - 52 | 52 - 53 | 53 - 54 | 54 - 55 | 55 - 56 | 56 - 57 | 57 - 58 | 58 - 59 | 59 - 60 | 60 - 61 | 61 - 62 | 62 - 63 | 63 - 64 | 64 - 65 | 65 - 66 | 66 -(66 rows) - -delete from t; -drop table t; --- Incremental sort vs. parallel queries -set min_parallel_table_scan_size = '1kB'; -set min_parallel_index_scan_size = '1kB'; -set parallel_setup_cost = 0; -set parallel_tuple_cost = 0; -set max_parallel_workers_per_gather = 2; -create table t (a int, b int, c int); -insert into t select mod(i,10),mod(i,10),i from generate_series(1,10000) s(i); -create index on t (a); -analyze t; -set enable_incremental_sort = off; -explain (costs off) select a,b,sum(c) from t group by 1,2 order by 1,2,3 limit 1; - QUERY PLAN ------------------------------------------------------- - Limit - -> Sort - Sort Key: a, b, (sum(c)) - -> Finalize HashAggregate - Group Key: a, b - -> Gather - Workers Planned: 2 - -> Partial HashAggregate - Group Key: a, b - -> Parallel Seq Scan on t -(10 rows) - -set enable_incremental_sort = on; -explain (costs off) select a,b,sum(c) from t group by 1,2 order by 1,2,3 limit 1; - QUERY PLAN ----------------------------------------------------------------------- - Limit - -> Incremental Sort - Sort Key: a, b, (sum(c)) - Presorted Key: a, b - -> GroupAggregate - Group Key: a, b - -> Gather Merge - Workers Planned: 2 - -> Incremental Sort - Sort Key: a, b - Presorted Key: a - -> Parallel Index Scan using t_a_idx on t -(12 rows) - --- Incremental sort vs. set operations with varno 0 -set enable_hashagg to off; -explain (costs off) select * from t union select * from t order by 1,3; - QUERY PLAN ----------------------------------------------------------- - Incremental Sort - Sort Key: t.a, t.c - Presorted Key: t.a - -> Unique - -> Sort - Sort Key: t.a, t.b, t.c - -> Append - -> Gather - Workers Planned: 2 - -> Parallel Seq Scan on t - -> Gather - Workers Planned: 2 - -> Parallel Seq Scan on t t_1 -(13 rows) - --- Full sort, not just incremental sort can be pushed below a gather merge path --- by generate_useful_gather_paths. -explain (costs off) select distinct a,b from t; - QUERY PLAN ------------------------------------------- - Unique - -> Gather Merge - Workers Planned: 2 - -> Sort - Sort Key: a, b - -> Parallel Seq Scan on t -(6 rows) - -drop table t; --- Sort pushdown can't go below where expressions are part of the rel target. --- In particular this is interesting for volatile expressions which have to --- go above joins since otherwise we'll incorrectly use expression evaluations --- across multiple rows. -set enable_hashagg=off; -set enable_seqscan=off; -set enable_incremental_sort = off; -set parallel_tuple_cost=0; -set parallel_setup_cost=0; -set min_parallel_table_scan_size = 0; -set min_parallel_index_scan_size = 0; --- Parallel sort below join. -explain (costs off) select distinct sub.unique1, stringu1 -from tenk1, lateral (select tenk1.unique1 from generate_series(1, 1000)) as sub; - QUERY PLAN --------------------------------------------------------------------------- - Unique - -> Nested Loop - -> Gather Merge - Workers Planned: 2 - -> Sort - Sort Key: tenk1.unique1, tenk1.stringu1 - -> Parallel Index Scan using tenk1_unique1 on tenk1 - -> Function Scan on generate_series -(8 rows) - -explain (costs off) select sub.unique1, stringu1 -from tenk1, lateral (select tenk1.unique1 from generate_series(1, 1000)) as sub -order by 1, 2; - QUERY PLAN --------------------------------------------------------------------- - Nested Loop - -> Gather Merge - Workers Planned: 2 - -> Sort - Sort Key: tenk1.unique1, tenk1.stringu1 - -> Parallel Index Scan using tenk1_unique1 on tenk1 - -> Function Scan on generate_series -(7 rows) - --- Parallel sort but with expression that can be safely generated at the base rel. -explain (costs off) select distinct sub.unique1, md5(stringu1) -from tenk1, lateral (select tenk1.unique1 from generate_series(1, 1000)) as sub; - QUERY PLAN ----------------------------------------------------------------------------------------- - Unique - -> Nested Loop - -> Gather Merge - Workers Planned: 2 - -> Sort - Sort Key: tenk1.unique1, (md5((tenk1.stringu1)::text)) COLLATE "C" - -> Parallel Index Scan using tenk1_unique1 on tenk1 - -> Function Scan on generate_series -(8 rows) - -explain (costs off) select sub.unique1, md5(stringu1) -from tenk1, lateral (select tenk1.unique1 from generate_series(1, 1000)) as sub -order by 1, 2; - QUERY PLAN ----------------------------------------------------------------------------------- - Nested Loop - -> Gather Merge - Workers Planned: 2 - -> Sort - Sort Key: tenk1.unique1, (md5((tenk1.stringu1)::text)) COLLATE "C" - -> Parallel Index Scan using tenk1_unique1 on tenk1 - -> Function Scan on generate_series -(7 rows) - --- Parallel sort with an aggregate that can be safely generated in parallel, --- but we can't sort by partial aggregate values. -explain (costs off) select count(*) -from tenk1 t1 -join tenk1 t2 on t1.unique1 = t2.unique2 -join tenk1 t3 on t2.unique1 = t3.unique1 -order by count(*); - QUERY PLAN ------------------------------------------------------------------------------------------------ - Sort - Sort Key: (count(*)) - -> Finalize Aggregate - -> Gather - Workers Planned: 2 - -> Partial Aggregate - -> Parallel Hash Join - Hash Cond: (t2.unique1 = t3.unique1) - -> Parallel Hash Join - Hash Cond: (t1.unique1 = t2.unique2) - -> Parallel Index Only Scan using tenk1_unique1 on tenk1 t1 - -> Parallel Hash - -> Parallel Index Scan using tenk1_unique2 on tenk1 t2 - -> Parallel Hash - -> Parallel Index Only Scan using tenk1_unique1 on tenk1 t3 -(15 rows) - --- Parallel sort but with expression (correlated subquery) that --- is prohibited in parallel plans. -explain (costs off) select distinct - unique1, - (select t.unique1 from tenk1 where tenk1.unique1 = t.unique1) -from tenk1 t, generate_series(1, 1000); - QUERY PLAN ---------------------------------------------------------------------------------- - Unique - -> Sort - Sort Key: t.unique1, ((SubPlan 1)) - -> Gather - Workers Planned: 2 - -> Nested Loop - -> Parallel Index Only Scan using tenk1_unique1 on tenk1 t - -> Function Scan on generate_series - SubPlan 1 - -> Index Only Scan using tenk1_unique1 on tenk1 - Index Cond: (unique1 = t.unique1) -(11 rows) - -explain (costs off) select - unique1, - (select t.unique1 from tenk1 where tenk1.unique1 = t.unique1) -from tenk1 t, generate_series(1, 1000) -order by 1, 2; - QUERY PLAN ---------------------------------------------------------------------------- - Sort - Sort Key: t.unique1, ((SubPlan 1)) - -> Gather - Workers Planned: 2 - -> Nested Loop - -> Parallel Index Only Scan using tenk1_unique1 on tenk1 t - -> Function Scan on generate_series - SubPlan 1 - -> Index Only Scan using tenk1_unique1 on tenk1 - Index Cond: (unique1 = t.unique1) -(10 rows) - --- Parallel sort but with expression not available until the upper rel. -explain (costs off) select distinct sub.unique1, stringu1 || random()::text -from tenk1, lateral (select tenk1.unique1 from generate_series(1, 1000)) as sub; - QUERY PLAN ---------------------------------------------------------------------------------------------- - Unique - -> Sort - Sort Key: tenk1.unique1, (((tenk1.stringu1)::text || (random())::text)) COLLATE "C" - -> Gather - Workers Planned: 2 - -> Nested Loop - -> Parallel Index Scan using tenk1_unique1 on tenk1 - -> Function Scan on generate_series -(8 rows) - -explain (costs off) select sub.unique1, stringu1 || random()::text -from tenk1, lateral (select tenk1.unique1 from generate_series(1, 1000)) as sub -order by 1, 2; - QUERY PLAN ---------------------------------------------------------------------------------------- - Sort - Sort Key: tenk1.unique1, (((tenk1.stringu1)::text || (random())::text)) COLLATE "C" - -> Gather - Workers Planned: 2 - -> Nested Loop - -> Parallel Index Scan using tenk1_unique1 on tenk1 - -> Function Scan on generate_series -(7 rows) - --- Disallow pushing down sort when pathkey is an SRF. -explain (costs off) select unique1 from tenk1 order by unnest('{1,2}'::int[]); - QUERY PLAN -------------------------------------------------------------------------- - Sort - Sort Key: (unnest('{1,2}'::integer[])) - -> Gather - Workers Planned: 2 - -> ProjectSet - -> Parallel Index Only Scan using tenk1_unique1 on tenk1 -(6 rows) - +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/rules.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/rules.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/rules.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/rules.out 2023-02-20 19:47:08.809214582 -0500 @@ -1285,6 +1285,30 @@ SELECT viewname, definition FROM pg_views WHERE schemaname IN ('pg_catalog', 'public') ORDER BY viewname; +atest12sbv| SELECT atest12.a, + atest12.b + FROM atest12 + WHERE (atest12.b <<< 5); +atest12v| SELECT atest12.a, + atest12.b + FROM atest12 + WHERE (atest12.b <<< 5); +atestv0| SELECT 0 AS x + WHERE false; +atestv1| SELECT atest1.a, + atest1.b + FROM atest1; +atestv2| SELECT atest2.col1, + atest2.col2 + FROM atest2; +atestv3| SELECT atest3.one, + atest3.two, + atest3.three + FROM atest3; +atestv4| SELECT atestv3.one, + atestv3.two, + atestv3.three + FROM atestv3; iexit| SELECT ih.name, ih.thepath, interpt_pp(ih.thepath, r.thepath) AS exit @@ -1299,14 +1323,6 @@ FROM view_base_table GROUP BY view_base_table.key HAVING (length((view_base_table.data)::text) > 0); -mvtest_tv| SELECT mvtest_t.type, - sum(mvtest_t.amt) AS totamt - FROM mvtest_t - GROUP BY mvtest_t.type; -mvtest_tvv| SELECT sum(mvtest_tv.totamt) AS grandtot - FROM mvtest_tv; -mvtest_tvvmv| SELECT mvtest_tvvm.grandtot - FROM mvtest_tvvm; pg_available_extension_versions| SELECT e.name, e.version, (x.extname IS NOT NULL) AS installed, @@ -2659,10 +2675,6 @@ FROM ONLY road r, real_city c WHERE (c.outline ## r.thepath); -test_tablesample_v1| SELECT test_tablesample.id - FROM test_tablesample TABLESAMPLE system ((10 * 2)) REPEATABLE (2); -test_tablesample_v2| SELECT test_tablesample.id - FROM test_tablesample TABLESAMPLE system (99); toyemp| SELECT emp.name, emp.age, emp.location, diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/psql.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/psql.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/psql.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/psql.out 2023-02-20 19:47:08.519214569 -0500 @@ -4906,9 +4906,8 @@ gist | Index hash | Index heap | Table - heap2 | Table spgist | Index -(8 rows) +(7 rows) \dA * List of access methods @@ -4920,18 +4919,16 @@ gist | Index hash | Index heap | Table - heap2 | Table spgist | Index -(8 rows) +(7 rows) \dA h* List of access methods - Name | Type --------+------- - hash | Index - heap | Table - heap2 | Table -(3 rows) + Name | Type +------+------- + hash | Index + heap | Table +(2 rows) \dA foo List of access methods @@ -4956,9 +4953,8 @@ gist | Index | gisthandler | GiST index access method hash | Index | hashhandler | hash index access method heap | Table | heap_tableam_handler | heap table access method - heap2 | Table | heap_tableam_handler | spgist | Index | spghandler | SP-GiST index access method -(8 rows) +(7 rows) \dA+ * List of access methods @@ -4970,18 +4966,16 @@ gist | Index | gisthandler | GiST index access method hash | Index | hashhandler | hash index access method heap | Table | heap_tableam_handler | heap table access method - heap2 | Table | heap_tableam_handler | spgist | Index | spghandler | SP-GiST index access method -(8 rows) +(7 rows) \dA+ h* List of access methods - Name | Type | Handler | Description --------+-------+----------------------+-------------------------- - hash | Index | hashhandler | hash index access method - heap | Table | heap_tableam_handler | heap table access method - heap2 | Table | heap_tableam_handler | -(3 rows) + Name | Type | Handler | Description +------+-------+----------------------+-------------------------- + hash | Index | hashhandler | hash index access method + heap | Table | heap_tableam_handler | heap table access method +(2 rows) \dA+ foo List of access methods diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/amutils.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/amutils.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/amutils.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/amutils.out 2023-02-20 19:47:02.649214317 -0500 @@ -56,29 +56,9 @@ with ordinality as u(prop,ord) where a.amname = 'gist' order by ord; - prop | AM | Index | Column ---------------------+----+-------+-------- - asc | | | f - desc | | | f - nulls_first | | | f - nulls_last | | | f - orderable | | | f - distance_orderable | | | t - returnable | | | f - search_array | | | f - search_nulls | | | t - clusterable | | t | - index_scan | | t | - bitmap_scan | | t | - backward_scan | | f | - can_order | f | | - can_unique | f | | - can_multi_col | t | | - can_exclude | t | | - can_include | t | | - bogus | | | -(19 rows) - +ERROR: relation "gcircleind" does not exist +LINE 3: pg_index_has_property('gcircleind'::regclass, prop) a... + ^ select prop, pg_index_column_has_property('onek_hundred'::regclass, 1, prop) as btree, pg_index_column_has_property('hash_i4_index'::regclass, 1, prop) as hash, @@ -93,20 +73,9 @@ 'bogus']::text[]) with ordinality as u(prop,ord) order by ord; - prop | btree | hash | gist | spgist_radix | spgist_quad | gin | brin ---------------------+-------+------+------+--------------+-------------+-----+------ - asc | t | f | f | f | f | f | f - desc | f | f | f | f | f | f | f - nulls_first | f | f | f | f | f | f | f - nulls_last | t | f | f | f | f | f | f - orderable | t | f | f | f | f | f | f - distance_orderable | f | f | t | f | t | f | f - returnable | t | f | f | t | t | f | f - search_array | t | f | f | f | f | f | f - search_nulls | t | f | t | t | t | f | t - bogus | | | | | | | -(10 rows) - +ERROR: relation "hash_i4_index" does not exist +LINE 3: pg_index_column_has_property('hash_i4_index'::regclas... + ^ select prop, pg_index_has_property('onek_hundred'::regclass, prop) as btree, pg_index_has_property('hash_i4_index'::regclass, prop) as hash, @@ -119,15 +88,9 @@ 'bogus']::text[]) with ordinality as u(prop,ord) order by ord; - prop | btree | hash | gist | spgist | gin | brin ----------------+-------+------+------+--------+-----+------ - clusterable | t | f | t | f | f | f - index_scan | t | t | t | t | f | f - bitmap_scan | t | t | t | t | t | t - backward_scan | t | t | f | f | f | f - bogus | | | | | | -(5 rows) - +ERROR: relation "hash_i4_index" does not exist +LINE 3: pg_index_has_property('hash_i4_index'::regclass, prop... + ^ select amname, prop, pg_indexam_has_property(a.oid, prop) as p from pg_am a, unnest(array['can_order', 'can_unique', 'can_multi_col', diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/stats_ext.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/stats_ext.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/stats_ext.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/stats_ext.out 2023-02-20 19:47:20.569215086 -0500 @@ -3189,6 +3189,7 @@ LANGUAGE plpgsql; CREATE OPERATOR <<< (procedure = op_leak, leftarg = int, rightarg = int, restrict = scalarltsel); +ERROR: operator <<< already exists SELECT * FROM tststats.priv_test_tbl WHERE a <<< 0 AND b <<< 0; -- Permission denied ERROR: permission denied for table priv_test_tbl DELETE FROM tststats.priv_test_tbl WHERE a <<< 0 AND b <<< 0; -- Permission denied @@ -3220,6 +3221,7 @@ DELETE FROM tststats.priv_test_tbl WHERE a <<< 0 AND b <<< 0; -- Should not leak -- Tidy up DROP OPERATOR <<< (int, int); +ERROR: must be owner of operator <<< DROP FUNCTION op_leak(int, int); RESET SESSION AUTHORIZATION; DROP SCHEMA tststats CASCADE; diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/select_parallel.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/select_parallel.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/select_parallel.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/select_parallel.out 2023-02-20 19:47:49.449216325 -0500 @@ -525,673 +525,7 @@ (10 rows) select count(*) from tenk1, tenk2 where tenk1.hundred > 1 and tenk2.thousand=0; - count -------- - 98000 -(1 row) - -create table bmscantest (a int, t text); -insert into bmscantest select r, 'fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo' FROM generate_series(1,100000) r; -create index i_bmtest ON bmscantest(a); -select count(*) from bmscantest where a>1; - count -------- - 99999 -(1 row) - --- test accumulation of stats for parallel nodes -reset enable_seqscan; -alter table tenk2 set (parallel_workers = 0); -explain (analyze, timing off, summary off, costs off) - select count(*) from tenk1, tenk2 where tenk1.hundred > 1 - and tenk2.thousand=0; - QUERY PLAN --------------------------------------------------------------------------- - Aggregate (actual rows=1 loops=1) - -> Nested Loop (actual rows=98000 loops=1) - -> Seq Scan on tenk2 (actual rows=10 loops=1) - Filter: (thousand = 0) - Rows Removed by Filter: 9990 - -> Gather (actual rows=9800 loops=10) - Workers Planned: 4 - Workers Launched: 4 - -> Parallel Seq Scan on tenk1 (actual rows=1960 loops=50) - Filter: (hundred > 1) - Rows Removed by Filter: 40 -(11 rows) - -alter table tenk2 reset (parallel_workers); -reset work_mem; -create function explain_parallel_sort_stats() returns setof text -language plpgsql as -$$ -declare ln text; -begin - for ln in - explain (analyze, timing off, summary off, costs off) - select * from - (select ten from tenk1 where ten < 100 order by ten) ss - right join (values (1),(2),(3)) v(x) on true - loop - ln := regexp_replace(ln, 'Memory: \S*', 'Memory: xxx'); - return next ln; - end loop; -end; -$$; -select * from explain_parallel_sort_stats(); - explain_parallel_sort_stats --------------------------------------------------------------------------- - Nested Loop Left Join (actual rows=30000 loops=1) - -> Values Scan on "*VALUES*" (actual rows=3 loops=1) - -> Gather Merge (actual rows=10000 loops=3) - Workers Planned: 4 - Workers Launched: 4 - -> Sort (actual rows=2000 loops=15) - Sort Key: tenk1.ten - Sort Method: quicksort Memory: xxx - Worker 0: Sort Method: quicksort Memory: xxx - Worker 1: Sort Method: quicksort Memory: xxx - Worker 2: Sort Method: quicksort Memory: xxx - Worker 3: Sort Method: quicksort Memory: xxx - -> Parallel Seq Scan on tenk1 (actual rows=2000 loops=15) - Filter: (ten < 100) -(14 rows) - -reset enable_indexscan; -reset enable_hashjoin; -reset enable_mergejoin; -reset enable_material; -reset effective_io_concurrency; -drop table bmscantest; -drop function explain_parallel_sort_stats(); --- test parallel merge join path. -set enable_hashjoin to off; -set enable_nestloop to off; -explain (costs off) - select count(*) from tenk1, tenk2 where tenk1.unique1 = tenk2.unique1; - QUERY PLAN -------------------------------------------------------------------------------- - Finalize Aggregate - -> Gather - Workers Planned: 4 - -> Partial Aggregate - -> Merge Join - Merge Cond: (tenk1.unique1 = tenk2.unique1) - -> Parallel Index Only Scan using tenk1_unique1 on tenk1 - -> Index Only Scan using tenk2_unique1 on tenk2 -(8 rows) - -select count(*) from tenk1, tenk2 where tenk1.unique1 = tenk2.unique1; - count -------- - 10000 -(1 row) - -reset enable_hashjoin; -reset enable_nestloop; --- test gather merge -set enable_hashagg = false; -explain (costs off) - select count(*) from tenk1 group by twenty; - QUERY PLAN ----------------------------------------------------- - Finalize GroupAggregate - Group Key: twenty - -> Gather Merge - Workers Planned: 4 - -> Partial GroupAggregate - Group Key: twenty - -> Sort - Sort Key: twenty - -> Parallel Seq Scan on tenk1 -(9 rows) - -select count(*) from tenk1 group by twenty; - count -------- - 500 - 500 - 500 - 500 - 500 - 500 - 500 - 500 - 500 - 500 - 500 - 500 - 500 - 500 - 500 - 500 - 500 - 500 - 500 - 500 -(20 rows) - ---test expressions in targetlist are pushed down for gather merge -create function sp_simple_func(var1 integer) returns integer -as $$ -begin - return var1 + 10; -end; -$$ language plpgsql PARALLEL SAFE; -explain (costs off, verbose) - select ten, sp_simple_func(ten) from tenk1 where ten < 100 order by ten; - QUERY PLAN ------------------------------------------------------ - Gather Merge - Output: ten, (sp_simple_func(ten)) - Workers Planned: 4 - -> Result - Output: ten, sp_simple_func(ten) - -> Sort - Output: ten - Sort Key: tenk1.ten - -> Parallel Seq Scan on public.tenk1 - Output: ten - Filter: (tenk1.ten < 100) -(11 rows) - -drop function sp_simple_func(integer); --- test handling of SRFs in targetlist (bug in 10.0) -explain (costs off) - select count(*), generate_series(1,2) from tenk1 group by twenty; - QUERY PLAN ----------------------------------------------------------- - ProjectSet - -> Finalize GroupAggregate - Group Key: twenty - -> Gather Merge - Workers Planned: 4 - -> Partial GroupAggregate - Group Key: twenty - -> Sort - Sort Key: twenty - -> Parallel Seq Scan on tenk1 -(10 rows) - -select count(*), generate_series(1,2) from tenk1 group by twenty; - count | generate_series --------+----------------- - 500 | 1 - 500 | 2 - 500 | 1 - 500 | 2 - 500 | 1 - 500 | 2 - 500 | 1 - 500 | 2 - 500 | 1 - 500 | 2 - 500 | 1 - 500 | 2 - 500 | 1 - 500 | 2 - 500 | 1 - 500 | 2 - 500 | 1 - 500 | 2 - 500 | 1 - 500 | 2 - 500 | 1 - 500 | 2 - 500 | 1 - 500 | 2 - 500 | 1 - 500 | 2 - 500 | 1 - 500 | 2 - 500 | 1 - 500 | 2 - 500 | 1 - 500 | 2 - 500 | 1 - 500 | 2 - 500 | 1 - 500 | 2 - 500 | 1 - 500 | 2 - 500 | 1 - 500 | 2 -(40 rows) - --- test gather merge with parallel leader participation disabled -set parallel_leader_participation = off; -explain (costs off) - select count(*) from tenk1 group by twenty; - QUERY PLAN ----------------------------------------------------- - Finalize GroupAggregate - Group Key: twenty - -> Gather Merge - Workers Planned: 4 - -> Partial GroupAggregate - Group Key: twenty - -> Sort - Sort Key: twenty - -> Parallel Seq Scan on tenk1 -(9 rows) - -select count(*) from tenk1 group by twenty; - count -------- - 500 - 500 - 500 - 500 - 500 - 500 - 500 - 500 - 500 - 500 - 500 - 500 - 500 - 500 - 500 - 500 - 500 - 500 - 500 - 500 -(20 rows) - -reset parallel_leader_participation; ---test rescan behavior of gather merge -set enable_material = false; -explain (costs off) -select * from - (select string4, count(unique2) - from tenk1 group by string4 order by string4) ss - right join (values (1),(2),(3)) v(x) on true; - QUERY PLAN ----------------------------------------------------------- - Nested Loop Left Join - -> Values Scan on "*VALUES*" - -> Finalize GroupAggregate - Group Key: tenk1.string4 - -> Gather Merge - Workers Planned: 4 - -> Partial GroupAggregate - Group Key: tenk1.string4 - -> Sort - Sort Key: tenk1.string4 - -> Parallel Seq Scan on tenk1 -(11 rows) - -select * from - (select string4, count(unique2) - from tenk1 group by string4 order by string4) ss - right join (values (1),(2),(3)) v(x) on true; - string4 | count | x ----------+-------+--- - AAAAxx | 2500 | 1 - HHHHxx | 2500 | 1 - OOOOxx | 2500 | 1 - VVVVxx | 2500 | 1 - AAAAxx | 2500 | 2 - HHHHxx | 2500 | 2 - OOOOxx | 2500 | 2 - VVVVxx | 2500 | 2 - AAAAxx | 2500 | 3 - HHHHxx | 2500 | 3 - OOOOxx | 2500 | 3 - VVVVxx | 2500 | 3 -(12 rows) - -reset enable_material; -reset enable_hashagg; --- check parallelized int8 aggregate (bug #14897) -explain (costs off) -select avg(unique1::int8) from tenk1; - QUERY PLAN -------------------------------------------------------------------------- - Finalize Aggregate - -> Gather - Workers Planned: 4 - -> Partial Aggregate - -> Parallel Index Only Scan using tenk1_unique1 on tenk1 -(5 rows) - -select avg(unique1::int8) from tenk1; - avg ------------------------ - 4999.5000000000000000 -(1 row) - --- gather merge test with a LIMIT -explain (costs off) - select fivethous from tenk1 order by fivethous limit 4; - QUERY PLAN ----------------------------------------------- - Limit - -> Gather Merge - Workers Planned: 4 - -> Sort - Sort Key: fivethous - -> Parallel Seq Scan on tenk1 -(6 rows) - -select fivethous from tenk1 order by fivethous limit 4; - fivethous ------------ - 0 - 0 - 1 - 1 -(4 rows) - --- gather merge test with 0 worker -set max_parallel_workers = 0; -explain (costs off) - select string4 from tenk1 order by string4 limit 5; - QUERY PLAN ----------------------------------------------- - Limit - -> Gather Merge - Workers Planned: 4 - -> Sort - Sort Key: string4 - -> Parallel Seq Scan on tenk1 -(6 rows) - -select string4 from tenk1 order by string4 limit 5; - string4 ---------- - AAAAxx - AAAAxx - AAAAxx - AAAAxx - AAAAxx -(5 rows) - --- gather merge test with 0 workers, with parallel leader --- participation disabled (the leader will have to run the plan --- despite the setting) -set parallel_leader_participation = off; -explain (costs off) - select string4 from tenk1 order by string4 limit 5; - QUERY PLAN ----------------------------------------------- - Limit - -> Gather Merge - Workers Planned: 4 - -> Sort - Sort Key: string4 - -> Parallel Seq Scan on tenk1 -(6 rows) - -select string4 from tenk1 order by string4 limit 5; - string4 ---------- - AAAAxx - AAAAxx - AAAAxx - AAAAxx - AAAAxx -(5 rows) - -reset parallel_leader_participation; -reset max_parallel_workers; -SAVEPOINT settings; -SET LOCAL force_parallel_mode = 1; -explain (costs off) - select stringu1::int2 from tenk1 where unique1 = 1; - QUERY PLAN ------------------------------------------------ - Gather - Workers Planned: 1 - Single Copy: true - -> Index Scan using tenk1_unique1 on tenk1 - Index Cond: (unique1 = 1) -(5 rows) - -ROLLBACK TO SAVEPOINT settings; --- exercise record typmod remapping between backends -CREATE FUNCTION make_record(n int) - RETURNS RECORD LANGUAGE plpgsql PARALLEL SAFE AS -$$ -BEGIN - RETURN CASE n - WHEN 1 THEN ROW(1) - WHEN 2 THEN ROW(1, 2) - WHEN 3 THEN ROW(1, 2, 3) - WHEN 4 THEN ROW(1, 2, 3, 4) - ELSE ROW(1, 2, 3, 4, 5) - END; -END; -$$; -SAVEPOINT settings; -SET LOCAL force_parallel_mode = 1; -SELECT make_record(x) FROM (SELECT generate_series(1, 5) x) ss ORDER BY x; - make_record -------------- - (1) - (1,2) - (1,2,3) - (1,2,3,4) - (1,2,3,4,5) -(5 rows) - -ROLLBACK TO SAVEPOINT settings; -DROP function make_record(n int); --- test the sanity of parallel query after the active role is dropped. -drop role if exists regress_parallel_worker; -NOTICE: role "regress_parallel_worker" does not exist, skipping -create role regress_parallel_worker; -set role regress_parallel_worker; -reset session authorization; -drop role regress_parallel_worker; -set force_parallel_mode = 1; -select count(*) from tenk1; - count -------- - 10000 -(1 row) - -reset force_parallel_mode; -reset role; --- Window function calculation can't be pushed to workers. -explain (costs off, verbose) - select count(*) from tenk1 a where (unique1, two) in - (select unique1, row_number() over() from tenk1 b); - QUERY PLAN ----------------------------------------------------------------------------------------------- - Aggregate - Output: count(*) - -> Hash Semi Join - Hash Cond: ((a.unique1 = b.unique1) AND (a.two = (row_number() OVER (?)))) - -> Gather - Output: a.unique1, a.two - Workers Planned: 4 - -> Parallel Seq Scan on public.tenk1 a - Output: a.unique1, a.two - -> Hash - Output: b.unique1, (row_number() OVER (?)) - -> WindowAgg - Output: b.unique1, row_number() OVER (?) - -> Gather - Output: b.unique1 - Workers Planned: 4 - -> Parallel Index Only Scan using tenk1_unique1 on public.tenk1 b - Output: b.unique1 -(18 rows) - --- LIMIT/OFFSET within sub-selects can't be pushed to workers. -explain (costs off) - select * from tenk1 a where two in - (select two from tenk1 b where stringu1 like '%AAAA' limit 3); - QUERY PLAN ---------------------------------------------------------------- - Hash Semi Join - Hash Cond: (a.two = b.two) - -> Gather - Workers Planned: 4 - -> Parallel Seq Scan on tenk1 a - -> Hash - -> Limit - -> Gather - Workers Planned: 4 - -> Parallel Seq Scan on tenk1 b - Filter: (stringu1 ~~ '%AAAA'::text) -(11 rows) - --- to increase the parallel query test coverage -SAVEPOINT settings; -SET LOCAL force_parallel_mode = 1; -EXPLAIN (analyze, timing off, summary off, costs off) SELECT * FROM tenk1; - QUERY PLAN -------------------------------------------------------------- - Gather (actual rows=10000 loops=1) - Workers Planned: 4 - Workers Launched: 4 - -> Parallel Seq Scan on tenk1 (actual rows=2000 loops=5) -(4 rows) - -ROLLBACK TO SAVEPOINT settings; --- provoke error in worker --- (make the error message long enough to require multiple bufferloads) -SAVEPOINT settings; -SET LOCAL force_parallel_mode = 1; -select (stringu1 || repeat('abcd', 5000))::int2 from tenk1 where unique1 = 1; -ERROR: invalid input syntax for type smallint: "BAAAAAabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcd" -CONTEXT: parallel worker -ROLLBACK TO SAVEPOINT settings; --- test interaction with set-returning functions -SAVEPOINT settings; --- multiple subqueries under a single Gather node --- must set parallel_setup_cost > 0 to discourage multiple Gather nodes -SET LOCAL parallel_setup_cost = 10; -EXPLAIN (COSTS OFF) -SELECT unique1 FROM tenk1 WHERE fivethous = tenthous + 1 -UNION ALL -SELECT unique1 FROM tenk1 WHERE fivethous = tenthous + 1; - QUERY PLAN ----------------------------------------------------- - Gather - Workers Planned: 4 - -> Parallel Append - -> Parallel Seq Scan on tenk1 - Filter: (fivethous = (tenthous + 1)) - -> Parallel Seq Scan on tenk1 tenk1_1 - Filter: (fivethous = (tenthous + 1)) -(7 rows) - -ROLLBACK TO SAVEPOINT settings; --- can't use multiple subqueries under a single Gather node due to initPlans -EXPLAIN (COSTS OFF) -SELECT unique1 FROM tenk1 WHERE fivethous = - (SELECT unique1 FROM tenk1 WHERE fivethous = 1 LIMIT 1) -UNION ALL -SELECT unique1 FROM tenk1 WHERE fivethous = - (SELECT unique2 FROM tenk1 WHERE fivethous = 1 LIMIT 1) -ORDER BY 1; - QUERY PLAN --------------------------------------------------------------------- - Sort - Sort Key: tenk1.unique1 - -> Append - -> Gather - Workers Planned: 4 - Params Evaluated: $1 - InitPlan 1 (returns $1) - -> Limit - -> Gather - Workers Planned: 4 - -> Parallel Seq Scan on tenk1 tenk1_2 - Filter: (fivethous = 1) - -> Parallel Seq Scan on tenk1 - Filter: (fivethous = $1) - -> Gather - Workers Planned: 4 - Params Evaluated: $3 - InitPlan 2 (returns $3) - -> Limit - -> Gather - Workers Planned: 4 - -> Parallel Seq Scan on tenk1 tenk1_3 - Filter: (fivethous = 1) - -> Parallel Seq Scan on tenk1 tenk1_1 - Filter: (fivethous = $3) -(25 rows) - --- test interaction with SRFs -SELECT * FROM information_schema.foreign_data_wrapper_options -ORDER BY 1, 2, 3; - foreign_data_wrapper_catalog | foreign_data_wrapper_name | option_name | option_value -------------------------------+---------------------------+-------------+-------------- -(0 rows) - -EXPLAIN (VERBOSE, COSTS OFF) -SELECT generate_series(1, two), array(select generate_series(1, two)) - FROM tenk1 ORDER BY tenthous; - QUERY PLAN ----------------------------------------------------------------------- - ProjectSet - Output: generate_series(1, tenk1.two), (SubPlan 1), tenk1.tenthous - -> Gather Merge - Output: tenk1.two, tenk1.tenthous - Workers Planned: 4 - -> Result - Output: tenk1.two, tenk1.tenthous - -> Sort - Output: tenk1.tenthous, tenk1.two - Sort Key: tenk1.tenthous - -> Parallel Seq Scan on public.tenk1 - Output: tenk1.tenthous, tenk1.two - SubPlan 1 - -> ProjectSet - Output: generate_series(1, tenk1.two) - -> Result -(16 rows) - --- test passing expanded-value representations to workers -CREATE FUNCTION make_some_array(int,int) returns int[] as -$$declare x int[]; - begin - x[1] := $1; - x[2] := $2; - return x; - end$$ language plpgsql parallel safe; -CREATE TABLE fooarr(f1 text, f2 int[], f3 text); -INSERT INTO fooarr VALUES('1', ARRAY[1,2], 'one'); -PREPARE pstmt(text, int[]) AS SELECT * FROM fooarr WHERE f1 = $1 AND f2 = $2; -EXPLAIN (COSTS OFF) EXECUTE pstmt('1', make_some_array(1,2)); - QUERY PLAN ------------------------------------------------------------------- - Gather - Workers Planned: 3 - -> Parallel Seq Scan on fooarr - Filter: ((f1 = '1'::text) AND (f2 = '{1,2}'::integer[])) -(4 rows) - -EXECUTE pstmt('1', make_some_array(1,2)); - f1 | f2 | f3 -----+-------+----- - 1 | {1,2} | one -(1 row) - -DEALLOCATE pstmt; --- test interaction between subquery and partial_paths -CREATE VIEW tenk1_vw_sec WITH (security_barrier) AS SELECT * FROM tenk1; -EXPLAIN (COSTS OFF) -SELECT 1 FROM tenk1_vw_sec - WHERE (SELECT sum(f1) FROM int4_tbl WHERE f1 < unique1) < 100; - QUERY PLAN -------------------------------------------------------------------- - Subquery Scan on tenk1_vw_sec - Filter: ((SubPlan 1) < 100) - -> Gather - Workers Planned: 4 - -> Parallel Index Only Scan using tenk1_unique1 on tenk1 - SubPlan 1 - -> Aggregate - -> Seq Scan on int4_tbl - Filter: (f1 < tenk1_vw_sec.unique1) -(9 rows) - -rollback; +server closed the connection unexpectedly + This probably means the server terminated abnormally + before or while processing the request. +connection to server was lost diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/write_parallel.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/write_parallel.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/write_parallel.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/write_parallel.out 2023-02-20 19:47:50.229216359 -0500 @@ -1,80 +1 @@ --- --- PARALLEL --- -begin; --- encourage use of parallel plans -set parallel_setup_cost=0; -set parallel_tuple_cost=0; -set min_parallel_table_scan_size=0; -set max_parallel_workers_per_gather=4; --- --- Test write operations that has an underlying query that is eligible --- for parallel plans --- -explain (costs off) create table parallel_write as - select length(stringu1) from tenk1 group by length(stringu1); - QUERY PLAN ---------------------------------------------------- - Finalize HashAggregate - Group Key: (length((stringu1)::text)) - -> Gather - Workers Planned: 4 - -> Partial HashAggregate - Group Key: length((stringu1)::text) - -> Parallel Seq Scan on tenk1 -(7 rows) - -create table parallel_write as - select length(stringu1) from tenk1 group by length(stringu1); -drop table parallel_write; -explain (costs off) select length(stringu1) into parallel_write - from tenk1 group by length(stringu1); - QUERY PLAN ---------------------------------------------------- - Finalize HashAggregate - Group Key: (length((stringu1)::text)) - -> Gather - Workers Planned: 4 - -> Partial HashAggregate - Group Key: length((stringu1)::text) - -> Parallel Seq Scan on tenk1 -(7 rows) - -select length(stringu1) into parallel_write - from tenk1 group by length(stringu1); -drop table parallel_write; -explain (costs off) create materialized view parallel_mat_view as - select length(stringu1) from tenk1 group by length(stringu1); - QUERY PLAN ---------------------------------------------------- - Finalize HashAggregate - Group Key: (length((stringu1)::text)) - -> Gather - Workers Planned: 4 - -> Partial HashAggregate - Group Key: length((stringu1)::text) - -> Parallel Seq Scan on tenk1 -(7 rows) - -create materialized view parallel_mat_view as - select length(stringu1) from tenk1 group by length(stringu1); -create unique index on parallel_mat_view(length); -refresh materialized view parallel_mat_view; -refresh materialized view concurrently parallel_mat_view; -drop materialized view parallel_mat_view; -prepare prep_stmt as select length(stringu1) from tenk1 group by length(stringu1); -explain (costs off) create table parallel_write as execute prep_stmt; - QUERY PLAN ---------------------------------------------------- - Finalize HashAggregate - Group Key: (length((stringu1)::text)) - -> Gather - Workers Planned: 4 - -> Partial HashAggregate - Group Key: length((stringu1)::text) - -> Parallel Seq Scan on tenk1 -(7 rows) - -create table parallel_write as execute prep_stmt; -drop table parallel_write; -rollback; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/vacuum_parallel.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/vacuum_parallel.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/vacuum_parallel.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/vacuum_parallel.out 2023-02-20 19:47:50.899216388 -0500 @@ -1,49 +1 @@ -SET max_parallel_maintenance_workers TO 4; -SET min_parallel_index_scan_size TO '128kB'; --- Bug #17245: Make sure that we don't totally fail to VACUUM individual indexes that --- happen to be below min_parallel_index_scan_size during parallel VACUUM: -CREATE TABLE parallel_vacuum_table (a int) WITH (autovacuum_enabled = off); -INSERT INTO parallel_vacuum_table SELECT i from generate_series(1, 10000) i; --- Parallel VACUUM will never be used unless there are at least two indexes --- that exceed min_parallel_index_scan_size. Create two such indexes, and --- a third index that is smaller than min_parallel_index_scan_size. -CREATE INDEX regular_sized_index ON parallel_vacuum_table(a); -CREATE INDEX typically_sized_index ON parallel_vacuum_table(a); --- Note: vacuum_in_leader_small_index can apply deduplication, making it ~3x --- smaller than the other indexes -CREATE INDEX vacuum_in_leader_small_index ON parallel_vacuum_table((1)); --- Verify (as best we can) that the cost model for parallel VACUUM --- will make our VACUUM run in parallel, while always leaving it up to the --- parallel leader to handle the vacuum_in_leader_small_index index: -SELECT EXISTS ( -SELECT 1 -FROM pg_class -WHERE oid = 'vacuum_in_leader_small_index'::regclass AND - pg_relation_size(oid) < - pg_size_bytes(current_setting('min_parallel_index_scan_size')) -) as leader_will_handle_small_index; - leader_will_handle_small_index --------------------------------- - t -(1 row) - -SELECT count(*) as trigger_parallel_vacuum_nindexes -FROM pg_class -WHERE oid in ('regular_sized_index'::regclass, 'typically_sized_index'::regclass) AND - pg_relation_size(oid) >= - pg_size_bytes(current_setting('min_parallel_index_scan_size')); - trigger_parallel_vacuum_nindexes ----------------------------------- - 2 -(1 row) - --- Parallel VACUUM with B-Tree page deletions, ambulkdelete calls: -DELETE FROM parallel_vacuum_table; -VACUUM (PARALLEL 4, INDEX_CLEANUP ON) parallel_vacuum_table; --- Since vacuum_in_leader_small_index uses deduplication, we expect an --- assertion failure with bug #17245 (in the absence of bugfix): -INSERT INTO parallel_vacuum_table SELECT i FROM generate_series(1, 10000) i; -RESET max_parallel_maintenance_workers; -RESET min_parallel_index_scan_size; --- Deliberately don't drop table, to get further coverage from tools like --- pg_amcheck in some testing scenarios +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/publication.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/publication.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/publication.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/publication.out 2023-02-20 19:47:51.679216421 -0500 @@ -1,344 +1 @@ --- --- PUBLICATION --- -CREATE ROLE regress_publication_user LOGIN SUPERUSER; -CREATE ROLE regress_publication_user2; -CREATE ROLE regress_publication_user_dummy LOGIN NOSUPERUSER; -SET SESSION AUTHORIZATION 'regress_publication_user'; --- suppress warning that depends on wal_level -SET client_min_messages = 'ERROR'; -CREATE PUBLICATION testpub_default; -RESET client_min_messages; -COMMENT ON PUBLICATION testpub_default IS 'test publication'; -SELECT obj_description(p.oid, 'pg_publication') FROM pg_publication p; - obj_description ------------------- - test publication -(1 row) - -SET client_min_messages = 'ERROR'; -CREATE PUBLICATION testpib_ins_trunct WITH (publish = insert); -RESET client_min_messages; -ALTER PUBLICATION testpub_default SET (publish = update); --- error cases -CREATE PUBLICATION testpub_xxx WITH (foo); -ERROR: unrecognized publication parameter: "foo" -CREATE PUBLICATION testpub_xxx WITH (publish = 'cluster, vacuum'); -ERROR: unrecognized "publish" value: "cluster" -CREATE PUBLICATION testpub_xxx WITH (publish_via_partition_root = 'true', publish_via_partition_root = '0'); -ERROR: conflicting or redundant options -\dRp - List of publications - Name | Owner | All tables | Inserts | Updates | Deletes | Truncates | Via root ---------------------+--------------------------+------------+---------+---------+---------+-----------+---------- - testpib_ins_trunct | regress_publication_user | f | t | f | f | f | f - testpub_default | regress_publication_user | f | f | t | f | f | f -(2 rows) - -ALTER PUBLICATION testpub_default SET (publish = 'insert, update, delete'); -\dRp - List of publications - Name | Owner | All tables | Inserts | Updates | Deletes | Truncates | Via root ---------------------+--------------------------+------------+---------+---------+---------+-----------+---------- - testpib_ins_trunct | regress_publication_user | f | t | f | f | f | f - testpub_default | regress_publication_user | f | t | t | t | f | f -(2 rows) - ---- adding tables -CREATE SCHEMA pub_test; -CREATE TABLE testpub_tbl1 (id serial primary key, data text); -CREATE TABLE pub_test.testpub_nopk (foo int, bar int); -CREATE VIEW testpub_view AS SELECT 1; -CREATE TABLE testpub_parted (a int) PARTITION BY LIST (a); -SET client_min_messages = 'ERROR'; -CREATE PUBLICATION testpub_foralltables FOR ALL TABLES WITH (publish = 'insert'); -RESET client_min_messages; -ALTER PUBLICATION testpub_foralltables SET (publish = 'insert, update'); -CREATE TABLE testpub_tbl2 (id serial primary key, data text); --- fail - can't add to for all tables publication -ALTER PUBLICATION testpub_foralltables ADD TABLE testpub_tbl2; -ERROR: publication "testpub_foralltables" is defined as FOR ALL TABLES -DETAIL: Tables cannot be added to or dropped from FOR ALL TABLES publications. --- fail - can't drop from all tables publication -ALTER PUBLICATION testpub_foralltables DROP TABLE testpub_tbl2; -ERROR: publication "testpub_foralltables" is defined as FOR ALL TABLES -DETAIL: Tables cannot be added to or dropped from FOR ALL TABLES publications. --- fail - can't add to for all tables publication -ALTER PUBLICATION testpub_foralltables SET TABLE pub_test.testpub_nopk; -ERROR: publication "testpub_foralltables" is defined as FOR ALL TABLES -DETAIL: Tables cannot be added to or dropped from FOR ALL TABLES publications. -SELECT pubname, puballtables FROM pg_publication WHERE pubname = 'testpub_foralltables'; - pubname | puballtables -----------------------+-------------- - testpub_foralltables | t -(1 row) - -\d+ testpub_tbl2 - Table "public.testpub_tbl2" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+------------------------------------------+----------+--------------+------------- - id | integer | | not null | nextval('testpub_tbl2_id_seq'::regclass) | plain | | - data | text | | | | extended | | -Indexes: - "testpub_tbl2_pkey" PRIMARY KEY, btree (id) -Publications: - "testpub_foralltables" - -\dRp+ testpub_foralltables - Publication testpub_foralltables - Owner | All tables | Inserts | Updates | Deletes | Truncates | Via root ---------------------------+------------+---------+---------+---------+-----------+---------- - regress_publication_user | t | t | t | f | f | f -(1 row) - -DROP TABLE testpub_tbl2; -DROP PUBLICATION testpub_foralltables; -CREATE TABLE testpub_tbl3 (a int); -CREATE TABLE testpub_tbl3a (b text) INHERITS (testpub_tbl3); -SET client_min_messages = 'ERROR'; -CREATE PUBLICATION testpub3 FOR TABLE testpub_tbl3; -CREATE PUBLICATION testpub4 FOR TABLE ONLY testpub_tbl3; -RESET client_min_messages; -\dRp+ testpub3 - Publication testpub3 - Owner | All tables | Inserts | Updates | Deletes | Truncates | Via root ---------------------------+------------+---------+---------+---------+-----------+---------- - regress_publication_user | f | t | t | t | t | f -Tables: - "public.testpub_tbl3" - "public.testpub_tbl3a" - -\dRp+ testpub4 - Publication testpub4 - Owner | All tables | Inserts | Updates | Deletes | Truncates | Via root ---------------------------+------------+---------+---------+---------+-----------+---------- - regress_publication_user | f | t | t | t | t | f -Tables: - "public.testpub_tbl3" - -DROP TABLE testpub_tbl3, testpub_tbl3a; -DROP PUBLICATION testpub3, testpub4; --- Tests for partitioned tables -SET client_min_messages = 'ERROR'; -CREATE PUBLICATION testpub_forparted; -CREATE PUBLICATION testpub_forparted1; -RESET client_min_messages; -CREATE TABLE testpub_parted1 (LIKE testpub_parted); -CREATE TABLE testpub_parted2 (LIKE testpub_parted); -ALTER PUBLICATION testpub_forparted1 SET (publish='insert'); -ALTER TABLE testpub_parted ATTACH PARTITION testpub_parted1 FOR VALUES IN (1); -ALTER TABLE testpub_parted ATTACH PARTITION testpub_parted2 FOR VALUES IN (2); --- works despite missing REPLICA IDENTITY, because updates are not replicated -UPDATE testpub_parted1 SET a = 1; --- only parent is listed as being in publication, not the partition -ALTER PUBLICATION testpub_forparted ADD TABLE testpub_parted; -\dRp+ testpub_forparted - Publication testpub_forparted - Owner | All tables | Inserts | Updates | Deletes | Truncates | Via root ---------------------------+------------+---------+---------+---------+-----------+---------- - regress_publication_user | f | t | t | t | t | f -Tables: - "public.testpub_parted" - --- should now fail, because parent's publication replicates updates -UPDATE testpub_parted1 SET a = 1; -ERROR: cannot update table "testpub_parted1" because it does not have a replica identity and publishes updates -HINT: To enable updating the table, set REPLICA IDENTITY using ALTER TABLE. -ALTER TABLE testpub_parted DETACH PARTITION testpub_parted1; --- works again, because parent's publication is no longer considered -UPDATE testpub_parted1 SET a = 1; -ALTER PUBLICATION testpub_forparted SET (publish_via_partition_root = true); -\dRp+ testpub_forparted - Publication testpub_forparted - Owner | All tables | Inserts | Updates | Deletes | Truncates | Via root ---------------------------+------------+---------+---------+---------+-----------+---------- - regress_publication_user | f | t | t | t | t | t -Tables: - "public.testpub_parted" - --- still fail, because parent's publication replicates updates -UPDATE testpub_parted2 SET a = 2; -ERROR: cannot update table "testpub_parted2" because it does not have a replica identity and publishes updates -HINT: To enable updating the table, set REPLICA IDENTITY using ALTER TABLE. -ALTER PUBLICATION testpub_forparted DROP TABLE testpub_parted; --- works again, because update is no longer replicated -UPDATE testpub_parted2 SET a = 2; --- publication includes both the parent table and the child table -ALTER PUBLICATION testpub_forparted ADD TABLE testpub_parted, testpub_parted2; --- only parent is listed as being in publication, not the partition -SELECT * FROM pg_publication_tables; - pubname | schemaname | tablename --------------------+------------+---------------- - testpub_forparted | public | testpub_parted -(1 row) - -DROP TABLE testpub_parted1, testpub_parted2; -DROP PUBLICATION testpub_forparted, testpub_forparted1; --- Test cache invalidation FOR ALL TABLES publication -SET client_min_messages = 'ERROR'; -CREATE TABLE testpub_tbl4(a int); -INSERT INTO testpub_tbl4 values(1); -UPDATE testpub_tbl4 set a = 2; -CREATE PUBLICATION testpub_foralltables FOR ALL TABLES; -RESET client_min_messages; --- fail missing REPLICA IDENTITY -UPDATE testpub_tbl4 set a = 3; -ERROR: cannot update table "testpub_tbl4" because it does not have a replica identity and publishes updates -HINT: To enable updating the table, set REPLICA IDENTITY using ALTER TABLE. -DROP PUBLICATION testpub_foralltables; --- should pass after dropping the publication -UPDATE testpub_tbl4 set a = 3; -DROP TABLE testpub_tbl4; --- fail - view -CREATE PUBLICATION testpub_fortbl FOR TABLE testpub_view; -ERROR: "testpub_view" is not a table -DETAIL: Only tables can be added to publications. -SET client_min_messages = 'ERROR'; -CREATE PUBLICATION testpub_fortbl FOR TABLE testpub_tbl1, pub_test.testpub_nopk; -RESET client_min_messages; --- fail - already added -ALTER PUBLICATION testpub_fortbl ADD TABLE testpub_tbl1; -ERROR: relation "testpub_tbl1" is already member of publication "testpub_fortbl" --- fail - already added -CREATE PUBLICATION testpub_fortbl FOR TABLE testpub_tbl1; -ERROR: publication "testpub_fortbl" already exists -\dRp+ testpub_fortbl - Publication testpub_fortbl - Owner | All tables | Inserts | Updates | Deletes | Truncates | Via root ---------------------------+------------+---------+---------+---------+-----------+---------- - regress_publication_user | f | t | t | t | t | f -Tables: - "pub_test.testpub_nopk" - "public.testpub_tbl1" - --- fail - view -ALTER PUBLICATION testpub_default ADD TABLE testpub_view; -ERROR: "testpub_view" is not a table -DETAIL: Only tables can be added to publications. -ALTER PUBLICATION testpub_default ADD TABLE testpub_tbl1; -ALTER PUBLICATION testpub_default SET TABLE testpub_tbl1; -ALTER PUBLICATION testpub_default ADD TABLE pub_test.testpub_nopk; -ALTER PUBLICATION testpib_ins_trunct ADD TABLE pub_test.testpub_nopk, testpub_tbl1; -\d+ pub_test.testpub_nopk - Table "pub_test.testpub_nopk" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+---------+---------+--------------+------------- - foo | integer | | | | plain | | - bar | integer | | | | plain | | -Publications: - "testpib_ins_trunct" - "testpub_default" - "testpub_fortbl" - -\d+ testpub_tbl1 - Table "public.testpub_tbl1" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+------------------------------------------+----------+--------------+------------- - id | integer | | not null | nextval('testpub_tbl1_id_seq'::regclass) | plain | | - data | text | | | | extended | | -Indexes: - "testpub_tbl1_pkey" PRIMARY KEY, btree (id) -Publications: - "testpib_ins_trunct" - "testpub_default" - "testpub_fortbl" - -\dRp+ testpub_default - Publication testpub_default - Owner | All tables | Inserts | Updates | Deletes | Truncates | Via root ---------------------------+------------+---------+---------+---------+-----------+---------- - regress_publication_user | f | t | t | t | f | f -Tables: - "pub_test.testpub_nopk" - "public.testpub_tbl1" - -ALTER PUBLICATION testpub_default DROP TABLE testpub_tbl1, pub_test.testpub_nopk; --- fail - nonexistent -ALTER PUBLICATION testpub_default DROP TABLE pub_test.testpub_nopk; -ERROR: relation "testpub_nopk" is not part of the publication -\d+ testpub_tbl1 - Table "public.testpub_tbl1" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+------------------------------------------+----------+--------------+------------- - id | integer | | not null | nextval('testpub_tbl1_id_seq'::regclass) | plain | | - data | text | | | | extended | | -Indexes: - "testpub_tbl1_pkey" PRIMARY KEY, btree (id) -Publications: - "testpib_ins_trunct" - "testpub_fortbl" - --- verify relation cache invalidation when a primary key is added using --- an existing index -CREATE TABLE pub_test.testpub_addpk (id int not null, data int); -ALTER PUBLICATION testpub_default ADD TABLE pub_test.testpub_addpk; -INSERT INTO pub_test.testpub_addpk VALUES(1, 11); -CREATE UNIQUE INDEX testpub_addpk_id_idx ON pub_test.testpub_addpk(id); --- fail: -UPDATE pub_test.testpub_addpk SET id = 2; -ERROR: cannot update table "testpub_addpk" because it does not have a replica identity and publishes updates -HINT: To enable updating the table, set REPLICA IDENTITY using ALTER TABLE. -ALTER TABLE pub_test.testpub_addpk ADD PRIMARY KEY USING INDEX testpub_addpk_id_idx; --- now it should work: -UPDATE pub_test.testpub_addpk SET id = 2; -DROP TABLE pub_test.testpub_addpk; --- permissions -SET ROLE regress_publication_user2; -CREATE PUBLICATION testpub2; -- fail -ERROR: permission denied for database regression -SET ROLE regress_publication_user; -GRANT CREATE ON DATABASE regression TO regress_publication_user2; -SET ROLE regress_publication_user2; -SET client_min_messages = 'ERROR'; -CREATE PUBLICATION testpub2; -- ok -RESET client_min_messages; -ALTER PUBLICATION testpub2 ADD TABLE testpub_tbl1; -- fail -ERROR: must be owner of table testpub_tbl1 -SET ROLE regress_publication_user; -GRANT regress_publication_user TO regress_publication_user2; -SET ROLE regress_publication_user2; -ALTER PUBLICATION testpub2 ADD TABLE testpub_tbl1; -- ok -DROP PUBLICATION testpub2; -SET ROLE regress_publication_user; -REVOKE CREATE ON DATABASE regression FROM regress_publication_user2; -DROP TABLE testpub_parted; -DROP VIEW testpub_view; -DROP TABLE testpub_tbl1; -\dRp+ testpub_default - Publication testpub_default - Owner | All tables | Inserts | Updates | Deletes | Truncates | Via root ---------------------------+------------+---------+---------+---------+-----------+---------- - regress_publication_user | f | t | t | t | f | f -(1 row) - --- fail - must be owner of publication -SET ROLE regress_publication_user_dummy; -ALTER PUBLICATION testpub_default RENAME TO testpub_dummy; -ERROR: must be owner of publication testpub_default -RESET ROLE; -ALTER PUBLICATION testpub_default RENAME TO testpub_foo; -\dRp testpub_foo - List of publications - Name | Owner | All tables | Inserts | Updates | Deletes | Truncates | Via root --------------+--------------------------+------------+---------+---------+---------+-----------+---------- - testpub_foo | regress_publication_user | f | t | t | t | f | f -(1 row) - --- rename back to keep the rest simple -ALTER PUBLICATION testpub_foo RENAME TO testpub_default; -ALTER PUBLICATION testpub_default OWNER TO regress_publication_user2; -\dRp testpub_default - List of publications - Name | Owner | All tables | Inserts | Updates | Deletes | Truncates | Via root ------------------+---------------------------+------------+---------+---------+---------+-----------+---------- - testpub_default | regress_publication_user2 | f | t | t | t | f | f -(1 row) - -DROP PUBLICATION testpub_default; -DROP PUBLICATION testpib_ins_trunct; -DROP PUBLICATION testpub_fortbl; -DROP SCHEMA pub_test CASCADE; -NOTICE: drop cascades to table pub_test.testpub_nopk -RESET SESSION AUTHORIZATION; -DROP ROLE regress_publication_user, regress_publication_user2; -DROP ROLE regress_publication_user_dummy; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/subscription.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/subscription.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/subscription.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/subscription.out 2023-02-20 19:47:51.709216422 -0500 @@ -1,269 +1 @@ --- --- SUBSCRIPTION --- -CREATE ROLE regress_subscription_user LOGIN SUPERUSER; -CREATE ROLE regress_subscription_user2; -CREATE ROLE regress_subscription_user_dummy LOGIN NOSUPERUSER; -SET SESSION AUTHORIZATION 'regress_subscription_user'; --- fail - no publications -CREATE SUBSCRIPTION regress_testsub CONNECTION 'foo'; -ERROR: syntax error at or near ";" -LINE 1: CREATE SUBSCRIPTION regress_testsub CONNECTION 'foo'; - ^ --- fail - no connection -CREATE SUBSCRIPTION regress_testsub PUBLICATION foo; -ERROR: syntax error at or near "PUBLICATION" -LINE 1: CREATE SUBSCRIPTION regress_testsub PUBLICATION foo; - ^ --- fail - cannot do CREATE SUBSCRIPTION CREATE SLOT inside transaction block -BEGIN; -CREATE SUBSCRIPTION regress_testsub CONNECTION 'testconn' PUBLICATION testpub WITH (create_slot); -ERROR: CREATE SUBSCRIPTION ... WITH (create_slot = true) cannot run inside a transaction block -COMMIT; --- fail - invalid connection string -CREATE SUBSCRIPTION regress_testsub CONNECTION 'testconn' PUBLICATION testpub; -ERROR: invalid connection string syntax: missing "=" after "testconn" in connection info string - --- fail - duplicate publications -CREATE SUBSCRIPTION regress_testsub CONNECTION 'dbname=regress_doesnotexist' PUBLICATION foo, testpub, foo WITH (connect = false); -ERROR: publication name "foo" used more than once --- ok -CREATE SUBSCRIPTION regress_testsub CONNECTION 'dbname=regress_doesnotexist' PUBLICATION testpub WITH (connect = false); -WARNING: tables were not subscribed, you will have to run ALTER SUBSCRIPTION ... REFRESH PUBLICATION to subscribe the tables -COMMENT ON SUBSCRIPTION regress_testsub IS 'test subscription'; -SELECT obj_description(s.oid, 'pg_subscription') FROM pg_subscription s; - obj_description -------------------- - test subscription -(1 row) - --- fail - name already exists -CREATE SUBSCRIPTION regress_testsub CONNECTION 'dbname=regress_doesnotexist' PUBLICATION testpub WITH (connect = false); -ERROR: subscription "regress_testsub" already exists --- fail - must be superuser -SET SESSION AUTHORIZATION 'regress_subscription_user2'; -CREATE SUBSCRIPTION regress_testsub2 CONNECTION 'dbname=regress_doesnotexist' PUBLICATION foo WITH (connect = false); -ERROR: must be superuser to create subscriptions -SET SESSION AUTHORIZATION 'regress_subscription_user'; --- fail - invalid option combinations -CREATE SUBSCRIPTION regress_testsub2 CONNECTION 'dbname=regress_doesnotexist' PUBLICATION testpub WITH (connect = false, copy_data = true); -ERROR: connect = false and copy_data = true are mutually exclusive options -CREATE SUBSCRIPTION regress_testsub2 CONNECTION 'dbname=regress_doesnotexist' PUBLICATION testpub WITH (connect = false, enabled = true); -ERROR: connect = false and enabled = true are mutually exclusive options -CREATE SUBSCRIPTION regress_testsub2 CONNECTION 'dbname=regress_doesnotexist' PUBLICATION testpub WITH (connect = false, create_slot = true); -ERROR: connect = false and create_slot = true are mutually exclusive options -CREATE SUBSCRIPTION regress_testsub2 CONNECTION 'dbname=regress_doesnotexist' PUBLICATION testpub WITH (slot_name = NONE, enabled = true); -ERROR: slot_name = NONE and enabled = true are mutually exclusive options -CREATE SUBSCRIPTION regress_testsub2 CONNECTION 'dbname=regress_doesnotexist' PUBLICATION testpub WITH (slot_name = NONE, create_slot = true); -ERROR: slot_name = NONE and create_slot = true are mutually exclusive options -CREATE SUBSCRIPTION regress_testsub2 CONNECTION 'dbname=regress_doesnotexist' PUBLICATION testpub WITH (slot_name = NONE); -ERROR: subscription with slot_name = NONE must also set enabled = false -CREATE SUBSCRIPTION regress_testsub2 CONNECTION 'dbname=regress_doesnotexist' PUBLICATION testpub WITH (slot_name = NONE, enabled = false); -ERROR: subscription with slot_name = NONE must also set create_slot = false -CREATE SUBSCRIPTION regress_testsub2 CONNECTION 'dbname=regress_doesnotexist' PUBLICATION testpub WITH (slot_name = NONE, create_slot = false); -ERROR: subscription with slot_name = NONE must also set enabled = false --- ok - with slot_name = NONE -CREATE SUBSCRIPTION regress_testsub3 CONNECTION 'dbname=regress_doesnotexist' PUBLICATION testpub WITH (slot_name = NONE, connect = false); -WARNING: tables were not subscribed, you will have to run ALTER SUBSCRIPTION ... REFRESH PUBLICATION to subscribe the tables --- fail -ALTER SUBSCRIPTION regress_testsub3 ENABLE; -ERROR: cannot enable subscription that does not have a slot name -ALTER SUBSCRIPTION regress_testsub3 REFRESH PUBLICATION; -ERROR: ALTER SUBSCRIPTION ... REFRESH is not allowed for disabled subscriptions -DROP SUBSCRIPTION regress_testsub3; --- fail - invalid connection string -ALTER SUBSCRIPTION regress_testsub CONNECTION 'foobar'; -ERROR: invalid connection string syntax: missing "=" after "foobar" in connection info string - -\dRs+ - List of subscriptions - Name | Owner | Enabled | Publication | Binary | Streaming | Synchronous commit | Conninfo ------------------+---------------------------+---------+-------------+--------+-----------+--------------------+----------------------------- - regress_testsub | regress_subscription_user | f | {testpub} | f | f | off | dbname=regress_doesnotexist -(1 row) - -ALTER SUBSCRIPTION regress_testsub SET PUBLICATION testpub2, testpub3 WITH (refresh = false); -ALTER SUBSCRIPTION regress_testsub CONNECTION 'dbname=regress_doesnotexist2'; -ALTER SUBSCRIPTION regress_testsub SET (slot_name = 'newname'); --- fail -ALTER SUBSCRIPTION regress_testsub SET (slot_name = ''); -ERROR: replication slot name "" is too short --- fail -ALTER SUBSCRIPTION regress_doesnotexist CONNECTION 'dbname=regress_doesnotexist2'; -ERROR: subscription "regress_doesnotexist" does not exist -ALTER SUBSCRIPTION regress_testsub SET (create_slot = false); -ERROR: unrecognized subscription parameter: "create_slot" -\dRs+ - List of subscriptions - Name | Owner | Enabled | Publication | Binary | Streaming | Synchronous commit | Conninfo ------------------+---------------------------+---------+---------------------+--------+-----------+--------------------+------------------------------ - regress_testsub | regress_subscription_user | f | {testpub2,testpub3} | f | f | off | dbname=regress_doesnotexist2 -(1 row) - -BEGIN; -ALTER SUBSCRIPTION regress_testsub ENABLE; -\dRs - List of subscriptions - Name | Owner | Enabled | Publication ------------------+---------------------------+---------+--------------------- - regress_testsub | regress_subscription_user | t | {testpub2,testpub3} -(1 row) - -ALTER SUBSCRIPTION regress_testsub DISABLE; -\dRs - List of subscriptions - Name | Owner | Enabled | Publication ------------------+---------------------------+---------+--------------------- - regress_testsub | regress_subscription_user | f | {testpub2,testpub3} -(1 row) - -COMMIT; --- fail - must be owner of subscription -SET ROLE regress_subscription_user_dummy; -ALTER SUBSCRIPTION regress_testsub RENAME TO regress_testsub_dummy; -ERROR: must be owner of subscription regress_testsub -RESET ROLE; -ALTER SUBSCRIPTION regress_testsub RENAME TO regress_testsub_foo; -ALTER SUBSCRIPTION regress_testsub_foo SET (synchronous_commit = local); -ALTER SUBSCRIPTION regress_testsub_foo SET (synchronous_commit = foobar); -ERROR: invalid value for parameter "synchronous_commit": "foobar" -HINT: Available values: local, remote_write, remote_apply, on, off. -\dRs+ - List of subscriptions - Name | Owner | Enabled | Publication | Binary | Streaming | Synchronous commit | Conninfo ----------------------+---------------------------+---------+---------------------+--------+-----------+--------------------+------------------------------ - regress_testsub_foo | regress_subscription_user | f | {testpub2,testpub3} | f | f | local | dbname=regress_doesnotexist2 -(1 row) - --- rename back to keep the rest simple -ALTER SUBSCRIPTION regress_testsub_foo RENAME TO regress_testsub; --- fail - new owner must be superuser -ALTER SUBSCRIPTION regress_testsub OWNER TO regress_subscription_user2; -ERROR: permission denied to change owner of subscription "regress_testsub" -HINT: The owner of a subscription must be a superuser. -ALTER ROLE regress_subscription_user2 SUPERUSER; --- now it works -ALTER SUBSCRIPTION regress_testsub OWNER TO regress_subscription_user2; --- fail - cannot do DROP SUBSCRIPTION inside transaction block with slot name -BEGIN; -DROP SUBSCRIPTION regress_testsub; -ERROR: DROP SUBSCRIPTION cannot run inside a transaction block -COMMIT; -ALTER SUBSCRIPTION regress_testsub SET (slot_name = NONE); --- now it works -BEGIN; -DROP SUBSCRIPTION regress_testsub; -COMMIT; -DROP SUBSCRIPTION IF EXISTS regress_testsub; -NOTICE: subscription "regress_testsub" does not exist, skipping -DROP SUBSCRIPTION regress_testsub; -- fail -ERROR: subscription "regress_testsub" does not exist --- fail - binary must be boolean -CREATE SUBSCRIPTION regress_testsub CONNECTION 'dbname=regress_doesnotexist' PUBLICATION testpub WITH (connect = false, binary = foo); -ERROR: binary requires a Boolean value --- now it works -CREATE SUBSCRIPTION regress_testsub CONNECTION 'dbname=regress_doesnotexist' PUBLICATION testpub WITH (connect = false, binary = true); -WARNING: tables were not subscribed, you will have to run ALTER SUBSCRIPTION ... REFRESH PUBLICATION to subscribe the tables -\dRs+ - List of subscriptions - Name | Owner | Enabled | Publication | Binary | Streaming | Synchronous commit | Conninfo ------------------+---------------------------+---------+-------------+--------+-----------+--------------------+----------------------------- - regress_testsub | regress_subscription_user | f | {testpub} | t | f | off | dbname=regress_doesnotexist -(1 row) - -ALTER SUBSCRIPTION regress_testsub SET (binary = false); -ALTER SUBSCRIPTION regress_testsub SET (slot_name = NONE); -\dRs+ - List of subscriptions - Name | Owner | Enabled | Publication | Binary | Streaming | Synchronous commit | Conninfo ------------------+---------------------------+---------+-------------+--------+-----------+--------------------+----------------------------- - regress_testsub | regress_subscription_user | f | {testpub} | f | f | off | dbname=regress_doesnotexist -(1 row) - -DROP SUBSCRIPTION regress_testsub; --- fail - streaming must be boolean -CREATE SUBSCRIPTION regress_testsub CONNECTION 'dbname=regress_doesnotexist' PUBLICATION testpub WITH (connect = false, streaming = foo); -ERROR: streaming requires a Boolean value --- now it works -CREATE SUBSCRIPTION regress_testsub CONNECTION 'dbname=regress_doesnotexist' PUBLICATION testpub WITH (connect = false, streaming = true); -WARNING: tables were not subscribed, you will have to run ALTER SUBSCRIPTION ... REFRESH PUBLICATION to subscribe the tables -\dRs+ - List of subscriptions - Name | Owner | Enabled | Publication | Binary | Streaming | Synchronous commit | Conninfo ------------------+---------------------------+---------+-------------+--------+-----------+--------------------+----------------------------- - regress_testsub | regress_subscription_user | f | {testpub} | f | t | off | dbname=regress_doesnotexist -(1 row) - -ALTER SUBSCRIPTION regress_testsub SET (streaming = false); -ALTER SUBSCRIPTION regress_testsub SET (slot_name = NONE); -\dRs+ - List of subscriptions - Name | Owner | Enabled | Publication | Binary | Streaming | Synchronous commit | Conninfo ------------------+---------------------------+---------+-------------+--------+-----------+--------------------+----------------------------- - regress_testsub | regress_subscription_user | f | {testpub} | f | f | off | dbname=regress_doesnotexist -(1 row) - --- fail - publication already exists -ALTER SUBSCRIPTION regress_testsub ADD PUBLICATION testpub WITH (refresh = false); -ERROR: publication "testpub" is already in subscription "regress_testsub" --- fail - publication used more than once -ALTER SUBSCRIPTION regress_testsub ADD PUBLICATION testpub1, testpub1 WITH (refresh = false); -ERROR: publication name "testpub1" used more than once --- ok - add two publications into subscription -ALTER SUBSCRIPTION regress_testsub ADD PUBLICATION testpub1, testpub2 WITH (refresh = false); --- fail - publications already exist -ALTER SUBSCRIPTION regress_testsub ADD PUBLICATION testpub1, testpub2 WITH (refresh = false); -ERROR: publication "testpub1" is already in subscription "regress_testsub" -\dRs+ - List of subscriptions - Name | Owner | Enabled | Publication | Binary | Streaming | Synchronous commit | Conninfo ------------------+---------------------------+---------+-----------------------------+--------+-----------+--------------------+----------------------------- - regress_testsub | regress_subscription_user | f | {testpub,testpub1,testpub2} | f | f | off | dbname=regress_doesnotexist -(1 row) - --- fail - publication used more then once -ALTER SUBSCRIPTION regress_testsub DROP PUBLICATION testpub1, testpub1 WITH (refresh = false); -ERROR: publication name "testpub1" used more than once --- fail - all publications are deleted -ALTER SUBSCRIPTION regress_testsub DROP PUBLICATION testpub, testpub1, testpub2 WITH (refresh = false); -ERROR: cannot drop all the publications from a subscription --- fail - publication does not exist in subscription -ALTER SUBSCRIPTION regress_testsub DROP PUBLICATION testpub3 WITH (refresh = false); -ERROR: publication "testpub3" is not in subscription "regress_testsub" --- ok - delete publications -ALTER SUBSCRIPTION regress_testsub DROP PUBLICATION testpub1, testpub2 WITH (refresh = false); -\dRs+ - List of subscriptions - Name | Owner | Enabled | Publication | Binary | Streaming | Synchronous commit | Conninfo ------------------+---------------------------+---------+-------------+--------+-----------+--------------------+----------------------------- - regress_testsub | regress_subscription_user | f | {testpub} | f | f | off | dbname=regress_doesnotexist -(1 row) - -DROP SUBSCRIPTION regress_testsub; -CREATE SUBSCRIPTION regress_testsub CONNECTION 'dbname=regress_doesnotexist' PUBLICATION mypub - WITH (connect = false, create_slot = false, copy_data = false); -WARNING: tables were not subscribed, you will have to run ALTER SUBSCRIPTION ... REFRESH PUBLICATION to subscribe the tables -ALTER SUBSCRIPTION regress_testsub ENABLE; --- fail - ALTER SUBSCRIPTION with refresh is not allowed in a transaction --- block or function -BEGIN; -ALTER SUBSCRIPTION regress_testsub SET PUBLICATION mypub WITH (refresh = true); -ERROR: ALTER SUBSCRIPTION with refresh cannot run inside a transaction block -END; -BEGIN; -ALTER SUBSCRIPTION regress_testsub REFRESH PUBLICATION; -ERROR: ALTER SUBSCRIPTION ... REFRESH cannot run inside a transaction block -END; -CREATE FUNCTION func() RETURNS VOID AS -$$ ALTER SUBSCRIPTION regress_testsub SET PUBLICATION mypub WITH (refresh = true) $$ LANGUAGE SQL; -SELECT func(); -ERROR: ALTER SUBSCRIPTION with refresh cannot be executed from a function -CONTEXT: SQL function "func" statement 1 -ALTER SUBSCRIPTION regress_testsub DISABLE; -ALTER SUBSCRIPTION regress_testsub SET (slot_name = NONE); -DROP SUBSCRIPTION regress_testsub; -DROP FUNCTION func; -RESET SESSION AUTHORIZATION; -DROP ROLE regress_subscription_user; -DROP ROLE regress_subscription_user2; -DROP ROLE regress_subscription_user_dummy; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/select_views.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/select_views.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/select_views.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/select_views.out 2023-02-20 19:47:52.809216470 -0500 @@ -1,1552 +1 @@ --- --- SELECT_VIEWS --- test the views defined in CREATE_VIEWS --- -SELECT * FROM street; - name | thepath | cname -------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------- - Access Rd 25 | [(-121.9283,37.894),(-121.9283,37.9)] | Oakland - Ada St | [(-122.2487,37.398),(-122.2496,37.401)] | Lafayette - Agua Fria Creek | [(-121.9254,37.922),(-121.9281,37.889)] | Oakland - Allen Ct | [(-122.0131,37.602),(-122.0117,37.597)] | Berkeley - Alvarado Niles Road | [(-122.0325,37.903),(-122.0316,37.9)] | Berkeley - Andrea Cir | [(-121.733218,37.88641),(-121.733286,37.90617)] | Oakland - Apricot Lane | [(-121.9471,37.401),(-121.9456,37.392)] | Oakland - Apricot Lane | [(-121.9471,37.401),(-121.9456,37.392)] | Oakland - Arden Road | [(-122.0978,37.177),(-122.1,37.177)] | Oakland - Arizona St | [(-122.0381,37.901),(-122.0367,37.898)] | Berkeley - Arlington Dr | [(-121.8802,37.408),(-121.8807,37.394)] | Oakland - Arlington Dr | [(-121.8802,37.408),(-121.8807,37.394)] | Oakland - Arlington Road | [(-121.7957,37.898),(-121.7956,37.906)] | Oakland - Arroyo Las Positas | [(-121.7973,37.997),(-121.7957,37.005)] | Oakland - Arroyo Las Positas | [(-121.7973,37.997),(-121.7957,37.005)] | Oakland - Arroyo Seco | [(-121.7073,37.766),(-121.6997,37.729)] | Oakland - Ash St | [(-122.0408,37.31),(-122.04,37.292)] | Oakland - Avenue 134th | [(-122.1823,37.002),(-122.1851,37.992)] | Oakland - Avenue 134th | [(-122.1823,37.002),(-122.1851,37.992)] | Berkeley - Avenue 140th | [(-122.1656,37.003),(-122.1691,37.988)] | Oakland - Avenue 140th | [(-122.1656,37.003),(-122.1691,37.988)] | Berkeley - Avenue D | [(-122.298,37.848),(-122.3024,37.849)] | Berkeley - B St | [(-122.1749,37.451),(-122.1743,37.443)] | Oakland - Bancroft Ave | [(-122.15714,37.4242),(-122.156,37.409)] | Oakland - Bancroft Ave | [(-122.1643,37.523),(-122.1631,37.508),(-122.1621,37.493)] | Oakland - Birch St | [(-122.1617,37.425),(-122.1614,37.417)] | Oakland - Birch St | [(-122.1673,37.509),(-122.1661,37.492)] | Oakland - Blacow Road | [(-122.0179,37.469),(-122.0167,37.465)] | Oakland - Bridgepointe Dr | [(-122.0514,37.305),(-122.0509,37.299)] | Oakland - Broadmore Ave | [(-122.095,37.522),(-122.0936,37.497)] | Oakland - Broadway | [(-122.2409,37.586),(-122.2395,37.601)] | Berkeley - Buckingham Blvd | [(-122.2231,37.59),(-122.2214,37.606)] | Berkeley - Butterfield Dr | [(-122.0838,37.002),(-122.0834,37.987)] | Oakland - Butterfield Dr | [(-122.0838,37.002),(-122.0834,37.987)] | Oakland - Butterfield Dr | [(-122.0838,37.002),(-122.0834,37.987)] | Berkeley - C St | [(-122.1768,37.46),(-122.1749,37.435)] | Oakland - Calaveras Creek | [(-121.8203,37.035),(-121.8207,37.931)] | Oakland - Calaveras Creek | [(-121.8203,37.035),(-121.8207,37.931)] | Oakland - California St | [(-122.2032,37.005),(-122.2016,37.996)] | Berkeley - California St | [(-122.2032,37.005),(-122.2016,37.996)] | Lafayette - Cameron Ave | [(-122.1316,37.502),(-122.1327,37.481)] | Oakland - Campus Dr | [(-122.1704,37.905),(-122.1678,37.868),(-122.1671,37.865)] | Berkeley - Capricorn Ave | [(-122.2176,37.404),(-122.2164,37.384)] | Lafayette - Carson St | [(-122.1846,37.9),(-122.1843,37.901)] | Berkeley - Cedar Blvd | [(-122.0282,37.446),(-122.0265,37.43)] | Oakland - Cedar St | [(-122.3011,37.737),(-122.2999,37.739)] | Berkeley - Celia St | [(-122.0611,37.3),(-122.0616,37.299)] | Oakland - Central Ave | [(-122.2343,37.602),(-122.2331,37.595)] | Berkeley - Chambers Dr | [(-122.2004,37.352),(-122.1972,37.368)] | Lafayette - Chambers Lane | [(-122.2001,37.359),(-122.1975,37.371)] | Lafayette - Champion St | [(-122.214,37.991),(-122.2147,37.002)] | Berkeley - Champion St | [(-122.214,37.991),(-122.2147,37.002)] | Lafayette - Chapman Dr | [(-122.0421,37.504),(-122.0414,37.498)] | Oakland - Charles St | [(-122.0255,37.505),(-122.0252,37.499)] | Oakland - Cherry St | [(-122.0437,37.42),(-122.0434,37.413)] | Oakland - Claremont Pl | [(-122.0542,37.995),(-122.0542,37.008)] | Oakland - Claremont Pl | [(-122.0542,37.995),(-122.0542,37.008)] | Oakland - Claremont Pl | [(-122.0542,37.995),(-122.0542,37.008)] | Berkeley - Coliseum Way | [(-122.2001,37.47),(-122.1978,37.516)] | Oakland - Coliseum Way | [(-122.2113,37.626),(-122.2085,37.592),(-122.2063,37.568)] | Berkeley - Coolidge Ave | [(-122.2007,37.058),(-122.1992,37.06)] | Lafayette - Cornell Ave | [(-122.2956,37.925),(-122.2949,37.906),(-122.2939,37.875)] | Berkeley - Corriea Way | [(-121.9501,37.402),(-121.9505,37.398)] | Oakland - Corriea Way | [(-121.9501,37.402),(-121.9505,37.398)] | Oakland - Cowing Road | [(-122.0002,37.934),(-121.9772,37.782)] | Oakland - Creston Road | [(-122.2639,37.002),(-122.2613,37.986),(-122.2602,37.978),(-122.2598,37.973)] | Berkeley - Creston Road | [(-122.2639,37.002),(-122.2613,37.986),(-122.2602,37.978),(-122.2598,37.973)] | Lafayette - Crow Canyon Creek | [(-122.043,37.905),(-122.0368,37.71)] | Berkeley - Crystaline Dr | [(-121.925856,37),(-121.925869,37.00527)] | Oakland - Cull Canyon Road | [(-122.0536,37.435),(-122.0499,37.315)] | Oakland - Cull Creek | [(-122.0624,37.875),(-122.0582,37.527)] | Berkeley - D St | [(-122.1811,37.505),(-122.1805,37.497)] | Oakland - Decoto Road | [(-122.0159,37.006),(-122.016,37.002),(-122.0164,37.993)] | Oakland - Decoto Road | [(-122.0159,37.006),(-122.016,37.002),(-122.0164,37.993)] | Oakland - Decoto Road | [(-122.0159,37.006),(-122.016,37.002),(-122.0164,37.993)] | Berkeley - Deering St | [(-122.2146,37.904),(-122.2126,37.897)] | Berkeley - Dimond Ave | [(-122.2167,37.994),(-122.2162,37.006)] | Berkeley - Dimond Ave | [(-122.2167,37.994),(-122.2162,37.006)] | Lafayette - Donna Way | [(-122.1333,37.606),(-122.1316,37.599)] | Berkeley - Driftwood Dr | [(-122.0109,37.482),(-122.0113,37.477)] | Oakland - Driscoll Road | [(-121.9482,37.403),(-121.948451,37.39995)] | Oakland - Driscoll Road | [(-121.9482,37.403),(-121.948451,37.39995)] | Oakland - E St | [(-122.1832,37.505),(-122.1826,37.498),(-122.182,37.49)] | Oakland - Eden Ave | [(-122.1143,37.505),(-122.1142,37.491)] | Oakland - Eden Creek | [(-122.022037,37.00675),(-122.0221,37.998)] | Oakland - Eden Creek | [(-122.022037,37.00675),(-122.0221,37.998)] | Oakland - Eden Creek | [(-122.022037,37.00675),(-122.0221,37.998)] | Berkeley - Edgewater Dr | [(-122.201,37.379),(-122.2042,37.41)] | Lafayette - Enos Way | [(-121.7677,37.896),(-121.7673,37.91)] | Oakland - Euclid Ave | [(-122.2671,37.009),(-122.2666,37.987)] | Berkeley - Euclid Ave | [(-122.2671,37.009),(-122.2666,37.987)] | Lafayette - Fairview Ave | [(-121.999,37.428),(-121.9863,37.351)] | Oakland - Fairview Ave | [(-121.999,37.428),(-121.9863,37.351)] | Oakland - Foothill Blvd | [(-122.2414,37.9),(-122.2403,37.893)] | Berkeley - Fountain St | [(-122.2306,37.593),(-122.2293,37.605)] | Berkeley - Gading Road | [(-122.0801,37.343),(-122.08,37.336)] | Oakland - Grizzly Peak Blvd | [(-122.2213,37.638),(-122.2127,37.581)] | Berkeley - Grove Way | [(-122.0643,37.884),(-122.062679,37.89162),(-122.061796,37.89578),(-122.0609,37.9)] | Berkeley - Harris Road | [(-122.0659,37.372),(-122.0675,37.363)] | Oakland - Heartwood Dr | [(-122.2006,37.341),(-122.1992,37.338)] | Lafayette - Hegenberger Exwy | [(-122.1946,37.52),(-122.1947,37.497)] | Oakland - Herrier St | [(-122.1943,37.006),(-122.1936,37.998)] | Oakland - Herrier St | [(-122.1943,37.006),(-122.1936,37.998)] | Berkeley - Hesperian Blvd | [(-122.097,37.333),(-122.0956,37.31),(-122.0946,37.293)] | Oakland - Hesperian Blvd | [(-122.097,37.333),(-122.0956,37.31),(-122.0946,37.293)] | Oakland - Hesperian Blvd | [(-122.1132,37.6),(-122.1123,37.586)] | Berkeley - Hollis St | [(-122.2885,37.397),(-122.289,37.414)] | Lafayette - I- 580 | [(-121.727,37.074),(-121.7229,37.093),(-121.722301,37.09522),(-121.721001,37.10005),(-121.7194,37.106),(-121.7188,37.109),(-121.7168,37.12),(-121.7163,37.123),(-121.7145,37.127),(-121.7096,37.148),(-121.707731,37.1568),(-121.7058,37.166),(-121.7055,37.168),(-121.7044,37.174),(-121.7038,37.172),(-121.7037,37.172),(-121.7027,37.175),(-121.7001,37.181),(-121.6957,37.191),(-121.6948,37.192),(-121.6897,37.204),(-121.6697,37.185)] | Oakland - I- 580 | [(-121.9322,37.989),(-121.9243,37.006),(-121.9217,37.014)] | Oakland - I- 580 | [(-121.9322,37.989),(-121.9243,37.006),(-121.9217,37.014)] | Oakland - I- 580 | [(-122.018,37.019),(-122.0009,37.032),(-121.9787,37.983),(-121.958,37.984),(-121.9571,37.986)] | Oakland - I- 580 | [(-122.018,37.019),(-122.0009,37.032),(-121.9787,37.983),(-121.958,37.984),(-121.9571,37.986)] | Oakland - I- 580 | [(-122.1108,37.023),(-122.1101,37.02),(-122.108103,37.00764),(-122.108,37.007),(-122.1069,37.998),(-122.1064,37.994),(-122.1053,37.982),(-122.1048,37.977),(-122.1032,37.958),(-122.1026,37.953),(-122.1013,37.938),(-122.0989,37.911),(-122.0984,37.91),(-122.098,37.908)] | Oakland - I- 580 | [(-122.1108,37.023),(-122.1101,37.02),(-122.108103,37.00764),(-122.108,37.007),(-122.1069,37.998),(-122.1064,37.994),(-122.1053,37.982),(-122.1048,37.977),(-122.1032,37.958),(-122.1026,37.953),(-122.1013,37.938),(-122.0989,37.911),(-122.0984,37.91),(-122.098,37.908)] | Berkeley - I- 580 | [(-122.1543,37.703),(-122.1535,37.694),(-122.1512,37.655),(-122.1475,37.603),(-122.1468,37.583),(-122.1472,37.569),(-122.149044,37.54874),(-122.1493,37.546),(-122.1501,37.532),(-122.1506,37.509),(-122.1495,37.482),(-122.1487,37.467),(-122.1477,37.447),(-122.1414,37.383),(-122.1404,37.376),(-122.1398,37.372),(-122.139,37.356),(-122.1388,37.353),(-122.1385,37.34),(-122.1382,37.33),(-122.1378,37.316)] | Oakland - I- 580 | [(-122.1543,37.703),(-122.1535,37.694),(-122.1512,37.655),(-122.1475,37.603),(-122.1468,37.583),(-122.1472,37.569),(-122.149044,37.54874),(-122.1493,37.546),(-122.1501,37.532),(-122.1506,37.509),(-122.1495,37.482),(-122.1487,37.467),(-122.1477,37.447),(-122.1414,37.383),(-122.1404,37.376),(-122.1398,37.372),(-122.139,37.356),(-122.1388,37.353),(-122.1385,37.34),(-122.1382,37.33),(-122.1378,37.316)] | Berkeley - I- 580 | [(-122.2197,37.99),(-122.22,37.99),(-122.222092,37.99523),(-122.2232,37.998),(-122.224146,37.99963),(-122.2261,37.003),(-122.2278,37.007),(-122.2302,37.026),(-122.2323,37.043),(-122.2344,37.059),(-122.235405,37.06427),(-122.2365,37.07)] | Berkeley - I- 580 | [(-122.2197,37.99),(-122.22,37.99),(-122.222092,37.99523),(-122.2232,37.998),(-122.224146,37.99963),(-122.2261,37.003),(-122.2278,37.007),(-122.2302,37.026),(-122.2323,37.043),(-122.2344,37.059),(-122.235405,37.06427),(-122.2365,37.07)] | Lafayette - I- 580 Ramp | [(-121.8521,37.011),(-121.8479,37.999),(-121.8476,37.999),(-121.8456,37.01),(-121.8455,37.011)] | Oakland - I- 580 Ramp | [(-121.8521,37.011),(-121.8479,37.999),(-121.8476,37.999),(-121.8456,37.01),(-121.8455,37.011)] | Oakland - I- 580 Ramp | [(-121.8743,37.014),(-121.8722,37.999),(-121.8714,37.999)] | Oakland - I- 580 Ramp | [(-121.8743,37.014),(-121.8722,37.999),(-121.8714,37.999)] | Oakland - I- 580 Ramp | [(-121.9043,37.998),(-121.9036,37.013),(-121.902632,37.0174),(-121.9025,37.018)] | Oakland - I- 580 Ramp | [(-121.9043,37.998),(-121.9036,37.013),(-121.902632,37.0174),(-121.9025,37.018)] | Oakland - I- 580 Ramp | [(-121.9368,37.986),(-121.936483,37.98832),(-121.9353,37.997),(-121.93504,37.00035),(-121.9346,37.006),(-121.933764,37.00031),(-121.9333,37.997),(-121.9322,37.989)] | Oakland - I- 580 Ramp | [(-121.9368,37.986),(-121.936483,37.98832),(-121.9353,37.997),(-121.93504,37.00035),(-121.9346,37.006),(-121.933764,37.00031),(-121.9333,37.997),(-121.9322,37.989)] | Oakland - I- 580 Ramp | [(-122.093241,37.90351),(-122.09364,37.89634),(-122.093788,37.89212)] | Berkeley - I- 580 Ramp | [(-122.0934,37.896),(-122.09257,37.89961),(-122.0911,37.906)] | Berkeley - I- 580 Ramp | [(-122.0941,37.897),(-122.0943,37.902)] | Berkeley - I- 580 Ramp | [(-122.096,37.888),(-122.0962,37.891),(-122.0964,37.9)] | Berkeley - I- 580 Ramp | [(-122.101,37.898),(-122.1005,37.902),(-122.0989,37.911)] | Berkeley - I- 580 Ramp | [(-122.1086,37.003),(-122.1068,37.993),(-122.1066,37.992),(-122.1053,37.982)] | Oakland - I- 580 Ramp | [(-122.1086,37.003),(-122.1068,37.993),(-122.1066,37.992),(-122.1053,37.982)] | Berkeley - I- 580 Ramp | [(-122.1414,37.383),(-122.1407,37.376),(-122.1403,37.372),(-122.139,37.356)] | Oakland - I- 580/I-680 Ramp | ((-121.9207,37.988),(-121.9192,37.016)) | Oakland - I- 580/I-680 Ramp | ((-121.9207,37.988),(-121.9192,37.016)) | Oakland - I- 680 | ((-121.939,37.15),(-121.9387,37.145),(-121.9373,37.125),(-121.934242,37.07643),(-121.933886,37.0709),(-121.9337,37.068),(-121.933122,37.06139),(-121.932736,37.05698),(-121.93222,37.05108),(-121.931844,37.04678),(-121.930113,37.027),(-121.926829,37),(-121.9265,37.998),(-121.9217,37.96),(-121.9203,37.949),(-121.9184,37.934)) | Oakland - I- 680 | ((-121.939,37.15),(-121.9387,37.145),(-121.9373,37.125),(-121.934242,37.07643),(-121.933886,37.0709),(-121.9337,37.068),(-121.933122,37.06139),(-121.932736,37.05698),(-121.93222,37.05108),(-121.931844,37.04678),(-121.930113,37.027),(-121.926829,37),(-121.9265,37.998),(-121.9217,37.96),(-121.9203,37.949),(-121.9184,37.934)) | Oakland - I- 680 | [(-121.9101,37.715),(-121.911269,37.74682),(-121.9119,37.764),(-121.9124,37.776),(-121.9174,37.905),(-121.9194,37.957),(-121.9207,37.988)] | Oakland - I- 680 | [(-121.9184,37.934),(-121.917,37.913),(-121.9122,37.83),(-121.9052,37.702)] | Oakland - I- 680 Ramp | [(-121.8833,37.376),(-121.8833,37.392),(-121.883,37.4),(-121.8835,37.402),(-121.8852,37.422)] | Oakland - I- 680 Ramp | [(-121.8833,37.376),(-121.8833,37.392),(-121.883,37.4),(-121.8835,37.402),(-121.8852,37.422)] | Oakland - I- 680 Ramp | [(-121.92,37.438),(-121.9218,37.424),(-121.9238,37.408),(-121.9252,37.392)] | Oakland - I- 680 Ramp | [(-121.92,37.438),(-121.9218,37.424),(-121.9238,37.408),(-121.9252,37.392)] | Oakland - I- 680 Ramp | [(-121.9238,37.402),(-121.9234,37.395),(-121.923,37.399)] | Oakland - I- 680 Ramp | [(-121.9238,37.402),(-121.9234,37.395),(-121.923,37.399)] | Oakland - I- 80 | ((-122.2937,37.277),(-122.3016,37.262)) | Lafayette - I- 80 | ((-122.2962,37.273),(-122.3004,37.264)) | Lafayette - I- 80 Ramp | [(-122.2962,37.413),(-122.2959,37.382),(-122.2951,37.372)] | Lafayette - I- 880 | ((-121.9669,37.075),(-121.9663,37.071),(-121.9656,37.065),(-121.9618,37.037),(-121.95689,37),(-121.948,37.933)) | Oakland - I- 880 | ((-121.9669,37.075),(-121.9663,37.071),(-121.9656,37.065),(-121.9618,37.037),(-121.95689,37),(-121.948,37.933)) | Oakland - I- 880 | [(-121.948,37.933),(-121.9471,37.925),(-121.9467,37.923),(-121.946,37.918),(-121.9452,37.912),(-121.937,37.852)] | Oakland - I- 880 | [(-122.0219,37.466),(-122.0205,37.447),(-122.020331,37.44447),(-122.020008,37.43962),(-122.0195,37.432),(-122.0193,37.429),(-122.0164,37.393),(-122.010219,37.34771),(-122.0041,37.313)] | Oakland - I- 880 | [(-122.0375,37.632),(-122.0359,37.619),(-122.0358,37.616),(-122.034514,37.60409),(-122.031876,37.57965),(-122.031193,37.57332),(-122.03016,37.56375),(-122.02943,37.55698),(-122.028689,37.54929),(-122.027833,37.53908),(-122.025979,37.51698),(-122.0238,37.491)] | Oakland - I- 880 | [(-122.0375,37.632),(-122.0359,37.619),(-122.0358,37.616),(-122.034514,37.60409),(-122.031876,37.57965),(-122.031193,37.57332),(-122.03016,37.56375),(-122.02943,37.55698),(-122.028689,37.54929),(-122.027833,37.53908),(-122.025979,37.51698),(-122.0238,37.491)] | Berkeley - I- 880 | [(-122.0612,37.003),(-122.0604,37.991),(-122.0596,37.982),(-122.0585,37.967),(-122.0583,37.961),(-122.0553,37.918),(-122.053635,37.89475),(-122.050759,37.8546),(-122.05,37.844),(-122.0485,37.817),(-122.0483,37.813),(-122.0482,37.811)] | Oakland - I- 880 | [(-122.0612,37.003),(-122.0604,37.991),(-122.0596,37.982),(-122.0585,37.967),(-122.0583,37.961),(-122.0553,37.918),(-122.053635,37.89475),(-122.050759,37.8546),(-122.05,37.844),(-122.0485,37.817),(-122.0483,37.813),(-122.0482,37.811)] | Oakland - I- 880 | [(-122.0612,37.003),(-122.0604,37.991),(-122.0596,37.982),(-122.0585,37.967),(-122.0583,37.961),(-122.0553,37.918),(-122.053635,37.89475),(-122.050759,37.8546),(-122.05,37.844),(-122.0485,37.817),(-122.0483,37.813),(-122.0482,37.811)] | Berkeley - I- 880 | [(-122.0831,37.312),(-122.0819,37.296),(-122.081,37.285),(-122.0786,37.248),(-122.078,37.24),(-122.077642,37.23496),(-122.076983,37.22567),(-122.076599,37.22026),(-122.076229,37.21505),(-122.0758,37.209)] | Oakland - I- 880 | [(-122.0978,37.528),(-122.096,37.496),(-122.0931,37.453),(-122.09277,37.4496),(-122.090189,37.41442),(-122.0896,37.405),(-122.085,37.34)] | Oakland - I- 880 | [(-122.1365,37.902),(-122.1358,37.898),(-122.1333,37.881),(-122.1323,37.874),(-122.1311,37.866),(-122.1308,37.865),(-122.1307,37.864),(-122.1289,37.851),(-122.1277,37.843),(-122.1264,37.834),(-122.1231,37.812),(-122.1165,37.766),(-122.1104,37.72),(-122.109695,37.71094),(-122.109,37.702),(-122.108312,37.69168),(-122.1076,37.681)] | Berkeley - I- 880 | [(-122.1755,37.185),(-122.1747,37.178),(-122.1742,37.173),(-122.1692,37.126),(-122.167792,37.11594),(-122.16757,37.11435),(-122.1671,37.111),(-122.1655,37.1),(-122.165169,37.09811),(-122.1641,37.092),(-122.1596,37.061),(-122.158381,37.05275),(-122.155991,37.03657),(-122.1531,37.017),(-122.1478,37.98),(-122.1407,37.932),(-122.1394,37.924),(-122.1389,37.92),(-122.1376,37.91)] | Oakland - I- 880 | [(-122.1755,37.185),(-122.1747,37.178),(-122.1742,37.173),(-122.1692,37.126),(-122.167792,37.11594),(-122.16757,37.11435),(-122.1671,37.111),(-122.1655,37.1),(-122.165169,37.09811),(-122.1641,37.092),(-122.1596,37.061),(-122.158381,37.05275),(-122.155991,37.03657),(-122.1531,37.017),(-122.1478,37.98),(-122.1407,37.932),(-122.1394,37.924),(-122.1389,37.92),(-122.1376,37.91)] | Berkeley - I- 880 | [(-122.2214,37.711),(-122.2202,37.699),(-122.2199,37.695),(-122.219,37.682),(-122.2184,37.672),(-122.2173,37.652),(-122.2159,37.638),(-122.2144,37.616),(-122.2138,37.612),(-122.2135,37.609),(-122.212,37.592),(-122.2116,37.586),(-122.2111,37.581)] | Berkeley - I- 880 | [(-122.2707,37.975),(-122.2693,37.972),(-122.2681,37.966),(-122.267,37.962),(-122.2659,37.957),(-122.2648,37.952),(-122.2636,37.946),(-122.2625,37.935),(-122.2617,37.927),(-122.2607,37.921),(-122.2593,37.916),(-122.258,37.911),(-122.2536,37.898),(-122.2432,37.858),(-122.2408,37.845),(-122.2386,37.827),(-122.2374,37.811)] | Berkeley - I- 880 Ramp | [(-122.0019,37.301),(-122.002,37.293)] | Oakland - I- 880 Ramp | [(-122.0041,37.313),(-122.0018,37.315),(-122.0007,37.315),(-122.0005,37.313),(-122.0002,37.308),(-121.9995,37.289)] | Oakland - I- 880 Ramp | [(-122.0041,37.313),(-122.0038,37.308),(-122.0039,37.284),(-122.0013,37.287),(-121.9995,37.289)] | Oakland - I- 880 Ramp | [(-122.0236,37.488),(-122.0231,37.458),(-122.0227,37.458),(-122.0223,37.452),(-122.0205,37.447)] | Oakland - I- 880 Ramp | [(-122.0238,37.491),(-122.0215,37.483),(-122.0211,37.477),(-122.0205,37.447)] | Oakland - I- 880 Ramp | [(-122.059,37.982),(-122.0577,37.984),(-122.0612,37.003)] | Oakland - I- 880 Ramp | [(-122.059,37.982),(-122.0577,37.984),(-122.0612,37.003)] | Oakland - I- 880 Ramp | [(-122.059,37.982),(-122.0577,37.984),(-122.0612,37.003)] | Berkeley - I- 880 Ramp | [(-122.0618,37.011),(-122.0631,37.982),(-122.0585,37.967)] | Oakland - I- 880 Ramp | [(-122.0618,37.011),(-122.0631,37.982),(-122.0585,37.967)] | Oakland - I- 880 Ramp | [(-122.0618,37.011),(-122.0631,37.982),(-122.0585,37.967)] | Berkeley - I- 880 Ramp | [(-122.085,37.34),(-122.0801,37.316),(-122.081,37.285)] | Oakland - I- 880 Ramp | [(-122.085,37.34),(-122.0801,37.316),(-122.081,37.285)] | Oakland - I- 880 Ramp | [(-122.085,37.34),(-122.0866,37.316),(-122.0819,37.296)] | Oakland - I- 880 Ramp | [(-122.085,37.34),(-122.0866,37.316),(-122.0819,37.296)] | Oakland - I- 880 Ramp | [(-122.1029,37.61),(-122.1013,37.587),(-122.0999,37.569)] | Berkeley - I- 880 Ramp | [(-122.1379,37.891),(-122.1383,37.897),(-122.1377,37.902)] | Berkeley - I- 880 Ramp | [(-122.1379,37.931),(-122.137597,37.92736),(-122.1374,37.925),(-122.1373,37.924),(-122.1369,37.914),(-122.1358,37.905),(-122.1365,37.908),(-122.1358,37.898)] | Berkeley - I- 880 Ramp | [(-122.2536,37.898),(-122.254,37.902)] | Berkeley - I- 880 Ramp | [(-122.2771,37.002),(-122.278,37)] | Lafayette - Indian Way | [(-122.2066,37.398),(-122.2045,37.411)] | Lafayette - Jackson St | [(-122.0845,37.6),(-122.0842,37.606)] | Berkeley - Johnson Dr | [(-121.9145,37.901),(-121.915,37.877)] | Oakland - Joyce St | [(-122.0792,37.604),(-122.0774,37.581)] | Berkeley - Juniper St | [(-121.7823,37.897),(-121.7815,37.9)] | Oakland - Kaiser Dr | [(-122.067163,37.47821),(-122.060402,37.51961)] | Oakland - Keeler Ave | [(-122.2578,37.906),(-122.2579,37.899)] | Berkeley - Kildare Road | [(-122.0968,37.016),(-122.0959,37)] | Oakland - La Playa Dr | [(-122.1039,37.545),(-122.101,37.493)] | Oakland - Laguna Ave | [(-122.2099,37.989),(-122.2089,37)] | Berkeley - Laguna Ave | [(-122.2099,37.989),(-122.2089,37)] | Lafayette - Lakehurst Cir | [(-122.284729,37.89025),(-122.286096,37.90364)] | Berkeley - Lakeshore Ave | [(-122.2586,37.99),(-122.2556,37.006)] | Berkeley - Lakeshore Ave | [(-122.2586,37.99),(-122.2556,37.006)] | Lafayette - Las Positas Road | [(-121.764488,37.99199),(-121.75569,37.02022)] | Oakland - Las Positas Road | [(-121.764488,37.99199),(-121.75569,37.02022)] | Oakland - Linden St | [(-122.2867,37.998),(-122.2864,37.008)] | Berkeley - Linden St | [(-122.2867,37.998),(-122.2864,37.008)] | Lafayette - Livermore Ave | [(-121.7687,37.448),(-121.769,37.375)] | Oakland - Livermore Ave | [(-121.7687,37.448),(-121.769,37.375)] | Oakland - Livermore Ave | [(-121.772719,37.99085),(-121.7728,37.001)] | Oakland - Livermore Ave | [(-121.772719,37.99085),(-121.7728,37.001)] | Oakland - Locust St | [(-122.1606,37.007),(-122.1593,37.987)] | Oakland - Locust St | [(-122.1606,37.007),(-122.1593,37.987)] | Berkeley - Logan Ct | [(-122.0053,37.492),(-122.0061,37.484)] | Oakland - Magnolia St | [(-122.0971,37.5),(-122.0962,37.484)] | Oakland - Mandalay Road | [(-122.2322,37.397),(-122.2321,37.403)] | Lafayette - Marin Ave | [(-122.2741,37.894),(-122.272,37.901)] | Berkeley - Martin Luther King Jr Way | [(-122.2712,37.608),(-122.2711,37.599)] | Berkeley - Mattos Dr | [(-122.0005,37.502),(-122.000898,37.49683)] | Oakland - Maubert Ave | [(-122.1114,37.009),(-122.1096,37.995)] | Oakland - Maubert Ave | [(-122.1114,37.009),(-122.1096,37.995)] | Berkeley - McClure Ave | [(-122.1431,37.001),(-122.1436,37.998)] | Oakland - McClure Ave | [(-122.1431,37.001),(-122.1436,37.998)] | Berkeley - Medlar Dr | [(-122.0627,37.378),(-122.0625,37.375)] | Oakland - Mildred Ct | [(-122.0002,37.388),(-121.9998,37.386)] | Oakland - Miller Road | [(-122.0902,37.645),(-122.0865,37.545)] | Berkeley - Miramar Ave | [(-122.1009,37.025),(-122.099089,37.03209)] | Oakland - Mission Blvd | [(-121.918886,37),(-121.9194,37.976),(-121.9198,37.975)] | Oakland - Mission Blvd | [(-121.918886,37),(-121.9194,37.976),(-121.9198,37.975)] | Oakland - Mission Blvd | [(-122.0006,37.896),(-121.9989,37.88)] | Oakland - Mission Blvd | [(-122.0006,37.896),(-121.9989,37.88)] | Berkeley - Moores Ave | [(-122.0087,37.301),(-122.0094,37.292)] | Oakland - National Ave | [(-122.1192,37.5),(-122.1281,37.489)] | Oakland - Navajo Ct | [(-121.8779,37.901),(-121.8783,37.9)] | Oakland - Newark Blvd | [(-122.0352,37.438),(-122.0341,37.423)] | Oakland - Oakland Inner Harbor | [(-122.2625,37.913),(-122.260016,37.89484)] | Berkeley - Oakridge Road | [(-121.8316,37.049),(-121.828382,37)] | Oakland - Oneil Ave | [(-122.076754,37.62476),(-122.0745,37.595)] | Berkeley - Parkridge Dr | [(-122.1438,37.884),(-122.1428,37.9)] | Berkeley - Parkside Dr | [(-122.0475,37.603),(-122.0443,37.596)] | Berkeley - Paseo Padre Pkwy | [(-121.9143,37.005),(-121.913522,37)] | Oakland - Paseo Padre Pkwy | [(-122.0021,37.639),(-121.996,37.628)] | Oakland - Paseo Padre Pkwy | [(-122.0021,37.639),(-121.996,37.628)] | Berkeley - Pearl St | [(-122.2383,37.594),(-122.2366,37.615)] | Berkeley - Periwinkle Road | [(-122.0451,37.301),(-122.044758,37.29844)] | Oakland - Pimlico Dr | [(-121.8616,37.998),(-121.8618,37.008)] | Oakland - Pimlico Dr | [(-121.8616,37.998),(-121.8618,37.008)] | Oakland - Portsmouth Ave | [(-122.1064,37.315),(-122.1064,37.308)] | Oakland - Proctor Ave | [(-122.2267,37.406),(-122.2251,37.386)] | Lafayette - Railroad Ave | [(-122.0245,37.013),(-122.0234,37.003),(-122.0223,37.993)] | Oakland - Railroad Ave | [(-122.0245,37.013),(-122.0234,37.003),(-122.0223,37.993)] | Oakland - Railroad Ave | [(-122.0245,37.013),(-122.0234,37.003),(-122.0223,37.993)] | Berkeley - Ranspot Dr | [(-122.0972,37.999),(-122.0959,37)] | Oakland - Ranspot Dr | [(-122.0972,37.999),(-122.0959,37)] | Oakland - Ranspot Dr | [(-122.0972,37.999),(-122.0959,37)] | Berkeley - Redding St | [(-122.1978,37.901),(-122.1975,37.895)] | Berkeley - Redwood Road | [(-122.1493,37.98),(-122.1437,37.001)] | Oakland - Redwood Road | [(-122.1493,37.98),(-122.1437,37.001)] | Berkeley - Roca Dr | [(-122.0335,37.609),(-122.0314,37.599)] | Berkeley - Rosedale Ct | [(-121.9232,37.9),(-121.924,37.897)] | Oakland - Sacramento St | [(-122.2799,37.606),(-122.2797,37.597)] | Berkeley - Saddle Brook Dr | [(-122.1478,37.909),(-122.1454,37.904),(-122.1451,37.888)] | Berkeley - Saginaw Ct | [(-121.8803,37.898),(-121.8806,37.901)] | Oakland - San Andreas Dr | [(-122.0609,37.9),(-122.0614,37.895)] | Berkeley - Santa Maria Ave | [(-122.0773,37),(-122.0773,37.98)] | Oakland - Santa Maria Ave | [(-122.0773,37),(-122.0773,37.98)] | Oakland - Santa Maria Ave | [(-122.0773,37),(-122.0773,37.98)] | Berkeley - Shattuck Ave | [(-122.2686,37.904),(-122.2686,37.897)] | Berkeley - Sheridan Road | [(-122.2279,37.425),(-122.2253,37.411),(-122.2223,37.377)] | Lafayette - Shoreline Dr | [(-122.2657,37.603),(-122.2648,37.6)] | Berkeley - Skyline Blvd | [(-122.1738,37.01),(-122.1714,37.996)] | Oakland - Skyline Blvd | [(-122.1738,37.01),(-122.1714,37.996)] | Berkeley - Skyline Dr | [(-122.0277,37.5),(-122.0284,37.498)] | Oakland - Skywest Dr | [(-122.1161,37.62),(-122.1123,37.586)] | Berkeley - Southern Pacific Railroad | [(-122.3002,37.674),(-122.2999,37.661)] | Berkeley - Sp Railroad | [(-121.893564,37.99009),(-121.897,37.016)] | Oakland - Sp Railroad | [(-121.893564,37.99009),(-121.897,37.016)] | Oakland - Sp Railroad | [(-121.9565,37.898),(-121.9562,37.9)] | Oakland - Sp Railroad | [(-122.0734,37.001),(-122.0734,37.997)] | Oakland - Sp Railroad | [(-122.0734,37.001),(-122.0734,37.997)] | Oakland - Sp Railroad | [(-122.0734,37.001),(-122.0734,37.997)] | Berkeley - Sp Railroad | [(-122.0914,37.601),(-122.087,37.56),(-122.086408,37.5551)] | Berkeley - Sp Railroad | [(-122.137792,37.003),(-122.1365,37.992),(-122.131257,37.94612)] | Oakland - Sp Railroad | [(-122.137792,37.003),(-122.1365,37.992),(-122.131257,37.94612)] | Berkeley - Sp Railroad | [(-122.1947,37.497),(-122.193328,37.4848)] | Oakland - Stanton Ave | [(-122.100392,37.0697),(-122.099513,37.06052)] | Oakland - State Hwy 123 | [(-122.3004,37.986),(-122.2998,37.969),(-122.2995,37.962),(-122.2992,37.952),(-122.299,37.942),(-122.2987,37.935),(-122.2984,37.924),(-122.2982,37.92),(-122.2976,37.904),(-122.297,37.88),(-122.2966,37.869),(-122.2959,37.848),(-122.2961,37.843)] | Berkeley - State Hwy 13 | [(-122.1797,37.943),(-122.179871,37.91849),(-122.18,37.9),(-122.179023,37.86615),(-122.1787,37.862),(-122.1781,37.851),(-122.1777,37.845),(-122.1773,37.839),(-122.177,37.833)] | Berkeley - State Hwy 13 | [(-122.2049,37.2),(-122.20328,37.17975),(-122.1989,37.125),(-122.198078,37.11641),(-122.1975,37.11)] | Lafayette - State Hwy 13 Ramp | [(-122.2244,37.427),(-122.223,37.414),(-122.2214,37.396),(-122.2213,37.388)] | Lafayette - State Hwy 238 | ((-122.098,37.908),(-122.0983,37.907),(-122.099,37.905),(-122.101,37.898),(-122.101535,37.89711),(-122.103173,37.89438),(-122.1046,37.892),(-122.106,37.89)) | Berkeley - State Hwy 238 Ramp | [(-122.1288,37.9),(-122.1293,37.895),(-122.1296,37.906)] | Berkeley - State Hwy 24 | [(-122.2674,37.246),(-122.2673,37.248),(-122.267,37.261),(-122.2668,37.271),(-122.2663,37.298),(-122.2659,37.315),(-122.2655,37.336),(-122.265007,37.35882),(-122.264443,37.37286),(-122.2641,37.381),(-122.2638,37.388),(-122.2631,37.396),(-122.2617,37.405),(-122.2615,37.407),(-122.2605,37.412)] | Lafayette - State Hwy 84 | [(-121.9565,37.898),(-121.956589,37.89911),(-121.9569,37.903),(-121.956,37.91),(-121.9553,37.919)] | Oakland - State Hwy 84 | [(-122.0671,37.426),(-122.07,37.402),(-122.074,37.37),(-122.0773,37.338)] | Oakland - State Hwy 92 | [(-122.1085,37.326),(-122.1095,37.322),(-122.1111,37.316),(-122.1119,37.313),(-122.1125,37.311),(-122.1131,37.308),(-122.1167,37.292),(-122.1187,37.285),(-122.12,37.28)] | Oakland - State Hwy 92 Ramp | [(-122.1086,37.321),(-122.1089,37.315),(-122.1111,37.316)] | Oakland - Stuart St | [(-122.2518,37.6),(-122.2507,37.601),(-122.2491,37.606)] | Berkeley - Sunol Ridge Trl | [(-121.9419,37.455),(-121.9345,37.38)] | Oakland - Sunol Ridge Trl | [(-121.9419,37.455),(-121.9345,37.38)] | Oakland - Tassajara Creek | [(-121.87866,37.98898),(-121.8782,37.015)] | Oakland - Tassajara Creek | [(-121.87866,37.98898),(-121.8782,37.015)] | Oakland - Taurus Ave | [(-122.2159,37.416),(-122.2128,37.389)] | Lafayette - Tennyson Road | [(-122.0891,37.317),(-122.0927,37.317)] | Oakland - Thackeray Ave | [(-122.072,37.305),(-122.0715,37.298)] | Oakland - Theresa Way | [(-121.7289,37.906),(-121.728,37.899)] | Oakland - Tissiack Way | [(-121.920364,37),(-121.9208,37.995)] | Oakland - Tissiack Way | [(-121.920364,37),(-121.9208,37.995)] | Oakland - Tupelo Ter | [(-122.059087,37.6113),(-122.057021,37.59942)] | Berkeley - Vallecitos Road | [(-121.8699,37.916),(-121.8703,37.891)] | Oakland - Warm Springs Blvd | [(-121.933956,37),(-121.9343,37.97)] | Oakland - Warm Springs Blvd | [(-121.933956,37),(-121.9343,37.97)] | Oakland - Welch Creek Road | [(-121.7695,37.386),(-121.7737,37.413)] | Oakland - Welch Creek Road | [(-121.7695,37.386),(-121.7737,37.413)] | Oakland - West Loop Road | [(-122.0576,37.604),(-122.0602,37.586)] | Berkeley - Western Pacific Railroad Spur | [(-122.0394,37.018),(-122.0394,37.961)] | Oakland - Western Pacific Railroad Spur | [(-122.0394,37.018),(-122.0394,37.961)] | Oakland - Western Pacific Railroad Spur | [(-122.0394,37.018),(-122.0394,37.961)] | Berkeley - Whitlock Creek | [(-121.74683,37.91276),(-121.733107,37)] | Oakland - Whitlock Creek | [(-121.74683,37.91276),(-121.733107,37)] | Oakland - Willimet Way | [(-122.0964,37.517),(-122.0949,37.493)] | Oakland - Wisconsin St | [(-122.1994,37.017),(-122.1975,37.998),(-122.1971,37.994)] | Oakland - Wisconsin St | [(-122.1994,37.017),(-122.1975,37.998),(-122.1971,37.994)] | Berkeley - Wp Railroad | [(-122.254,37.902),(-122.2506,37.891)] | Berkeley - 100th Ave | [(-122.1657,37.429),(-122.1647,37.432)] | Oakland - 107th Ave | [(-122.1555,37.403),(-122.1531,37.41)] | Oakland - 14th St | [(-122.299,37.147),(-122.3,37.148)] | Lafayette - 19th Ave | [(-122.2366,37.897),(-122.2359,37.905)] | Berkeley - 1st St | [(-121.75508,37.89294),(-121.753581,37.90031)] | Oakland - 5th St | [(-122.278,37),(-122.2792,37.005),(-122.2803,37.009)] | Lafayette - 5th St | [(-122.296,37.615),(-122.2953,37.598)] | Berkeley - 82nd Ave | [(-122.1695,37.596),(-122.1681,37.603)] | Berkeley - 85th Ave | [(-122.1877,37.466),(-122.186,37.476)] | Oakland - 89th Ave | [(-122.1822,37.459),(-122.1803,37.471)] | Oakland - 98th Ave | [(-122.1568,37.498),(-122.1558,37.502)] | Oakland - 98th Ave | [(-122.1693,37.438),(-122.1682,37.444)] | Oakland - 98th Ave | [(-122.2001,37.258),(-122.1974,37.27)] | Lafayette -(333 rows) - -SELECT name, #thepath FROM iexit ORDER BY name COLLATE "C", 2; - name | ?column? -------------------------------------+---------- - I- 580 | 2 - I- 580 | 2 - I- 580 | 2 - I- 580 | 2 - I- 580 | 2 - I- 580 | 2 - I- 580 | 2 - I- 580 | 2 - I- 580 | 2 - I- 580 | 2 - I- 580 | 2 - I- 580 | 3 - I- 580 | 3 - I- 580 | 3 - I- 580 | 3 - I- 580 | 3 - I- 580 | 3 - I- 580 | 3 - I- 580 | 3 - I- 580 | 3 - I- 580 | 3 - I- 580 | 3 - I- 580 | 3 - I- 580 | 3 - I- 580 | 3 - I- 580 | 3 - I- 580 | 3 - I- 580 | 3 - I- 580 | 3 - I- 580 | 4 - I- 580 | 4 - I- 580 | 4 - I- 580 | 4 - I- 580 | 5 - I- 580 | 5 - I- 580 | 5 - I- 580 | 5 - I- 580 | 5 - I- 580 | 6 - I- 580 | 6 - I- 580 | 6 - I- 580 | 6 - I- 580 | 6 - I- 580 | 6 - I- 580 | 6 - I- 580 | 6 - I- 580 | 6 - I- 580 | 6 - I- 580 | 6 - I- 580 | 6 - I- 580 | 6 - I- 580 | 6 - I- 580 | 6 - I- 580 | 6 - I- 580 | 6 - I- 580 | 6 - I- 580 | 6 - I- 580 | 6 - I- 580 | 6 - I- 580 | 6 - I- 580 | 6 - I- 580 | 7 - I- 580 | 7 - I- 580 | 7 - I- 580 | 7 - I- 580 | 7 - I- 580 | 7 - I- 580 | 7 - I- 580 | 8 - I- 580 | 8 - I- 580 | 8 - I- 580 | 8 - I- 580 | 8 - I- 580 | 8 - I- 580 | 8 - I- 580 | 8 - I- 580 | 8 - I- 580 | 9 - I- 580 | 9 - I- 580 | 9 - I- 580 | 9 - I- 580 | 9 - I- 580 | 12 - I- 580 | 12 - I- 580 | 12 - I- 580 | 12 - I- 580 | 12 - I- 580 | 12 - I- 580 | 12 - I- 580 | 12 - I- 580 | 12 - I- 580 | 12 - I- 580 | 13 - I- 580 | 13 - I- 580 | 13 - I- 580 | 13 - I- 580 | 13 - I- 580 | 13 - I- 580 | 14 - I- 580 | 14 - I- 580 | 14 - I- 580 | 14 - I- 580 | 14 - I- 580 | 14 - I- 580 | 14 - I- 580 | 14 - I- 580 | 18 - I- 580 | 18 - I- 580 | 18 - I- 580 | 18 - I- 580 | 18 - I- 580 | 18 - I- 580 | 21 - I- 580 | 21 - I- 580 | 21 - I- 580 | 21 - I- 580 | 21 - I- 580 | 21 - I- 580 | 21 - I- 580 | 21 - I- 580 | 21 - I- 580 | 21 - I- 580 | 22 - I- 580 | 22 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 2 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 3 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 4 - I- 580 Ramp | 5 - I- 580 Ramp | 5 - I- 580 Ramp | 5 - I- 580 Ramp | 5 - I- 580 Ramp | 5 - I- 580 Ramp | 5 - I- 580 Ramp | 5 - I- 580 Ramp | 5 - I- 580 Ramp | 5 - I- 580 Ramp | 5 - I- 580 Ramp | 5 - I- 580 Ramp | 5 - I- 580 Ramp | 5 - I- 580 Ramp | 5 - I- 580 Ramp | 6 - I- 580 Ramp | 6 - I- 580 Ramp | 6 - I- 580 Ramp | 7 - I- 580 Ramp | 8 - I- 580 Ramp | 8 - I- 580 Ramp | 8 - I- 580 Ramp | 8 - I- 580 Ramp | 8 - I- 580 Ramp | 8 - I- 580/I-680 Ramp | 2 - I- 580/I-680 Ramp | 2 - I- 580/I-680 Ramp | 2 - I- 580/I-680 Ramp | 2 - I- 580/I-680 Ramp | 2 - I- 580/I-680 Ramp | 2 - I- 580/I-680 Ramp | 4 - I- 580/I-680 Ramp | 4 - I- 580/I-680 Ramp | 4 - I- 580/I-680 Ramp | 4 - I- 580/I-680 Ramp | 5 - I- 580/I-680 Ramp | 6 - I- 580/I-680 Ramp | 6 - I- 580/I-680 Ramp | 6 - I- 680 | 2 - I- 680 | 2 - I- 680 | 2 - I- 680 | 2 - I- 680 | 2 - I- 680 | 2 - I- 680 | 2 - I- 680 | 3 - I- 680 | 3 - I- 680 | 3 - I- 680 | 4 - I- 680 | 4 - I- 680 | 4 - I- 680 | 5 - I- 680 | 5 - I- 680 | 5 - I- 680 | 7 - I- 680 | 7 - I- 680 | 7 - I- 680 | 7 - I- 680 | 8 - I- 680 | 8 - I- 680 | 8 - I- 680 | 8 - I- 680 | 10 - I- 680 | 10 - I- 680 | 10 - I- 680 | 10 - I- 680 | 10 - I- 680 | 10 - I- 680 | 10 - I- 680 | 16 - I- 680 | 16 - I- 680 | 16 - I- 680 | 16 - I- 680 | 16 - I- 680 | 16 - I- 680 | 16 - I- 680 | 16 - I- 680 Ramp | 2 - I- 680 Ramp | 2 - I- 680 Ramp | 2 - I- 680 Ramp | 2 - I- 680 Ramp | 2 - I- 680 Ramp | 2 - I- 680 Ramp | 2 - I- 680 Ramp | 2 - I- 680 Ramp | 2 - I- 680 Ramp | 2 - I- 680 Ramp | 2 - I- 680 Ramp | 2 - I- 680 Ramp | 2 - I- 680 Ramp | 2 - I- 680 Ramp | 2 - I- 680 Ramp | 3 - I- 680 Ramp | 3 - I- 680 Ramp | 3 - I- 680 Ramp | 3 - I- 680 Ramp | 3 - I- 680 Ramp | 3 - I- 680 Ramp | 3 - I- 680 Ramp | 3 - I- 680 Ramp | 3 - I- 680 Ramp | 3 - I- 680 Ramp | 3 - I- 680 Ramp | 3 - I- 680 Ramp | 3 - I- 680 Ramp | 3 - I- 680 Ramp | 3 - I- 680 Ramp | 3 - I- 680 Ramp | 3 - I- 680 Ramp | 3 - I- 680 Ramp | 3 - I- 680 Ramp | 3 - I- 680 Ramp | 3 - I- 680 Ramp | 3 - I- 680 Ramp | 3 - I- 680 Ramp | 3 - I- 680 Ramp | 3 - I- 680 Ramp | 3 - I- 680 Ramp | 4 - I- 680 Ramp | 4 - I- 680 Ramp | 4 - I- 680 Ramp | 5 - I- 680 Ramp | 5 - I- 680 Ramp | 5 - I- 680 Ramp | 5 - I- 680 Ramp | 5 - I- 680 Ramp | 5 - I- 680 Ramp | 6 - I- 680 Ramp | 6 - I- 680 Ramp | 6 - I- 680 Ramp | 6 - I- 680 Ramp | 7 - I- 680 Ramp | 7 - I- 680 Ramp | 7 - I- 680 Ramp | 7 - I- 680 Ramp | 8 - I- 680 Ramp | 8 - I- 680 Ramp | 8 - I- 680 Ramp | 8 - I- 80 | 2 - I- 80 | 2 - I- 80 | 2 - I- 80 | 2 - I- 80 | 2 - I- 80 | 2 - I- 80 | 2 - I- 80 | 2 - I- 80 | 2 - I- 80 | 2 - I- 80 | 2 - I- 80 | 2 - I- 80 | 2 - I- 80 | 2 - I- 80 | 3 - I- 80 | 3 - I- 80 | 3 - I- 80 | 4 - I- 80 | 4 - I- 80 | 4 - I- 80 | 4 - I- 80 | 4 - I- 80 | 5 - I- 80 | 5 - I- 80 | 5 - I- 80 | 5 - I- 80 | 5 - I- 80 | 5 - I- 80 | 5 - I- 80 | 5 - I- 80 | 5 - I- 80 | 11 - I- 80 | 11 - I- 80 | 11 - I- 80 | 11 - I- 80 Ramp | 2 - I- 80 Ramp | 2 - I- 80 Ramp | 2 - I- 80 Ramp | 2 - I- 80 Ramp | 2 - I- 80 Ramp | 2 - I- 80 Ramp | 2 - I- 80 Ramp | 2 - I- 80 Ramp | 2 - I- 80 Ramp | 2 - I- 80 Ramp | 2 - I- 80 Ramp | 2 - I- 80 Ramp | 2 - I- 80 Ramp | 2 - I- 80 Ramp | 2 - I- 80 Ramp | 2 - I- 80 Ramp | 2 - I- 80 Ramp | 2 - I- 80 Ramp | 2 - I- 80 Ramp | 3 - I- 80 Ramp | 3 - I- 80 Ramp | 3 - I- 80 Ramp | 3 - I- 80 Ramp | 3 - I- 80 Ramp | 3 - I- 80 Ramp | 3 - I- 80 Ramp | 3 - I- 80 Ramp | 3 - I- 80 Ramp | 4 - I- 80 Ramp | 4 - I- 80 Ramp | 4 - I- 80 Ramp | 4 - I- 80 Ramp | 5 - I- 80 Ramp | 5 - I- 80 Ramp | 5 - I- 80 Ramp | 5 - I- 80 Ramp | 5 - I- 80 Ramp | 5 - I- 80 Ramp | 5 - I- 80 Ramp | 7 - I- 80 Ramp | 7 - I- 80 Ramp | 7 - I- 80 Ramp | 7 - I- 880 | 2 - I- 880 | 2 - I- 880 | 2 - I- 880 | 2 - I- 880 | 2 - I- 880 | 5 - I- 880 | 5 - I- 880 | 5 - I- 880 | 5 - I- 880 | 5 - I- 880 | 5 - I- 880 | 6 - I- 880 | 6 - I- 880 | 6 - I- 880 | 6 - I- 880 | 6 - I- 880 | 6 - I- 880 | 6 - I- 880 | 6 - I- 880 | 6 - I- 880 | 6 - I- 880 | 6 - I- 880 | 6 - I- 880 | 6 - I- 880 | 6 - I- 880 | 7 - I- 880 | 7 - I- 880 | 7 - I- 880 | 7 - I- 880 | 7 - I- 880 | 7 - I- 880 | 7 - I- 880 | 9 - I- 880 | 9 - I- 880 | 9 - I- 880 | 9 - I- 880 | 9 - I- 880 | 9 - I- 880 | 9 - I- 880 | 10 - I- 880 | 10 - I- 880 | 10 - I- 880 | 10 - I- 880 | 10 - I- 880 | 10 - I- 880 | 10 - I- 880 | 10 - I- 880 | 10 - I- 880 | 10 - I- 880 | 10 - I- 880 | 10 - I- 880 | 12 - I- 880 | 12 - I- 880 | 12 - I- 880 | 12 - I- 880 | 12 - I- 880 | 12 - I- 880 | 12 - I- 880 | 12 - I- 880 | 12 - I- 880 | 12 - I- 880 | 12 - I- 880 | 13 - I- 880 | 13 - I- 880 | 13 - I- 880 | 13 - I- 880 | 13 - I- 880 | 13 - I- 880 | 13 - I- 880 | 13 - I- 880 | 13 - I- 880 | 13 - I- 880 | 13 - I- 880 | 13 - I- 880 | 14 - I- 880 | 14 - I- 880 | 14 - I- 880 | 14 - I- 880 | 14 - I- 880 | 14 - I- 880 | 17 - I- 880 | 17 - I- 880 | 17 - I- 880 | 17 - I- 880 | 17 - I- 880 | 17 - I- 880 | 17 - I- 880 | 17 - I- 880 | 17 - I- 880 | 17 - I- 880 | 17 - I- 880 | 17 - I- 880 | 17 - I- 880 | 17 - I- 880 | 17 - I- 880 | 17 - I- 880 | 17 - I- 880 | 17 - I- 880 | 17 - I- 880 | 17 - I- 880 | 17 - I- 880 | 19 - I- 880 | 19 - I- 880 | 19 - I- 880 | 19 - I- 880 | 19 - I- 880 | 19 - I- 880 | 19 - I- 880 | 19 - I- 880 | 19 - I- 880 | 19 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 2 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 3 - I- 880 Ramp | 4 - I- 880 Ramp | 4 - I- 880 Ramp | 4 - I- 880 Ramp | 4 - I- 880 Ramp | 4 - I- 880 Ramp | 4 - I- 880 Ramp | 4 - I- 880 Ramp | 4 - I- 880 Ramp | 4 - I- 880 Ramp | 4 - I- 880 Ramp | 4 - I- 880 Ramp | 4 - I- 880 Ramp | 4 - I- 880 Ramp | 4 - I- 880 Ramp | 4 - I- 880 Ramp | 4 - I- 880 Ramp | 4 - I- 880 Ramp | 4 - I- 880 Ramp | 4 - I- 880 Ramp | 4 - I- 880 Ramp | 4 - I- 880 Ramp | 4 - I- 880 Ramp | 4 - I- 880 Ramp | 4 - I- 880 Ramp | 4 - I- 880 Ramp | 4 - I- 880 Ramp | 4 - I- 880 Ramp | 5 - I- 880 Ramp | 5 - I- 880 Ramp | 5 - I- 880 Ramp | 5 - I- 880 Ramp | 5 - I- 880 Ramp | 5 - I- 880 Ramp | 5 - I- 880 Ramp | 5 - I- 880 Ramp | 5 - I- 880 Ramp | 5 - I- 880 Ramp | 5 - I- 880 Ramp | 5 - I- 880 Ramp | 5 - I- 880 Ramp | 5 - I- 880 Ramp | 5 - I- 880 Ramp | 5 - I- 880 Ramp | 5 - I- 880 Ramp | 5 - I- 880 Ramp | 5 - I- 880 Ramp | 5 - I- 880 Ramp | 5 - I- 880 Ramp | 5 - I- 880 Ramp | 5 - I- 880 Ramp | 5 - I- 880 Ramp | 5 - I- 880 Ramp | 5 - I- 880 Ramp | 5 - I- 880 Ramp | 5 - I- 880 Ramp | 5 - I- 880 Ramp | 5 - I- 880 Ramp | 5 - I- 880 Ramp | 5 - I- 880 Ramp | 5 - I- 880 Ramp | 5 - I- 880 Ramp | 6 - I- 880 Ramp | 6 - I- 880 Ramp | 6 - I- 880 Ramp | 6 - I- 880 Ramp | 6 - I- 880 Ramp | 6 - I- 880 Ramp | 6 - I- 880 Ramp | 6 - I- 880 Ramp | 6 - I- 880 Ramp | 6 - I- 880 Ramp | 6 - I- 880 Ramp | 6 - I- 880 Ramp | 6 - I- 880 Ramp | 6 - I- 880 Ramp | 6 - I- 880 Ramp | 6 - I- 880 Ramp | 8 - I- 880 Ramp | 8 - I- 880 Ramp | 8 - I- 980 | 2 - I- 980 | 2 - I- 980 | 2 - I- 980 | 2 - I- 980 | 2 - I- 980 | 2 - I- 980 | 2 - I- 980 | 2 - I- 980 | 3 - I- 980 | 3 - I- 980 | 3 - I- 980 | 3 - I- 980 | 3 - I- 980 | 3 - I- 980 | 3 - I- 980 | 3 - I- 980 | 3 - I- 980 | 4 - I- 980 | 4 - I- 980 | 5 - I- 980 | 5 - I- 980 | 7 - I- 980 | 7 - I- 980 | 7 - I- 980 | 7 - I- 980 | 12 - I- 980 Ramp | 3 - I- 980 Ramp | 3 - I- 980 Ramp | 3 - I- 980 Ramp | 7 -(896 rows) - -SELECT * FROM toyemp WHERE name = 'sharon'; - name | age | location | annualsal ---------+-----+----------+----------- - sharon | 25 | (15,12) | 12000 -(1 row) - --- --- Test for Leaky view scenario --- -CREATE ROLE regress_alice; -CREATE FUNCTION f_leak (text) - RETURNS bool LANGUAGE 'plpgsql' COST 0.0000001 - AS 'BEGIN RAISE NOTICE ''f_leak => %'', $1; RETURN true; END'; -CREATE TABLE customer ( - cid int primary key, - name text not null, - tel text, - passwd text -); -CREATE TABLE credit_card ( - cid int references customer(cid), - cnum text, - climit int -); -CREATE TABLE credit_usage ( - cid int references customer(cid), - ymd date, - usage int -); -INSERT INTO customer - VALUES (101, 'regress_alice', '+81-12-3456-7890', 'passwd123'), - (102, 'regress_bob', '+01-234-567-8901', 'beafsteak'), - (103, 'regress_eve', '+49-8765-43210', 'hamburger'); -INSERT INTO credit_card - VALUES (101, '1111-2222-3333-4444', 4000), - (102, '5555-6666-7777-8888', 3000), - (103, '9801-2345-6789-0123', 2000); -INSERT INTO credit_usage - VALUES (101, '2011-09-15', 120), - (101, '2011-10-05', 90), - (101, '2011-10-18', 110), - (101, '2011-10-21', 200), - (101, '2011-11-10', 80), - (102, '2011-09-22', 300), - (102, '2011-10-12', 120), - (102, '2011-10-28', 200), - (103, '2011-10-15', 480); -CREATE VIEW my_property_normal AS - SELECT * FROM customer WHERE name = current_user; -CREATE VIEW my_property_secure WITH (security_barrier) AS - SELECT * FROM customer WHERE name = current_user; -CREATE VIEW my_credit_card_normal AS - SELECT * FROM customer l NATURAL JOIN credit_card r - WHERE l.name = current_user; -CREATE VIEW my_credit_card_secure WITH (security_barrier) AS - SELECT * FROM customer l NATURAL JOIN credit_card r - WHERE l.name = current_user; -CREATE VIEW my_credit_card_usage_normal AS - SELECT * FROM my_credit_card_secure l NATURAL JOIN credit_usage r; -CREATE VIEW my_credit_card_usage_secure WITH (security_barrier) AS - SELECT * FROM my_credit_card_secure l NATURAL JOIN credit_usage r; -GRANT SELECT ON my_property_normal TO public; -GRANT SELECT ON my_property_secure TO public; -GRANT SELECT ON my_credit_card_normal TO public; -GRANT SELECT ON my_credit_card_secure TO public; -GRANT SELECT ON my_credit_card_usage_normal TO public; -GRANT SELECT ON my_credit_card_usage_secure TO public; --- --- Run leaky view scenarios --- -SET SESSION AUTHORIZATION regress_alice; --- --- scenario: if a qualifier with tiny-cost is given, it shall be launched --- prior to the security policy of the view. --- -SELECT * FROM my_property_normal WHERE f_leak(passwd); -NOTICE: f_leak => passwd123 -NOTICE: f_leak => beafsteak -NOTICE: f_leak => hamburger - cid | name | tel | passwd ------+---------------+------------------+----------- - 101 | regress_alice | +81-12-3456-7890 | passwd123 -(1 row) - -EXPLAIN (COSTS OFF) SELECT * FROM my_property_normal WHERE f_leak(passwd); - QUERY PLAN ------------------------------------------------------- - Seq Scan on customer - Filter: (f_leak(passwd) AND (name = CURRENT_USER)) -(2 rows) - -SELECT * FROM my_property_secure WHERE f_leak(passwd); -NOTICE: f_leak => passwd123 - cid | name | tel | passwd ------+---------------+------------------+----------- - 101 | regress_alice | +81-12-3456-7890 | passwd123 -(1 row) - -EXPLAIN (COSTS OFF) SELECT * FROM my_property_secure WHERE f_leak(passwd); - QUERY PLAN ---------------------------------------------- - Subquery Scan on my_property_secure - Filter: f_leak(my_property_secure.passwd) - -> Seq Scan on customer - Filter: (name = CURRENT_USER) -(4 rows) - --- --- scenario: qualifiers can be pushed down if they contain leaky functions, --- provided they aren't passed data from inside the view. --- -SELECT * FROM my_property_normal v - WHERE f_leak('passwd') AND f_leak(passwd); -NOTICE: f_leak => passwd -NOTICE: f_leak => passwd123 -NOTICE: f_leak => passwd -NOTICE: f_leak => beafsteak -NOTICE: f_leak => passwd -NOTICE: f_leak => hamburger - cid | name | tel | passwd ------+---------------+------------------+----------- - 101 | regress_alice | +81-12-3456-7890 | passwd123 -(1 row) - -EXPLAIN (COSTS OFF) SELECT * FROM my_property_normal v - WHERE f_leak('passwd') AND f_leak(passwd); - QUERY PLAN ---------------------------------------------------------------------------------- - Seq Scan on customer - Filter: (f_leak('passwd'::text) AND f_leak(passwd) AND (name = CURRENT_USER)) -(2 rows) - -SELECT * FROM my_property_secure v - WHERE f_leak('passwd') AND f_leak(passwd); -NOTICE: f_leak => passwd -NOTICE: f_leak => passwd123 -NOTICE: f_leak => passwd -NOTICE: f_leak => passwd - cid | name | tel | passwd ------+---------------+------------------+----------- - 101 | regress_alice | +81-12-3456-7890 | passwd123 -(1 row) - -EXPLAIN (COSTS OFF) SELECT * FROM my_property_secure v - WHERE f_leak('passwd') AND f_leak(passwd); - QUERY PLAN --------------------------------------------------------------------- - Subquery Scan on v - Filter: f_leak(v.passwd) - -> Seq Scan on customer - Filter: (f_leak('passwd'::text) AND (name = CURRENT_USER)) -(4 rows) - --- --- scenario: if a qualifier references only one-side of a particular join- --- tree, it shall be distributed to the most deep scan plan as --- possible as we can. --- -SELECT * FROM my_credit_card_normal WHERE f_leak(cnum); -NOTICE: f_leak => 1111-2222-3333-4444 -NOTICE: f_leak => 5555-6666-7777-8888 -NOTICE: f_leak => 9801-2345-6789-0123 - cid | name | tel | passwd | cnum | climit ------+---------------+------------------+-----------+---------------------+-------- - 101 | regress_alice | +81-12-3456-7890 | passwd123 | 1111-2222-3333-4444 | 4000 -(1 row) - -EXPLAIN (COSTS OFF) SELECT * FROM my_credit_card_normal WHERE f_leak(cnum); - QUERY PLAN ---------------------------------------------- - Hash Join - Hash Cond: (r.cid = l.cid) - -> Seq Scan on credit_card r - Filter: f_leak(cnum) - -> Hash - -> Seq Scan on customer l - Filter: (name = CURRENT_USER) -(7 rows) - -SELECT * FROM my_credit_card_secure WHERE f_leak(cnum); -NOTICE: f_leak => 1111-2222-3333-4444 - cid | name | tel | passwd | cnum | climit ------+---------------+------------------+-----------+---------------------+-------- - 101 | regress_alice | +81-12-3456-7890 | passwd123 | 1111-2222-3333-4444 | 4000 -(1 row) - -EXPLAIN (COSTS OFF) SELECT * FROM my_credit_card_secure WHERE f_leak(cnum); - QUERY PLAN ---------------------------------------------------- - Subquery Scan on my_credit_card_secure - Filter: f_leak(my_credit_card_secure.cnum) - -> Hash Join - Hash Cond: (r.cid = l.cid) - -> Seq Scan on credit_card r - -> Hash - -> Seq Scan on customer l - Filter: (name = CURRENT_USER) -(8 rows) - --- --- scenario: an external qualifier can be pushed-down by in-front-of the --- views with "security_barrier" attribute, except for operators --- implemented with leakproof functions. --- -SELECT * FROM my_credit_card_usage_normal - WHERE f_leak(cnum) AND ymd >= '2011-10-01' AND ymd < '2011-11-01'; -NOTICE: f_leak => 1111-2222-3333-4444 - cid | name | tel | passwd | cnum | climit | ymd | usage ------+---------------+------------------+-----------+---------------------+--------+------------+------- - 101 | regress_alice | +81-12-3456-7890 | passwd123 | 1111-2222-3333-4444 | 4000 | 10-05-2011 | 90 - 101 | regress_alice | +81-12-3456-7890 | passwd123 | 1111-2222-3333-4444 | 4000 | 10-18-2011 | 110 - 101 | regress_alice | +81-12-3456-7890 | passwd123 | 1111-2222-3333-4444 | 4000 | 10-21-2011 | 200 -(3 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM my_credit_card_usage_normal - WHERE f_leak(cnum) AND ymd >= '2011-10-01' AND ymd < '2011-11-01'; - QUERY PLAN ------------------------------------------------------------------------------- - Nested Loop - Join Filter: (l.cid = r.cid) - -> Seq Scan on credit_usage r - Filter: ((ymd >= '10-01-2011'::date) AND (ymd < '11-01-2011'::date)) - -> Materialize - -> Subquery Scan on l - Filter: f_leak(l.cnum) - -> Hash Join - Hash Cond: (r_1.cid = l_1.cid) - -> Seq Scan on credit_card r_1 - -> Hash - -> Seq Scan on customer l_1 - Filter: (name = CURRENT_USER) -(13 rows) - -SELECT * FROM my_credit_card_usage_secure - WHERE f_leak(cnum) AND ymd >= '2011-10-01' AND ymd < '2011-11-01'; -NOTICE: f_leak => 1111-2222-3333-4444 -NOTICE: f_leak => 1111-2222-3333-4444 -NOTICE: f_leak => 1111-2222-3333-4444 - cid | name | tel | passwd | cnum | climit | ymd | usage ------+---------------+------------------+-----------+---------------------+--------+------------+------- - 101 | regress_alice | +81-12-3456-7890 | passwd123 | 1111-2222-3333-4444 | 4000 | 10-05-2011 | 90 - 101 | regress_alice | +81-12-3456-7890 | passwd123 | 1111-2222-3333-4444 | 4000 | 10-18-2011 | 110 - 101 | regress_alice | +81-12-3456-7890 | passwd123 | 1111-2222-3333-4444 | 4000 | 10-21-2011 | 200 -(3 rows) - -EXPLAIN (COSTS OFF) SELECT * FROM my_credit_card_usage_secure - WHERE f_leak(cnum) AND ymd >= '2011-10-01' AND ymd < '2011-11-01'; - QUERY PLAN ------------------------------------------------------------------------------------- - Subquery Scan on my_credit_card_usage_secure - Filter: f_leak(my_credit_card_usage_secure.cnum) - -> Nested Loop - Join Filter: (l.cid = r.cid) - -> Seq Scan on credit_usage r - Filter: ((ymd >= '10-01-2011'::date) AND (ymd < '11-01-2011'::date)) - -> Materialize - -> Hash Join - Hash Cond: (r_1.cid = l.cid) - -> Seq Scan on credit_card r_1 - -> Hash - -> Seq Scan on customer l - Filter: (name = CURRENT_USER) -(13 rows) - --- --- Test for the case when security_barrier gets changed between rewriter --- and planner stage. --- -PREPARE p1 AS SELECT * FROM my_property_normal WHERE f_leak(passwd); -PREPARE p2 AS SELECT * FROM my_property_secure WHERE f_leak(passwd); -EXECUTE p1; -NOTICE: f_leak => passwd123 -NOTICE: f_leak => beafsteak -NOTICE: f_leak => hamburger - cid | name | tel | passwd ------+---------------+------------------+----------- - 101 | regress_alice | +81-12-3456-7890 | passwd123 -(1 row) - -EXECUTE p2; -NOTICE: f_leak => passwd123 - cid | name | tel | passwd ------+---------------+------------------+----------- - 101 | regress_alice | +81-12-3456-7890 | passwd123 -(1 row) - -RESET SESSION AUTHORIZATION; -ALTER VIEW my_property_normal SET (security_barrier=true); -ALTER VIEW my_property_secure SET (security_barrier=false); -SET SESSION AUTHORIZATION regress_alice; -EXECUTE p1; -- To be perform as a view with security-barrier -NOTICE: f_leak => passwd123 - cid | name | tel | passwd ------+---------------+------------------+----------- - 101 | regress_alice | +81-12-3456-7890 | passwd123 -(1 row) - -EXECUTE p2; -- To be perform as a view without security-barrier -NOTICE: f_leak => passwd123 -NOTICE: f_leak => beafsteak -NOTICE: f_leak => hamburger - cid | name | tel | passwd ------+---------------+------------------+----------- - 101 | regress_alice | +81-12-3456-7890 | passwd123 -(1 row) - --- Cleanup. -RESET SESSION AUTHORIZATION; -DROP ROLE regress_alice; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/portals_p2.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/portals_p2.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/portals_p2.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/portals_p2.out 2023-02-20 19:47:52.789216469 -0500 @@ -1,122 +1 @@ --- --- PORTALS_P2 --- -BEGIN; -DECLARE foo13 CURSOR FOR - SELECT * FROM onek WHERE unique1 = 50; -DECLARE foo14 CURSOR FOR - SELECT * FROM onek WHERE unique1 = 51; -DECLARE foo15 CURSOR FOR - SELECT * FROM onek WHERE unique1 = 52; -DECLARE foo16 CURSOR FOR - SELECT * FROM onek WHERE unique1 = 53; -DECLARE foo17 CURSOR FOR - SELECT * FROM onek WHERE unique1 = 54; -DECLARE foo18 CURSOR FOR - SELECT * FROM onek WHERE unique1 = 55; -DECLARE foo19 CURSOR FOR - SELECT * FROM onek WHERE unique1 = 56; -DECLARE foo20 CURSOR FOR - SELECT * FROM onek WHERE unique1 = 57; -DECLARE foo21 CURSOR FOR - SELECT * FROM onek WHERE unique1 = 58; -DECLARE foo22 CURSOR FOR - SELECT * FROM onek WHERE unique1 = 59; -DECLARE foo23 CURSOR FOR - SELECT * FROM onek WHERE unique1 = 60; -DECLARE foo24 CURSOR FOR - SELECT * FROM onek2 WHERE unique1 = 50; -DECLARE foo25 CURSOR FOR - SELECT * FROM onek2 WHERE unique1 = 60; -FETCH all in foo13; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 50 | 253 | 0 | 2 | 0 | 10 | 0 | 50 | 50 | 50 | 50 | 0 | 1 | YBAAAA | TJAAAA | HHHHxx -(1 row) - -FETCH all in foo14; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 51 | 76 | 1 | 3 | 1 | 11 | 1 | 51 | 51 | 51 | 51 | 2 | 3 | ZBAAAA | YCAAAA | AAAAxx -(1 row) - -FETCH all in foo15; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 52 | 985 | 0 | 0 | 2 | 12 | 2 | 52 | 52 | 52 | 52 | 4 | 5 | ACAAAA | XLBAAA | HHHHxx -(1 row) - -FETCH all in foo16; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 53 | 196 | 1 | 1 | 3 | 13 | 3 | 53 | 53 | 53 | 53 | 6 | 7 | BCAAAA | OHAAAA | AAAAxx -(1 row) - -FETCH all in foo17; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 54 | 356 | 0 | 2 | 4 | 14 | 4 | 54 | 54 | 54 | 54 | 8 | 9 | CCAAAA | SNAAAA | AAAAxx -(1 row) - -FETCH all in foo18; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 55 | 627 | 1 | 3 | 5 | 15 | 5 | 55 | 55 | 55 | 55 | 10 | 11 | DCAAAA | DYAAAA | VVVVxx -(1 row) - -FETCH all in foo19; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 56 | 54 | 0 | 0 | 6 | 16 | 6 | 56 | 56 | 56 | 56 | 12 | 13 | ECAAAA | CCAAAA | OOOOxx -(1 row) - -FETCH all in foo20; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 57 | 942 | 1 | 1 | 7 | 17 | 7 | 57 | 57 | 57 | 57 | 14 | 15 | FCAAAA | GKBAAA | OOOOxx -(1 row) - -FETCH all in foo21; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 58 | 114 | 0 | 2 | 8 | 18 | 8 | 58 | 58 | 58 | 58 | 16 | 17 | GCAAAA | KEAAAA | OOOOxx -(1 row) - -FETCH all in foo22; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 59 | 593 | 1 | 3 | 9 | 19 | 9 | 59 | 59 | 59 | 59 | 18 | 19 | HCAAAA | VWAAAA | HHHHxx -(1 row) - -FETCH all in foo23; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 60 | 483 | 0 | 0 | 0 | 0 | 0 | 60 | 60 | 60 | 60 | 0 | 1 | ICAAAA | PSAAAA | VVVVxx -(1 row) - -FETCH all in foo24; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 50 | 253 | 0 | 2 | 0 | 10 | 0 | 50 | 50 | 50 | 50 | 0 | 1 | YBAAAA | TJAAAA | HHHHxx -(1 row) - -FETCH all in foo25; - unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 ----------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- - 60 | 483 | 0 | 0 | 0 | 0 | 0 | 60 | 60 | 60 | 60 | 0 | 1 | ICAAAA | PSAAAA | VVVVxx -(1 row) - -CLOSE foo13; -CLOSE foo14; -CLOSE foo15; -CLOSE foo16; -CLOSE foo17; -CLOSE foo18; -CLOSE foo19; -CLOSE foo20; -CLOSE foo21; -CLOSE foo22; -CLOSE foo23; -CLOSE foo24; -CLOSE foo25; -END; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/foreign_key.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/foreign_key.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/foreign_key.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/foreign_key.out 2023-02-20 19:47:52.859216472 -0500 @@ -1,2568 +1 @@ --- --- FOREIGN KEY --- --- MATCH FULL --- --- First test, check and cascade --- -CREATE TABLE PKTABLE ( ptest1 int PRIMARY KEY, ptest2 text ); -CREATE TABLE FKTABLE ( ftest1 int REFERENCES PKTABLE MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE, ftest2 int ); --- Insert test data into PKTABLE -INSERT INTO PKTABLE VALUES (1, 'Test1'); -INSERT INTO PKTABLE VALUES (2, 'Test2'); -INSERT INTO PKTABLE VALUES (3, 'Test3'); -INSERT INTO PKTABLE VALUES (4, 'Test4'); -INSERT INTO PKTABLE VALUES (5, 'Test5'); --- Insert successful rows into FK TABLE -INSERT INTO FKTABLE VALUES (1, 2); -INSERT INTO FKTABLE VALUES (2, 3); -INSERT INTO FKTABLE VALUES (3, 4); -INSERT INTO FKTABLE VALUES (NULL, 1); --- Insert a failed row into FK TABLE -INSERT INTO FKTABLE VALUES (100, 2); -ERROR: insert or update on table "fktable" violates foreign key constraint "fktable_ftest1_fkey" -DETAIL: Key (ftest1)=(100) is not present in table "pktable". --- Check FKTABLE -SELECT * FROM FKTABLE; - ftest1 | ftest2 ---------+-------- - 1 | 2 - 2 | 3 - 3 | 4 - | 1 -(4 rows) - --- Delete a row from PK TABLE -DELETE FROM PKTABLE WHERE ptest1=1; --- Check FKTABLE for removal of matched row -SELECT * FROM FKTABLE; - ftest1 | ftest2 ---------+-------- - 2 | 3 - 3 | 4 - | 1 -(3 rows) - --- Update a row from PK TABLE -UPDATE PKTABLE SET ptest1=1 WHERE ptest1=2; --- Check FKTABLE for update of matched row -SELECT * FROM FKTABLE; - ftest1 | ftest2 ---------+-------- - 3 | 4 - | 1 - 1 | 3 -(3 rows) - -DROP TABLE FKTABLE; -DROP TABLE PKTABLE; --- --- check set NULL and table constraint on multiple columns --- -CREATE TABLE PKTABLE ( ptest1 int, ptest2 int, ptest3 text, PRIMARY KEY(ptest1, ptest2) ); -CREATE TABLE FKTABLE ( ftest1 int, ftest2 int, ftest3 int, CONSTRAINT constrname FOREIGN KEY(ftest1, ftest2) - REFERENCES PKTABLE MATCH FULL ON DELETE SET NULL ON UPDATE SET NULL); --- Test comments -COMMENT ON CONSTRAINT constrname_wrong ON FKTABLE IS 'fk constraint comment'; -ERROR: constraint "constrname_wrong" for table "fktable" does not exist -COMMENT ON CONSTRAINT constrname ON FKTABLE IS 'fk constraint comment'; -COMMENT ON CONSTRAINT constrname ON FKTABLE IS NULL; --- Insert test data into PKTABLE -INSERT INTO PKTABLE VALUES (1, 2, 'Test1'); -INSERT INTO PKTABLE VALUES (1, 3, 'Test1-2'); -INSERT INTO PKTABLE VALUES (2, 4, 'Test2'); -INSERT INTO PKTABLE VALUES (3, 6, 'Test3'); -INSERT INTO PKTABLE VALUES (4, 8, 'Test4'); -INSERT INTO PKTABLE VALUES (5, 10, 'Test5'); --- Insert successful rows into FK TABLE -INSERT INTO FKTABLE VALUES (1, 2, 4); -INSERT INTO FKTABLE VALUES (1, 3, 5); -INSERT INTO FKTABLE VALUES (2, 4, 8); -INSERT INTO FKTABLE VALUES (3, 6, 12); -INSERT INTO FKTABLE VALUES (NULL, NULL, 0); --- Insert failed rows into FK TABLE -INSERT INTO FKTABLE VALUES (100, 2, 4); -ERROR: insert or update on table "fktable" violates foreign key constraint "constrname" -DETAIL: Key (ftest1, ftest2)=(100, 2) is not present in table "pktable". -INSERT INTO FKTABLE VALUES (2, 2, 4); -ERROR: insert or update on table "fktable" violates foreign key constraint "constrname" -DETAIL: Key (ftest1, ftest2)=(2, 2) is not present in table "pktable". -INSERT INTO FKTABLE VALUES (NULL, 2, 4); -ERROR: insert or update on table "fktable" violates foreign key constraint "constrname" -DETAIL: MATCH FULL does not allow mixing of null and nonnull key values. -INSERT INTO FKTABLE VALUES (1, NULL, 4); -ERROR: insert or update on table "fktable" violates foreign key constraint "constrname" -DETAIL: MATCH FULL does not allow mixing of null and nonnull key values. --- Check FKTABLE -SELECT * FROM FKTABLE; - ftest1 | ftest2 | ftest3 ---------+--------+-------- - 1 | 2 | 4 - 1 | 3 | 5 - 2 | 4 | 8 - 3 | 6 | 12 - | | 0 -(5 rows) - --- Delete a row from PK TABLE -DELETE FROM PKTABLE WHERE ptest1=1 and ptest2=2; --- Check FKTABLE for removal of matched row -SELECT * FROM FKTABLE; - ftest1 | ftest2 | ftest3 ---------+--------+-------- - 1 | 3 | 5 - 2 | 4 | 8 - 3 | 6 | 12 - | | 0 - | | 4 -(5 rows) - --- Delete another row from PK TABLE -DELETE FROM PKTABLE WHERE ptest1=5 and ptest2=10; --- Check FKTABLE (should be no change) -SELECT * FROM FKTABLE; - ftest1 | ftest2 | ftest3 ---------+--------+-------- - 1 | 3 | 5 - 2 | 4 | 8 - 3 | 6 | 12 - | | 0 - | | 4 -(5 rows) - --- Update a row from PK TABLE -UPDATE PKTABLE SET ptest1=1 WHERE ptest1=2; --- Check FKTABLE for update of matched row -SELECT * FROM FKTABLE; - ftest1 | ftest2 | ftest3 ---------+--------+-------- - 1 | 3 | 5 - 3 | 6 | 12 - | | 0 - | | 4 - | | 8 -(5 rows) - --- Check update with part of key null -UPDATE FKTABLE SET ftest1 = NULL WHERE ftest1 = 1; -ERROR: insert or update on table "fktable" violates foreign key constraint "constrname" -DETAIL: MATCH FULL does not allow mixing of null and nonnull key values. --- Check update with old and new key values equal -UPDATE FKTABLE SET ftest1 = 1 WHERE ftest1 = 1; --- Try altering the column type where foreign keys are involved -ALTER TABLE PKTABLE ALTER COLUMN ptest1 TYPE bigint; -ALTER TABLE FKTABLE ALTER COLUMN ftest1 TYPE bigint; -SELECT * FROM PKTABLE; - ptest1 | ptest2 | ptest3 ---------+--------+--------- - 1 | 3 | Test1-2 - 3 | 6 | Test3 - 4 | 8 | Test4 - 1 | 4 | Test2 -(4 rows) - -SELECT * FROM FKTABLE; - ftest1 | ftest2 | ftest3 ---------+--------+-------- - 3 | 6 | 12 - | | 0 - | | 4 - | | 8 - 1 | 3 | 5 -(5 rows) - -DROP TABLE PKTABLE CASCADE; -NOTICE: drop cascades to constraint constrname on table fktable -DROP TABLE FKTABLE; --- --- check set default and table constraint on multiple columns --- -CREATE TABLE PKTABLE ( ptest1 int, ptest2 int, ptest3 text, PRIMARY KEY(ptest1, ptest2) ); -CREATE TABLE FKTABLE ( ftest1 int DEFAULT -1, ftest2 int DEFAULT -2, ftest3 int, CONSTRAINT constrname2 FOREIGN KEY(ftest1, ftest2) - REFERENCES PKTABLE MATCH FULL ON DELETE SET DEFAULT ON UPDATE SET DEFAULT); --- Insert a value in PKTABLE for default -INSERT INTO PKTABLE VALUES (-1, -2, 'The Default!'); --- Insert test data into PKTABLE -INSERT INTO PKTABLE VALUES (1, 2, 'Test1'); -INSERT INTO PKTABLE VALUES (1, 3, 'Test1-2'); -INSERT INTO PKTABLE VALUES (2, 4, 'Test2'); -INSERT INTO PKTABLE VALUES (3, 6, 'Test3'); -INSERT INTO PKTABLE VALUES (4, 8, 'Test4'); -INSERT INTO PKTABLE VALUES (5, 10, 'Test5'); --- Insert successful rows into FK TABLE -INSERT INTO FKTABLE VALUES (1, 2, 4); -INSERT INTO FKTABLE VALUES (1, 3, 5); -INSERT INTO FKTABLE VALUES (2, 4, 8); -INSERT INTO FKTABLE VALUES (3, 6, 12); -INSERT INTO FKTABLE VALUES (NULL, NULL, 0); --- Insert failed rows into FK TABLE -INSERT INTO FKTABLE VALUES (100, 2, 4); -ERROR: insert or update on table "fktable" violates foreign key constraint "constrname2" -DETAIL: Key (ftest1, ftest2)=(100, 2) is not present in table "pktable". -INSERT INTO FKTABLE VALUES (2, 2, 4); -ERROR: insert or update on table "fktable" violates foreign key constraint "constrname2" -DETAIL: Key (ftest1, ftest2)=(2, 2) is not present in table "pktable". -INSERT INTO FKTABLE VALUES (NULL, 2, 4); -ERROR: insert or update on table "fktable" violates foreign key constraint "constrname2" -DETAIL: MATCH FULL does not allow mixing of null and nonnull key values. -INSERT INTO FKTABLE VALUES (1, NULL, 4); -ERROR: insert or update on table "fktable" violates foreign key constraint "constrname2" -DETAIL: MATCH FULL does not allow mixing of null and nonnull key values. --- Check FKTABLE -SELECT * FROM FKTABLE; - ftest1 | ftest2 | ftest3 ---------+--------+-------- - 1 | 2 | 4 - 1 | 3 | 5 - 2 | 4 | 8 - 3 | 6 | 12 - | | 0 -(5 rows) - --- Delete a row from PK TABLE -DELETE FROM PKTABLE WHERE ptest1=1 and ptest2=2; --- Check FKTABLE to check for removal -SELECT * FROM FKTABLE; - ftest1 | ftest2 | ftest3 ---------+--------+-------- - 1 | 3 | 5 - 2 | 4 | 8 - 3 | 6 | 12 - | | 0 - -1 | -2 | 4 -(5 rows) - --- Delete another row from PK TABLE -DELETE FROM PKTABLE WHERE ptest1=5 and ptest2=10; --- Check FKTABLE (should be no change) -SELECT * FROM FKTABLE; - ftest1 | ftest2 | ftest3 ---------+--------+-------- - 1 | 3 | 5 - 2 | 4 | 8 - 3 | 6 | 12 - | | 0 - -1 | -2 | 4 -(5 rows) - --- Update a row from PK TABLE -UPDATE PKTABLE SET ptest1=1 WHERE ptest1=2; --- Check FKTABLE for update of matched row -SELECT * FROM FKTABLE; - ftest1 | ftest2 | ftest3 ---------+--------+-------- - 1 | 3 | 5 - 3 | 6 | 12 - | | 0 - -1 | -2 | 4 - -1 | -2 | 8 -(5 rows) - --- this should fail for lack of CASCADE -DROP TABLE PKTABLE; -ERROR: cannot drop table pktable because other objects depend on it -DETAIL: constraint constrname2 on table fktable depends on table pktable -HINT: Use DROP ... CASCADE to drop the dependent objects too. -DROP TABLE PKTABLE CASCADE; -NOTICE: drop cascades to constraint constrname2 on table fktable -DROP TABLE FKTABLE; --- --- First test, check with no on delete or on update --- -CREATE TABLE PKTABLE ( ptest1 int PRIMARY KEY, ptest2 text ); -CREATE TABLE FKTABLE ( ftest1 int REFERENCES PKTABLE MATCH FULL, ftest2 int ); --- Insert test data into PKTABLE -INSERT INTO PKTABLE VALUES (1, 'Test1'); -INSERT INTO PKTABLE VALUES (2, 'Test2'); -INSERT INTO PKTABLE VALUES (3, 'Test3'); -INSERT INTO PKTABLE VALUES (4, 'Test4'); -INSERT INTO PKTABLE VALUES (5, 'Test5'); --- Insert successful rows into FK TABLE -INSERT INTO FKTABLE VALUES (1, 2); -INSERT INTO FKTABLE VALUES (2, 3); -INSERT INTO FKTABLE VALUES (3, 4); -INSERT INTO FKTABLE VALUES (NULL, 1); --- Insert a failed row into FK TABLE -INSERT INTO FKTABLE VALUES (100, 2); -ERROR: insert or update on table "fktable" violates foreign key constraint "fktable_ftest1_fkey" -DETAIL: Key (ftest1)=(100) is not present in table "pktable". --- Check FKTABLE -SELECT * FROM FKTABLE; - ftest1 | ftest2 ---------+-------- - 1 | 2 - 2 | 3 - 3 | 4 - | 1 -(4 rows) - --- Check PKTABLE -SELECT * FROM PKTABLE; - ptest1 | ptest2 ---------+-------- - 1 | Test1 - 2 | Test2 - 3 | Test3 - 4 | Test4 - 5 | Test5 -(5 rows) - --- Delete a row from PK TABLE (should fail) -DELETE FROM PKTABLE WHERE ptest1=1; -ERROR: update or delete on table "pktable" violates foreign key constraint "fktable_ftest1_fkey" on table "fktable" -DETAIL: Key (ptest1)=(1) is still referenced from table "fktable". --- Delete a row from PK TABLE (should succeed) -DELETE FROM PKTABLE WHERE ptest1=5; --- Check PKTABLE for deletes -SELECT * FROM PKTABLE; - ptest1 | ptest2 ---------+-------- - 1 | Test1 - 2 | Test2 - 3 | Test3 - 4 | Test4 -(4 rows) - --- Update a row from PK TABLE (should fail) -UPDATE PKTABLE SET ptest1=0 WHERE ptest1=2; -ERROR: update or delete on table "pktable" violates foreign key constraint "fktable_ftest1_fkey" on table "fktable" -DETAIL: Key (ptest1)=(2) is still referenced from table "fktable". --- Update a row from PK TABLE (should succeed) -UPDATE PKTABLE SET ptest1=0 WHERE ptest1=4; --- Check PKTABLE for updates -SELECT * FROM PKTABLE; - ptest1 | ptest2 ---------+-------- - 1 | Test1 - 2 | Test2 - 3 | Test3 - 0 | Test4 -(4 rows) - -DROP TABLE FKTABLE; -DROP TABLE PKTABLE; --- --- Check initial check upon ALTER TABLE --- -CREATE TABLE PKTABLE ( ptest1 int, ptest2 int, PRIMARY KEY(ptest1, ptest2) ); -CREATE TABLE FKTABLE ( ftest1 int, ftest2 int ); -INSERT INTO PKTABLE VALUES (1, 2); -INSERT INTO FKTABLE VALUES (1, NULL); -ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1, ftest2) REFERENCES PKTABLE MATCH FULL; -ERROR: insert or update on table "fktable" violates foreign key constraint "fktable_ftest1_ftest2_fkey" -DETAIL: MATCH FULL does not allow mixing of null and nonnull key values. -DROP TABLE FKTABLE; -DROP TABLE PKTABLE; --- MATCH SIMPLE --- Base test restricting update/delete -CREATE TABLE PKTABLE ( ptest1 int, ptest2 int, ptest3 int, ptest4 text, PRIMARY KEY(ptest1, ptest2, ptest3) ); -CREATE TABLE FKTABLE ( ftest1 int, ftest2 int, ftest3 int, ftest4 int, CONSTRAINT constrname3 - FOREIGN KEY(ftest1, ftest2, ftest3) REFERENCES PKTABLE); --- Insert Primary Key values -INSERT INTO PKTABLE VALUES (1, 2, 3, 'test1'); -INSERT INTO PKTABLE VALUES (1, 3, 3, 'test2'); -INSERT INTO PKTABLE VALUES (2, 3, 4, 'test3'); -INSERT INTO PKTABLE VALUES (2, 4, 5, 'test4'); --- Insert Foreign Key values -INSERT INTO FKTABLE VALUES (1, 2, 3, 1); -INSERT INTO FKTABLE VALUES (NULL, 2, 3, 2); -INSERT INTO FKTABLE VALUES (2, NULL, 3, 3); -INSERT INTO FKTABLE VALUES (NULL, 2, 7, 4); -INSERT INTO FKTABLE VALUES (NULL, 3, 4, 5); --- Insert a failed values -INSERT INTO FKTABLE VALUES (1, 2, 7, 6); -ERROR: insert or update on table "fktable" violates foreign key constraint "constrname3" -DETAIL: Key (ftest1, ftest2, ftest3)=(1, 2, 7) is not present in table "pktable". --- Show FKTABLE -SELECT * from FKTABLE; - ftest1 | ftest2 | ftest3 | ftest4 ---------+--------+--------+-------- - 1 | 2 | 3 | 1 - | 2 | 3 | 2 - 2 | | 3 | 3 - | 2 | 7 | 4 - | 3 | 4 | 5 -(5 rows) - --- Try to update something that should fail -UPDATE PKTABLE set ptest2=5 where ptest2=2; -ERROR: update or delete on table "pktable" violates foreign key constraint "constrname3" on table "fktable" -DETAIL: Key (ptest1, ptest2, ptest3)=(1, 2, 3) is still referenced from table "fktable". --- Try to update something that should succeed -UPDATE PKTABLE set ptest1=1 WHERE ptest2=3; --- Try to delete something that should fail -DELETE FROM PKTABLE where ptest1=1 and ptest2=2 and ptest3=3; -ERROR: update or delete on table "pktable" violates foreign key constraint "constrname3" on table "fktable" -DETAIL: Key (ptest1, ptest2, ptest3)=(1, 2, 3) is still referenced from table "fktable". --- Try to delete something that should work -DELETE FROM PKTABLE where ptest1=2; --- Show PKTABLE and FKTABLE -SELECT * from PKTABLE; - ptest1 | ptest2 | ptest3 | ptest4 ---------+--------+--------+-------- - 1 | 2 | 3 | test1 - 1 | 3 | 3 | test2 - 1 | 3 | 4 | test3 -(3 rows) - -SELECT * from FKTABLE; - ftest1 | ftest2 | ftest3 | ftest4 ---------+--------+--------+-------- - 1 | 2 | 3 | 1 - | 2 | 3 | 2 - 2 | | 3 | 3 - | 2 | 7 | 4 - | 3 | 4 | 5 -(5 rows) - -DROP TABLE FKTABLE; -DROP TABLE PKTABLE; --- restrict with null values -CREATE TABLE PKTABLE ( ptest1 int, ptest2 int, ptest3 int, ptest4 text, UNIQUE(ptest1, ptest2, ptest3) ); -CREATE TABLE FKTABLE ( ftest1 int, ftest2 int, ftest3 int, ftest4 int, CONSTRAINT constrname3 - FOREIGN KEY(ftest1, ftest2, ftest3) REFERENCES PKTABLE (ptest1, ptest2, ptest3)); -INSERT INTO PKTABLE VALUES (1, 2, 3, 'test1'); -INSERT INTO PKTABLE VALUES (1, 3, NULL, 'test2'); -INSERT INTO PKTABLE VALUES (2, NULL, 4, 'test3'); -INSERT INTO FKTABLE VALUES (1, 2, 3, 1); -DELETE FROM PKTABLE WHERE ptest1 = 2; -SELECT * FROM PKTABLE; - ptest1 | ptest2 | ptest3 | ptest4 ---------+--------+--------+-------- - 1 | 2 | 3 | test1 - 1 | 3 | | test2 -(2 rows) - -SELECT * FROM FKTABLE; - ftest1 | ftest2 | ftest3 | ftest4 ---------+--------+--------+-------- - 1 | 2 | 3 | 1 -(1 row) - -DROP TABLE FKTABLE; -DROP TABLE PKTABLE; --- cascade update/delete -CREATE TABLE PKTABLE ( ptest1 int, ptest2 int, ptest3 int, ptest4 text, PRIMARY KEY(ptest1, ptest2, ptest3) ); -CREATE TABLE FKTABLE ( ftest1 int, ftest2 int, ftest3 int, ftest4 int, CONSTRAINT constrname3 - FOREIGN KEY(ftest1, ftest2, ftest3) REFERENCES PKTABLE - ON DELETE CASCADE ON UPDATE CASCADE); --- Insert Primary Key values -INSERT INTO PKTABLE VALUES (1, 2, 3, 'test1'); -INSERT INTO PKTABLE VALUES (1, 3, 3, 'test2'); -INSERT INTO PKTABLE VALUES (2, 3, 4, 'test3'); -INSERT INTO PKTABLE VALUES (2, 4, 5, 'test4'); --- Insert Foreign Key values -INSERT INTO FKTABLE VALUES (1, 2, 3, 1); -INSERT INTO FKTABLE VALUES (NULL, 2, 3, 2); -INSERT INTO FKTABLE VALUES (2, NULL, 3, 3); -INSERT INTO FKTABLE VALUES (NULL, 2, 7, 4); -INSERT INTO FKTABLE VALUES (NULL, 3, 4, 5); --- Insert a failed values -INSERT INTO FKTABLE VALUES (1, 2, 7, 6); -ERROR: insert or update on table "fktable" violates foreign key constraint "constrname3" -DETAIL: Key (ftest1, ftest2, ftest3)=(1, 2, 7) is not present in table "pktable". --- Show FKTABLE -SELECT * from FKTABLE; - ftest1 | ftest2 | ftest3 | ftest4 ---------+--------+--------+-------- - 1 | 2 | 3 | 1 - | 2 | 3 | 2 - 2 | | 3 | 3 - | 2 | 7 | 4 - | 3 | 4 | 5 -(5 rows) - --- Try to update something that will cascade -UPDATE PKTABLE set ptest2=5 where ptest2=2; --- Try to update something that should not cascade -UPDATE PKTABLE set ptest1=1 WHERE ptest2=3; --- Show PKTABLE and FKTABLE -SELECT * from PKTABLE; - ptest1 | ptest2 | ptest3 | ptest4 ---------+--------+--------+-------- - 2 | 4 | 5 | test4 - 1 | 5 | 3 | test1 - 1 | 3 | 3 | test2 - 1 | 3 | 4 | test3 -(4 rows) - -SELECT * from FKTABLE; - ftest1 | ftest2 | ftest3 | ftest4 ---------+--------+--------+-------- - | 2 | 3 | 2 - 2 | | 3 | 3 - | 2 | 7 | 4 - | 3 | 4 | 5 - 1 | 5 | 3 | 1 -(5 rows) - --- Try to delete something that should cascade -DELETE FROM PKTABLE where ptest1=1 and ptest2=5 and ptest3=3; --- Show PKTABLE and FKTABLE -SELECT * from PKTABLE; - ptest1 | ptest2 | ptest3 | ptest4 ---------+--------+--------+-------- - 2 | 4 | 5 | test4 - 1 | 3 | 3 | test2 - 1 | 3 | 4 | test3 -(3 rows) - -SELECT * from FKTABLE; - ftest1 | ftest2 | ftest3 | ftest4 ---------+--------+--------+-------- - | 2 | 3 | 2 - 2 | | 3 | 3 - | 2 | 7 | 4 - | 3 | 4 | 5 -(4 rows) - --- Try to delete something that should not have a cascade -DELETE FROM PKTABLE where ptest1=2; --- Show PKTABLE and FKTABLE -SELECT * from PKTABLE; - ptest1 | ptest2 | ptest3 | ptest4 ---------+--------+--------+-------- - 1 | 3 | 3 | test2 - 1 | 3 | 4 | test3 -(2 rows) - -SELECT * from FKTABLE; - ftest1 | ftest2 | ftest3 | ftest4 ---------+--------+--------+-------- - | 2 | 3 | 2 - 2 | | 3 | 3 - | 2 | 7 | 4 - | 3 | 4 | 5 -(4 rows) - -DROP TABLE FKTABLE; -DROP TABLE PKTABLE; --- set null update / set default delete -CREATE TABLE PKTABLE ( ptest1 int, ptest2 int, ptest3 int, ptest4 text, PRIMARY KEY(ptest1, ptest2, ptest3) ); -CREATE TABLE FKTABLE ( ftest1 int DEFAULT 0, ftest2 int, ftest3 int, ftest4 int, CONSTRAINT constrname3 - FOREIGN KEY(ftest1, ftest2, ftest3) REFERENCES PKTABLE - ON DELETE SET DEFAULT ON UPDATE SET NULL); --- Insert Primary Key values -INSERT INTO PKTABLE VALUES (1, 2, 3, 'test1'); -INSERT INTO PKTABLE VALUES (1, 3, 3, 'test2'); -INSERT INTO PKTABLE VALUES (2, 3, 4, 'test3'); -INSERT INTO PKTABLE VALUES (2, 4, 5, 'test4'); --- Insert Foreign Key values -INSERT INTO FKTABLE VALUES (1, 2, 3, 1); -INSERT INTO FKTABLE VALUES (2, 3, 4, 1); -INSERT INTO FKTABLE VALUES (NULL, 2, 3, 2); -INSERT INTO FKTABLE VALUES (2, NULL, 3, 3); -INSERT INTO FKTABLE VALUES (NULL, 2, 7, 4); -INSERT INTO FKTABLE VALUES (NULL, 3, 4, 5); --- Insert a failed values -INSERT INTO FKTABLE VALUES (1, 2, 7, 6); -ERROR: insert or update on table "fktable" violates foreign key constraint "constrname3" -DETAIL: Key (ftest1, ftest2, ftest3)=(1, 2, 7) is not present in table "pktable". --- Show FKTABLE -SELECT * from FKTABLE; - ftest1 | ftest2 | ftest3 | ftest4 ---------+--------+--------+-------- - 1 | 2 | 3 | 1 - 2 | 3 | 4 | 1 - | 2 | 3 | 2 - 2 | | 3 | 3 - | 2 | 7 | 4 - | 3 | 4 | 5 -(6 rows) - --- Try to update something that will set null -UPDATE PKTABLE set ptest2=5 where ptest2=2; --- Try to update something that should not set null -UPDATE PKTABLE set ptest2=2 WHERE ptest2=3 and ptest1=1; --- Show PKTABLE and FKTABLE -SELECT * from PKTABLE; - ptest1 | ptest2 | ptest3 | ptest4 ---------+--------+--------+-------- - 2 | 3 | 4 | test3 - 2 | 4 | 5 | test4 - 1 | 5 | 3 | test1 - 1 | 2 | 3 | test2 -(4 rows) - -SELECT * from FKTABLE; - ftest1 | ftest2 | ftest3 | ftest4 ---------+--------+--------+-------- - 2 | 3 | 4 | 1 - | 2 | 3 | 2 - 2 | | 3 | 3 - | 2 | 7 | 4 - | 3 | 4 | 5 - | | | 1 -(6 rows) - --- Try to delete something that should set default -DELETE FROM PKTABLE where ptest1=2 and ptest2=3 and ptest3=4; --- Show PKTABLE and FKTABLE -SELECT * from PKTABLE; - ptest1 | ptest2 | ptest3 | ptest4 ---------+--------+--------+-------- - 2 | 4 | 5 | test4 - 1 | 5 | 3 | test1 - 1 | 2 | 3 | test2 -(3 rows) - -SELECT * from FKTABLE; - ftest1 | ftest2 | ftest3 | ftest4 ---------+--------+--------+-------- - | 2 | 3 | 2 - 2 | | 3 | 3 - | 2 | 7 | 4 - | 3 | 4 | 5 - | | | 1 - 0 | | | 1 -(6 rows) - --- Try to delete something that should not set default -DELETE FROM PKTABLE where ptest2=5; --- Show PKTABLE and FKTABLE -SELECT * from PKTABLE; - ptest1 | ptest2 | ptest3 | ptest4 ---------+--------+--------+-------- - 2 | 4 | 5 | test4 - 1 | 2 | 3 | test2 -(2 rows) - -SELECT * from FKTABLE; - ftest1 | ftest2 | ftest3 | ftest4 ---------+--------+--------+-------- - | 2 | 3 | 2 - 2 | | 3 | 3 - | 2 | 7 | 4 - | 3 | 4 | 5 - | | | 1 - 0 | | | 1 -(6 rows) - -DROP TABLE FKTABLE; -DROP TABLE PKTABLE; --- set default update / set null delete -CREATE TABLE PKTABLE ( ptest1 int, ptest2 int, ptest3 int, ptest4 text, PRIMARY KEY(ptest1, ptest2, ptest3) ); -CREATE TABLE FKTABLE ( ftest1 int DEFAULT 0, ftest2 int DEFAULT -1, ftest3 int DEFAULT -2, ftest4 int, CONSTRAINT constrname3 - FOREIGN KEY(ftest1, ftest2, ftest3) REFERENCES PKTABLE - ON DELETE SET NULL ON UPDATE SET DEFAULT); --- Insert Primary Key values -INSERT INTO PKTABLE VALUES (1, 2, 3, 'test1'); -INSERT INTO PKTABLE VALUES (1, 3, 3, 'test2'); -INSERT INTO PKTABLE VALUES (2, 3, 4, 'test3'); -INSERT INTO PKTABLE VALUES (2, 4, 5, 'test4'); -INSERT INTO PKTABLE VALUES (2, -1, 5, 'test5'); --- Insert Foreign Key values -INSERT INTO FKTABLE VALUES (1, 2, 3, 1); -INSERT INTO FKTABLE VALUES (2, 3, 4, 1); -INSERT INTO FKTABLE VALUES (2, 4, 5, 1); -INSERT INTO FKTABLE VALUES (NULL, 2, 3, 2); -INSERT INTO FKTABLE VALUES (2, NULL, 3, 3); -INSERT INTO FKTABLE VALUES (NULL, 2, 7, 4); -INSERT INTO FKTABLE VALUES (NULL, 3, 4, 5); --- Insert a failed values -INSERT INTO FKTABLE VALUES (1, 2, 7, 6); -ERROR: insert or update on table "fktable" violates foreign key constraint "constrname3" -DETAIL: Key (ftest1, ftest2, ftest3)=(1, 2, 7) is not present in table "pktable". --- Show FKTABLE -SELECT * from FKTABLE; - ftest1 | ftest2 | ftest3 | ftest4 ---------+--------+--------+-------- - 1 | 2 | 3 | 1 - 2 | 3 | 4 | 1 - 2 | 4 | 5 | 1 - | 2 | 3 | 2 - 2 | | 3 | 3 - | 2 | 7 | 4 - | 3 | 4 | 5 -(7 rows) - --- Try to update something that will fail -UPDATE PKTABLE set ptest2=5 where ptest2=2; -ERROR: insert or update on table "fktable" violates foreign key constraint "constrname3" -DETAIL: Key (ftest1, ftest2, ftest3)=(0, -1, -2) is not present in table "pktable". --- Try to update something that will set default -UPDATE PKTABLE set ptest1=0, ptest2=-1, ptest3=-2 where ptest2=2; -UPDATE PKTABLE set ptest2=10 where ptest2=4; --- Try to update something that should not set default -UPDATE PKTABLE set ptest2=2 WHERE ptest2=3 and ptest1=1; --- Show PKTABLE and FKTABLE -SELECT * from PKTABLE; - ptest1 | ptest2 | ptest3 | ptest4 ---------+--------+--------+-------- - 2 | 3 | 4 | test3 - 2 | -1 | 5 | test5 - 0 | -1 | -2 | test1 - 2 | 10 | 5 | test4 - 1 | 2 | 3 | test2 -(5 rows) - -SELECT * from FKTABLE; - ftest1 | ftest2 | ftest3 | ftest4 ---------+--------+--------+-------- - 2 | 3 | 4 | 1 - | 2 | 3 | 2 - 2 | | 3 | 3 - | 2 | 7 | 4 - | 3 | 4 | 5 - 0 | -1 | -2 | 1 - 0 | -1 | -2 | 1 -(7 rows) - --- Try to delete something that should set null -DELETE FROM PKTABLE where ptest1=2 and ptest2=3 and ptest3=4; --- Show PKTABLE and FKTABLE -SELECT * from PKTABLE; - ptest1 | ptest2 | ptest3 | ptest4 ---------+--------+--------+-------- - 2 | -1 | 5 | test5 - 0 | -1 | -2 | test1 - 2 | 10 | 5 | test4 - 1 | 2 | 3 | test2 -(4 rows) - -SELECT * from FKTABLE; - ftest1 | ftest2 | ftest3 | ftest4 ---------+--------+--------+-------- - | 2 | 3 | 2 - 2 | | 3 | 3 - | 2 | 7 | 4 - | 3 | 4 | 5 - 0 | -1 | -2 | 1 - 0 | -1 | -2 | 1 - | | | 1 -(7 rows) - --- Try to delete something that should not set null -DELETE FROM PKTABLE where ptest2=-1 and ptest3=5; --- Show PKTABLE and FKTABLE -SELECT * from PKTABLE; - ptest1 | ptest2 | ptest3 | ptest4 ---------+--------+--------+-------- - 0 | -1 | -2 | test1 - 2 | 10 | 5 | test4 - 1 | 2 | 3 | test2 -(3 rows) - -SELECT * from FKTABLE; - ftest1 | ftest2 | ftest3 | ftest4 ---------+--------+--------+-------- - | 2 | 3 | 2 - 2 | | 3 | 3 - | 2 | 7 | 4 - | 3 | 4 | 5 - 0 | -1 | -2 | 1 - 0 | -1 | -2 | 1 - | | | 1 -(7 rows) - -DROP TABLE FKTABLE; -DROP TABLE PKTABLE; -CREATE TABLE PKTABLE (ptest1 int PRIMARY KEY); -CREATE TABLE FKTABLE_FAIL1 ( ftest1 int, CONSTRAINT fkfail1 FOREIGN KEY (ftest2) REFERENCES PKTABLE); -ERROR: column "ftest2" referenced in foreign key constraint does not exist -CREATE TABLE FKTABLE_FAIL2 ( ftest1 int, CONSTRAINT fkfail1 FOREIGN KEY (ftest1) REFERENCES PKTABLE(ptest2)); -ERROR: column "ptest2" referenced in foreign key constraint does not exist -DROP TABLE FKTABLE_FAIL1; -ERROR: table "fktable_fail1" does not exist -DROP TABLE FKTABLE_FAIL2; -ERROR: table "fktable_fail2" does not exist -DROP TABLE PKTABLE; --- Test for referencing column number smaller than referenced constraint -CREATE TABLE PKTABLE (ptest1 int, ptest2 int, UNIQUE(ptest1, ptest2)); -CREATE TABLE FKTABLE_FAIL1 (ftest1 int REFERENCES pktable(ptest1)); -ERROR: there is no unique constraint matching given keys for referenced table "pktable" -DROP TABLE FKTABLE_FAIL1; -ERROR: table "fktable_fail1" does not exist -DROP TABLE PKTABLE; --- --- Tests for mismatched types --- --- Basic one column, two table setup -CREATE TABLE PKTABLE (ptest1 int PRIMARY KEY); -INSERT INTO PKTABLE VALUES(42); --- This next should fail, because int=inet does not exist -CREATE TABLE FKTABLE (ftest1 inet REFERENCES pktable); -ERROR: foreign key constraint "fktable_ftest1_fkey" cannot be implemented -DETAIL: Key columns "ftest1" and "ptest1" are of incompatible types: inet and integer. --- This should also fail for the same reason, but here we --- give the column name -CREATE TABLE FKTABLE (ftest1 inet REFERENCES pktable(ptest1)); -ERROR: foreign key constraint "fktable_ftest1_fkey" cannot be implemented -DETAIL: Key columns "ftest1" and "ptest1" are of incompatible types: inet and integer. --- This should succeed, even though they are different types, --- because int=int8 exists and is a member of the integer opfamily -CREATE TABLE FKTABLE (ftest1 int8 REFERENCES pktable); --- Check it actually works -INSERT INTO FKTABLE VALUES(42); -- should succeed -INSERT INTO FKTABLE VALUES(43); -- should fail -ERROR: insert or update on table "fktable" violates foreign key constraint "fktable_ftest1_fkey" -DETAIL: Key (ftest1)=(43) is not present in table "pktable". -UPDATE FKTABLE SET ftest1 = ftest1; -- should succeed -UPDATE FKTABLE SET ftest1 = ftest1 + 1; -- should fail -ERROR: insert or update on table "fktable" violates foreign key constraint "fktable_ftest1_fkey" -DETAIL: Key (ftest1)=(43) is not present in table "pktable". -DROP TABLE FKTABLE; --- This should fail, because we'd have to cast numeric to int which is --- not an implicit coercion (or use numeric=numeric, but that's not part --- of the integer opfamily) -CREATE TABLE FKTABLE (ftest1 numeric REFERENCES pktable); -ERROR: foreign key constraint "fktable_ftest1_fkey" cannot be implemented -DETAIL: Key columns "ftest1" and "ptest1" are of incompatible types: numeric and integer. -DROP TABLE PKTABLE; --- On the other hand, this should work because int implicitly promotes to --- numeric, and we allow promotion on the FK side -CREATE TABLE PKTABLE (ptest1 numeric PRIMARY KEY); -INSERT INTO PKTABLE VALUES(42); -CREATE TABLE FKTABLE (ftest1 int REFERENCES pktable); --- Check it actually works -INSERT INTO FKTABLE VALUES(42); -- should succeed -INSERT INTO FKTABLE VALUES(43); -- should fail -ERROR: insert or update on table "fktable" violates foreign key constraint "fktable_ftest1_fkey" -DETAIL: Key (ftest1)=(43) is not present in table "pktable". -UPDATE FKTABLE SET ftest1 = ftest1; -- should succeed -UPDATE FKTABLE SET ftest1 = ftest1 + 1; -- should fail -ERROR: insert or update on table "fktable" violates foreign key constraint "fktable_ftest1_fkey" -DETAIL: Key (ftest1)=(43) is not present in table "pktable". -DROP TABLE FKTABLE; -DROP TABLE PKTABLE; --- Two columns, two tables -CREATE TABLE PKTABLE (ptest1 int, ptest2 inet, PRIMARY KEY(ptest1, ptest2)); --- This should fail, because we just chose really odd types -CREATE TABLE FKTABLE (ftest1 cidr, ftest2 timestamp, FOREIGN KEY(ftest1, ftest2) REFERENCES pktable); -ERROR: foreign key constraint "fktable_ftest1_ftest2_fkey" cannot be implemented -DETAIL: Key columns "ftest1" and "ptest1" are of incompatible types: cidr and integer. --- Again, so should this... -CREATE TABLE FKTABLE (ftest1 cidr, ftest2 timestamp, FOREIGN KEY(ftest1, ftest2) REFERENCES pktable(ptest1, ptest2)); -ERROR: foreign key constraint "fktable_ftest1_ftest2_fkey" cannot be implemented -DETAIL: Key columns "ftest1" and "ptest1" are of incompatible types: cidr and integer. --- This fails because we mixed up the column ordering -CREATE TABLE FKTABLE (ftest1 int, ftest2 inet, FOREIGN KEY(ftest2, ftest1) REFERENCES pktable); -ERROR: foreign key constraint "fktable_ftest2_ftest1_fkey" cannot be implemented -DETAIL: Key columns "ftest2" and "ptest1" are of incompatible types: inet and integer. --- As does this... -CREATE TABLE FKTABLE (ftest1 int, ftest2 inet, FOREIGN KEY(ftest2, ftest1) REFERENCES pktable(ptest1, ptest2)); -ERROR: foreign key constraint "fktable_ftest2_ftest1_fkey" cannot be implemented -DETAIL: Key columns "ftest2" and "ptest1" are of incompatible types: inet and integer. --- And again.. -CREATE TABLE FKTABLE (ftest1 int, ftest2 inet, FOREIGN KEY(ftest1, ftest2) REFERENCES pktable(ptest2, ptest1)); -ERROR: foreign key constraint "fktable_ftest1_ftest2_fkey" cannot be implemented -DETAIL: Key columns "ftest1" and "ptest2" are of incompatible types: integer and inet. --- This works... -CREATE TABLE FKTABLE (ftest1 int, ftest2 inet, FOREIGN KEY(ftest2, ftest1) REFERENCES pktable(ptest2, ptest1)); -DROP TABLE FKTABLE; --- As does this -CREATE TABLE FKTABLE (ftest1 int, ftest2 inet, FOREIGN KEY(ftest1, ftest2) REFERENCES pktable(ptest1, ptest2)); -DROP TABLE FKTABLE; -DROP TABLE PKTABLE; --- Two columns, same table --- Make sure this still works... -CREATE TABLE PKTABLE (ptest1 int, ptest2 inet, ptest3 int, ptest4 inet, PRIMARY KEY(ptest1, ptest2), FOREIGN KEY(ptest3, -ptest4) REFERENCES pktable(ptest1, ptest2)); -DROP TABLE PKTABLE; --- And this, -CREATE TABLE PKTABLE (ptest1 int, ptest2 inet, ptest3 int, ptest4 inet, PRIMARY KEY(ptest1, ptest2), FOREIGN KEY(ptest3, -ptest4) REFERENCES pktable); -DROP TABLE PKTABLE; --- This shouldn't (mixed up columns) -CREATE TABLE PKTABLE (ptest1 int, ptest2 inet, ptest3 int, ptest4 inet, PRIMARY KEY(ptest1, ptest2), FOREIGN KEY(ptest3, -ptest4) REFERENCES pktable(ptest2, ptest1)); -ERROR: foreign key constraint "pktable_ptest3_ptest4_fkey" cannot be implemented -DETAIL: Key columns "ptest3" and "ptest2" are of incompatible types: integer and inet. --- Nor should this... (same reason, we have 4,3 referencing 1,2 which mismatches types -CREATE TABLE PKTABLE (ptest1 int, ptest2 inet, ptest3 int, ptest4 inet, PRIMARY KEY(ptest1, ptest2), FOREIGN KEY(ptest4, -ptest3) REFERENCES pktable(ptest1, ptest2)); -ERROR: foreign key constraint "pktable_ptest4_ptest3_fkey" cannot be implemented -DETAIL: Key columns "ptest4" and "ptest1" are of incompatible types: inet and integer. --- Not this one either... Same as the last one except we didn't defined the columns being referenced. -CREATE TABLE PKTABLE (ptest1 int, ptest2 inet, ptest3 int, ptest4 inet, PRIMARY KEY(ptest1, ptest2), FOREIGN KEY(ptest4, -ptest3) REFERENCES pktable); -ERROR: foreign key constraint "pktable_ptest4_ptest3_fkey" cannot be implemented -DETAIL: Key columns "ptest4" and "ptest1" are of incompatible types: inet and integer. --- --- Now some cases with inheritance --- Basic 2 table case: 1 column of matching types. -create table pktable_base (base1 int not null); -create table pktable (ptest1 int, primary key(base1), unique(base1, ptest1)) inherits (pktable_base); -create table fktable (ftest1 int references pktable(base1)); --- now some ins, upd, del -insert into pktable(base1) values (1); -insert into pktable(base1) values (2); --- let's insert a non-existent fktable value -insert into fktable(ftest1) values (3); -ERROR: insert or update on table "fktable" violates foreign key constraint "fktable_ftest1_fkey" -DETAIL: Key (ftest1)=(3) is not present in table "pktable". --- let's make a valid row for that -insert into pktable(base1) values (3); -insert into fktable(ftest1) values (3); --- let's try removing a row that should fail from pktable -delete from pktable where base1>2; -ERROR: update or delete on table "pktable" violates foreign key constraint "fktable_ftest1_fkey" on table "fktable" -DETAIL: Key (base1)=(3) is still referenced from table "fktable". --- okay, let's try updating all of the base1 values to *4 --- which should fail. -update pktable set base1=base1*4; -ERROR: update or delete on table "pktable" violates foreign key constraint "fktable_ftest1_fkey" on table "fktable" -DETAIL: Key (base1)=(3) is still referenced from table "fktable". --- okay, let's try an update that should work. -update pktable set base1=base1*4 where base1<3; --- and a delete that should work -delete from pktable where base1>3; --- cleanup -drop table fktable; -delete from pktable; --- Now 2 columns 2 tables, matching types -create table fktable (ftest1 int, ftest2 int, foreign key(ftest1, ftest2) references pktable(base1, ptest1)); --- now some ins, upd, del -insert into pktable(base1, ptest1) values (1, 1); -insert into pktable(base1, ptest1) values (2, 2); --- let's insert a non-existent fktable value -insert into fktable(ftest1, ftest2) values (3, 1); -ERROR: insert or update on table "fktable" violates foreign key constraint "fktable_ftest1_ftest2_fkey" -DETAIL: Key (ftest1, ftest2)=(3, 1) is not present in table "pktable". --- let's make a valid row for that -insert into pktable(base1,ptest1) values (3, 1); -insert into fktable(ftest1, ftest2) values (3, 1); --- let's try removing a row that should fail from pktable -delete from pktable where base1>2; -ERROR: update or delete on table "pktable" violates foreign key constraint "fktable_ftest1_ftest2_fkey" on table "fktable" -DETAIL: Key (base1, ptest1)=(3, 1) is still referenced from table "fktable". --- okay, let's try updating all of the base1 values to *4 --- which should fail. -update pktable set base1=base1*4; -ERROR: update or delete on table "pktable" violates foreign key constraint "fktable_ftest1_ftest2_fkey" on table "fktable" -DETAIL: Key (base1, ptest1)=(3, 1) is still referenced from table "fktable". --- okay, let's try an update that should work. -update pktable set base1=base1*4 where base1<3; --- and a delete that should work -delete from pktable where base1>3; --- cleanup -drop table fktable; -drop table pktable; -drop table pktable_base; --- Now we'll do one all in 1 table with 2 columns of matching types -create table pktable_base(base1 int not null, base2 int); -create table pktable(ptest1 int, ptest2 int, primary key(base1, ptest1), foreign key(base2, ptest2) references - pktable(base1, ptest1)) inherits (pktable_base); -insert into pktable (base1, ptest1, base2, ptest2) values (1, 1, 1, 1); -insert into pktable (base1, ptest1, base2, ptest2) values (2, 1, 1, 1); -insert into pktable (base1, ptest1, base2, ptest2) values (2, 2, 2, 1); -insert into pktable (base1, ptest1, base2, ptest2) values (1, 3, 2, 2); --- fails (3,2) isn't in base1, ptest1 -insert into pktable (base1, ptest1, base2, ptest2) values (2, 3, 3, 2); -ERROR: insert or update on table "pktable" violates foreign key constraint "pktable_base2_ptest2_fkey" -DETAIL: Key (base2, ptest2)=(3, 2) is not present in table "pktable". --- fails (2,2) is being referenced -delete from pktable where base1=2; -ERROR: update or delete on table "pktable" violates foreign key constraint "pktable_base2_ptest2_fkey" on table "pktable" -DETAIL: Key (base1, ptest1)=(2, 2) is still referenced from table "pktable". --- fails (1,1) is being referenced (twice) -update pktable set base1=3 where base1=1; -ERROR: update or delete on table "pktable" violates foreign key constraint "pktable_base2_ptest2_fkey" on table "pktable" -DETAIL: Key (base1, ptest1)=(1, 1) is still referenced from table "pktable". --- this sequence of two deletes will work, since after the first there will be no (2,*) references -delete from pktable where base2=2; -delete from pktable where base1=2; -drop table pktable; -drop table pktable_base; --- 2 columns (2 tables), mismatched types -create table pktable_base(base1 int not null); -create table pktable(ptest1 inet, primary key(base1, ptest1)) inherits (pktable_base); --- just generally bad types (with and without column references on the referenced table) -create table fktable(ftest1 cidr, ftest2 int[], foreign key (ftest1, ftest2) references pktable); -ERROR: foreign key constraint "fktable_ftest1_ftest2_fkey" cannot be implemented -DETAIL: Key columns "ftest1" and "base1" are of incompatible types: cidr and integer. -create table fktable(ftest1 cidr, ftest2 int[], foreign key (ftest1, ftest2) references pktable(base1, ptest1)); -ERROR: foreign key constraint "fktable_ftest1_ftest2_fkey" cannot be implemented -DETAIL: Key columns "ftest1" and "base1" are of incompatible types: cidr and integer. --- let's mix up which columns reference which -create table fktable(ftest1 int, ftest2 inet, foreign key(ftest2, ftest1) references pktable); -ERROR: foreign key constraint "fktable_ftest2_ftest1_fkey" cannot be implemented -DETAIL: Key columns "ftest2" and "base1" are of incompatible types: inet and integer. -create table fktable(ftest1 int, ftest2 inet, foreign key(ftest2, ftest1) references pktable(base1, ptest1)); -ERROR: foreign key constraint "fktable_ftest2_ftest1_fkey" cannot be implemented -DETAIL: Key columns "ftest2" and "base1" are of incompatible types: inet and integer. -create table fktable(ftest1 int, ftest2 inet, foreign key(ftest1, ftest2) references pktable(ptest1, base1)); -ERROR: foreign key constraint "fktable_ftest1_ftest2_fkey" cannot be implemented -DETAIL: Key columns "ftest1" and "ptest1" are of incompatible types: integer and inet. -drop table pktable; -drop table pktable_base; --- 2 columns (1 table), mismatched types -create table pktable_base(base1 int not null, base2 int); -create table pktable(ptest1 inet, ptest2 inet[], primary key(base1, ptest1), foreign key(base2, ptest2) references - pktable(base1, ptest1)) inherits (pktable_base); -ERROR: foreign key constraint "pktable_base2_ptest2_fkey" cannot be implemented -DETAIL: Key columns "ptest2" and "ptest1" are of incompatible types: inet[] and inet. -create table pktable(ptest1 inet, ptest2 inet, primary key(base1, ptest1), foreign key(base2, ptest2) references - pktable(ptest1, base1)) inherits (pktable_base); -ERROR: foreign key constraint "pktable_base2_ptest2_fkey" cannot be implemented -DETAIL: Key columns "base2" and "ptest1" are of incompatible types: integer and inet. -create table pktable(ptest1 inet, ptest2 inet, primary key(base1, ptest1), foreign key(ptest2, base2) references - pktable(base1, ptest1)) inherits (pktable_base); -ERROR: foreign key constraint "pktable_ptest2_base2_fkey" cannot be implemented -DETAIL: Key columns "ptest2" and "base1" are of incompatible types: inet and integer. -create table pktable(ptest1 inet, ptest2 inet, primary key(base1, ptest1), foreign key(ptest2, base2) references - pktable(base1, ptest1)) inherits (pktable_base); -ERROR: foreign key constraint "pktable_ptest2_base2_fkey" cannot be implemented -DETAIL: Key columns "ptest2" and "base1" are of incompatible types: inet and integer. -drop table pktable; -ERROR: table "pktable" does not exist -drop table pktable_base; --- --- Deferrable constraints --- --- deferrable, explicitly deferred -CREATE TABLE pktable ( - id INT4 PRIMARY KEY, - other INT4 -); -CREATE TABLE fktable ( - id INT4 PRIMARY KEY, - fk INT4 REFERENCES pktable DEFERRABLE -); --- default to immediate: should fail -INSERT INTO fktable VALUES (5, 10); -ERROR: insert or update on table "fktable" violates foreign key constraint "fktable_fk_fkey" -DETAIL: Key (fk)=(10) is not present in table "pktable". --- explicitly defer the constraint -BEGIN; -SET CONSTRAINTS ALL DEFERRED; -INSERT INTO fktable VALUES (10, 15); -INSERT INTO pktable VALUES (15, 0); -- make the FK insert valid -COMMIT; -DROP TABLE fktable, pktable; --- deferrable, initially deferred -CREATE TABLE pktable ( - id INT4 PRIMARY KEY, - other INT4 -); -CREATE TABLE fktable ( - id INT4 PRIMARY KEY, - fk INT4 REFERENCES pktable DEFERRABLE INITIALLY DEFERRED -); --- default to deferred, should succeed -BEGIN; -INSERT INTO fktable VALUES (100, 200); -INSERT INTO pktable VALUES (200, 500); -- make the FK insert valid -COMMIT; --- default to deferred, explicitly make immediate -BEGIN; -SET CONSTRAINTS ALL IMMEDIATE; --- should fail -INSERT INTO fktable VALUES (500, 1000); -ERROR: insert or update on table "fktable" violates foreign key constraint "fktable_fk_fkey" -DETAIL: Key (fk)=(1000) is not present in table "pktable". -COMMIT; -DROP TABLE fktable, pktable; --- tricky behavior: according to SQL99, if a deferred constraint is set --- to 'immediate' mode, it should be checked for validity *immediately*, --- not when the current transaction commits (i.e. the mode change applies --- retroactively) -CREATE TABLE pktable ( - id INT4 PRIMARY KEY, - other INT4 -); -CREATE TABLE fktable ( - id INT4 PRIMARY KEY, - fk INT4 REFERENCES pktable DEFERRABLE -); -BEGIN; -SET CONSTRAINTS ALL DEFERRED; --- should succeed, for now -INSERT INTO fktable VALUES (1000, 2000); --- should cause transaction abort, due to preceding error -SET CONSTRAINTS ALL IMMEDIATE; -ERROR: insert or update on table "fktable" violates foreign key constraint "fktable_fk_fkey" -DETAIL: Key (fk)=(2000) is not present in table "pktable". -INSERT INTO pktable VALUES (2000, 3); -- too late -ERROR: current transaction is aborted, commands ignored until end of transaction block -COMMIT; -DROP TABLE fktable, pktable; --- deferrable, initially deferred -CREATE TABLE pktable ( - id INT4 PRIMARY KEY, - other INT4 -); -CREATE TABLE fktable ( - id INT4 PRIMARY KEY, - fk INT4 REFERENCES pktable DEFERRABLE INITIALLY DEFERRED -); -BEGIN; --- no error here -INSERT INTO fktable VALUES (100, 200); --- error here on commit -COMMIT; -ERROR: insert or update on table "fktable" violates foreign key constraint "fktable_fk_fkey" -DETAIL: Key (fk)=(200) is not present in table "pktable". -DROP TABLE pktable, fktable; --- test notice about expensive referential integrity checks, --- where the index cannot be used because of type incompatibilities. -CREATE TEMP TABLE pktable ( - id1 INT4 PRIMARY KEY, - id2 VARCHAR(4) UNIQUE, - id3 REAL UNIQUE, - UNIQUE(id1, id2, id3) -); -CREATE TEMP TABLE fktable ( - x1 INT4 REFERENCES pktable(id1), - x2 VARCHAR(4) REFERENCES pktable(id2), - x3 REAL REFERENCES pktable(id3), - x4 TEXT, - x5 INT2 -); --- check individual constraints with alter table. --- should fail --- varchar does not promote to real -ALTER TABLE fktable ADD CONSTRAINT fk_2_3 -FOREIGN KEY (x2) REFERENCES pktable(id3); -ERROR: foreign key constraint "fk_2_3" cannot be implemented -DETAIL: Key columns "x2" and "id3" are of incompatible types: character varying and real. --- nor to int4 -ALTER TABLE fktable ADD CONSTRAINT fk_2_1 -FOREIGN KEY (x2) REFERENCES pktable(id1); -ERROR: foreign key constraint "fk_2_1" cannot be implemented -DETAIL: Key columns "x2" and "id1" are of incompatible types: character varying and integer. --- real does not promote to int4 -ALTER TABLE fktable ADD CONSTRAINT fk_3_1 -FOREIGN KEY (x3) REFERENCES pktable(id1); -ERROR: foreign key constraint "fk_3_1" cannot be implemented -DETAIL: Key columns "x3" and "id1" are of incompatible types: real and integer. --- int4 does not promote to text -ALTER TABLE fktable ADD CONSTRAINT fk_1_2 -FOREIGN KEY (x1) REFERENCES pktable(id2); -ERROR: foreign key constraint "fk_1_2" cannot be implemented -DETAIL: Key columns "x1" and "id2" are of incompatible types: integer and character varying. --- should succeed --- int4 promotes to real -ALTER TABLE fktable ADD CONSTRAINT fk_1_3 -FOREIGN KEY (x1) REFERENCES pktable(id3); --- text is compatible with varchar -ALTER TABLE fktable ADD CONSTRAINT fk_4_2 -FOREIGN KEY (x4) REFERENCES pktable(id2); --- int2 is part of integer opfamily as of 8.0 -ALTER TABLE fktable ADD CONSTRAINT fk_5_1 -FOREIGN KEY (x5) REFERENCES pktable(id1); --- check multikey cases, especially out-of-order column lists --- these should work -ALTER TABLE fktable ADD CONSTRAINT fk_123_123 -FOREIGN KEY (x1,x2,x3) REFERENCES pktable(id1,id2,id3); -ALTER TABLE fktable ADD CONSTRAINT fk_213_213 -FOREIGN KEY (x2,x1,x3) REFERENCES pktable(id2,id1,id3); -ALTER TABLE fktable ADD CONSTRAINT fk_253_213 -FOREIGN KEY (x2,x5,x3) REFERENCES pktable(id2,id1,id3); --- these should fail -ALTER TABLE fktable ADD CONSTRAINT fk_123_231 -FOREIGN KEY (x1,x2,x3) REFERENCES pktable(id2,id3,id1); -ERROR: foreign key constraint "fk_123_231" cannot be implemented -DETAIL: Key columns "x1" and "id2" are of incompatible types: integer and character varying. -ALTER TABLE fktable ADD CONSTRAINT fk_241_132 -FOREIGN KEY (x2,x4,x1) REFERENCES pktable(id1,id3,id2); -ERROR: foreign key constraint "fk_241_132" cannot be implemented -DETAIL: Key columns "x2" and "id1" are of incompatible types: character varying and integer. -DROP TABLE pktable, fktable; --- test a tricky case: we can elide firing the FK check trigger during --- an UPDATE if the UPDATE did not change the foreign key --- field. However, we can't do this if our transaction was the one that --- created the updated row and the trigger is deferred, since our UPDATE --- will have invalidated the original newly-inserted tuple, and therefore --- cause the on-INSERT RI trigger not to be fired. -CREATE TEMP TABLE pktable ( - id int primary key, - other int -); -CREATE TEMP TABLE fktable ( - id int primary key, - fk int references pktable deferrable initially deferred -); -INSERT INTO pktable VALUES (5, 10); -BEGIN; --- doesn't match PK, but no error yet -INSERT INTO fktable VALUES (0, 20); --- don't change FK -UPDATE fktable SET id = id + 1; --- should catch error from initial INSERT -COMMIT; -ERROR: insert or update on table "fktable" violates foreign key constraint "fktable_fk_fkey" -DETAIL: Key (fk)=(20) is not present in table "pktable". --- check same case when insert is in a different subtransaction than update -BEGIN; --- doesn't match PK, but no error yet -INSERT INTO fktable VALUES (0, 20); --- UPDATE will be in a subxact -SAVEPOINT savept1; --- don't change FK -UPDATE fktable SET id = id + 1; --- should catch error from initial INSERT -COMMIT; -ERROR: insert or update on table "fktable" violates foreign key constraint "fktable_fk_fkey" -DETAIL: Key (fk)=(20) is not present in table "pktable". -BEGIN; --- INSERT will be in a subxact -SAVEPOINT savept1; --- doesn't match PK, but no error yet -INSERT INTO fktable VALUES (0, 20); -RELEASE SAVEPOINT savept1; --- don't change FK -UPDATE fktable SET id = id + 1; --- should catch error from initial INSERT -COMMIT; -ERROR: insert or update on table "fktable" violates foreign key constraint "fktable_fk_fkey" -DETAIL: Key (fk)=(20) is not present in table "pktable". -BEGIN; --- doesn't match PK, but no error yet -INSERT INTO fktable VALUES (0, 20); --- UPDATE will be in a subxact -SAVEPOINT savept1; --- don't change FK -UPDATE fktable SET id = id + 1; --- Roll back the UPDATE -ROLLBACK TO savept1; --- should catch error from initial INSERT -COMMIT; -ERROR: insert or update on table "fktable" violates foreign key constraint "fktable_fk_fkey" -DETAIL: Key (fk)=(20) is not present in table "pktable". --- --- check ALTER CONSTRAINT --- -INSERT INTO fktable VALUES (1, 5); -ALTER TABLE fktable ALTER CONSTRAINT fktable_fk_fkey DEFERRABLE INITIALLY IMMEDIATE; -BEGIN; --- doesn't match FK, should throw error now -UPDATE pktable SET id = 10 WHERE id = 5; -ERROR: update or delete on table "pktable" violates foreign key constraint "fktable_fk_fkey" on table "fktable" -DETAIL: Key (id)=(5) is still referenced from table "fktable". -COMMIT; -BEGIN; --- doesn't match PK, should throw error now -INSERT INTO fktable VALUES (0, 20); -ERROR: insert or update on table "fktable" violates foreign key constraint "fktable_fk_fkey" -DETAIL: Key (fk)=(20) is not present in table "pktable". -COMMIT; --- try additional syntax -ALTER TABLE fktable ALTER CONSTRAINT fktable_fk_fkey NOT DEFERRABLE; --- illegal option -ALTER TABLE fktable ALTER CONSTRAINT fktable_fk_fkey NOT DEFERRABLE INITIALLY DEFERRED; -ERROR: constraint declared INITIALLY DEFERRED must be DEFERRABLE -LINE 1: ...e ALTER CONSTRAINT fktable_fk_fkey NOT DEFERRABLE INITIALLY ... - ^ --- test order of firing of FK triggers when several RI-induced changes need to --- be made to the same row. This was broken by subtransaction-related --- changes in 8.0. -CREATE TEMP TABLE users ( - id INT PRIMARY KEY, - name VARCHAR NOT NULL -); -INSERT INTO users VALUES (1, 'Jozko'); -INSERT INTO users VALUES (2, 'Ferko'); -INSERT INTO users VALUES (3, 'Samko'); -CREATE TEMP TABLE tasks ( - id INT PRIMARY KEY, - owner INT REFERENCES users ON UPDATE CASCADE ON DELETE SET NULL, - worker INT REFERENCES users ON UPDATE CASCADE ON DELETE SET NULL, - checked_by INT REFERENCES users ON UPDATE CASCADE ON DELETE SET NULL -); -INSERT INTO tasks VALUES (1,1,NULL,NULL); -INSERT INTO tasks VALUES (2,2,2,NULL); -INSERT INTO tasks VALUES (3,3,3,3); -SELECT * FROM tasks; - id | owner | worker | checked_by -----+-------+--------+------------ - 1 | 1 | | - 2 | 2 | 2 | - 3 | 3 | 3 | 3 -(3 rows) - -UPDATE users SET id = 4 WHERE id = 3; -SELECT * FROM tasks; - id | owner | worker | checked_by -----+-------+--------+------------ - 1 | 1 | | - 2 | 2 | 2 | - 3 | 4 | 4 | 4 -(3 rows) - -DELETE FROM users WHERE id = 4; -SELECT * FROM tasks; - id | owner | worker | checked_by -----+-------+--------+------------ - 1 | 1 | | - 2 | 2 | 2 | - 3 | | | -(3 rows) - --- could fail with only 2 changes to make, if row was already updated -BEGIN; -UPDATE tasks set id=id WHERE id=2; -SELECT * FROM tasks; - id | owner | worker | checked_by -----+-------+--------+------------ - 1 | 1 | | - 3 | | | - 2 | 2 | 2 | -(3 rows) - -DELETE FROM users WHERE id = 2; -SELECT * FROM tasks; - id | owner | worker | checked_by -----+-------+--------+------------ - 1 | 1 | | - 3 | | | - 2 | | | -(3 rows) - -COMMIT; --- --- Test self-referential FK with CASCADE (bug #6268) --- -create temp table selfref ( - a int primary key, - b int, - foreign key (b) references selfref (a) - on update cascade on delete cascade -); -insert into selfref (a, b) -values - (0, 0), - (1, 1); -begin; - update selfref set a = 123 where a = 0; - select a, b from selfref; - a | b ------+----- - 1 | 1 - 123 | 123 -(2 rows) - - update selfref set a = 456 where a = 123; - select a, b from selfref; - a | b ------+----- - 1 | 1 - 456 | 456 -(2 rows) - -commit; --- --- Test that SET DEFAULT actions recognize updates to default values --- -create temp table defp (f1 int primary key); -create temp table defc (f1 int default 0 - references defp on delete set default); -insert into defp values (0), (1), (2); -insert into defc values (2); -select * from defc; - f1 ----- - 2 -(1 row) - -delete from defp where f1 = 2; -select * from defc; - f1 ----- - 0 -(1 row) - -delete from defp where f1 = 0; -- fail -ERROR: update or delete on table "defp" violates foreign key constraint "defc_f1_fkey" on table "defc" -DETAIL: Key (f1)=(0) is still referenced from table "defc". -alter table defc alter column f1 set default 1; -delete from defp where f1 = 0; -select * from defc; - f1 ----- - 1 -(1 row) - -delete from defp where f1 = 1; -- fail -ERROR: update or delete on table "defp" violates foreign key constraint "defc_f1_fkey" on table "defc" -DETAIL: Key (f1)=(1) is still referenced from table "defc". --- --- Test the difference between NO ACTION and RESTRICT --- -create temp table pp (f1 int primary key); -create temp table cc (f1 int references pp on update no action on delete no action); -insert into pp values(12); -insert into pp values(11); -update pp set f1=f1+1; -insert into cc values(13); -update pp set f1=f1+1; -update pp set f1=f1+1; -- fail -ERROR: update or delete on table "pp" violates foreign key constraint "cc_f1_fkey" on table "cc" -DETAIL: Key (f1)=(13) is still referenced from table "cc". -delete from pp where f1 = 13; -- fail -ERROR: update or delete on table "pp" violates foreign key constraint "cc_f1_fkey" on table "cc" -DETAIL: Key (f1)=(13) is still referenced from table "cc". -drop table pp, cc; -create temp table pp (f1 int primary key); -create temp table cc (f1 int references pp on update restrict on delete restrict); -insert into pp values(12); -insert into pp values(11); -update pp set f1=f1+1; -insert into cc values(13); -update pp set f1=f1+1; -- fail -ERROR: update or delete on table "pp" violates foreign key constraint "cc_f1_fkey" on table "cc" -DETAIL: Key (f1)=(13) is still referenced from table "cc". -delete from pp where f1 = 13; -- fail -ERROR: update or delete on table "pp" violates foreign key constraint "cc_f1_fkey" on table "cc" -DETAIL: Key (f1)=(13) is still referenced from table "cc". -drop table pp, cc; --- --- Test interaction of foreign-key optimization with rules (bug #14219) --- -create temp table t1 (a integer primary key, b text); -create temp table t2 (a integer primary key, b integer references t1); -create rule r1 as on delete to t1 do delete from t2 where t2.b = old.a; -explain (costs off) delete from t1 where a = 1; - QUERY PLAN --------------------------------------------- - Delete on t2 - -> Nested Loop - -> Index Scan using t1_pkey on t1 - Index Cond: (a = 1) - -> Seq Scan on t2 - Filter: (b = 1) - - Delete on t1 - -> Index Scan using t1_pkey on t1 - Index Cond: (a = 1) -(10 rows) - -delete from t1 where a = 1; --- Test a primary key with attributes located in later attnum positions --- compared to the fk attributes. -create table pktable2 (a int, b int, c int, d int, e int, primary key (d, e)); -create table fktable2 (d int, e int, foreign key (d, e) references pktable2); -insert into pktable2 values (1, 2, 3, 4, 5); -insert into fktable2 values (4, 5); -delete from pktable2; -ERROR: update or delete on table "pktable2" violates foreign key constraint "fktable2_d_e_fkey" on table "fktable2" -DETAIL: Key (d, e)=(4, 5) is still referenced from table "fktable2". -update pktable2 set d = 5; -ERROR: update or delete on table "pktable2" violates foreign key constraint "fktable2_d_e_fkey" on table "fktable2" -DETAIL: Key (d, e)=(4, 5) is still referenced from table "fktable2". -drop table pktable2, fktable2; --- Test truncation of long foreign key names -create table pktable1 (a int primary key); -create table pktable2 (a int, b int, primary key (a, b)); -create table fktable2 ( - a int, - b int, - very_very_long_column_name_to_exceed_63_characters int, - foreign key (very_very_long_column_name_to_exceed_63_characters) references pktable1, - foreign key (a, very_very_long_column_name_to_exceed_63_characters) references pktable2, - foreign key (a, very_very_long_column_name_to_exceed_63_characters) references pktable2 -); -select conname from pg_constraint where conrelid = 'fktable2'::regclass order by conname; - conname ------------------------------------------------------------------ - fktable2_a_very_very_long_column_name_to_exceed_63_charac_fkey1 - fktable2_a_very_very_long_column_name_to_exceed_63_charact_fkey - fktable2_very_very_long_column_name_to_exceed_63_character_fkey -(3 rows) - -drop table pktable1, pktable2, fktable2; --- --- Test deferred FK check on a tuple deleted by a rolled-back subtransaction --- -create table pktable2(f1 int primary key); -create table fktable2(f1 int references pktable2 deferrable initially deferred); -insert into pktable2 values(1); -begin; -insert into fktable2 values(1); -savepoint x; -delete from fktable2; -rollback to x; -commit; -begin; -insert into fktable2 values(2); -savepoint x; -delete from fktable2; -rollback to x; -commit; -- fail -ERROR: insert or update on table "fktable2" violates foreign key constraint "fktable2_f1_fkey" -DETAIL: Key (f1)=(2) is not present in table "pktable2". --- --- Test that we prevent dropping FK constraint with pending trigger events --- -begin; -insert into fktable2 values(2); -alter table fktable2 drop constraint fktable2_f1_fkey; -ERROR: cannot ALTER TABLE "fktable2" because it has pending trigger events -commit; -begin; -delete from pktable2 where f1 = 1; -alter table fktable2 drop constraint fktable2_f1_fkey; -ERROR: cannot ALTER TABLE "pktable2" because it has pending trigger events -commit; -drop table pktable2, fktable2; --- --- Test keys that "look" different but compare as equal --- -create table pktable2 (a float8, b float8, primary key (a, b)); -create table fktable2 (x float8, y float8, foreign key (x, y) references pktable2 (a, b) on update cascade); -insert into pktable2 values ('-0', '-0'); -insert into fktable2 values ('-0', '-0'); -select * from pktable2; - a | b -----+---- - -0 | -0 -(1 row) - -select * from fktable2; - x | y -----+---- - -0 | -0 -(1 row) - -update pktable2 set a = '0' where a = '-0'; -select * from pktable2; - a | b ----+---- - 0 | -0 -(1 row) - --- should have updated fktable2.x -select * from fktable2; - x | y ----+---- - 0 | -0 -(1 row) - -drop table pktable2, fktable2; --- --- Foreign keys and partitioned tables --- --- Creation of a partitioned hierarchy with irregular definitions -CREATE TABLE fk_notpartitioned_pk (fdrop1 int, a int, fdrop2 int, b int, - PRIMARY KEY (a, b)); -ALTER TABLE fk_notpartitioned_pk DROP COLUMN fdrop1, DROP COLUMN fdrop2; -CREATE TABLE fk_partitioned_fk (b int, fdrop1 int, a int) PARTITION BY RANGE (a, b); -ALTER TABLE fk_partitioned_fk DROP COLUMN fdrop1; -CREATE TABLE fk_partitioned_fk_1 (fdrop1 int, fdrop2 int, a int, fdrop3 int, b int); -ALTER TABLE fk_partitioned_fk_1 DROP COLUMN fdrop1, DROP COLUMN fdrop2, DROP COLUMN fdrop3; -ALTER TABLE fk_partitioned_fk ATTACH PARTITION fk_partitioned_fk_1 FOR VALUES FROM (0,0) TO (1000,1000); -ALTER TABLE fk_partitioned_fk ADD FOREIGN KEY (a, b) REFERENCES fk_notpartitioned_pk; -CREATE TABLE fk_partitioned_fk_2 (b int, fdrop1 int, fdrop2 int, a int); -ALTER TABLE fk_partitioned_fk_2 DROP COLUMN fdrop1, DROP COLUMN fdrop2; -ALTER TABLE fk_partitioned_fk ATTACH PARTITION fk_partitioned_fk_2 FOR VALUES FROM (1000,1000) TO (2000,2000); -CREATE TABLE fk_partitioned_fk_3 (fdrop1 int, fdrop2 int, fdrop3 int, fdrop4 int, b int, a int) - PARTITION BY HASH (a); -ALTER TABLE fk_partitioned_fk_3 DROP COLUMN fdrop1, DROP COLUMN fdrop2, - DROP COLUMN fdrop3, DROP COLUMN fdrop4; -CREATE TABLE fk_partitioned_fk_3_0 PARTITION OF fk_partitioned_fk_3 FOR VALUES WITH (MODULUS 5, REMAINDER 0); -CREATE TABLE fk_partitioned_fk_3_1 PARTITION OF fk_partitioned_fk_3 FOR VALUES WITH (MODULUS 5, REMAINDER 1); -ALTER TABLE fk_partitioned_fk ATTACH PARTITION fk_partitioned_fk_3 - FOR VALUES FROM (2000,2000) TO (3000,3000); --- Creating a foreign key with ONLY on a partitioned table referencing --- a non-partitioned table fails. -ALTER TABLE ONLY fk_partitioned_fk ADD FOREIGN KEY (a, b) - REFERENCES fk_notpartitioned_pk; -ERROR: cannot use ONLY for foreign key on partitioned table "fk_partitioned_fk" referencing relation "fk_notpartitioned_pk" --- Adding a NOT VALID foreign key on a partitioned table referencing --- a non-partitioned table fails. -ALTER TABLE fk_partitioned_fk ADD FOREIGN KEY (a, b) - REFERENCES fk_notpartitioned_pk NOT VALID; -ERROR: cannot add NOT VALID foreign key on partitioned table "fk_partitioned_fk" referencing relation "fk_notpartitioned_pk" -DETAIL: This feature is not yet supported on partitioned tables. --- these inserts, targeting both the partition directly as well as the --- partitioned table, should all fail -INSERT INTO fk_partitioned_fk (a,b) VALUES (500, 501); -ERROR: insert or update on table "fk_partitioned_fk_1" violates foreign key constraint "fk_partitioned_fk_a_b_fkey" -DETAIL: Key (a, b)=(500, 501) is not present in table "fk_notpartitioned_pk". -INSERT INTO fk_partitioned_fk_1 (a,b) VALUES (500, 501); -ERROR: insert or update on table "fk_partitioned_fk_1" violates foreign key constraint "fk_partitioned_fk_a_b_fkey" -DETAIL: Key (a, b)=(500, 501) is not present in table "fk_notpartitioned_pk". -INSERT INTO fk_partitioned_fk (a,b) VALUES (1500, 1501); -ERROR: insert or update on table "fk_partitioned_fk_2" violates foreign key constraint "fk_partitioned_fk_a_b_fkey" -DETAIL: Key (a, b)=(1500, 1501) is not present in table "fk_notpartitioned_pk". -INSERT INTO fk_partitioned_fk_2 (a,b) VALUES (1500, 1501); -ERROR: insert or update on table "fk_partitioned_fk_2" violates foreign key constraint "fk_partitioned_fk_a_b_fkey" -DETAIL: Key (a, b)=(1500, 1501) is not present in table "fk_notpartitioned_pk". -INSERT INTO fk_partitioned_fk (a,b) VALUES (2500, 2502); -ERROR: insert or update on table "fk_partitioned_fk_3_1" violates foreign key constraint "fk_partitioned_fk_a_b_fkey" -DETAIL: Key (a, b)=(2500, 2502) is not present in table "fk_notpartitioned_pk". -INSERT INTO fk_partitioned_fk_3 (a,b) VALUES (2500, 2502); -ERROR: insert or update on table "fk_partitioned_fk_3_1" violates foreign key constraint "fk_partitioned_fk_a_b_fkey" -DETAIL: Key (a, b)=(2500, 2502) is not present in table "fk_notpartitioned_pk". -INSERT INTO fk_partitioned_fk (a,b) VALUES (2501, 2503); -ERROR: insert or update on table "fk_partitioned_fk_3_0" violates foreign key constraint "fk_partitioned_fk_a_b_fkey" -DETAIL: Key (a, b)=(2501, 2503) is not present in table "fk_notpartitioned_pk". -INSERT INTO fk_partitioned_fk_3 (a,b) VALUES (2501, 2503); -ERROR: insert or update on table "fk_partitioned_fk_3_0" violates foreign key constraint "fk_partitioned_fk_a_b_fkey" -DETAIL: Key (a, b)=(2501, 2503) is not present in table "fk_notpartitioned_pk". --- but if we insert the values that make them valid, then they work -INSERT INTO fk_notpartitioned_pk VALUES (500, 501), (1500, 1501), - (2500, 2502), (2501, 2503); -INSERT INTO fk_partitioned_fk (a,b) VALUES (500, 501); -INSERT INTO fk_partitioned_fk (a,b) VALUES (1500, 1501); -INSERT INTO fk_partitioned_fk (a,b) VALUES (2500, 2502); -INSERT INTO fk_partitioned_fk (a,b) VALUES (2501, 2503); --- this update fails because there is no referenced row -UPDATE fk_partitioned_fk SET a = a + 1 WHERE a = 2501; -ERROR: insert or update on table "fk_partitioned_fk_3_1" violates foreign key constraint "fk_partitioned_fk_a_b_fkey" -DETAIL: Key (a, b)=(2502, 2503) is not present in table "fk_notpartitioned_pk". --- but we can fix it thusly: -INSERT INTO fk_notpartitioned_pk (a,b) VALUES (2502, 2503); -UPDATE fk_partitioned_fk SET a = a + 1 WHERE a = 2501; --- these updates would leave lingering rows in the referencing table; disallow -UPDATE fk_notpartitioned_pk SET b = 502 WHERE a = 500; -ERROR: update or delete on table "fk_notpartitioned_pk" violates foreign key constraint "fk_partitioned_fk_a_b_fkey" on table "fk_partitioned_fk" -DETAIL: Key (a, b)=(500, 501) is still referenced from table "fk_partitioned_fk". -UPDATE fk_notpartitioned_pk SET b = 1502 WHERE a = 1500; -ERROR: update or delete on table "fk_notpartitioned_pk" violates foreign key constraint "fk_partitioned_fk_a_b_fkey" on table "fk_partitioned_fk" -DETAIL: Key (a, b)=(1500, 1501) is still referenced from table "fk_partitioned_fk". -UPDATE fk_notpartitioned_pk SET b = 2504 WHERE a = 2500; -ERROR: update or delete on table "fk_notpartitioned_pk" violates foreign key constraint "fk_partitioned_fk_a_b_fkey" on table "fk_partitioned_fk" -DETAIL: Key (a, b)=(2500, 2502) is still referenced from table "fk_partitioned_fk". --- check psql behavior -\d fk_notpartitioned_pk - Table "public.fk_notpartitioned_pk" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | not null | - b | integer | | not null | -Indexes: - "fk_notpartitioned_pk_pkey" PRIMARY KEY, btree (a, b) -Referenced by: - TABLE "fk_partitioned_fk" CONSTRAINT "fk_partitioned_fk_a_b_fkey" FOREIGN KEY (a, b) REFERENCES fk_notpartitioned_pk(a, b) - -ALTER TABLE fk_partitioned_fk DROP CONSTRAINT fk_partitioned_fk_a_b_fkey; --- done. -DROP TABLE fk_notpartitioned_pk, fk_partitioned_fk; --- Altering a type referenced by a foreign key needs to drop/recreate the FK. --- Ensure that works. -CREATE TABLE fk_notpartitioned_pk (a INT, PRIMARY KEY(a), CHECK (a > 0)); -CREATE TABLE fk_partitioned_fk (a INT REFERENCES fk_notpartitioned_pk(a) PRIMARY KEY) PARTITION BY RANGE(a); -CREATE TABLE fk_partitioned_fk_1 PARTITION OF fk_partitioned_fk FOR VALUES FROM (MINVALUE) TO (MAXVALUE); -INSERT INTO fk_notpartitioned_pk VALUES (1); -INSERT INTO fk_partitioned_fk VALUES (1); -ALTER TABLE fk_notpartitioned_pk ALTER COLUMN a TYPE bigint; -DELETE FROM fk_notpartitioned_pk WHERE a = 1; -ERROR: update or delete on table "fk_notpartitioned_pk" violates foreign key constraint "fk_partitioned_fk_a_fkey" on table "fk_partitioned_fk" -DETAIL: Key (a)=(1) is still referenced from table "fk_partitioned_fk". -DROP TABLE fk_notpartitioned_pk, fk_partitioned_fk; --- Test some other exotic foreign key features: MATCH SIMPLE, ON UPDATE/DELETE --- actions -CREATE TABLE fk_notpartitioned_pk (a int, b int, primary key (a, b)); -CREATE TABLE fk_partitioned_fk (a int default 2501, b int default 142857) PARTITION BY LIST (a); -CREATE TABLE fk_partitioned_fk_1 PARTITION OF fk_partitioned_fk FOR VALUES IN (NULL,500,501,502); -ALTER TABLE fk_partitioned_fk ADD FOREIGN KEY (a, b) - REFERENCES fk_notpartitioned_pk MATCH SIMPLE - ON DELETE SET NULL ON UPDATE SET NULL; -CREATE TABLE fk_partitioned_fk_2 PARTITION OF fk_partitioned_fk FOR VALUES IN (1500,1502); -CREATE TABLE fk_partitioned_fk_3 (a int, b int); -ALTER TABLE fk_partitioned_fk ATTACH PARTITION fk_partitioned_fk_3 FOR VALUES IN (2500,2501,2502,2503); --- this insert fails -INSERT INTO fk_partitioned_fk (a, b) VALUES (2502, 2503); -ERROR: insert or update on table "fk_partitioned_fk_3" violates foreign key constraint "fk_partitioned_fk_a_b_fkey" -DETAIL: Key (a, b)=(2502, 2503) is not present in table "fk_notpartitioned_pk". -INSERT INTO fk_partitioned_fk_3 (a, b) VALUES (2502, 2503); -ERROR: insert or update on table "fk_partitioned_fk_3" violates foreign key constraint "fk_partitioned_fk_a_b_fkey" -DETAIL: Key (a, b)=(2502, 2503) is not present in table "fk_notpartitioned_pk". --- but since the FK is MATCH SIMPLE, this one doesn't -INSERT INTO fk_partitioned_fk_3 (a, b) VALUES (2502, NULL); --- now create the referenced row ... -INSERT INTO fk_notpartitioned_pk VALUES (2502, 2503); ---- and now the same insert work -INSERT INTO fk_partitioned_fk_3 (a, b) VALUES (2502, 2503); --- this always works -INSERT INTO fk_partitioned_fk (a,b) VALUES (NULL, NULL); --- MATCH FULL -INSERT INTO fk_notpartitioned_pk VALUES (1, 2); -CREATE TABLE fk_partitioned_fk_full (x int, y int) PARTITION BY RANGE (x); -CREATE TABLE fk_partitioned_fk_full_1 PARTITION OF fk_partitioned_fk_full DEFAULT; -INSERT INTO fk_partitioned_fk_full VALUES (1, NULL); -ALTER TABLE fk_partitioned_fk_full ADD FOREIGN KEY (x, y) REFERENCES fk_notpartitioned_pk MATCH FULL; -- fails -ERROR: insert or update on table "fk_partitioned_fk_full_1" violates foreign key constraint "fk_partitioned_fk_full_x_y_fkey" -DETAIL: MATCH FULL does not allow mixing of null and nonnull key values. -TRUNCATE fk_partitioned_fk_full; -ALTER TABLE fk_partitioned_fk_full ADD FOREIGN KEY (x, y) REFERENCES fk_notpartitioned_pk MATCH FULL; -INSERT INTO fk_partitioned_fk_full VALUES (1, NULL); -- fails -ERROR: insert or update on table "fk_partitioned_fk_full_1" violates foreign key constraint "fk_partitioned_fk_full_x_y_fkey" -DETAIL: MATCH FULL does not allow mixing of null and nonnull key values. -DROP TABLE fk_partitioned_fk_full; --- ON UPDATE SET NULL -SELECT tableoid::regclass, a, b FROM fk_partitioned_fk WHERE b IS NULL ORDER BY a; - tableoid | a | b ----------------------+------+--- - fk_partitioned_fk_3 | 2502 | - fk_partitioned_fk_1 | | -(2 rows) - -UPDATE fk_notpartitioned_pk SET a = a + 1 WHERE a = 2502; -SELECT tableoid::regclass, a, b FROM fk_partitioned_fk WHERE b IS NULL ORDER BY a; - tableoid | a | b ----------------------+------+--- - fk_partitioned_fk_3 | 2502 | - fk_partitioned_fk_1 | | - fk_partitioned_fk_1 | | -(3 rows) - --- ON DELETE SET NULL -INSERT INTO fk_partitioned_fk VALUES (2503, 2503); -SELECT count(*) FROM fk_partitioned_fk WHERE a IS NULL; - count -------- - 2 -(1 row) - -DELETE FROM fk_notpartitioned_pk; -SELECT count(*) FROM fk_partitioned_fk WHERE a IS NULL; - count -------- - 3 -(1 row) - --- ON UPDATE/DELETE SET DEFAULT -ALTER TABLE fk_partitioned_fk DROP CONSTRAINT fk_partitioned_fk_a_b_fkey; -ALTER TABLE fk_partitioned_fk ADD FOREIGN KEY (a, b) - REFERENCES fk_notpartitioned_pk - ON DELETE SET DEFAULT ON UPDATE SET DEFAULT; -INSERT INTO fk_notpartitioned_pk VALUES (2502, 2503); -INSERT INTO fk_partitioned_fk_3 (a, b) VALUES (2502, 2503); --- this fails, because the defaults for the referencing table are not present --- in the referenced table: -UPDATE fk_notpartitioned_pk SET a = 1500 WHERE a = 2502; -ERROR: insert or update on table "fk_partitioned_fk_3" violates foreign key constraint "fk_partitioned_fk_a_b_fkey" -DETAIL: Key (a, b)=(2501, 142857) is not present in table "fk_notpartitioned_pk". --- but inserting the row we can make it work: -INSERT INTO fk_notpartitioned_pk VALUES (2501, 142857); -UPDATE fk_notpartitioned_pk SET a = 1500 WHERE a = 2502; -SELECT * FROM fk_partitioned_fk WHERE b = 142857; - a | b -------+-------- - 2501 | 142857 -(1 row) - --- ON UPDATE/DELETE CASCADE -ALTER TABLE fk_partitioned_fk DROP CONSTRAINT fk_partitioned_fk_a_b_fkey; -ALTER TABLE fk_partitioned_fk ADD FOREIGN KEY (a, b) - REFERENCES fk_notpartitioned_pk - ON DELETE CASCADE ON UPDATE CASCADE; -UPDATE fk_notpartitioned_pk SET a = 2502 WHERE a = 2501; -SELECT * FROM fk_partitioned_fk WHERE b = 142857; - a | b -------+-------- - 2502 | 142857 -(1 row) - --- Now you see it ... -SELECT * FROM fk_partitioned_fk WHERE b = 142857; - a | b -------+-------- - 2502 | 142857 -(1 row) - -DELETE FROM fk_notpartitioned_pk WHERE b = 142857; --- now you don't. -SELECT * FROM fk_partitioned_fk WHERE a = 142857; - a | b ----+--- -(0 rows) - --- verify that DROP works -DROP TABLE fk_partitioned_fk_2; --- Test behavior of the constraint together with attaching and detaching --- partitions. -CREATE TABLE fk_partitioned_fk_2 PARTITION OF fk_partitioned_fk FOR VALUES IN (1500,1502); -ALTER TABLE fk_partitioned_fk DETACH PARTITION fk_partitioned_fk_2; -BEGIN; -DROP TABLE fk_partitioned_fk; --- constraint should still be there -\d fk_partitioned_fk_2; - Table "public.fk_partitioned_fk_2" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | 2501 - b | integer | | | 142857 -Foreign-key constraints: - "fk_partitioned_fk_a_b_fkey" FOREIGN KEY (a, b) REFERENCES fk_notpartitioned_pk(a, b) ON UPDATE CASCADE ON DELETE CASCADE - -ROLLBACK; -ALTER TABLE fk_partitioned_fk ATTACH PARTITION fk_partitioned_fk_2 FOR VALUES IN (1500,1502); -DROP TABLE fk_partitioned_fk_2; -CREATE TABLE fk_partitioned_fk_2 (b int, c text, a int, - FOREIGN KEY (a, b) REFERENCES fk_notpartitioned_pk ON UPDATE CASCADE ON DELETE CASCADE); -ALTER TABLE fk_partitioned_fk_2 DROP COLUMN c; -ALTER TABLE fk_partitioned_fk ATTACH PARTITION fk_partitioned_fk_2 FOR VALUES IN (1500,1502); --- should have only one constraint -\d fk_partitioned_fk_2 - Table "public.fk_partitioned_fk_2" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - b | integer | | | - a | integer | | | -Partition of: fk_partitioned_fk FOR VALUES IN (1500, 1502) -Foreign-key constraints: - TABLE "fk_partitioned_fk" CONSTRAINT "fk_partitioned_fk_a_b_fkey" FOREIGN KEY (a, b) REFERENCES fk_notpartitioned_pk(a, b) ON UPDATE CASCADE ON DELETE CASCADE - -DROP TABLE fk_partitioned_fk_2; -CREATE TABLE fk_partitioned_fk_4 (a int, b int, FOREIGN KEY (a, b) REFERENCES fk_notpartitioned_pk(a, b) ON UPDATE CASCADE ON DELETE CASCADE) PARTITION BY RANGE (b, a); -CREATE TABLE fk_partitioned_fk_4_1 PARTITION OF fk_partitioned_fk_4 FOR VALUES FROM (1,1) TO (100,100); -CREATE TABLE fk_partitioned_fk_4_2 (a int, b int, FOREIGN KEY (a, b) REFERENCES fk_notpartitioned_pk(a, b) ON UPDATE SET NULL); -ALTER TABLE fk_partitioned_fk_4 ATTACH PARTITION fk_partitioned_fk_4_2 FOR VALUES FROM (100,100) TO (1000,1000); -ALTER TABLE fk_partitioned_fk ATTACH PARTITION fk_partitioned_fk_4 FOR VALUES IN (3500,3502); -ALTER TABLE fk_partitioned_fk DETACH PARTITION fk_partitioned_fk_4; -ALTER TABLE fk_partitioned_fk ATTACH PARTITION fk_partitioned_fk_4 FOR VALUES IN (3500,3502); --- should only have one constraint -\d fk_partitioned_fk_4 - Partitioned table "public.fk_partitioned_fk_4" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | - b | integer | | | -Partition of: fk_partitioned_fk FOR VALUES IN (3500, 3502) -Partition key: RANGE (b, a) -Foreign-key constraints: - TABLE "fk_partitioned_fk" CONSTRAINT "fk_partitioned_fk_a_b_fkey" FOREIGN KEY (a, b) REFERENCES fk_notpartitioned_pk(a, b) ON UPDATE CASCADE ON DELETE CASCADE -Number of partitions: 2 (Use \d+ to list them.) - -\d fk_partitioned_fk_4_1 - Table "public.fk_partitioned_fk_4_1" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | - b | integer | | | -Partition of: fk_partitioned_fk_4 FOR VALUES FROM (1, 1) TO (100, 100) -Foreign-key constraints: - TABLE "fk_partitioned_fk" CONSTRAINT "fk_partitioned_fk_a_b_fkey" FOREIGN KEY (a, b) REFERENCES fk_notpartitioned_pk(a, b) ON UPDATE CASCADE ON DELETE CASCADE - --- this one has an FK with mismatched properties -\d fk_partitioned_fk_4_2 - Table "public.fk_partitioned_fk_4_2" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | - b | integer | | | -Partition of: fk_partitioned_fk_4 FOR VALUES FROM (100, 100) TO (1000, 1000) -Foreign-key constraints: - "fk_partitioned_fk_4_2_a_b_fkey" FOREIGN KEY (a, b) REFERENCES fk_notpartitioned_pk(a, b) ON UPDATE SET NULL - TABLE "fk_partitioned_fk" CONSTRAINT "fk_partitioned_fk_a_b_fkey" FOREIGN KEY (a, b) REFERENCES fk_notpartitioned_pk(a, b) ON UPDATE CASCADE ON DELETE CASCADE - -CREATE TABLE fk_partitioned_fk_5 (a int, b int, - FOREIGN KEY (a, b) REFERENCES fk_notpartitioned_pk(a, b) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE, - FOREIGN KEY (a, b) REFERENCES fk_notpartitioned_pk(a, b) MATCH FULL ON UPDATE CASCADE ON DELETE CASCADE) - PARTITION BY RANGE (a); -CREATE TABLE fk_partitioned_fk_5_1 (a int, b int, FOREIGN KEY (a, b) REFERENCES fk_notpartitioned_pk); -ALTER TABLE fk_partitioned_fk ATTACH PARTITION fk_partitioned_fk_5 FOR VALUES IN (4500); -ALTER TABLE fk_partitioned_fk_5 ATTACH PARTITION fk_partitioned_fk_5_1 FOR VALUES FROM (0) TO (10); -ALTER TABLE fk_partitioned_fk DETACH PARTITION fk_partitioned_fk_5; -ALTER TABLE fk_partitioned_fk ATTACH PARTITION fk_partitioned_fk_5 FOR VALUES IN (4500); --- this one has two constraints, similar but not quite the one in the parent, --- so it gets a new one -\d fk_partitioned_fk_5 - Partitioned table "public.fk_partitioned_fk_5" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | - b | integer | | | -Partition of: fk_partitioned_fk FOR VALUES IN (4500) -Partition key: RANGE (a) -Foreign-key constraints: - "fk_partitioned_fk_5_a_b_fkey" FOREIGN KEY (a, b) REFERENCES fk_notpartitioned_pk(a, b) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE - "fk_partitioned_fk_5_a_b_fkey1" FOREIGN KEY (a, b) REFERENCES fk_notpartitioned_pk(a, b) MATCH FULL ON UPDATE CASCADE ON DELETE CASCADE - TABLE "fk_partitioned_fk" CONSTRAINT "fk_partitioned_fk_a_b_fkey" FOREIGN KEY (a, b) REFERENCES fk_notpartitioned_pk(a, b) ON UPDATE CASCADE ON DELETE CASCADE -Number of partitions: 1 (Use \d+ to list them.) - --- verify that it works to reattaching a child with multiple candidate --- constraints -ALTER TABLE fk_partitioned_fk_5 DETACH PARTITION fk_partitioned_fk_5_1; -ALTER TABLE fk_partitioned_fk_5 ATTACH PARTITION fk_partitioned_fk_5_1 FOR VALUES FROM (0) TO (10); -\d fk_partitioned_fk_5_1 - Table "public.fk_partitioned_fk_5_1" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | - b | integer | | | -Partition of: fk_partitioned_fk_5 FOR VALUES FROM (0) TO (10) -Foreign-key constraints: - "fk_partitioned_fk_5_1_a_b_fkey" FOREIGN KEY (a, b) REFERENCES fk_notpartitioned_pk(a, b) - TABLE "fk_partitioned_fk_5" CONSTRAINT "fk_partitioned_fk_5_a_b_fkey" FOREIGN KEY (a, b) REFERENCES fk_notpartitioned_pk(a, b) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE - TABLE "fk_partitioned_fk_5" CONSTRAINT "fk_partitioned_fk_5_a_b_fkey1" FOREIGN KEY (a, b) REFERENCES fk_notpartitioned_pk(a, b) MATCH FULL ON UPDATE CASCADE ON DELETE CASCADE - TABLE "fk_partitioned_fk" CONSTRAINT "fk_partitioned_fk_a_b_fkey" FOREIGN KEY (a, b) REFERENCES fk_notpartitioned_pk(a, b) ON UPDATE CASCADE ON DELETE CASCADE - --- verify that attaching a table checks that the existing data satisfies the --- constraint -CREATE TABLE fk_partitioned_fk_2 (a int, b int) PARTITION BY RANGE (b); -CREATE TABLE fk_partitioned_fk_2_1 PARTITION OF fk_partitioned_fk_2 FOR VALUES FROM (0) TO (1000); -CREATE TABLE fk_partitioned_fk_2_2 PARTITION OF fk_partitioned_fk_2 FOR VALUES FROM (1000) TO (2000); -INSERT INTO fk_partitioned_fk_2 VALUES (1600, 601), (1600, 1601); -ALTER TABLE fk_partitioned_fk ATTACH PARTITION fk_partitioned_fk_2 - FOR VALUES IN (1600); -ERROR: insert or update on table "fk_partitioned_fk_2_1" violates foreign key constraint "fk_partitioned_fk_a_b_fkey" -DETAIL: Key (a, b)=(1600, 601) is not present in table "fk_notpartitioned_pk". -INSERT INTO fk_notpartitioned_pk VALUES (1600, 601), (1600, 1601); -ALTER TABLE fk_partitioned_fk ATTACH PARTITION fk_partitioned_fk_2 - FOR VALUES IN (1600); --- leave these tables around intentionally --- test the case when the referenced table is owned by a different user -create role regress_other_partitioned_fk_owner; -grant references on fk_notpartitioned_pk to regress_other_partitioned_fk_owner; -set role regress_other_partitioned_fk_owner; -create table other_partitioned_fk(a int, b int) partition by list (a); -create table other_partitioned_fk_1 partition of other_partitioned_fk - for values in (2048); -insert into other_partitioned_fk - select 2048, x from generate_series(1,10) x; --- this should fail -alter table other_partitioned_fk add foreign key (a, b) - references fk_notpartitioned_pk(a, b); -ERROR: insert or update on table "other_partitioned_fk_1" violates foreign key constraint "other_partitioned_fk_a_b_fkey" -DETAIL: Key (a, b)=(2048, 1) is not present in table "fk_notpartitioned_pk". --- add the missing keys and retry -reset role; -insert into fk_notpartitioned_pk (a, b) - select 2048, x from generate_series(1,10) x; -set role regress_other_partitioned_fk_owner; -alter table other_partitioned_fk add foreign key (a, b) - references fk_notpartitioned_pk(a, b); --- clean up -drop table other_partitioned_fk; -reset role; -revoke all on fk_notpartitioned_pk from regress_other_partitioned_fk_owner; -drop role regress_other_partitioned_fk_owner; --- Test creating a constraint at the parent that already exists in partitions. --- There should be no duplicated constraints, and attempts to drop the --- constraint in partitions should raise appropriate errors. -create schema fkpart0 - create table pkey (a int primary key) - create table fk_part (a int) partition by list (a) - create table fk_part_1 partition of fk_part - (foreign key (a) references fkpart0.pkey) for values in (1) - create table fk_part_23 partition of fk_part - (foreign key (a) references fkpart0.pkey) for values in (2, 3) - partition by list (a) - create table fk_part_23_2 partition of fk_part_23 for values in (2); -alter table fkpart0.fk_part add foreign key (a) references fkpart0.pkey; -\d fkpart0.fk_part_1 \\ -- should have only one FK - Table "fkpart0.fk_part_1" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | -Partition of: fkpart0.fk_part FOR VALUES IN (1) -Foreign-key constraints: - TABLE "fkpart0.fk_part" CONSTRAINT "fk_part_a_fkey" FOREIGN KEY (a) REFERENCES fkpart0.pkey(a) - -alter table fkpart0.fk_part_1 drop constraint fk_part_1_a_fkey; -ERROR: cannot drop inherited constraint "fk_part_1_a_fkey" of relation "fk_part_1" -\d fkpart0.fk_part_23 \\ -- should have only one FK - Partitioned table "fkpart0.fk_part_23" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | -Partition of: fkpart0.fk_part FOR VALUES IN (2, 3) -Partition key: LIST (a) -Foreign-key constraints: - TABLE "fkpart0.fk_part" CONSTRAINT "fk_part_a_fkey" FOREIGN KEY (a) REFERENCES fkpart0.pkey(a) -Number of partitions: 1 (Use \d+ to list them.) - -\d fkpart0.fk_part_23_2 \\ -- should have only one FK - Table "fkpart0.fk_part_23_2" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | -Partition of: fkpart0.fk_part_23 FOR VALUES IN (2) -Foreign-key constraints: - TABLE "fkpart0.fk_part" CONSTRAINT "fk_part_a_fkey" FOREIGN KEY (a) REFERENCES fkpart0.pkey(a) - -alter table fkpart0.fk_part_23 drop constraint fk_part_23_a_fkey; -ERROR: cannot drop inherited constraint "fk_part_23_a_fkey" of relation "fk_part_23" -alter table fkpart0.fk_part_23_2 drop constraint fk_part_23_a_fkey; -ERROR: cannot drop inherited constraint "fk_part_23_a_fkey" of relation "fk_part_23_2" -create table fkpart0.fk_part_4 partition of fkpart0.fk_part for values in (4); -\d fkpart0.fk_part_4 - Table "fkpart0.fk_part_4" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | -Partition of: fkpart0.fk_part FOR VALUES IN (4) -Foreign-key constraints: - TABLE "fkpart0.fk_part" CONSTRAINT "fk_part_a_fkey" FOREIGN KEY (a) REFERENCES fkpart0.pkey(a) - -alter table fkpart0.fk_part_4 drop constraint fk_part_a_fkey; -ERROR: cannot drop inherited constraint "fk_part_a_fkey" of relation "fk_part_4" -create table fkpart0.fk_part_56 partition of fkpart0.fk_part - for values in (5,6) partition by list (a); -create table fkpart0.fk_part_56_5 partition of fkpart0.fk_part_56 - for values in (5); -\d fkpart0.fk_part_56 - Partitioned table "fkpart0.fk_part_56" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | -Partition of: fkpart0.fk_part FOR VALUES IN (5, 6) -Partition key: LIST (a) -Foreign-key constraints: - TABLE "fkpart0.fk_part" CONSTRAINT "fk_part_a_fkey" FOREIGN KEY (a) REFERENCES fkpart0.pkey(a) -Number of partitions: 1 (Use \d+ to list them.) - -alter table fkpart0.fk_part_56 drop constraint fk_part_a_fkey; -ERROR: cannot drop inherited constraint "fk_part_a_fkey" of relation "fk_part_56" -alter table fkpart0.fk_part_56_5 drop constraint fk_part_a_fkey; -ERROR: cannot drop inherited constraint "fk_part_a_fkey" of relation "fk_part_56_5" --- verify that attaching and detaching partitions maintains the right set of --- triggers -create schema fkpart1 - create table pkey (a int primary key) - create table fk_part (a int) partition by list (a) - create table fk_part_1 partition of fk_part for values in (1) partition by list (a) - create table fk_part_1_1 partition of fk_part_1 for values in (1); -alter table fkpart1.fk_part add foreign key (a) references fkpart1.pkey; -insert into fkpart1.fk_part values (1); -- should fail -ERROR: insert or update on table "fk_part_1_1" violates foreign key constraint "fk_part_a_fkey" -DETAIL: Key (a)=(1) is not present in table "pkey". -insert into fkpart1.pkey values (1); -insert into fkpart1.fk_part values (1); -delete from fkpart1.pkey where a = 1; -- should fail -ERROR: update or delete on table "pkey" violates foreign key constraint "fk_part_a_fkey" on table "fk_part" -DETAIL: Key (a)=(1) is still referenced from table "fk_part". -alter table fkpart1.fk_part detach partition fkpart1.fk_part_1; -create table fkpart1.fk_part_1_2 partition of fkpart1.fk_part_1 for values in (2); -insert into fkpart1.fk_part_1 values (2); -- should fail -ERROR: insert or update on table "fk_part_1_2" violates foreign key constraint "fk_part_a_fkey" -DETAIL: Key (a)=(2) is not present in table "pkey". -delete from fkpart1.pkey where a = 1; -ERROR: update or delete on table "pkey" violates foreign key constraint "fk_part_a_fkey" on table "fk_part_1" -DETAIL: Key (a)=(1) is still referenced from table "fk_part_1". --- verify that attaching and detaching partitions manipulates the inheritance --- properties of their FK constraints correctly -create schema fkpart2 - create table pkey (a int primary key) - create table fk_part (a int, constraint fkey foreign key (a) references fkpart2.pkey) partition by list (a) - create table fk_part_1 partition of fkpart2.fk_part for values in (1) partition by list (a) - create table fk_part_1_1 (a int, constraint my_fkey foreign key (a) references fkpart2.pkey); -alter table fkpart2.fk_part_1 attach partition fkpart2.fk_part_1_1 for values in (1); -alter table fkpart2.fk_part_1 drop constraint fkey; -- should fail -ERROR: cannot drop inherited constraint "fkey" of relation "fk_part_1" -alter table fkpart2.fk_part_1_1 drop constraint my_fkey; -- should fail -ERROR: cannot drop inherited constraint "my_fkey" of relation "fk_part_1_1" -alter table fkpart2.fk_part detach partition fkpart2.fk_part_1; -alter table fkpart2.fk_part_1 drop constraint fkey; -- ok -alter table fkpart2.fk_part_1_1 drop constraint my_fkey; -- doesn't exist -ERROR: constraint "my_fkey" of relation "fk_part_1_1" does not exist --- verify constraint deferrability -create schema fkpart3 - create table pkey (a int primary key) - create table fk_part (a int, constraint fkey foreign key (a) references fkpart3.pkey deferrable initially immediate) partition by list (a) - create table fk_part_1 partition of fkpart3.fk_part for values in (1) partition by list (a) - create table fk_part_1_1 partition of fkpart3.fk_part_1 for values in (1) - create table fk_part_2 partition of fkpart3.fk_part for values in (2); -begin; -set constraints fkpart3.fkey deferred; -insert into fkpart3.fk_part values (1); -insert into fkpart3.pkey values (1); -commit; -begin; -set constraints fkpart3.fkey deferred; -delete from fkpart3.pkey; -delete from fkpart3.fk_part; -commit; -drop schema fkpart0, fkpart1, fkpart2, fkpart3 cascade; -NOTICE: drop cascades to 10 other objects -DETAIL: drop cascades to table fkpart3.pkey -drop cascades to table fkpart3.fk_part -drop cascades to table fkpart2.pkey -drop cascades to table fkpart2.fk_part -drop cascades to table fkpart2.fk_part_1 -drop cascades to table fkpart1.pkey -drop cascades to table fkpart1.fk_part -drop cascades to table fkpart1.fk_part_1 -drop cascades to table fkpart0.pkey -drop cascades to table fkpart0.fk_part --- Test a partitioned table as referenced table. --- Verify basic functionality with a regular partition creation and a partition --- with a different column layout, as well as partitions added (created and --- attached) after creating the foreign key. -CREATE SCHEMA fkpart3; -SET search_path TO fkpart3; -CREATE TABLE pk (a int PRIMARY KEY) PARTITION BY RANGE (a); -CREATE TABLE pk1 PARTITION OF pk FOR VALUES FROM (0) TO (1000); -CREATE TABLE pk2 (b int, a int); -ALTER TABLE pk2 DROP COLUMN b; -ALTER TABLE pk2 ALTER a SET NOT NULL; -ALTER TABLE pk ATTACH PARTITION pk2 FOR VALUES FROM (1000) TO (2000); -CREATE TABLE fk (a int) PARTITION BY RANGE (a); -CREATE TABLE fk1 PARTITION OF fk FOR VALUES FROM (0) TO (750); -ALTER TABLE fk ADD FOREIGN KEY (a) REFERENCES pk; -CREATE TABLE fk2 (b int, a int) ; -ALTER TABLE fk2 DROP COLUMN b; -ALTER TABLE fk ATTACH PARTITION fk2 FOR VALUES FROM (750) TO (3500); -CREATE TABLE pk3 PARTITION OF pk FOR VALUES FROM (2000) TO (3000); -CREATE TABLE pk4 (LIKE pk); -ALTER TABLE pk ATTACH PARTITION pk4 FOR VALUES FROM (3000) TO (4000); -CREATE TABLE pk5 (c int, b int, a int NOT NULL) PARTITION BY RANGE (a); -ALTER TABLE pk5 DROP COLUMN b, DROP COLUMN c; -CREATE TABLE pk51 PARTITION OF pk5 FOR VALUES FROM (4000) TO (4500); -CREATE TABLE pk52 PARTITION OF pk5 FOR VALUES FROM (4500) TO (5000); -ALTER TABLE pk ATTACH PARTITION pk5 FOR VALUES FROM (4000) TO (5000); -CREATE TABLE fk3 PARTITION OF fk FOR VALUES FROM (3500) TO (5000); --- these should fail: referenced value not present -INSERT into fk VALUES (1); -ERROR: insert or update on table "fk1" violates foreign key constraint "fk_a_fkey" -DETAIL: Key (a)=(1) is not present in table "pk". -INSERT into fk VALUES (1000); -ERROR: insert or update on table "fk2" violates foreign key constraint "fk_a_fkey" -DETAIL: Key (a)=(1000) is not present in table "pk". -INSERT into fk VALUES (2000); -ERROR: insert or update on table "fk2" violates foreign key constraint "fk_a_fkey" -DETAIL: Key (a)=(2000) is not present in table "pk". -INSERT into fk VALUES (3000); -ERROR: insert or update on table "fk2" violates foreign key constraint "fk_a_fkey" -DETAIL: Key (a)=(3000) is not present in table "pk". -INSERT into fk VALUES (4000); -ERROR: insert or update on table "fk3" violates foreign key constraint "fk_a_fkey" -DETAIL: Key (a)=(4000) is not present in table "pk". -INSERT into fk VALUES (4500); -ERROR: insert or update on table "fk3" violates foreign key constraint "fk_a_fkey" -DETAIL: Key (a)=(4500) is not present in table "pk". --- insert into the referenced table, now they should work -INSERT into pk VALUES (1), (1000), (2000), (3000), (4000), (4500); -INSERT into fk VALUES (1), (1000), (2000), (3000), (4000), (4500); --- should fail: referencing value present -DELETE FROM pk WHERE a = 1; -ERROR: update or delete on table "pk1" violates foreign key constraint "fk_a_fkey1" on table "fk" -DETAIL: Key (a)=(1) is still referenced from table "fk". -DELETE FROM pk WHERE a = 1000; -ERROR: update or delete on table "pk2" violates foreign key constraint "fk_a_fkey2" on table "fk" -DETAIL: Key (a)=(1000) is still referenced from table "fk". -DELETE FROM pk WHERE a = 2000; -ERROR: update or delete on table "pk3" violates foreign key constraint "fk_a_fkey3" on table "fk" -DETAIL: Key (a)=(2000) is still referenced from table "fk". -DELETE FROM pk WHERE a = 3000; -ERROR: update or delete on table "pk4" violates foreign key constraint "fk_a_fkey4" on table "fk" -DETAIL: Key (a)=(3000) is still referenced from table "fk". -DELETE FROM pk WHERE a = 4000; -ERROR: update or delete on table "pk51" violates foreign key constraint "fk_a_fkey6" on table "fk" -DETAIL: Key (a)=(4000) is still referenced from table "fk". -DELETE FROM pk WHERE a = 4500; -ERROR: update or delete on table "pk52" violates foreign key constraint "fk_a_fkey7" on table "fk" -DETAIL: Key (a)=(4500) is still referenced from table "fk". -UPDATE pk SET a = 2 WHERE a = 1; -ERROR: update or delete on table "pk1" violates foreign key constraint "fk_a_fkey1" on table "fk" -DETAIL: Key (a)=(1) is still referenced from table "fk". -UPDATE pk SET a = 1002 WHERE a = 1000; -ERROR: update or delete on table "pk2" violates foreign key constraint "fk_a_fkey2" on table "fk" -DETAIL: Key (a)=(1000) is still referenced from table "fk". -UPDATE pk SET a = 2002 WHERE a = 2000; -ERROR: update or delete on table "pk3" violates foreign key constraint "fk_a_fkey3" on table "fk" -DETAIL: Key (a)=(2000) is still referenced from table "fk". -UPDATE pk SET a = 3002 WHERE a = 3000; -ERROR: update or delete on table "pk4" violates foreign key constraint "fk_a_fkey4" on table "fk" -DETAIL: Key (a)=(3000) is still referenced from table "fk". -UPDATE pk SET a = 4002 WHERE a = 4000; -ERROR: update or delete on table "pk51" violates foreign key constraint "fk_a_fkey6" on table "fk" -DETAIL: Key (a)=(4000) is still referenced from table "fk". -UPDATE pk SET a = 4502 WHERE a = 4500; -ERROR: update or delete on table "pk52" violates foreign key constraint "fk_a_fkey7" on table "fk" -DETAIL: Key (a)=(4500) is still referenced from table "fk". --- now they should work -DELETE FROM fk; -UPDATE pk SET a = 2 WHERE a = 1; -DELETE FROM pk WHERE a = 2; -UPDATE pk SET a = 1002 WHERE a = 1000; -DELETE FROM pk WHERE a = 1002; -UPDATE pk SET a = 2002 WHERE a = 2000; -DELETE FROM pk WHERE a = 2002; -UPDATE pk SET a = 3002 WHERE a = 3000; -DELETE FROM pk WHERE a = 3002; -UPDATE pk SET a = 4002 WHERE a = 4000; -DELETE FROM pk WHERE a = 4002; -UPDATE pk SET a = 4502 WHERE a = 4500; -DELETE FROM pk WHERE a = 4502; -CREATE SCHEMA fkpart4; -SET search_path TO fkpart4; --- dropping/detaching PARTITIONs is prevented if that would break --- a foreign key's existing data -CREATE TABLE droppk (a int PRIMARY KEY) PARTITION BY RANGE (a); -CREATE TABLE droppk1 PARTITION OF droppk FOR VALUES FROM (0) TO (1000); -CREATE TABLE droppk_d PARTITION OF droppk DEFAULT; -CREATE TABLE droppk2 PARTITION OF droppk FOR VALUES FROM (1000) TO (2000) - PARTITION BY RANGE (a); -CREATE TABLE droppk21 PARTITION OF droppk2 FOR VALUES FROM (1000) TO (1400); -CREATE TABLE droppk2_d PARTITION OF droppk2 DEFAULT; -INSERT into droppk VALUES (1), (1000), (1500), (2000); -CREATE TABLE dropfk (a int REFERENCES droppk); -INSERT into dropfk VALUES (1), (1000), (1500), (2000); --- these should all fail -ALTER TABLE droppk DETACH PARTITION droppk_d; -ERROR: removing partition "droppk_d" violates foreign key constraint "dropfk_a_fkey5" -DETAIL: Key (a)=(2000) is still referenced from table "dropfk". -ALTER TABLE droppk2 DETACH PARTITION droppk2_d; -ERROR: removing partition "droppk2_d" violates foreign key constraint "dropfk_a_fkey4" -DETAIL: Key (a)=(1500) is still referenced from table "dropfk". -ALTER TABLE droppk DETACH PARTITION droppk1; -ERROR: removing partition "droppk1" violates foreign key constraint "dropfk_a_fkey1" -DETAIL: Key (a)=(1) is still referenced from table "dropfk". -ALTER TABLE droppk DETACH PARTITION droppk2; -ERROR: removing partition "droppk2" violates foreign key constraint "dropfk_a_fkey2" -DETAIL: Key (a)=(1000) is still referenced from table "dropfk". -ALTER TABLE droppk2 DETACH PARTITION droppk21; -ERROR: removing partition "droppk21" violates foreign key constraint "dropfk_a_fkey3" -DETAIL: Key (a)=(1000) is still referenced from table "dropfk". --- dropping partitions is disallowed -DROP TABLE droppk_d; -ERROR: cannot drop table droppk_d because other objects depend on it -DETAIL: constraint dropfk_a_fkey on table dropfk depends on table droppk_d -HINT: Use DROP ... CASCADE to drop the dependent objects too. -DROP TABLE droppk2_d; -ERROR: cannot drop table droppk2_d because other objects depend on it -DETAIL: constraint dropfk_a_fkey on table dropfk depends on table droppk2_d -HINT: Use DROP ... CASCADE to drop the dependent objects too. -DROP TABLE droppk1; -ERROR: cannot drop table droppk1 because other objects depend on it -DETAIL: constraint dropfk_a_fkey on table dropfk depends on table droppk1 -HINT: Use DROP ... CASCADE to drop the dependent objects too. -DROP TABLE droppk2; -ERROR: cannot drop table droppk2 because other objects depend on it -DETAIL: constraint dropfk_a_fkey on table dropfk depends on table droppk2 -HINT: Use DROP ... CASCADE to drop the dependent objects too. -DROP TABLE droppk21; -ERROR: cannot drop table droppk21 because other objects depend on it -DETAIL: constraint dropfk_a_fkey on table dropfk depends on table droppk21 -HINT: Use DROP ... CASCADE to drop the dependent objects too. -DELETE FROM dropfk; --- dropping partitions is disallowed, even when no referencing values -DROP TABLE droppk_d; -ERROR: cannot drop table droppk_d because other objects depend on it -DETAIL: constraint dropfk_a_fkey on table dropfk depends on table droppk_d -HINT: Use DROP ... CASCADE to drop the dependent objects too. -DROP TABLE droppk2_d; -ERROR: cannot drop table droppk2_d because other objects depend on it -DETAIL: constraint dropfk_a_fkey on table dropfk depends on table droppk2_d -HINT: Use DROP ... CASCADE to drop the dependent objects too. -DROP TABLE droppk1; -ERROR: cannot drop table droppk1 because other objects depend on it -DETAIL: constraint dropfk_a_fkey on table dropfk depends on table droppk1 -HINT: Use DROP ... CASCADE to drop the dependent objects too. --- but DETACH is allowed, and DROP afterwards works -ALTER TABLE droppk2 DETACH PARTITION droppk21; -DROP TABLE droppk2; -ERROR: cannot drop table droppk2 because other objects depend on it -DETAIL: constraint dropfk_a_fkey on table dropfk depends on table droppk2 -HINT: Use DROP ... CASCADE to drop the dependent objects too. --- Verify that initial constraint creation and cloning behave correctly -CREATE SCHEMA fkpart5; -SET search_path TO fkpart5; -CREATE TABLE pk (a int PRIMARY KEY) PARTITION BY LIST (a); -CREATE TABLE pk1 PARTITION OF pk FOR VALUES IN (1) PARTITION BY LIST (a); -CREATE TABLE pk11 PARTITION OF pk1 FOR VALUES IN (1); -CREATE TABLE fk (a int) PARTITION BY LIST (a); -CREATE TABLE fk1 PARTITION OF fk FOR VALUES IN (1) PARTITION BY LIST (a); -CREATE TABLE fk11 PARTITION OF fk1 FOR VALUES IN (1); -ALTER TABLE fk ADD FOREIGN KEY (a) REFERENCES pk; -CREATE TABLE pk2 PARTITION OF pk FOR VALUES IN (2); -CREATE TABLE pk3 (a int NOT NULL) PARTITION BY LIST (a); -CREATE TABLE pk31 PARTITION OF pk3 FOR VALUES IN (31); -CREATE TABLE pk32 (b int, a int NOT NULL); -ALTER TABLE pk32 DROP COLUMN b; -ALTER TABLE pk3 ATTACH PARTITION pk32 FOR VALUES IN (32); -ALTER TABLE pk ATTACH PARTITION pk3 FOR VALUES IN (31, 32); -CREATE TABLE fk2 PARTITION OF fk FOR VALUES IN (2); -CREATE TABLE fk3 (b int, a int); -ALTER TABLE fk3 DROP COLUMN b; -ALTER TABLE fk ATTACH PARTITION fk3 FOR VALUES IN (3); -SELECT pg_describe_object('pg_constraint'::regclass, oid, 0), confrelid::regclass, - CASE WHEN conparentid <> 0 THEN pg_describe_object('pg_constraint'::regclass, conparentid, 0) ELSE 'TOP' END -FROM pg_catalog.pg_constraint -WHERE conrelid IN (SELECT relid FROM pg_partition_tree('fk')) -ORDER BY conrelid::regclass::text, conname; - pg_describe_object | confrelid | case -------------------------------------+-----------+----------------------------------- - constraint fk_a_fkey on table fk | pk | TOP - constraint fk_a_fkey1 on table fk | pk1 | constraint fk_a_fkey on table fk - constraint fk_a_fkey2 on table fk | pk11 | constraint fk_a_fkey1 on table fk - constraint fk_a_fkey3 on table fk | pk2 | constraint fk_a_fkey on table fk - constraint fk_a_fkey4 on table fk | pk3 | constraint fk_a_fkey on table fk - constraint fk_a_fkey5 on table fk | pk31 | constraint fk_a_fkey4 on table fk - constraint fk_a_fkey6 on table fk | pk32 | constraint fk_a_fkey4 on table fk - constraint fk_a_fkey on table fk1 | pk | constraint fk_a_fkey on table fk - constraint fk_a_fkey on table fk11 | pk | constraint fk_a_fkey on table fk1 - constraint fk_a_fkey on table fk2 | pk | constraint fk_a_fkey on table fk - constraint fk_a_fkey on table fk3 | pk | constraint fk_a_fkey on table fk -(11 rows) - -CREATE TABLE fk4 (LIKE fk); -INSERT INTO fk4 VALUES (50); -ALTER TABLE fk ATTACH PARTITION fk4 FOR VALUES IN (50); -ERROR: insert or update on table "fk4" violates foreign key constraint "fk_a_fkey" -DETAIL: Key (a)=(50) is not present in table "pk". --- Verify constraint deferrability -CREATE SCHEMA fkpart9; -SET search_path TO fkpart9; -CREATE TABLE pk (a int PRIMARY KEY) PARTITION BY LIST (a); -CREATE TABLE pk1 PARTITION OF pk FOR VALUES IN (1, 2) PARTITION BY LIST (a); -CREATE TABLE pk11 PARTITION OF pk1 FOR VALUES IN (1); -CREATE TABLE pk3 PARTITION OF pk FOR VALUES IN (3); -CREATE TABLE fk (a int REFERENCES pk DEFERRABLE INITIALLY IMMEDIATE); -INSERT INTO fk VALUES (1); -- should fail -ERROR: insert or update on table "fk" violates foreign key constraint "fk_a_fkey" -DETAIL: Key (a)=(1) is not present in table "pk". -BEGIN; -SET CONSTRAINTS fk_a_fkey DEFERRED; -INSERT INTO fk VALUES (1); -COMMIT; -- should fail -ERROR: insert or update on table "fk" violates foreign key constraint "fk_a_fkey" -DETAIL: Key (a)=(1) is not present in table "pk". -BEGIN; -SET CONSTRAINTS fk_a_fkey DEFERRED; -INSERT INTO fk VALUES (1); -INSERT INTO pk VALUES (1); -COMMIT; -- OK -BEGIN; -SET CONSTRAINTS fk_a_fkey DEFERRED; -DELETE FROM pk WHERE a = 1; -DELETE FROM fk WHERE a = 1; -COMMIT; -- OK --- Verify constraint deferrability when changed by ALTER --- Partitioned table at referencing end -CREATE TABLE pt(f1 int, f2 int, f3 int, PRIMARY KEY(f1,f2)); -CREATE TABLE ref(f1 int, f2 int, f3 int) - PARTITION BY list(f1); -CREATE TABLE ref1 PARTITION OF ref FOR VALUES IN (1); -CREATE TABLE ref2 PARTITION OF ref FOR VALUES in (2); -ALTER TABLE ref ADD FOREIGN KEY(f1,f2) REFERENCES pt; -ALTER TABLE ref ALTER CONSTRAINT ref_f1_f2_fkey - DEFERRABLE INITIALLY DEFERRED; -INSERT INTO pt VALUES(1,2,3); -INSERT INTO ref VALUES(1,2,3); -BEGIN; -DELETE FROM pt; -DELETE FROM ref; -ABORT; -DROP TABLE pt, ref; --- Multi-level partitioning at referencing end -CREATE TABLE pt(f1 int, f2 int, f3 int, PRIMARY KEY(f1,f2)); -CREATE TABLE ref(f1 int, f2 int, f3 int) - PARTITION BY list(f1); -CREATE TABLE ref1_2 PARTITION OF ref FOR VALUES IN (1, 2) PARTITION BY list (f2); -CREATE TABLE ref1 PARTITION OF ref1_2 FOR VALUES IN (1); -CREATE TABLE ref2 PARTITION OF ref1_2 FOR VALUES IN (2) PARTITION BY list (f2); -CREATE TABLE ref22 PARTITION OF ref2 FOR VALUES IN (2); -ALTER TABLE ref ADD FOREIGN KEY(f1,f2) REFERENCES pt; -INSERT INTO pt VALUES(1,2,3); -INSERT INTO ref VALUES(1,2,3); -ALTER TABLE ref22 ALTER CONSTRAINT ref_f1_f2_fkey - DEFERRABLE INITIALLY IMMEDIATE; -- fails -ERROR: cannot alter constraint "ref_f1_f2_fkey" on relation "ref22" -DETAIL: Constraint "ref_f1_f2_fkey" is derived from constraint "ref_f1_f2_fkey" of relation "ref". -HINT: You may alter the constraint it derives from, instead. -ALTER TABLE ref ALTER CONSTRAINT ref_f1_f2_fkey - DEFERRABLE INITIALLY DEFERRED; -BEGIN; -DELETE FROM pt; -DELETE FROM ref; -ABORT; -DROP TABLE pt, ref; --- Partitioned table at referenced end -CREATE TABLE pt(f1 int, f2 int, f3 int, PRIMARY KEY(f1,f2)) - PARTITION BY LIST(f1); -CREATE TABLE pt1 PARTITION OF pt FOR VALUES IN (1); -CREATE TABLE pt2 PARTITION OF pt FOR VALUES IN (2); -CREATE TABLE ref(f1 int, f2 int, f3 int); -ALTER TABLE ref ADD FOREIGN KEY(f1,f2) REFERENCES pt; -ALTER TABLE ref ALTER CONSTRAINT ref_f1_f2_fkey - DEFERRABLE INITIALLY DEFERRED; -INSERT INTO pt VALUES(1,2,3); -INSERT INTO ref VALUES(1,2,3); -BEGIN; -DELETE FROM pt; -DELETE FROM ref; -ABORT; -DROP TABLE pt, ref; --- Multi-level partitioning at at referenced end -CREATE TABLE pt(f1 int, f2 int, f3 int, PRIMARY KEY(f1,f2)) - PARTITION BY LIST(f1); -CREATE TABLE pt1_2 PARTITION OF pt FOR VALUES IN (1, 2) PARTITION BY LIST (f1); -CREATE TABLE pt1 PARTITION OF pt1_2 FOR VALUES IN (1); -CREATE TABLE pt2 PARTITION OF pt1_2 FOR VALUES IN (2); -CREATE TABLE ref(f1 int, f2 int, f3 int); -ALTER TABLE ref ADD FOREIGN KEY(f1,f2) REFERENCES pt; -ALTER TABLE ref ALTER CONSTRAINT ref_f1_f2_fkey1 - DEFERRABLE INITIALLY DEFERRED; -- fails -ERROR: cannot alter constraint "ref_f1_f2_fkey1" on relation "ref" -DETAIL: Constraint "ref_f1_f2_fkey1" is derived from constraint "ref_f1_f2_fkey" of relation "ref". -HINT: You may alter the constraint it derives from, instead. -ALTER TABLE ref ALTER CONSTRAINT ref_f1_f2_fkey - DEFERRABLE INITIALLY DEFERRED; -INSERT INTO pt VALUES(1,2,3); -INSERT INTO ref VALUES(1,2,3); -BEGIN; -DELETE FROM pt; -DELETE FROM ref; -ABORT; -DROP TABLE pt, ref; -DROP SCHEMA fkpart9 CASCADE; -NOTICE: drop cascades to 2 other objects -DETAIL: drop cascades to table pk -drop cascades to table fk --- Verify ON UPDATE/DELETE behavior -CREATE SCHEMA fkpart6; -SET search_path TO fkpart6; -CREATE TABLE pk (a int PRIMARY KEY) PARTITION BY RANGE (a); -CREATE TABLE pk1 PARTITION OF pk FOR VALUES FROM (1) TO (100) PARTITION BY RANGE (a); -CREATE TABLE pk11 PARTITION OF pk1 FOR VALUES FROM (1) TO (50); -CREATE TABLE pk12 PARTITION OF pk1 FOR VALUES FROM (50) TO (100); -CREATE TABLE fk (a int) PARTITION BY RANGE (a); -CREATE TABLE fk1 PARTITION OF fk FOR VALUES FROM (1) TO (100) PARTITION BY RANGE (a); -CREATE TABLE fk11 PARTITION OF fk1 FOR VALUES FROM (1) TO (10); -CREATE TABLE fk12 PARTITION OF fk1 FOR VALUES FROM (10) TO (100); -ALTER TABLE fk ADD FOREIGN KEY (a) REFERENCES pk ON UPDATE CASCADE ON DELETE CASCADE; -CREATE TABLE fk_d PARTITION OF fk DEFAULT; -INSERT INTO pk VALUES (1); -INSERT INTO fk VALUES (1); -UPDATE pk SET a = 20; -SELECT tableoid::regclass, * FROM fk; - tableoid | a -----------+---- - fk12 | 20 -(1 row) - -DELETE FROM pk WHERE a = 20; -SELECT tableoid::regclass, * FROM fk; - tableoid | a -----------+--- -(0 rows) - -DROP TABLE fk; -TRUNCATE TABLE pk; -INSERT INTO pk VALUES (20), (50); -CREATE TABLE fk (a int) PARTITION BY RANGE (a); -CREATE TABLE fk1 PARTITION OF fk FOR VALUES FROM (1) TO (100) PARTITION BY RANGE (a); -CREATE TABLE fk11 PARTITION OF fk1 FOR VALUES FROM (1) TO (10); -CREATE TABLE fk12 PARTITION OF fk1 FOR VALUES FROM (10) TO (100); -ALTER TABLE fk ADD FOREIGN KEY (a) REFERENCES pk ON UPDATE SET NULL ON DELETE SET NULL; -CREATE TABLE fk_d PARTITION OF fk DEFAULT; -INSERT INTO fk VALUES (20), (50); -UPDATE pk SET a = 21 WHERE a = 20; -DELETE FROM pk WHERE a = 50; -SELECT tableoid::regclass, * FROM fk; - tableoid | a -----------+--- - fk_d | - fk_d | -(2 rows) - -DROP TABLE fk; -TRUNCATE TABLE pk; -INSERT INTO pk VALUES (20), (30), (50); -CREATE TABLE fk (id int, a int DEFAULT 50) PARTITION BY RANGE (a); -CREATE TABLE fk1 PARTITION OF fk FOR VALUES FROM (1) TO (100) PARTITION BY RANGE (a); -CREATE TABLE fk11 PARTITION OF fk1 FOR VALUES FROM (1) TO (10); -CREATE TABLE fk12 PARTITION OF fk1 FOR VALUES FROM (10) TO (100); -ALTER TABLE fk ADD FOREIGN KEY (a) REFERENCES pk ON UPDATE SET DEFAULT ON DELETE SET DEFAULT; -CREATE TABLE fk_d PARTITION OF fk DEFAULT; -INSERT INTO fk VALUES (1, 20), (2, 30); -DELETE FROM pk WHERE a = 20 RETURNING *; - a ----- - 20 -(1 row) - -UPDATE pk SET a = 90 WHERE a = 30 RETURNING *; - a ----- - 90 -(1 row) - -SELECT tableoid::regclass, * FROM fk; - tableoid | id | a -----------+----+---- - fk12 | 1 | 50 - fk12 | 2 | 50 -(2 rows) - -DROP TABLE fk; -TRUNCATE TABLE pk; -INSERT INTO pk VALUES (20), (30); -CREATE TABLE fk (a int DEFAULT 50) PARTITION BY RANGE (a); -CREATE TABLE fk1 PARTITION OF fk FOR VALUES FROM (1) TO (100) PARTITION BY RANGE (a); -CREATE TABLE fk11 PARTITION OF fk1 FOR VALUES FROM (1) TO (10); -CREATE TABLE fk12 PARTITION OF fk1 FOR VALUES FROM (10) TO (100); -ALTER TABLE fk ADD FOREIGN KEY (a) REFERENCES pk ON UPDATE RESTRICT ON DELETE RESTRICT; -CREATE TABLE fk_d PARTITION OF fk DEFAULT; -INSERT INTO fk VALUES (20), (30); -DELETE FROM pk WHERE a = 20; -ERROR: update or delete on table "pk11" violates foreign key constraint "fk_a_fkey2" on table "fk" -DETAIL: Key (a)=(20) is still referenced from table "fk". -UPDATE pk SET a = 90 WHERE a = 30; -ERROR: update or delete on table "pk11" violates foreign key constraint "fk_a_fkey2" on table "fk" -DETAIL: Key (a)=(30) is still referenced from table "fk". -SELECT tableoid::regclass, * FROM fk; - tableoid | a -----------+---- - fk12 | 20 - fk12 | 30 -(2 rows) - -DROP TABLE fk; --- test for reported bug: relispartition not set --- https://postgr.es/m/CA+HiwqHMsRtRYRWYTWavKJ8x14AFsv7bmAV46mYwnfD3vy8goQ@mail.gmail.com -CREATE SCHEMA fkpart7 - CREATE TABLE pkpart (a int) PARTITION BY LIST (a) - CREATE TABLE pkpart1 PARTITION OF pkpart FOR VALUES IN (1); -ALTER TABLE fkpart7.pkpart1 ADD PRIMARY KEY (a); -ALTER TABLE fkpart7.pkpart ADD PRIMARY KEY (a); -CREATE TABLE fkpart7.fk (a int REFERENCES fkpart7.pkpart); -DROP SCHEMA fkpart7 CASCADE; -NOTICE: drop cascades to 2 other objects -DETAIL: drop cascades to table fkpart7.pkpart -drop cascades to table fkpart7.fk --- ensure we check partitions are "not used" when dropping constraints -CREATE SCHEMA fkpart8 - CREATE TABLE tbl1(f1 int PRIMARY KEY) - CREATE TABLE tbl2(f1 int REFERENCES tbl1 DEFERRABLE INITIALLY DEFERRED) PARTITION BY RANGE(f1) - CREATE TABLE tbl2_p1 PARTITION OF tbl2 FOR VALUES FROM (minvalue) TO (maxvalue); -INSERT INTO fkpart8.tbl1 VALUES(1); -BEGIN; -INSERT INTO fkpart8.tbl2 VALUES(1); -ALTER TABLE fkpart8.tbl2 DROP CONSTRAINT tbl2_f1_fkey; -ERROR: cannot ALTER TABLE "tbl2_p1" because it has pending trigger events -COMMIT; -DROP SCHEMA fkpart8 CASCADE; -NOTICE: drop cascades to 2 other objects -DETAIL: drop cascades to table fkpart8.tbl1 -drop cascades to table fkpart8.tbl2 --- ensure FK referencing a multi-level partitioned table are --- enforce reference to sub-children. -CREATE SCHEMA fkpart9 - CREATE TABLE pk (a INT PRIMARY KEY) PARTITION BY RANGE (a) - CREATE TABLE fk ( - fk_a INT REFERENCES pk(a) ON DELETE CASCADE - ) - CREATE TABLE pk1 PARTITION OF pk FOR VALUES FROM (30) TO (50) PARTITION BY RANGE (a) - CREATE TABLE pk11 PARTITION OF pk1 FOR VALUES FROM (30) TO (40); -INSERT INTO fkpart9.pk VALUES (35); -INSERT INTO fkpart9.fk VALUES (35); -DELETE FROM fkpart9.pk WHERE a=35; -SELECT * FROM fkpart9.pk; - a ---- -(0 rows) - -SELECT * FROM fkpart9.fk; - fk_a ------- -(0 rows) - -DROP SCHEMA fkpart9 CASCADE; -NOTICE: drop cascades to 2 other objects -DETAIL: drop cascades to table fkpart9.pk -drop cascades to table fkpart9.fk --- test that ri_Check_Pk_Match() scans the correct partition for a deferred --- ON DELETE/UPDATE NO ACTION constraint -CREATE SCHEMA fkpart10 - CREATE TABLE tbl1(f1 int PRIMARY KEY) PARTITION BY RANGE(f1) - CREATE TABLE tbl1_p1 PARTITION OF tbl1 FOR VALUES FROM (minvalue) TO (1) - CREATE TABLE tbl1_p2 PARTITION OF tbl1 FOR VALUES FROM (1) TO (maxvalue) - CREATE TABLE tbl2(f1 int REFERENCES tbl1 DEFERRABLE INITIALLY DEFERRED); -INSERT INTO fkpart10.tbl1 VALUES (0), (1); -INSERT INTO fkpart10.tbl2 VALUES (0), (1); -BEGIN; -DELETE FROM fkpart10.tbl1 WHERE f1 = 0; -UPDATE fkpart10.tbl1 SET f1 = 2 WHERE f1 = 1; -INSERT INTO fkpart10.tbl1 VALUES (0), (1); -COMMIT; -DROP SCHEMA fkpart10 CASCADE; -NOTICE: drop cascades to 2 other objects -DETAIL: drop cascades to table fkpart10.tbl1 -drop cascades to table fkpart10.tbl2 +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/cluster.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/cluster.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/cluster.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/cluster.out 2023-02-20 19:47:52.869216472 -0500 @@ -1,601 +1 @@ --- --- CLUSTER --- -CREATE TABLE clstr_tst_s (rf_a SERIAL PRIMARY KEY, - b INT); -CREATE TABLE clstr_tst (a SERIAL PRIMARY KEY, - b INT, - c TEXT, - d TEXT, - CONSTRAINT clstr_tst_con FOREIGN KEY (b) REFERENCES clstr_tst_s); -CREATE INDEX clstr_tst_b ON clstr_tst (b); -CREATE INDEX clstr_tst_c ON clstr_tst (c); -CREATE INDEX clstr_tst_c_b ON clstr_tst (c,b); -CREATE INDEX clstr_tst_b_c ON clstr_tst (b,c); -INSERT INTO clstr_tst_s (b) VALUES (0); -INSERT INTO clstr_tst_s (b) SELECT b FROM clstr_tst_s; -INSERT INTO clstr_tst_s (b) SELECT b FROM clstr_tst_s; -INSERT INTO clstr_tst_s (b) SELECT b FROM clstr_tst_s; -INSERT INTO clstr_tst_s (b) SELECT b FROM clstr_tst_s; -INSERT INTO clstr_tst_s (b) SELECT b FROM clstr_tst_s; -CREATE TABLE clstr_tst_inh () INHERITS (clstr_tst); -INSERT INTO clstr_tst (b, c) VALUES (11, 'once'); -INSERT INTO clstr_tst (b, c) VALUES (10, 'diez'); -INSERT INTO clstr_tst (b, c) VALUES (31, 'treinta y uno'); -INSERT INTO clstr_tst (b, c) VALUES (22, 'veintidos'); -INSERT INTO clstr_tst (b, c) VALUES (3, 'tres'); -INSERT INTO clstr_tst (b, c) VALUES (20, 'veinte'); -INSERT INTO clstr_tst (b, c) VALUES (23, 'veintitres'); -INSERT INTO clstr_tst (b, c) VALUES (21, 'veintiuno'); -INSERT INTO clstr_tst (b, c) VALUES (4, 'cuatro'); -INSERT INTO clstr_tst (b, c) VALUES (14, 'catorce'); -INSERT INTO clstr_tst (b, c) VALUES (2, 'dos'); -INSERT INTO clstr_tst (b, c) VALUES (18, 'dieciocho'); -INSERT INTO clstr_tst (b, c) VALUES (27, 'veintisiete'); -INSERT INTO clstr_tst (b, c) VALUES (25, 'veinticinco'); -INSERT INTO clstr_tst (b, c) VALUES (13, 'trece'); -INSERT INTO clstr_tst (b, c) VALUES (28, 'veintiocho'); -INSERT INTO clstr_tst (b, c) VALUES (32, 'treinta y dos'); -INSERT INTO clstr_tst (b, c) VALUES (5, 'cinco'); -INSERT INTO clstr_tst (b, c) VALUES (29, 'veintinueve'); -INSERT INTO clstr_tst (b, c) VALUES (1, 'uno'); -INSERT INTO clstr_tst (b, c) VALUES (24, 'veinticuatro'); -INSERT INTO clstr_tst (b, c) VALUES (30, 'treinta'); -INSERT INTO clstr_tst (b, c) VALUES (12, 'doce'); -INSERT INTO clstr_tst (b, c) VALUES (17, 'diecisiete'); -INSERT INTO clstr_tst (b, c) VALUES (9, 'nueve'); -INSERT INTO clstr_tst (b, c) VALUES (19, 'diecinueve'); -INSERT INTO clstr_tst (b, c) VALUES (26, 'veintiseis'); -INSERT INTO clstr_tst (b, c) VALUES (15, 'quince'); -INSERT INTO clstr_tst (b, c) VALUES (7, 'siete'); -INSERT INTO clstr_tst (b, c) VALUES (16, 'dieciseis'); -INSERT INTO clstr_tst (b, c) VALUES (8, 'ocho'); --- This entry is needed to test that TOASTED values are copied correctly. -INSERT INTO clstr_tst (b, c, d) VALUES (6, 'seis', repeat('xyzzy', 100000)); -CLUSTER clstr_tst_c ON clstr_tst; -SELECT a,b,c,substring(d for 30), length(d) from clstr_tst; - a | b | c | substring | length -----+----+---------------+--------------------------------+-------- - 10 | 14 | catorce | | - 18 | 5 | cinco | | - 9 | 4 | cuatro | | - 26 | 19 | diecinueve | | - 12 | 18 | dieciocho | | - 30 | 16 | dieciseis | | - 24 | 17 | diecisiete | | - 2 | 10 | diez | | - 23 | 12 | doce | | - 11 | 2 | dos | | - 25 | 9 | nueve | | - 31 | 8 | ocho | | - 1 | 11 | once | | - 28 | 15 | quince | | - 32 | 6 | seis | xyzzyxyzzyxyzzyxyzzyxyzzyxyzzy | 500000 - 29 | 7 | siete | | - 15 | 13 | trece | | - 22 | 30 | treinta | | - 17 | 32 | treinta y dos | | - 3 | 31 | treinta y uno | | - 5 | 3 | tres | | - 20 | 1 | uno | | - 6 | 20 | veinte | | - 14 | 25 | veinticinco | | - 21 | 24 | veinticuatro | | - 4 | 22 | veintidos | | - 19 | 29 | veintinueve | | - 16 | 28 | veintiocho | | - 27 | 26 | veintiseis | | - 13 | 27 | veintisiete | | - 7 | 23 | veintitres | | - 8 | 21 | veintiuno | | -(32 rows) - -SELECT a,b,c,substring(d for 30), length(d) from clstr_tst ORDER BY a; - a | b | c | substring | length -----+----+---------------+--------------------------------+-------- - 1 | 11 | once | | - 2 | 10 | diez | | - 3 | 31 | treinta y uno | | - 4 | 22 | veintidos | | - 5 | 3 | tres | | - 6 | 20 | veinte | | - 7 | 23 | veintitres | | - 8 | 21 | veintiuno | | - 9 | 4 | cuatro | | - 10 | 14 | catorce | | - 11 | 2 | dos | | - 12 | 18 | dieciocho | | - 13 | 27 | veintisiete | | - 14 | 25 | veinticinco | | - 15 | 13 | trece | | - 16 | 28 | veintiocho | | - 17 | 32 | treinta y dos | | - 18 | 5 | cinco | | - 19 | 29 | veintinueve | | - 20 | 1 | uno | | - 21 | 24 | veinticuatro | | - 22 | 30 | treinta | | - 23 | 12 | doce | | - 24 | 17 | diecisiete | | - 25 | 9 | nueve | | - 26 | 19 | diecinueve | | - 27 | 26 | veintiseis | | - 28 | 15 | quince | | - 29 | 7 | siete | | - 30 | 16 | dieciseis | | - 31 | 8 | ocho | | - 32 | 6 | seis | xyzzyxyzzyxyzzyxyzzyxyzzyxyzzy | 500000 -(32 rows) - -SELECT a,b,c,substring(d for 30), length(d) from clstr_tst ORDER BY b; - a | b | c | substring | length -----+----+---------------+--------------------------------+-------- - 20 | 1 | uno | | - 11 | 2 | dos | | - 5 | 3 | tres | | - 9 | 4 | cuatro | | - 18 | 5 | cinco | | - 32 | 6 | seis | xyzzyxyzzyxyzzyxyzzyxyzzyxyzzy | 500000 - 29 | 7 | siete | | - 31 | 8 | ocho | | - 25 | 9 | nueve | | - 2 | 10 | diez | | - 1 | 11 | once | | - 23 | 12 | doce | | - 15 | 13 | trece | | - 10 | 14 | catorce | | - 28 | 15 | quince | | - 30 | 16 | dieciseis | | - 24 | 17 | diecisiete | | - 12 | 18 | dieciocho | | - 26 | 19 | diecinueve | | - 6 | 20 | veinte | | - 8 | 21 | veintiuno | | - 4 | 22 | veintidos | | - 7 | 23 | veintitres | | - 21 | 24 | veinticuatro | | - 14 | 25 | veinticinco | | - 27 | 26 | veintiseis | | - 13 | 27 | veintisiete | | - 16 | 28 | veintiocho | | - 19 | 29 | veintinueve | | - 22 | 30 | treinta | | - 3 | 31 | treinta y uno | | - 17 | 32 | treinta y dos | | -(32 rows) - -SELECT a,b,c,substring(d for 30), length(d) from clstr_tst ORDER BY c; - a | b | c | substring | length -----+----+---------------+--------------------------------+-------- - 10 | 14 | catorce | | - 18 | 5 | cinco | | - 9 | 4 | cuatro | | - 26 | 19 | diecinueve | | - 12 | 18 | dieciocho | | - 30 | 16 | dieciseis | | - 24 | 17 | diecisiete | | - 2 | 10 | diez | | - 23 | 12 | doce | | - 11 | 2 | dos | | - 25 | 9 | nueve | | - 31 | 8 | ocho | | - 1 | 11 | once | | - 28 | 15 | quince | | - 32 | 6 | seis | xyzzyxyzzyxyzzyxyzzyxyzzyxyzzy | 500000 - 29 | 7 | siete | | - 15 | 13 | trece | | - 22 | 30 | treinta | | - 17 | 32 | treinta y dos | | - 3 | 31 | treinta y uno | | - 5 | 3 | tres | | - 20 | 1 | uno | | - 6 | 20 | veinte | | - 14 | 25 | veinticinco | | - 21 | 24 | veinticuatro | | - 4 | 22 | veintidos | | - 19 | 29 | veintinueve | | - 16 | 28 | veintiocho | | - 27 | 26 | veintiseis | | - 13 | 27 | veintisiete | | - 7 | 23 | veintitres | | - 8 | 21 | veintiuno | | -(32 rows) - --- Verify that inheritance link still works -INSERT INTO clstr_tst_inh VALUES (0, 100, 'in child table'); -SELECT a,b,c,substring(d for 30), length(d) from clstr_tst; - a | b | c | substring | length -----+-----+----------------+--------------------------------+-------- - 10 | 14 | catorce | | - 18 | 5 | cinco | | - 9 | 4 | cuatro | | - 26 | 19 | diecinueve | | - 12 | 18 | dieciocho | | - 30 | 16 | dieciseis | | - 24 | 17 | diecisiete | | - 2 | 10 | diez | | - 23 | 12 | doce | | - 11 | 2 | dos | | - 25 | 9 | nueve | | - 31 | 8 | ocho | | - 1 | 11 | once | | - 28 | 15 | quince | | - 32 | 6 | seis | xyzzyxyzzyxyzzyxyzzyxyzzyxyzzy | 500000 - 29 | 7 | siete | | - 15 | 13 | trece | | - 22 | 30 | treinta | | - 17 | 32 | treinta y dos | | - 3 | 31 | treinta y uno | | - 5 | 3 | tres | | - 20 | 1 | uno | | - 6 | 20 | veinte | | - 14 | 25 | veinticinco | | - 21 | 24 | veinticuatro | | - 4 | 22 | veintidos | | - 19 | 29 | veintinueve | | - 16 | 28 | veintiocho | | - 27 | 26 | veintiseis | | - 13 | 27 | veintisiete | | - 7 | 23 | veintitres | | - 8 | 21 | veintiuno | | - 0 | 100 | in child table | | -(33 rows) - --- Verify that foreign key link still works -INSERT INTO clstr_tst (b, c) VALUES (1111, 'this should fail'); -ERROR: insert or update on table "clstr_tst" violates foreign key constraint "clstr_tst_con" -DETAIL: Key (b)=(1111) is not present in table "clstr_tst_s". -SELECT conname FROM pg_constraint WHERE conrelid = 'clstr_tst'::regclass -ORDER BY 1; - conname ----------------- - clstr_tst_con - clstr_tst_pkey -(2 rows) - -SELECT relname, relkind, - EXISTS(SELECT 1 FROM pg_class WHERE oid = c.reltoastrelid) AS hastoast -FROM pg_class c WHERE relname LIKE 'clstr_tst%' ORDER BY relname; - relname | relkind | hastoast -----------------------+---------+---------- - clstr_tst | r | t - clstr_tst_a_seq | S | f - clstr_tst_b | i | f - clstr_tst_b_c | i | f - clstr_tst_c | i | f - clstr_tst_c_b | i | f - clstr_tst_inh | r | t - clstr_tst_pkey | i | f - clstr_tst_s | r | f - clstr_tst_s_pkey | i | f - clstr_tst_s_rf_a_seq | S | f -(11 rows) - --- Verify that indisclustered is correctly set -SELECT pg_class.relname FROM pg_index, pg_class, pg_class AS pg_class_2 -WHERE pg_class.oid=indexrelid - AND indrelid=pg_class_2.oid - AND pg_class_2.relname = 'clstr_tst' - AND indisclustered; - relname -------------- - clstr_tst_c -(1 row) - --- Try changing indisclustered -ALTER TABLE clstr_tst CLUSTER ON clstr_tst_b_c; -SELECT pg_class.relname FROM pg_index, pg_class, pg_class AS pg_class_2 -WHERE pg_class.oid=indexrelid - AND indrelid=pg_class_2.oid - AND pg_class_2.relname = 'clstr_tst' - AND indisclustered; - relname ---------------- - clstr_tst_b_c -(1 row) - --- Try turning off all clustering -ALTER TABLE clstr_tst SET WITHOUT CLUSTER; -SELECT pg_class.relname FROM pg_index, pg_class, pg_class AS pg_class_2 -WHERE pg_class.oid=indexrelid - AND indrelid=pg_class_2.oid - AND pg_class_2.relname = 'clstr_tst' - AND indisclustered; - relname ---------- -(0 rows) - --- Verify that clustering all tables does in fact cluster the right ones -CREATE USER regress_clstr_user; -CREATE TABLE clstr_1 (a INT PRIMARY KEY); -CREATE TABLE clstr_2 (a INT PRIMARY KEY); -CREATE TABLE clstr_3 (a INT PRIMARY KEY); -ALTER TABLE clstr_1 OWNER TO regress_clstr_user; -ALTER TABLE clstr_3 OWNER TO regress_clstr_user; -GRANT SELECT ON clstr_2 TO regress_clstr_user; -INSERT INTO clstr_1 VALUES (2); -INSERT INTO clstr_1 VALUES (1); -INSERT INTO clstr_2 VALUES (2); -INSERT INTO clstr_2 VALUES (1); -INSERT INTO clstr_3 VALUES (2); -INSERT INTO clstr_3 VALUES (1); --- "CLUSTER " on a table that hasn't been clustered -CLUSTER clstr_2; -ERROR: there is no previously clustered index for table "clstr_2" -CLUSTER clstr_1_pkey ON clstr_1; -CLUSTER clstr_2 USING clstr_2_pkey; -SELECT * FROM clstr_1 UNION ALL - SELECT * FROM clstr_2 UNION ALL - SELECT * FROM clstr_3; - a ---- - 1 - 2 - 1 - 2 - 2 - 1 -(6 rows) - --- revert to the original state -DELETE FROM clstr_1; -DELETE FROM clstr_2; -DELETE FROM clstr_3; -INSERT INTO clstr_1 VALUES (2); -INSERT INTO clstr_1 VALUES (1); -INSERT INTO clstr_2 VALUES (2); -INSERT INTO clstr_2 VALUES (1); -INSERT INTO clstr_3 VALUES (2); -INSERT INTO clstr_3 VALUES (1); --- this user can only cluster clstr_1 and clstr_3, but the latter --- has not been clustered -SET SESSION AUTHORIZATION regress_clstr_user; -CLUSTER; -SELECT * FROM clstr_1 UNION ALL - SELECT * FROM clstr_2 UNION ALL - SELECT * FROM clstr_3; - a ---- - 1 - 2 - 2 - 1 - 2 - 1 -(6 rows) - --- cluster a single table using the indisclustered bit previously set -DELETE FROM clstr_1; -INSERT INTO clstr_1 VALUES (2); -INSERT INTO clstr_1 VALUES (1); -CLUSTER clstr_1; -SELECT * FROM clstr_1; - a ---- - 1 - 2 -(2 rows) - --- Test MVCC-safety of cluster. There isn't much we can do to verify the --- results with a single backend... -CREATE TABLE clustertest (key int PRIMARY KEY); -INSERT INTO clustertest VALUES (10); -INSERT INTO clustertest VALUES (20); -INSERT INTO clustertest VALUES (30); -INSERT INTO clustertest VALUES (40); -INSERT INTO clustertest VALUES (50); --- Use a transaction so that updates are not committed when CLUSTER sees 'em -BEGIN; --- Test update where the old row version is found first in the scan -UPDATE clustertest SET key = 100 WHERE key = 10; --- Test update where the new row version is found first in the scan -UPDATE clustertest SET key = 35 WHERE key = 40; --- Test longer update chain -UPDATE clustertest SET key = 60 WHERE key = 50; -UPDATE clustertest SET key = 70 WHERE key = 60; -UPDATE clustertest SET key = 80 WHERE key = 70; -SELECT * FROM clustertest; - key ------ - 20 - 30 - 100 - 35 - 80 -(5 rows) - -CLUSTER clustertest_pkey ON clustertest; -SELECT * FROM clustertest; - key ------ - 20 - 30 - 35 - 80 - 100 -(5 rows) - -COMMIT; -SELECT * FROM clustertest; - key ------ - 20 - 30 - 35 - 80 - 100 -(5 rows) - --- check that temp tables can be clustered -create temp table clstr_temp (col1 int primary key, col2 text); -insert into clstr_temp values (2, 'two'), (1, 'one'); -cluster clstr_temp using clstr_temp_pkey; -select * from clstr_temp; - col1 | col2 -------+------ - 1 | one - 2 | two -(2 rows) - -drop table clstr_temp; -RESET SESSION AUTHORIZATION; --- check clustering an empty table -DROP TABLE clustertest; -CREATE TABLE clustertest (f1 int PRIMARY KEY); -CLUSTER clustertest USING clustertest_pkey; -CLUSTER clustertest; --- Check that partitioned tables cannot be clustered -CREATE TABLE clstrpart (a int) PARTITION BY RANGE (a); -CREATE INDEX clstrpart_idx ON clstrpart (a); -ALTER TABLE clstrpart CLUSTER ON clstrpart_idx; -ERROR: cannot mark index clustered in partitioned table -CLUSTER clstrpart USING clstrpart_idx; -ERROR: cannot cluster a partitioned table -DROP TABLE clstrpart; --- Test CLUSTER with external tuplesorting -create table clstr_4 as select * from tenk1; -create index cluster_sort on clstr_4 (hundred, thousand, tenthous); --- ensure we don't use the index in CLUSTER nor the checking SELECTs -set enable_indexscan = off; --- Use external sort: -set maintenance_work_mem = '1MB'; -cluster clstr_4 using cluster_sort; -select * from -(select hundred, lag(hundred) over () as lhundred, - thousand, lag(thousand) over () as lthousand, - tenthous, lag(tenthous) over () as ltenthous from clstr_4) ss -where row(hundred, thousand, tenthous) <= row(lhundred, lthousand, ltenthous); - hundred | lhundred | thousand | lthousand | tenthous | ltenthous ----------+----------+----------+-----------+----------+----------- -(0 rows) - -reset enable_indexscan; -reset maintenance_work_mem; --- test CLUSTER on expression index -CREATE TABLE clstr_expression(id serial primary key, a int, b text COLLATE "C"); -INSERT INTO clstr_expression(a, b) SELECT g.i % 42, 'prefix'||g.i FROM generate_series(1, 133) g(i); -CREATE INDEX clstr_expression_minus_a ON clstr_expression ((-a), b); -CREATE INDEX clstr_expression_upper_b ON clstr_expression ((upper(b))); --- verify indexes work before cluster -BEGIN; -SET LOCAL enable_seqscan = false; -EXPLAIN (COSTS OFF) SELECT * FROM clstr_expression WHERE upper(b) = 'PREFIX3'; - QUERY PLAN ---------------------------------------------------------------- - Index Scan using clstr_expression_upper_b on clstr_expression - Index Cond: (upper(b) = 'PREFIX3'::text) -(2 rows) - -SELECT * FROM clstr_expression WHERE upper(b) = 'PREFIX3'; - id | a | b -----+---+--------- - 3 | 3 | prefix3 -(1 row) - -EXPLAIN (COSTS OFF) SELECT * FROM clstr_expression WHERE -a = -3 ORDER BY -a, b; - QUERY PLAN ---------------------------------------------------------------- - Index Scan using clstr_expression_minus_a on clstr_expression - Index Cond: ((- a) = '-3'::integer) -(2 rows) - -SELECT * FROM clstr_expression WHERE -a = -3 ORDER BY -a, b; - id | a | b ------+---+----------- - 129 | 3 | prefix129 - 3 | 3 | prefix3 - 45 | 3 | prefix45 - 87 | 3 | prefix87 -(4 rows) - -COMMIT; --- and after clustering on clstr_expression_minus_a -CLUSTER clstr_expression USING clstr_expression_minus_a; -WITH rows AS - (SELECT ctid, lag(a) OVER (ORDER BY ctid) AS la, a FROM clstr_expression) -SELECT * FROM rows WHERE la < a; - ctid | la | a -------+----+--- -(0 rows) - -BEGIN; -SET LOCAL enable_seqscan = false; -EXPLAIN (COSTS OFF) SELECT * FROM clstr_expression WHERE upper(b) = 'PREFIX3'; - QUERY PLAN ---------------------------------------------------------------- - Index Scan using clstr_expression_upper_b on clstr_expression - Index Cond: (upper(b) = 'PREFIX3'::text) -(2 rows) - -SELECT * FROM clstr_expression WHERE upper(b) = 'PREFIX3'; - id | a | b -----+---+--------- - 3 | 3 | prefix3 -(1 row) - -EXPLAIN (COSTS OFF) SELECT * FROM clstr_expression WHERE -a = -3 ORDER BY -a, b; - QUERY PLAN ---------------------------------------------------------------- - Index Scan using clstr_expression_minus_a on clstr_expression - Index Cond: ((- a) = '-3'::integer) -(2 rows) - -SELECT * FROM clstr_expression WHERE -a = -3 ORDER BY -a, b; - id | a | b ------+---+----------- - 129 | 3 | prefix129 - 3 | 3 | prefix3 - 45 | 3 | prefix45 - 87 | 3 | prefix87 -(4 rows) - -COMMIT; --- and after clustering on clstr_expression_upper_b -CLUSTER clstr_expression USING clstr_expression_upper_b; -WITH rows AS - (SELECT ctid, lag(b) OVER (ORDER BY ctid) AS lb, b FROM clstr_expression) -SELECT * FROM rows WHERE upper(lb) > upper(b); - ctid | lb | b -------+----+--- -(0 rows) - -BEGIN; -SET LOCAL enable_seqscan = false; -EXPLAIN (COSTS OFF) SELECT * FROM clstr_expression WHERE upper(b) = 'PREFIX3'; - QUERY PLAN ---------------------------------------------------------------- - Index Scan using clstr_expression_upper_b on clstr_expression - Index Cond: (upper(b) = 'PREFIX3'::text) -(2 rows) - -SELECT * FROM clstr_expression WHERE upper(b) = 'PREFIX3'; - id | a | b -----+---+--------- - 3 | 3 | prefix3 -(1 row) - -EXPLAIN (COSTS OFF) SELECT * FROM clstr_expression WHERE -a = -3 ORDER BY -a, b; - QUERY PLAN ---------------------------------------------------------------- - Index Scan using clstr_expression_minus_a on clstr_expression - Index Cond: ((- a) = '-3'::integer) -(2 rows) - -SELECT * FROM clstr_expression WHERE -a = -3 ORDER BY -a, b; - id | a | b ------+---+----------- - 129 | 3 | prefix129 - 3 | 3 | prefix3 - 45 | 3 | prefix45 - 87 | 3 | prefix87 -(4 rows) - -COMMIT; --- clean up -DROP TABLE clustertest; -DROP TABLE clstr_1; -DROP TABLE clstr_2; -DROP TABLE clstr_3; -DROP TABLE clstr_4; -DROP TABLE clstr_expression; -DROP USER regress_clstr_user; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/dependency.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/dependency.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/dependency.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/dependency.out 2023-02-20 19:47:52.839216471 -0500 @@ -1,150 +1 @@ --- --- DEPENDENCIES --- -CREATE USER regress_dep_user; -CREATE USER regress_dep_user2; -CREATE USER regress_dep_user3; -CREATE GROUP regress_dep_group; -CREATE TABLE deptest (f1 serial primary key, f2 text); -GRANT SELECT ON TABLE deptest TO GROUP regress_dep_group; -GRANT ALL ON TABLE deptest TO regress_dep_user, regress_dep_user2; --- can't drop neither because they have privileges somewhere -DROP USER regress_dep_user; -ERROR: role "regress_dep_user" cannot be dropped because some objects depend on it -DETAIL: privileges for table deptest -DROP GROUP regress_dep_group; -ERROR: role "regress_dep_group" cannot be dropped because some objects depend on it -DETAIL: privileges for table deptest --- if we revoke the privileges we can drop the group -REVOKE SELECT ON deptest FROM GROUP regress_dep_group; -DROP GROUP regress_dep_group; --- can't drop the user if we revoke the privileges partially -REVOKE SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES ON deptest FROM regress_dep_user; -DROP USER regress_dep_user; -ERROR: role "regress_dep_user" cannot be dropped because some objects depend on it -DETAIL: privileges for table deptest --- now we are OK to drop him -REVOKE TRIGGER ON deptest FROM regress_dep_user; -DROP USER regress_dep_user; --- we are OK too if we drop the privileges all at once -REVOKE ALL ON deptest FROM regress_dep_user2; -DROP USER regress_dep_user2; --- can't drop the owner of an object --- the error message detail here would include a pg_toast_nnn name that --- is not constant, so suppress it -\set VERBOSITY terse -ALTER TABLE deptest OWNER TO regress_dep_user3; -DROP USER regress_dep_user3; -ERROR: role "regress_dep_user3" cannot be dropped because some objects depend on it -\set VERBOSITY default --- if we drop the object, we can drop the user too -DROP TABLE deptest; -DROP USER regress_dep_user3; --- Test DROP OWNED -CREATE USER regress_dep_user0; -CREATE USER regress_dep_user1; -CREATE USER regress_dep_user2; -SET SESSION AUTHORIZATION regress_dep_user0; --- permission denied -DROP OWNED BY regress_dep_user1; -ERROR: permission denied to drop objects -DROP OWNED BY regress_dep_user0, regress_dep_user2; -ERROR: permission denied to drop objects -REASSIGN OWNED BY regress_dep_user0 TO regress_dep_user1; -ERROR: permission denied to reassign objects -REASSIGN OWNED BY regress_dep_user1 TO regress_dep_user0; -ERROR: permission denied to reassign objects --- this one is allowed -DROP OWNED BY regress_dep_user0; -CREATE TABLE deptest1 (f1 int unique); -GRANT ALL ON deptest1 TO regress_dep_user1 WITH GRANT OPTION; -SET SESSION AUTHORIZATION regress_dep_user1; -CREATE TABLE deptest (a serial primary key, b text); -GRANT ALL ON deptest1 TO regress_dep_user2; -RESET SESSION AUTHORIZATION; -\z deptest1 - Access privileges - Schema | Name | Type | Access privileges | Column privileges | Policies ---------+----------+-------+----------------------------------------------------+-------------------+---------- - public | deptest1 | table | regress_dep_user0=arwdDxt/regress_dep_user0 +| | - | | | regress_dep_user1=a*r*w*d*D*x*t*/regress_dep_user0+| | - | | | regress_dep_user2=arwdDxt/regress_dep_user1 | | -(1 row) - -DROP OWNED BY regress_dep_user1; --- all grants revoked -\z deptest1 - Access privileges - Schema | Name | Type | Access privileges | Column privileges | Policies ---------+----------+-------+---------------------------------------------+-------------------+---------- - public | deptest1 | table | regress_dep_user0=arwdDxt/regress_dep_user0 | | -(1 row) - --- table was dropped -\d deptest --- Test REASSIGN OWNED -GRANT ALL ON deptest1 TO regress_dep_user1; -GRANT CREATE ON DATABASE regression TO regress_dep_user1; -SET SESSION AUTHORIZATION regress_dep_user1; -CREATE SCHEMA deptest; -CREATE TABLE deptest (a serial primary key, b text); -ALTER DEFAULT PRIVILEGES FOR ROLE regress_dep_user1 IN SCHEMA deptest - GRANT ALL ON TABLES TO regress_dep_user2; -CREATE FUNCTION deptest_func() RETURNS void LANGUAGE plpgsql - AS $$ BEGIN END; $$; -CREATE TYPE deptest_enum AS ENUM ('red'); -CREATE TYPE deptest_range AS RANGE (SUBTYPE = int4); -CREATE TABLE deptest2 (f1 int); --- make a serial column the hard way -CREATE SEQUENCE ss1; -ALTER TABLE deptest2 ALTER f1 SET DEFAULT nextval('ss1'); -ALTER SEQUENCE ss1 OWNED BY deptest2.f1; --- When reassigning ownership of a composite type, its pg_class entry --- should match -CREATE TYPE deptest_t AS (a int); -SELECT typowner = relowner -FROM pg_type JOIN pg_class c ON typrelid = c.oid WHERE typname = 'deptest_t'; - ?column? ----------- - t -(1 row) - -RESET SESSION AUTHORIZATION; -REASSIGN OWNED BY regress_dep_user1 TO regress_dep_user2; -\dt deptest - List of relations - Schema | Name | Type | Owner ---------+---------+-------+------------------- - public | deptest | table | regress_dep_user2 -(1 row) - -SELECT typowner = relowner -FROM pg_type JOIN pg_class c ON typrelid = c.oid WHERE typname = 'deptest_t'; - ?column? ----------- - t -(1 row) - --- doesn't work: grant still exists -DROP USER regress_dep_user1; -ERROR: role "regress_dep_user1" cannot be dropped because some objects depend on it -DETAIL: privileges for database regression -privileges for table deptest1 -owner of default privileges on new relations belonging to role regress_dep_user1 in schema deptest -DROP OWNED BY regress_dep_user1; -DROP USER regress_dep_user1; -DROP USER regress_dep_user2; -ERROR: role "regress_dep_user2" cannot be dropped because some objects depend on it -DETAIL: owner of schema deptest -owner of sequence deptest_a_seq -owner of table deptest -owner of function deptest_func() -owner of type deptest_enum -owner of type deptest_multirange -owner of type deptest_range -owner of table deptest2 -owner of sequence ss1 -owner of type deptest_t -DROP OWNED BY regress_dep_user2, regress_dep_user0; -DROP USER regress_dep_user2; -DROP USER regress_dep_user0; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/guc.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/guc.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/guc.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/guc.out 2023-02-20 19:47:53.119216483 -0500 @@ -1,815 +1 @@ --- pg_regress should ensure that this default value applies; however --- we can't rely on any specific default value of vacuum_cost_delay -SHOW datestyle; - DateStyle ---------------- - Postgres, MDY -(1 row) - --- SET to some nondefault value -SET vacuum_cost_delay TO 40; -SET datestyle = 'ISO, YMD'; -SHOW vacuum_cost_delay; - vacuum_cost_delay -------------------- - 40ms -(1 row) - -SHOW datestyle; - DateStyle ------------ - ISO, YMD -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz ------------------------- - 2006-08-13 12:34:56-07 -(1 row) - --- SET LOCAL has no effect outside of a transaction -SET LOCAL vacuum_cost_delay TO 50; -WARNING: SET LOCAL can only be used in transaction blocks -SHOW vacuum_cost_delay; - vacuum_cost_delay -------------------- - 40ms -(1 row) - -SET LOCAL datestyle = 'SQL'; -WARNING: SET LOCAL can only be used in transaction blocks -SHOW datestyle; - DateStyle ------------ - ISO, YMD -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz ------------------------- - 2006-08-13 12:34:56-07 -(1 row) - --- SET LOCAL within a transaction that commits -BEGIN; -SET LOCAL vacuum_cost_delay TO 50; -SHOW vacuum_cost_delay; - vacuum_cost_delay -------------------- - 50ms -(1 row) - -SET LOCAL datestyle = 'SQL'; -SHOW datestyle; - DateStyle ------------ - SQL, YMD -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz -------------------------- - 08/13/2006 12:34:56 PDT -(1 row) - -COMMIT; -SHOW vacuum_cost_delay; - vacuum_cost_delay -------------------- - 40ms -(1 row) - -SHOW datestyle; - DateStyle ------------ - ISO, YMD -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz ------------------------- - 2006-08-13 12:34:56-07 -(1 row) - --- SET should be reverted after ROLLBACK -BEGIN; -SET vacuum_cost_delay TO 60; -SHOW vacuum_cost_delay; - vacuum_cost_delay -------------------- - 60ms -(1 row) - -SET datestyle = 'German'; -SHOW datestyle; - DateStyle -------------- - German, DMY -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz -------------------------- - 13.08.2006 12:34:56 PDT -(1 row) - -ROLLBACK; -SHOW vacuum_cost_delay; - vacuum_cost_delay -------------------- - 40ms -(1 row) - -SHOW datestyle; - DateStyle ------------ - ISO, YMD -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz ------------------------- - 2006-08-13 12:34:56-07 -(1 row) - --- Some tests with subtransactions -BEGIN; -SET vacuum_cost_delay TO 70; -SET datestyle = 'MDY'; -SHOW datestyle; - DateStyle ------------ - ISO, MDY -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz ------------------------- - 2006-08-13 12:34:56-07 -(1 row) - -SAVEPOINT first_sp; -SET vacuum_cost_delay TO 80.1; -SHOW vacuum_cost_delay; - vacuum_cost_delay -------------------- - 80100us -(1 row) - -SET datestyle = 'German, DMY'; -SHOW datestyle; - DateStyle -------------- - German, DMY -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz -------------------------- - 13.08.2006 12:34:56 PDT -(1 row) - -ROLLBACK TO first_sp; -SHOW datestyle; - DateStyle ------------ - ISO, MDY -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz ------------------------- - 2006-08-13 12:34:56-07 -(1 row) - -SAVEPOINT second_sp; -SET vacuum_cost_delay TO '900us'; -SET datestyle = 'SQL, YMD'; -SHOW datestyle; - DateStyle ------------ - SQL, YMD -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz -------------------------- - 08/13/2006 12:34:56 PDT -(1 row) - -SAVEPOINT third_sp; -SET vacuum_cost_delay TO 100; -SHOW vacuum_cost_delay; - vacuum_cost_delay -------------------- - 100ms -(1 row) - -SET datestyle = 'Postgres, MDY'; -SHOW datestyle; - DateStyle ---------------- - Postgres, MDY -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz ------------------------------- - Sun Aug 13 12:34:56 2006 PDT -(1 row) - -ROLLBACK TO third_sp; -SHOW vacuum_cost_delay; - vacuum_cost_delay -------------------- - 900us -(1 row) - -SHOW datestyle; - DateStyle ------------ - SQL, YMD -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz -------------------------- - 08/13/2006 12:34:56 PDT -(1 row) - -ROLLBACK TO second_sp; -SHOW vacuum_cost_delay; - vacuum_cost_delay -------------------- - 70ms -(1 row) - -SHOW datestyle; - DateStyle ------------ - ISO, MDY -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz ------------------------- - 2006-08-13 12:34:56-07 -(1 row) - -ROLLBACK; -SHOW vacuum_cost_delay; - vacuum_cost_delay -------------------- - 40ms -(1 row) - -SHOW datestyle; - DateStyle ------------ - ISO, YMD -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz ------------------------- - 2006-08-13 12:34:56-07 -(1 row) - --- SET LOCAL with Savepoints -BEGIN; -SHOW vacuum_cost_delay; - vacuum_cost_delay -------------------- - 40ms -(1 row) - -SHOW datestyle; - DateStyle ------------ - ISO, YMD -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz ------------------------- - 2006-08-13 12:34:56-07 -(1 row) - -SAVEPOINT sp; -SET LOCAL vacuum_cost_delay TO 30; -SHOW vacuum_cost_delay; - vacuum_cost_delay -------------------- - 30ms -(1 row) - -SET LOCAL datestyle = 'Postgres, MDY'; -SHOW datestyle; - DateStyle ---------------- - Postgres, MDY -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz ------------------------------- - Sun Aug 13 12:34:56 2006 PDT -(1 row) - -ROLLBACK TO sp; -SHOW vacuum_cost_delay; - vacuum_cost_delay -------------------- - 40ms -(1 row) - -SHOW datestyle; - DateStyle ------------ - ISO, YMD -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz ------------------------- - 2006-08-13 12:34:56-07 -(1 row) - -ROLLBACK; -SHOW vacuum_cost_delay; - vacuum_cost_delay -------------------- - 40ms -(1 row) - -SHOW datestyle; - DateStyle ------------ - ISO, YMD -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz ------------------------- - 2006-08-13 12:34:56-07 -(1 row) - --- SET LOCAL persists through RELEASE (which was not true in 8.0-8.2) -BEGIN; -SHOW vacuum_cost_delay; - vacuum_cost_delay -------------------- - 40ms -(1 row) - -SHOW datestyle; - DateStyle ------------ - ISO, YMD -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz ------------------------- - 2006-08-13 12:34:56-07 -(1 row) - -SAVEPOINT sp; -SET LOCAL vacuum_cost_delay TO 30; -SHOW vacuum_cost_delay; - vacuum_cost_delay -------------------- - 30ms -(1 row) - -SET LOCAL datestyle = 'Postgres, MDY'; -SHOW datestyle; - DateStyle ---------------- - Postgres, MDY -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz ------------------------------- - Sun Aug 13 12:34:56 2006 PDT -(1 row) - -RELEASE SAVEPOINT sp; -SHOW vacuum_cost_delay; - vacuum_cost_delay -------------------- - 30ms -(1 row) - -SHOW datestyle; - DateStyle ---------------- - Postgres, MDY -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz ------------------------------- - Sun Aug 13 12:34:56 2006 PDT -(1 row) - -ROLLBACK; -SHOW vacuum_cost_delay; - vacuum_cost_delay -------------------- - 40ms -(1 row) - -SHOW datestyle; - DateStyle ------------ - ISO, YMD -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz ------------------------- - 2006-08-13 12:34:56-07 -(1 row) - --- SET followed by SET LOCAL -BEGIN; -SET vacuum_cost_delay TO 40; -SET LOCAL vacuum_cost_delay TO 50; -SHOW vacuum_cost_delay; - vacuum_cost_delay -------------------- - 50ms -(1 row) - -SET datestyle = 'ISO, DMY'; -SET LOCAL datestyle = 'Postgres, MDY'; -SHOW datestyle; - DateStyle ---------------- - Postgres, MDY -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz ------------------------------- - Sun Aug 13 12:34:56 2006 PDT -(1 row) - -COMMIT; -SHOW vacuum_cost_delay; - vacuum_cost_delay -------------------- - 40ms -(1 row) - -SHOW datestyle; - DateStyle ------------ - ISO, DMY -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz ------------------------- - 2006-08-13 12:34:56-07 -(1 row) - --- --- Test RESET. We use datestyle because the reset value is forced by --- pg_regress, so it doesn't depend on the installation's configuration. --- -SET datestyle = iso, ymd; -SHOW datestyle; - DateStyle ------------ - ISO, YMD -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz ------------------------- - 2006-08-13 12:34:56-07 -(1 row) - -RESET datestyle; -SHOW datestyle; - DateStyle ---------------- - Postgres, MDY -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz ------------------------------- - Sun Aug 13 12:34:56 2006 PDT -(1 row) - --- Test some simple error cases -SET seq_page_cost TO 'NaN'; -ERROR: invalid value for parameter "seq_page_cost": "NaN" -SET vacuum_cost_delay TO '10s'; -ERROR: 10000 ms is outside the valid range for parameter "vacuum_cost_delay" (0 .. 100) -SET no_such_variable TO 42; -ERROR: unrecognized configuration parameter "no_such_variable" --- Test "custom" GUCs created on the fly (which aren't really an --- intended feature, but many people use them). -SHOW custom.my_guc; -- error, not known yet -ERROR: unrecognized configuration parameter "custom.my_guc" -SET custom.my_guc = 42; -SHOW custom.my_guc; - custom.my_guc ---------------- - 42 -(1 row) - -RESET custom.my_guc; -- this makes it go to empty, not become unknown again -SHOW custom.my_guc; - custom.my_guc ---------------- - -(1 row) - -SET custom.my.qualified.guc = 'foo'; -SHOW custom.my.qualified.guc; - custom.my.qualified.guc -------------------------- - foo -(1 row) - -SET custom."bad-guc" = 42; -- disallowed because -c cannot set this name -ERROR: invalid configuration parameter name "custom.bad-guc" -DETAIL: Custom parameter names must be two or more simple identifiers separated by dots. -SHOW custom."bad-guc"; -ERROR: unrecognized configuration parameter "custom.bad-guc" -SET special."weird name" = 'foo'; -- could be allowed, but we choose not to -ERROR: invalid configuration parameter name "special.weird name" -DETAIL: Custom parameter names must be two or more simple identifiers separated by dots. -SHOW special."weird name"; -ERROR: unrecognized configuration parameter "special.weird name" --- --- Test DISCARD TEMP --- -CREATE TEMP TABLE reset_test ( data text ) ON COMMIT DELETE ROWS; -SELECT relname FROM pg_class WHERE relname = 'reset_test'; - relname ------------- - reset_test -(1 row) - -DISCARD TEMP; -SELECT relname FROM pg_class WHERE relname = 'reset_test'; - relname ---------- -(0 rows) - --- --- Test DISCARD ALL --- --- do changes -DECLARE foo CURSOR WITH HOLD FOR SELECT 1; -PREPARE foo AS SELECT 1; -LISTEN foo_event; -SET vacuum_cost_delay = 13; -CREATE TEMP TABLE tmp_foo (data text) ON COMMIT DELETE ROWS; -CREATE ROLE regress_guc_user; -SET SESSION AUTHORIZATION regress_guc_user; --- look changes -SELECT pg_listening_channels(); - pg_listening_channels ------------------------ - foo_event -(1 row) - -SELECT name FROM pg_prepared_statements; - name ------- - foo -(1 row) - -SELECT name FROM pg_cursors; - name ------- - foo -(1 row) - -SHOW vacuum_cost_delay; - vacuum_cost_delay -------------------- - 13ms -(1 row) - -SELECT relname from pg_class where relname = 'tmp_foo'; - relname ---------- - tmp_foo -(1 row) - -SELECT current_user = 'regress_guc_user'; - ?column? ----------- - t -(1 row) - --- discard everything -DISCARD ALL; --- look again -SELECT pg_listening_channels(); - pg_listening_channels ------------------------ -(0 rows) - -SELECT name FROM pg_prepared_statements; - name ------- -(0 rows) - -SELECT name FROM pg_cursors; - name ------- -(0 rows) - -SHOW vacuum_cost_delay; - vacuum_cost_delay -------------------- - 0 -(1 row) - -SELECT relname from pg_class where relname = 'tmp_foo'; - relname ---------- -(0 rows) - -SELECT current_user = 'regress_guc_user'; - ?column? ----------- - f -(1 row) - -DROP ROLE regress_guc_user; --- --- search_path should react to changes in pg_namespace --- -set search_path = foo, public, not_there_initially; -select current_schemas(false); - current_schemas ------------------ - {public} -(1 row) - -create schema not_there_initially; -select current_schemas(false); - current_schemas ------------------------------- - {public,not_there_initially} -(1 row) - -drop schema not_there_initially; -select current_schemas(false); - current_schemas ------------------ - {public} -(1 row) - -reset search_path; --- --- Tests for function-local GUC settings --- -set work_mem = '3MB'; -create function report_guc(text) returns text as -$$ select current_setting($1) $$ language sql -set work_mem = '1MB'; -select report_guc('work_mem'), current_setting('work_mem'); - report_guc | current_setting -------------+----------------- - 1MB | 3MB -(1 row) - -alter function report_guc(text) set work_mem = '2MB'; -select report_guc('work_mem'), current_setting('work_mem'); - report_guc | current_setting -------------+----------------- - 2MB | 3MB -(1 row) - -alter function report_guc(text) reset all; -select report_guc('work_mem'), current_setting('work_mem'); - report_guc | current_setting -------------+----------------- - 3MB | 3MB -(1 row) - --- SET LOCAL is restricted by a function SET option -create or replace function myfunc(int) returns text as $$ -begin - set local work_mem = '2MB'; - return current_setting('work_mem'); -end $$ -language plpgsql -set work_mem = '1MB'; -select myfunc(0), current_setting('work_mem'); - myfunc | current_setting ---------+----------------- - 2MB | 3MB -(1 row) - -alter function myfunc(int) reset all; -select myfunc(0), current_setting('work_mem'); - myfunc | current_setting ---------+----------------- - 2MB | 2MB -(1 row) - -set work_mem = '3MB'; --- but SET isn't -create or replace function myfunc(int) returns text as $$ -begin - set work_mem = '2MB'; - return current_setting('work_mem'); -end $$ -language plpgsql -set work_mem = '1MB'; -select myfunc(0), current_setting('work_mem'); - myfunc | current_setting ---------+----------------- - 2MB | 2MB -(1 row) - -set work_mem = '3MB'; --- it should roll back on error, though -create or replace function myfunc(int) returns text as $$ -begin - set work_mem = '2MB'; - perform 1/$1; - return current_setting('work_mem'); -end $$ -language plpgsql -set work_mem = '1MB'; -select myfunc(0); -ERROR: division by zero -CONTEXT: SQL statement "SELECT 1/$1" -PL/pgSQL function myfunc(integer) line 4 at PERFORM -select current_setting('work_mem'); - current_setting ------------------ - 3MB -(1 row) - -select myfunc(1), current_setting('work_mem'); - myfunc | current_setting ---------+----------------- - 2MB | 2MB -(1 row) - --- check current_setting()'s behavior with invalid setting name -select current_setting('nosuch.setting'); -- FAIL -ERROR: unrecognized configuration parameter "nosuch.setting" -select current_setting('nosuch.setting', false); -- FAIL -ERROR: unrecognized configuration parameter "nosuch.setting" -select current_setting('nosuch.setting', true) is null; - ?column? ----------- - t -(1 row) - --- after this, all three cases should yield 'nada' -set nosuch.setting = 'nada'; -select current_setting('nosuch.setting'); - current_setting ------------------ - nada -(1 row) - -select current_setting('nosuch.setting', false); - current_setting ------------------ - nada -(1 row) - -select current_setting('nosuch.setting', true); - current_setting ------------------ - nada -(1 row) - --- Normally, CREATE FUNCTION should complain about invalid values in --- function SET options; but not if check_function_bodies is off, --- because that creates ordering hazards for pg_dump -create function func_with_bad_set() returns int as $$ select 1 $$ -language sql -set default_text_search_config = no_such_config; -NOTICE: text search configuration "no_such_config" does not exist -ERROR: invalid value for parameter "default_text_search_config": "no_such_config" -set check_function_bodies = off; -create function func_with_bad_set() returns int as $$ select 1 $$ -language sql -set default_text_search_config = no_such_config; -NOTICE: text search configuration "no_such_config" does not exist -select func_with_bad_set(); -ERROR: invalid value for parameter "default_text_search_config": "no_such_config" -reset check_function_bodies; -set default_with_oids to f; --- Should not allow to set it to true. -set default_with_oids to t; -ERROR: tables declared WITH OIDS are not supported +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/bitmapops.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/bitmapops.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/bitmapops.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/bitmapops.out 2023-02-20 19:47:53.179216486 -0500 @@ -1,38 +1 @@ --- Test bitmap AND and OR --- Generate enough data that we can test the lossy bitmaps. --- There's 55 tuples per page in the table. 53 is just --- below 55, so that an index scan with qual a = constant --- will return at least one hit per page. 59 is just above --- 55, so that an index scan with qual b = constant will return --- hits on most but not all pages. 53 and 59 are prime, so that --- there's a maximum number of a,b combinations in the table. --- That allows us to test all the different combinations of --- lossy and non-lossy pages with the minimum amount of data -CREATE TABLE bmscantest (a int, b int, t text); -INSERT INTO bmscantest - SELECT (r%53), (r%59), 'foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo' - FROM generate_series(1,70000) r; -CREATE INDEX i_bmtest_a ON bmscantest(a); -CREATE INDEX i_bmtest_b ON bmscantest(b); --- We want to use bitmapscans. With default settings, the planner currently --- chooses a bitmap scan for the queries below anyway, but let's make sure. -set enable_indexscan=false; -set enable_seqscan=false; --- Lower work_mem to trigger use of lossy bitmaps -set work_mem = 64; --- Test bitmap-and. -SELECT count(*) FROM bmscantest WHERE a = 1 AND b = 1; - count -------- - 23 -(1 row) - --- Test bitmap-or. -SELECT count(*) FROM bmscantest WHERE a = 1 OR b = 1; - count -------- - 2485 -(1 row) - --- clean up -DROP TABLE bmscantest; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/combocid.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/combocid.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/combocid.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/combocid.out 2023-02-20 19:47:53.199216486 -0500 @@ -1,169 +1 @@ --- --- Tests for some likely failure cases with combo cmin/cmax mechanism --- -CREATE TEMP TABLE combocidtest (foobar int); -BEGIN; --- a few dummy ops to push up the CommandId counter -INSERT INTO combocidtest SELECT 1 LIMIT 0; -INSERT INTO combocidtest SELECT 1 LIMIT 0; -INSERT INTO combocidtest SELECT 1 LIMIT 0; -INSERT INTO combocidtest SELECT 1 LIMIT 0; -INSERT INTO combocidtest SELECT 1 LIMIT 0; -INSERT INTO combocidtest SELECT 1 LIMIT 0; -INSERT INTO combocidtest SELECT 1 LIMIT 0; -INSERT INTO combocidtest SELECT 1 LIMIT 0; -INSERT INTO combocidtest SELECT 1 LIMIT 0; -INSERT INTO combocidtest SELECT 1 LIMIT 0; -INSERT INTO combocidtest VALUES (1); -INSERT INTO combocidtest VALUES (2); -SELECT ctid,cmin,* FROM combocidtest; - ctid | cmin | foobar --------+------+-------- - (0,1) | 10 | 1 - (0,2) | 11 | 2 -(2 rows) - -SAVEPOINT s1; -UPDATE combocidtest SET foobar = foobar + 10; --- here we should see only updated tuples -SELECT ctid,cmin,* FROM combocidtest; - ctid | cmin | foobar --------+------+-------- - (0,3) | 12 | 11 - (0,4) | 12 | 12 -(2 rows) - -ROLLBACK TO s1; --- now we should see old tuples, but with combo CIDs starting at 0 -SELECT ctid,cmin,* FROM combocidtest; - ctid | cmin | foobar --------+------+-------- - (0,1) | 0 | 1 - (0,2) | 1 | 2 -(2 rows) - -COMMIT; --- combo data is not there anymore, but should still see tuples -SELECT ctid,cmin,* FROM combocidtest; - ctid | cmin | foobar --------+------+-------- - (0,1) | 0 | 1 - (0,2) | 1 | 2 -(2 rows) - --- Test combo CIDs with portals -BEGIN; -INSERT INTO combocidtest VALUES (333); -DECLARE c CURSOR FOR SELECT ctid,cmin,* FROM combocidtest; -DELETE FROM combocidtest; -FETCH ALL FROM c; - ctid | cmin | foobar --------+------+-------- - (0,1) | 1 | 1 - (0,2) | 1 | 2 - (0,5) | 0 | 333 -(3 rows) - -ROLLBACK; -SELECT ctid,cmin,* FROM combocidtest; - ctid | cmin | foobar --------+------+-------- - (0,1) | 1 | 1 - (0,2) | 1 | 2 -(2 rows) - --- check behavior with locked tuples -BEGIN; --- a few dummy ops to push up the CommandId counter -INSERT INTO combocidtest SELECT 1 LIMIT 0; -INSERT INTO combocidtest SELECT 1 LIMIT 0; -INSERT INTO combocidtest SELECT 1 LIMIT 0; -INSERT INTO combocidtest SELECT 1 LIMIT 0; -INSERT INTO combocidtest SELECT 1 LIMIT 0; -INSERT INTO combocidtest SELECT 1 LIMIT 0; -INSERT INTO combocidtest SELECT 1 LIMIT 0; -INSERT INTO combocidtest SELECT 1 LIMIT 0; -INSERT INTO combocidtest SELECT 1 LIMIT 0; -INSERT INTO combocidtest SELECT 1 LIMIT 0; -INSERT INTO combocidtest VALUES (444); -SELECT ctid,cmin,* FROM combocidtest; - ctid | cmin | foobar --------+------+-------- - (0,1) | 1 | 1 - (0,2) | 1 | 2 - (0,6) | 10 | 444 -(3 rows) - -SAVEPOINT s1; --- this doesn't affect cmin -SELECT ctid,cmin,* FROM combocidtest FOR UPDATE; - ctid | cmin | foobar --------+------+-------- - (0,1) | 1 | 1 - (0,2) | 1 | 2 - (0,6) | 10 | 444 -(3 rows) - -SELECT ctid,cmin,* FROM combocidtest; - ctid | cmin | foobar --------+------+-------- - (0,1) | 1 | 1 - (0,2) | 1 | 2 - (0,6) | 10 | 444 -(3 rows) - --- but this does -UPDATE combocidtest SET foobar = foobar + 10; -SELECT ctid,cmin,* FROM combocidtest; - ctid | cmin | foobar --------+------+-------- - (0,7) | 12 | 11 - (0,8) | 12 | 12 - (0,9) | 12 | 454 -(3 rows) - -ROLLBACK TO s1; -SELECT ctid,cmin,* FROM combocidtest; - ctid | cmin | foobar --------+------+-------- - (0,1) | 12 | 1 - (0,2) | 12 | 2 - (0,6) | 0 | 444 -(3 rows) - -COMMIT; -SELECT ctid,cmin,* FROM combocidtest; - ctid | cmin | foobar --------+------+-------- - (0,1) | 12 | 1 - (0,2) | 12 | 2 - (0,6) | 0 | 444 -(3 rows) - --- test for bug reported in --- CABRT9RC81YUf1=jsmWopcKJEro=VoeG2ou6sPwyOUTx_qteRsg@mail.gmail.com -CREATE TABLE IF NOT EXISTS testcase( - id int PRIMARY KEY, - balance numeric -); -INSERT INTO testcase VALUES (1, 0); -BEGIN; -SELECT * FROM testcase WHERE testcase.id = 1 FOR UPDATE; - id | balance -----+--------- - 1 | 0 -(1 row) - -UPDATE testcase SET balance = balance + 400 WHERE id=1; -SAVEPOINT subxact; -UPDATE testcase SET balance = balance - 100 WHERE id=1; -ROLLBACK TO SAVEPOINT subxact; --- should return one tuple -SELECT * FROM testcase WHERE id = 1 FOR UPDATE; - id | balance -----+--------- - 1 | 400 -(1 row) - -ROLLBACK; -DROP TABLE testcase; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/tsearch.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/tsearch.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/tsearch.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/tsearch.out 2023-02-20 19:47:53.169216485 -0500 @@ -1,2853 +1 @@ --- --- Sanity checks for text search catalogs --- --- NB: we assume the oidjoins test will have caught any dangling links, --- that is OID or REGPROC fields that are not zero and do not match some --- row in the linked-to table. However, if we want to enforce that a link --- field can't be 0, we have to check it here. --- Find unexpected zero link entries -SELECT oid, prsname -FROM pg_ts_parser -WHERE prsnamespace = 0 OR prsstart = 0 OR prstoken = 0 OR prsend = 0 OR - -- prsheadline is optional - prslextype = 0; - oid | prsname ------+--------- -(0 rows) - -SELECT oid, dictname -FROM pg_ts_dict -WHERE dictnamespace = 0 OR dictowner = 0 OR dicttemplate = 0; - oid | dictname ------+---------- -(0 rows) - -SELECT oid, tmplname -FROM pg_ts_template -WHERE tmplnamespace = 0 OR tmpllexize = 0; -- tmplinit is optional - oid | tmplname ------+---------- -(0 rows) - -SELECT oid, cfgname -FROM pg_ts_config -WHERE cfgnamespace = 0 OR cfgowner = 0 OR cfgparser = 0; - oid | cfgname ------+--------- -(0 rows) - -SELECT mapcfg, maptokentype, mapseqno -FROM pg_ts_config_map -WHERE mapcfg = 0 OR mapdict = 0; - mapcfg | maptokentype | mapseqno ---------+--------------+---------- -(0 rows) - --- Look for pg_ts_config_map entries that aren't one of parser's token types -SELECT * FROM - ( SELECT oid AS cfgid, (ts_token_type(cfgparser)).tokid AS tokid - FROM pg_ts_config ) AS tt -RIGHT JOIN pg_ts_config_map AS m - ON (tt.cfgid=m.mapcfg AND tt.tokid=m.maptokentype) -WHERE - tt.cfgid IS NULL OR tt.tokid IS NULL; - cfgid | tokid | mapcfg | maptokentype | mapseqno | mapdict --------+-------+--------+--------------+----------+--------- -(0 rows) - --- test basic text search behavior without indexes, then with -SELECT count(*) FROM test_tsvector WHERE a @@ 'wr|qh'; - count -------- - 158 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'wr&qh'; - count -------- - 17 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'eq&yt'; - count -------- - 6 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'eq|yt'; - count -------- - 98 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '(eq&yt)|(wr&qh)'; - count -------- - 23 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '(eq|yt)&(wr|qh)'; - count -------- - 39 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'w:*|q:*'; - count -------- - 494 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ any ('{wr,qh}'); - count -------- - 158 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'no_such_lexeme'; - count -------- - 0 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!no_such_lexeme'; - count -------- - 508 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'pl <-> yh'; - count -------- - 1 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'yh <-> pl'; - count -------- - 0 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'qe <2> qt'; - count -------- - 1 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!pl <-> yh'; - count -------- - 3 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!pl <-> !yh'; - count -------- - 432 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!yh <-> pl'; - count -------- - 1 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!qe <2> qt'; - count -------- - 6 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!(pl <-> yh)'; - count -------- - 507 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!(yh <-> pl)'; - count -------- - 508 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!(qe <2> qt)'; - count -------- - 507 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'wd:A'; - count -------- - 56 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'wd:D'; - count -------- - 58 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!wd:A'; - count -------- - 452 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!wd:D'; - count -------- - 450 -(1 row) - -create index wowidx on test_tsvector using gist (a); -SET enable_seqscan=OFF; -SET enable_indexscan=ON; -SET enable_bitmapscan=OFF; -explain (costs off) SELECT count(*) FROM test_tsvector WHERE a @@ 'wr|qh'; - QUERY PLAN -------------------------------------------------------- - Aggregate - -> Index Scan using wowidx on test_tsvector - Index Cond: (a @@ '''wr'' | ''qh'''::tsquery) -(3 rows) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'wr|qh'; - count -------- - 158 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'wr&qh'; - count -------- - 17 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'eq&yt'; - count -------- - 6 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'eq|yt'; - count -------- - 98 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '(eq&yt)|(wr&qh)'; - count -------- - 23 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '(eq|yt)&(wr|qh)'; - count -------- - 39 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'w:*|q:*'; - count -------- - 494 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ any ('{wr,qh}'); - count -------- - 158 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'no_such_lexeme'; - count -------- - 0 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!no_such_lexeme'; - count -------- - 508 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'pl <-> yh'; - count -------- - 1 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'yh <-> pl'; - count -------- - 0 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'qe <2> qt'; - count -------- - 1 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!pl <-> yh'; - count -------- - 3 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!pl <-> !yh'; - count -------- - 432 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!yh <-> pl'; - count -------- - 1 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!qe <2> qt'; - count -------- - 6 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!(pl <-> yh)'; - count -------- - 507 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!(yh <-> pl)'; - count -------- - 508 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!(qe <2> qt)'; - count -------- - 507 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'wd:A'; - count -------- - 56 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'wd:D'; - count -------- - 58 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!wd:A'; - count -------- - 452 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!wd:D'; - count -------- - 450 -(1 row) - -SET enable_indexscan=OFF; -SET enable_bitmapscan=ON; -explain (costs off) SELECT count(*) FROM test_tsvector WHERE a @@ 'wr|qh'; - QUERY PLAN -------------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on test_tsvector - Recheck Cond: (a @@ '''wr'' | ''qh'''::tsquery) - -> Bitmap Index Scan on wowidx - Index Cond: (a @@ '''wr'' | ''qh'''::tsquery) -(5 rows) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'wr|qh'; - count -------- - 158 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'wr&qh'; - count -------- - 17 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'eq&yt'; - count -------- - 6 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'eq|yt'; - count -------- - 98 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '(eq&yt)|(wr&qh)'; - count -------- - 23 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '(eq|yt)&(wr|qh)'; - count -------- - 39 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'w:*|q:*'; - count -------- - 494 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ any ('{wr,qh}'); - count -------- - 158 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'no_such_lexeme'; - count -------- - 0 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!no_such_lexeme'; - count -------- - 508 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'pl <-> yh'; - count -------- - 1 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'yh <-> pl'; - count -------- - 0 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'qe <2> qt'; - count -------- - 1 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!pl <-> yh'; - count -------- - 3 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!pl <-> !yh'; - count -------- - 432 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!yh <-> pl'; - count -------- - 1 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!qe <2> qt'; - count -------- - 6 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!(pl <-> yh)'; - count -------- - 507 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!(yh <-> pl)'; - count -------- - 508 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!(qe <2> qt)'; - count -------- - 507 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'wd:A'; - count -------- - 56 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'wd:D'; - count -------- - 58 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!wd:A'; - count -------- - 452 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!wd:D'; - count -------- - 450 -(1 row) - --- Test siglen parameter of GiST tsvector_ops -CREATE INDEX wowidx1 ON test_tsvector USING gist (a tsvector_ops(foo=1)); -ERROR: unrecognized parameter "foo" -CREATE INDEX wowidx1 ON test_tsvector USING gist (a tsvector_ops(siglen=0)); -ERROR: value 0 out of bounds for option "siglen" -DETAIL: Valid values are between "1" and "2024". -CREATE INDEX wowidx1 ON test_tsvector USING gist (a tsvector_ops(siglen=2048)); -ERROR: value 2048 out of bounds for option "siglen" -DETAIL: Valid values are between "1" and "2024". -CREATE INDEX wowidx1 ON test_tsvector USING gist (a tsvector_ops(siglen=100,foo='bar')); -ERROR: unrecognized parameter "foo" -CREATE INDEX wowidx1 ON test_tsvector USING gist (a tsvector_ops(siglen=100, siglen = 200)); -ERROR: parameter "siglen" specified more than once -CREATE INDEX wowidx2 ON test_tsvector USING gist (a tsvector_ops(siglen=1)); -\d test_tsvector - Table "public.test_tsvector" - Column | Type | Collation | Nullable | Default ---------+----------+-----------+----------+--------- - t | text | | | - a | tsvector | | | -Indexes: - "wowidx" gist (a) - "wowidx2" gist (a tsvector_ops (siglen='1')) - -DROP INDEX wowidx; -EXPLAIN (costs off) SELECT count(*) FROM test_tsvector WHERE a @@ 'wr|qh'; - QUERY PLAN -------------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on test_tsvector - Recheck Cond: (a @@ '''wr'' | ''qh'''::tsquery) - -> Bitmap Index Scan on wowidx2 - Index Cond: (a @@ '''wr'' | ''qh'''::tsquery) -(5 rows) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'wr|qh'; - count -------- - 158 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'wr&qh'; - count -------- - 17 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'eq&yt'; - count -------- - 6 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'eq|yt'; - count -------- - 98 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '(eq&yt)|(wr&qh)'; - count -------- - 23 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '(eq|yt)&(wr|qh)'; - count -------- - 39 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'w:*|q:*'; - count -------- - 494 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ any ('{wr,qh}'); - count -------- - 158 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'no_such_lexeme'; - count -------- - 0 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!no_such_lexeme'; - count -------- - 508 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'pl <-> yh'; - count -------- - 1 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'yh <-> pl'; - count -------- - 0 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'qe <2> qt'; - count -------- - 1 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!pl <-> yh'; - count -------- - 3 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!pl <-> !yh'; - count -------- - 432 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!yh <-> pl'; - count -------- - 1 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!qe <2> qt'; - count -------- - 6 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!(pl <-> yh)'; - count -------- - 507 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!(yh <-> pl)'; - count -------- - 508 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!(qe <2> qt)'; - count -------- - 507 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'wd:A'; - count -------- - 56 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'wd:D'; - count -------- - 58 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!wd:A'; - count -------- - 452 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!wd:D'; - count -------- - 450 -(1 row) - -DROP INDEX wowidx2; -CREATE INDEX wowidx ON test_tsvector USING gist (a tsvector_ops(siglen=484)); -\d test_tsvector - Table "public.test_tsvector" - Column | Type | Collation | Nullable | Default ---------+----------+-----------+----------+--------- - t | text | | | - a | tsvector | | | -Indexes: - "wowidx" gist (a tsvector_ops (siglen='484')) - -EXPLAIN (costs off) SELECT count(*) FROM test_tsvector WHERE a @@ 'wr|qh'; - QUERY PLAN -------------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on test_tsvector - Recheck Cond: (a @@ '''wr'' | ''qh'''::tsquery) - -> Bitmap Index Scan on wowidx - Index Cond: (a @@ '''wr'' | ''qh'''::tsquery) -(5 rows) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'wr|qh'; - count -------- - 158 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'wr&qh'; - count -------- - 17 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'eq&yt'; - count -------- - 6 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'eq|yt'; - count -------- - 98 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '(eq&yt)|(wr&qh)'; - count -------- - 23 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '(eq|yt)&(wr|qh)'; - count -------- - 39 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'w:*|q:*'; - count -------- - 494 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ any ('{wr,qh}'); - count -------- - 158 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'no_such_lexeme'; - count -------- - 0 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!no_such_lexeme'; - count -------- - 508 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'pl <-> yh'; - count -------- - 1 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'yh <-> pl'; - count -------- - 0 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'qe <2> qt'; - count -------- - 1 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!pl <-> yh'; - count -------- - 3 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!pl <-> !yh'; - count -------- - 432 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!yh <-> pl'; - count -------- - 1 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!qe <2> qt'; - count -------- - 6 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!(pl <-> yh)'; - count -------- - 507 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!(yh <-> pl)'; - count -------- - 508 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!(qe <2> qt)'; - count -------- - 507 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'wd:A'; - count -------- - 56 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'wd:D'; - count -------- - 58 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!wd:A'; - count -------- - 452 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!wd:D'; - count -------- - 450 -(1 row) - -RESET enable_seqscan; -RESET enable_indexscan; -RESET enable_bitmapscan; -DROP INDEX wowidx; -CREATE INDEX wowidx ON test_tsvector USING gin (a); -SET enable_seqscan=OFF; --- GIN only supports bitmapscan, so no need to test plain indexscan -explain (costs off) SELECT count(*) FROM test_tsvector WHERE a @@ 'wr|qh'; - QUERY PLAN -------------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on test_tsvector - Recheck Cond: (a @@ '''wr'' | ''qh'''::tsquery) - -> Bitmap Index Scan on wowidx - Index Cond: (a @@ '''wr'' | ''qh'''::tsquery) -(5 rows) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'wr|qh'; - count -------- - 158 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'wr&qh'; - count -------- - 17 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'eq&yt'; - count -------- - 6 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'eq|yt'; - count -------- - 98 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '(eq&yt)|(wr&qh)'; - count -------- - 23 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '(eq|yt)&(wr|qh)'; - count -------- - 39 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'w:*|q:*'; - count -------- - 494 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ any ('{wr,qh}'); - count -------- - 158 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'no_such_lexeme'; - count -------- - 0 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!no_such_lexeme'; - count -------- - 508 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'pl <-> yh'; - count -------- - 1 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'yh <-> pl'; - count -------- - 0 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'qe <2> qt'; - count -------- - 1 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!pl <-> yh'; - count -------- - 3 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!pl <-> !yh'; - count -------- - 432 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!yh <-> pl'; - count -------- - 1 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!qe <2> qt'; - count -------- - 6 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!(pl <-> yh)'; - count -------- - 507 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!(yh <-> pl)'; - count -------- - 508 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!(qe <2> qt)'; - count -------- - 507 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'wd:A'; - count -------- - 56 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'wd:D'; - count -------- - 58 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!wd:A'; - count -------- - 452 -(1 row) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!wd:D'; - count -------- - 450 -(1 row) - --- Test optimization of non-empty GIN_SEARCH_MODE_ALL queries -EXPLAIN (COSTS OFF) -SELECT count(*) FROM test_tsvector WHERE a @@ '!qh'; - QUERY PLAN ------------------------------------------------------ - Aggregate - -> Bitmap Heap Scan on test_tsvector - Recheck Cond: (a @@ '!''qh'''::tsquery) - -> Bitmap Index Scan on wowidx - Index Cond: (a @@ '!''qh'''::tsquery) -(5 rows) - -SELECT count(*) FROM test_tsvector WHERE a @@ '!qh'; - count -------- - 410 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT count(*) FROM test_tsvector WHERE a @@ 'wr' AND a @@ '!qh'; - QUERY PLAN ------------------------------------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on test_tsvector - Recheck Cond: ((a @@ '''wr'''::tsquery) AND (a @@ '!''qh'''::tsquery)) - -> Bitmap Index Scan on wowidx - Index Cond: ((a @@ '''wr'''::tsquery) AND (a @@ '!''qh'''::tsquery)) -(5 rows) - -SELECT count(*) FROM test_tsvector WHERE a @@ 'wr' AND a @@ '!qh'; - count -------- - 60 -(1 row) - -RESET enable_seqscan; -INSERT INTO test_tsvector VALUES ('???', 'DFG:1A,2B,6C,10 FGH'); -SELECT * FROM ts_stat('SELECT a FROM test_tsvector') ORDER BY ndoc DESC, nentry DESC, word LIMIT 10; - word | ndoc | nentry -------+------+-------- - qq | 108 | 108 - qt | 102 | 102 - qe | 100 | 101 - qh | 98 | 99 - qw | 98 | 98 - qa | 97 | 97 - ql | 94 | 94 - qs | 94 | 94 - qr | 92 | 93 - qi | 92 | 92 -(10 rows) - -SELECT * FROM ts_stat('SELECT a FROM test_tsvector', 'AB') ORDER BY ndoc DESC, nentry DESC, word; - word | ndoc | nentry -------+------+-------- - DFG | 1 | 2 -(1 row) - ---dictionaries and to_tsvector -SELECT ts_lexize('english_stem', 'skies'); - ts_lexize ------------ - {sky} -(1 row) - -SELECT ts_lexize('english_stem', 'identity'); - ts_lexize ------------ - {ident} -(1 row) - -SELECT * FROM ts_token_type('default'); - tokid | alias | description --------+-----------------+------------------------------------------ - 1 | asciiword | Word, all ASCII - 2 | word | Word, all letters - 3 | numword | Word, letters and digits - 4 | email | Email address - 5 | url | URL - 6 | host | Host - 7 | sfloat | Scientific notation - 8 | version | Version number - 9 | hword_numpart | Hyphenated word part, letters and digits - 10 | hword_part | Hyphenated word part, all letters - 11 | hword_asciipart | Hyphenated word part, all ASCII - 12 | blank | Space symbols - 13 | tag | XML tag - 14 | protocol | Protocol head - 15 | numhword | Hyphenated word, letters and digits - 16 | asciihword | Hyphenated word, all ASCII - 17 | hword | Hyphenated word, all letters - 18 | url_path | URL path - 19 | file | File or path name - 20 | float | Decimal notation - 21 | int | Signed integer - 22 | uint | Unsigned integer - 23 | entity | XML entity -(23 rows) - -SELECT * FROM ts_parse('default', '345 qwe@efd.r '' http://www.com/ http://aew.werc.ewr/?ad=qwe&dw 1aew.werc.ewr/?ad=qwe&dw 2aew.werc.ewr http://3aew.werc.ewr/?ad=qwe&dw http://4aew.werc.ewr http://5aew.werc.ewr:8100/? ad=qwe&dw 6aew.werc.ewr:8100/?ad=qwe&dw 7aew.werc.ewr:8100/?ad=qwe&dw=%20%32 +4.0e-10 qwe qwe qwqwe 234.435 455 5.005 teodor@stack.net teodor@123-stack.net 123_teodor@stack.net 123-teodor@stack.net qwe-wer asdf qwer jf sdjk ewr1> ewri2 -/usr/local/fff /awdf/dwqe/4325 rewt/ewr wefjn /wqe-324/ewr gist.h gist.h.c gist.c. readline 4.2 4.2. 4.2, readline-4.2 readline-4.2. 234 - wow < jqw <> qwerty'); - tokid | token --------+-------------------------------------- - 22 | 345 - 12 | - 1 | qwe - 12 | @ - 19 | efd.r - 12 | ' - 14 | http:// - 6 | www.com - 12 | / - 14 | http:// - 5 | aew.werc.ewr/?ad=qwe&dw - 6 | aew.werc.ewr - 18 | /?ad=qwe&dw - 12 | - 5 | 1aew.werc.ewr/?ad=qwe&dw - 6 | 1aew.werc.ewr - 18 | /?ad=qwe&dw - 12 | - 6 | 2aew.werc.ewr - 12 | - 14 | http:// - 5 | 3aew.werc.ewr/?ad=qwe&dw - 6 | 3aew.werc.ewr - 18 | /?ad=qwe&dw - 12 | - 14 | http:// - 6 | 4aew.werc.ewr - 12 | - 14 | http:// - 5 | 5aew.werc.ewr:8100/? - 6 | 5aew.werc.ewr:8100 - 18 | /? - 12 | - 1 | ad - 12 | = - 1 | qwe - 12 | & - 1 | dw - 12 | - 5 | 6aew.werc.ewr:8100/?ad=qwe&dw - 6 | 6aew.werc.ewr:8100 - 18 | /?ad=qwe&dw - 12 | - 5 | 7aew.werc.ewr:8100/?ad=qwe&dw=%20%32 - 6 | 7aew.werc.ewr:8100 - 18 | /?ad=qwe&dw=%20%32 - 12 | - 7 | +4.0e-10 - 12 | - 1 | qwe - 12 | - 1 | qwe - 12 | - 1 | qwqwe - 12 | - 20 | 234.435 - 12 | - 22 | 455 - 12 | - 20 | 5.005 - 12 | - 4 | teodor@stack.net - 12 | - 4 | teodor@123-stack.net - 12 | - 4 | 123_teodor@stack.net - 12 | - 4 | 123-teodor@stack.net - 12 | - 16 | qwe-wer - 11 | qwe - 12 | - - 11 | wer - 12 | - 1 | asdf - 12 | - 13 | - 1 | qwer - 12 | - 1 | jf - 12 | - 1 | sdjk - 12 | < - 1 | we - 12 | - 1 | hjwer - 12 | - 13 | - 12 | - 3 | ewr1 - 12 | > - 3 | ewri2 - 12 | - 13 | - 12 | + - | - 19 | /usr/local/fff - 12 | - 19 | /awdf/dwqe/4325 - 12 | - 19 | rewt/ewr - 12 | - 1 | wefjn - 12 | - 19 | /wqe-324/ewr - 12 | - 19 | gist.h - 12 | - 19 | gist.h.c - 12 | - 19 | gist.c - 12 | . - 1 | readline - 12 | - 20 | 4.2 - 12 | - 20 | 4.2 - 12 | . - 20 | 4.2 - 12 | , - 1 | readline - 20 | -4.2 - 12 | - 1 | readline - 20 | -4.2 - 12 | . - 22 | 234 - 12 | + - | - 12 | < - 1 | i - 12 | - 13 | - 12 | - 1 | wow - 12 | - 12 | < - 1 | jqw - 12 | - 12 | <> - 1 | qwerty -(139 rows) - -SELECT to_tsvector('english', '345 qwe@efd.r '' http://www.com/ http://aew.werc.ewr/?ad=qwe&dw 1aew.werc.ewr/?ad=qwe&dw 2aew.werc.ewr http://3aew.werc.ewr/?ad=qwe&dw http://4aew.werc.ewr http://5aew.werc.ewr:8100/? ad=qwe&dw 6aew.werc.ewr:8100/?ad=qwe&dw 7aew.werc.ewr:8100/?ad=qwe&dw=%20%32 +4.0e-10 qwe qwe qwqwe 234.435 455 5.005 teodor@stack.net teodor@123-stack.net 123_teodor@stack.net 123-teodor@stack.net qwe-wer asdf qwer jf sdjk ewr1> ewri2 -/usr/local/fff /awdf/dwqe/4325 rewt/ewr wefjn /wqe-324/ewr gist.h gist.h.c gist.c. readline 4.2 4.2. 4.2, readline-4.2 readline-4.2. 234 - wow < jqw <> qwerty'); - to_tsvector ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - '+4.0e-10':28 '-4.2':63,65 '/?':18 '/?ad=qwe&dw':7,10,14,24 '/?ad=qwe&dw=%20%32':27 '/awdf/dwqe/4325':51 '/usr/local/fff':50 '/wqe-324/ewr':54 '123-teodor@stack.net':38 '123_teodor@stack.net':37 '1aew.werc.ewr':9 '1aew.werc.ewr/?ad=qwe&dw':8 '234':66 '234.435':32 '2aew.werc.ewr':11 '345':1 '3aew.werc.ewr':13 '3aew.werc.ewr/?ad=qwe&dw':12 '4.2':59,60,61 '455':33 '4aew.werc.ewr':15 '5.005':34 '5aew.werc.ewr:8100':17 '5aew.werc.ewr:8100/?':16 '6aew.werc.ewr:8100':23 '6aew.werc.ewr:8100/?ad=qwe&dw':22 '7aew.werc.ewr:8100':26 '7aew.werc.ewr:8100/?ad=qwe&dw=%20%32':25 'ad':19 'aew.werc.ewr':6 'aew.werc.ewr/?ad=qwe&dw':5 'asdf':42 'dw':21 'efd.r':3 'ewr1':48 'ewri2':49 'gist.c':57 'gist.h':55 'gist.h.c':56 'hjwer':47 'jf':44 'jqw':69 'qwe':2,20,29,30,40 'qwe-wer':39 'qwer':43 'qwerti':70 'qwqwe':31 'readlin':58,62,64 'rewt/ewr':52 'sdjk':45 'teodor@123-stack.net':36 'teodor@stack.net':35 'wefjn':53 'wer':41 'wow':68 'www.com':4 -(1 row) - -SELECT length(to_tsvector('english', '345 qwe@efd.r '' http://www.com/ http://aew.werc.ewr/?ad=qwe&dw 1aew.werc.ewr/?ad=qwe&dw 2aew.werc.ewr http://3aew.werc.ewr/?ad=qwe&dw http://4aew.werc.ewr http://5aew.werc.ewr:8100/? ad=qwe&dw 6aew.werc.ewr:8100/?ad=qwe&dw 7aew.werc.ewr:8100/?ad=qwe&dw=%20%32 +4.0e-10 qwe qwe qwqwe 234.435 455 5.005 teodor@stack.net teodor@123-stack.net 123_teodor@stack.net 123-teodor@stack.net qwe-wer asdf qwer jf sdjk ewr1> ewri2 -/usr/local/fff /awdf/dwqe/4325 rewt/ewr wefjn /wqe-324/ewr gist.h gist.h.c gist.c. readline 4.2 4.2. 4.2, readline-4.2 readline-4.2. 234 - wow < jqw <> qwerty')); - length --------- - 56 -(1 row) - --- ts_debug -SELECT * from ts_debug('english', 'abc&nm1;def©ghiõjkl'); - alias | description | token | dictionaries | dictionary | lexemes ------------+-----------------+----------------------------+----------------+--------------+--------- - tag | XML tag | | {} | | - asciiword | Word, all ASCII | abc | {english_stem} | english_stem | {abc} - entity | XML entity | &nm1; | {} | | - asciiword | Word, all ASCII | def | {english_stem} | english_stem | {def} - entity | XML entity | © | {} | | - asciiword | Word, all ASCII | ghi | {english_stem} | english_stem | {ghi} - entity | XML entity | õ | {} | | - asciiword | Word, all ASCII | jkl | {english_stem} | english_stem | {jkl} - tag | XML tag | | {} | | -(9 rows) - --- check parsing of URLs -SELECT * from ts_debug('english', 'http://www.harewoodsolutions.co.uk/press.aspx'); - alias | description | token | dictionaries | dictionary | lexemes -----------+---------------+----------------------------------------+--------------+------------+------------------------------------------ - protocol | Protocol head | http:// | {} | | - url | URL | www.harewoodsolutions.co.uk/press.aspx | {simple} | simple | {www.harewoodsolutions.co.uk/press.aspx} - host | Host | www.harewoodsolutions.co.uk | {simple} | simple | {www.harewoodsolutions.co.uk} - url_path | URL path | /press.aspx | {simple} | simple | {/press.aspx} - tag | XML tag | | {} | | -(5 rows) - -SELECT * from ts_debug('english', 'http://aew.wer0c.ewr/id?ad=qwe&dw'); - alias | description | token | dictionaries | dictionary | lexemes -----------+---------------+----------------------------+--------------+------------+------------------------------ - protocol | Protocol head | http:// | {} | | - url | URL | aew.wer0c.ewr/id?ad=qwe&dw | {simple} | simple | {aew.wer0c.ewr/id?ad=qwe&dw} - host | Host | aew.wer0c.ewr | {simple} | simple | {aew.wer0c.ewr} - url_path | URL path | /id?ad=qwe&dw | {simple} | simple | {/id?ad=qwe&dw} - tag | XML tag | | {} | | -(5 rows) - -SELECT * from ts_debug('english', 'http://5aew.werc.ewr:8100/?'); - alias | description | token | dictionaries | dictionary | lexemes -----------+---------------+----------------------+--------------+------------+------------------------ - protocol | Protocol head | http:// | {} | | - url | URL | 5aew.werc.ewr:8100/? | {simple} | simple | {5aew.werc.ewr:8100/?} - host | Host | 5aew.werc.ewr:8100 | {simple} | simple | {5aew.werc.ewr:8100} - url_path | URL path | /? | {simple} | simple | {/?} -(4 rows) - -SELECT * from ts_debug('english', '5aew.werc.ewr:8100/?xx'); - alias | description | token | dictionaries | dictionary | lexemes -----------+-------------+------------------------+--------------+------------+-------------------------- - url | URL | 5aew.werc.ewr:8100/?xx | {simple} | simple | {5aew.werc.ewr:8100/?xx} - host | Host | 5aew.werc.ewr:8100 | {simple} | simple | {5aew.werc.ewr:8100} - url_path | URL path | /?xx | {simple} | simple | {/?xx} -(3 rows) - -SELECT token, alias, - dictionaries, dictionaries is null as dnull, array_dims(dictionaries) as ddims, - lexemes, lexemes is null as lnull, array_dims(lexemes) as ldims -from ts_debug('english', 'a title'); - token | alias | dictionaries | dnull | ddims | lexemes | lnull | ldims --------+-----------+----------------+-------+-------+---------+-------+------- - a | asciiword | {english_stem} | f | [1:1] | {} | f | - | blank | {} | f | | | t | - title | asciiword | {english_stem} | f | [1:1] | {titl} | f | [1:1] -(3 rows) - --- to_tsquery -SELECT to_tsquery('english', 'qwe & sKies '); - to_tsquery ---------------- - 'qwe' & 'sky' -(1 row) - -SELECT to_tsquery('simple', 'qwe & sKies '); - to_tsquery ------------------ - 'qwe' & 'skies' -(1 row) - -SELECT to_tsquery('english', '''the wether'':dc & '' sKies '':BC '); - to_tsquery ------------------------- - 'wether':CD & 'sky':BC -(1 row) - -SELECT to_tsquery('english', 'asd&(and|fghj)'); - to_tsquery ----------------- - 'asd' & 'fghj' -(1 row) - -SELECT to_tsquery('english', '(asd&and)|fghj'); - to_tsquery ----------------- - 'asd' | 'fghj' -(1 row) - -SELECT to_tsquery('english', '(asd&!and)|fghj'); - to_tsquery ----------------- - 'asd' | 'fghj' -(1 row) - -SELECT to_tsquery('english', '(the|and&(i&1))&fghj'); - to_tsquery --------------- - '1' & 'fghj' -(1 row) - -SELECT plainto_tsquery('english', 'the and z 1))& fghj'); - plainto_tsquery --------------------- - 'z' & '1' & 'fghj' -(1 row) - -SELECT plainto_tsquery('english', 'foo bar') && plainto_tsquery('english', 'asd'); - ?column? ------------------------ - 'foo' & 'bar' & 'asd' -(1 row) - -SELECT plainto_tsquery('english', 'foo bar') || plainto_tsquery('english', 'asd fg'); - ?column? ------------------------------- - 'foo' & 'bar' | 'asd' & 'fg' -(1 row) - -SELECT plainto_tsquery('english', 'foo bar') || !!plainto_tsquery('english', 'asd fg'); - ?column? ------------------------------------ - 'foo' & 'bar' | !( 'asd' & 'fg' ) -(1 row) - -SELECT plainto_tsquery('english', 'foo bar') && 'asd | fg'; - ?column? ----------------------------------- - 'foo' & 'bar' & ( 'asd' | 'fg' ) -(1 row) - --- Check stop word deletion, a and s are stop-words -SELECT to_tsquery('english', '!(a & !b) & c'); - to_tsquery -------------- - !!'b' & 'c' -(1 row) - -SELECT to_tsquery('english', '!(a & !b)'); - to_tsquery ------------- - !!'b' -(1 row) - -SELECT to_tsquery('english', '(1 <-> 2) <-> a'); - to_tsquery -------------- - '1' <-> '2' -(1 row) - -SELECT to_tsquery('english', '(1 <-> a) <-> 2'); - to_tsquery -------------- - '1' <2> '2' -(1 row) - -SELECT to_tsquery('english', '(a <-> 1) <-> 2'); - to_tsquery -------------- - '1' <-> '2' -(1 row) - -SELECT to_tsquery('english', 'a <-> (1 <-> 2)'); - to_tsquery -------------- - '1' <-> '2' -(1 row) - -SELECT to_tsquery('english', '1 <-> (a <-> 2)'); - to_tsquery -------------- - '1' <2> '2' -(1 row) - -SELECT to_tsquery('english', '1 <-> (2 <-> a)'); - to_tsquery -------------- - '1' <-> '2' -(1 row) - -SELECT to_tsquery('english', '(1 <-> 2) <3> a'); - to_tsquery -------------- - '1' <-> '2' -(1 row) - -SELECT to_tsquery('english', '(1 <-> a) <3> 2'); - to_tsquery -------------- - '1' <4> '2' -(1 row) - -SELECT to_tsquery('english', '(a <-> 1) <3> 2'); - to_tsquery -------------- - '1' <3> '2' -(1 row) - -SELECT to_tsquery('english', 'a <3> (1 <-> 2)'); - to_tsquery -------------- - '1' <-> '2' -(1 row) - -SELECT to_tsquery('english', '1 <3> (a <-> 2)'); - to_tsquery -------------- - '1' <4> '2' -(1 row) - -SELECT to_tsquery('english', '1 <3> (2 <-> a)'); - to_tsquery -------------- - '1' <3> '2' -(1 row) - -SELECT to_tsquery('english', '(1 <3> 2) <-> a'); - to_tsquery -------------- - '1' <3> '2' -(1 row) - -SELECT to_tsquery('english', '(1 <3> a) <-> 2'); - to_tsquery -------------- - '1' <4> '2' -(1 row) - -SELECT to_tsquery('english', '(a <3> 1) <-> 2'); - to_tsquery -------------- - '1' <-> '2' -(1 row) - -SELECT to_tsquery('english', 'a <-> (1 <3> 2)'); - to_tsquery -------------- - '1' <3> '2' -(1 row) - -SELECT to_tsquery('english', '1 <-> (a <3> 2)'); - to_tsquery -------------- - '1' <4> '2' -(1 row) - -SELECT to_tsquery('english', '1 <-> (2 <3> a)'); - to_tsquery -------------- - '1' <-> '2' -(1 row) - -SELECT to_tsquery('english', '((a <-> 1) <-> 2) <-> s'); - to_tsquery -------------- - '1' <-> '2' -(1 row) - -SELECT to_tsquery('english', '(2 <-> (a <-> 1)) <-> s'); - to_tsquery -------------- - '2' <2> '1' -(1 row) - -SELECT to_tsquery('english', '((1 <-> a) <-> 2) <-> s'); - to_tsquery -------------- - '1' <2> '2' -(1 row) - -SELECT to_tsquery('english', '(2 <-> (1 <-> a)) <-> s'); - to_tsquery -------------- - '2' <-> '1' -(1 row) - -SELECT to_tsquery('english', 's <-> ((a <-> 1) <-> 2)'); - to_tsquery -------------- - '1' <-> '2' -(1 row) - -SELECT to_tsquery('english', 's <-> (2 <-> (a <-> 1))'); - to_tsquery -------------- - '2' <2> '1' -(1 row) - -SELECT to_tsquery('english', 's <-> ((1 <-> a) <-> 2)'); - to_tsquery -------------- - '1' <2> '2' -(1 row) - -SELECT to_tsquery('english', 's <-> (2 <-> (1 <-> a))'); - to_tsquery -------------- - '2' <-> '1' -(1 row) - -SELECT to_tsquery('english', '((a <-> 1) <-> s) <-> 2'); - to_tsquery -------------- - '1' <2> '2' -(1 row) - -SELECT to_tsquery('english', '(s <-> (a <-> 1)) <-> 2'); - to_tsquery -------------- - '1' <-> '2' -(1 row) - -SELECT to_tsquery('english', '((1 <-> a) <-> s) <-> 2'); - to_tsquery -------------- - '1' <3> '2' -(1 row) - -SELECT to_tsquery('english', '(s <-> (1 <-> a)) <-> 2'); - to_tsquery -------------- - '1' <2> '2' -(1 row) - -SELECT to_tsquery('english', '2 <-> ((a <-> 1) <-> s)'); - to_tsquery -------------- - '2' <2> '1' -(1 row) - -SELECT to_tsquery('english', '2 <-> (s <-> (a <-> 1))'); - to_tsquery -------------- - '2' <3> '1' -(1 row) - -SELECT to_tsquery('english', '2 <-> ((1 <-> a) <-> s)'); - to_tsquery -------------- - '2' <-> '1' -(1 row) - -SELECT to_tsquery('english', '2 <-> (s <-> (1 <-> a))'); - to_tsquery -------------- - '2' <2> '1' -(1 row) - -SELECT to_tsquery('english', 'foo <-> (a <-> (the <-> bar))'); - to_tsquery ------------------ - 'foo' <3> 'bar' -(1 row) - -SELECT to_tsquery('english', '((foo <-> a) <-> the) <-> bar'); - to_tsquery ------------------ - 'foo' <3> 'bar' -(1 row) - -SELECT to_tsquery('english', 'foo <-> a <-> the <-> bar'); - to_tsquery ------------------ - 'foo' <3> 'bar' -(1 row) - -SELECT phraseto_tsquery('english', 'PostgreSQL can be extended by the user in many ways'); - phraseto_tsquery ------------------------------------------------------------ - 'postgresql' <3> 'extend' <3> 'user' <2> 'mani' <-> 'way' -(1 row) - -SELECT ts_rank_cd(to_tsvector('english', ' -Day after day, day after day, - We stuck, nor breath nor motion, -As idle as a painted Ship - Upon a painted Ocean. -Water, water, every where - And all the boards did shrink; -Water, water, every where, - Nor any drop to drink. -S. T. Coleridge (1772-1834) -'), to_tsquery('english', 'paint&water')); - ts_rank_cd ------------- - 0.05 -(1 row) - -SELECT ts_rank_cd(to_tsvector('english', ' -Day after day, day after day, - We stuck, nor breath nor motion, -As idle as a painted Ship - Upon a painted Ocean. -Water, water, every where - And all the boards did shrink; -Water, water, every where, - Nor any drop to drink. -S. T. Coleridge (1772-1834) -'), to_tsquery('english', 'breath&motion&water')); - ts_rank_cd -------------- - 0.008333334 -(1 row) - -SELECT ts_rank_cd(to_tsvector('english', ' -Day after day, day after day, - We stuck, nor breath nor motion, -As idle as a painted Ship - Upon a painted Ocean. -Water, water, every where - And all the boards did shrink; -Water, water, every where, - Nor any drop to drink. -S. T. Coleridge (1772-1834) -'), to_tsquery('english', 'ocean')); - ts_rank_cd ------------- - 0.1 -(1 row) - -SELECT ts_rank_cd(to_tsvector('english', ' -Day after day, day after day, - We stuck, nor breath nor motion, -As idle as a painted Ship - Upon a painted Ocean. -Water, water, every where - And all the boards did shrink; -Water, water, every where, - Nor any drop to drink. -S. T. Coleridge (1772-1834) -'), to_tsquery('english', 'painted <-> Ship')); - ts_rank_cd ------------- - 0.1 -(1 row) - -SELECT ts_rank_cd(strip(to_tsvector('both stripped')), - to_tsquery('both & stripped')); - ts_rank_cd ------------- - 0 -(1 row) - -SELECT ts_rank_cd(to_tsvector('unstripped') || strip(to_tsvector('stripped')), - to_tsquery('unstripped & stripped')); - ts_rank_cd ------------- - 0 -(1 row) - ---headline tests -SELECT ts_headline('english', ' -Day after day, day after day, - We stuck, nor breath nor motion, -As idle as a painted Ship - Upon a painted Ocean. -Water, water, every where - And all the boards did shrink; -Water, water, every where, - Nor any drop to drink. -S. T. Coleridge (1772-1834) -', to_tsquery('english', 'paint&water')); - ts_headline ------------------------------------------ - painted Ocean. + - Water, water, every where+ - And all the boards did shrink; + - Water, water, every -(1 row) - -SELECT ts_headline('english', ' -Day after day, day after day, - We stuck, nor breath nor motion, -As idle as a painted Ship - Upon a painted Ocean. -Water, water, every where - And all the boards did shrink; -Water, water, every where, - Nor any drop to drink. -S. T. Coleridge (1772-1834) -', to_tsquery('english', 'breath&motion&water')); - ts_headline ----------------------------------- - breath nor motion,+ - As idle as a painted Ship + - Upon a painted Ocean. + - Water, water -(1 row) - -SELECT ts_headline('english', ' -Day after day, day after day, - We stuck, nor breath nor motion, -As idle as a painted Ship - Upon a painted Ocean. -Water, water, every where - And all the boards did shrink; -Water, water, every where, - Nor any drop to drink. -S. T. Coleridge (1772-1834) -', to_tsquery('english', 'ocean')); - ts_headline ----------------------------------- - Ocean. + - Water, water, every where + - And all the boards did shrink;+ - Water, water, every where -(1 row) - -SELECT ts_headline('english', ' -Day after day, day after day, - We stuck, nor breath nor motion, -As idle as a painted Ship - Upon a painted Ocean. -Water, water, every where - And all the boards did shrink; -Water, water, every where, - Nor any drop to drink. -S. T. Coleridge (1772-1834) -', phraseto_tsquery('english', 'painted Ocean')); - ts_headline ---------------------------------------- - painted Ship + - Upon a painted Ocean.+ - Water, water, every where + - And all the boards did shrink -(1 row) - -SELECT ts_headline('english', ' -Day after day, day after day, - We stuck, nor breath nor motion, -As idle as a painted Ship - Upon a painted Ocean. -Water, water, every where - And all the boards did shrink; -Water, water, every where, - Nor any drop to drink. -S. T. Coleridge (1772-1834) -', phraseto_tsquery('english', 'idle as a painted Ship')); - ts_headline ---------------------------------------------- - idle as a painted Ship+ - Upon a painted Ocean. + - Water, water, every where + - And all the boards -(1 row) - -SELECT ts_headline('english', -'Lorem ipsum urna. Nullam nullam ullamcorper urna.', -to_tsquery('english','Lorem') && phraseto_tsquery('english','ullamcorper urna'), -'MaxWords=100, MinWords=1'); - ts_headline -------------------------------------------------------------------------------- - Lorem ipsum urna. Nullam nullam ullamcorper urna -(1 row) - -SELECT ts_headline('english', ' - - - -Sea view wow foo bar qq -YES   -ff-bg - - -', -to_tsquery('english', 'sea&foo'), 'HighlightAll=true'); - ts_headline ------------------------------------------------------------------------------ - + - + - + - + - Sea view wow foo bar qq + - YES  + - ff-bg + - + - + - -(1 row) - -SELECT ts_headline('simple', '1 2 3 1 3'::text, '1 <-> 3', 'MaxWords=2, MinWords=1'); - ts_headline -------------------- - 1 3 -(1 row) - -SELECT ts_headline('simple', '1 2 3 1 3'::text, '1 & 3', 'MaxWords=4, MinWords=1'); - ts_headline ---------------------- - 1 2 3 -(1 row) - -SELECT ts_headline('simple', '1 2 3 1 3'::text, '1 <-> 3', 'MaxWords=4, MinWords=1'); - ts_headline ----------------------------- - 3 1 3 -(1 row) - ---Check if headline fragments work -SELECT ts_headline('english', ' -Day after day, day after day, - We stuck, nor breath nor motion, -As idle as a painted Ship - Upon a painted Ocean. -Water, water, every where - And all the boards did shrink; -Water, water, every where, - Nor any drop to drink. -S. T. Coleridge (1772-1834) -', to_tsquery('english', 'ocean'), 'MaxFragments=1'); - ts_headline ------------------------------------- - after day, + - We stuck, nor breath nor motion,+ - As idle as a painted Ship + - Upon a painted Ocean. + - Water, water, every where + - And all the boards did shrink; + - Water, water, every where, + - Nor any drop -(1 row) - ---Check if more than one fragments are displayed -SELECT ts_headline('english', ' -Day after day, day after day, - We stuck, nor breath nor motion, -As idle as a painted Ship - Upon a painted Ocean. -Water, water, every where - And all the boards did shrink; -Water, water, every where, - Nor any drop to drink. -S. T. Coleridge (1772-1834) -', to_tsquery('english', 'Coleridge & stuck'), 'MaxFragments=2'); - ts_headline ----------------------------------------------- - after day, day after day, + - We stuck, nor breath nor motion, + - As idle as a painted Ship + - Upon a painted Ocean. + - Water, water, every where + - And all the boards did shrink; + - Water, water, every where ... drop to drink.+ - S. T. Coleridge -(1 row) - ---Fragments when there all query words are not in the document -SELECT ts_headline('english', ' -Day after day, day after day, - We stuck, nor breath nor motion, -As idle as a painted Ship - Upon a painted Ocean. -Water, water, every where - And all the boards did shrink; -Water, water, every where, - Nor any drop to drink. -S. T. Coleridge (1772-1834) -', to_tsquery('english', 'ocean & seahorse'), 'MaxFragments=1'); - ts_headline ------------------------------------- - + - Day after day, day after day, + - We stuck, nor breath nor motion,+ - As idle as -(1 row) - ---FragmentDelimiter option -SELECT ts_headline('english', ' -Day after day, day after day, - We stuck, nor breath nor motion, -As idle as a painted Ship - Upon a painted Ocean. -Water, water, every where - And all the boards did shrink; -Water, water, every where, - Nor any drop to drink. -S. T. Coleridge (1772-1834) -', to_tsquery('english', 'Coleridge & stuck'), 'MaxFragments=2,FragmentDelimiter=***'); - ts_headline --------------------------------------------- - after day, day after day, + - We stuck, nor breath nor motion, + - As idle as a painted Ship + - Upon a painted Ocean. + - Water, water, every where + - And all the boards did shrink; + - Water, water, every where***drop to drink.+ - S. T. Coleridge -(1 row) - ---Fragments with phrase search -SELECT ts_headline('english', -'Lorem ipsum urna. Nullam nullam ullamcorper urna.', -to_tsquery('english','Lorem') && phraseto_tsquery('english','ullamcorper urna'), -'MaxFragments=100, MaxWords=100, MinWords=1'); - ts_headline -------------------------------------------------------------------------------- - Lorem ipsum urna. Nullam nullam ullamcorper urna -(1 row) - ---Rewrite sub system -CREATE TABLE test_tsquery (txtkeyword TEXT, txtsample TEXT); -\set ECHO none -ALTER TABLE test_tsquery ADD COLUMN keyword tsquery; -UPDATE test_tsquery SET keyword = to_tsquery('english', txtkeyword); -ALTER TABLE test_tsquery ADD COLUMN sample tsquery; -UPDATE test_tsquery SET sample = to_tsquery('english', txtsample::text); -SELECT COUNT(*) FROM test_tsquery WHERE keyword < 'new <-> york'; - count -------- - 2 -(1 row) - -SELECT COUNT(*) FROM test_tsquery WHERE keyword <= 'new <-> york'; - count -------- - 3 -(1 row) - -SELECT COUNT(*) FROM test_tsquery WHERE keyword = 'new <-> york'; - count -------- - 1 -(1 row) - -SELECT COUNT(*) FROM test_tsquery WHERE keyword >= 'new <-> york'; - count -------- - 4 -(1 row) - -SELECT COUNT(*) FROM test_tsquery WHERE keyword > 'new <-> york'; - count -------- - 3 -(1 row) - -CREATE UNIQUE INDEX bt_tsq ON test_tsquery (keyword); -SET enable_seqscan=OFF; -SELECT COUNT(*) FROM test_tsquery WHERE keyword < 'new <-> york'; - count -------- - 2 -(1 row) - -SELECT COUNT(*) FROM test_tsquery WHERE keyword <= 'new <-> york'; - count -------- - 3 -(1 row) - -SELECT COUNT(*) FROM test_tsquery WHERE keyword = 'new <-> york'; - count -------- - 1 -(1 row) - -SELECT COUNT(*) FROM test_tsquery WHERE keyword >= 'new <-> york'; - count -------- - 4 -(1 row) - -SELECT COUNT(*) FROM test_tsquery WHERE keyword > 'new <-> york'; - count -------- - 3 -(1 row) - -RESET enable_seqscan; -SELECT ts_rewrite('foo & bar & qq & new & york', 'new & york'::tsquery, 'big & apple | nyc | new & york & city'); - ts_rewrite ------------------------------------------------------------------------------- - 'foo' & 'bar' & 'qq' & ( 'city' & 'new' & 'york' | 'nyc' | 'big' & 'apple' ) -(1 row) - -SELECT ts_rewrite(ts_rewrite('new & !york ', 'york', '!jersey'), - 'jersey', 'mexico'); - ts_rewrite --------------------- - 'new' & !!'mexico' -(1 row) - -SELECT ts_rewrite('moscow', 'SELECT keyword, sample FROM test_tsquery'::text ); - ts_rewrite ---------------------- - 'moskva' | 'moscow' -(1 row) - -SELECT ts_rewrite('moscow & hotel', 'SELECT keyword, sample FROM test_tsquery'::text ); - ts_rewrite ------------------------------------ - 'hotel' & ( 'moskva' | 'moscow' ) -(1 row) - -SELECT ts_rewrite('bar & qq & foo & (new <-> york)', 'SELECT keyword, sample FROM test_tsquery'::text ); - ts_rewrite -------------------------------------------------------------------------------------- - 'citi' & 'foo' & ( 'bar' | 'qq' ) & ( 'nyc' | 'big' <-> 'appl' | 'new' <-> 'york' ) -(1 row) - -SELECT ts_rewrite( 'moscow', 'SELECT keyword, sample FROM test_tsquery'); - ts_rewrite ---------------------- - 'moskva' | 'moscow' -(1 row) - -SELECT ts_rewrite( 'moscow & hotel', 'SELECT keyword, sample FROM test_tsquery'); - ts_rewrite ------------------------------------ - 'hotel' & ( 'moskva' | 'moscow' ) -(1 row) - -SELECT ts_rewrite( 'bar & qq & foo & (new <-> york)', 'SELECT keyword, sample FROM test_tsquery'); - ts_rewrite -------------------------------------------------------------------------------------- - 'citi' & 'foo' & ( 'bar' | 'qq' ) & ( 'nyc' | 'big' <-> 'appl' | 'new' <-> 'york' ) -(1 row) - -SELECT ts_rewrite('1 & (2 <-> 3)', 'SELECT keyword, sample FROM test_tsquery'::text ); - ts_rewrite -------------- - '2' <-> '4' -(1 row) - -SELECT ts_rewrite('1 & (2 <2> 3)', 'SELECT keyword, sample FROM test_tsquery'::text ); - ts_rewrite -------------------- - '1' & '2' <2> '3' -(1 row) - -SELECT ts_rewrite('5 <-> (1 & (2 <-> 3))', 'SELECT keyword, sample FROM test_tsquery'::text ); - ts_rewrite -------------------------- - '5' <-> ( '2' <-> '4' ) -(1 row) - -SELECT ts_rewrite('5 <-> (6 | 8)', 'SELECT keyword, sample FROM test_tsquery'::text ); - ts_rewrite ------------------------ - '5' <-> ( '6' | '8' ) -(1 row) - --- Check empty substitution -SELECT ts_rewrite(to_tsquery('5 & (6 | 5)'), to_tsquery('5'), to_tsquery('')); -NOTICE: text-search query doesn't contain lexemes: "" - ts_rewrite ------------- - '6' -(1 row) - -SELECT ts_rewrite(to_tsquery('!5'), to_tsquery('5'), to_tsquery('')); -NOTICE: text-search query doesn't contain lexemes: "" - ts_rewrite ------------- - -(1 row) - -SELECT keyword FROM test_tsquery WHERE keyword @> 'new'; - keyword ------------------- - 'new' <-> 'york' -(1 row) - -SELECT keyword FROM test_tsquery WHERE keyword @> 'moscow'; - keyword ----------- - 'moscow' -(1 row) - -SELECT keyword FROM test_tsquery WHERE keyword <@ 'new'; - keyword ---------- -(0 rows) - -SELECT keyword FROM test_tsquery WHERE keyword <@ 'moscow'; - keyword ----------- - 'moscow' -(1 row) - -SELECT ts_rewrite( query, 'SELECT keyword, sample FROM test_tsquery' ) FROM to_tsquery('english', 'moscow') AS query; - ts_rewrite ---------------------- - 'moskva' | 'moscow' -(1 row) - -SELECT ts_rewrite( query, 'SELECT keyword, sample FROM test_tsquery' ) FROM to_tsquery('english', 'moscow & hotel') AS query; - ts_rewrite ------------------------------------ - 'hotel' & ( 'moskva' | 'moscow' ) -(1 row) - -SELECT ts_rewrite( query, 'SELECT keyword, sample FROM test_tsquery' ) FROM to_tsquery('english', 'bar & qq & foo & (new <-> york)') AS query; - ts_rewrite -------------------------------------------------------------------------------------- - 'citi' & 'foo' & ( 'bar' | 'qq' ) & ( 'nyc' | 'big' <-> 'appl' | 'new' <-> 'york' ) -(1 row) - -SELECT ts_rewrite( query, 'SELECT keyword, sample FROM test_tsquery' ) FROM to_tsquery('english', 'moscow') AS query; - ts_rewrite ---------------------- - 'moskva' | 'moscow' -(1 row) - -SELECT ts_rewrite( query, 'SELECT keyword, sample FROM test_tsquery' ) FROM to_tsquery('english', 'moscow & hotel') AS query; - ts_rewrite ------------------------------------ - 'hotel' & ( 'moskva' | 'moscow' ) -(1 row) - -SELECT ts_rewrite( query, 'SELECT keyword, sample FROM test_tsquery' ) FROM to_tsquery('english', 'bar & qq & foo & (new <-> york)') AS query; - ts_rewrite -------------------------------------------------------------------------------------- - 'citi' & 'foo' & ( 'bar' | 'qq' ) & ( 'nyc' | 'big' <-> 'appl' | 'new' <-> 'york' ) -(1 row) - -CREATE INDEX qq ON test_tsquery USING gist (keyword tsquery_ops); -SET enable_seqscan=OFF; -SELECT keyword FROM test_tsquery WHERE keyword @> 'new'; - keyword ------------------- - 'new' <-> 'york' -(1 row) - -SELECT keyword FROM test_tsquery WHERE keyword @> 'moscow'; - keyword ----------- - 'moscow' -(1 row) - -SELECT keyword FROM test_tsquery WHERE keyword <@ 'new'; - keyword ---------- -(0 rows) - -SELECT keyword FROM test_tsquery WHERE keyword <@ 'moscow'; - keyword ----------- - 'moscow' -(1 row) - -SELECT ts_rewrite( query, 'SELECT keyword, sample FROM test_tsquery' ) FROM to_tsquery('english', 'moscow') AS query; - ts_rewrite ---------------------- - 'moskva' | 'moscow' -(1 row) - -SELECT ts_rewrite( query, 'SELECT keyword, sample FROM test_tsquery' ) FROM to_tsquery('english', 'moscow & hotel') AS query; - ts_rewrite ------------------------------------ - 'hotel' & ( 'moskva' | 'moscow' ) -(1 row) - -SELECT ts_rewrite( query, 'SELECT keyword, sample FROM test_tsquery' ) FROM to_tsquery('english', 'bar & qq & foo & (new <-> york)') AS query; - ts_rewrite -------------------------------------------------------------------------------------- - 'citi' & 'foo' & ( 'bar' | 'qq' ) & ( 'nyc' | 'big' <-> 'appl' | 'new' <-> 'york' ) -(1 row) - -SELECT ts_rewrite( query, 'SELECT keyword, sample FROM test_tsquery' ) FROM to_tsquery('english', 'moscow') AS query; - ts_rewrite ---------------------- - 'moskva' | 'moscow' -(1 row) - -SELECT ts_rewrite( query, 'SELECT keyword, sample FROM test_tsquery' ) FROM to_tsquery('english', 'moscow & hotel') AS query; - ts_rewrite ------------------------------------ - 'hotel' & ( 'moskva' | 'moscow' ) -(1 row) - -SELECT ts_rewrite( query, 'SELECT keyword, sample FROM test_tsquery' ) FROM to_tsquery('english', 'bar & qq & foo & (new <-> york)') AS query; - ts_rewrite -------------------------------------------------------------------------------------- - 'citi' & 'foo' & ( 'bar' | 'qq' ) & ( 'nyc' | 'big' <-> 'appl' | 'new' <-> 'york' ) -(1 row) - -SELECT ts_rewrite(tsquery_phrase('foo', 'foo'), 'foo', 'bar | baz'); - ts_rewrite ------------------------------------------ - ( 'bar' | 'baz' ) <-> ( 'bar' | 'baz' ) -(1 row) - -SELECT to_tsvector('foo bar') @@ - ts_rewrite(tsquery_phrase('foo', 'foo'), 'foo', 'bar | baz'); - ?column? ----------- - f -(1 row) - -SELECT to_tsvector('bar baz') @@ - ts_rewrite(tsquery_phrase('foo', 'foo'), 'foo', 'bar | baz'); - ?column? ----------- - t -(1 row) - -RESET enable_seqscan; ---test GUC -SET default_text_search_config=simple; -SELECT to_tsvector('SKIES My booKs'); - to_tsvector ----------------------------- - 'books':3 'my':2 'skies':1 -(1 row) - -SELECT plainto_tsquery('SKIES My booKs'); - plainto_tsquery --------------------------- - 'skies' & 'my' & 'books' -(1 row) - -SELECT to_tsquery('SKIES & My | booKs'); - to_tsquery --------------------------- - 'skies' & 'my' | 'books' -(1 row) - -SET default_text_search_config=english; -SELECT to_tsvector('SKIES My booKs'); - to_tsvector ------------------- - 'book':3 'sky':1 -(1 row) - -SELECT plainto_tsquery('SKIES My booKs'); - plainto_tsquery ------------------ - 'sky' & 'book' -(1 row) - -SELECT to_tsquery('SKIES & My | booKs'); - to_tsquery ----------------- - 'sky' | 'book' -(1 row) - ---trigger -CREATE TRIGGER tsvectorupdate -BEFORE UPDATE OR INSERT ON test_tsvector -FOR EACH ROW EXECUTE PROCEDURE tsvector_update_trigger(a, 'pg_catalog.english', t); -SELECT count(*) FROM test_tsvector WHERE a @@ to_tsquery('345&qwerty'); - count -------- - 0 -(1 row) - -INSERT INTO test_tsvector (t) VALUES ('345 qwerty'); -SELECT count(*) FROM test_tsvector WHERE a @@ to_tsquery('345&qwerty'); - count -------- - 1 -(1 row) - -UPDATE test_tsvector SET t = null WHERE t = '345 qwerty'; -SELECT count(*) FROM test_tsvector WHERE a @@ to_tsquery('345&qwerty'); - count -------- - 0 -(1 row) - -INSERT INTO test_tsvector (t) VALUES ('345 qwerty'); -SELECT count(*) FROM test_tsvector WHERE a @@ to_tsquery('345&qwerty'); - count -------- - 1 -(1 row) - --- Test inlining of immutable constant functions --- to_tsquery(text) is not immutable, so it won't be inlined -explain (costs off) -select * from test_tsquery, to_tsquery('new') q where txtsample @@ q; - QUERY PLAN ------------------------------------------------- - Nested Loop - Join Filter: (test_tsquery.txtsample @@ q.q) - -> Function Scan on to_tsquery q - -> Seq Scan on test_tsquery -(4 rows) - --- to_tsquery(regconfig, text) is an immutable function. --- That allows us to get rid of using function scan and join at all. -explain (costs off) -select * from test_tsquery, to_tsquery('english', 'new') q where txtsample @@ q; - QUERY PLAN ---------------------------------------------- - Seq Scan on test_tsquery - Filter: (txtsample @@ '''new'''::tsquery) -(2 rows) - --- test finding items in GIN's pending list -create temp table pendtest (ts tsvector); -create index pendtest_idx on pendtest using gin(ts); -insert into pendtest values (to_tsvector('Lore ipsam')); -insert into pendtest values (to_tsvector('Lore ipsum')); -select * from pendtest where 'ipsu:*'::tsquery @@ ts; - ts --------------------- - 'ipsum':2 'lore':1 -(1 row) - -select * from pendtest where 'ipsa:*'::tsquery @@ ts; - ts --------------------- - 'ipsam':2 'lore':1 -(1 row) - -select * from pendtest where 'ips:*'::tsquery @@ ts; - ts --------------------- - 'ipsam':2 'lore':1 - 'ipsum':2 'lore':1 -(2 rows) - -select * from pendtest where 'ipt:*'::tsquery @@ ts; - ts ----- -(0 rows) - -select * from pendtest where 'ipi:*'::tsquery @@ ts; - ts ----- -(0 rows) - ---check OP_PHRASE on index -create temp table phrase_index_test(fts tsvector); -insert into phrase_index_test values ('A fat cat has just eaten a rat.'); -insert into phrase_index_test values (to_tsvector('english', 'A fat cat has just eaten a rat.')); -create index phrase_index_test_idx on phrase_index_test using gin(fts); -set enable_seqscan = off; -select * from phrase_index_test where fts @@ phraseto_tsquery('english', 'fat cat'); - fts ------------------------------------ - 'cat':3 'eaten':6 'fat':2 'rat':8 -(1 row) - -set enable_seqscan = on; --- test websearch_to_tsquery function -select websearch_to_tsquery('simple', 'I have a fat:*ABCD cat'); - websearch_to_tsquery ---------------------------------------------- - 'i' & 'have' & 'a' & 'fat' & 'abcd' & 'cat' -(1 row) - -select websearch_to_tsquery('simple', 'orange:**AABBCCDD'); - websearch_to_tsquery ------------------------ - 'orange' & 'aabbccdd' -(1 row) - -select websearch_to_tsquery('simple', 'fat:A!cat:B|rat:C<'); - websearch_to_tsquery ------------------------------------------ - 'fat' & 'a' & 'cat' & 'b' & 'rat' & 'c' -(1 row) - -select websearch_to_tsquery('simple', 'fat:A : cat:B'); - websearch_to_tsquery ---------------------------- - 'fat' & 'a' & 'cat' & 'b' -(1 row) - -select websearch_to_tsquery('simple', 'fat*rat'); - websearch_to_tsquery ----------------------- - 'fat' <-> 'rat' -(1 row) - -select websearch_to_tsquery('simple', 'fat-rat'); - websearch_to_tsquery -------------------------------- - 'fat-rat' <-> 'fat' <-> 'rat' -(1 row) - -select websearch_to_tsquery('simple', 'fat_rat'); - websearch_to_tsquery ----------------------- - 'fat' <-> 'rat' -(1 row) - --- weights are completely ignored -select websearch_to_tsquery('simple', 'abc : def'); - websearch_to_tsquery ----------------------- - 'abc' & 'def' -(1 row) - -select websearch_to_tsquery('simple', 'abc:def'); - websearch_to_tsquery ----------------------- - 'abc' & 'def' -(1 row) - -select websearch_to_tsquery('simple', 'a:::b'); - websearch_to_tsquery ----------------------- - 'a' & 'b' -(1 row) - -select websearch_to_tsquery('simple', 'abc:d'); - websearch_to_tsquery ----------------------- - 'abc' & 'd' -(1 row) - -select websearch_to_tsquery('simple', ':'); -NOTICE: text-search query contains only stop words or doesn't contain lexemes, ignored - websearch_to_tsquery ----------------------- - -(1 row) - --- these operators are ignored -select websearch_to_tsquery('simple', 'abc & def'); - websearch_to_tsquery ----------------------- - 'abc' & 'def' -(1 row) - -select websearch_to_tsquery('simple', 'abc | def'); - websearch_to_tsquery ----------------------- - 'abc' & 'def' -(1 row) - -select websearch_to_tsquery('simple', 'abc <-> def'); - websearch_to_tsquery ----------------------- - 'abc' & 'def' -(1 row) - -select websearch_to_tsquery('simple', 'abc (pg or class)'); - websearch_to_tsquery ------------------------- - 'abc' & 'pg' | 'class' -(1 row) - --- NOT is ignored in quotes -select websearch_to_tsquery('english', 'My brand new smartphone'); - websearch_to_tsquery -------------------------------- - 'brand' & 'new' & 'smartphon' -(1 row) - -select websearch_to_tsquery('english', 'My brand "new smartphone"'); - websearch_to_tsquery ---------------------------------- - 'brand' & 'new' <-> 'smartphon' -(1 row) - -select websearch_to_tsquery('english', 'My brand "new -smartphone"'); - websearch_to_tsquery ---------------------------------- - 'brand' & 'new' <-> 'smartphon' -(1 row) - --- test OR operator -select websearch_to_tsquery('simple', 'cat or rat'); - websearch_to_tsquery ----------------------- - 'cat' | 'rat' -(1 row) - -select websearch_to_tsquery('simple', 'cat OR rat'); - websearch_to_tsquery ----------------------- - 'cat' | 'rat' -(1 row) - -select websearch_to_tsquery('simple', 'cat "OR" rat'); - websearch_to_tsquery ----------------------- - 'cat' & 'or' & 'rat' -(1 row) - -select websearch_to_tsquery('simple', 'cat OR'); - websearch_to_tsquery ----------------------- - 'cat' & 'or' -(1 row) - -select websearch_to_tsquery('simple', 'OR rat'); - websearch_to_tsquery ----------------------- - 'or' & 'rat' -(1 row) - -select websearch_to_tsquery('simple', '"fat cat OR rat"'); - websearch_to_tsquery ------------------------------------- - 'fat' <-> 'cat' <-> 'or' <-> 'rat' -(1 row) - -select websearch_to_tsquery('simple', 'fat (cat OR rat'); - websearch_to_tsquery ------------------------ - 'fat' & 'cat' | 'rat' -(1 row) - -select websearch_to_tsquery('simple', 'or OR or'); - websearch_to_tsquery ----------------------- - 'or' | 'or' -(1 row) - --- OR is an operator here ... -select websearch_to_tsquery('simple', '"fat cat"or"fat rat"'); - websearch_to_tsquery ------------------------------------ - 'fat' <-> 'cat' | 'fat' <-> 'rat' -(1 row) - -select websearch_to_tsquery('simple', 'fat or(rat'); - websearch_to_tsquery ----------------------- - 'fat' | 'rat' -(1 row) - -select websearch_to_tsquery('simple', 'fat or)rat'); - websearch_to_tsquery ----------------------- - 'fat' | 'rat' -(1 row) - -select websearch_to_tsquery('simple', 'fat or&rat'); - websearch_to_tsquery ----------------------- - 'fat' | 'rat' -(1 row) - -select websearch_to_tsquery('simple', 'fat or|rat'); - websearch_to_tsquery ----------------------- - 'fat' | 'rat' -(1 row) - -select websearch_to_tsquery('simple', 'fat or!rat'); - websearch_to_tsquery ----------------------- - 'fat' | 'rat' -(1 row) - -select websearch_to_tsquery('simple', 'fat orrat'); - websearch_to_tsquery ----------------------- - 'fat' | 'rat' -(1 row) - -select websearch_to_tsquery('simple', 'fat or '); - websearch_to_tsquery ----------------------- - 'fat' & 'or' -(1 row) - --- ... but not here -select websearch_to_tsquery('simple', 'abc orange'); - websearch_to_tsquery ----------------------- - 'abc' & 'orange' -(1 row) - -select websearch_to_tsquery('simple', 'abc OR1234'); - websearch_to_tsquery ----------------------- - 'abc' & 'or1234' -(1 row) - -select websearch_to_tsquery('simple', 'abc or-abc'); - websearch_to_tsquery -------------------------------------- - 'abc' & 'or-abc' <-> 'or' <-> 'abc' -(1 row) - -select websearch_to_tsquery('simple', 'abc OR_abc'); - websearch_to_tsquery ------------------------- - 'abc' & 'or' <-> 'abc' -(1 row) - --- test quotes -select websearch_to_tsquery('english', '"pg_class pg'); - websearch_to_tsquery ---------------------------- - 'pg' <-> 'class' <-> 'pg' -(1 row) - -select websearch_to_tsquery('english', 'pg_class pg"'); - websearch_to_tsquery -------------------------- - 'pg' <-> 'class' & 'pg' -(1 row) - -select websearch_to_tsquery('english', '"pg_class pg"'); - websearch_to_tsquery ---------------------------- - 'pg' <-> 'class' <-> 'pg' -(1 row) - -select websearch_to_tsquery('english', '"pg_class : pg"'); - websearch_to_tsquery ---------------------------- - 'pg' <-> 'class' <-> 'pg' -(1 row) - -select websearch_to_tsquery('english', 'abc "pg_class pg"'); - websearch_to_tsquery ------------------------------------ - 'abc' & 'pg' <-> 'class' <-> 'pg' -(1 row) - -select websearch_to_tsquery('english', '"pg_class pg" def'); - websearch_to_tsquery ------------------------------------ - 'pg' <-> 'class' <-> 'pg' & 'def' -(1 row) - -select websearch_to_tsquery('english', 'abc "pg pg_class pg" def'); - websearch_to_tsquery ----------------------------------------------------- - 'abc' & 'pg' <-> 'pg' <-> 'class' <-> 'pg' & 'def' -(1 row) - -select websearch_to_tsquery('english', ' or "pg pg_class pg" or '); - websearch_to_tsquery ------------------------------------- - 'pg' <-> 'pg' <-> 'class' <-> 'pg' -(1 row) - -select websearch_to_tsquery('english', '""pg pg_class pg""'); - websearch_to_tsquery --------------------------------- - 'pg' & 'pg' <-> 'class' & 'pg' -(1 row) - -select websearch_to_tsquery('english', 'abc """"" def'); - websearch_to_tsquery ----------------------- - 'abc' & 'def' -(1 row) - -select websearch_to_tsquery('english', 'cat -"fat rat"'); - websearch_to_tsquery ------------------------------- - 'cat' & !( 'fat' <-> 'rat' ) -(1 row) - -select websearch_to_tsquery('english', 'cat -"fat rat" cheese'); - websearch_to_tsquery ----------------------------------------- - 'cat' & !( 'fat' <-> 'rat' ) & 'chees' -(1 row) - -select websearch_to_tsquery('english', 'abc "def -"'); - websearch_to_tsquery ----------------------- - 'abc' & 'def' -(1 row) - -select websearch_to_tsquery('english', 'abc "def :"'); - websearch_to_tsquery ----------------------- - 'abc' & 'def' -(1 row) - -select websearch_to_tsquery('english', '"A fat cat" has just eaten a -rat.'); - websearch_to_tsquery ------------------------------------- - 'fat' <-> 'cat' & 'eaten' & !'rat' -(1 row) - -select websearch_to_tsquery('english', '"A fat cat" has just eaten OR !rat.'); - websearch_to_tsquery ------------------------------------ - 'fat' <-> 'cat' & 'eaten' | 'rat' -(1 row) - -select websearch_to_tsquery('english', '"A fat cat" has just (+eaten OR -rat)'); - websearch_to_tsquery ------------------------------------- - 'fat' <-> 'cat' & 'eaten' | !'rat' -(1 row) - -select websearch_to_tsquery('english', 'this is ----fine'); - websearch_to_tsquery ----------------------- - !!!!'fine' -(1 row) - -select websearch_to_tsquery('english', '(()) )))) this ||| is && -fine, "dear friend" OR good'); - websearch_to_tsquery ----------------------------------------- - !'fine' & 'dear' <-> 'friend' | 'good' -(1 row) - -select websearch_to_tsquery('english', 'an old <-> cat " is fine &&& too'); - websearch_to_tsquery ------------------------- - 'old' & 'cat' & 'fine' -(1 row) - -select websearch_to_tsquery('english', '"A the" OR just on'); -NOTICE: text-search query contains only stop words or doesn't contain lexemes, ignored - websearch_to_tsquery ----------------------- - -(1 row) - -select websearch_to_tsquery('english', '"a fat cat" ate a rat'); - websearch_to_tsquery ---------------------------------- - 'fat' <-> 'cat' & 'ate' & 'rat' -(1 row) - -select to_tsvector('english', 'A fat cat ate a rat') @@ - websearch_to_tsquery('english', '"a fat cat" ate a rat'); - ?column? ----------- - t -(1 row) - -select to_tsvector('english', 'A fat grey cat ate a rat') @@ - websearch_to_tsquery('english', '"a fat cat" ate a rat'); - ?column? ----------- - f -(1 row) - --- cases handled by gettoken_tsvector() -select websearch_to_tsquery(''''); -NOTICE: text-search query contains only stop words or doesn't contain lexemes, ignored - websearch_to_tsquery ----------------------- - -(1 row) - -select websearch_to_tsquery('''abc''''def'''); - websearch_to_tsquery ----------------------- - 'abc' <-> 'def' -(1 row) - -select websearch_to_tsquery('\abc'); - websearch_to_tsquery ----------------------- - 'abc' -(1 row) - -select websearch_to_tsquery('\'); -NOTICE: text-search query contains only stop words or doesn't contain lexemes, ignored - websearch_to_tsquery ----------------------- - -(1 row) - +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/tsdicts.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/tsdicts.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/tsdicts.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/tsdicts.out 2023-02-20 19:47:53.149216484 -0500 @@ -1,689 +1 @@ ---Test text search dictionaries and configurations --- Test ISpell dictionary with ispell affix file -CREATE TEXT SEARCH DICTIONARY ispell ( - Template=ispell, - DictFile=ispell_sample, - AffFile=ispell_sample -); -SELECT ts_lexize('ispell', 'skies'); - ts_lexize ------------ - {sky} -(1 row) - -SELECT ts_lexize('ispell', 'bookings'); - ts_lexize ----------------- - {booking,book} -(1 row) - -SELECT ts_lexize('ispell', 'booking'); - ts_lexize ----------------- - {booking,book} -(1 row) - -SELECT ts_lexize('ispell', 'foot'); - ts_lexize ------------ - {foot} -(1 row) - -SELECT ts_lexize('ispell', 'foots'); - ts_lexize ------------ - {foot} -(1 row) - -SELECT ts_lexize('ispell', 'rebookings'); - ts_lexize ----------------- - {booking,book} -(1 row) - -SELECT ts_lexize('ispell', 'rebooking'); - ts_lexize ----------------- - {booking,book} -(1 row) - -SELECT ts_lexize('ispell', 'rebook'); - ts_lexize ------------ - -(1 row) - -SELECT ts_lexize('ispell', 'unbookings'); - ts_lexize ------------ - {book} -(1 row) - -SELECT ts_lexize('ispell', 'unbooking'); - ts_lexize ------------ - {book} -(1 row) - -SELECT ts_lexize('ispell', 'unbook'); - ts_lexize ------------ - {book} -(1 row) - -SELECT ts_lexize('ispell', 'footklubber'); - ts_lexize ----------------- - {foot,klubber} -(1 row) - -SELECT ts_lexize('ispell', 'footballklubber'); - ts_lexize ------------------------------------------------------- - {footballklubber,foot,ball,klubber,football,klubber} -(1 row) - -SELECT ts_lexize('ispell', 'ballyklubber'); - ts_lexize ----------------- - {ball,klubber} -(1 row) - -SELECT ts_lexize('ispell', 'footballyklubber'); - ts_lexize ---------------------- - {foot,ball,klubber} -(1 row) - --- Test ISpell dictionary with hunspell affix file -CREATE TEXT SEARCH DICTIONARY hunspell ( - Template=ispell, - DictFile=ispell_sample, - AffFile=hunspell_sample -); -SELECT ts_lexize('hunspell', 'skies'); - ts_lexize ------------ - {sky} -(1 row) - -SELECT ts_lexize('hunspell', 'bookings'); - ts_lexize ----------------- - {booking,book} -(1 row) - -SELECT ts_lexize('hunspell', 'booking'); - ts_lexize ----------------- - {booking,book} -(1 row) - -SELECT ts_lexize('hunspell', 'foot'); - ts_lexize ------------ - {foot} -(1 row) - -SELECT ts_lexize('hunspell', 'foots'); - ts_lexize ------------ - {foot} -(1 row) - -SELECT ts_lexize('hunspell', 'rebookings'); - ts_lexize ----------------- - {booking,book} -(1 row) - -SELECT ts_lexize('hunspell', 'rebooking'); - ts_lexize ----------------- - {booking,book} -(1 row) - -SELECT ts_lexize('hunspell', 'rebook'); - ts_lexize ------------ - -(1 row) - -SELECT ts_lexize('hunspell', 'unbookings'); - ts_lexize ------------ - {book} -(1 row) - -SELECT ts_lexize('hunspell', 'unbooking'); - ts_lexize ------------ - {book} -(1 row) - -SELECT ts_lexize('hunspell', 'unbook'); - ts_lexize ------------ - {book} -(1 row) - -SELECT ts_lexize('hunspell', 'footklubber'); - ts_lexize ----------------- - {foot,klubber} -(1 row) - -SELECT ts_lexize('hunspell', 'footballklubber'); - ts_lexize ------------------------------------------------------- - {footballklubber,foot,ball,klubber,football,klubber} -(1 row) - -SELECT ts_lexize('hunspell', 'ballyklubber'); - ts_lexize ----------------- - {ball,klubber} -(1 row) - -SELECT ts_lexize('hunspell', 'footballyklubber'); - ts_lexize ---------------------- - {foot,ball,klubber} -(1 row) - --- Test ISpell dictionary with hunspell affix file with FLAG long parameter -CREATE TEXT SEARCH DICTIONARY hunspell_long ( - Template=ispell, - DictFile=hunspell_sample_long, - AffFile=hunspell_sample_long -); -SELECT ts_lexize('hunspell_long', 'skies'); - ts_lexize ------------ - {sky} -(1 row) - -SELECT ts_lexize('hunspell_long', 'bookings'); - ts_lexize ----------------- - {booking,book} -(1 row) - -SELECT ts_lexize('hunspell_long', 'booking'); - ts_lexize ----------------- - {booking,book} -(1 row) - -SELECT ts_lexize('hunspell_long', 'foot'); - ts_lexize ------------ - {foot} -(1 row) - -SELECT ts_lexize('hunspell_long', 'foots'); - ts_lexize ------------ - {foot} -(1 row) - -SELECT ts_lexize('hunspell_long', 'rebookings'); - ts_lexize ----------------- - {booking,book} -(1 row) - -SELECT ts_lexize('hunspell_long', 'rebooking'); - ts_lexize ----------------- - {booking,book} -(1 row) - -SELECT ts_lexize('hunspell_long', 'rebook'); - ts_lexize ------------ - -(1 row) - -SELECT ts_lexize('hunspell_long', 'unbookings'); - ts_lexize ------------ - {book} -(1 row) - -SELECT ts_lexize('hunspell_long', 'unbooking'); - ts_lexize ------------ - {book} -(1 row) - -SELECT ts_lexize('hunspell_long', 'unbook'); - ts_lexize ------------ - {book} -(1 row) - -SELECT ts_lexize('hunspell_long', 'booked'); - ts_lexize ------------ - {book} -(1 row) - -SELECT ts_lexize('hunspell_long', 'footklubber'); - ts_lexize ----------------- - {foot,klubber} -(1 row) - -SELECT ts_lexize('hunspell_long', 'footballklubber'); - ts_lexize ------------------------------------------------------- - {footballklubber,foot,ball,klubber,football,klubber} -(1 row) - -SELECT ts_lexize('hunspell_long', 'ballyklubber'); - ts_lexize ----------------- - {ball,klubber} -(1 row) - -SELECT ts_lexize('hunspell_long', 'ballsklubber'); - ts_lexize ----------------- - {ball,klubber} -(1 row) - -SELECT ts_lexize('hunspell_long', 'footballyklubber'); - ts_lexize ---------------------- - {foot,ball,klubber} -(1 row) - -SELECT ts_lexize('hunspell_long', 'ex-machina'); - ts_lexize ---------------- - {ex-,machina} -(1 row) - --- Test ISpell dictionary with hunspell affix file with FLAG num parameter -CREATE TEXT SEARCH DICTIONARY hunspell_num ( - Template=ispell, - DictFile=hunspell_sample_num, - AffFile=hunspell_sample_num -); -SELECT ts_lexize('hunspell_num', 'skies'); - ts_lexize ------------ - {sky} -(1 row) - -SELECT ts_lexize('hunspell_num', 'sk'); - ts_lexize ------------ - {sky} -(1 row) - -SELECT ts_lexize('hunspell_num', 'bookings'); - ts_lexize ----------------- - {booking,book} -(1 row) - -SELECT ts_lexize('hunspell_num', 'booking'); - ts_lexize ----------------- - {booking,book} -(1 row) - -SELECT ts_lexize('hunspell_num', 'foot'); - ts_lexize ------------ - {foot} -(1 row) - -SELECT ts_lexize('hunspell_num', 'foots'); - ts_lexize ------------ - {foot} -(1 row) - -SELECT ts_lexize('hunspell_num', 'rebookings'); - ts_lexize ----------------- - {booking,book} -(1 row) - -SELECT ts_lexize('hunspell_num', 'rebooking'); - ts_lexize ----------------- - {booking,book} -(1 row) - -SELECT ts_lexize('hunspell_num', 'rebook'); - ts_lexize ------------ - -(1 row) - -SELECT ts_lexize('hunspell_num', 'unbookings'); - ts_lexize ------------ - {book} -(1 row) - -SELECT ts_lexize('hunspell_num', 'unbooking'); - ts_lexize ------------ - {book} -(1 row) - -SELECT ts_lexize('hunspell_num', 'unbook'); - ts_lexize ------------ - {book} -(1 row) - -SELECT ts_lexize('hunspell_num', 'booked'); - ts_lexize ------------ - {book} -(1 row) - -SELECT ts_lexize('hunspell_num', 'footklubber'); - ts_lexize ----------------- - {foot,klubber} -(1 row) - -SELECT ts_lexize('hunspell_num', 'footballklubber'); - ts_lexize ------------------------------------------------------- - {footballklubber,foot,ball,klubber,football,klubber} -(1 row) - -SELECT ts_lexize('hunspell_num', 'ballyklubber'); - ts_lexize ----------------- - {ball,klubber} -(1 row) - -SELECT ts_lexize('hunspell_num', 'footballyklubber'); - ts_lexize ---------------------- - {foot,ball,klubber} -(1 row) - --- Test suitability of affix and dict files -CREATE TEXT SEARCH DICTIONARY hunspell_err ( - Template=ispell, - DictFile=ispell_sample, - AffFile=hunspell_sample_long -); -ERROR: invalid affix alias "GJUS" -CREATE TEXT SEARCH DICTIONARY hunspell_err ( - Template=ispell, - DictFile=ispell_sample, - AffFile=hunspell_sample_num -); -ERROR: invalid affix flag "SZ\" -CREATE TEXT SEARCH DICTIONARY hunspell_invalid_1 ( - Template=ispell, - DictFile=hunspell_sample_long, - AffFile=ispell_sample -); -CREATE TEXT SEARCH DICTIONARY hunspell_invalid_2 ( - Template=ispell, - DictFile=hunspell_sample_long, - AffFile=hunspell_sample_num -); -CREATE TEXT SEARCH DICTIONARY hunspell_invalid_3 ( - Template=ispell, - DictFile=hunspell_sample_num, - AffFile=ispell_sample -); -CREATE TEXT SEARCH DICTIONARY hunspell_err ( - Template=ispell, - DictFile=hunspell_sample_num, - AffFile=hunspell_sample_long -); -ERROR: invalid affix alias "302,301,202,303" --- Synonym dictionary -CREATE TEXT SEARCH DICTIONARY synonym ( - Template=synonym, - Synonyms=synonym_sample -); -SELECT ts_lexize('synonym', 'PoStGrEs'); - ts_lexize ------------ - {pgsql} -(1 row) - -SELECT ts_lexize('synonym', 'Gogle'); - ts_lexize ------------ - {googl} -(1 row) - -SELECT ts_lexize('synonym', 'indices'); - ts_lexize ------------ - {index} -(1 row) - --- test altering boolean parameters -SELECT dictinitoption FROM pg_ts_dict WHERE dictname = 'synonym'; - dictinitoption ------------------------------ - synonyms = 'synonym_sample' -(1 row) - -ALTER TEXT SEARCH DICTIONARY synonym (CaseSensitive = 1); -SELECT ts_lexize('synonym', 'PoStGrEs'); - ts_lexize ------------ - -(1 row) - -SELECT dictinitoption FROM pg_ts_dict WHERE dictname = 'synonym'; - dictinitoption ------------------------------------------------- - synonyms = 'synonym_sample', casesensitive = 1 -(1 row) - -ALTER TEXT SEARCH DICTIONARY synonym (CaseSensitive = 2); -- fail -ERROR: casesensitive requires a Boolean value -ALTER TEXT SEARCH DICTIONARY synonym (CaseSensitive = off); -SELECT ts_lexize('synonym', 'PoStGrEs'); - ts_lexize ------------ - {pgsql} -(1 row) - -SELECT dictinitoption FROM pg_ts_dict WHERE dictname = 'synonym'; - dictinitoption ----------------------------------------------------- - synonyms = 'synonym_sample', casesensitive = 'off' -(1 row) - --- Create and simple test thesaurus dictionary --- More tests in configuration checks because ts_lexize() --- cannot pass more than one word to thesaurus. -CREATE TEXT SEARCH DICTIONARY thesaurus ( - Template=thesaurus, - DictFile=thesaurus_sample, - Dictionary=english_stem -); -SELECT ts_lexize('thesaurus', 'one'); - ts_lexize ------------ - {1} -(1 row) - --- Test ispell dictionary in configuration -CREATE TEXT SEARCH CONFIGURATION ispell_tst ( - COPY=english -); -ALTER TEXT SEARCH CONFIGURATION ispell_tst ALTER MAPPING FOR - word, numword, asciiword, hword, numhword, asciihword, hword_part, hword_numpart, hword_asciipart - WITH ispell, english_stem; -SELECT to_tsvector('ispell_tst', 'Booking the skies after rebookings for footballklubber from a foot'); - to_tsvector ----------------------------------------------------------------------------------------------------- - 'ball':7 'book':1,5 'booking':1,5 'foot':7,10 'football':7 'footballklubber':7 'klubber':7 'sky':3 -(1 row) - -SELECT to_tsquery('ispell_tst', 'footballklubber'); - to_tsquery --------------------------------------------------------------------------- - 'footballklubber' | 'foot' & 'ball' & 'klubber' | 'football' & 'klubber' -(1 row) - -SELECT to_tsquery('ispell_tst', 'footballyklubber:b & rebookings:A & sky'); - to_tsquery ------------------------------------------------------------------------- - 'foot':B & 'ball':B & 'klubber':B & ( 'booking':A | 'book':A ) & 'sky' -(1 row) - --- Test ispell dictionary with hunspell affix in configuration -CREATE TEXT SEARCH CONFIGURATION hunspell_tst ( - COPY=ispell_tst -); -ALTER TEXT SEARCH CONFIGURATION hunspell_tst ALTER MAPPING - REPLACE ispell WITH hunspell; -SELECT to_tsvector('hunspell_tst', 'Booking the skies after rebookings for footballklubber from a foot'); - to_tsvector ----------------------------------------------------------------------------------------------------- - 'ball':7 'book':1,5 'booking':1,5 'foot':7,10 'football':7 'footballklubber':7 'klubber':7 'sky':3 -(1 row) - -SELECT to_tsquery('hunspell_tst', 'footballklubber'); - to_tsquery --------------------------------------------------------------------------- - 'footballklubber' | 'foot' & 'ball' & 'klubber' | 'football' & 'klubber' -(1 row) - -SELECT to_tsquery('hunspell_tst', 'footballyklubber:b & rebookings:A & sky'); - to_tsquery ------------------------------------------------------------------------- - 'foot':B & 'ball':B & 'klubber':B & ( 'booking':A | 'book':A ) & 'sky' -(1 row) - -SELECT to_tsquery('hunspell_tst', 'footballyklubber:b <-> sky'); - to_tsquery -------------------------------------------------- - ( 'foot':B & 'ball':B & 'klubber':B ) <-> 'sky' -(1 row) - -SELECT phraseto_tsquery('hunspell_tst', 'footballyklubber sky'); - phraseto_tsquery -------------------------------------------- - ( 'foot' & 'ball' & 'klubber' ) <-> 'sky' -(1 row) - --- Test ispell dictionary with hunspell affix with FLAG long in configuration -ALTER TEXT SEARCH CONFIGURATION hunspell_tst ALTER MAPPING - REPLACE hunspell WITH hunspell_long; -SELECT to_tsvector('hunspell_tst', 'Booking the skies after rebookings for footballklubber from a foot'); - to_tsvector ----------------------------------------------------------------------------------------------------- - 'ball':7 'book':1,5 'booking':1,5 'foot':7,10 'football':7 'footballklubber':7 'klubber':7 'sky':3 -(1 row) - -SELECT to_tsquery('hunspell_tst', 'footballklubber'); - to_tsquery --------------------------------------------------------------------------- - 'footballklubber' | 'foot' & 'ball' & 'klubber' | 'football' & 'klubber' -(1 row) - -SELECT to_tsquery('hunspell_tst', 'footballyklubber:b & rebookings:A & sky'); - to_tsquery ------------------------------------------------------------------------- - 'foot':B & 'ball':B & 'klubber':B & ( 'booking':A | 'book':A ) & 'sky' -(1 row) - --- Test ispell dictionary with hunspell affix with FLAG num in configuration -ALTER TEXT SEARCH CONFIGURATION hunspell_tst ALTER MAPPING - REPLACE hunspell_long WITH hunspell_num; -SELECT to_tsvector('hunspell_tst', 'Booking the skies after rebookings for footballklubber from a foot'); - to_tsvector ----------------------------------------------------------------------------------------------------- - 'ball':7 'book':1,5 'booking':1,5 'foot':7,10 'football':7 'footballklubber':7 'klubber':7 'sky':3 -(1 row) - -SELECT to_tsquery('hunspell_tst', 'footballklubber'); - to_tsquery --------------------------------------------------------------------------- - 'footballklubber' | 'foot' & 'ball' & 'klubber' | 'football' & 'klubber' -(1 row) - -SELECT to_tsquery('hunspell_tst', 'footballyklubber:b & rebookings:A & sky'); - to_tsquery ------------------------------------------------------------------------- - 'foot':B & 'ball':B & 'klubber':B & ( 'booking':A | 'book':A ) & 'sky' -(1 row) - --- Test synonym dictionary in configuration -CREATE TEXT SEARCH CONFIGURATION synonym_tst ( - COPY=english -); -ALTER TEXT SEARCH CONFIGURATION synonym_tst ALTER MAPPING FOR - asciiword, hword_asciipart, asciihword - WITH synonym, english_stem; -SELECT to_tsvector('synonym_tst', 'Postgresql is often called as postgres or pgsql and pronounced as postgre'); - to_tsvector ---------------------------------------------------- - 'call':4 'often':3 'pgsql':1,6,8,12 'pronounc':10 -(1 row) - -SELECT to_tsvector('synonym_tst', 'Most common mistake is to write Gogle instead of Google'); - to_tsvector ----------------------------------------------------------- - 'common':2 'googl':7,10 'instead':8 'mistak':3 'write':6 -(1 row) - -SELECT to_tsvector('synonym_tst', 'Indexes or indices - Which is right plural form of index?'); - to_tsvector ----------------------------------------------- - 'form':8 'index':1,3,10 'plural':7 'right':6 -(1 row) - -SELECT to_tsquery('synonym_tst', 'Index & indices'); - to_tsquery ---------------------- - 'index' & 'index':* -(1 row) - --- test thesaurus in configuration --- see thesaurus_sample.ths to understand 'odd' resulting tsvector -CREATE TEXT SEARCH CONFIGURATION thesaurus_tst ( - COPY=synonym_tst -); -ALTER TEXT SEARCH CONFIGURATION thesaurus_tst ALTER MAPPING FOR - asciiword, hword_asciipart, asciihword - WITH synonym, thesaurus, english_stem; -SELECT to_tsvector('thesaurus_tst', 'one postgres one two one two three one'); - to_tsvector ----------------------------------- - '1':1,5 '12':3 '123':4 'pgsql':2 -(1 row) - -SELECT to_tsvector('thesaurus_tst', 'Supernovae star is very new star and usually called supernovae (abbreviation SN)'); - to_tsvector --------------------------------------------------------------- - 'abbrevi':10 'call':8 'new':4 'sn':1,9,11 'star':5 'usual':7 -(1 row) - -SELECT to_tsvector('thesaurus_tst', 'Booking tickets is looking like a booking a tickets'); - to_tsvector -------------------------------------------------------- - 'card':3,10 'invit':2,9 'like':6 'look':5 'order':1,8 -(1 row) - --- invalid: non-lowercase quoted identifiers -CREATE TEXT SEARCH DICTIONARY tsdict_case -( - Template = ispell, - "DictFile" = ispell_sample, - "AffFile" = ispell_sample -); -ERROR: unrecognized Ispell parameter: "DictFile" +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/foreign_data.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/foreign_data.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/foreign_data.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/foreign_data.out 2023-02-20 19:47:53.469216498 -0500 @@ -1,2102 +1 @@ --- --- Test foreign-data wrapper and server management. --- --- Clean up in case a prior regression run failed --- Suppress NOTICE messages when roles don't exist -SET client_min_messages TO 'warning'; -DROP ROLE IF EXISTS regress_foreign_data_user, regress_test_role, regress_test_role2, regress_test_role_super, regress_test_indirect, regress_unprivileged_role; -RESET client_min_messages; -CREATE ROLE regress_foreign_data_user LOGIN SUPERUSER; -SET SESSION AUTHORIZATION 'regress_foreign_data_user'; -CREATE ROLE regress_test_role; -CREATE ROLE regress_test_role2; -CREATE ROLE regress_test_role_super SUPERUSER; -CREATE ROLE regress_test_indirect; -CREATE ROLE regress_unprivileged_role; -CREATE FOREIGN DATA WRAPPER dummy; -COMMENT ON FOREIGN DATA WRAPPER dummy IS 'useless'; -CREATE FOREIGN DATA WRAPPER postgresql VALIDATOR postgresql_fdw_validator; --- At this point we should have 2 built-in wrappers and no servers. -SELECT fdwname, fdwhandler::regproc, fdwvalidator::regproc, fdwoptions FROM pg_foreign_data_wrapper ORDER BY 1, 2, 3; - fdwname | fdwhandler | fdwvalidator | fdwoptions -------------+------------+--------------------------+------------ - dummy | - | - | - postgresql | - | postgresql_fdw_validator | -(2 rows) - -SELECT srvname, srvoptions FROM pg_foreign_server; - srvname | srvoptions ----------+------------ -(0 rows) - -SELECT * FROM pg_user_mapping; - oid | umuser | umserver | umoptions ------+--------+----------+----------- -(0 rows) - --- CREATE FOREIGN DATA WRAPPER -CREATE FOREIGN DATA WRAPPER foo VALIDATOR bar; -- ERROR -ERROR: function bar(text[], oid) does not exist -CREATE FOREIGN DATA WRAPPER foo; -\dew - List of foreign-data wrappers - Name | Owner | Handler | Validator -------------+---------------------------+---------+-------------------------- - dummy | regress_foreign_data_user | - | - - foo | regress_foreign_data_user | - | - - postgresql | regress_foreign_data_user | - | postgresql_fdw_validator -(3 rows) - -CREATE FOREIGN DATA WRAPPER foo; -- duplicate -ERROR: foreign-data wrapper "foo" already exists -DROP FOREIGN DATA WRAPPER foo; -CREATE FOREIGN DATA WRAPPER foo OPTIONS (testing '1'); -\dew+ - List of foreign-data wrappers - Name | Owner | Handler | Validator | Access privileges | FDW options | Description -------------+---------------------------+---------+--------------------------+-------------------+---------------+------------- - dummy | regress_foreign_data_user | - | - | | | useless - foo | regress_foreign_data_user | - | - | | (testing '1') | - postgresql | regress_foreign_data_user | - | postgresql_fdw_validator | | | -(3 rows) - -DROP FOREIGN DATA WRAPPER foo; -CREATE FOREIGN DATA WRAPPER foo OPTIONS (testing '1', testing '2'); -- ERROR -ERROR: option "testing" provided more than once -CREATE FOREIGN DATA WRAPPER foo OPTIONS (testing '1', another '2'); -\dew+ - List of foreign-data wrappers - Name | Owner | Handler | Validator | Access privileges | FDW options | Description -------------+---------------------------+---------+--------------------------+-------------------+----------------------------+------------- - dummy | regress_foreign_data_user | - | - | | | useless - foo | regress_foreign_data_user | - | - | | (testing '1', another '2') | - postgresql | regress_foreign_data_user | - | postgresql_fdw_validator | | | -(3 rows) - -DROP FOREIGN DATA WRAPPER foo; -SET ROLE regress_test_role; -CREATE FOREIGN DATA WRAPPER foo; -- ERROR -ERROR: permission denied to create foreign-data wrapper "foo" -HINT: Must be superuser to create a foreign-data wrapper. -RESET ROLE; -CREATE FOREIGN DATA WRAPPER foo VALIDATOR postgresql_fdw_validator; -\dew+ - List of foreign-data wrappers - Name | Owner | Handler | Validator | Access privileges | FDW options | Description -------------+---------------------------+---------+--------------------------+-------------------+-------------+------------- - dummy | regress_foreign_data_user | - | - | | | useless - foo | regress_foreign_data_user | - | postgresql_fdw_validator | | | - postgresql | regress_foreign_data_user | - | postgresql_fdw_validator | | | -(3 rows) - --- HANDLER related checks -CREATE FUNCTION invalid_fdw_handler() RETURNS int LANGUAGE SQL AS 'SELECT 1;'; -CREATE FOREIGN DATA WRAPPER test_fdw HANDLER invalid_fdw_handler; -- ERROR -ERROR: function invalid_fdw_handler must return type fdw_handler -CREATE FOREIGN DATA WRAPPER test_fdw HANDLER test_fdw_handler HANDLER invalid_fdw_handler; -- ERROR -ERROR: conflicting or redundant options -CREATE FOREIGN DATA WRAPPER test_fdw HANDLER test_fdw_handler; -DROP FOREIGN DATA WRAPPER test_fdw; --- ALTER FOREIGN DATA WRAPPER -ALTER FOREIGN DATA WRAPPER foo; -- ERROR -ERROR: syntax error at or near ";" -LINE 1: ALTER FOREIGN DATA WRAPPER foo; - ^ -ALTER FOREIGN DATA WRAPPER foo VALIDATOR bar; -- ERROR -ERROR: function bar(text[], oid) does not exist -ALTER FOREIGN DATA WRAPPER foo NO VALIDATOR; -\dew+ - List of foreign-data wrappers - Name | Owner | Handler | Validator | Access privileges | FDW options | Description -------------+---------------------------+---------+--------------------------+-------------------+-------------+------------- - dummy | regress_foreign_data_user | - | - | | | useless - foo | regress_foreign_data_user | - | - | | | - postgresql | regress_foreign_data_user | - | postgresql_fdw_validator | | | -(3 rows) - -ALTER FOREIGN DATA WRAPPER foo OPTIONS (a '1', b '2'); -ALTER FOREIGN DATA WRAPPER foo OPTIONS (SET c '4'); -- ERROR -ERROR: option "c" not found -ALTER FOREIGN DATA WRAPPER foo OPTIONS (DROP c); -- ERROR -ERROR: option "c" not found -ALTER FOREIGN DATA WRAPPER foo OPTIONS (ADD x '1', DROP x); -\dew+ - List of foreign-data wrappers - Name | Owner | Handler | Validator | Access privileges | FDW options | Description -------------+---------------------------+---------+--------------------------+-------------------+----------------+------------- - dummy | regress_foreign_data_user | - | - | | | useless - foo | regress_foreign_data_user | - | - | | (a '1', b '2') | - postgresql | regress_foreign_data_user | - | postgresql_fdw_validator | | | -(3 rows) - -ALTER FOREIGN DATA WRAPPER foo OPTIONS (DROP a, SET b '3', ADD c '4'); -\dew+ - List of foreign-data wrappers - Name | Owner | Handler | Validator | Access privileges | FDW options | Description -------------+---------------------------+---------+--------------------------+-------------------+----------------+------------- - dummy | regress_foreign_data_user | - | - | | | useless - foo | regress_foreign_data_user | - | - | | (b '3', c '4') | - postgresql | regress_foreign_data_user | - | postgresql_fdw_validator | | | -(3 rows) - -ALTER FOREIGN DATA WRAPPER foo OPTIONS (a '2'); -ALTER FOREIGN DATA WRAPPER foo OPTIONS (b '4'); -- ERROR -ERROR: option "b" provided more than once -\dew+ - List of foreign-data wrappers - Name | Owner | Handler | Validator | Access privileges | FDW options | Description -------------+---------------------------+---------+--------------------------+-------------------+-----------------------+------------- - dummy | regress_foreign_data_user | - | - | | | useless - foo | regress_foreign_data_user | - | - | | (b '3', c '4', a '2') | - postgresql | regress_foreign_data_user | - | postgresql_fdw_validator | | | -(3 rows) - -SET ROLE regress_test_role; -ALTER FOREIGN DATA WRAPPER foo OPTIONS (ADD d '5'); -- ERROR -ERROR: permission denied to alter foreign-data wrapper "foo" -HINT: Must be superuser to alter a foreign-data wrapper. -SET ROLE regress_test_role_super; -ALTER FOREIGN DATA WRAPPER foo OPTIONS (ADD d '5'); -\dew+ - List of foreign-data wrappers - Name | Owner | Handler | Validator | Access privileges | FDW options | Description -------------+---------------------------+---------+--------------------------+-------------------+------------------------------+------------- - dummy | regress_foreign_data_user | - | - | | | useless - foo | regress_foreign_data_user | - | - | | (b '3', c '4', a '2', d '5') | - postgresql | regress_foreign_data_user | - | postgresql_fdw_validator | | | -(3 rows) - -ALTER FOREIGN DATA WRAPPER foo OWNER TO regress_test_role; -- ERROR -ERROR: permission denied to change owner of foreign-data wrapper "foo" -HINT: The owner of a foreign-data wrapper must be a superuser. -ALTER FOREIGN DATA WRAPPER foo OWNER TO regress_test_role_super; -ALTER ROLE regress_test_role_super NOSUPERUSER; -SET ROLE regress_test_role_super; -ALTER FOREIGN DATA WRAPPER foo OPTIONS (ADD e '6'); -- ERROR -ERROR: permission denied to alter foreign-data wrapper "foo" -HINT: Must be superuser to alter a foreign-data wrapper. -RESET ROLE; -\dew+ - List of foreign-data wrappers - Name | Owner | Handler | Validator | Access privileges | FDW options | Description -------------+---------------------------+---------+--------------------------+-------------------+------------------------------+------------- - dummy | regress_foreign_data_user | - | - | | | useless - foo | regress_test_role_super | - | - | | (b '3', c '4', a '2', d '5') | - postgresql | regress_foreign_data_user | - | postgresql_fdw_validator | | | -(3 rows) - -ALTER FOREIGN DATA WRAPPER foo RENAME TO foo1; -\dew+ - List of foreign-data wrappers - Name | Owner | Handler | Validator | Access privileges | FDW options | Description -------------+---------------------------+---------+--------------------------+-------------------+------------------------------+------------- - dummy | regress_foreign_data_user | - | - | | | useless - foo1 | regress_test_role_super | - | - | | (b '3', c '4', a '2', d '5') | - postgresql | regress_foreign_data_user | - | postgresql_fdw_validator | | | -(3 rows) - -ALTER FOREIGN DATA WRAPPER foo1 RENAME TO foo; --- HANDLER related checks -ALTER FOREIGN DATA WRAPPER foo HANDLER invalid_fdw_handler; -- ERROR -ERROR: function invalid_fdw_handler must return type fdw_handler -ALTER FOREIGN DATA WRAPPER foo HANDLER test_fdw_handler HANDLER anything; -- ERROR -ERROR: conflicting or redundant options -ALTER FOREIGN DATA WRAPPER foo HANDLER test_fdw_handler; -WARNING: changing the foreign-data wrapper handler can change behavior of existing foreign tables -DROP FUNCTION invalid_fdw_handler(); --- DROP FOREIGN DATA WRAPPER -DROP FOREIGN DATA WRAPPER nonexistent; -- ERROR -ERROR: foreign-data wrapper "nonexistent" does not exist -DROP FOREIGN DATA WRAPPER IF EXISTS nonexistent; -NOTICE: foreign-data wrapper "nonexistent" does not exist, skipping -\dew+ - List of foreign-data wrappers - Name | Owner | Handler | Validator | Access privileges | FDW options | Description -------------+---------------------------+------------------+--------------------------+-------------------+------------------------------+------------- - dummy | regress_foreign_data_user | - | - | | | useless - foo | regress_test_role_super | test_fdw_handler | - | | (b '3', c '4', a '2', d '5') | - postgresql | regress_foreign_data_user | - | postgresql_fdw_validator | | | -(3 rows) - -DROP ROLE regress_test_role_super; -- ERROR -ERROR: role "regress_test_role_super" cannot be dropped because some objects depend on it -DETAIL: owner of foreign-data wrapper foo -SET ROLE regress_test_role_super; -DROP FOREIGN DATA WRAPPER foo; -RESET ROLE; -DROP ROLE regress_test_role_super; -\dew+ - List of foreign-data wrappers - Name | Owner | Handler | Validator | Access privileges | FDW options | Description -------------+---------------------------+---------+--------------------------+-------------------+-------------+------------- - dummy | regress_foreign_data_user | - | - | | | useless - postgresql | regress_foreign_data_user | - | postgresql_fdw_validator | | | -(2 rows) - -CREATE FOREIGN DATA WRAPPER foo; -CREATE SERVER s1 FOREIGN DATA WRAPPER foo; -COMMENT ON SERVER s1 IS 'foreign server'; -CREATE USER MAPPING FOR current_user SERVER s1; -CREATE USER MAPPING FOR current_user SERVER s1; -- ERROR -ERROR: user mapping for "regress_foreign_data_user" already exists for server "s1" -CREATE USER MAPPING IF NOT EXISTS FOR current_user SERVER s1; -- NOTICE -NOTICE: user mapping for "regress_foreign_data_user" already exists for server "s1", skipping -\dew+ - List of foreign-data wrappers - Name | Owner | Handler | Validator | Access privileges | FDW options | Description -------------+---------------------------+---------+--------------------------+-------------------+-------------+------------- - dummy | regress_foreign_data_user | - | - | | | useless - foo | regress_foreign_data_user | - | - | | | - postgresql | regress_foreign_data_user | - | postgresql_fdw_validator | | | -(3 rows) - -\des+ - List of foreign servers - Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | FDW options | Description -------+---------------------------+----------------------+-------------------+------+---------+-------------+---------------- - s1 | regress_foreign_data_user | foo | | | | | foreign server -(1 row) - -\deu+ - List of user mappings - Server | User name | FDW options ---------+---------------------------+------------- - s1 | regress_foreign_data_user | -(1 row) - -DROP FOREIGN DATA WRAPPER foo; -- ERROR -ERROR: cannot drop foreign-data wrapper foo because other objects depend on it -DETAIL: server s1 depends on foreign-data wrapper foo -user mapping for regress_foreign_data_user on server s1 depends on server s1 -HINT: Use DROP ... CASCADE to drop the dependent objects too. -SET ROLE regress_test_role; -DROP FOREIGN DATA WRAPPER foo CASCADE; -- ERROR -ERROR: must be owner of foreign-data wrapper foo -RESET ROLE; -DROP FOREIGN DATA WRAPPER foo CASCADE; -NOTICE: drop cascades to 2 other objects -DETAIL: drop cascades to server s1 -drop cascades to user mapping for regress_foreign_data_user on server s1 -\dew+ - List of foreign-data wrappers - Name | Owner | Handler | Validator | Access privileges | FDW options | Description -------------+---------------------------+---------+--------------------------+-------------------+-------------+------------- - dummy | regress_foreign_data_user | - | - | | | useless - postgresql | regress_foreign_data_user | - | postgresql_fdw_validator | | | -(2 rows) - -\des+ - List of foreign servers - Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | FDW options | Description -------+-------+----------------------+-------------------+------+---------+-------------+------------- -(0 rows) - -\deu+ - List of user mappings - Server | User name | FDW options ---------+-----------+------------- -(0 rows) - --- exercise CREATE SERVER -CREATE SERVER s1 FOREIGN DATA WRAPPER foo; -- ERROR -ERROR: foreign-data wrapper "foo" does not exist -CREATE FOREIGN DATA WRAPPER foo OPTIONS ("test wrapper" 'true'); -CREATE SERVER s1 FOREIGN DATA WRAPPER foo; -CREATE SERVER s1 FOREIGN DATA WRAPPER foo; -- ERROR -ERROR: server "s1" already exists -CREATE SERVER IF NOT EXISTS s1 FOREIGN DATA WRAPPER foo; -- No ERROR, just NOTICE -NOTICE: server "s1" already exists, skipping -CREATE SERVER s2 FOREIGN DATA WRAPPER foo OPTIONS (host 'a', dbname 'b'); -CREATE SERVER s3 TYPE 'oracle' FOREIGN DATA WRAPPER foo; -CREATE SERVER s4 TYPE 'oracle' FOREIGN DATA WRAPPER foo OPTIONS (host 'a', dbname 'b'); -CREATE SERVER s5 VERSION '15.0' FOREIGN DATA WRAPPER foo; -CREATE SERVER s6 VERSION '16.0' FOREIGN DATA WRAPPER foo OPTIONS (host 'a', dbname 'b'); -CREATE SERVER s7 TYPE 'oracle' VERSION '17.0' FOREIGN DATA WRAPPER foo OPTIONS (host 'a', dbname 'b'); -CREATE SERVER s8 FOREIGN DATA WRAPPER postgresql OPTIONS (foo '1'); -- ERROR -ERROR: invalid option "foo" -HINT: Valid options in this context are: authtype, service, connect_timeout, dbname, host, hostaddr, port, tty, options, requiressl, sslmode, gsslib -CREATE SERVER s8 FOREIGN DATA WRAPPER postgresql OPTIONS (host 'localhost', dbname 's8db'); -\des+ - List of foreign servers - Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | FDW options | Description -------+---------------------------+----------------------+-------------------+--------+---------+-----------------------------------+------------- - s1 | regress_foreign_data_user | foo | | | | | - s2 | regress_foreign_data_user | foo | | | | (host 'a', dbname 'b') | - s3 | regress_foreign_data_user | foo | | oracle | | | - s4 | regress_foreign_data_user | foo | | oracle | | (host 'a', dbname 'b') | - s5 | regress_foreign_data_user | foo | | | 15.0 | | - s6 | regress_foreign_data_user | foo | | | 16.0 | (host 'a', dbname 'b') | - s7 | regress_foreign_data_user | foo | | oracle | 17.0 | (host 'a', dbname 'b') | - s8 | regress_foreign_data_user | postgresql | | | | (host 'localhost', dbname 's8db') | -(8 rows) - -SET ROLE regress_test_role; -CREATE SERVER t1 FOREIGN DATA WRAPPER foo; -- ERROR: no usage on FDW -ERROR: permission denied for foreign-data wrapper foo -RESET ROLE; -GRANT USAGE ON FOREIGN DATA WRAPPER foo TO regress_test_role; -SET ROLE regress_test_role; -CREATE SERVER t1 FOREIGN DATA WRAPPER foo; -RESET ROLE; -\des+ - List of foreign servers - Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | FDW options | Description -------+---------------------------+----------------------+-------------------+--------+---------+-----------------------------------+------------- - s1 | regress_foreign_data_user | foo | | | | | - s2 | regress_foreign_data_user | foo | | | | (host 'a', dbname 'b') | - s3 | regress_foreign_data_user | foo | | oracle | | | - s4 | regress_foreign_data_user | foo | | oracle | | (host 'a', dbname 'b') | - s5 | regress_foreign_data_user | foo | | | 15.0 | | - s6 | regress_foreign_data_user | foo | | | 16.0 | (host 'a', dbname 'b') | - s7 | regress_foreign_data_user | foo | | oracle | 17.0 | (host 'a', dbname 'b') | - s8 | regress_foreign_data_user | postgresql | | | | (host 'localhost', dbname 's8db') | - t1 | regress_test_role | foo | | | | | -(9 rows) - -REVOKE USAGE ON FOREIGN DATA WRAPPER foo FROM regress_test_role; -GRANT USAGE ON FOREIGN DATA WRAPPER foo TO regress_test_indirect; -SET ROLE regress_test_role; -CREATE SERVER t2 FOREIGN DATA WRAPPER foo; -- ERROR -ERROR: permission denied for foreign-data wrapper foo -RESET ROLE; -GRANT regress_test_indirect TO regress_test_role; -SET ROLE regress_test_role; -CREATE SERVER t2 FOREIGN DATA WRAPPER foo; -\des+ - List of foreign servers - Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | FDW options | Description -------+---------------------------+----------------------+-------------------+--------+---------+-----------------------------------+------------- - s1 | regress_foreign_data_user | foo | | | | | - s2 | regress_foreign_data_user | foo | | | | (host 'a', dbname 'b') | - s3 | regress_foreign_data_user | foo | | oracle | | | - s4 | regress_foreign_data_user | foo | | oracle | | (host 'a', dbname 'b') | - s5 | regress_foreign_data_user | foo | | | 15.0 | | - s6 | regress_foreign_data_user | foo | | | 16.0 | (host 'a', dbname 'b') | - s7 | regress_foreign_data_user | foo | | oracle | 17.0 | (host 'a', dbname 'b') | - s8 | regress_foreign_data_user | postgresql | | | | (host 'localhost', dbname 's8db') | - t1 | regress_test_role | foo | | | | | - t2 | regress_test_role | foo | | | | | -(10 rows) - -RESET ROLE; -REVOKE regress_test_indirect FROM regress_test_role; --- ALTER SERVER -ALTER SERVER s0; -- ERROR -ERROR: syntax error at or near ";" -LINE 1: ALTER SERVER s0; - ^ -ALTER SERVER s0 OPTIONS (a '1'); -- ERROR -ERROR: server "s0" does not exist -ALTER SERVER s1 VERSION '1.0' OPTIONS (servername 's1'); -ALTER SERVER s2 VERSION '1.1'; -ALTER SERVER s3 OPTIONS ("tns name" 'orcl', port '1521'); -GRANT USAGE ON FOREIGN SERVER s1 TO regress_test_role; -GRANT USAGE ON FOREIGN SERVER s6 TO regress_test_role2 WITH GRANT OPTION; -\des+ - List of foreign servers - Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | FDW options | Description -------+---------------------------+----------------------+-------------------------------------------------------+--------+---------+-----------------------------------+------------- - s1 | regress_foreign_data_user | foo | regress_foreign_data_user=U/regress_foreign_data_user+| | 1.0 | (servername 's1') | - | | | regress_test_role=U/regress_foreign_data_user | | | | - s2 | regress_foreign_data_user | foo | | | 1.1 | (host 'a', dbname 'b') | - s3 | regress_foreign_data_user | foo | | oracle | | ("tns name" 'orcl', port '1521') | - s4 | regress_foreign_data_user | foo | | oracle | | (host 'a', dbname 'b') | - s5 | regress_foreign_data_user | foo | | | 15.0 | | - s6 | regress_foreign_data_user | foo | regress_foreign_data_user=U/regress_foreign_data_user+| | 16.0 | (host 'a', dbname 'b') | - | | | regress_test_role2=U*/regress_foreign_data_user | | | | - s7 | regress_foreign_data_user | foo | | oracle | 17.0 | (host 'a', dbname 'b') | - s8 | regress_foreign_data_user | postgresql | | | | (host 'localhost', dbname 's8db') | - t1 | regress_test_role | foo | | | | | - t2 | regress_test_role | foo | | | | | -(10 rows) - -SET ROLE regress_test_role; -ALTER SERVER s1 VERSION '1.1'; -- ERROR -ERROR: must be owner of foreign server s1 -ALTER SERVER s1 OWNER TO regress_test_role; -- ERROR -ERROR: must be owner of foreign server s1 -RESET ROLE; -ALTER SERVER s1 OWNER TO regress_test_role; -GRANT regress_test_role2 TO regress_test_role; -SET ROLE regress_test_role; -ALTER SERVER s1 VERSION '1.1'; -ALTER SERVER s1 OWNER TO regress_test_role2; -- ERROR -ERROR: permission denied for foreign-data wrapper foo -RESET ROLE; -ALTER SERVER s8 OPTIONS (foo '1'); -- ERROR option validation -ERROR: invalid option "foo" -HINT: Valid options in this context are: authtype, service, connect_timeout, dbname, host, hostaddr, port, tty, options, requiressl, sslmode, gsslib -ALTER SERVER s8 OPTIONS (connect_timeout '30', SET dbname 'db1', DROP host); -SET ROLE regress_test_role; -ALTER SERVER s1 OWNER TO regress_test_indirect; -- ERROR -ERROR: must be member of role "regress_test_indirect" -RESET ROLE; -GRANT regress_test_indirect TO regress_test_role; -SET ROLE regress_test_role; -ALTER SERVER s1 OWNER TO regress_test_indirect; -RESET ROLE; -GRANT USAGE ON FOREIGN DATA WRAPPER foo TO regress_test_indirect; -SET ROLE regress_test_role; -ALTER SERVER s1 OWNER TO regress_test_indirect; -RESET ROLE; -DROP ROLE regress_test_indirect; -- ERROR -ERROR: role "regress_test_indirect" cannot be dropped because some objects depend on it -DETAIL: privileges for foreign-data wrapper foo -owner of server s1 -\des+ - List of foreign servers - Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | FDW options | Description -------+---------------------------+----------------------+-------------------------------------------------------+--------+---------+--------------------------------------+------------- - s1 | regress_test_indirect | foo | regress_test_indirect=U/regress_test_indirect | | 1.1 | (servername 's1') | - s2 | regress_foreign_data_user | foo | | | 1.1 | (host 'a', dbname 'b') | - s3 | regress_foreign_data_user | foo | | oracle | | ("tns name" 'orcl', port '1521') | - s4 | regress_foreign_data_user | foo | | oracle | | (host 'a', dbname 'b') | - s5 | regress_foreign_data_user | foo | | | 15.0 | | - s6 | regress_foreign_data_user | foo | regress_foreign_data_user=U/regress_foreign_data_user+| | 16.0 | (host 'a', dbname 'b') | - | | | regress_test_role2=U*/regress_foreign_data_user | | | | - s7 | regress_foreign_data_user | foo | | oracle | 17.0 | (host 'a', dbname 'b') | - s8 | regress_foreign_data_user | postgresql | | | | (dbname 'db1', connect_timeout '30') | - t1 | regress_test_role | foo | | | | | - t2 | regress_test_role | foo | | | | | -(10 rows) - -ALTER SERVER s8 RENAME to s8new; -\des+ - List of foreign servers - Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | FDW options | Description --------+---------------------------+----------------------+-------------------------------------------------------+--------+---------+--------------------------------------+------------- - s1 | regress_test_indirect | foo | regress_test_indirect=U/regress_test_indirect | | 1.1 | (servername 's1') | - s2 | regress_foreign_data_user | foo | | | 1.1 | (host 'a', dbname 'b') | - s3 | regress_foreign_data_user | foo | | oracle | | ("tns name" 'orcl', port '1521') | - s4 | regress_foreign_data_user | foo | | oracle | | (host 'a', dbname 'b') | - s5 | regress_foreign_data_user | foo | | | 15.0 | | - s6 | regress_foreign_data_user | foo | regress_foreign_data_user=U/regress_foreign_data_user+| | 16.0 | (host 'a', dbname 'b') | - | | | regress_test_role2=U*/regress_foreign_data_user | | | | - s7 | regress_foreign_data_user | foo | | oracle | 17.0 | (host 'a', dbname 'b') | - s8new | regress_foreign_data_user | postgresql | | | | (dbname 'db1', connect_timeout '30') | - t1 | regress_test_role | foo | | | | | - t2 | regress_test_role | foo | | | | | -(10 rows) - -ALTER SERVER s8new RENAME to s8; --- DROP SERVER -DROP SERVER nonexistent; -- ERROR -ERROR: server "nonexistent" does not exist -DROP SERVER IF EXISTS nonexistent; -NOTICE: server "nonexistent" does not exist, skipping -\des - List of foreign servers - Name | Owner | Foreign-data wrapper -------+---------------------------+---------------------- - s1 | regress_test_indirect | foo - s2 | regress_foreign_data_user | foo - s3 | regress_foreign_data_user | foo - s4 | regress_foreign_data_user | foo - s5 | regress_foreign_data_user | foo - s6 | regress_foreign_data_user | foo - s7 | regress_foreign_data_user | foo - s8 | regress_foreign_data_user | postgresql - t1 | regress_test_role | foo - t2 | regress_test_role | foo -(10 rows) - -SET ROLE regress_test_role; -DROP SERVER s2; -- ERROR -ERROR: must be owner of foreign server s2 -DROP SERVER s1; -RESET ROLE; -\des - List of foreign servers - Name | Owner | Foreign-data wrapper -------+---------------------------+---------------------- - s2 | regress_foreign_data_user | foo - s3 | regress_foreign_data_user | foo - s4 | regress_foreign_data_user | foo - s5 | regress_foreign_data_user | foo - s6 | regress_foreign_data_user | foo - s7 | regress_foreign_data_user | foo - s8 | regress_foreign_data_user | postgresql - t1 | regress_test_role | foo - t2 | regress_test_role | foo -(9 rows) - -ALTER SERVER s2 OWNER TO regress_test_role; -SET ROLE regress_test_role; -DROP SERVER s2; -RESET ROLE; -\des - List of foreign servers - Name | Owner | Foreign-data wrapper -------+---------------------------+---------------------- - s3 | regress_foreign_data_user | foo - s4 | regress_foreign_data_user | foo - s5 | regress_foreign_data_user | foo - s6 | regress_foreign_data_user | foo - s7 | regress_foreign_data_user | foo - s8 | regress_foreign_data_user | postgresql - t1 | regress_test_role | foo - t2 | regress_test_role | foo -(8 rows) - -CREATE USER MAPPING FOR current_user SERVER s3; -\deu - List of user mappings - Server | User name ---------+--------------------------- - s3 | regress_foreign_data_user -(1 row) - -DROP SERVER s3; -- ERROR -ERROR: cannot drop server s3 because other objects depend on it -DETAIL: user mapping for regress_foreign_data_user on server s3 depends on server s3 -HINT: Use DROP ... CASCADE to drop the dependent objects too. -DROP SERVER s3 CASCADE; -NOTICE: drop cascades to user mapping for regress_foreign_data_user on server s3 -\des - List of foreign servers - Name | Owner | Foreign-data wrapper -------+---------------------------+---------------------- - s4 | regress_foreign_data_user | foo - s5 | regress_foreign_data_user | foo - s6 | regress_foreign_data_user | foo - s7 | regress_foreign_data_user | foo - s8 | regress_foreign_data_user | postgresql - t1 | regress_test_role | foo - t2 | regress_test_role | foo -(7 rows) - -\deu -List of user mappings - Server | User name ---------+----------- -(0 rows) - --- CREATE USER MAPPING -CREATE USER MAPPING FOR regress_test_missing_role SERVER s1; -- ERROR -ERROR: role "regress_test_missing_role" does not exist -CREATE USER MAPPING FOR current_user SERVER s1; -- ERROR -ERROR: server "s1" does not exist -CREATE USER MAPPING FOR current_user SERVER s4; -CREATE USER MAPPING FOR user SERVER s4; -- ERROR duplicate -ERROR: user mapping for "regress_foreign_data_user" already exists for server "s4" -CREATE USER MAPPING FOR public SERVER s4 OPTIONS ("this mapping" 'is public'); -CREATE USER MAPPING FOR user SERVER s8 OPTIONS (username 'test', password 'secret'); -- ERROR -ERROR: invalid option "username" -HINT: Valid options in this context are: user, password -CREATE USER MAPPING FOR user SERVER s8 OPTIONS (user 'test', password 'secret'); -ALTER SERVER s5 OWNER TO regress_test_role; -ALTER SERVER s6 OWNER TO regress_test_indirect; -SET ROLE regress_test_role; -CREATE USER MAPPING FOR current_user SERVER s5; -CREATE USER MAPPING FOR current_user SERVER s6 OPTIONS (username 'test'); -CREATE USER MAPPING FOR current_user SERVER s7; -- ERROR -ERROR: permission denied for foreign server s7 -CREATE USER MAPPING FOR public SERVER s8; -- ERROR -ERROR: must be owner of foreign server s8 -RESET ROLE; -ALTER SERVER t1 OWNER TO regress_test_indirect; -SET ROLE regress_test_role; -CREATE USER MAPPING FOR current_user SERVER t1 OPTIONS (username 'bob', password 'boo'); -CREATE USER MAPPING FOR public SERVER t1; -RESET ROLE; -\deu - List of user mappings - Server | User name ---------+--------------------------- - s4 | public - s4 | regress_foreign_data_user - s5 | regress_test_role - s6 | regress_test_role - s8 | regress_foreign_data_user - t1 | public - t1 | regress_test_role -(7 rows) - --- ALTER USER MAPPING -ALTER USER MAPPING FOR regress_test_missing_role SERVER s4 OPTIONS (gotcha 'true'); -- ERROR -ERROR: role "regress_test_missing_role" does not exist -ALTER USER MAPPING FOR user SERVER ss4 OPTIONS (gotcha 'true'); -- ERROR -ERROR: server "ss4" does not exist -ALTER USER MAPPING FOR public SERVER s5 OPTIONS (gotcha 'true'); -- ERROR -ERROR: user mapping for "public" does not exist for server "s5" -ALTER USER MAPPING FOR current_user SERVER s8 OPTIONS (username 'test'); -- ERROR -ERROR: invalid option "username" -HINT: Valid options in this context are: user, password -ALTER USER MAPPING FOR current_user SERVER s8 OPTIONS (DROP user, SET password 'public'); -SET ROLE regress_test_role; -ALTER USER MAPPING FOR current_user SERVER s5 OPTIONS (ADD modified '1'); -ALTER USER MAPPING FOR public SERVER s4 OPTIONS (ADD modified '1'); -- ERROR -ERROR: must be owner of foreign server s4 -ALTER USER MAPPING FOR public SERVER t1 OPTIONS (ADD modified '1'); -RESET ROLE; -\deu+ - List of user mappings - Server | User name | FDW options ---------+---------------------------+---------------------------------- - s4 | public | ("this mapping" 'is public') - s4 | regress_foreign_data_user | - s5 | regress_test_role | (modified '1') - s6 | regress_test_role | (username 'test') - s8 | regress_foreign_data_user | (password 'public') - t1 | public | (modified '1') - t1 | regress_test_role | (username 'bob', password 'boo') -(7 rows) - --- DROP USER MAPPING -DROP USER MAPPING FOR regress_test_missing_role SERVER s4; -- ERROR -ERROR: role "regress_test_missing_role" does not exist -DROP USER MAPPING FOR user SERVER ss4; -ERROR: server "ss4" does not exist -DROP USER MAPPING FOR public SERVER s7; -- ERROR -ERROR: user mapping for "public" does not exist for server "s7" -DROP USER MAPPING IF EXISTS FOR regress_test_missing_role SERVER s4; -NOTICE: role "regress_test_missing_role" does not exist, skipping -DROP USER MAPPING IF EXISTS FOR user SERVER ss4; -NOTICE: server "ss4" does not exist, skipping -DROP USER MAPPING IF EXISTS FOR public SERVER s7; -NOTICE: user mapping for "public" does not exist for server "s7", skipping -CREATE USER MAPPING FOR public SERVER s8; -SET ROLE regress_test_role; -DROP USER MAPPING FOR public SERVER s8; -- ERROR -ERROR: must be owner of foreign server s8 -RESET ROLE; -DROP SERVER s7; -\deu - List of user mappings - Server | User name ---------+--------------------------- - s4 | public - s4 | regress_foreign_data_user - s5 | regress_test_role - s6 | regress_test_role - s8 | public - s8 | regress_foreign_data_user - t1 | public - t1 | regress_test_role -(8 rows) - --- CREATE FOREIGN TABLE -CREATE SCHEMA foreign_schema; -CREATE SERVER s0 FOREIGN DATA WRAPPER dummy; -CREATE FOREIGN TABLE ft1 (); -- ERROR -ERROR: syntax error at or near ";" -LINE 1: CREATE FOREIGN TABLE ft1 (); - ^ -CREATE FOREIGN TABLE ft1 () SERVER no_server; -- ERROR -ERROR: server "no_server" does not exist -CREATE FOREIGN TABLE ft1 ( - c1 integer OPTIONS ("param 1" 'val1') PRIMARY KEY, - c2 text OPTIONS (param2 'val2', param3 'val3'), - c3 date -) SERVER s0 OPTIONS (delimiter ',', quote '"', "be quoted" 'value'); -- ERROR -ERROR: primary key constraints are not supported on foreign tables -LINE 2: c1 integer OPTIONS ("param 1" 'val1') PRIMARY KEY, - ^ -CREATE TABLE ref_table (id integer PRIMARY KEY); -CREATE FOREIGN TABLE ft1 ( - c1 integer OPTIONS ("param 1" 'val1') REFERENCES ref_table (id), - c2 text OPTIONS (param2 'val2', param3 'val3'), - c3 date -) SERVER s0 OPTIONS (delimiter ',', quote '"', "be quoted" 'value'); -- ERROR -ERROR: foreign key constraints are not supported on foreign tables -LINE 2: c1 integer OPTIONS ("param 1" 'val1') REFERENCES ref_table ... - ^ -DROP TABLE ref_table; -CREATE FOREIGN TABLE ft1 ( - c1 integer OPTIONS ("param 1" 'val1') NOT NULL, - c2 text OPTIONS (param2 'val2', param3 'val3'), - c3 date, - UNIQUE (c3) -) SERVER s0 OPTIONS (delimiter ',', quote '"', "be quoted" 'value'); -- ERROR -ERROR: unique constraints are not supported on foreign tables -LINE 5: UNIQUE (c3) - ^ -CREATE FOREIGN TABLE ft1 ( - c1 integer OPTIONS ("param 1" 'val1') NOT NULL, - c2 text OPTIONS (param2 'val2', param3 'val3') CHECK (c2 <> ''), - c3 date, - CHECK (c3 BETWEEN '1994-01-01'::date AND '1994-01-31'::date) -) SERVER s0 OPTIONS (delimiter ',', quote '"', "be quoted" 'value'); -COMMENT ON FOREIGN TABLE ft1 IS 'ft1'; -COMMENT ON COLUMN ft1.c1 IS 'ft1.c1'; -\d+ ft1 - Foreign table "public.ft1" - Column | Type | Collation | Nullable | Default | FDW options | Storage | Stats target | Description ---------+---------+-----------+----------+---------+--------------------------------+----------+--------------+------------- - c1 | integer | | not null | | ("param 1" 'val1') | plain | | ft1.c1 - c2 | text | | | | (param2 'val2', param3 'val3') | extended | | - c3 | date | | | | | plain | | -Check constraints: - "ft1_c2_check" CHECK (c2 <> ''::text) - "ft1_c3_check" CHECK (c3 >= '01-01-1994'::date AND c3 <= '01-31-1994'::date) -Server: s0 -FDW options: (delimiter ',', quote '"', "be quoted" 'value') - -\det+ - List of foreign tables - Schema | Table | Server | FDW options | Description ---------+-------+--------+-------------------------------------------------+------------- - public | ft1 | s0 | (delimiter ',', quote '"', "be quoted" 'value') | ft1 -(1 row) - -CREATE INDEX id_ft1_c2 ON ft1 (c2); -- ERROR -ERROR: cannot create index on foreign table "ft1" -SELECT * FROM ft1; -- ERROR -ERROR: foreign-data wrapper "dummy" has no handler -EXPLAIN SELECT * FROM ft1; -- ERROR -ERROR: foreign-data wrapper "dummy" has no handler -CREATE TABLE lt1 (a INT) PARTITION BY RANGE (a); -CREATE FOREIGN TABLE ft_part1 - PARTITION OF lt1 FOR VALUES FROM (0) TO (1000) SERVER s0; -CREATE INDEX ON lt1 (a); -- skips partition -CREATE UNIQUE INDEX ON lt1 (a); -- ERROR -ERROR: cannot create unique index on partitioned table "lt1" -DETAIL: Table "lt1" contains partitions that are foreign tables. -ALTER TABLE lt1 ADD PRIMARY KEY (a); -- ERROR -ERROR: cannot create unique index on partitioned table "lt1" -DETAIL: Table "lt1" contains partitions that are foreign tables. -DROP TABLE lt1; -CREATE TABLE lt1 (a INT) PARTITION BY RANGE (a); -CREATE INDEX ON lt1 (a); -CREATE FOREIGN TABLE ft_part1 - PARTITION OF lt1 FOR VALUES FROM (0) TO (1000) SERVER s0; -CREATE FOREIGN TABLE ft_part2 (a INT) SERVER s0; -ALTER TABLE lt1 ATTACH PARTITION ft_part2 FOR VALUES FROM (1000) TO (2000); -DROP FOREIGN TABLE ft_part1, ft_part2; -CREATE UNIQUE INDEX ON lt1 (a); -ALTER TABLE lt1 ADD PRIMARY KEY (a); -CREATE FOREIGN TABLE ft_part1 - PARTITION OF lt1 FOR VALUES FROM (0) TO (1000) SERVER s0; -- ERROR -ERROR: cannot create foreign partition of partitioned table "lt1" -DETAIL: Table "lt1" contains indexes that are unique. -CREATE FOREIGN TABLE ft_part2 (a INT NOT NULL) SERVER s0; -ALTER TABLE lt1 ATTACH PARTITION ft_part2 - FOR VALUES FROM (1000) TO (2000); -- ERROR -ERROR: cannot attach foreign table "ft_part2" as partition of partitioned table "lt1" -DETAIL: Partitioned table "lt1" contains unique indexes. -DROP TABLE lt1; -DROP FOREIGN TABLE ft_part2; -CREATE TABLE lt1 (a INT) PARTITION BY RANGE (a); -CREATE INDEX ON lt1 (a); -CREATE TABLE lt1_part1 - PARTITION OF lt1 FOR VALUES FROM (0) TO (1000) - PARTITION BY RANGE (a); -CREATE FOREIGN TABLE ft_part_1_1 - PARTITION OF lt1_part1 FOR VALUES FROM (0) TO (100) SERVER s0; -CREATE FOREIGN TABLE ft_part_1_2 (a INT) SERVER s0; -ALTER TABLE lt1_part1 ATTACH PARTITION ft_part_1_2 FOR VALUES FROM (100) TO (200); -CREATE UNIQUE INDEX ON lt1 (a); -ERROR: cannot create unique index on partitioned table "lt1" -DETAIL: Table "lt1" contains partitions that are foreign tables. -ALTER TABLE lt1 ADD PRIMARY KEY (a); -ERROR: cannot create unique index on partitioned table "lt1_part1" -DETAIL: Table "lt1_part1" contains partitions that are foreign tables. -DROP FOREIGN TABLE ft_part_1_1, ft_part_1_2; -CREATE UNIQUE INDEX ON lt1 (a); -ALTER TABLE lt1 ADD PRIMARY KEY (a); -CREATE FOREIGN TABLE ft_part_1_1 - PARTITION OF lt1_part1 FOR VALUES FROM (0) TO (100) SERVER s0; -ERROR: cannot create foreign partition of partitioned table "lt1_part1" -DETAIL: Table "lt1_part1" contains indexes that are unique. -CREATE FOREIGN TABLE ft_part_1_2 (a INT NOT NULL) SERVER s0; -ALTER TABLE lt1_part1 ATTACH PARTITION ft_part_1_2 FOR VALUES FROM (100) TO (200); -ERROR: cannot attach foreign table "ft_part_1_2" as partition of partitioned table "lt1_part1" -DETAIL: Partitioned table "lt1_part1" contains unique indexes. -DROP TABLE lt1; -DROP FOREIGN TABLE ft_part_1_2; --- ALTER FOREIGN TABLE -COMMENT ON FOREIGN TABLE ft1 IS 'foreign table'; -COMMENT ON FOREIGN TABLE ft1 IS NULL; -COMMENT ON COLUMN ft1.c1 IS 'foreign column'; -COMMENT ON COLUMN ft1.c1 IS NULL; -ALTER FOREIGN TABLE ft1 ADD COLUMN c4 integer; -ALTER FOREIGN TABLE ft1 ADD COLUMN c5 integer DEFAULT 0; -ALTER FOREIGN TABLE ft1 ADD COLUMN c6 integer; -ALTER FOREIGN TABLE ft1 ADD COLUMN c7 integer NOT NULL; -ALTER FOREIGN TABLE ft1 ADD COLUMN c8 integer; -ALTER FOREIGN TABLE ft1 ADD COLUMN c9 integer; -ALTER FOREIGN TABLE ft1 ADD COLUMN c10 integer OPTIONS (p1 'v1'); -ALTER FOREIGN TABLE ft1 ALTER COLUMN c4 SET DEFAULT 0; -ALTER FOREIGN TABLE ft1 ALTER COLUMN c5 DROP DEFAULT; -ALTER FOREIGN TABLE ft1 ALTER COLUMN c6 SET NOT NULL; -ALTER FOREIGN TABLE ft1 ALTER COLUMN c7 DROP NOT NULL; -ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 TYPE char(10) USING '0'; -- ERROR -ERROR: "ft1" is not a table -ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 TYPE char(10); -ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 SET DATA TYPE text; -ALTER FOREIGN TABLE ft1 ALTER COLUMN xmin OPTIONS (ADD p1 'v1'); -- ERROR -ERROR: cannot alter system column "xmin" -ALTER FOREIGN TABLE ft1 ALTER COLUMN c7 OPTIONS (ADD p1 'v1', ADD p2 'v2'), - ALTER COLUMN c8 OPTIONS (ADD p1 'v1', ADD p2 'v2'); -ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 OPTIONS (SET p2 'V2', DROP p1); -ALTER FOREIGN TABLE ft1 ALTER COLUMN c1 SET STATISTICS 10000; -ALTER FOREIGN TABLE ft1 ALTER COLUMN c1 SET (n_distinct = 100); -ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 SET STATISTICS -1; -ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 SET STORAGE PLAIN; -\d+ ft1 - Foreign table "public.ft1" - Column | Type | Collation | Nullable | Default | FDW options | Storage | Stats target | Description ---------+---------+-----------+----------+---------+--------------------------------+----------+--------------+------------- - c1 | integer | | not null | | ("param 1" 'val1') | plain | 10000 | - c2 | text | | | | (param2 'val2', param3 'val3') | extended | | - c3 | date | | | | | plain | | - c4 | integer | | | 0 | | plain | | - c5 | integer | | | | | plain | | - c6 | integer | | not null | | | plain | | - c7 | integer | | | | (p1 'v1', p2 'v2') | plain | | - c8 | text | | | | (p2 'V2') | plain | | - c9 | integer | | | | | plain | | - c10 | integer | | | | (p1 'v1') | plain | | -Check constraints: - "ft1_c2_check" CHECK (c2 <> ''::text) - "ft1_c3_check" CHECK (c3 >= '01-01-1994'::date AND c3 <= '01-31-1994'::date) -Server: s0 -FDW options: (delimiter ',', quote '"', "be quoted" 'value') - --- can't change the column type if it's used elsewhere -CREATE TABLE use_ft1_column_type (x ft1); -ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 SET DATA TYPE integer; -- ERROR -ERROR: cannot alter foreign table "ft1" because column "use_ft1_column_type.x" uses its row type -DROP TABLE use_ft1_column_type; -ALTER FOREIGN TABLE ft1 ADD PRIMARY KEY (c7); -- ERROR -ERROR: primary key constraints are not supported on foreign tables -LINE 1: ALTER FOREIGN TABLE ft1 ADD PRIMARY KEY (c7); - ^ -ALTER FOREIGN TABLE ft1 ADD CONSTRAINT ft1_c9_check CHECK (c9 < 0) NOT VALID; -ALTER FOREIGN TABLE ft1 ALTER CONSTRAINT ft1_c9_check DEFERRABLE; -- ERROR -ERROR: "ft1" is not a table -ALTER FOREIGN TABLE ft1 DROP CONSTRAINT ft1_c9_check; -ALTER FOREIGN TABLE ft1 DROP CONSTRAINT no_const; -- ERROR -ERROR: constraint "no_const" of relation "ft1" does not exist -ALTER FOREIGN TABLE ft1 DROP CONSTRAINT IF EXISTS no_const; -NOTICE: constraint "no_const" of relation "ft1" does not exist, skipping -ALTER FOREIGN TABLE ft1 OWNER TO regress_test_role; -ALTER FOREIGN TABLE ft1 OPTIONS (DROP delimiter, SET quote '~', ADD escape '@'); -ALTER FOREIGN TABLE ft1 DROP COLUMN no_column; -- ERROR -ERROR: column "no_column" of relation "ft1" does not exist -ALTER FOREIGN TABLE ft1 DROP COLUMN IF EXISTS no_column; -NOTICE: column "no_column" of relation "ft1" does not exist, skipping -ALTER FOREIGN TABLE ft1 DROP COLUMN c9; -ALTER FOREIGN TABLE ft1 SET SCHEMA foreign_schema; -ALTER FOREIGN TABLE ft1 SET TABLESPACE ts; -- ERROR -ERROR: relation "ft1" does not exist -ALTER FOREIGN TABLE foreign_schema.ft1 SET TABLESPACE ts; -- ERROR -ERROR: "ft1" is not a table, materialized view, index, or partitioned index -ALTER FOREIGN TABLE foreign_schema.ft1 RENAME c1 TO foreign_column_1; -ALTER FOREIGN TABLE foreign_schema.ft1 RENAME TO foreign_table_1; -\d foreign_schema.foreign_table_1 - Foreign table "foreign_schema.foreign_table_1" - Column | Type | Collation | Nullable | Default | FDW options -------------------+---------+-----------+----------+---------+-------------------------------- - foreign_column_1 | integer | | not null | | ("param 1" 'val1') - c2 | text | | | | (param2 'val2', param3 'val3') - c3 | date | | | | - c4 | integer | | | 0 | - c5 | integer | | | | - c6 | integer | | not null | | - c7 | integer | | | | (p1 'v1', p2 'v2') - c8 | text | | | | (p2 'V2') - c10 | integer | | | | (p1 'v1') -Check constraints: - "ft1_c2_check" CHECK (c2 <> ''::text) - "ft1_c3_check" CHECK (c3 >= '01-01-1994'::date AND c3 <= '01-31-1994'::date) -Server: s0 -FDW options: (quote '~', "be quoted" 'value', escape '@') - --- alter noexisting table -ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 ADD COLUMN c4 integer; -NOTICE: relation "doesnt_exist_ft1" does not exist, skipping -ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 ADD COLUMN c6 integer; -NOTICE: relation "doesnt_exist_ft1" does not exist, skipping -ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 ADD COLUMN c7 integer NOT NULL; -NOTICE: relation "doesnt_exist_ft1" does not exist, skipping -ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 ADD COLUMN c8 integer; -NOTICE: relation "doesnt_exist_ft1" does not exist, skipping -ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 ADD COLUMN c9 integer; -NOTICE: relation "doesnt_exist_ft1" does not exist, skipping -ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 ADD COLUMN c10 integer OPTIONS (p1 'v1'); -NOTICE: relation "doesnt_exist_ft1" does not exist, skipping -ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 ALTER COLUMN c6 SET NOT NULL; -NOTICE: relation "doesnt_exist_ft1" does not exist, skipping -ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 ALTER COLUMN c7 DROP NOT NULL; -NOTICE: relation "doesnt_exist_ft1" does not exist, skipping -ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 ALTER COLUMN c8 TYPE char(10); -NOTICE: relation "doesnt_exist_ft1" does not exist, skipping -ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 ALTER COLUMN c8 SET DATA TYPE text; -NOTICE: relation "doesnt_exist_ft1" does not exist, skipping -ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 ALTER COLUMN c7 OPTIONS (ADD p1 'v1', ADD p2 'v2'), - ALTER COLUMN c8 OPTIONS (ADD p1 'v1', ADD p2 'v2'); -NOTICE: relation "doesnt_exist_ft1" does not exist, skipping -ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 ALTER COLUMN c8 OPTIONS (SET p2 'V2', DROP p1); -NOTICE: relation "doesnt_exist_ft1" does not exist, skipping -ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 DROP CONSTRAINT IF EXISTS no_const; -NOTICE: relation "doesnt_exist_ft1" does not exist, skipping -ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 DROP CONSTRAINT ft1_c1_check; -NOTICE: relation "doesnt_exist_ft1" does not exist, skipping -ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 OWNER TO regress_test_role; -NOTICE: relation "doesnt_exist_ft1" does not exist, skipping -ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 OPTIONS (DROP delimiter, SET quote '~', ADD escape '@'); -NOTICE: relation "doesnt_exist_ft1" does not exist, skipping -ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 DROP COLUMN IF EXISTS no_column; -NOTICE: relation "doesnt_exist_ft1" does not exist, skipping -ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 DROP COLUMN c9; -NOTICE: relation "doesnt_exist_ft1" does not exist, skipping -ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 SET SCHEMA foreign_schema; -NOTICE: relation "doesnt_exist_ft1" does not exist, skipping -ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 RENAME c1 TO foreign_column_1; -NOTICE: relation "doesnt_exist_ft1" does not exist, skipping -ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1 RENAME TO foreign_table_1; -NOTICE: relation "doesnt_exist_ft1" does not exist, skipping --- Information schema -SELECT * FROM information_schema.foreign_data_wrappers ORDER BY 1, 2; - foreign_data_wrapper_catalog | foreign_data_wrapper_name | authorization_identifier | library_name | foreign_data_wrapper_language -------------------------------+---------------------------+---------------------------+--------------+------------------------------- - regression | dummy | regress_foreign_data_user | | c - regression | foo | regress_foreign_data_user | | c - regression | postgresql | regress_foreign_data_user | | c -(3 rows) - -SELECT * FROM information_schema.foreign_data_wrapper_options ORDER BY 1, 2, 3; - foreign_data_wrapper_catalog | foreign_data_wrapper_name | option_name | option_value -------------------------------+---------------------------+--------------+-------------- - regression | foo | test wrapper | true -(1 row) - -SELECT * FROM information_schema.foreign_servers ORDER BY 1, 2; - foreign_server_catalog | foreign_server_name | foreign_data_wrapper_catalog | foreign_data_wrapper_name | foreign_server_type | foreign_server_version | authorization_identifier -------------------------+---------------------+------------------------------+---------------------------+---------------------+------------------------+--------------------------- - regression | s0 | regression | dummy | | | regress_foreign_data_user - regression | s4 | regression | foo | oracle | | regress_foreign_data_user - regression | s5 | regression | foo | | 15.0 | regress_test_role - regression | s6 | regression | foo | | 16.0 | regress_test_indirect - regression | s8 | regression | postgresql | | | regress_foreign_data_user - regression | t1 | regression | foo | | | regress_test_indirect - regression | t2 | regression | foo | | | regress_test_role -(7 rows) - -SELECT * FROM information_schema.foreign_server_options ORDER BY 1, 2, 3; - foreign_server_catalog | foreign_server_name | option_name | option_value -------------------------+---------------------+-----------------+-------------- - regression | s4 | dbname | b - regression | s4 | host | a - regression | s6 | dbname | b - regression | s6 | host | a - regression | s8 | connect_timeout | 30 - regression | s8 | dbname | db1 -(6 rows) - -SELECT * FROM information_schema.user_mappings ORDER BY lower(authorization_identifier), 2, 3; - authorization_identifier | foreign_server_catalog | foreign_server_name ----------------------------+------------------------+--------------------- - PUBLIC | regression | s4 - PUBLIC | regression | s8 - PUBLIC | regression | t1 - regress_foreign_data_user | regression | s4 - regress_foreign_data_user | regression | s8 - regress_test_role | regression | s5 - regress_test_role | regression | s6 - regress_test_role | regression | t1 -(8 rows) - -SELECT * FROM information_schema.user_mapping_options ORDER BY lower(authorization_identifier), 2, 3, 4; - authorization_identifier | foreign_server_catalog | foreign_server_name | option_name | option_value ----------------------------+------------------------+---------------------+--------------+-------------- - PUBLIC | regression | s4 | this mapping | is public - PUBLIC | regression | t1 | modified | 1 - regress_foreign_data_user | regression | s8 | password | public - regress_test_role | regression | s5 | modified | 1 - regress_test_role | regression | s6 | username | test - regress_test_role | regression | t1 | password | boo - regress_test_role | regression | t1 | username | bob -(7 rows) - -SELECT * FROM information_schema.usage_privileges WHERE object_type LIKE 'FOREIGN%' AND object_name IN ('s6', 'foo') ORDER BY 1, 2, 3, 4, 5; - grantor | grantee | object_catalog | object_schema | object_name | object_type | privilege_type | is_grantable ----------------------------+---------------------------+----------------+---------------+-------------+----------------------+----------------+-------------- - regress_foreign_data_user | regress_foreign_data_user | regression | | foo | FOREIGN DATA WRAPPER | USAGE | YES - regress_foreign_data_user | regress_test_indirect | regression | | foo | FOREIGN DATA WRAPPER | USAGE | NO - regress_test_indirect | regress_test_indirect | regression | | s6 | FOREIGN SERVER | USAGE | YES - regress_test_indirect | regress_test_role2 | regression | | s6 | FOREIGN SERVER | USAGE | YES -(4 rows) - -SELECT * FROM information_schema.role_usage_grants WHERE object_type LIKE 'FOREIGN%' AND object_name IN ('s6', 'foo') ORDER BY 1, 2, 3, 4, 5; - grantor | grantee | object_catalog | object_schema | object_name | object_type | privilege_type | is_grantable ----------------------------+---------------------------+----------------+---------------+-------------+----------------------+----------------+-------------- - regress_foreign_data_user | regress_foreign_data_user | regression | | foo | FOREIGN DATA WRAPPER | USAGE | YES - regress_foreign_data_user | regress_test_indirect | regression | | foo | FOREIGN DATA WRAPPER | USAGE | NO - regress_test_indirect | regress_test_indirect | regression | | s6 | FOREIGN SERVER | USAGE | YES - regress_test_indirect | regress_test_role2 | regression | | s6 | FOREIGN SERVER | USAGE | YES -(4 rows) - -SELECT * FROM information_schema.foreign_tables ORDER BY 1, 2, 3; - foreign_table_catalog | foreign_table_schema | foreign_table_name | foreign_server_catalog | foreign_server_name ------------------------+----------------------+--------------------+------------------------+--------------------- - regression | foreign_schema | foreign_table_1 | regression | s0 -(1 row) - -SELECT * FROM information_schema.foreign_table_options ORDER BY 1, 2, 3, 4; - foreign_table_catalog | foreign_table_schema | foreign_table_name | option_name | option_value ------------------------+----------------------+--------------------+-------------+-------------- - regression | foreign_schema | foreign_table_1 | be quoted | value - regression | foreign_schema | foreign_table_1 | escape | @ - regression | foreign_schema | foreign_table_1 | quote | ~ -(3 rows) - -SET ROLE regress_test_role; -SELECT * FROM information_schema.user_mapping_options ORDER BY 1, 2, 3, 4; - authorization_identifier | foreign_server_catalog | foreign_server_name | option_name | option_value ---------------------------+------------------------+---------------------+-------------+-------------- - PUBLIC | regression | t1 | modified | 1 - regress_test_role | regression | s5 | modified | 1 - regress_test_role | regression | s6 | username | test - regress_test_role | regression | t1 | password | boo - regress_test_role | regression | t1 | username | bob -(5 rows) - -SELECT * FROM information_schema.usage_privileges WHERE object_type LIKE 'FOREIGN%' AND object_name IN ('s6', 'foo') ORDER BY 1, 2, 3, 4, 5; - grantor | grantee | object_catalog | object_schema | object_name | object_type | privilege_type | is_grantable ----------------------------+-----------------------+----------------+---------------+-------------+----------------------+----------------+-------------- - regress_foreign_data_user | regress_test_indirect | regression | | foo | FOREIGN DATA WRAPPER | USAGE | NO - regress_test_indirect | regress_test_indirect | regression | | s6 | FOREIGN SERVER | USAGE | YES - regress_test_indirect | regress_test_role2 | regression | | s6 | FOREIGN SERVER | USAGE | YES -(3 rows) - -SELECT * FROM information_schema.role_usage_grants WHERE object_type LIKE 'FOREIGN%' AND object_name IN ('s6', 'foo') ORDER BY 1, 2, 3, 4, 5; - grantor | grantee | object_catalog | object_schema | object_name | object_type | privilege_type | is_grantable ----------------------------+-----------------------+----------------+---------------+-------------+----------------------+----------------+-------------- - regress_foreign_data_user | regress_test_indirect | regression | | foo | FOREIGN DATA WRAPPER | USAGE | NO - regress_test_indirect | regress_test_indirect | regression | | s6 | FOREIGN SERVER | USAGE | YES - regress_test_indirect | regress_test_role2 | regression | | s6 | FOREIGN SERVER | USAGE | YES -(3 rows) - -DROP USER MAPPING FOR current_user SERVER t1; -SET ROLE regress_test_role2; -SELECT * FROM information_schema.user_mapping_options ORDER BY 1, 2, 3, 4; - authorization_identifier | foreign_server_catalog | foreign_server_name | option_name | option_value ---------------------------+------------------------+---------------------+-------------+-------------- - regress_test_role | regression | s6 | username | -(1 row) - -RESET ROLE; --- has_foreign_data_wrapper_privilege -SELECT has_foreign_data_wrapper_privilege('regress_test_role', - (SELECT oid FROM pg_foreign_data_wrapper WHERE fdwname='foo'), 'USAGE'); - has_foreign_data_wrapper_privilege ------------------------------------- - t -(1 row) - -SELECT has_foreign_data_wrapper_privilege('regress_test_role', 'foo', 'USAGE'); - has_foreign_data_wrapper_privilege ------------------------------------- - t -(1 row) - -SELECT has_foreign_data_wrapper_privilege( - (SELECT oid FROM pg_roles WHERE rolname='regress_test_role'), - (SELECT oid FROM pg_foreign_data_wrapper WHERE fdwname='foo'), 'USAGE'); - has_foreign_data_wrapper_privilege ------------------------------------- - t -(1 row) - -SELECT has_foreign_data_wrapper_privilege( - (SELECT oid FROM pg_foreign_data_wrapper WHERE fdwname='foo'), 'USAGE'); - has_foreign_data_wrapper_privilege ------------------------------------- - t -(1 row) - -SELECT has_foreign_data_wrapper_privilege( - (SELECT oid FROM pg_roles WHERE rolname='regress_test_role'), 'foo', 'USAGE'); - has_foreign_data_wrapper_privilege ------------------------------------- - t -(1 row) - -SELECT has_foreign_data_wrapper_privilege('foo', 'USAGE'); - has_foreign_data_wrapper_privilege ------------------------------------- - t -(1 row) - -GRANT USAGE ON FOREIGN DATA WRAPPER foo TO regress_test_role; -SELECT has_foreign_data_wrapper_privilege('regress_test_role', 'foo', 'USAGE'); - has_foreign_data_wrapper_privilege ------------------------------------- - t -(1 row) - --- has_server_privilege -SELECT has_server_privilege('regress_test_role', - (SELECT oid FROM pg_foreign_server WHERE srvname='s8'), 'USAGE'); - has_server_privilege ----------------------- - f -(1 row) - -SELECT has_server_privilege('regress_test_role', 's8', 'USAGE'); - has_server_privilege ----------------------- - f -(1 row) - -SELECT has_server_privilege( - (SELECT oid FROM pg_roles WHERE rolname='regress_test_role'), - (SELECT oid FROM pg_foreign_server WHERE srvname='s8'), 'USAGE'); - has_server_privilege ----------------------- - f -(1 row) - -SELECT has_server_privilege( - (SELECT oid FROM pg_foreign_server WHERE srvname='s8'), 'USAGE'); - has_server_privilege ----------------------- - t -(1 row) - -SELECT has_server_privilege( - (SELECT oid FROM pg_roles WHERE rolname='regress_test_role'), 's8', 'USAGE'); - has_server_privilege ----------------------- - f -(1 row) - -SELECT has_server_privilege('s8', 'USAGE'); - has_server_privilege ----------------------- - t -(1 row) - -GRANT USAGE ON FOREIGN SERVER s8 TO regress_test_role; -SELECT has_server_privilege('regress_test_role', 's8', 'USAGE'); - has_server_privilege ----------------------- - t -(1 row) - -REVOKE USAGE ON FOREIGN SERVER s8 FROM regress_test_role; -GRANT USAGE ON FOREIGN SERVER s4 TO regress_test_role; -DROP USER MAPPING FOR public SERVER s4; -ALTER SERVER s6 OPTIONS (DROP host, DROP dbname); -ALTER USER MAPPING FOR regress_test_role SERVER s6 OPTIONS (DROP username); -ALTER FOREIGN DATA WRAPPER foo VALIDATOR postgresql_fdw_validator; -WARNING: changing the foreign-data wrapper validator can cause the options for dependent objects to become invalid --- Privileges -SET ROLE regress_unprivileged_role; -CREATE FOREIGN DATA WRAPPER foobar; -- ERROR -ERROR: permission denied to create foreign-data wrapper "foobar" -HINT: Must be superuser to create a foreign-data wrapper. -ALTER FOREIGN DATA WRAPPER foo OPTIONS (gotcha 'true'); -- ERROR -ERROR: permission denied to alter foreign-data wrapper "foo" -HINT: Must be superuser to alter a foreign-data wrapper. -ALTER FOREIGN DATA WRAPPER foo OWNER TO regress_unprivileged_role; -- ERROR -ERROR: permission denied to change owner of foreign-data wrapper "foo" -HINT: Must be superuser to change owner of a foreign-data wrapper. -DROP FOREIGN DATA WRAPPER foo; -- ERROR -ERROR: must be owner of foreign-data wrapper foo -GRANT USAGE ON FOREIGN DATA WRAPPER foo TO regress_test_role; -- ERROR -ERROR: permission denied for foreign-data wrapper foo -CREATE SERVER s9 FOREIGN DATA WRAPPER foo; -- ERROR -ERROR: permission denied for foreign-data wrapper foo -ALTER SERVER s4 VERSION '0.5'; -- ERROR -ERROR: must be owner of foreign server s4 -ALTER SERVER s4 OWNER TO regress_unprivileged_role; -- ERROR -ERROR: must be owner of foreign server s4 -DROP SERVER s4; -- ERROR -ERROR: must be owner of foreign server s4 -GRANT USAGE ON FOREIGN SERVER s4 TO regress_test_role; -- ERROR -ERROR: permission denied for foreign server s4 -CREATE USER MAPPING FOR public SERVER s4; -- ERROR -ERROR: must be owner of foreign server s4 -ALTER USER MAPPING FOR regress_test_role SERVER s6 OPTIONS (gotcha 'true'); -- ERROR -ERROR: must be owner of foreign server s6 -DROP USER MAPPING FOR regress_test_role SERVER s6; -- ERROR -ERROR: must be owner of foreign server s6 -RESET ROLE; -GRANT USAGE ON FOREIGN DATA WRAPPER postgresql TO regress_unprivileged_role; -GRANT USAGE ON FOREIGN DATA WRAPPER foo TO regress_unprivileged_role WITH GRANT OPTION; -SET ROLE regress_unprivileged_role; -CREATE FOREIGN DATA WRAPPER foobar; -- ERROR -ERROR: permission denied to create foreign-data wrapper "foobar" -HINT: Must be superuser to create a foreign-data wrapper. -ALTER FOREIGN DATA WRAPPER foo OPTIONS (gotcha 'true'); -- ERROR -ERROR: permission denied to alter foreign-data wrapper "foo" -HINT: Must be superuser to alter a foreign-data wrapper. -DROP FOREIGN DATA WRAPPER foo; -- ERROR -ERROR: must be owner of foreign-data wrapper foo -GRANT USAGE ON FOREIGN DATA WRAPPER postgresql TO regress_test_role; -- WARNING -WARNING: no privileges were granted for "postgresql" -GRANT USAGE ON FOREIGN DATA WRAPPER foo TO regress_test_role; -CREATE SERVER s9 FOREIGN DATA WRAPPER postgresql; -ALTER SERVER s6 VERSION '0.5'; -- ERROR -ERROR: must be owner of foreign server s6 -DROP SERVER s6; -- ERROR -ERROR: must be owner of foreign server s6 -GRANT USAGE ON FOREIGN SERVER s6 TO regress_test_role; -- ERROR -ERROR: permission denied for foreign server s6 -GRANT USAGE ON FOREIGN SERVER s9 TO regress_test_role; -CREATE USER MAPPING FOR public SERVER s6; -- ERROR -ERROR: must be owner of foreign server s6 -CREATE USER MAPPING FOR public SERVER s9; -ALTER USER MAPPING FOR regress_test_role SERVER s6 OPTIONS (gotcha 'true'); -- ERROR -ERROR: must be owner of foreign server s6 -DROP USER MAPPING FOR regress_test_role SERVER s6; -- ERROR -ERROR: must be owner of foreign server s6 -RESET ROLE; -REVOKE USAGE ON FOREIGN DATA WRAPPER foo FROM regress_unprivileged_role; -- ERROR -ERROR: dependent privileges exist -HINT: Use CASCADE to revoke them too. -REVOKE USAGE ON FOREIGN DATA WRAPPER foo FROM regress_unprivileged_role CASCADE; -SET ROLE regress_unprivileged_role; -GRANT USAGE ON FOREIGN DATA WRAPPER foo TO regress_test_role; -- ERROR -ERROR: permission denied for foreign-data wrapper foo -CREATE SERVER s10 FOREIGN DATA WRAPPER foo; -- ERROR -ERROR: permission denied for foreign-data wrapper foo -ALTER SERVER s9 VERSION '1.1'; -GRANT USAGE ON FOREIGN SERVER s9 TO regress_test_role; -CREATE USER MAPPING FOR current_user SERVER s9; -DROP SERVER s9 CASCADE; -NOTICE: drop cascades to 2 other objects -DETAIL: drop cascades to user mapping for public on server s9 -drop cascades to user mapping for regress_unprivileged_role on server s9 -RESET ROLE; -CREATE SERVER s9 FOREIGN DATA WRAPPER foo; -GRANT USAGE ON FOREIGN SERVER s9 TO regress_unprivileged_role; -SET ROLE regress_unprivileged_role; -ALTER SERVER s9 VERSION '1.2'; -- ERROR -ERROR: must be owner of foreign server s9 -GRANT USAGE ON FOREIGN SERVER s9 TO regress_test_role; -- WARNING -WARNING: no privileges were granted for "s9" -CREATE USER MAPPING FOR current_user SERVER s9; -DROP SERVER s9 CASCADE; -- ERROR -ERROR: must be owner of foreign server s9 --- Check visibility of user mapping data -SET ROLE regress_test_role; -CREATE SERVER s10 FOREIGN DATA WRAPPER foo; -CREATE USER MAPPING FOR public SERVER s10 OPTIONS (user 'secret'); -CREATE USER MAPPING FOR regress_unprivileged_role SERVER s10 OPTIONS (user 'secret'); --- owner of server can see some option fields -\deu+ - List of user mappings - Server | User name | FDW options ---------+---------------------------+------------------- - s10 | public | ("user" 'secret') - s10 | regress_unprivileged_role | - s4 | regress_foreign_data_user | - s5 | regress_test_role | (modified '1') - s6 | regress_test_role | - s8 | public | - s8 | regress_foreign_data_user | - s9 | regress_unprivileged_role | - t1 | public | (modified '1') -(9 rows) - -RESET ROLE; --- superuser can see all option fields -\deu+ - List of user mappings - Server | User name | FDW options ---------+---------------------------+--------------------- - s10 | public | ("user" 'secret') - s10 | regress_unprivileged_role | ("user" 'secret') - s4 | regress_foreign_data_user | - s5 | regress_test_role | (modified '1') - s6 | regress_test_role | - s8 | public | - s8 | regress_foreign_data_user | (password 'public') - s9 | regress_unprivileged_role | - t1 | public | (modified '1') -(9 rows) - --- unprivileged user cannot see any option field -SET ROLE regress_unprivileged_role; -\deu+ - List of user mappings - Server | User name | FDW options ---------+---------------------------+------------- - s10 | public | - s10 | regress_unprivileged_role | - s4 | regress_foreign_data_user | - s5 | regress_test_role | - s6 | regress_test_role | - s8 | public | - s8 | regress_foreign_data_user | - s9 | regress_unprivileged_role | - t1 | public | -(9 rows) - -RESET ROLE; -DROP SERVER s10 CASCADE; -NOTICE: drop cascades to 2 other objects -DETAIL: drop cascades to user mapping for public on server s10 -drop cascades to user mapping for regress_unprivileged_role on server s10 --- Triggers -CREATE FUNCTION dummy_trigger() RETURNS TRIGGER AS $$ - BEGIN - RETURN NULL; - END -$$ language plpgsql; -CREATE TRIGGER trigtest_before_stmt BEFORE INSERT OR UPDATE OR DELETE -ON foreign_schema.foreign_table_1 -FOR EACH STATEMENT -EXECUTE PROCEDURE dummy_trigger(); -CREATE TRIGGER trigtest_after_stmt AFTER INSERT OR UPDATE OR DELETE -ON foreign_schema.foreign_table_1 -FOR EACH STATEMENT -EXECUTE PROCEDURE dummy_trigger(); -CREATE TRIGGER trigtest_after_stmt_tt AFTER INSERT OR UPDATE OR DELETE -- ERROR -ON foreign_schema.foreign_table_1 -REFERENCING NEW TABLE AS new_table -FOR EACH STATEMENT -EXECUTE PROCEDURE dummy_trigger(); -ERROR: "foreign_table_1" is a foreign table -DETAIL: Triggers on foreign tables cannot have transition tables. -CREATE TRIGGER trigtest_before_row BEFORE INSERT OR UPDATE OR DELETE -ON foreign_schema.foreign_table_1 -FOR EACH ROW -EXECUTE PROCEDURE dummy_trigger(); -CREATE TRIGGER trigtest_after_row AFTER INSERT OR UPDATE OR DELETE -ON foreign_schema.foreign_table_1 -FOR EACH ROW -EXECUTE PROCEDURE dummy_trigger(); -CREATE CONSTRAINT TRIGGER trigtest_constraint AFTER INSERT OR UPDATE OR DELETE -ON foreign_schema.foreign_table_1 -FOR EACH ROW -EXECUTE PROCEDURE dummy_trigger(); -ERROR: "foreign_table_1" is a foreign table -DETAIL: Foreign tables cannot have constraint triggers. -ALTER FOREIGN TABLE foreign_schema.foreign_table_1 - DISABLE TRIGGER trigtest_before_stmt; -ALTER FOREIGN TABLE foreign_schema.foreign_table_1 - ENABLE TRIGGER trigtest_before_stmt; -DROP TRIGGER trigtest_before_stmt ON foreign_schema.foreign_table_1; -DROP TRIGGER trigtest_before_row ON foreign_schema.foreign_table_1; -DROP TRIGGER trigtest_after_stmt ON foreign_schema.foreign_table_1; -DROP TRIGGER trigtest_after_row ON foreign_schema.foreign_table_1; -DROP FUNCTION dummy_trigger(); --- Table inheritance -CREATE TABLE fd_pt1 ( - c1 integer NOT NULL, - c2 text, - c3 date -); -CREATE FOREIGN TABLE ft2 () INHERITS (fd_pt1) - SERVER s0 OPTIONS (delimiter ',', quote '"', "be quoted" 'value'); -\d+ fd_pt1 - Table "public.fd_pt1" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+---------+----------+--------------+------------- - c1 | integer | | not null | | plain | | - c2 | text | | | | extended | | - c3 | date | | | | plain | | -Child tables: ft2 - -\d+ ft2 - Foreign table "public.ft2" - Column | Type | Collation | Nullable | Default | FDW options | Storage | Stats target | Description ---------+---------+-----------+----------+---------+-------------+----------+--------------+------------- - c1 | integer | | not null | | | plain | | - c2 | text | | | | | extended | | - c3 | date | | | | | plain | | -Server: s0 -FDW options: (delimiter ',', quote '"', "be quoted" 'value') -Inherits: fd_pt1 - -DROP FOREIGN TABLE ft2; -\d+ fd_pt1 - Table "public.fd_pt1" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+---------+----------+--------------+------------- - c1 | integer | | not null | | plain | | - c2 | text | | | | extended | | - c3 | date | | | | plain | | - -CREATE FOREIGN TABLE ft2 ( - c1 integer NOT NULL, - c2 text, - c3 date -) SERVER s0 OPTIONS (delimiter ',', quote '"', "be quoted" 'value'); -\d+ ft2 - Foreign table "public.ft2" - Column | Type | Collation | Nullable | Default | FDW options | Storage | Stats target | Description ---------+---------+-----------+----------+---------+-------------+----------+--------------+------------- - c1 | integer | | not null | | | plain | | - c2 | text | | | | | extended | | - c3 | date | | | | | plain | | -Server: s0 -FDW options: (delimiter ',', quote '"', "be quoted" 'value') - -ALTER FOREIGN TABLE ft2 INHERIT fd_pt1; -\d+ fd_pt1 - Table "public.fd_pt1" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+---------+----------+--------------+------------- - c1 | integer | | not null | | plain | | - c2 | text | | | | extended | | - c3 | date | | | | plain | | -Child tables: ft2 - -\d+ ft2 - Foreign table "public.ft2" - Column | Type | Collation | Nullable | Default | FDW options | Storage | Stats target | Description ---------+---------+-----------+----------+---------+-------------+----------+--------------+------------- - c1 | integer | | not null | | | plain | | - c2 | text | | | | | extended | | - c3 | date | | | | | plain | | -Server: s0 -FDW options: (delimiter ',', quote '"', "be quoted" 'value') -Inherits: fd_pt1 - -CREATE TABLE ct3() INHERITS(ft2); -CREATE FOREIGN TABLE ft3 ( - c1 integer NOT NULL, - c2 text, - c3 date -) INHERITS(ft2) - SERVER s0; -NOTICE: merging column "c1" with inherited definition -NOTICE: merging column "c2" with inherited definition -NOTICE: merging column "c3" with inherited definition -\d+ ft2 - Foreign table "public.ft2" - Column | Type | Collation | Nullable | Default | FDW options | Storage | Stats target | Description ---------+---------+-----------+----------+---------+-------------+----------+--------------+------------- - c1 | integer | | not null | | | plain | | - c2 | text | | | | | extended | | - c3 | date | | | | | plain | | -Server: s0 -FDW options: (delimiter ',', quote '"', "be quoted" 'value') -Inherits: fd_pt1 -Child tables: ct3, - ft3 - -\d+ ct3 - Table "public.ct3" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+---------+----------+--------------+------------- - c1 | integer | | not null | | plain | | - c2 | text | | | | extended | | - c3 | date | | | | plain | | -Inherits: ft2 - -\d+ ft3 - Foreign table "public.ft3" - Column | Type | Collation | Nullable | Default | FDW options | Storage | Stats target | Description ---------+---------+-----------+----------+---------+-------------+----------+--------------+------------- - c1 | integer | | not null | | | plain | | - c2 | text | | | | | extended | | - c3 | date | | | | | plain | | -Server: s0 -Inherits: ft2 - --- add attributes recursively -ALTER TABLE fd_pt1 ADD COLUMN c4 integer; -ALTER TABLE fd_pt1 ADD COLUMN c5 integer DEFAULT 0; -ALTER TABLE fd_pt1 ADD COLUMN c6 integer; -ALTER TABLE fd_pt1 ADD COLUMN c7 integer NOT NULL; -ALTER TABLE fd_pt1 ADD COLUMN c8 integer; -\d+ fd_pt1 - Table "public.fd_pt1" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+---------+----------+--------------+------------- - c1 | integer | | not null | | plain | | - c2 | text | | | | extended | | - c3 | date | | | | plain | | - c4 | integer | | | | plain | | - c5 | integer | | | 0 | plain | | - c6 | integer | | | | plain | | - c7 | integer | | not null | | plain | | - c8 | integer | | | | plain | | -Child tables: ft2 - -\d+ ft2 - Foreign table "public.ft2" - Column | Type | Collation | Nullable | Default | FDW options | Storage | Stats target | Description ---------+---------+-----------+----------+---------+-------------+----------+--------------+------------- - c1 | integer | | not null | | | plain | | - c2 | text | | | | | extended | | - c3 | date | | | | | plain | | - c4 | integer | | | | | plain | | - c5 | integer | | | 0 | | plain | | - c6 | integer | | | | | plain | | - c7 | integer | | not null | | | plain | | - c8 | integer | | | | | plain | | -Server: s0 -FDW options: (delimiter ',', quote '"', "be quoted" 'value') -Inherits: fd_pt1 -Child tables: ct3, - ft3 - -\d+ ct3 - Table "public.ct3" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+---------+----------+--------------+------------- - c1 | integer | | not null | | plain | | - c2 | text | | | | extended | | - c3 | date | | | | plain | | - c4 | integer | | | | plain | | - c5 | integer | | | 0 | plain | | - c6 | integer | | | | plain | | - c7 | integer | | not null | | plain | | - c8 | integer | | | | plain | | -Inherits: ft2 - -\d+ ft3 - Foreign table "public.ft3" - Column | Type | Collation | Nullable | Default | FDW options | Storage | Stats target | Description ---------+---------+-----------+----------+---------+-------------+----------+--------------+------------- - c1 | integer | | not null | | | plain | | - c2 | text | | | | | extended | | - c3 | date | | | | | plain | | - c4 | integer | | | | | plain | | - c5 | integer | | | 0 | | plain | | - c6 | integer | | | | | plain | | - c7 | integer | | not null | | | plain | | - c8 | integer | | | | | plain | | -Server: s0 -Inherits: ft2 - --- alter attributes recursively -ALTER TABLE fd_pt1 ALTER COLUMN c4 SET DEFAULT 0; -ALTER TABLE fd_pt1 ALTER COLUMN c5 DROP DEFAULT; -ALTER TABLE fd_pt1 ALTER COLUMN c6 SET NOT NULL; -ALTER TABLE fd_pt1 ALTER COLUMN c7 DROP NOT NULL; -ALTER TABLE fd_pt1 ALTER COLUMN c8 TYPE char(10) USING '0'; -- ERROR -ERROR: "ft2" is not a table -ALTER TABLE fd_pt1 ALTER COLUMN c8 TYPE char(10); -ALTER TABLE fd_pt1 ALTER COLUMN c8 SET DATA TYPE text; -ALTER TABLE fd_pt1 ALTER COLUMN c1 SET STATISTICS 10000; -ALTER TABLE fd_pt1 ALTER COLUMN c1 SET (n_distinct = 100); -ALTER TABLE fd_pt1 ALTER COLUMN c8 SET STATISTICS -1; -ALTER TABLE fd_pt1 ALTER COLUMN c8 SET STORAGE EXTERNAL; -\d+ fd_pt1 - Table "public.fd_pt1" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+---------+----------+--------------+------------- - c1 | integer | | not null | | plain | 10000 | - c2 | text | | | | extended | | - c3 | date | | | | plain | | - c4 | integer | | | 0 | plain | | - c5 | integer | | | | plain | | - c6 | integer | | not null | | plain | | - c7 | integer | | | | plain | | - c8 | text | | | | external | | -Child tables: ft2 - -\d+ ft2 - Foreign table "public.ft2" - Column | Type | Collation | Nullable | Default | FDW options | Storage | Stats target | Description ---------+---------+-----------+----------+---------+-------------+----------+--------------+------------- - c1 | integer | | not null | | | plain | 10000 | - c2 | text | | | | | extended | | - c3 | date | | | | | plain | | - c4 | integer | | | 0 | | plain | | - c5 | integer | | | | | plain | | - c6 | integer | | not null | | | plain | | - c7 | integer | | | | | plain | | - c8 | text | | | | | external | | -Server: s0 -FDW options: (delimiter ',', quote '"', "be quoted" 'value') -Inherits: fd_pt1 -Child tables: ct3, - ft3 - --- drop attributes recursively -ALTER TABLE fd_pt1 DROP COLUMN c4; -ALTER TABLE fd_pt1 DROP COLUMN c5; -ALTER TABLE fd_pt1 DROP COLUMN c6; -ALTER TABLE fd_pt1 DROP COLUMN c7; -ALTER TABLE fd_pt1 DROP COLUMN c8; -\d+ fd_pt1 - Table "public.fd_pt1" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+---------+----------+--------------+------------- - c1 | integer | | not null | | plain | 10000 | - c2 | text | | | | extended | | - c3 | date | | | | plain | | -Child tables: ft2 - -\d+ ft2 - Foreign table "public.ft2" - Column | Type | Collation | Nullable | Default | FDW options | Storage | Stats target | Description ---------+---------+-----------+----------+---------+-------------+----------+--------------+------------- - c1 | integer | | not null | | | plain | 10000 | - c2 | text | | | | | extended | | - c3 | date | | | | | plain | | -Server: s0 -FDW options: (delimiter ',', quote '"', "be quoted" 'value') -Inherits: fd_pt1 -Child tables: ct3, - ft3 - --- add constraints recursively -ALTER TABLE fd_pt1 ADD CONSTRAINT fd_pt1chk1 CHECK (c1 > 0) NO INHERIT; -ALTER TABLE fd_pt1 ADD CONSTRAINT fd_pt1chk2 CHECK (c2 <> ''); --- connoinherit should be true for NO INHERIT constraint -SELECT relname, conname, contype, conislocal, coninhcount, connoinherit - FROM pg_class AS pc JOIN pg_constraint AS pgc ON (conrelid = pc.oid) - WHERE pc.relname = 'fd_pt1' - ORDER BY 1,2; - relname | conname | contype | conislocal | coninhcount | connoinherit ----------+------------+---------+------------+-------------+-------------- - fd_pt1 | fd_pt1chk1 | c | t | 0 | t - fd_pt1 | fd_pt1chk2 | c | t | 0 | f -(2 rows) - --- child does not inherit NO INHERIT constraints -\d+ fd_pt1 - Table "public.fd_pt1" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+---------+----------+--------------+------------- - c1 | integer | | not null | | plain | 10000 | - c2 | text | | | | extended | | - c3 | date | | | | plain | | -Check constraints: - "fd_pt1chk1" CHECK (c1 > 0) NO INHERIT - "fd_pt1chk2" CHECK (c2 <> ''::text) -Child tables: ft2 - -\d+ ft2 - Foreign table "public.ft2" - Column | Type | Collation | Nullable | Default | FDW options | Storage | Stats target | Description ---------+---------+-----------+----------+---------+-------------+----------+--------------+------------- - c1 | integer | | not null | | | plain | 10000 | - c2 | text | | | | | extended | | - c3 | date | | | | | plain | | -Check constraints: - "fd_pt1chk2" CHECK (c2 <> ''::text) -Server: s0 -FDW options: (delimiter ',', quote '"', "be quoted" 'value') -Inherits: fd_pt1 -Child tables: ct3, - ft3 - -DROP FOREIGN TABLE ft2; -- ERROR -ERROR: cannot drop foreign table ft2 because other objects depend on it -DETAIL: table ct3 depends on foreign table ft2 -foreign table ft3 depends on foreign table ft2 -HINT: Use DROP ... CASCADE to drop the dependent objects too. -DROP FOREIGN TABLE ft2 CASCADE; -NOTICE: drop cascades to 2 other objects -DETAIL: drop cascades to table ct3 -drop cascades to foreign table ft3 -CREATE FOREIGN TABLE ft2 ( - c1 integer NOT NULL, - c2 text, - c3 date -) SERVER s0 OPTIONS (delimiter ',', quote '"', "be quoted" 'value'); --- child must have parent's INHERIT constraints -ALTER FOREIGN TABLE ft2 INHERIT fd_pt1; -- ERROR -ERROR: child table is missing constraint "fd_pt1chk2" -ALTER FOREIGN TABLE ft2 ADD CONSTRAINT fd_pt1chk2 CHECK (c2 <> ''); -ALTER FOREIGN TABLE ft2 INHERIT fd_pt1; --- child does not inherit NO INHERIT constraints -\d+ fd_pt1 - Table "public.fd_pt1" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+---------+----------+--------------+------------- - c1 | integer | | not null | | plain | 10000 | - c2 | text | | | | extended | | - c3 | date | | | | plain | | -Check constraints: - "fd_pt1chk1" CHECK (c1 > 0) NO INHERIT - "fd_pt1chk2" CHECK (c2 <> ''::text) -Child tables: ft2 - -\d+ ft2 - Foreign table "public.ft2" - Column | Type | Collation | Nullable | Default | FDW options | Storage | Stats target | Description ---------+---------+-----------+----------+---------+-------------+----------+--------------+------------- - c1 | integer | | not null | | | plain | | - c2 | text | | | | | extended | | - c3 | date | | | | | plain | | -Check constraints: - "fd_pt1chk2" CHECK (c2 <> ''::text) -Server: s0 -FDW options: (delimiter ',', quote '"', "be quoted" 'value') -Inherits: fd_pt1 - --- drop constraints recursively -ALTER TABLE fd_pt1 DROP CONSTRAINT fd_pt1chk1 CASCADE; -ALTER TABLE fd_pt1 DROP CONSTRAINT fd_pt1chk2 CASCADE; --- NOT VALID case -INSERT INTO fd_pt1 VALUES (1, 'fd_pt1'::text, '1994-01-01'::date); -ALTER TABLE fd_pt1 ADD CONSTRAINT fd_pt1chk3 CHECK (c2 <> '') NOT VALID; -\d+ fd_pt1 - Table "public.fd_pt1" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+---------+----------+--------------+------------- - c1 | integer | | not null | | plain | 10000 | - c2 | text | | | | extended | | - c3 | date | | | | plain | | -Check constraints: - "fd_pt1chk3" CHECK (c2 <> ''::text) NOT VALID -Child tables: ft2 - -\d+ ft2 - Foreign table "public.ft2" - Column | Type | Collation | Nullable | Default | FDW options | Storage | Stats target | Description ---------+---------+-----------+----------+---------+-------------+----------+--------------+------------- - c1 | integer | | not null | | | plain | | - c2 | text | | | | | extended | | - c3 | date | | | | | plain | | -Check constraints: - "fd_pt1chk2" CHECK (c2 <> ''::text) - "fd_pt1chk3" CHECK (c2 <> ''::text) NOT VALID -Server: s0 -FDW options: (delimiter ',', quote '"', "be quoted" 'value') -Inherits: fd_pt1 - --- VALIDATE CONSTRAINT need do nothing on foreign tables -ALTER TABLE fd_pt1 VALIDATE CONSTRAINT fd_pt1chk3; -\d+ fd_pt1 - Table "public.fd_pt1" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+---------+----------+--------------+------------- - c1 | integer | | not null | | plain | 10000 | - c2 | text | | | | extended | | - c3 | date | | | | plain | | -Check constraints: - "fd_pt1chk3" CHECK (c2 <> ''::text) -Child tables: ft2 - -\d+ ft2 - Foreign table "public.ft2" - Column | Type | Collation | Nullable | Default | FDW options | Storage | Stats target | Description ---------+---------+-----------+----------+---------+-------------+----------+--------------+------------- - c1 | integer | | not null | | | plain | | - c2 | text | | | | | extended | | - c3 | date | | | | | plain | | -Check constraints: - "fd_pt1chk2" CHECK (c2 <> ''::text) - "fd_pt1chk3" CHECK (c2 <> ''::text) -Server: s0 -FDW options: (delimiter ',', quote '"', "be quoted" 'value') -Inherits: fd_pt1 - --- changes name of an attribute recursively -ALTER TABLE fd_pt1 RENAME COLUMN c1 TO f1; -ALTER TABLE fd_pt1 RENAME COLUMN c2 TO f2; -ALTER TABLE fd_pt1 RENAME COLUMN c3 TO f3; --- changes name of a constraint recursively -ALTER TABLE fd_pt1 RENAME CONSTRAINT fd_pt1chk3 TO f2_check; -\d+ fd_pt1 - Table "public.fd_pt1" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+---------+----------+--------------+------------- - f1 | integer | | not null | | plain | 10000 | - f2 | text | | | | extended | | - f3 | date | | | | plain | | -Check constraints: - "f2_check" CHECK (f2 <> ''::text) -Child tables: ft2 - -\d+ ft2 - Foreign table "public.ft2" - Column | Type | Collation | Nullable | Default | FDW options | Storage | Stats target | Description ---------+---------+-----------+----------+---------+-------------+----------+--------------+------------- - f1 | integer | | not null | | | plain | | - f2 | text | | | | | extended | | - f3 | date | | | | | plain | | -Check constraints: - "f2_check" CHECK (f2 <> ''::text) - "fd_pt1chk2" CHECK (f2 <> ''::text) -Server: s0 -FDW options: (delimiter ',', quote '"', "be quoted" 'value') -Inherits: fd_pt1 - --- TRUNCATE doesn't work on foreign tables, either directly or recursively -TRUNCATE ft2; -- ERROR -ERROR: foreign-data wrapper "dummy" has no handler -TRUNCATE fd_pt1; -- ERROR -ERROR: foreign-data wrapper "dummy" has no handler -DROP TABLE fd_pt1 CASCADE; -NOTICE: drop cascades to foreign table ft2 --- IMPORT FOREIGN SCHEMA -IMPORT FOREIGN SCHEMA s1 FROM SERVER s9 INTO public; -- ERROR -ERROR: foreign-data wrapper "foo" has no handler -IMPORT FOREIGN SCHEMA s1 LIMIT TO (t1) FROM SERVER s9 INTO public; --ERROR -ERROR: foreign-data wrapper "foo" has no handler -IMPORT FOREIGN SCHEMA s1 EXCEPT (t1) FROM SERVER s9 INTO public; -- ERROR -ERROR: foreign-data wrapper "foo" has no handler -IMPORT FOREIGN SCHEMA s1 EXCEPT (t1, t2) FROM SERVER s9 INTO public -OPTIONS (option1 'value1', option2 'value2'); -- ERROR -ERROR: foreign-data wrapper "foo" has no handler --- DROP FOREIGN TABLE -DROP FOREIGN TABLE no_table; -- ERROR -ERROR: foreign table "no_table" does not exist -DROP FOREIGN TABLE IF EXISTS no_table; -NOTICE: foreign table "no_table" does not exist, skipping -DROP FOREIGN TABLE foreign_schema.foreign_table_1; --- REASSIGN OWNED/DROP OWNED of foreign objects -REASSIGN OWNED BY regress_test_role TO regress_test_role2; -DROP OWNED BY regress_test_role2; -ERROR: cannot drop desired object(s) because other objects depend on them -DETAIL: user mapping for regress_test_role on server s5 depends on server s5 -HINT: Use DROP ... CASCADE to drop the dependent objects too. -DROP OWNED BY regress_test_role2 CASCADE; -NOTICE: drop cascades to user mapping for regress_test_role on server s5 --- Foreign partition DDL stuff -CREATE TABLE fd_pt2 ( - c1 integer NOT NULL, - c2 text, - c3 date -) PARTITION BY LIST (c1); -CREATE FOREIGN TABLE fd_pt2_1 PARTITION OF fd_pt2 FOR VALUES IN (1) - SERVER s0 OPTIONS (delimiter ',', quote '"', "be quoted" 'value'); -\d+ fd_pt2 - Partitioned table "public.fd_pt2" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+---------+----------+--------------+------------- - c1 | integer | | not null | | plain | | - c2 | text | | | | extended | | - c3 | date | | | | plain | | -Partition key: LIST (c1) -Partitions: fd_pt2_1 FOR VALUES IN (1) - -\d+ fd_pt2_1 - Foreign table "public.fd_pt2_1" - Column | Type | Collation | Nullable | Default | FDW options | Storage | Stats target | Description ---------+---------+-----------+----------+---------+-------------+----------+--------------+------------- - c1 | integer | | not null | | | plain | | - c2 | text | | | | | extended | | - c3 | date | | | | | plain | | -Partition of: fd_pt2 FOR VALUES IN (1) -Partition constraint: ((c1 IS NOT NULL) AND (c1 = 1)) -Server: s0 -FDW options: (delimiter ',', quote '"', "be quoted" 'value') - --- partition cannot have additional columns -DROP FOREIGN TABLE fd_pt2_1; -CREATE FOREIGN TABLE fd_pt2_1 ( - c1 integer NOT NULL, - c2 text, - c3 date, - c4 char -) SERVER s0 OPTIONS (delimiter ',', quote '"', "be quoted" 'value'); -\d+ fd_pt2_1 - Foreign table "public.fd_pt2_1" - Column | Type | Collation | Nullable | Default | FDW options | Storage | Stats target | Description ---------+--------------+-----------+----------+---------+-------------+----------+--------------+------------- - c1 | integer | | not null | | | plain | | - c2 | text | | | | | extended | | - c3 | date | | | | | plain | | - c4 | character(1) | | | | | extended | | -Server: s0 -FDW options: (delimiter ',', quote '"', "be quoted" 'value') - -ALTER TABLE fd_pt2 ATTACH PARTITION fd_pt2_1 FOR VALUES IN (1); -- ERROR -ERROR: table "fd_pt2_1" contains column "c4" not found in parent "fd_pt2" -DETAIL: The new partition may contain only the columns present in parent. -DROP FOREIGN TABLE fd_pt2_1; -\d+ fd_pt2 - Partitioned table "public.fd_pt2" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+---------+----------+--------------+------------- - c1 | integer | | not null | | plain | | - c2 | text | | | | extended | | - c3 | date | | | | plain | | -Partition key: LIST (c1) -Number of partitions: 0 - -CREATE FOREIGN TABLE fd_pt2_1 ( - c1 integer NOT NULL, - c2 text, - c3 date -) SERVER s0 OPTIONS (delimiter ',', quote '"', "be quoted" 'value'); -\d+ fd_pt2_1 - Foreign table "public.fd_pt2_1" - Column | Type | Collation | Nullable | Default | FDW options | Storage | Stats target | Description ---------+---------+-----------+----------+---------+-------------+----------+--------------+------------- - c1 | integer | | not null | | | plain | | - c2 | text | | | | | extended | | - c3 | date | | | | | plain | | -Server: s0 -FDW options: (delimiter ',', quote '"', "be quoted" 'value') - --- no attach partition validation occurs for foreign tables -ALTER TABLE fd_pt2 ATTACH PARTITION fd_pt2_1 FOR VALUES IN (1); -\d+ fd_pt2 - Partitioned table "public.fd_pt2" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+---------+----------+--------------+------------- - c1 | integer | | not null | | plain | | - c2 | text | | | | extended | | - c3 | date | | | | plain | | -Partition key: LIST (c1) -Partitions: fd_pt2_1 FOR VALUES IN (1) - -\d+ fd_pt2_1 - Foreign table "public.fd_pt2_1" - Column | Type | Collation | Nullable | Default | FDW options | Storage | Stats target | Description ---------+---------+-----------+----------+---------+-------------+----------+--------------+------------- - c1 | integer | | not null | | | plain | | - c2 | text | | | | | extended | | - c3 | date | | | | | plain | | -Partition of: fd_pt2 FOR VALUES IN (1) -Partition constraint: ((c1 IS NOT NULL) AND (c1 = 1)) -Server: s0 -FDW options: (delimiter ',', quote '"', "be quoted" 'value') - --- cannot add column to a partition -ALTER TABLE fd_pt2_1 ADD c4 char; -ERROR: cannot add column to a partition --- ok to have a partition's own constraints though -ALTER TABLE fd_pt2_1 ALTER c3 SET NOT NULL; -ALTER TABLE fd_pt2_1 ADD CONSTRAINT p21chk CHECK (c2 <> ''); -\d+ fd_pt2 - Partitioned table "public.fd_pt2" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+---------+----------+--------------+------------- - c1 | integer | | not null | | plain | | - c2 | text | | | | extended | | - c3 | date | | | | plain | | -Partition key: LIST (c1) -Partitions: fd_pt2_1 FOR VALUES IN (1) - -\d+ fd_pt2_1 - Foreign table "public.fd_pt2_1" - Column | Type | Collation | Nullable | Default | FDW options | Storage | Stats target | Description ---------+---------+-----------+----------+---------+-------------+----------+--------------+------------- - c1 | integer | | not null | | | plain | | - c2 | text | | | | | extended | | - c3 | date | | not null | | | plain | | -Partition of: fd_pt2 FOR VALUES IN (1) -Partition constraint: ((c1 IS NOT NULL) AND (c1 = 1)) -Check constraints: - "p21chk" CHECK (c2 <> ''::text) -Server: s0 -FDW options: (delimiter ',', quote '"', "be quoted" 'value') - --- cannot drop inherited NOT NULL constraint from a partition -ALTER TABLE fd_pt2_1 ALTER c1 DROP NOT NULL; -ERROR: column "c1" is marked NOT NULL in parent table --- partition must have parent's constraints -ALTER TABLE fd_pt2 DETACH PARTITION fd_pt2_1; -ALTER TABLE fd_pt2 ALTER c2 SET NOT NULL; -\d+ fd_pt2 - Partitioned table "public.fd_pt2" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+---------+----------+--------------+------------- - c1 | integer | | not null | | plain | | - c2 | text | | not null | | extended | | - c3 | date | | | | plain | | -Partition key: LIST (c1) -Number of partitions: 0 - -\d+ fd_pt2_1 - Foreign table "public.fd_pt2_1" - Column | Type | Collation | Nullable | Default | FDW options | Storage | Stats target | Description ---------+---------+-----------+----------+---------+-------------+----------+--------------+------------- - c1 | integer | | not null | | | plain | | - c2 | text | | | | | extended | | - c3 | date | | not null | | | plain | | -Check constraints: - "p21chk" CHECK (c2 <> ''::text) -Server: s0 -FDW options: (delimiter ',', quote '"', "be quoted" 'value') - -ALTER TABLE fd_pt2 ATTACH PARTITION fd_pt2_1 FOR VALUES IN (1); -- ERROR -ERROR: column "c2" in child table must be marked NOT NULL -ALTER FOREIGN TABLE fd_pt2_1 ALTER c2 SET NOT NULL; -ALTER TABLE fd_pt2 ATTACH PARTITION fd_pt2_1 FOR VALUES IN (1); -ALTER TABLE fd_pt2 DETACH PARTITION fd_pt2_1; -ALTER TABLE fd_pt2 ADD CONSTRAINT fd_pt2chk1 CHECK (c1 > 0); -\d+ fd_pt2 - Partitioned table "public.fd_pt2" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+---------+----------+--------------+------------- - c1 | integer | | not null | | plain | | - c2 | text | | not null | | extended | | - c3 | date | | | | plain | | -Partition key: LIST (c1) -Check constraints: - "fd_pt2chk1" CHECK (c1 > 0) -Number of partitions: 0 - -\d+ fd_pt2_1 - Foreign table "public.fd_pt2_1" - Column | Type | Collation | Nullable | Default | FDW options | Storage | Stats target | Description ---------+---------+-----------+----------+---------+-------------+----------+--------------+------------- - c1 | integer | | not null | | | plain | | - c2 | text | | not null | | | extended | | - c3 | date | | not null | | | plain | | -Check constraints: - "p21chk" CHECK (c2 <> ''::text) -Server: s0 -FDW options: (delimiter ',', quote '"', "be quoted" 'value') - -ALTER TABLE fd_pt2 ATTACH PARTITION fd_pt2_1 FOR VALUES IN (1); -- ERROR -ERROR: child table is missing constraint "fd_pt2chk1" -ALTER FOREIGN TABLE fd_pt2_1 ADD CONSTRAINT fd_pt2chk1 CHECK (c1 > 0); -ALTER TABLE fd_pt2 ATTACH PARTITION fd_pt2_1 FOR VALUES IN (1); --- TRUNCATE doesn't work on foreign tables, either directly or recursively -TRUNCATE fd_pt2_1; -- ERROR -ERROR: foreign-data wrapper "dummy" has no handler -TRUNCATE fd_pt2; -- ERROR -ERROR: foreign-data wrapper "dummy" has no handler -DROP FOREIGN TABLE fd_pt2_1; -DROP TABLE fd_pt2; --- foreign table cannot be part of partition tree made of temporary --- relations. -CREATE TEMP TABLE temp_parted (a int) PARTITION BY LIST (a); -CREATE FOREIGN TABLE foreign_part PARTITION OF temp_parted DEFAULT - SERVER s0; -- ERROR -ERROR: cannot create a permanent relation as partition of temporary relation "temp_parted" -CREATE FOREIGN TABLE foreign_part (a int) SERVER s0; -ALTER TABLE temp_parted ATTACH PARTITION foreign_part DEFAULT; -- ERROR -ERROR: cannot attach a permanent relation as partition of temporary relation "temp_parted" -DROP FOREIGN TABLE foreign_part; -DROP TABLE temp_parted; --- Cleanup -DROP SCHEMA foreign_schema CASCADE; -DROP ROLE regress_test_role; -- ERROR -ERROR: role "regress_test_role" cannot be dropped because some objects depend on it -DETAIL: privileges for foreign-data wrapper foo -privileges for server s4 -owner of user mapping for regress_test_role on server s6 -DROP SERVER t1 CASCADE; -NOTICE: drop cascades to user mapping for public on server t1 -DROP USER MAPPING FOR regress_test_role SERVER s6; -DROP FOREIGN DATA WRAPPER foo CASCADE; -NOTICE: drop cascades to 5 other objects -DETAIL: drop cascades to server s4 -drop cascades to user mapping for regress_foreign_data_user on server s4 -drop cascades to server s6 -drop cascades to server s9 -drop cascades to user mapping for regress_unprivileged_role on server s9 -DROP SERVER s8 CASCADE; -NOTICE: drop cascades to 2 other objects -DETAIL: drop cascades to user mapping for regress_foreign_data_user on server s8 -drop cascades to user mapping for public on server s8 -DROP ROLE regress_test_indirect; -DROP ROLE regress_test_role; -DROP ROLE regress_unprivileged_role; -- ERROR -ERROR: role "regress_unprivileged_role" cannot be dropped because some objects depend on it -DETAIL: privileges for foreign-data wrapper postgresql -REVOKE ALL ON FOREIGN DATA WRAPPER postgresql FROM regress_unprivileged_role; -DROP ROLE regress_unprivileged_role; -DROP ROLE regress_test_role2; -DROP FOREIGN DATA WRAPPER postgresql CASCADE; -DROP FOREIGN DATA WRAPPER dummy CASCADE; -NOTICE: drop cascades to server s0 -\c -DROP ROLE regress_foreign_data_user; --- At this point we should have no wrappers, no servers, and no mappings. -SELECT fdwname, fdwhandler, fdwvalidator, fdwoptions FROM pg_foreign_data_wrapper; - fdwname | fdwhandler | fdwvalidator | fdwoptions ----------+------------+--------------+------------ -(0 rows) - -SELECT srvname, srvoptions FROM pg_foreign_server; - srvname | srvoptions ----------+------------ -(0 rows) - -SELECT * FROM pg_user_mapping; - oid | umuser | umserver | umoptions ------+--------+----------+----------- -(0 rows) - +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/window.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/window.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/window.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/window.out 2023-02-20 19:47:53.479216498 -0500 @@ -1,4065 +1 @@ --- --- WINDOW FUNCTIONS --- -CREATE TEMPORARY TABLE empsalary ( - depname varchar, - empno bigint, - salary int, - enroll_date date -); -INSERT INTO empsalary VALUES -('develop', 10, 5200, '2007-08-01'), -('sales', 1, 5000, '2006-10-01'), -('personnel', 5, 3500, '2007-12-10'), -('sales', 4, 4800, '2007-08-08'), -('personnel', 2, 3900, '2006-12-23'), -('develop', 7, 4200, '2008-01-01'), -('develop', 9, 4500, '2008-01-01'), -('sales', 3, 4800, '2007-08-01'), -('develop', 8, 6000, '2006-10-01'), -('develop', 11, 5200, '2007-08-15'); -SELECT depname, empno, salary, sum(salary) OVER (PARTITION BY depname) FROM empsalary ORDER BY depname, salary; - depname | empno | salary | sum ------------+-------+--------+------- - develop | 7 | 4200 | 25100 - develop | 9 | 4500 | 25100 - develop | 11 | 5200 | 25100 - develop | 10 | 5200 | 25100 - develop | 8 | 6000 | 25100 - personnel | 5 | 3500 | 7400 - personnel | 2 | 3900 | 7400 - sales | 3 | 4800 | 14600 - sales | 4 | 4800 | 14600 - sales | 1 | 5000 | 14600 -(10 rows) - -SELECT depname, empno, salary, rank() OVER (PARTITION BY depname ORDER BY salary) FROM empsalary; - depname | empno | salary | rank ------------+-------+--------+------ - develop | 7 | 4200 | 1 - develop | 9 | 4500 | 2 - develop | 11 | 5200 | 3 - develop | 10 | 5200 | 3 - develop | 8 | 6000 | 5 - personnel | 5 | 3500 | 1 - personnel | 2 | 3900 | 2 - sales | 3 | 4800 | 1 - sales | 4 | 4800 | 1 - sales | 1 | 5000 | 3 -(10 rows) - --- with GROUP BY -SELECT four, ten, SUM(SUM(four)) OVER (PARTITION BY four), AVG(ten) FROM tenk1 -GROUP BY four, ten ORDER BY four, ten; - four | ten | sum | avg -------+-----+------+------------------------ - 0 | 0 | 0 | 0.00000000000000000000 - 0 | 2 | 0 | 2.0000000000000000 - 0 | 4 | 0 | 4.0000000000000000 - 0 | 6 | 0 | 6.0000000000000000 - 0 | 8 | 0 | 8.0000000000000000 - 1 | 1 | 2500 | 1.00000000000000000000 - 1 | 3 | 2500 | 3.0000000000000000 - 1 | 5 | 2500 | 5.0000000000000000 - 1 | 7 | 2500 | 7.0000000000000000 - 1 | 9 | 2500 | 9.0000000000000000 - 2 | 0 | 5000 | 0.00000000000000000000 - 2 | 2 | 5000 | 2.0000000000000000 - 2 | 4 | 5000 | 4.0000000000000000 - 2 | 6 | 5000 | 6.0000000000000000 - 2 | 8 | 5000 | 8.0000000000000000 - 3 | 1 | 7500 | 1.00000000000000000000 - 3 | 3 | 7500 | 3.0000000000000000 - 3 | 5 | 7500 | 5.0000000000000000 - 3 | 7 | 7500 | 7.0000000000000000 - 3 | 9 | 7500 | 9.0000000000000000 -(20 rows) - -SELECT depname, empno, salary, sum(salary) OVER w FROM empsalary WINDOW w AS (PARTITION BY depname); - depname | empno | salary | sum ------------+-------+--------+------- - develop | 11 | 5200 | 25100 - develop | 7 | 4200 | 25100 - develop | 9 | 4500 | 25100 - develop | 8 | 6000 | 25100 - develop | 10 | 5200 | 25100 - personnel | 5 | 3500 | 7400 - personnel | 2 | 3900 | 7400 - sales | 3 | 4800 | 14600 - sales | 1 | 5000 | 14600 - sales | 4 | 4800 | 14600 -(10 rows) - -SELECT depname, empno, salary, rank() OVER w FROM empsalary WINDOW w AS (PARTITION BY depname ORDER BY salary) ORDER BY rank() OVER w; - depname | empno | salary | rank ------------+-------+--------+------ - develop | 7 | 4200 | 1 - personnel | 5 | 3500 | 1 - sales | 3 | 4800 | 1 - sales | 4 | 4800 | 1 - personnel | 2 | 3900 | 2 - develop | 9 | 4500 | 2 - sales | 1 | 5000 | 3 - develop | 11 | 5200 | 3 - develop | 10 | 5200 | 3 - develop | 8 | 6000 | 5 -(10 rows) - --- empty window specification -SELECT COUNT(*) OVER () FROM tenk1 WHERE unique2 < 10; - count -------- - 10 - 10 - 10 - 10 - 10 - 10 - 10 - 10 - 10 - 10 -(10 rows) - -SELECT COUNT(*) OVER w FROM tenk1 WHERE unique2 < 10 WINDOW w AS (); - count -------- - 10 - 10 - 10 - 10 - 10 - 10 - 10 - 10 - 10 - 10 -(10 rows) - --- no window operation -SELECT four FROM tenk1 WHERE FALSE WINDOW w AS (PARTITION BY ten); - four ------- -(0 rows) - --- cumulative aggregate -SELECT sum(four) OVER (PARTITION BY ten ORDER BY unique2) AS sum_1, ten, four FROM tenk1 WHERE unique2 < 10; - sum_1 | ten | four --------+-----+------ - 0 | 0 | 0 - 0 | 0 | 0 - 2 | 0 | 2 - 3 | 1 | 3 - 4 | 1 | 1 - 5 | 1 | 1 - 3 | 3 | 3 - 0 | 4 | 0 - 1 | 7 | 1 - 1 | 9 | 1 -(10 rows) - -SELECT row_number() OVER (ORDER BY unique2) FROM tenk1 WHERE unique2 < 10; - row_number ------------- - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 -(10 rows) - -SELECT rank() OVER (PARTITION BY four ORDER BY ten) AS rank_1, ten, four FROM tenk1 WHERE unique2 < 10; - rank_1 | ten | four ---------+-----+------ - 1 | 0 | 0 - 1 | 0 | 0 - 3 | 4 | 0 - 1 | 1 | 1 - 1 | 1 | 1 - 3 | 7 | 1 - 4 | 9 | 1 - 1 | 0 | 2 - 1 | 1 | 3 - 2 | 3 | 3 -(10 rows) - -SELECT dense_rank() OVER (PARTITION BY four ORDER BY ten), ten, four FROM tenk1 WHERE unique2 < 10; - dense_rank | ten | four -------------+-----+------ - 1 | 0 | 0 - 1 | 0 | 0 - 2 | 4 | 0 - 1 | 1 | 1 - 1 | 1 | 1 - 2 | 7 | 1 - 3 | 9 | 1 - 1 | 0 | 2 - 1 | 1 | 3 - 2 | 3 | 3 -(10 rows) - -SELECT percent_rank() OVER (PARTITION BY four ORDER BY ten), ten, four FROM tenk1 WHERE unique2 < 10; - percent_rank | ten | four ---------------------+-----+------ - 0 | 0 | 0 - 0 | 0 | 0 - 1 | 4 | 0 - 0 | 1 | 1 - 0 | 1 | 1 - 0.6666666666666666 | 7 | 1 - 1 | 9 | 1 - 0 | 0 | 2 - 0 | 1 | 3 - 1 | 3 | 3 -(10 rows) - -SELECT cume_dist() OVER (PARTITION BY four ORDER BY ten), ten, four FROM tenk1 WHERE unique2 < 10; - cume_dist | ten | four ---------------------+-----+------ - 0.6666666666666666 | 0 | 0 - 0.6666666666666666 | 0 | 0 - 1 | 4 | 0 - 0.5 | 1 | 1 - 0.5 | 1 | 1 - 0.75 | 7 | 1 - 1 | 9 | 1 - 1 | 0 | 2 - 0.5 | 1 | 3 - 1 | 3 | 3 -(10 rows) - -SELECT ntile(3) OVER (ORDER BY ten, four), ten, four FROM tenk1 WHERE unique2 < 10; - ntile | ten | four --------+-----+------ - 1 | 0 | 0 - 1 | 0 | 0 - 1 | 0 | 2 - 1 | 1 | 1 - 2 | 1 | 1 - 2 | 1 | 3 - 2 | 3 | 3 - 3 | 4 | 0 - 3 | 7 | 1 - 3 | 9 | 1 -(10 rows) - -SELECT ntile(NULL) OVER (ORDER BY ten, four), ten, four FROM tenk1 LIMIT 2; - ntile | ten | four --------+-----+------ - | 0 | 0 - | 0 | 0 -(2 rows) - -SELECT lag(ten) OVER (PARTITION BY four ORDER BY ten), ten, four FROM tenk1 WHERE unique2 < 10; - lag | ten | four ------+-----+------ - | 0 | 0 - 0 | 0 | 0 - 0 | 4 | 0 - | 1 | 1 - 1 | 1 | 1 - 1 | 7 | 1 - 7 | 9 | 1 - | 0 | 2 - | 1 | 3 - 1 | 3 | 3 -(10 rows) - -SELECT lag(ten, four) OVER (PARTITION BY four ORDER BY ten), ten, four FROM tenk1 WHERE unique2 < 10; - lag | ten | four ------+-----+------ - 0 | 0 | 0 - 0 | 0 | 0 - 4 | 4 | 0 - | 1 | 1 - 1 | 1 | 1 - 1 | 7 | 1 - 7 | 9 | 1 - | 0 | 2 - | 1 | 3 - | 3 | 3 -(10 rows) - -SELECT lag(ten, four, 0) OVER (PARTITION BY four ORDER BY ten), ten, four FROM tenk1 WHERE unique2 < 10; - lag | ten | four ------+-----+------ - 0 | 0 | 0 - 0 | 0 | 0 - 4 | 4 | 0 - 0 | 1 | 1 - 1 | 1 | 1 - 1 | 7 | 1 - 7 | 9 | 1 - 0 | 0 | 2 - 0 | 1 | 3 - 0 | 3 | 3 -(10 rows) - -SELECT lag(ten, four, 0.7) OVER (PARTITION BY four ORDER BY ten), ten, four FROM tenk1 WHERE unique2 < 10 ORDER BY four, ten; - lag | ten | four ------+-----+------ - 0 | 0 | 0 - 0 | 0 | 0 - 4 | 4 | 0 - 0.7 | 1 | 1 - 1 | 1 | 1 - 1 | 7 | 1 - 7 | 9 | 1 - 0.7 | 0 | 2 - 0.7 | 1 | 3 - 0.7 | 3 | 3 -(10 rows) - -SELECT lead(ten) OVER (PARTITION BY four ORDER BY ten), ten, four FROM tenk1 WHERE unique2 < 10; - lead | ten | four -------+-----+------ - 0 | 0 | 0 - 4 | 0 | 0 - | 4 | 0 - 1 | 1 | 1 - 7 | 1 | 1 - 9 | 7 | 1 - | 9 | 1 - | 0 | 2 - 3 | 1 | 3 - | 3 | 3 -(10 rows) - -SELECT lead(ten * 2, 1) OVER (PARTITION BY four ORDER BY ten), ten, four FROM tenk1 WHERE unique2 < 10; - lead | ten | four -------+-----+------ - 0 | 0 | 0 - 8 | 0 | 0 - | 4 | 0 - 2 | 1 | 1 - 14 | 1 | 1 - 18 | 7 | 1 - | 9 | 1 - | 0 | 2 - 6 | 1 | 3 - | 3 | 3 -(10 rows) - -SELECT lead(ten * 2, 1, -1) OVER (PARTITION BY four ORDER BY ten), ten, four FROM tenk1 WHERE unique2 < 10; - lead | ten | four -------+-----+------ - 0 | 0 | 0 - 8 | 0 | 0 - -1 | 4 | 0 - 2 | 1 | 1 - 14 | 1 | 1 - 18 | 7 | 1 - -1 | 9 | 1 - -1 | 0 | 2 - 6 | 1 | 3 - -1 | 3 | 3 -(10 rows) - -SELECT lead(ten * 2, 1, -1.4) OVER (PARTITION BY four ORDER BY ten), ten, four FROM tenk1 WHERE unique2 < 10 ORDER BY four, ten; - lead | ten | four -------+-----+------ - 0 | 0 | 0 - 8 | 0 | 0 - -1.4 | 4 | 0 - 2 | 1 | 1 - 14 | 1 | 1 - 18 | 7 | 1 - -1.4 | 9 | 1 - -1.4 | 0 | 2 - 6 | 1 | 3 - -1.4 | 3 | 3 -(10 rows) - -SELECT first_value(ten) OVER (PARTITION BY four ORDER BY ten), ten, four FROM tenk1 WHERE unique2 < 10; - first_value | ten | four --------------+-----+------ - 0 | 0 | 0 - 0 | 0 | 0 - 0 | 4 | 0 - 1 | 1 | 1 - 1 | 1 | 1 - 1 | 7 | 1 - 1 | 9 | 1 - 0 | 0 | 2 - 1 | 1 | 3 - 1 | 3 | 3 -(10 rows) - --- last_value returns the last row of the frame, which is CURRENT ROW in ORDER BY window. -SELECT last_value(four) OVER (ORDER BY ten), ten, four FROM tenk1 WHERE unique2 < 10; - last_value | ten | four -------------+-----+------ - 0 | 0 | 0 - 0 | 0 | 2 - 0 | 0 | 0 - 1 | 1 | 1 - 1 | 1 | 3 - 1 | 1 | 1 - 3 | 3 | 3 - 0 | 4 | 0 - 1 | 7 | 1 - 1 | 9 | 1 -(10 rows) - -SELECT last_value(ten) OVER (PARTITION BY four), ten, four FROM - (SELECT * FROM tenk1 WHERE unique2 < 10 ORDER BY four, ten)s - ORDER BY four, ten; - last_value | ten | four -------------+-----+------ - 4 | 0 | 0 - 4 | 0 | 0 - 4 | 4 | 0 - 9 | 1 | 1 - 9 | 1 | 1 - 9 | 7 | 1 - 9 | 9 | 1 - 0 | 0 | 2 - 3 | 1 | 3 - 3 | 3 | 3 -(10 rows) - -SELECT nth_value(ten, four + 1) OVER (PARTITION BY four), ten, four - FROM (SELECT * FROM tenk1 WHERE unique2 < 10 ORDER BY four, ten)s; - nth_value | ten | four ------------+-----+------ - 0 | 0 | 0 - 0 | 0 | 0 - 0 | 4 | 0 - 1 | 1 | 1 - 1 | 1 | 1 - 1 | 7 | 1 - 1 | 9 | 1 - | 0 | 2 - | 1 | 3 - | 3 | 3 -(10 rows) - -SELECT ten, two, sum(hundred) AS gsum, sum(sum(hundred)) OVER (PARTITION BY two ORDER BY ten) AS wsum -FROM tenk1 GROUP BY ten, two; - ten | two | gsum | wsum ------+-----+-------+-------- - 0 | 0 | 45000 | 45000 - 2 | 0 | 47000 | 92000 - 4 | 0 | 49000 | 141000 - 6 | 0 | 51000 | 192000 - 8 | 0 | 53000 | 245000 - 1 | 1 | 46000 | 46000 - 3 | 1 | 48000 | 94000 - 5 | 1 | 50000 | 144000 - 7 | 1 | 52000 | 196000 - 9 | 1 | 54000 | 250000 -(10 rows) - -SELECT count(*) OVER (PARTITION BY four), four FROM (SELECT * FROM tenk1 WHERE two = 1)s WHERE unique2 < 10; - count | four --------+------ - 4 | 1 - 4 | 1 - 4 | 1 - 4 | 1 - 2 | 3 - 2 | 3 -(6 rows) - -SELECT (count(*) OVER (PARTITION BY four ORDER BY ten) + - sum(hundred) OVER (PARTITION BY four ORDER BY ten))::varchar AS cntsum - FROM tenk1 WHERE unique2 < 10; - cntsum --------- - 22 - 22 - 87 - 24 - 24 - 82 - 92 - 51 - 92 - 136 -(10 rows) - --- opexpr with different windows evaluation. -SELECT * FROM( - SELECT count(*) OVER (PARTITION BY four ORDER BY ten) + - sum(hundred) OVER (PARTITION BY two ORDER BY ten) AS total, - count(*) OVER (PARTITION BY four ORDER BY ten) AS fourcount, - sum(hundred) OVER (PARTITION BY two ORDER BY ten) AS twosum - FROM tenk1 -)sub -WHERE total <> fourcount + twosum; - total | fourcount | twosum --------+-----------+-------- -(0 rows) - -SELECT avg(four) OVER (PARTITION BY four ORDER BY thousand / 100) FROM tenk1 WHERE unique2 < 10; - avg ------------------------- - 0.00000000000000000000 - 0.00000000000000000000 - 0.00000000000000000000 - 1.00000000000000000000 - 1.00000000000000000000 - 1.00000000000000000000 - 1.00000000000000000000 - 2.0000000000000000 - 3.0000000000000000 - 3.0000000000000000 -(10 rows) - -SELECT ten, two, sum(hundred) AS gsum, sum(sum(hundred)) OVER win AS wsum -FROM tenk1 GROUP BY ten, two WINDOW win AS (PARTITION BY two ORDER BY ten); - ten | two | gsum | wsum ------+-----+-------+-------- - 0 | 0 | 45000 | 45000 - 2 | 0 | 47000 | 92000 - 4 | 0 | 49000 | 141000 - 6 | 0 | 51000 | 192000 - 8 | 0 | 53000 | 245000 - 1 | 1 | 46000 | 46000 - 3 | 1 | 48000 | 94000 - 5 | 1 | 50000 | 144000 - 7 | 1 | 52000 | 196000 - 9 | 1 | 54000 | 250000 -(10 rows) - --- more than one window with GROUP BY -SELECT sum(salary), - row_number() OVER (ORDER BY depname), - sum(sum(salary)) OVER (ORDER BY depname DESC) -FROM empsalary GROUP BY depname; - sum | row_number | sum --------+------------+------- - 25100 | 1 | 47100 - 7400 | 2 | 22000 - 14600 | 3 | 14600 -(3 rows) - --- identical windows with different names -SELECT sum(salary) OVER w1, count(*) OVER w2 -FROM empsalary WINDOW w1 AS (ORDER BY salary), w2 AS (ORDER BY salary); - sum | count --------+------- - 3500 | 1 - 7400 | 2 - 11600 | 3 - 16100 | 4 - 25700 | 6 - 25700 | 6 - 30700 | 7 - 41100 | 9 - 41100 | 9 - 47100 | 10 -(10 rows) - --- subplan -SELECT lead(ten, (SELECT two FROM tenk1 WHERE s.unique2 = unique2)) OVER (PARTITION BY four ORDER BY ten) -FROM tenk1 s WHERE unique2 < 10; - lead ------- - 0 - 0 - 4 - 1 - 7 - 9 - - 0 - 3 - -(10 rows) - --- empty table -SELECT count(*) OVER (PARTITION BY four) FROM (SELECT * FROM tenk1 WHERE FALSE)s; - count -------- -(0 rows) - --- mixture of agg/wfunc in the same window -SELECT sum(salary) OVER w, rank() OVER w FROM empsalary WINDOW w AS (PARTITION BY depname ORDER BY salary DESC); - sum | rank --------+------ - 6000 | 1 - 16400 | 2 - 16400 | 2 - 20900 | 4 - 25100 | 5 - 3900 | 1 - 7400 | 2 - 5000 | 1 - 14600 | 2 - 14600 | 2 -(10 rows) - --- strict aggs -SELECT empno, depname, salary, bonus, depadj, MIN(bonus) OVER (ORDER BY empno), MAX(depadj) OVER () FROM( - SELECT *, - CASE WHEN enroll_date < '2008-01-01' THEN 2008 - extract(YEAR FROM enroll_date) END * 500 AS bonus, - CASE WHEN - AVG(salary) OVER (PARTITION BY depname) < salary - THEN 200 END AS depadj FROM empsalary -)s; - empno | depname | salary | bonus | depadj | min | max --------+-----------+--------+-------+--------+------+----- - 1 | sales | 5000 | 1000 | 200 | 1000 | 200 - 2 | personnel | 3900 | 1000 | 200 | 1000 | 200 - 3 | sales | 4800 | 500 | | 500 | 200 - 4 | sales | 4800 | 500 | | 500 | 200 - 5 | personnel | 3500 | 500 | | 500 | 200 - 7 | develop | 4200 | | | 500 | 200 - 8 | develop | 6000 | 1000 | 200 | 500 | 200 - 9 | develop | 4500 | | | 500 | 200 - 10 | develop | 5200 | 500 | 200 | 500 | 200 - 11 | develop | 5200 | 500 | 200 | 500 | 200 -(10 rows) - --- window function over ungrouped agg over empty row set (bug before 9.1) -SELECT SUM(COUNT(f1)) OVER () FROM int4_tbl WHERE f1=42; - sum ------ - 0 -(1 row) - --- window function with ORDER BY an expression involving aggregates (9.1 bug) -select ten, - sum(unique1) + sum(unique2) as res, - rank() over (order by sum(unique1) + sum(unique2)) as rank -from tenk1 -group by ten order by ten; - ten | res | rank ------+----------+------ - 0 | 9976146 | 4 - 1 | 10114187 | 9 - 2 | 10059554 | 8 - 3 | 9878541 | 1 - 4 | 9881005 | 2 - 5 | 9981670 | 5 - 6 | 9947099 | 3 - 7 | 10120309 | 10 - 8 | 9991305 | 6 - 9 | 10040184 | 7 -(10 rows) - --- window and aggregate with GROUP BY expression (9.2 bug) -explain (costs off) -select first_value(max(x)) over (), y - from (select unique1 as x, ten+four as y from tenk1) ss - group by y; - QUERY PLAN ---------------------------------------------- - WindowAgg - -> HashAggregate - Group Key: (tenk1.ten + tenk1.four) - -> Seq Scan on tenk1 -(4 rows) - --- test non-default frame specifications -SELECT four, ten, - sum(ten) over (partition by four order by ten), - last_value(ten) over (partition by four order by ten) -FROM (select distinct ten, four from tenk1) ss; - four | ten | sum | last_value -------+-----+-----+------------ - 0 | 0 | 0 | 0 - 0 | 2 | 2 | 2 - 0 | 4 | 6 | 4 - 0 | 6 | 12 | 6 - 0 | 8 | 20 | 8 - 1 | 1 | 1 | 1 - 1 | 3 | 4 | 3 - 1 | 5 | 9 | 5 - 1 | 7 | 16 | 7 - 1 | 9 | 25 | 9 - 2 | 0 | 0 | 0 - 2 | 2 | 2 | 2 - 2 | 4 | 6 | 4 - 2 | 6 | 12 | 6 - 2 | 8 | 20 | 8 - 3 | 1 | 1 | 1 - 3 | 3 | 4 | 3 - 3 | 5 | 9 | 5 - 3 | 7 | 16 | 7 - 3 | 9 | 25 | 9 -(20 rows) - -SELECT four, ten, - sum(ten) over (partition by four order by ten range between unbounded preceding and current row), - last_value(ten) over (partition by four order by ten range between unbounded preceding and current row) -FROM (select distinct ten, four from tenk1) ss; - four | ten | sum | last_value -------+-----+-----+------------ - 0 | 0 | 0 | 0 - 0 | 2 | 2 | 2 - 0 | 4 | 6 | 4 - 0 | 6 | 12 | 6 - 0 | 8 | 20 | 8 - 1 | 1 | 1 | 1 - 1 | 3 | 4 | 3 - 1 | 5 | 9 | 5 - 1 | 7 | 16 | 7 - 1 | 9 | 25 | 9 - 2 | 0 | 0 | 0 - 2 | 2 | 2 | 2 - 2 | 4 | 6 | 4 - 2 | 6 | 12 | 6 - 2 | 8 | 20 | 8 - 3 | 1 | 1 | 1 - 3 | 3 | 4 | 3 - 3 | 5 | 9 | 5 - 3 | 7 | 16 | 7 - 3 | 9 | 25 | 9 -(20 rows) - -SELECT four, ten, - sum(ten) over (partition by four order by ten range between unbounded preceding and unbounded following), - last_value(ten) over (partition by four order by ten range between unbounded preceding and unbounded following) -FROM (select distinct ten, four from tenk1) ss; - four | ten | sum | last_value -------+-----+-----+------------ - 0 | 0 | 20 | 8 - 0 | 2 | 20 | 8 - 0 | 4 | 20 | 8 - 0 | 6 | 20 | 8 - 0 | 8 | 20 | 8 - 1 | 1 | 25 | 9 - 1 | 3 | 25 | 9 - 1 | 5 | 25 | 9 - 1 | 7 | 25 | 9 - 1 | 9 | 25 | 9 - 2 | 0 | 20 | 8 - 2 | 2 | 20 | 8 - 2 | 4 | 20 | 8 - 2 | 6 | 20 | 8 - 2 | 8 | 20 | 8 - 3 | 1 | 25 | 9 - 3 | 3 | 25 | 9 - 3 | 5 | 25 | 9 - 3 | 7 | 25 | 9 - 3 | 9 | 25 | 9 -(20 rows) - -SELECT four, ten/4 as two, - sum(ten/4) over (partition by four order by ten/4 range between unbounded preceding and current row), - last_value(ten/4) over (partition by four order by ten/4 range between unbounded preceding and current row) -FROM (select distinct ten, four from tenk1) ss; - four | two | sum | last_value -------+-----+-----+------------ - 0 | 0 | 0 | 0 - 0 | 0 | 0 | 0 - 0 | 1 | 2 | 1 - 0 | 1 | 2 | 1 - 0 | 2 | 4 | 2 - 1 | 0 | 0 | 0 - 1 | 0 | 0 | 0 - 1 | 1 | 2 | 1 - 1 | 1 | 2 | 1 - 1 | 2 | 4 | 2 - 2 | 0 | 0 | 0 - 2 | 0 | 0 | 0 - 2 | 1 | 2 | 1 - 2 | 1 | 2 | 1 - 2 | 2 | 4 | 2 - 3 | 0 | 0 | 0 - 3 | 0 | 0 | 0 - 3 | 1 | 2 | 1 - 3 | 1 | 2 | 1 - 3 | 2 | 4 | 2 -(20 rows) - -SELECT four, ten/4 as two, - sum(ten/4) over (partition by four order by ten/4 rows between unbounded preceding and current row), - last_value(ten/4) over (partition by four order by ten/4 rows between unbounded preceding and current row) -FROM (select distinct ten, four from tenk1) ss; - four | two | sum | last_value -------+-----+-----+------------ - 0 | 0 | 0 | 0 - 0 | 0 | 0 | 0 - 0 | 1 | 1 | 1 - 0 | 1 | 2 | 1 - 0 | 2 | 4 | 2 - 1 | 0 | 0 | 0 - 1 | 0 | 0 | 0 - 1 | 1 | 1 | 1 - 1 | 1 | 2 | 1 - 1 | 2 | 4 | 2 - 2 | 0 | 0 | 0 - 2 | 0 | 0 | 0 - 2 | 1 | 1 | 1 - 2 | 1 | 2 | 1 - 2 | 2 | 4 | 2 - 3 | 0 | 0 | 0 - 3 | 0 | 0 | 0 - 3 | 1 | 1 | 1 - 3 | 1 | 2 | 1 - 3 | 2 | 4 | 2 -(20 rows) - -SELECT sum(unique1) over (order by four range between current row and unbounded following), - unique1, four -FROM tenk1 WHERE unique1 < 10; - sum | unique1 | four ------+---------+------ - 45 | 0 | 0 - 45 | 8 | 0 - 45 | 4 | 0 - 33 | 5 | 1 - 33 | 9 | 1 - 33 | 1 | 1 - 18 | 6 | 2 - 18 | 2 | 2 - 10 | 3 | 3 - 10 | 7 | 3 -(10 rows) - -SELECT sum(unique1) over (rows between current row and unbounded following), - unique1, four -FROM tenk1 WHERE unique1 < 10; - sum | unique1 | four ------+---------+------ - 45 | 4 | 0 - 41 | 2 | 2 - 39 | 1 | 1 - 38 | 6 | 2 - 32 | 9 | 1 - 23 | 8 | 0 - 15 | 5 | 1 - 10 | 3 | 3 - 7 | 7 | 3 - 0 | 0 | 0 -(10 rows) - -SELECT sum(unique1) over (rows between 2 preceding and 2 following), - unique1, four -FROM tenk1 WHERE unique1 < 10; - sum | unique1 | four ------+---------+------ - 7 | 4 | 0 - 13 | 2 | 2 - 22 | 1 | 1 - 26 | 6 | 2 - 29 | 9 | 1 - 31 | 8 | 0 - 32 | 5 | 1 - 23 | 3 | 3 - 15 | 7 | 3 - 10 | 0 | 0 -(10 rows) - -SELECT sum(unique1) over (rows between 2 preceding and 2 following exclude no others), - unique1, four -FROM tenk1 WHERE unique1 < 10; - sum | unique1 | four ------+---------+------ - 7 | 4 | 0 - 13 | 2 | 2 - 22 | 1 | 1 - 26 | 6 | 2 - 29 | 9 | 1 - 31 | 8 | 0 - 32 | 5 | 1 - 23 | 3 | 3 - 15 | 7 | 3 - 10 | 0 | 0 -(10 rows) - -SELECT sum(unique1) over (rows between 2 preceding and 2 following exclude current row), - unique1, four -FROM tenk1 WHERE unique1 < 10; - sum | unique1 | four ------+---------+------ - 3 | 4 | 0 - 11 | 2 | 2 - 21 | 1 | 1 - 20 | 6 | 2 - 20 | 9 | 1 - 23 | 8 | 0 - 27 | 5 | 1 - 20 | 3 | 3 - 8 | 7 | 3 - 10 | 0 | 0 -(10 rows) - -SELECT sum(unique1) over (rows between 2 preceding and 2 following exclude group), - unique1, four -FROM tenk1 WHERE unique1 < 10; - sum | unique1 | four ------+---------+------ - | 4 | 0 - | 2 | 2 - | 1 | 1 - | 6 | 2 - | 9 | 1 - | 8 | 0 - | 5 | 1 - | 3 | 3 - | 7 | 3 - | 0 | 0 -(10 rows) - -SELECT sum(unique1) over (rows between 2 preceding and 2 following exclude ties), - unique1, four -FROM tenk1 WHERE unique1 < 10; - sum | unique1 | four ------+---------+------ - 4 | 4 | 0 - 2 | 2 | 2 - 1 | 1 | 1 - 6 | 6 | 2 - 9 | 9 | 1 - 8 | 8 | 0 - 5 | 5 | 1 - 3 | 3 | 3 - 7 | 7 | 3 - 0 | 0 | 0 -(10 rows) - -SELECT first_value(unique1) over (ORDER BY four rows between current row and 2 following exclude current row), - unique1, four -FROM tenk1 WHERE unique1 < 10; - first_value | unique1 | four --------------+---------+------ - 8 | 0 | 0 - 4 | 8 | 0 - 5 | 4 | 0 - 9 | 5 | 1 - 1 | 9 | 1 - 6 | 1 | 1 - 2 | 6 | 2 - 3 | 2 | 2 - 7 | 3 | 3 - | 7 | 3 -(10 rows) - -SELECT first_value(unique1) over (ORDER BY four rows between current row and 2 following exclude group), - unique1, four -FROM tenk1 WHERE unique1 < 10; - first_value | unique1 | four --------------+---------+------ - | 0 | 0 - 5 | 8 | 0 - 5 | 4 | 0 - | 5 | 1 - 6 | 9 | 1 - 6 | 1 | 1 - 3 | 6 | 2 - 3 | 2 | 2 - | 3 | 3 - | 7 | 3 -(10 rows) - -SELECT first_value(unique1) over (ORDER BY four rows between current row and 2 following exclude ties), - unique1, four -FROM tenk1 WHERE unique1 < 10; - first_value | unique1 | four --------------+---------+------ - 0 | 0 | 0 - 8 | 8 | 0 - 4 | 4 | 0 - 5 | 5 | 1 - 9 | 9 | 1 - 1 | 1 | 1 - 6 | 6 | 2 - 2 | 2 | 2 - 3 | 3 | 3 - 7 | 7 | 3 -(10 rows) - -SELECT last_value(unique1) over (ORDER BY four rows between current row and 2 following exclude current row), - unique1, four -FROM tenk1 WHERE unique1 < 10; - last_value | unique1 | four -------------+---------+------ - 4 | 0 | 0 - 5 | 8 | 0 - 9 | 4 | 0 - 1 | 5 | 1 - 6 | 9 | 1 - 2 | 1 | 1 - 3 | 6 | 2 - 7 | 2 | 2 - 7 | 3 | 3 - | 7 | 3 -(10 rows) - -SELECT last_value(unique1) over (ORDER BY four rows between current row and 2 following exclude group), - unique1, four -FROM tenk1 WHERE unique1 < 10; - last_value | unique1 | four -------------+---------+------ - | 0 | 0 - 5 | 8 | 0 - 9 | 4 | 0 - | 5 | 1 - 6 | 9 | 1 - 2 | 1 | 1 - 3 | 6 | 2 - 7 | 2 | 2 - | 3 | 3 - | 7 | 3 -(10 rows) - -SELECT last_value(unique1) over (ORDER BY four rows between current row and 2 following exclude ties), - unique1, four -FROM tenk1 WHERE unique1 < 10; - last_value | unique1 | four -------------+---------+------ - 0 | 0 | 0 - 5 | 8 | 0 - 9 | 4 | 0 - 5 | 5 | 1 - 6 | 9 | 1 - 2 | 1 | 1 - 3 | 6 | 2 - 7 | 2 | 2 - 3 | 3 | 3 - 7 | 7 | 3 -(10 rows) - -SELECT sum(unique1) over (rows between 2 preceding and 1 preceding), - unique1, four -FROM tenk1 WHERE unique1 < 10; - sum | unique1 | four ------+---------+------ - | 4 | 0 - 4 | 2 | 2 - 6 | 1 | 1 - 3 | 6 | 2 - 7 | 9 | 1 - 15 | 8 | 0 - 17 | 5 | 1 - 13 | 3 | 3 - 8 | 7 | 3 - 10 | 0 | 0 -(10 rows) - -SELECT sum(unique1) over (rows between 1 following and 3 following), - unique1, four -FROM tenk1 WHERE unique1 < 10; - sum | unique1 | four ------+---------+------ - 9 | 4 | 0 - 16 | 2 | 2 - 23 | 1 | 1 - 22 | 6 | 2 - 16 | 9 | 1 - 15 | 8 | 0 - 10 | 5 | 1 - 7 | 3 | 3 - 0 | 7 | 3 - | 0 | 0 -(10 rows) - -SELECT sum(unique1) over (rows between unbounded preceding and 1 following), - unique1, four -FROM tenk1 WHERE unique1 < 10; - sum | unique1 | four ------+---------+------ - 6 | 4 | 0 - 7 | 2 | 2 - 13 | 1 | 1 - 22 | 6 | 2 - 30 | 9 | 1 - 35 | 8 | 0 - 38 | 5 | 1 - 45 | 3 | 3 - 45 | 7 | 3 - 45 | 0 | 0 -(10 rows) - -SELECT sum(unique1) over (w range between current row and unbounded following), - unique1, four -FROM tenk1 WHERE unique1 < 10 WINDOW w AS (order by four); - sum | unique1 | four ------+---------+------ - 45 | 0 | 0 - 45 | 8 | 0 - 45 | 4 | 0 - 33 | 5 | 1 - 33 | 9 | 1 - 33 | 1 | 1 - 18 | 6 | 2 - 18 | 2 | 2 - 10 | 3 | 3 - 10 | 7 | 3 -(10 rows) - -SELECT sum(unique1) over (w range between unbounded preceding and current row exclude current row), - unique1, four -FROM tenk1 WHERE unique1 < 10 WINDOW w AS (order by four); - sum | unique1 | four ------+---------+------ - 12 | 0 | 0 - 4 | 8 | 0 - 8 | 4 | 0 - 22 | 5 | 1 - 18 | 9 | 1 - 26 | 1 | 1 - 29 | 6 | 2 - 33 | 2 | 2 - 42 | 3 | 3 - 38 | 7 | 3 -(10 rows) - -SELECT sum(unique1) over (w range between unbounded preceding and current row exclude group), - unique1, four -FROM tenk1 WHERE unique1 < 10 WINDOW w AS (order by four); - sum | unique1 | four ------+---------+------ - | 0 | 0 - | 8 | 0 - | 4 | 0 - 12 | 5 | 1 - 12 | 9 | 1 - 12 | 1 | 1 - 27 | 6 | 2 - 27 | 2 | 2 - 35 | 3 | 3 - 35 | 7 | 3 -(10 rows) - -SELECT sum(unique1) over (w range between unbounded preceding and current row exclude ties), - unique1, four -FROM tenk1 WHERE unique1 < 10 WINDOW w AS (order by four); - sum | unique1 | four ------+---------+------ - 0 | 0 | 0 - 8 | 8 | 0 - 4 | 4 | 0 - 17 | 5 | 1 - 21 | 9 | 1 - 13 | 1 | 1 - 33 | 6 | 2 - 29 | 2 | 2 - 38 | 3 | 3 - 42 | 7 | 3 -(10 rows) - -SELECT first_value(unique1) over w, - nth_value(unique1, 2) over w AS nth_2, - last_value(unique1) over w, unique1, four -FROM tenk1 WHERE unique1 < 10 -WINDOW w AS (order by four range between current row and unbounded following); - first_value | nth_2 | last_value | unique1 | four --------------+-------+------------+---------+------ - 0 | 8 | 7 | 0 | 0 - 0 | 8 | 7 | 8 | 0 - 0 | 8 | 7 | 4 | 0 - 5 | 9 | 7 | 5 | 1 - 5 | 9 | 7 | 9 | 1 - 5 | 9 | 7 | 1 | 1 - 6 | 2 | 7 | 6 | 2 - 6 | 2 | 7 | 2 | 2 - 3 | 7 | 7 | 3 | 3 - 3 | 7 | 7 | 7 | 3 -(10 rows) - -SELECT sum(unique1) over - (order by unique1 - rows (SELECT unique1 FROM tenk1 ORDER BY unique1 LIMIT 1) + 1 PRECEDING), - unique1 -FROM tenk1 WHERE unique1 < 10; - sum | unique1 ------+--------- - 0 | 0 - 1 | 1 - 3 | 2 - 5 | 3 - 7 | 4 - 9 | 5 - 11 | 6 - 13 | 7 - 15 | 8 - 17 | 9 -(10 rows) - -CREATE TEMP VIEW v_window AS - SELECT i, sum(i) over (order by i rows between 1 preceding and 1 following) as sum_rows - FROM generate_series(1, 10) i; -SELECT * FROM v_window; - i | sum_rows -----+---------- - 1 | 3 - 2 | 6 - 3 | 9 - 4 | 12 - 5 | 15 - 6 | 18 - 7 | 21 - 8 | 24 - 9 | 27 - 10 | 19 -(10 rows) - -SELECT pg_get_viewdef('v_window'); - pg_get_viewdef ---------------------------------------------------------------------------------------- - SELECT i.i, + - sum(i.i) OVER (ORDER BY i.i ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING) AS sum_rows+ - FROM generate_series(1, 10) i(i); -(1 row) - -CREATE OR REPLACE TEMP VIEW v_window AS - SELECT i, sum(i) over (order by i rows between 1 preceding and 1 following - exclude current row) as sum_rows FROM generate_series(1, 10) i; -SELECT * FROM v_window; - i | sum_rows -----+---------- - 1 | 2 - 2 | 4 - 3 | 6 - 4 | 8 - 5 | 10 - 6 | 12 - 7 | 14 - 8 | 16 - 9 | 18 - 10 | 9 -(10 rows) - -SELECT pg_get_viewdef('v_window'); - pg_get_viewdef ------------------------------------------------------------------------------------------------------------ - SELECT i.i, + - sum(i.i) OVER (ORDER BY i.i ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING EXCLUDE CURRENT ROW) AS sum_rows+ - FROM generate_series(1, 10) i(i); -(1 row) - -CREATE OR REPLACE TEMP VIEW v_window AS - SELECT i, sum(i) over (order by i rows between 1 preceding and 1 following - exclude group) as sum_rows FROM generate_series(1, 10) i; -SELECT * FROM v_window; - i | sum_rows -----+---------- - 1 | 2 - 2 | 4 - 3 | 6 - 4 | 8 - 5 | 10 - 6 | 12 - 7 | 14 - 8 | 16 - 9 | 18 - 10 | 9 -(10 rows) - -SELECT pg_get_viewdef('v_window'); - pg_get_viewdef ------------------------------------------------------------------------------------------------------ - SELECT i.i, + - sum(i.i) OVER (ORDER BY i.i ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING EXCLUDE GROUP) AS sum_rows+ - FROM generate_series(1, 10) i(i); -(1 row) - -CREATE OR REPLACE TEMP VIEW v_window AS - SELECT i, sum(i) over (order by i rows between 1 preceding and 1 following - exclude ties) as sum_rows FROM generate_series(1, 10) i; -SELECT * FROM v_window; - i | sum_rows -----+---------- - 1 | 3 - 2 | 6 - 3 | 9 - 4 | 12 - 5 | 15 - 6 | 18 - 7 | 21 - 8 | 24 - 9 | 27 - 10 | 19 -(10 rows) - -SELECT pg_get_viewdef('v_window'); - pg_get_viewdef ----------------------------------------------------------------------------------------------------- - SELECT i.i, + - sum(i.i) OVER (ORDER BY i.i ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING EXCLUDE TIES) AS sum_rows+ - FROM generate_series(1, 10) i(i); -(1 row) - -CREATE OR REPLACE TEMP VIEW v_window AS - SELECT i, sum(i) over (order by i rows between 1 preceding and 1 following - exclude no others) as sum_rows FROM generate_series(1, 10) i; -SELECT * FROM v_window; - i | sum_rows -----+---------- - 1 | 3 - 2 | 6 - 3 | 9 - 4 | 12 - 5 | 15 - 6 | 18 - 7 | 21 - 8 | 24 - 9 | 27 - 10 | 19 -(10 rows) - -SELECT pg_get_viewdef('v_window'); - pg_get_viewdef ---------------------------------------------------------------------------------------- - SELECT i.i, + - sum(i.i) OVER (ORDER BY i.i ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING) AS sum_rows+ - FROM generate_series(1, 10) i(i); -(1 row) - -CREATE OR REPLACE TEMP VIEW v_window AS - SELECT i, sum(i) over (order by i groups between 1 preceding and 1 following) as sum_rows FROM generate_series(1, 10) i; -SELECT * FROM v_window; - i | sum_rows -----+---------- - 1 | 3 - 2 | 6 - 3 | 9 - 4 | 12 - 5 | 15 - 6 | 18 - 7 | 21 - 8 | 24 - 9 | 27 - 10 | 19 -(10 rows) - -SELECT pg_get_viewdef('v_window'); - pg_get_viewdef ------------------------------------------------------------------------------------------ - SELECT i.i, + - sum(i.i) OVER (ORDER BY i.i GROUPS BETWEEN 1 PRECEDING AND 1 FOLLOWING) AS sum_rows+ - FROM generate_series(1, 10) i(i); -(1 row) - -DROP VIEW v_window; -CREATE TEMP VIEW v_window AS - SELECT i, min(i) over (order by i range between '1 day' preceding and '10 days' following) as min_i - FROM generate_series(now(), now()+'100 days'::interval, '1 hour') i; -SELECT pg_get_viewdef('v_window'); - pg_get_viewdef ---------------------------------------------------------------------------------------------------------------------------- - SELECT i.i, + - min(i.i) OVER (ORDER BY i.i RANGE BETWEEN '@ 1 day'::interval PRECEDING AND '@ 10 days'::interval FOLLOWING) AS min_i+ - FROM generate_series(now(), (now() + '@ 100 days'::interval), '@ 1 hour'::interval) i(i); -(1 row) - --- RANGE offset PRECEDING/FOLLOWING tests -SELECT sum(unique1) over (order by four range between 2::int8 preceding and 1::int2 preceding), - unique1, four -FROM tenk1 WHERE unique1 < 10; - sum | unique1 | four ------+---------+------ - | 0 | 0 - | 8 | 0 - | 4 | 0 - 12 | 5 | 1 - 12 | 9 | 1 - 12 | 1 | 1 - 27 | 6 | 2 - 27 | 2 | 2 - 23 | 3 | 3 - 23 | 7 | 3 -(10 rows) - -SELECT sum(unique1) over (order by four desc range between 2::int8 preceding and 1::int2 preceding), - unique1, four -FROM tenk1 WHERE unique1 < 10; - sum | unique1 | four ------+---------+------ - | 3 | 3 - | 7 | 3 - 10 | 6 | 2 - 10 | 2 | 2 - 18 | 9 | 1 - 18 | 5 | 1 - 18 | 1 | 1 - 23 | 0 | 0 - 23 | 8 | 0 - 23 | 4 | 0 -(10 rows) - -SELECT sum(unique1) over (order by four range between 2::int8 preceding and 1::int2 preceding exclude no others), - unique1, four -FROM tenk1 WHERE unique1 < 10; - sum | unique1 | four ------+---------+------ - | 0 | 0 - | 8 | 0 - | 4 | 0 - 12 | 5 | 1 - 12 | 9 | 1 - 12 | 1 | 1 - 27 | 6 | 2 - 27 | 2 | 2 - 23 | 3 | 3 - 23 | 7 | 3 -(10 rows) - -SELECT sum(unique1) over (order by four range between 2::int8 preceding and 1::int2 preceding exclude current row), - unique1, four -FROM tenk1 WHERE unique1 < 10; - sum | unique1 | four ------+---------+------ - | 0 | 0 - | 8 | 0 - | 4 | 0 - 12 | 5 | 1 - 12 | 9 | 1 - 12 | 1 | 1 - 27 | 6 | 2 - 27 | 2 | 2 - 23 | 3 | 3 - 23 | 7 | 3 -(10 rows) - -SELECT sum(unique1) over (order by four range between 2::int8 preceding and 1::int2 preceding exclude group), - unique1, four -FROM tenk1 WHERE unique1 < 10; - sum | unique1 | four ------+---------+------ - | 0 | 0 - | 8 | 0 - | 4 | 0 - 12 | 5 | 1 - 12 | 9 | 1 - 12 | 1 | 1 - 27 | 6 | 2 - 27 | 2 | 2 - 23 | 3 | 3 - 23 | 7 | 3 -(10 rows) - -SELECT sum(unique1) over (order by four range between 2::int8 preceding and 1::int2 preceding exclude ties), - unique1, four -FROM tenk1 WHERE unique1 < 10; - sum | unique1 | four ------+---------+------ - | 0 | 0 - | 8 | 0 - | 4 | 0 - 12 | 5 | 1 - 12 | 9 | 1 - 12 | 1 | 1 - 27 | 6 | 2 - 27 | 2 | 2 - 23 | 3 | 3 - 23 | 7 | 3 -(10 rows) - -SELECT sum(unique1) over (order by four range between 2::int8 preceding and 6::int2 following exclude ties), - unique1, four -FROM tenk1 WHERE unique1 < 10; - sum | unique1 | four ------+---------+------ - 33 | 0 | 0 - 41 | 8 | 0 - 37 | 4 | 0 - 35 | 5 | 1 - 39 | 9 | 1 - 31 | 1 | 1 - 43 | 6 | 2 - 39 | 2 | 2 - 26 | 3 | 3 - 30 | 7 | 3 -(10 rows) - -SELECT sum(unique1) over (order by four range between 2::int8 preceding and 6::int2 following exclude group), - unique1, four -FROM tenk1 WHERE unique1 < 10; - sum | unique1 | four ------+---------+------ - 33 | 0 | 0 - 33 | 8 | 0 - 33 | 4 | 0 - 30 | 5 | 1 - 30 | 9 | 1 - 30 | 1 | 1 - 37 | 6 | 2 - 37 | 2 | 2 - 23 | 3 | 3 - 23 | 7 | 3 -(10 rows) - -SELECT sum(unique1) over (partition by four order by unique1 range between 5::int8 preceding and 6::int2 following), - unique1, four -FROM tenk1 WHERE unique1 < 10; - sum | unique1 | four ------+---------+------ - 4 | 0 | 0 - 12 | 4 | 0 - 12 | 8 | 0 - 6 | 1 | 1 - 15 | 5 | 1 - 14 | 9 | 1 - 8 | 2 | 2 - 8 | 6 | 2 - 10 | 3 | 3 - 10 | 7 | 3 -(10 rows) - -SELECT sum(unique1) over (partition by four order by unique1 range between 5::int8 preceding and 6::int2 following - exclude current row),unique1, four -FROM tenk1 WHERE unique1 < 10; - sum | unique1 | four ------+---------+------ - 4 | 0 | 0 - 8 | 4 | 0 - 4 | 8 | 0 - 5 | 1 | 1 - 10 | 5 | 1 - 5 | 9 | 1 - 6 | 2 | 2 - 2 | 6 | 2 - 7 | 3 | 3 - 3 | 7 | 3 -(10 rows) - -select sum(salary) over (order by enroll_date range between '1 year'::interval preceding and '1 year'::interval following), - salary, enroll_date from empsalary; - sum | salary | enroll_date --------+--------+------------- - 34900 | 5000 | 10-01-2006 - 34900 | 6000 | 10-01-2006 - 38400 | 3900 | 12-23-2006 - 47100 | 4800 | 08-01-2007 - 47100 | 5200 | 08-01-2007 - 47100 | 4800 | 08-08-2007 - 47100 | 5200 | 08-15-2007 - 36100 | 3500 | 12-10-2007 - 32200 | 4500 | 01-01-2008 - 32200 | 4200 | 01-01-2008 -(10 rows) - -select sum(salary) over (order by enroll_date desc range between '1 year'::interval preceding and '1 year'::interval following), - salary, enroll_date from empsalary; - sum | salary | enroll_date --------+--------+------------- - 32200 | 4200 | 01-01-2008 - 32200 | 4500 | 01-01-2008 - 36100 | 3500 | 12-10-2007 - 47100 | 5200 | 08-15-2007 - 47100 | 4800 | 08-08-2007 - 47100 | 4800 | 08-01-2007 - 47100 | 5200 | 08-01-2007 - 38400 | 3900 | 12-23-2006 - 34900 | 5000 | 10-01-2006 - 34900 | 6000 | 10-01-2006 -(10 rows) - -select sum(salary) over (order by enroll_date desc range between '1 year'::interval following and '1 year'::interval following), - salary, enroll_date from empsalary; - sum | salary | enroll_date ------+--------+------------- - | 4200 | 01-01-2008 - | 4500 | 01-01-2008 - | 3500 | 12-10-2007 - | 5200 | 08-15-2007 - | 4800 | 08-08-2007 - | 4800 | 08-01-2007 - | 5200 | 08-01-2007 - | 3900 | 12-23-2006 - | 5000 | 10-01-2006 - | 6000 | 10-01-2006 -(10 rows) - -select sum(salary) over (order by enroll_date range between '1 year'::interval preceding and '1 year'::interval following - exclude current row), salary, enroll_date from empsalary; - sum | salary | enroll_date --------+--------+------------- - 29900 | 5000 | 10-01-2006 - 28900 | 6000 | 10-01-2006 - 34500 | 3900 | 12-23-2006 - 42300 | 4800 | 08-01-2007 - 41900 | 5200 | 08-01-2007 - 42300 | 4800 | 08-08-2007 - 41900 | 5200 | 08-15-2007 - 32600 | 3500 | 12-10-2007 - 27700 | 4500 | 01-01-2008 - 28000 | 4200 | 01-01-2008 -(10 rows) - -select sum(salary) over (order by enroll_date range between '1 year'::interval preceding and '1 year'::interval following - exclude group), salary, enroll_date from empsalary; - sum | salary | enroll_date --------+--------+------------- - 23900 | 5000 | 10-01-2006 - 23900 | 6000 | 10-01-2006 - 34500 | 3900 | 12-23-2006 - 37100 | 4800 | 08-01-2007 - 37100 | 5200 | 08-01-2007 - 42300 | 4800 | 08-08-2007 - 41900 | 5200 | 08-15-2007 - 32600 | 3500 | 12-10-2007 - 23500 | 4500 | 01-01-2008 - 23500 | 4200 | 01-01-2008 -(10 rows) - -select sum(salary) over (order by enroll_date range between '1 year'::interval preceding and '1 year'::interval following - exclude ties), salary, enroll_date from empsalary; - sum | salary | enroll_date --------+--------+------------- - 28900 | 5000 | 10-01-2006 - 29900 | 6000 | 10-01-2006 - 38400 | 3900 | 12-23-2006 - 41900 | 4800 | 08-01-2007 - 42300 | 5200 | 08-01-2007 - 47100 | 4800 | 08-08-2007 - 47100 | 5200 | 08-15-2007 - 36100 | 3500 | 12-10-2007 - 28000 | 4500 | 01-01-2008 - 27700 | 4200 | 01-01-2008 -(10 rows) - -select first_value(salary) over(order by salary range between 1000 preceding and 1000 following), - lead(salary) over(order by salary range between 1000 preceding and 1000 following), - nth_value(salary, 1) over(order by salary range between 1000 preceding and 1000 following), - salary from empsalary; - first_value | lead | nth_value | salary --------------+------+-----------+-------- - 3500 | 3900 | 3500 | 3500 - 3500 | 4200 | 3500 | 3900 - 3500 | 4500 | 3500 | 4200 - 3500 | 4800 | 3500 | 4500 - 3900 | 4800 | 3900 | 4800 - 3900 | 5000 | 3900 | 4800 - 4200 | 5200 | 4200 | 5000 - 4200 | 5200 | 4200 | 5200 - 4200 | 6000 | 4200 | 5200 - 5000 | | 5000 | 6000 -(10 rows) - -select last_value(salary) over(order by salary range between 1000 preceding and 1000 following), - lag(salary) over(order by salary range between 1000 preceding and 1000 following), - salary from empsalary; - last_value | lag | salary -------------+------+-------- - 4500 | | 3500 - 4800 | 3500 | 3900 - 5200 | 3900 | 4200 - 5200 | 4200 | 4500 - 5200 | 4500 | 4800 - 5200 | 4800 | 4800 - 6000 | 4800 | 5000 - 6000 | 5000 | 5200 - 6000 | 5200 | 5200 - 6000 | 5200 | 6000 -(10 rows) - -select first_value(salary) over(order by salary range between 1000 following and 3000 following - exclude current row), - lead(salary) over(order by salary range between 1000 following and 3000 following exclude ties), - nth_value(salary, 1) over(order by salary range between 1000 following and 3000 following - exclude ties), - salary from empsalary; - first_value | lead | nth_value | salary --------------+------+-----------+-------- - 4500 | 3900 | 4500 | 3500 - 5000 | 4200 | 5000 | 3900 - 5200 | 4500 | 5200 | 4200 - 6000 | 4800 | 6000 | 4500 - 6000 | 4800 | 6000 | 4800 - 6000 | 5000 | 6000 | 4800 - 6000 | 5200 | 6000 | 5000 - | 5200 | | 5200 - | 6000 | | 5200 - | | | 6000 -(10 rows) - -select last_value(salary) over(order by salary range between 1000 following and 3000 following - exclude group), - lag(salary) over(order by salary range between 1000 following and 3000 following exclude group), - salary from empsalary; - last_value | lag | salary -------------+------+-------- - 6000 | | 3500 - 6000 | 3500 | 3900 - 6000 | 3900 | 4200 - 6000 | 4200 | 4500 - 6000 | 4500 | 4800 - 6000 | 4800 | 4800 - 6000 | 4800 | 5000 - | 5000 | 5200 - | 5200 | 5200 - | 5200 | 6000 -(10 rows) - -select first_value(salary) over(order by enroll_date range between unbounded preceding and '1 year'::interval following - exclude ties), - last_value(salary) over(order by enroll_date range between unbounded preceding and '1 year'::interval following), - salary, enroll_date from empsalary; - first_value | last_value | salary | enroll_date --------------+------------+--------+------------- - 5000 | 5200 | 5000 | 10-01-2006 - 6000 | 5200 | 6000 | 10-01-2006 - 5000 | 3500 | 3900 | 12-23-2006 - 5000 | 4200 | 4800 | 08-01-2007 - 5000 | 4200 | 5200 | 08-01-2007 - 5000 | 4200 | 4800 | 08-08-2007 - 5000 | 4200 | 5200 | 08-15-2007 - 5000 | 4200 | 3500 | 12-10-2007 - 5000 | 4200 | 4500 | 01-01-2008 - 5000 | 4200 | 4200 | 01-01-2008 -(10 rows) - -select first_value(salary) over(order by enroll_date range between unbounded preceding and '1 year'::interval following - exclude ties), - last_value(salary) over(order by enroll_date range between unbounded preceding and '1 year'::interval following - exclude ties), - salary, enroll_date from empsalary; - first_value | last_value | salary | enroll_date --------------+------------+--------+------------- - 5000 | 5200 | 5000 | 10-01-2006 - 6000 | 5200 | 6000 | 10-01-2006 - 5000 | 3500 | 3900 | 12-23-2006 - 5000 | 4200 | 4800 | 08-01-2007 - 5000 | 4200 | 5200 | 08-01-2007 - 5000 | 4200 | 4800 | 08-08-2007 - 5000 | 4200 | 5200 | 08-15-2007 - 5000 | 4200 | 3500 | 12-10-2007 - 5000 | 4500 | 4500 | 01-01-2008 - 5000 | 4200 | 4200 | 01-01-2008 -(10 rows) - -select first_value(salary) over(order by enroll_date range between unbounded preceding and '1 year'::interval following - exclude group), - last_value(salary) over(order by enroll_date range between unbounded preceding and '1 year'::interval following - exclude group), - salary, enroll_date from empsalary; - first_value | last_value | salary | enroll_date --------------+------------+--------+------------- - 3900 | 5200 | 5000 | 10-01-2006 - 3900 | 5200 | 6000 | 10-01-2006 - 5000 | 3500 | 3900 | 12-23-2006 - 5000 | 4200 | 4800 | 08-01-2007 - 5000 | 4200 | 5200 | 08-01-2007 - 5000 | 4200 | 4800 | 08-08-2007 - 5000 | 4200 | 5200 | 08-15-2007 - 5000 | 4200 | 3500 | 12-10-2007 - 5000 | 3500 | 4500 | 01-01-2008 - 5000 | 3500 | 4200 | 01-01-2008 -(10 rows) - -select first_value(salary) over(order by enroll_date range between unbounded preceding and '1 year'::interval following - exclude current row), - last_value(salary) over(order by enroll_date range between unbounded preceding and '1 year'::interval following - exclude current row), - salary, enroll_date from empsalary; - first_value | last_value | salary | enroll_date --------------+------------+--------+------------- - 6000 | 5200 | 5000 | 10-01-2006 - 5000 | 5200 | 6000 | 10-01-2006 - 5000 | 3500 | 3900 | 12-23-2006 - 5000 | 4200 | 4800 | 08-01-2007 - 5000 | 4200 | 5200 | 08-01-2007 - 5000 | 4200 | 4800 | 08-08-2007 - 5000 | 4200 | 5200 | 08-15-2007 - 5000 | 4200 | 3500 | 12-10-2007 - 5000 | 4200 | 4500 | 01-01-2008 - 5000 | 4500 | 4200 | 01-01-2008 -(10 rows) - --- RANGE offset PRECEDING/FOLLOWING with null values -select x, y, - first_value(y) over w, - last_value(y) over w -from - (select x, x as y from generate_series(1,5) as x - union all select null, 42 - union all select null, 43) ss -window w as - (order by x asc nulls first range between 2 preceding and 2 following); - x | y | first_value | last_value ----+----+-------------+------------ - | 42 | 42 | 43 - | 43 | 42 | 43 - 1 | 1 | 1 | 3 - 2 | 2 | 1 | 4 - 3 | 3 | 1 | 5 - 4 | 4 | 2 | 5 - 5 | 5 | 3 | 5 -(7 rows) - -select x, y, - first_value(y) over w, - last_value(y) over w -from - (select x, x as y from generate_series(1,5) as x - union all select null, 42 - union all select null, 43) ss -window w as - (order by x asc nulls last range between 2 preceding and 2 following); - x | y | first_value | last_value ----+----+-------------+------------ - 1 | 1 | 1 | 3 - 2 | 2 | 1 | 4 - 3 | 3 | 1 | 5 - 4 | 4 | 2 | 5 - 5 | 5 | 3 | 5 - | 42 | 42 | 43 - | 43 | 42 | 43 -(7 rows) - -select x, y, - first_value(y) over w, - last_value(y) over w -from - (select x, x as y from generate_series(1,5) as x - union all select null, 42 - union all select null, 43) ss -window w as - (order by x desc nulls first range between 2 preceding and 2 following); - x | y | first_value | last_value ----+----+-------------+------------ - | 43 | 43 | 42 - | 42 | 43 | 42 - 5 | 5 | 5 | 3 - 4 | 4 | 5 | 2 - 3 | 3 | 5 | 1 - 2 | 2 | 4 | 1 - 1 | 1 | 3 | 1 -(7 rows) - -select x, y, - first_value(y) over w, - last_value(y) over w -from - (select x, x as y from generate_series(1,5) as x - union all select null, 42 - union all select null, 43) ss -window w as - (order by x desc nulls last range between 2 preceding and 2 following); - x | y | first_value | last_value ----+----+-------------+------------ - 5 | 5 | 5 | 3 - 4 | 4 | 5 | 2 - 3 | 3 | 5 | 1 - 2 | 2 | 4 | 1 - 1 | 1 | 3 | 1 - | 42 | 42 | 43 - | 43 | 42 | 43 -(7 rows) - --- Check overflow behavior for various integer sizes -select x, last_value(x) over (order by x::smallint range between current row and 2147450884 following) -from generate_series(32764, 32766) x; - x | last_value --------+------------ - 32764 | 32766 - 32765 | 32766 - 32766 | 32766 -(3 rows) - -select x, last_value(x) over (order by x::smallint desc range between current row and 2147450885 following) -from generate_series(-32766, -32764) x; - x | last_value ---------+------------ - -32764 | -32766 - -32765 | -32766 - -32766 | -32766 -(3 rows) - -select x, last_value(x) over (order by x range between current row and 4 following) -from generate_series(2147483644, 2147483646) x; - x | last_value -------------+------------ - 2147483644 | 2147483646 - 2147483645 | 2147483646 - 2147483646 | 2147483646 -(3 rows) - -select x, last_value(x) over (order by x desc range between current row and 5 following) -from generate_series(-2147483646, -2147483644) x; - x | last_value --------------+------------- - -2147483644 | -2147483646 - -2147483645 | -2147483646 - -2147483646 | -2147483646 -(3 rows) - -select x, last_value(x) over (order by x range between current row and 4 following) -from generate_series(9223372036854775804, 9223372036854775806) x; - x | last_value ----------------------+--------------------- - 9223372036854775804 | 9223372036854775806 - 9223372036854775805 | 9223372036854775806 - 9223372036854775806 | 9223372036854775806 -(3 rows) - -select x, last_value(x) over (order by x desc range between current row and 5 following) -from generate_series(-9223372036854775806, -9223372036854775804) x; - x | last_value -----------------------+---------------------- - -9223372036854775804 | -9223372036854775806 - -9223372036854775805 | -9223372036854775806 - -9223372036854775806 | -9223372036854775806 -(3 rows) - --- Test in_range for other numeric datatypes -create temp table numerics( - id int, - f_float4 float4, - f_float8 float8, - f_numeric numeric -); -insert into numerics values -(0, '-infinity', '-infinity', '-infinity'), -(1, -3, -3, -3), -(2, -1, -1, -1), -(3, 0, 0, 0), -(4, 1.1, 1.1, 1.1), -(5, 1.12, 1.12, 1.12), -(6, 2, 2, 2), -(7, 100, 100, 100), -(8, 'infinity', 'infinity', 'infinity'), -(9, 'NaN', 'NaN', 'NaN'); -select id, f_float4, first_value(id) over w, last_value(id) over w -from numerics -window w as (order by f_float4 range between - 1 preceding and 1 following); - id | f_float4 | first_value | last_value -----+-----------+-------------+------------ - 0 | -Infinity | 0 | 0 - 1 | -3 | 1 | 1 - 2 | -1 | 2 | 3 - 3 | 0 | 2 | 3 - 4 | 1.1 | 4 | 6 - 5 | 1.12 | 4 | 6 - 6 | 2 | 4 | 6 - 7 | 100 | 7 | 7 - 8 | Infinity | 8 | 8 - 9 | NaN | 9 | 9 -(10 rows) - -select id, f_float4, first_value(id) over w, last_value(id) over w -from numerics -window w as (order by f_float4 range between - 1 preceding and 1.1::float4 following); - id | f_float4 | first_value | last_value -----+-----------+-------------+------------ - 0 | -Infinity | 0 | 0 - 1 | -3 | 1 | 1 - 2 | -1 | 2 | 3 - 3 | 0 | 2 | 4 - 4 | 1.1 | 4 | 6 - 5 | 1.12 | 4 | 6 - 6 | 2 | 4 | 6 - 7 | 100 | 7 | 7 - 8 | Infinity | 8 | 8 - 9 | NaN | 9 | 9 -(10 rows) - -select id, f_float4, first_value(id) over w, last_value(id) over w -from numerics -window w as (order by f_float4 range between - 'inf' preceding and 'inf' following); - id | f_float4 | first_value | last_value -----+-----------+-------------+------------ - 0 | -Infinity | 0 | 8 - 1 | -3 | 0 | 8 - 2 | -1 | 0 | 8 - 3 | 0 | 0 | 8 - 4 | 1.1 | 0 | 8 - 5 | 1.12 | 0 | 8 - 6 | 2 | 0 | 8 - 7 | 100 | 0 | 8 - 8 | Infinity | 0 | 8 - 9 | NaN | 9 | 9 -(10 rows) - -select id, f_float4, first_value(id) over w, last_value(id) over w -from numerics -window w as (order by f_float4 range between - 'inf' preceding and 'inf' preceding); - id | f_float4 | first_value | last_value -----+-----------+-------------+------------ - 0 | -Infinity | 0 | 0 - 1 | -3 | 0 | 0 - 2 | -1 | 0 | 0 - 3 | 0 | 0 | 0 - 4 | 1.1 | 0 | 0 - 5 | 1.12 | 0 | 0 - 6 | 2 | 0 | 0 - 7 | 100 | 0 | 0 - 8 | Infinity | 0 | 8 - 9 | NaN | 9 | 9 -(10 rows) - -select id, f_float4, first_value(id) over w, last_value(id) over w -from numerics -window w as (order by f_float4 range between - 'inf' following and 'inf' following); - id | f_float4 | first_value | last_value -----+-----------+-------------+------------ - 0 | -Infinity | 0 | 8 - 1 | -3 | 8 | 8 - 2 | -1 | 8 | 8 - 3 | 0 | 8 | 8 - 4 | 1.1 | 8 | 8 - 5 | 1.12 | 8 | 8 - 6 | 2 | 8 | 8 - 7 | 100 | 8 | 8 - 8 | Infinity | 8 | 8 - 9 | NaN | 9 | 9 -(10 rows) - -select id, f_float4, first_value(id) over w, last_value(id) over w -from numerics -window w as (order by f_float4 range between - 1.1 preceding and 'NaN' following); -- error, NaN disallowed -ERROR: invalid preceding or following size in window function -select id, f_float8, first_value(id) over w, last_value(id) over w -from numerics -window w as (order by f_float8 range between - 1 preceding and 1 following); - id | f_float8 | first_value | last_value -----+-----------+-------------+------------ - 0 | -Infinity | 0 | 0 - 1 | -3 | 1 | 1 - 2 | -1 | 2 | 3 - 3 | 0 | 2 | 3 - 4 | 1.1 | 4 | 6 - 5 | 1.12 | 4 | 6 - 6 | 2 | 4 | 6 - 7 | 100 | 7 | 7 - 8 | Infinity | 8 | 8 - 9 | NaN | 9 | 9 -(10 rows) - -select id, f_float8, first_value(id) over w, last_value(id) over w -from numerics -window w as (order by f_float8 range between - 1 preceding and 1.1::float8 following); - id | f_float8 | first_value | last_value -----+-----------+-------------+------------ - 0 | -Infinity | 0 | 0 - 1 | -3 | 1 | 1 - 2 | -1 | 2 | 3 - 3 | 0 | 2 | 4 - 4 | 1.1 | 4 | 6 - 5 | 1.12 | 4 | 6 - 6 | 2 | 4 | 6 - 7 | 100 | 7 | 7 - 8 | Infinity | 8 | 8 - 9 | NaN | 9 | 9 -(10 rows) - -select id, f_float8, first_value(id) over w, last_value(id) over w -from numerics -window w as (order by f_float8 range between - 'inf' preceding and 'inf' following); - id | f_float8 | first_value | last_value -----+-----------+-------------+------------ - 0 | -Infinity | 0 | 8 - 1 | -3 | 0 | 8 - 2 | -1 | 0 | 8 - 3 | 0 | 0 | 8 - 4 | 1.1 | 0 | 8 - 5 | 1.12 | 0 | 8 - 6 | 2 | 0 | 8 - 7 | 100 | 0 | 8 - 8 | Infinity | 0 | 8 - 9 | NaN | 9 | 9 -(10 rows) - -select id, f_float8, first_value(id) over w, last_value(id) over w -from numerics -window w as (order by f_float8 range between - 'inf' preceding and 'inf' preceding); - id | f_float8 | first_value | last_value -----+-----------+-------------+------------ - 0 | -Infinity | 0 | 0 - 1 | -3 | 0 | 0 - 2 | -1 | 0 | 0 - 3 | 0 | 0 | 0 - 4 | 1.1 | 0 | 0 - 5 | 1.12 | 0 | 0 - 6 | 2 | 0 | 0 - 7 | 100 | 0 | 0 - 8 | Infinity | 0 | 8 - 9 | NaN | 9 | 9 -(10 rows) - -select id, f_float8, first_value(id) over w, last_value(id) over w -from numerics -window w as (order by f_float8 range between - 'inf' following and 'inf' following); - id | f_float8 | first_value | last_value -----+-----------+-------------+------------ - 0 | -Infinity | 0 | 8 - 1 | -3 | 8 | 8 - 2 | -1 | 8 | 8 - 3 | 0 | 8 | 8 - 4 | 1.1 | 8 | 8 - 5 | 1.12 | 8 | 8 - 6 | 2 | 8 | 8 - 7 | 100 | 8 | 8 - 8 | Infinity | 8 | 8 - 9 | NaN | 9 | 9 -(10 rows) - -select id, f_float8, first_value(id) over w, last_value(id) over w -from numerics -window w as (order by f_float8 range between - 1.1 preceding and 'NaN' following); -- error, NaN disallowed -ERROR: invalid preceding or following size in window function -select id, f_numeric, first_value(id) over w, last_value(id) over w -from numerics -window w as (order by f_numeric range between - 1 preceding and 1 following); - id | f_numeric | first_value | last_value -----+-----------+-------------+------------ - 0 | -Infinity | 0 | 0 - 1 | -3 | 1 | 1 - 2 | -1 | 2 | 3 - 3 | 0 | 2 | 3 - 4 | 1.1 | 4 | 6 - 5 | 1.12 | 4 | 6 - 6 | 2 | 4 | 6 - 7 | 100 | 7 | 7 - 8 | Infinity | 8 | 8 - 9 | NaN | 9 | 9 -(10 rows) - -select id, f_numeric, first_value(id) over w, last_value(id) over w -from numerics -window w as (order by f_numeric range between - 1 preceding and 1.1::numeric following); - id | f_numeric | first_value | last_value -----+-----------+-------------+------------ - 0 | -Infinity | 0 | 0 - 1 | -3 | 1 | 1 - 2 | -1 | 2 | 3 - 3 | 0 | 2 | 4 - 4 | 1.1 | 4 | 6 - 5 | 1.12 | 4 | 6 - 6 | 2 | 4 | 6 - 7 | 100 | 7 | 7 - 8 | Infinity | 8 | 8 - 9 | NaN | 9 | 9 -(10 rows) - -select id, f_numeric, first_value(id) over w, last_value(id) over w -from numerics -window w as (order by f_numeric range between - 1 preceding and 1.1::float8 following); -- currently unsupported -ERROR: RANGE with offset PRECEDING/FOLLOWING is not supported for column type numeric and offset type double precision -LINE 4: 1 preceding and 1.1::float8 following); - ^ -HINT: Cast the offset value to an appropriate type. -select id, f_numeric, first_value(id) over w, last_value(id) over w -from numerics -window w as (order by f_numeric range between - 'inf' preceding and 'inf' following); - id | f_numeric | first_value | last_value -----+-----------+-------------+------------ - 0 | -Infinity | 0 | 8 - 1 | -3 | 0 | 8 - 2 | -1 | 0 | 8 - 3 | 0 | 0 | 8 - 4 | 1.1 | 0 | 8 - 5 | 1.12 | 0 | 8 - 6 | 2 | 0 | 8 - 7 | 100 | 0 | 8 - 8 | Infinity | 0 | 8 - 9 | NaN | 9 | 9 -(10 rows) - -select id, f_numeric, first_value(id) over w, last_value(id) over w -from numerics -window w as (order by f_numeric range between - 'inf' preceding and 'inf' preceding); - id | f_numeric | first_value | last_value -----+-----------+-------------+------------ - 0 | -Infinity | 0 | 0 - 1 | -3 | 0 | 0 - 2 | -1 | 0 | 0 - 3 | 0 | 0 | 0 - 4 | 1.1 | 0 | 0 - 5 | 1.12 | 0 | 0 - 6 | 2 | 0 | 0 - 7 | 100 | 0 | 0 - 8 | Infinity | 0 | 8 - 9 | NaN | 9 | 9 -(10 rows) - -select id, f_numeric, first_value(id) over w, last_value(id) over w -from numerics -window w as (order by f_numeric range between - 'inf' following and 'inf' following); - id | f_numeric | first_value | last_value -----+-----------+-------------+------------ - 0 | -Infinity | 0 | 8 - 1 | -3 | 8 | 8 - 2 | -1 | 8 | 8 - 3 | 0 | 8 | 8 - 4 | 1.1 | 8 | 8 - 5 | 1.12 | 8 | 8 - 6 | 2 | 8 | 8 - 7 | 100 | 8 | 8 - 8 | Infinity | 8 | 8 - 9 | NaN | 9 | 9 -(10 rows) - -select id, f_numeric, first_value(id) over w, last_value(id) over w -from numerics -window w as (order by f_numeric range between - 1.1 preceding and 'NaN' following); -- error, NaN disallowed -ERROR: invalid preceding or following size in window function --- Test in_range for other datetime datatypes -create temp table datetimes( - id int, - f_time time, - f_timetz timetz, - f_interval interval, - f_timestamptz timestamptz, - f_timestamp timestamp -); -insert into datetimes values -(1, '11:00', '11:00 BST', '1 year', '2000-10-19 10:23:54+01', '2000-10-19 10:23:54'), -(2, '12:00', '12:00 BST', '2 years', '2001-10-19 10:23:54+01', '2001-10-19 10:23:54'), -(3, '13:00', '13:00 BST', '3 years', '2001-10-19 10:23:54+01', '2001-10-19 10:23:54'), -(4, '14:00', '14:00 BST', '4 years', '2002-10-19 10:23:54+01', '2002-10-19 10:23:54'), -(5, '15:00', '15:00 BST', '5 years', '2003-10-19 10:23:54+01', '2003-10-19 10:23:54'), -(6, '15:00', '15:00 BST', '5 years', '2004-10-19 10:23:54+01', '2004-10-19 10:23:54'), -(7, '17:00', '17:00 BST', '7 years', '2005-10-19 10:23:54+01', '2005-10-19 10:23:54'), -(8, '18:00', '18:00 BST', '8 years', '2006-10-19 10:23:54+01', '2006-10-19 10:23:54'), -(9, '19:00', '19:00 BST', '9 years', '2007-10-19 10:23:54+01', '2007-10-19 10:23:54'), -(10, '20:00', '20:00 BST', '10 years', '2008-10-19 10:23:54+01', '2008-10-19 10:23:54'); -select id, f_time, first_value(id) over w, last_value(id) over w -from datetimes -window w as (order by f_time range between - '70 min'::interval preceding and '2 hours'::interval following); - id | f_time | first_value | last_value -----+----------+-------------+------------ - 1 | 11:00:00 | 1 | 3 - 2 | 12:00:00 | 1 | 4 - 3 | 13:00:00 | 2 | 6 - 4 | 14:00:00 | 3 | 6 - 5 | 15:00:00 | 4 | 7 - 6 | 15:00:00 | 4 | 7 - 7 | 17:00:00 | 7 | 9 - 8 | 18:00:00 | 7 | 10 - 9 | 19:00:00 | 8 | 10 - 10 | 20:00:00 | 9 | 10 -(10 rows) - -select id, f_time, first_value(id) over w, last_value(id) over w -from datetimes -window w as (order by f_time desc range between - '70 min' preceding and '2 hours' following); - id | f_time | first_value | last_value -----+----------+-------------+------------ - 10 | 20:00:00 | 10 | 8 - 9 | 19:00:00 | 10 | 7 - 8 | 18:00:00 | 9 | 7 - 7 | 17:00:00 | 8 | 5 - 6 | 15:00:00 | 6 | 3 - 5 | 15:00:00 | 6 | 3 - 4 | 14:00:00 | 6 | 2 - 3 | 13:00:00 | 4 | 1 - 2 | 12:00:00 | 3 | 1 - 1 | 11:00:00 | 2 | 1 -(10 rows) - -select id, f_timetz, first_value(id) over w, last_value(id) over w -from datetimes -window w as (order by f_timetz range between - '70 min'::interval preceding and '2 hours'::interval following); - id | f_timetz | first_value | last_value -----+-------------+-------------+------------ - 1 | 11:00:00+01 | 1 | 3 - 2 | 12:00:00+01 | 1 | 4 - 3 | 13:00:00+01 | 2 | 6 - 4 | 14:00:00+01 | 3 | 6 - 5 | 15:00:00+01 | 4 | 7 - 6 | 15:00:00+01 | 4 | 7 - 7 | 17:00:00+01 | 7 | 9 - 8 | 18:00:00+01 | 7 | 10 - 9 | 19:00:00+01 | 8 | 10 - 10 | 20:00:00+01 | 9 | 10 -(10 rows) - -select id, f_timetz, first_value(id) over w, last_value(id) over w -from datetimes -window w as (order by f_timetz desc range between - '70 min' preceding and '2 hours' following); - id | f_timetz | first_value | last_value -----+-------------+-------------+------------ - 10 | 20:00:00+01 | 10 | 8 - 9 | 19:00:00+01 | 10 | 7 - 8 | 18:00:00+01 | 9 | 7 - 7 | 17:00:00+01 | 8 | 5 - 6 | 15:00:00+01 | 6 | 3 - 5 | 15:00:00+01 | 6 | 3 - 4 | 14:00:00+01 | 6 | 2 - 3 | 13:00:00+01 | 4 | 1 - 2 | 12:00:00+01 | 3 | 1 - 1 | 11:00:00+01 | 2 | 1 -(10 rows) - -select id, f_interval, first_value(id) over w, last_value(id) over w -from datetimes -window w as (order by f_interval range between - '1 year'::interval preceding and '1 year'::interval following); - id | f_interval | first_value | last_value -----+------------+-------------+------------ - 1 | @ 1 year | 1 | 2 - 2 | @ 2 years | 1 | 3 - 3 | @ 3 years | 2 | 4 - 4 | @ 4 years | 3 | 6 - 5 | @ 5 years | 4 | 6 - 6 | @ 5 years | 4 | 6 - 7 | @ 7 years | 7 | 8 - 8 | @ 8 years | 7 | 9 - 9 | @ 9 years | 8 | 10 - 10 | @ 10 years | 9 | 10 -(10 rows) - -select id, f_interval, first_value(id) over w, last_value(id) over w -from datetimes -window w as (order by f_interval desc range between - '1 year' preceding and '1 year' following); - id | f_interval | first_value | last_value -----+------------+-------------+------------ - 10 | @ 10 years | 10 | 9 - 9 | @ 9 years | 10 | 8 - 8 | @ 8 years | 9 | 7 - 7 | @ 7 years | 8 | 7 - 6 | @ 5 years | 6 | 4 - 5 | @ 5 years | 6 | 4 - 4 | @ 4 years | 6 | 3 - 3 | @ 3 years | 4 | 2 - 2 | @ 2 years | 3 | 1 - 1 | @ 1 year | 2 | 1 -(10 rows) - -select id, f_timestamptz, first_value(id) over w, last_value(id) over w -from datetimes -window w as (order by f_timestamptz range between - '1 year'::interval preceding and '1 year'::interval following); - id | f_timestamptz | first_value | last_value -----+------------------------------+-------------+------------ - 1 | Thu Oct 19 02:23:54 2000 PDT | 1 | 3 - 2 | Fri Oct 19 02:23:54 2001 PDT | 1 | 4 - 3 | Fri Oct 19 02:23:54 2001 PDT | 1 | 4 - 4 | Sat Oct 19 02:23:54 2002 PDT | 2 | 5 - 5 | Sun Oct 19 02:23:54 2003 PDT | 4 | 6 - 6 | Tue Oct 19 02:23:54 2004 PDT | 5 | 7 - 7 | Wed Oct 19 02:23:54 2005 PDT | 6 | 8 - 8 | Thu Oct 19 02:23:54 2006 PDT | 7 | 9 - 9 | Fri Oct 19 02:23:54 2007 PDT | 8 | 10 - 10 | Sun Oct 19 02:23:54 2008 PDT | 9 | 10 -(10 rows) - -select id, f_timestamptz, first_value(id) over w, last_value(id) over w -from datetimes -window w as (order by f_timestamptz desc range between - '1 year' preceding and '1 year' following); - id | f_timestamptz | first_value | last_value -----+------------------------------+-------------+------------ - 10 | Sun Oct 19 02:23:54 2008 PDT | 10 | 9 - 9 | Fri Oct 19 02:23:54 2007 PDT | 10 | 8 - 8 | Thu Oct 19 02:23:54 2006 PDT | 9 | 7 - 7 | Wed Oct 19 02:23:54 2005 PDT | 8 | 6 - 6 | Tue Oct 19 02:23:54 2004 PDT | 7 | 5 - 5 | Sun Oct 19 02:23:54 2003 PDT | 6 | 4 - 4 | Sat Oct 19 02:23:54 2002 PDT | 5 | 2 - 3 | Fri Oct 19 02:23:54 2001 PDT | 4 | 1 - 2 | Fri Oct 19 02:23:54 2001 PDT | 4 | 1 - 1 | Thu Oct 19 02:23:54 2000 PDT | 3 | 1 -(10 rows) - -select id, f_timestamp, first_value(id) over w, last_value(id) over w -from datetimes -window w as (order by f_timestamp range between - '1 year'::interval preceding and '1 year'::interval following); - id | f_timestamp | first_value | last_value -----+--------------------------+-------------+------------ - 1 | Thu Oct 19 10:23:54 2000 | 1 | 3 - 2 | Fri Oct 19 10:23:54 2001 | 1 | 4 - 3 | Fri Oct 19 10:23:54 2001 | 1 | 4 - 4 | Sat Oct 19 10:23:54 2002 | 2 | 5 - 5 | Sun Oct 19 10:23:54 2003 | 4 | 6 - 6 | Tue Oct 19 10:23:54 2004 | 5 | 7 - 7 | Wed Oct 19 10:23:54 2005 | 6 | 8 - 8 | Thu Oct 19 10:23:54 2006 | 7 | 9 - 9 | Fri Oct 19 10:23:54 2007 | 8 | 10 - 10 | Sun Oct 19 10:23:54 2008 | 9 | 10 -(10 rows) - -select id, f_timestamp, first_value(id) over w, last_value(id) over w -from datetimes -window w as (order by f_timestamp desc range between - '1 year' preceding and '1 year' following); - id | f_timestamp | first_value | last_value -----+--------------------------+-------------+------------ - 10 | Sun Oct 19 10:23:54 2008 | 10 | 9 - 9 | Fri Oct 19 10:23:54 2007 | 10 | 8 - 8 | Thu Oct 19 10:23:54 2006 | 9 | 7 - 7 | Wed Oct 19 10:23:54 2005 | 8 | 6 - 6 | Tue Oct 19 10:23:54 2004 | 7 | 5 - 5 | Sun Oct 19 10:23:54 2003 | 6 | 4 - 4 | Sat Oct 19 10:23:54 2002 | 5 | 2 - 3 | Fri Oct 19 10:23:54 2001 | 4 | 1 - 2 | Fri Oct 19 10:23:54 2001 | 4 | 1 - 1 | Thu Oct 19 10:23:54 2000 | 3 | 1 -(10 rows) - --- RANGE offset PRECEDING/FOLLOWING error cases -select sum(salary) over (order by enroll_date, salary range between '1 year'::interval preceding and '2 years'::interval following - exclude ties), salary, enroll_date from empsalary; -ERROR: RANGE with offset PRECEDING/FOLLOWING requires exactly one ORDER BY column -LINE 1: select sum(salary) over (order by enroll_date, salary range ... - ^ -select sum(salary) over (range between '1 year'::interval preceding and '2 years'::interval following - exclude ties), salary, enroll_date from empsalary; -ERROR: RANGE with offset PRECEDING/FOLLOWING requires exactly one ORDER BY column -LINE 1: select sum(salary) over (range between '1 year'::interval pr... - ^ -select sum(salary) over (order by depname range between '1 year'::interval preceding and '2 years'::interval following - exclude ties), salary, enroll_date from empsalary; -ERROR: RANGE with offset PRECEDING/FOLLOWING is not supported for column type text -LINE 1: ... sum(salary) over (order by depname range between '1 year'::... - ^ -select max(enroll_date) over (order by enroll_date range between 1 preceding and 2 following - exclude ties), salary, enroll_date from empsalary; -ERROR: RANGE with offset PRECEDING/FOLLOWING is not supported for column type date and offset type integer -LINE 1: ...ll_date) over (order by enroll_date range between 1 precedin... - ^ -HINT: Cast the offset value to an appropriate type. -select max(enroll_date) over (order by salary range between -1 preceding and 2 following - exclude ties), salary, enroll_date from empsalary; -ERROR: invalid preceding or following size in window function -select max(enroll_date) over (order by salary range between 1 preceding and -2 following - exclude ties), salary, enroll_date from empsalary; -ERROR: invalid preceding or following size in window function -select max(enroll_date) over (order by salary range between '1 year'::interval preceding and '2 years'::interval following - exclude ties), salary, enroll_date from empsalary; -ERROR: RANGE with offset PRECEDING/FOLLOWING is not supported for column type integer and offset type interval -LINE 1: ...(enroll_date) over (order by salary range between '1 year'::... - ^ -HINT: Cast the offset value to an appropriate type. -select max(enroll_date) over (order by enroll_date range between '1 year'::interval preceding and '-2 years'::interval following - exclude ties), salary, enroll_date from empsalary; -ERROR: invalid preceding or following size in window function --- GROUPS tests -SELECT sum(unique1) over (order by four groups between unbounded preceding and current row), - unique1, four -FROM tenk1 WHERE unique1 < 10; - sum | unique1 | four ------+---------+------ - 12 | 0 | 0 - 12 | 8 | 0 - 12 | 4 | 0 - 27 | 5 | 1 - 27 | 9 | 1 - 27 | 1 | 1 - 35 | 6 | 2 - 35 | 2 | 2 - 45 | 3 | 3 - 45 | 7 | 3 -(10 rows) - -SELECT sum(unique1) over (order by four groups between unbounded preceding and unbounded following), - unique1, four -FROM tenk1 WHERE unique1 < 10; - sum | unique1 | four ------+---------+------ - 45 | 0 | 0 - 45 | 8 | 0 - 45 | 4 | 0 - 45 | 5 | 1 - 45 | 9 | 1 - 45 | 1 | 1 - 45 | 6 | 2 - 45 | 2 | 2 - 45 | 3 | 3 - 45 | 7 | 3 -(10 rows) - -SELECT sum(unique1) over (order by four groups between current row and unbounded following), - unique1, four -FROM tenk1 WHERE unique1 < 10; - sum | unique1 | four ------+---------+------ - 45 | 0 | 0 - 45 | 8 | 0 - 45 | 4 | 0 - 33 | 5 | 1 - 33 | 9 | 1 - 33 | 1 | 1 - 18 | 6 | 2 - 18 | 2 | 2 - 10 | 3 | 3 - 10 | 7 | 3 -(10 rows) - -SELECT sum(unique1) over (order by four groups between 1 preceding and unbounded following), - unique1, four -FROM tenk1 WHERE unique1 < 10; - sum | unique1 | four ------+---------+------ - 45 | 0 | 0 - 45 | 8 | 0 - 45 | 4 | 0 - 45 | 5 | 1 - 45 | 9 | 1 - 45 | 1 | 1 - 33 | 6 | 2 - 33 | 2 | 2 - 18 | 3 | 3 - 18 | 7 | 3 -(10 rows) - -SELECT sum(unique1) over (order by four groups between 1 following and unbounded following), - unique1, four -FROM tenk1 WHERE unique1 < 10; - sum | unique1 | four ------+---------+------ - 33 | 0 | 0 - 33 | 8 | 0 - 33 | 4 | 0 - 18 | 5 | 1 - 18 | 9 | 1 - 18 | 1 | 1 - 10 | 6 | 2 - 10 | 2 | 2 - | 3 | 3 - | 7 | 3 -(10 rows) - -SELECT sum(unique1) over (order by four groups between unbounded preceding and 2 following), - unique1, four -FROM tenk1 WHERE unique1 < 10; - sum | unique1 | four ------+---------+------ - 35 | 0 | 0 - 35 | 8 | 0 - 35 | 4 | 0 - 45 | 5 | 1 - 45 | 9 | 1 - 45 | 1 | 1 - 45 | 6 | 2 - 45 | 2 | 2 - 45 | 3 | 3 - 45 | 7 | 3 -(10 rows) - -SELECT sum(unique1) over (order by four groups between 2 preceding and 1 preceding), - unique1, four -FROM tenk1 WHERE unique1 < 10; - sum | unique1 | four ------+---------+------ - | 0 | 0 - | 8 | 0 - | 4 | 0 - 12 | 5 | 1 - 12 | 9 | 1 - 12 | 1 | 1 - 27 | 6 | 2 - 27 | 2 | 2 - 23 | 3 | 3 - 23 | 7 | 3 -(10 rows) - -SELECT sum(unique1) over (order by four groups between 2 preceding and 1 following), - unique1, four -FROM tenk1 WHERE unique1 < 10; - sum | unique1 | four ------+---------+------ - 27 | 0 | 0 - 27 | 8 | 0 - 27 | 4 | 0 - 35 | 5 | 1 - 35 | 9 | 1 - 35 | 1 | 1 - 45 | 6 | 2 - 45 | 2 | 2 - 33 | 3 | 3 - 33 | 7 | 3 -(10 rows) - -SELECT sum(unique1) over (order by four groups between 0 preceding and 0 following), - unique1, four -FROM tenk1 WHERE unique1 < 10; - sum | unique1 | four ------+---------+------ - 12 | 0 | 0 - 12 | 8 | 0 - 12 | 4 | 0 - 15 | 5 | 1 - 15 | 9 | 1 - 15 | 1 | 1 - 8 | 6 | 2 - 8 | 2 | 2 - 10 | 3 | 3 - 10 | 7 | 3 -(10 rows) - -SELECT sum(unique1) over (order by four groups between 2 preceding and 1 following - exclude current row), unique1, four -FROM tenk1 WHERE unique1 < 10; - sum | unique1 | four ------+---------+------ - 27 | 0 | 0 - 19 | 8 | 0 - 23 | 4 | 0 - 30 | 5 | 1 - 26 | 9 | 1 - 34 | 1 | 1 - 39 | 6 | 2 - 43 | 2 | 2 - 30 | 3 | 3 - 26 | 7 | 3 -(10 rows) - -SELECT sum(unique1) over (order by four groups between 2 preceding and 1 following - exclude group), unique1, four -FROM tenk1 WHERE unique1 < 10; - sum | unique1 | four ------+---------+------ - 15 | 0 | 0 - 15 | 8 | 0 - 15 | 4 | 0 - 20 | 5 | 1 - 20 | 9 | 1 - 20 | 1 | 1 - 37 | 6 | 2 - 37 | 2 | 2 - 23 | 3 | 3 - 23 | 7 | 3 -(10 rows) - -SELECT sum(unique1) over (order by four groups between 2 preceding and 1 following - exclude ties), unique1, four -FROM tenk1 WHERE unique1 < 10; - sum | unique1 | four ------+---------+------ - 15 | 0 | 0 - 23 | 8 | 0 - 19 | 4 | 0 - 25 | 5 | 1 - 29 | 9 | 1 - 21 | 1 | 1 - 43 | 6 | 2 - 39 | 2 | 2 - 26 | 3 | 3 - 30 | 7 | 3 -(10 rows) - -SELECT sum(unique1) over (partition by ten - order by four groups between 0 preceding and 0 following),unique1, four, ten -FROM tenk1 WHERE unique1 < 10; - sum | unique1 | four | ten ------+---------+------+----- - 0 | 0 | 0 | 0 - 1 | 1 | 1 | 1 - 2 | 2 | 2 | 2 - 3 | 3 | 3 | 3 - 4 | 4 | 0 | 4 - 5 | 5 | 1 | 5 - 6 | 6 | 2 | 6 - 7 | 7 | 3 | 7 - 8 | 8 | 0 | 8 - 9 | 9 | 1 | 9 -(10 rows) - -SELECT sum(unique1) over (partition by ten - order by four groups between 0 preceding and 0 following exclude current row), unique1, four, ten -FROM tenk1 WHERE unique1 < 10; - sum | unique1 | four | ten ------+---------+------+----- - | 0 | 0 | 0 - | 1 | 1 | 1 - | 2 | 2 | 2 - | 3 | 3 | 3 - | 4 | 0 | 4 - | 5 | 1 | 5 - | 6 | 2 | 6 - | 7 | 3 | 7 - | 8 | 0 | 8 - | 9 | 1 | 9 -(10 rows) - -SELECT sum(unique1) over (partition by ten - order by four groups between 0 preceding and 0 following exclude group), unique1, four, ten -FROM tenk1 WHERE unique1 < 10; - sum | unique1 | four | ten ------+---------+------+----- - | 0 | 0 | 0 - | 1 | 1 | 1 - | 2 | 2 | 2 - | 3 | 3 | 3 - | 4 | 0 | 4 - | 5 | 1 | 5 - | 6 | 2 | 6 - | 7 | 3 | 7 - | 8 | 0 | 8 - | 9 | 1 | 9 -(10 rows) - -SELECT sum(unique1) over (partition by ten - order by four groups between 0 preceding and 0 following exclude ties), unique1, four, ten -FROM tenk1 WHERE unique1 < 10; - sum | unique1 | four | ten ------+---------+------+----- - 0 | 0 | 0 | 0 - 1 | 1 | 1 | 1 - 2 | 2 | 2 | 2 - 3 | 3 | 3 | 3 - 4 | 4 | 0 | 4 - 5 | 5 | 1 | 5 - 6 | 6 | 2 | 6 - 7 | 7 | 3 | 7 - 8 | 8 | 0 | 8 - 9 | 9 | 1 | 9 -(10 rows) - -select first_value(salary) over(order by enroll_date groups between 1 preceding and 1 following), - lead(salary) over(order by enroll_date groups between 1 preceding and 1 following), - nth_value(salary, 1) over(order by enroll_date groups between 1 preceding and 1 following), - salary, enroll_date from empsalary; - first_value | lead | nth_value | salary | enroll_date --------------+------+-----------+--------+------------- - 5000 | 6000 | 5000 | 5000 | 10-01-2006 - 5000 | 3900 | 5000 | 6000 | 10-01-2006 - 5000 | 4800 | 5000 | 3900 | 12-23-2006 - 3900 | 5200 | 3900 | 4800 | 08-01-2007 - 3900 | 4800 | 3900 | 5200 | 08-01-2007 - 4800 | 5200 | 4800 | 4800 | 08-08-2007 - 4800 | 3500 | 4800 | 5200 | 08-15-2007 - 5200 | 4500 | 5200 | 3500 | 12-10-2007 - 3500 | 4200 | 3500 | 4500 | 01-01-2008 - 3500 | | 3500 | 4200 | 01-01-2008 -(10 rows) - -select last_value(salary) over(order by enroll_date groups between 1 preceding and 1 following), - lag(salary) over(order by enroll_date groups between 1 preceding and 1 following), - salary, enroll_date from empsalary; - last_value | lag | salary | enroll_date -------------+------+--------+------------- - 3900 | | 5000 | 10-01-2006 - 3900 | 5000 | 6000 | 10-01-2006 - 5200 | 6000 | 3900 | 12-23-2006 - 4800 | 3900 | 4800 | 08-01-2007 - 4800 | 4800 | 5200 | 08-01-2007 - 5200 | 5200 | 4800 | 08-08-2007 - 3500 | 4800 | 5200 | 08-15-2007 - 4200 | 5200 | 3500 | 12-10-2007 - 4200 | 3500 | 4500 | 01-01-2008 - 4200 | 4500 | 4200 | 01-01-2008 -(10 rows) - -select first_value(salary) over(order by enroll_date groups between 1 following and 3 following - exclude current row), - lead(salary) over(order by enroll_date groups between 1 following and 3 following exclude ties), - nth_value(salary, 1) over(order by enroll_date groups between 1 following and 3 following - exclude ties), - salary, enroll_date from empsalary; - first_value | lead | nth_value | salary | enroll_date --------------+------+-----------+--------+------------- - 3900 | 6000 | 3900 | 5000 | 10-01-2006 - 3900 | 3900 | 3900 | 6000 | 10-01-2006 - 4800 | 4800 | 4800 | 3900 | 12-23-2006 - 4800 | 5200 | 4800 | 4800 | 08-01-2007 - 4800 | 4800 | 4800 | 5200 | 08-01-2007 - 5200 | 5200 | 5200 | 4800 | 08-08-2007 - 3500 | 3500 | 3500 | 5200 | 08-15-2007 - 4500 | 4500 | 4500 | 3500 | 12-10-2007 - | 4200 | | 4500 | 01-01-2008 - | | | 4200 | 01-01-2008 -(10 rows) - -select last_value(salary) over(order by enroll_date groups between 1 following and 3 following - exclude group), - lag(salary) over(order by enroll_date groups between 1 following and 3 following exclude group), - salary, enroll_date from empsalary; - last_value | lag | salary | enroll_date -------------+------+--------+------------- - 4800 | | 5000 | 10-01-2006 - 4800 | 5000 | 6000 | 10-01-2006 - 5200 | 6000 | 3900 | 12-23-2006 - 3500 | 3900 | 4800 | 08-01-2007 - 3500 | 4800 | 5200 | 08-01-2007 - 4200 | 5200 | 4800 | 08-08-2007 - 4200 | 4800 | 5200 | 08-15-2007 - 4200 | 5200 | 3500 | 12-10-2007 - | 3500 | 4500 | 01-01-2008 - | 4500 | 4200 | 01-01-2008 -(10 rows) - --- Show differences in offset interpretation between ROWS, RANGE, and GROUPS -WITH cte (x) AS ( - SELECT * FROM generate_series(1, 35, 2) -) -SELECT x, (sum(x) over w) -FROM cte -WINDOW w AS (ORDER BY x rows between 1 preceding and 1 following); - x | sum -----+----- - 1 | 4 - 3 | 9 - 5 | 15 - 7 | 21 - 9 | 27 - 11 | 33 - 13 | 39 - 15 | 45 - 17 | 51 - 19 | 57 - 21 | 63 - 23 | 69 - 25 | 75 - 27 | 81 - 29 | 87 - 31 | 93 - 33 | 99 - 35 | 68 -(18 rows) - -WITH cte (x) AS ( - SELECT * FROM generate_series(1, 35, 2) -) -SELECT x, (sum(x) over w) -FROM cte -WINDOW w AS (ORDER BY x range between 1 preceding and 1 following); - x | sum -----+----- - 1 | 1 - 3 | 3 - 5 | 5 - 7 | 7 - 9 | 9 - 11 | 11 - 13 | 13 - 15 | 15 - 17 | 17 - 19 | 19 - 21 | 21 - 23 | 23 - 25 | 25 - 27 | 27 - 29 | 29 - 31 | 31 - 33 | 33 - 35 | 35 -(18 rows) - -WITH cte (x) AS ( - SELECT * FROM generate_series(1, 35, 2) -) -SELECT x, (sum(x) over w) -FROM cte -WINDOW w AS (ORDER BY x groups between 1 preceding and 1 following); - x | sum -----+----- - 1 | 4 - 3 | 9 - 5 | 15 - 7 | 21 - 9 | 27 - 11 | 33 - 13 | 39 - 15 | 45 - 17 | 51 - 19 | 57 - 21 | 63 - 23 | 69 - 25 | 75 - 27 | 81 - 29 | 87 - 31 | 93 - 33 | 99 - 35 | 68 -(18 rows) - -WITH cte (x) AS ( - select 1 union all select 1 union all select 1 union all - SELECT * FROM generate_series(5, 49, 2) -) -SELECT x, (sum(x) over w) -FROM cte -WINDOW w AS (ORDER BY x rows between 1 preceding and 1 following); - x | sum -----+----- - 1 | 2 - 1 | 3 - 1 | 7 - 5 | 13 - 7 | 21 - 9 | 27 - 11 | 33 - 13 | 39 - 15 | 45 - 17 | 51 - 19 | 57 - 21 | 63 - 23 | 69 - 25 | 75 - 27 | 81 - 29 | 87 - 31 | 93 - 33 | 99 - 35 | 105 - 37 | 111 - 39 | 117 - 41 | 123 - 43 | 129 - 45 | 135 - 47 | 141 - 49 | 96 -(26 rows) - -WITH cte (x) AS ( - select 1 union all select 1 union all select 1 union all - SELECT * FROM generate_series(5, 49, 2) -) -SELECT x, (sum(x) over w) -FROM cte -WINDOW w AS (ORDER BY x range between 1 preceding and 1 following); - x | sum -----+----- - 1 | 3 - 1 | 3 - 1 | 3 - 5 | 5 - 7 | 7 - 9 | 9 - 11 | 11 - 13 | 13 - 15 | 15 - 17 | 17 - 19 | 19 - 21 | 21 - 23 | 23 - 25 | 25 - 27 | 27 - 29 | 29 - 31 | 31 - 33 | 33 - 35 | 35 - 37 | 37 - 39 | 39 - 41 | 41 - 43 | 43 - 45 | 45 - 47 | 47 - 49 | 49 -(26 rows) - -WITH cte (x) AS ( - select 1 union all select 1 union all select 1 union all - SELECT * FROM generate_series(5, 49, 2) -) -SELECT x, (sum(x) over w) -FROM cte -WINDOW w AS (ORDER BY x groups between 1 preceding and 1 following); - x | sum -----+----- - 1 | 8 - 1 | 8 - 1 | 8 - 5 | 15 - 7 | 21 - 9 | 27 - 11 | 33 - 13 | 39 - 15 | 45 - 17 | 51 - 19 | 57 - 21 | 63 - 23 | 69 - 25 | 75 - 27 | 81 - 29 | 87 - 31 | 93 - 33 | 99 - 35 | 105 - 37 | 111 - 39 | 117 - 41 | 123 - 43 | 129 - 45 | 135 - 47 | 141 - 49 | 96 -(26 rows) - --- with UNION -SELECT count(*) OVER (PARTITION BY four) FROM (SELECT * FROM tenk1 UNION ALL SELECT * FROM tenk2)s LIMIT 0; - count -------- -(0 rows) - --- check some degenerate cases -create temp table t1 (f1 int, f2 int8); -insert into t1 values (1,1),(1,2),(2,2); -select f1, sum(f1) over (partition by f1 - range between 1 preceding and 1 following) -from t1 where f1 = f2; -- error, must have order by -ERROR: RANGE with offset PRECEDING/FOLLOWING requires exactly one ORDER BY column -LINE 1: select f1, sum(f1) over (partition by f1 - ^ -explain (costs off) -select f1, sum(f1) over (partition by f1 order by f2 - range between 1 preceding and 1 following) -from t1 where f1 = f2; - QUERY PLAN ---------------------------------- - WindowAgg - -> Sort - Sort Key: f1 - -> Seq Scan on t1 - Filter: (f1 = f2) -(5 rows) - -select f1, sum(f1) over (partition by f1 order by f2 - range between 1 preceding and 1 following) -from t1 where f1 = f2; - f1 | sum -----+----- - 1 | 1 - 2 | 2 -(2 rows) - -select f1, sum(f1) over (partition by f1, f1 order by f2 - range between 2 preceding and 1 preceding) -from t1 where f1 = f2; - f1 | sum -----+----- - 1 | - 2 | -(2 rows) - -select f1, sum(f1) over (partition by f1, f2 order by f2 - range between 1 following and 2 following) -from t1 where f1 = f2; - f1 | sum -----+----- - 1 | - 2 | -(2 rows) - -select f1, sum(f1) over (partition by f1 - groups between 1 preceding and 1 following) -from t1 where f1 = f2; -- error, must have order by -ERROR: GROUPS mode requires an ORDER BY clause -LINE 1: select f1, sum(f1) over (partition by f1 - ^ -explain (costs off) -select f1, sum(f1) over (partition by f1 order by f2 - groups between 1 preceding and 1 following) -from t1 where f1 = f2; - QUERY PLAN ---------------------------------- - WindowAgg - -> Sort - Sort Key: f1 - -> Seq Scan on t1 - Filter: (f1 = f2) -(5 rows) - -select f1, sum(f1) over (partition by f1 order by f2 - groups between 1 preceding and 1 following) -from t1 where f1 = f2; - f1 | sum -----+----- - 1 | 1 - 2 | 2 -(2 rows) - -select f1, sum(f1) over (partition by f1, f1 order by f2 - groups between 2 preceding and 1 preceding) -from t1 where f1 = f2; - f1 | sum -----+----- - 1 | - 2 | -(2 rows) - -select f1, sum(f1) over (partition by f1, f2 order by f2 - groups between 1 following and 2 following) -from t1 where f1 = f2; - f1 | sum -----+----- - 1 | - 2 | -(2 rows) - --- ordering by a non-integer constant is allowed -SELECT rank() OVER (ORDER BY length('abc')); - rank ------- - 1 -(1 row) - --- can't order by another window function -SELECT rank() OVER (ORDER BY rank() OVER (ORDER BY random())); -ERROR: window functions are not allowed in window definitions -LINE 1: SELECT rank() OVER (ORDER BY rank() OVER (ORDER BY random())... - ^ --- some other errors -SELECT * FROM empsalary WHERE row_number() OVER (ORDER BY salary) < 10; -ERROR: window functions are not allowed in WHERE -LINE 1: SELECT * FROM empsalary WHERE row_number() OVER (ORDER BY sa... - ^ -SELECT * FROM empsalary INNER JOIN tenk1 ON row_number() OVER (ORDER BY salary) < 10; -ERROR: window functions are not allowed in JOIN conditions -LINE 1: SELECT * FROM empsalary INNER JOIN tenk1 ON row_number() OVE... - ^ -SELECT rank() OVER (ORDER BY 1), count(*) FROM empsalary GROUP BY 1; -ERROR: window functions are not allowed in GROUP BY -LINE 1: SELECT rank() OVER (ORDER BY 1), count(*) FROM empsalary GRO... - ^ -SELECT * FROM rank() OVER (ORDER BY random()); -ERROR: syntax error at or near "ORDER" -LINE 1: SELECT * FROM rank() OVER (ORDER BY random()); - ^ -DELETE FROM empsalary WHERE (rank() OVER (ORDER BY random())) > 10; -ERROR: window functions are not allowed in WHERE -LINE 1: DELETE FROM empsalary WHERE (rank() OVER (ORDER BY random())... - ^ -DELETE FROM empsalary RETURNING rank() OVER (ORDER BY random()); -ERROR: window functions are not allowed in RETURNING -LINE 1: DELETE FROM empsalary RETURNING rank() OVER (ORDER BY random... - ^ -SELECT count(*) OVER w FROM tenk1 WINDOW w AS (ORDER BY unique1), w AS (ORDER BY unique1); -ERROR: window "w" is already defined -LINE 1: ...w FROM tenk1 WINDOW w AS (ORDER BY unique1), w AS (ORDER BY ... - ^ -SELECT rank() OVER (PARTITION BY four, ORDER BY ten) FROM tenk1; -ERROR: syntax error at or near "ORDER" -LINE 1: SELECT rank() OVER (PARTITION BY four, ORDER BY ten) FROM te... - ^ -SELECT count() OVER () FROM tenk1; -ERROR: count(*) must be used to call a parameterless aggregate function -LINE 1: SELECT count() OVER () FROM tenk1; - ^ -SELECT generate_series(1, 100) OVER () FROM empsalary; -ERROR: OVER specified, but generate_series is not a window function nor an aggregate function -LINE 1: SELECT generate_series(1, 100) OVER () FROM empsalary; - ^ -SELECT ntile(0) OVER (ORDER BY ten), ten, four FROM tenk1; -ERROR: argument of ntile must be greater than zero -SELECT nth_value(four, 0) OVER (ORDER BY ten), ten, four FROM tenk1; -ERROR: argument of nth_value must be greater than zero --- filter -SELECT sum(salary), row_number() OVER (ORDER BY depname), sum( - sum(salary) FILTER (WHERE enroll_date > '2007-01-01') -) FILTER (WHERE depname <> 'sales') OVER (ORDER BY depname DESC) AS "filtered_sum", - depname -FROM empsalary GROUP BY depname; - sum | row_number | filtered_sum | depname --------+------------+--------------+----------- - 25100 | 1 | 22600 | develop - 7400 | 2 | 3500 | personnel - 14600 | 3 | | sales -(3 rows) - --- Test pushdown of quals into a subquery containing window functions --- pushdown is safe because all PARTITION BY clauses include depname: -EXPLAIN (COSTS OFF) -SELECT * FROM - (SELECT depname, - sum(salary) OVER (PARTITION BY depname) depsalary, - min(salary) OVER (PARTITION BY depname || 'A', depname) depminsalary - FROM empsalary) emp -WHERE depname = 'sales'; - QUERY PLAN --------------------------------------------------------------------------- - Subquery Scan on emp - -> WindowAgg - -> WindowAgg - -> Sort - Sort Key: (((empsalary.depname)::text || 'A'::text)) - -> Seq Scan on empsalary - Filter: ((depname)::text = 'sales'::text) -(7 rows) - --- pushdown is unsafe because there's a PARTITION BY clause without depname: -EXPLAIN (COSTS OFF) -SELECT * FROM - (SELECT depname, - sum(salary) OVER (PARTITION BY enroll_date) enroll_salary, - min(salary) OVER (PARTITION BY depname) depminsalary - FROM empsalary) emp -WHERE depname = 'sales'; - QUERY PLAN -------------------------------------------------------- - Subquery Scan on emp - Filter: ((emp.depname)::text = 'sales'::text) - -> WindowAgg - -> Sort - Sort Key: empsalary.enroll_date - -> WindowAgg - -> Sort - Sort Key: empsalary.depname - -> Seq Scan on empsalary -(9 rows) - --- Test Sort node collapsing -EXPLAIN (COSTS OFF) -SELECT * FROM - (SELECT depname, - sum(salary) OVER (PARTITION BY depname order by empno) depsalary, - min(salary) OVER (PARTITION BY depname, empno order by enroll_date) depminsalary - FROM empsalary) emp -WHERE depname = 'sales'; - QUERY PLAN ----------------------------------------------------------------------- - Subquery Scan on emp - -> WindowAgg - -> WindowAgg - -> Sort - Sort Key: empsalary.empno, empsalary.enroll_date - -> Seq Scan on empsalary - Filter: ((depname)::text = 'sales'::text) -(7 rows) - --- Test Sort node reordering -EXPLAIN (COSTS OFF) -SELECT - lead(1) OVER (PARTITION BY depname ORDER BY salary, enroll_date), - lag(1) OVER (PARTITION BY depname ORDER BY salary,enroll_date,empno) -FROM empsalary; - QUERY PLAN -------------------------------------------------------------- - WindowAgg - -> WindowAgg - -> Sort - Sort Key: depname, salary, enroll_date, empno - -> Seq Scan on empsalary -(5 rows) - --- Test incremental sorting -EXPLAIN (COSTS OFF) -SELECT * FROM - (SELECT depname, - empno, - salary, - enroll_date, - row_number() OVER (PARTITION BY depname ORDER BY enroll_date) AS first_emp, - row_number() OVER (PARTITION BY depname ORDER BY enroll_date DESC) AS last_emp - FROM empsalary) emp -WHERE first_emp = 1 OR last_emp = 1; - QUERY PLAN ------------------------------------------------------------------------------------ - Subquery Scan on emp - Filter: ((emp.first_emp = 1) OR (emp.last_emp = 1)) - -> WindowAgg - -> Incremental Sort - Sort Key: empsalary.depname, empsalary.enroll_date - Presorted Key: empsalary.depname - -> WindowAgg - -> Sort - Sort Key: empsalary.depname, empsalary.enroll_date DESC - -> Seq Scan on empsalary -(10 rows) - -SELECT * FROM - (SELECT depname, - empno, - salary, - enroll_date, - row_number() OVER (PARTITION BY depname ORDER BY enroll_date) AS first_emp, - row_number() OVER (PARTITION BY depname ORDER BY enroll_date DESC) AS last_emp - FROM empsalary) emp -WHERE first_emp = 1 OR last_emp = 1; - depname | empno | salary | enroll_date | first_emp | last_emp ------------+-------+--------+-------------+-----------+---------- - develop | 8 | 6000 | 10-01-2006 | 1 | 5 - develop | 7 | 4200 | 01-01-2008 | 5 | 1 - personnel | 2 | 3900 | 12-23-2006 | 1 | 2 - personnel | 5 | 3500 | 12-10-2007 | 2 | 1 - sales | 1 | 5000 | 10-01-2006 | 1 | 3 - sales | 4 | 4800 | 08-08-2007 | 3 | 1 -(6 rows) - --- cleanup -DROP TABLE empsalary; --- test user-defined window function with named args and default args -CREATE FUNCTION nth_value_def(val anyelement, n integer = 1) RETURNS anyelement - LANGUAGE internal WINDOW IMMUTABLE STRICT AS 'window_nth_value'; -SELECT nth_value_def(n := 2, val := ten) OVER (PARTITION BY four), ten, four - FROM (SELECT * FROM tenk1 WHERE unique2 < 10 ORDER BY four, ten) s; - nth_value_def | ten | four ----------------+-----+------ - 0 | 0 | 0 - 0 | 0 | 0 - 0 | 4 | 0 - 1 | 1 | 1 - 1 | 1 | 1 - 1 | 7 | 1 - 1 | 9 | 1 - | 0 | 2 - 3 | 1 | 3 - 3 | 3 | 3 -(10 rows) - -SELECT nth_value_def(ten) OVER (PARTITION BY four), ten, four - FROM (SELECT * FROM tenk1 WHERE unique2 < 10 ORDER BY four, ten) s; - nth_value_def | ten | four ----------------+-----+------ - 0 | 0 | 0 - 0 | 0 | 0 - 0 | 4 | 0 - 1 | 1 | 1 - 1 | 1 | 1 - 1 | 7 | 1 - 1 | 9 | 1 - 0 | 0 | 2 - 1 | 1 | 3 - 1 | 3 | 3 -(10 rows) - --- --- Test the basic moving-aggregate machinery --- --- create aggregates that record the series of transform calls (these are --- intentionally not true inverses) -CREATE FUNCTION logging_sfunc_nonstrict(text, anyelement) RETURNS text AS -$$ SELECT COALESCE($1, '') || '*' || quote_nullable($2) $$ -LANGUAGE SQL IMMUTABLE; -CREATE FUNCTION logging_msfunc_nonstrict(text, anyelement) RETURNS text AS -$$ SELECT COALESCE($1, '') || '+' || quote_nullable($2) $$ -LANGUAGE SQL IMMUTABLE; -CREATE FUNCTION logging_minvfunc_nonstrict(text, anyelement) RETURNS text AS -$$ SELECT $1 || '-' || quote_nullable($2) $$ -LANGUAGE SQL IMMUTABLE; -CREATE AGGREGATE logging_agg_nonstrict (anyelement) -( - stype = text, - sfunc = logging_sfunc_nonstrict, - mstype = text, - msfunc = logging_msfunc_nonstrict, - minvfunc = logging_minvfunc_nonstrict -); -CREATE AGGREGATE logging_agg_nonstrict_initcond (anyelement) -( - stype = text, - sfunc = logging_sfunc_nonstrict, - mstype = text, - msfunc = logging_msfunc_nonstrict, - minvfunc = logging_minvfunc_nonstrict, - initcond = 'I', - minitcond = 'MI' -); -CREATE FUNCTION logging_sfunc_strict(text, anyelement) RETURNS text AS -$$ SELECT $1 || '*' || quote_nullable($2) $$ -LANGUAGE SQL STRICT IMMUTABLE; -CREATE FUNCTION logging_msfunc_strict(text, anyelement) RETURNS text AS -$$ SELECT $1 || '+' || quote_nullable($2) $$ -LANGUAGE SQL STRICT IMMUTABLE; -CREATE FUNCTION logging_minvfunc_strict(text, anyelement) RETURNS text AS -$$ SELECT $1 || '-' || quote_nullable($2) $$ -LANGUAGE SQL STRICT IMMUTABLE; -CREATE AGGREGATE logging_agg_strict (text) -( - stype = text, - sfunc = logging_sfunc_strict, - mstype = text, - msfunc = logging_msfunc_strict, - minvfunc = logging_minvfunc_strict -); -CREATE AGGREGATE logging_agg_strict_initcond (anyelement) -( - stype = text, - sfunc = logging_sfunc_strict, - mstype = text, - msfunc = logging_msfunc_strict, - minvfunc = logging_minvfunc_strict, - initcond = 'I', - minitcond = 'MI' -); --- test strict and non-strict cases -SELECT - p::text || ',' || i::text || ':' || COALESCE(v::text, 'NULL') AS row, - logging_agg_nonstrict(v) over wnd as nstrict, - logging_agg_nonstrict_initcond(v) over wnd as nstrict_init, - logging_agg_strict(v::text) over wnd as strict, - logging_agg_strict_initcond(v) over wnd as strict_init -FROM (VALUES - (1, 1, NULL), - (1, 2, 'a'), - (1, 3, 'b'), - (1, 4, NULL), - (1, 5, NULL), - (1, 6, 'c'), - (2, 1, NULL), - (2, 2, 'x'), - (3, 1, 'z') -) AS t(p, i, v) -WINDOW wnd AS (PARTITION BY P ORDER BY i ROWS BETWEEN 1 PRECEDING AND CURRENT ROW) -ORDER BY p, i; - row | nstrict | nstrict_init | strict | strict_init -----------+-----------------------------------------------+-------------------------------------------------+-----------+---------------- - 1,1:NULL | +NULL | MI+NULL | | MI - 1,2:a | +NULL+'a' | MI+NULL+'a' | a | MI+'a' - 1,3:b | +NULL+'a'-NULL+'b' | MI+NULL+'a'-NULL+'b' | a+'b' | MI+'a'+'b' - 1,4:NULL | +NULL+'a'-NULL+'b'-'a'+NULL | MI+NULL+'a'-NULL+'b'-'a'+NULL | a+'b'-'a' | MI+'a'+'b'-'a' - 1,5:NULL | +NULL+'a'-NULL+'b'-'a'+NULL-'b'+NULL | MI+NULL+'a'-NULL+'b'-'a'+NULL-'b'+NULL | | MI - 1,6:c | +NULL+'a'-NULL+'b'-'a'+NULL-'b'+NULL-NULL+'c' | MI+NULL+'a'-NULL+'b'-'a'+NULL-'b'+NULL-NULL+'c' | c | MI+'c' - 2,1:NULL | +NULL | MI+NULL | | MI - 2,2:x | +NULL+'x' | MI+NULL+'x' | x | MI+'x' - 3,1:z | +'z' | MI+'z' | z | MI+'z' -(9 rows) - --- and again, but with filter -SELECT - p::text || ',' || i::text || ':' || - CASE WHEN f THEN COALESCE(v::text, 'NULL') ELSE '-' END as row, - logging_agg_nonstrict(v) filter(where f) over wnd as nstrict_filt, - logging_agg_nonstrict_initcond(v) filter(where f) over wnd as nstrict_init_filt, - logging_agg_strict(v::text) filter(where f) over wnd as strict_filt, - logging_agg_strict_initcond(v) filter(where f) over wnd as strict_init_filt -FROM (VALUES - (1, 1, true, NULL), - (1, 2, false, 'a'), - (1, 3, true, 'b'), - (1, 4, false, NULL), - (1, 5, false, NULL), - (1, 6, false, 'c'), - (2, 1, false, NULL), - (2, 2, true, 'x'), - (3, 1, true, 'z') -) AS t(p, i, f, v) -WINDOW wnd AS (PARTITION BY p ORDER BY i ROWS BETWEEN 1 PRECEDING AND CURRENT ROW) -ORDER BY p, i; - row | nstrict_filt | nstrict_init_filt | strict_filt | strict_init_filt -----------+--------------+-------------------+-------------+------------------ - 1,1:NULL | +NULL | MI+NULL | | MI - 1,2:- | +NULL | MI+NULL | | MI - 1,3:b | +'b' | MI+'b' | b | MI+'b' - 1,4:- | +'b' | MI+'b' | b | MI+'b' - 1,5:- | | MI | | MI - 1,6:- | | MI | | MI - 2,1:- | | MI | | MI - 2,2:x | +'x' | MI+'x' | x | MI+'x' - 3,1:z | +'z' | MI+'z' | z | MI+'z' -(9 rows) - --- test that volatile arguments disable moving-aggregate mode -SELECT - i::text || ':' || COALESCE(v::text, 'NULL') as row, - logging_agg_strict(v::text) - over wnd as inverse, - logging_agg_strict(v::text || CASE WHEN random() < 0 then '?' ELSE '' END) - over wnd as noinverse -FROM (VALUES - (1, 'a'), - (2, 'b'), - (3, 'c') -) AS t(i, v) -WINDOW wnd AS (ORDER BY i ROWS BETWEEN 1 PRECEDING AND CURRENT ROW) -ORDER BY i; - row | inverse | noinverse ------+---------------+----------- - 1:a | a | a - 2:b | a+'b' | a*'b' - 3:c | a+'b'-'a'+'c' | b*'c' -(3 rows) - -SELECT - i::text || ':' || COALESCE(v::text, 'NULL') as row, - logging_agg_strict(v::text) filter(where true) - over wnd as inverse, - logging_agg_strict(v::text) filter(where random() >= 0) - over wnd as noinverse -FROM (VALUES - (1, 'a'), - (2, 'b'), - (3, 'c') -) AS t(i, v) -WINDOW wnd AS (ORDER BY i ROWS BETWEEN 1 PRECEDING AND CURRENT ROW) -ORDER BY i; - row | inverse | noinverse ------+---------------+----------- - 1:a | a | a - 2:b | a+'b' | a*'b' - 3:c | a+'b'-'a'+'c' | b*'c' -(3 rows) - --- test that non-overlapping windows don't use inverse transitions -SELECT - logging_agg_strict(v::text) OVER wnd -FROM (VALUES - (1, 'a'), - (2, 'b'), - (3, 'c') -) AS t(i, v) -WINDOW wnd AS (ORDER BY i ROWS BETWEEN CURRENT ROW AND CURRENT ROW) -ORDER BY i; - logging_agg_strict --------------------- - a - b - c -(3 rows) - --- test that returning NULL from the inverse transition functions --- restarts the aggregation from scratch. The second aggregate is supposed --- to test cases where only some aggregates restart, the third one checks --- that one aggregate restarting doesn't cause others to restart. -CREATE FUNCTION sum_int_randrestart_minvfunc(int4, int4) RETURNS int4 AS -$$ SELECT CASE WHEN random() < 0.2 THEN NULL ELSE $1 - $2 END $$ -LANGUAGE SQL STRICT; -CREATE AGGREGATE sum_int_randomrestart (int4) -( - stype = int4, - sfunc = int4pl, - mstype = int4, - msfunc = int4pl, - minvfunc = sum_int_randrestart_minvfunc -); -WITH -vs AS ( - SELECT i, (random() * 100)::int4 AS v - FROM generate_series(1, 100) AS i -), -sum_following AS ( - SELECT i, SUM(v) OVER - (ORDER BY i DESC ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS s - FROM vs -) -SELECT DISTINCT - sum_following.s = sum_int_randomrestart(v) OVER fwd AS eq1, - -sum_following.s = sum_int_randomrestart(-v) OVER fwd AS eq2, - 100*3+(vs.i-1)*3 = length(logging_agg_nonstrict(''::text) OVER fwd) AS eq3 -FROM vs -JOIN sum_following ON sum_following.i = vs.i -WINDOW fwd AS ( - ORDER BY vs.i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING -); - eq1 | eq2 | eq3 ------+-----+----- - t | t | t -(1 row) - --- --- Test various built-in aggregates that have moving-aggregate support --- --- test inverse transition functions handle NULLs properly -SELECT i,AVG(v::bigint) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(1,1),(2,2),(3,NULL),(4,NULL)) t(i,v); - i | avg ----+-------------------- - 1 | 1.5000000000000000 - 2 | 2.0000000000000000 - 3 | - 4 | -(4 rows) - -SELECT i,AVG(v::int) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(1,1),(2,2),(3,NULL),(4,NULL)) t(i,v); - i | avg ----+-------------------- - 1 | 1.5000000000000000 - 2 | 2.0000000000000000 - 3 | - 4 | -(4 rows) - -SELECT i,AVG(v::smallint) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(1,1),(2,2),(3,NULL),(4,NULL)) t(i,v); - i | avg ----+-------------------- - 1 | 1.5000000000000000 - 2 | 2.0000000000000000 - 3 | - 4 | -(4 rows) - -SELECT i,AVG(v::numeric) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(1,1.5),(2,2.5),(3,NULL),(4,NULL)) t(i,v); - i | avg ----+-------------------- - 1 | 2.0000000000000000 - 2 | 2.5000000000000000 - 3 | - 4 | -(4 rows) - -SELECT i,AVG(v::interval) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(1,'1 sec'),(2,'2 sec'),(3,NULL),(4,NULL)) t(i,v); - i | avg ----+------------ - 1 | @ 1.5 secs - 2 | @ 2 secs - 3 | - 4 | -(4 rows) - -SELECT i,SUM(v::smallint) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(1,1),(2,2),(3,NULL),(4,NULL)) t(i,v); - i | sum ----+----- - 1 | 3 - 2 | 2 - 3 | - 4 | -(4 rows) - -SELECT i,SUM(v::int) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(1,1),(2,2),(3,NULL),(4,NULL)) t(i,v); - i | sum ----+----- - 1 | 3 - 2 | 2 - 3 | - 4 | -(4 rows) - -SELECT i,SUM(v::bigint) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(1,1),(2,2),(3,NULL),(4,NULL)) t(i,v); - i | sum ----+----- - 1 | 3 - 2 | 2 - 3 | - 4 | -(4 rows) - -SELECT i,SUM(v::money) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(1,'1.10'),(2,'2.20'),(3,NULL),(4,NULL)) t(i,v); - i | sum ----+------- - 1 | $3.30 - 2 | $2.20 - 3 | - 4 | -(4 rows) - -SELECT i,SUM(v::interval) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(1,'1 sec'),(2,'2 sec'),(3,NULL),(4,NULL)) t(i,v); - i | sum ----+---------- - 1 | @ 3 secs - 2 | @ 2 secs - 3 | - 4 | -(4 rows) - -SELECT i,SUM(v::numeric) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(1,1.1),(2,2.2),(3,NULL),(4,NULL)) t(i,v); - i | sum ----+----- - 1 | 3.3 - 2 | 2.2 - 3 | - 4 | -(4 rows) - -SELECT SUM(n::numeric) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(1,1.01),(2,2),(3,3)) v(i,n); - sum ------- - 6.01 - 5 - 3 -(3 rows) - -SELECT i,COUNT(v) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(1,1),(2,2),(3,NULL),(4,NULL)) t(i,v); - i | count ----+------- - 1 | 2 - 2 | 1 - 3 | 0 - 4 | 0 -(4 rows) - -SELECT i,COUNT(*) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(1,1),(2,2),(3,NULL),(4,NULL)) t(i,v); - i | count ----+------- - 1 | 4 - 2 | 3 - 3 | 2 - 4 | 1 -(4 rows) - -SELECT VAR_POP(n::bigint) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(1,600),(2,470),(3,170),(4,430),(5,300)) r(i,n); - var_pop ------------------------ - 21704.000000000000 - 13868.750000000000 - 11266.666666666667 - 4225.0000000000000000 - 0 -(5 rows) - -SELECT VAR_POP(n::int) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(1,600),(2,470),(3,170),(4,430),(5,300)) r(i,n); - var_pop ------------------------ - 21704.000000000000 - 13868.750000000000 - 11266.666666666667 - 4225.0000000000000000 - 0 -(5 rows) - -SELECT VAR_POP(n::smallint) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(1,600),(2,470),(3,170),(4,430),(5,300)) r(i,n); - var_pop ------------------------ - 21704.000000000000 - 13868.750000000000 - 11266.666666666667 - 4225.0000000000000000 - 0 -(5 rows) - -SELECT VAR_POP(n::numeric) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(1,600),(2,470),(3,170),(4,430),(5,300)) r(i,n); - var_pop ------------------------ - 21704.000000000000 - 13868.750000000000 - 11266.666666666667 - 4225.0000000000000000 - 0 -(5 rows) - -SELECT VAR_SAMP(n::bigint) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(1,600),(2,470),(3,170),(4,430),(5,300)) r(i,n); - var_samp ------------------------ - 27130.000000000000 - 18491.666666666667 - 16900.000000000000 - 8450.0000000000000000 - -(5 rows) - -SELECT VAR_SAMP(n::int) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(1,600),(2,470),(3,170),(4,430),(5,300)) r(i,n); - var_samp ------------------------ - 27130.000000000000 - 18491.666666666667 - 16900.000000000000 - 8450.0000000000000000 - -(5 rows) - -SELECT VAR_SAMP(n::smallint) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(1,600),(2,470),(3,170),(4,430),(5,300)) r(i,n); - var_samp ------------------------ - 27130.000000000000 - 18491.666666666667 - 16900.000000000000 - 8450.0000000000000000 - -(5 rows) - -SELECT VAR_SAMP(n::numeric) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(1,600),(2,470),(3,170),(4,430),(5,300)) r(i,n); - var_samp ------------------------ - 27130.000000000000 - 18491.666666666667 - 16900.000000000000 - 8450.0000000000000000 - -(5 rows) - -SELECT VARIANCE(n::bigint) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(1,600),(2,470),(3,170),(4,430),(5,300)) r(i,n); - variance ------------------------ - 27130.000000000000 - 18491.666666666667 - 16900.000000000000 - 8450.0000000000000000 - -(5 rows) - -SELECT VARIANCE(n::int) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(1,600),(2,470),(3,170),(4,430),(5,300)) r(i,n); - variance ------------------------ - 27130.000000000000 - 18491.666666666667 - 16900.000000000000 - 8450.0000000000000000 - -(5 rows) - -SELECT VARIANCE(n::smallint) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(1,600),(2,470),(3,170),(4,430),(5,300)) r(i,n); - variance ------------------------ - 27130.000000000000 - 18491.666666666667 - 16900.000000000000 - 8450.0000000000000000 - -(5 rows) - -SELECT VARIANCE(n::numeric) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(1,600),(2,470),(3,170),(4,430),(5,300)) r(i,n); - variance ------------------------ - 27130.000000000000 - 18491.666666666667 - 16900.000000000000 - 8450.0000000000000000 - -(5 rows) - -SELECT STDDEV_POP(n::bigint) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(1,NULL),(2,600),(3,470),(4,170),(5,430),(6,300)) r(i,n); - stddev_pop ---------------------- - 147.322774885623 - 147.322774885623 - 117.765657133139 - 106.144555520604 - 65.0000000000000000 - 0 -(6 rows) - -SELECT STDDEV_POP(n::int) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(1,NULL),(2,600),(3,470),(4,170),(5,430),(6,300)) r(i,n); - stddev_pop ---------------------- - 147.322774885623 - 147.322774885623 - 117.765657133139 - 106.144555520604 - 65.0000000000000000 - 0 -(6 rows) - -SELECT STDDEV_POP(n::smallint) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(1,NULL),(2,600),(3,470),(4,170),(5,430),(6,300)) r(i,n); - stddev_pop ---------------------- - 147.322774885623 - 147.322774885623 - 117.765657133139 - 106.144555520604 - 65.0000000000000000 - 0 -(6 rows) - -SELECT STDDEV_POP(n::numeric) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(1,NULL),(2,600),(3,470),(4,170),(5,430),(6,300)) r(i,n); - stddev_pop ---------------------- - 147.322774885623 - 147.322774885623 - 117.765657133139 - 106.144555520604 - 65.0000000000000000 - 0 -(6 rows) - -SELECT STDDEV_SAMP(n::bigint) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(1,NULL),(2,600),(3,470),(4,170),(5,430),(6,300)) r(i,n); - stddev_samp ---------------------- - 164.711869639076 - 164.711869639076 - 135.984067694222 - 130.000000000000 - 91.9238815542511782 - -(6 rows) - -SELECT STDDEV_SAMP(n::int) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(1,NULL),(2,600),(3,470),(4,170),(5,430),(6,300)) r(i,n); - stddev_samp ---------------------- - 164.711869639076 - 164.711869639076 - 135.984067694222 - 130.000000000000 - 91.9238815542511782 - -(6 rows) - -SELECT STDDEV_SAMP(n::smallint) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(1,NULL),(2,600),(3,470),(4,170),(5,430),(6,300)) r(i,n); - stddev_samp ---------------------- - 164.711869639076 - 164.711869639076 - 135.984067694222 - 130.000000000000 - 91.9238815542511782 - -(6 rows) - -SELECT STDDEV_SAMP(n::numeric) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(1,NULL),(2,600),(3,470),(4,170),(5,430),(6,300)) r(i,n); - stddev_samp ---------------------- - 164.711869639076 - 164.711869639076 - 135.984067694222 - 130.000000000000 - 91.9238815542511782 - -(6 rows) - -SELECT STDDEV(n::bigint) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(0,NULL),(1,600),(2,470),(3,170),(4,430),(5,300)) r(i,n); - stddev ---------------------- - 164.711869639076 - 164.711869639076 - 135.984067694222 - 130.000000000000 - 91.9238815542511782 - -(6 rows) - -SELECT STDDEV(n::int) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(0,NULL),(1,600),(2,470),(3,170),(4,430),(5,300)) r(i,n); - stddev ---------------------- - 164.711869639076 - 164.711869639076 - 135.984067694222 - 130.000000000000 - 91.9238815542511782 - -(6 rows) - -SELECT STDDEV(n::smallint) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(0,NULL),(1,600),(2,470),(3,170),(4,430),(5,300)) r(i,n); - stddev ---------------------- - 164.711869639076 - 164.711869639076 - 135.984067694222 - 130.000000000000 - 91.9238815542511782 - -(6 rows) - -SELECT STDDEV(n::numeric) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - FROM (VALUES(0,NULL),(1,600),(2,470),(3,170),(4,430),(5,300)) r(i,n); - stddev ---------------------- - 164.711869639076 - 164.711869639076 - 135.984067694222 - 130.000000000000 - 91.9238815542511782 - -(6 rows) - --- test that inverse transition functions work with various frame options -SELECT i,SUM(v::int) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND CURRENT ROW) - FROM (VALUES(1,1),(2,2),(3,NULL),(4,NULL)) t(i,v); - i | sum ----+----- - 1 | 1 - 2 | 2 - 3 | - 4 | -(4 rows) - -SELECT i,SUM(v::int) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND 1 FOLLOWING) - FROM (VALUES(1,1),(2,2),(3,NULL),(4,NULL)) t(i,v); - i | sum ----+----- - 1 | 3 - 2 | 2 - 3 | - 4 | -(4 rows) - -SELECT i,SUM(v::int) OVER (ORDER BY i ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING) - FROM (VALUES(1,1),(2,2),(3,3),(4,4)) t(i,v); - i | sum ----+----- - 1 | 3 - 2 | 6 - 3 | 9 - 4 | 7 -(4 rows) - --- ensure aggregate over numeric properly recovers from NaN values -SELECT a, b, - SUM(b) OVER(ORDER BY A ROWS BETWEEN 1 PRECEDING AND CURRENT ROW) -FROM (VALUES(1,1::numeric),(2,2),(3,'NaN'),(4,3),(5,4)) t(a,b); - a | b | sum ----+-----+----- - 1 | 1 | 1 - 2 | 2 | 3 - 3 | NaN | NaN - 4 | 3 | NaN - 5 | 4 | 7 -(5 rows) - --- It might be tempting for someone to add an inverse trans function for --- float and double precision. This should not be done as it can give incorrect --- results. This test should fail if anyone ever does this without thinking too --- hard about it. -SELECT to_char(SUM(n::float8) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND 1 FOLLOWING),'999999999999999999999D9') - FROM (VALUES(1,1e20),(2,1)) n(i,n); - to_char --------------------------- - 100000000000000000000 - 1.0 -(2 rows) - -SELECT i, b, bool_and(b) OVER w, bool_or(b) OVER w - FROM (VALUES (1,true), (2,true), (3,false), (4,false), (5,true)) v(i,b) - WINDOW w AS (ORDER BY i ROWS BETWEEN CURRENT ROW AND 1 FOLLOWING); - i | b | bool_and | bool_or ----+---+----------+--------- - 1 | t | t | t - 2 | t | f | t - 3 | f | f | f - 4 | f | f | t - 5 | t | t | t -(5 rows) - --- Tests for problems with failure to walk or mutate expressions --- within window frame clauses. --- test walker (fails with collation error if expressions are not walked) -SELECT array_agg(i) OVER w - FROM generate_series(1,5) i -WINDOW w AS (ORDER BY i ROWS BETWEEN (('foo' < 'foobar')::integer) PRECEDING AND CURRENT ROW); - array_agg ------------ - {1} - {1,2} - {2,3} - {3,4} - {4,5} -(5 rows) - --- test mutator (fails when inlined if expressions are not mutated) -CREATE FUNCTION pg_temp.f(group_size BIGINT) RETURNS SETOF integer[] -AS $$ - SELECT array_agg(s) OVER w - FROM generate_series(1,5) s - WINDOW w AS (ORDER BY s ROWS BETWEEN CURRENT ROW AND GROUP_SIZE FOLLOWING) -$$ LANGUAGE SQL STABLE; -EXPLAIN (costs off) SELECT * FROM pg_temp.f(2); - QUERY PLAN ------------------------------------------------------- - Subquery Scan on f - -> WindowAgg - -> Sort - Sort Key: s.s - -> Function Scan on generate_series s -(5 rows) - -SELECT * FROM pg_temp.f(2); - f ---------- - {1,2,3} - {2,3,4} - {3,4,5} - {4,5} - {5} -(5 rows) - +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/xmlmap_1.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/xmlmap.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/xmlmap_1.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/xmlmap.out 2023-02-20 19:47:53.549216501 -0500 @@ -1,135 +1 @@ -CREATE SCHEMA testxmlschema; -CREATE TABLE testxmlschema.test1 (a int, b text); -INSERT INTO testxmlschema.test1 VALUES (1, 'one'), (2, 'two'), (-1, null); -CREATE DOMAIN testxmldomain AS varchar; -CREATE TABLE testxmlschema.test2 (z int, y varchar(500), x char(6), - w numeric(9,2), v smallint, u bigint, t real, - s time, stz timetz, r timestamp, rtz timestamptz, q date, - p xml, o testxmldomain, n bool, m bytea, aaa text); -ALTER TABLE testxmlschema.test2 DROP COLUMN aaa; -INSERT INTO testxmlschema.test2 VALUES (55, 'abc', 'def', - 98.6, 2, 999, 0, - '21:07', '21:11 +05', '2009-06-08 21:07:30', '2009-06-08 21:07:30 -07', '2009-06-08', - NULL, 'ABC', true, 'XYZ'); -SELECT table_to_xml('testxmlschema.test1', false, false, ''); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT table_to_xml('testxmlschema.test1', true, false, 'foo'); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT table_to_xml('testxmlschema.test1', false, true, ''); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT table_to_xml('testxmlschema.test1', true, true, ''); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT table_to_xml('testxmlschema.test2', false, false, ''); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT table_to_xmlschema('testxmlschema.test1', false, false, ''); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT table_to_xmlschema('testxmlschema.test1', true, false, ''); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT table_to_xmlschema('testxmlschema.test1', false, true, 'foo'); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT table_to_xmlschema('testxmlschema.test1', true, true, ''); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT table_to_xmlschema('testxmlschema.test2', false, false, ''); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT table_to_xml_and_xmlschema('testxmlschema.test1', false, false, ''); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT table_to_xml_and_xmlschema('testxmlschema.test1', true, false, ''); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT table_to_xml_and_xmlschema('testxmlschema.test1', false, true, ''); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT table_to_xml_and_xmlschema('testxmlschema.test1', true, true, 'foo'); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT query_to_xml('SELECT * FROM testxmlschema.test1', false, false, ''); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT query_to_xmlschema('SELECT * FROM testxmlschema.test1', false, false, ''); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT query_to_xml_and_xmlschema('SELECT * FROM testxmlschema.test1', true, true, ''); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -DECLARE xc CURSOR WITH HOLD FOR SELECT * FROM testxmlschema.test1 ORDER BY 1, 2; -SELECT cursor_to_xml('xc'::refcursor, 5, false, true, ''); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT cursor_to_xmlschema('xc'::refcursor, false, true, ''); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -MOVE BACKWARD ALL IN xc; -SELECT cursor_to_xml('xc'::refcursor, 5, true, false, ''); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT cursor_to_xmlschema('xc'::refcursor, true, false, ''); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT schema_to_xml('testxmlschema', false, true, ''); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT schema_to_xml('testxmlschema', true, false, ''); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT schema_to_xmlschema('testxmlschema', false, true, ''); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT schema_to_xmlschema('testxmlschema', true, false, ''); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT schema_to_xml_and_xmlschema('testxmlschema', true, true, 'foo'); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. --- test that domains are transformed like their base types -CREATE DOMAIN testboolxmldomain AS bool; -CREATE DOMAIN testdatexmldomain AS date; -CREATE TABLE testxmlschema.test3 - AS SELECT true c1, - true::testboolxmldomain c2, - '2013-02-21'::date c3, - '2013-02-21'::testdatexmldomain c4; -SELECT xmlforest(c1, c2, c3, c4) FROM testxmlschema.test3; -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT table_to_xml('testxmlschema.test3', true, true, ''); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/functional_deps.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/functional_deps.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/functional_deps.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/functional_deps.out 2023-02-20 19:47:53.619216504 -0500 @@ -1,232 +1 @@ --- from http://www.depesz.com/index.php/2010/04/19/getting-unique-elements/ -CREATE TEMP TABLE articles ( - id int CONSTRAINT articles_pkey PRIMARY KEY, - keywords text, - title text UNIQUE NOT NULL, - body text UNIQUE, - created date -); -CREATE TEMP TABLE articles_in_category ( - article_id int, - category_id int, - changed date, - PRIMARY KEY (article_id, category_id) -); --- test functional dependencies based on primary keys/unique constraints --- base tables --- group by primary key (OK) -SELECT id, keywords, title, body, created -FROM articles -GROUP BY id; - id | keywords | title | body | created -----+----------+-------+------+--------- -(0 rows) - --- group by unique not null (fail/todo) -SELECT id, keywords, title, body, created -FROM articles -GROUP BY title; -ERROR: column "articles.id" must appear in the GROUP BY clause or be used in an aggregate function -LINE 1: SELECT id, keywords, title, body, created - ^ --- group by unique nullable (fail) -SELECT id, keywords, title, body, created -FROM articles -GROUP BY body; -ERROR: column "articles.id" must appear in the GROUP BY clause or be used in an aggregate function -LINE 1: SELECT id, keywords, title, body, created - ^ --- group by something else (fail) -SELECT id, keywords, title, body, created -FROM articles -GROUP BY keywords; -ERROR: column "articles.id" must appear in the GROUP BY clause or be used in an aggregate function -LINE 1: SELECT id, keywords, title, body, created - ^ --- multiple tables --- group by primary key (OK) -SELECT a.id, a.keywords, a.title, a.body, a.created -FROM articles AS a, articles_in_category AS aic -WHERE a.id = aic.article_id AND aic.category_id in (14,62,70,53,138) -GROUP BY a.id; - id | keywords | title | body | created -----+----------+-------+------+--------- -(0 rows) - --- group by something else (fail) -SELECT a.id, a.keywords, a.title, a.body, a.created -FROM articles AS a, articles_in_category AS aic -WHERE a.id = aic.article_id AND aic.category_id in (14,62,70,53,138) -GROUP BY aic.article_id, aic.category_id; -ERROR: column "a.id" must appear in the GROUP BY clause or be used in an aggregate function -LINE 1: SELECT a.id, a.keywords, a.title, a.body, a.created - ^ --- JOIN syntax --- group by left table's primary key (OK) -SELECT a.id, a.keywords, a.title, a.body, a.created -FROM articles AS a JOIN articles_in_category AS aic ON a.id = aic.article_id -WHERE aic.category_id in (14,62,70,53,138) -GROUP BY a.id; - id | keywords | title | body | created -----+----------+-------+------+--------- -(0 rows) - --- group by something else (fail) -SELECT a.id, a.keywords, a.title, a.body, a.created -FROM articles AS a JOIN articles_in_category AS aic ON a.id = aic.article_id -WHERE aic.category_id in (14,62,70,53,138) -GROUP BY aic.article_id, aic.category_id; -ERROR: column "a.id" must appear in the GROUP BY clause or be used in an aggregate function -LINE 1: SELECT a.id, a.keywords, a.title, a.body, a.created - ^ --- group by right table's (composite) primary key (OK) -SELECT aic.changed -FROM articles AS a JOIN articles_in_category AS aic ON a.id = aic.article_id -WHERE aic.category_id in (14,62,70,53,138) -GROUP BY aic.category_id, aic.article_id; - changed ---------- -(0 rows) - --- group by right table's partial primary key (fail) -SELECT aic.changed -FROM articles AS a JOIN articles_in_category AS aic ON a.id = aic.article_id -WHERE aic.category_id in (14,62,70,53,138) -GROUP BY aic.article_id; -ERROR: column "aic.changed" must appear in the GROUP BY clause or be used in an aggregate function -LINE 1: SELECT aic.changed - ^ --- example from documentation -CREATE TEMP TABLE products (product_id int, name text, price numeric); -CREATE TEMP TABLE sales (product_id int, units int); --- OK -SELECT product_id, p.name, (sum(s.units) * p.price) AS sales - FROM products p LEFT JOIN sales s USING (product_id) - GROUP BY product_id, p.name, p.price; - product_id | name | sales -------------+------+------- -(0 rows) - --- fail -SELECT product_id, p.name, (sum(s.units) * p.price) AS sales - FROM products p LEFT JOIN sales s USING (product_id) - GROUP BY product_id; -ERROR: column "p.name" must appear in the GROUP BY clause or be used in an aggregate function -LINE 1: SELECT product_id, p.name, (sum(s.units) * p.price) AS sales - ^ -ALTER TABLE products ADD PRIMARY KEY (product_id); --- OK now -SELECT product_id, p.name, (sum(s.units) * p.price) AS sales - FROM products p LEFT JOIN sales s USING (product_id) - GROUP BY product_id; - product_id | name | sales -------------+------+------- -(0 rows) - --- Drupal example, http://drupal.org/node/555530 -CREATE TEMP TABLE node ( - nid SERIAL, - vid integer NOT NULL default '0', - type varchar(32) NOT NULL default '', - title varchar(128) NOT NULL default '', - uid integer NOT NULL default '0', - status integer NOT NULL default '1', - created integer NOT NULL default '0', - -- snip - PRIMARY KEY (nid, vid) -); -CREATE TEMP TABLE users ( - uid integer NOT NULL default '0', - name varchar(60) NOT NULL default '', - pass varchar(32) NOT NULL default '', - -- snip - PRIMARY KEY (uid), - UNIQUE (name) -); --- OK -SELECT u.uid, u.name FROM node n -INNER JOIN users u ON u.uid = n.uid -WHERE n.type = 'blog' AND n.status = 1 -GROUP BY u.uid, u.name; - uid | name ------+------ -(0 rows) - --- OK -SELECT u.uid, u.name FROM node n -INNER JOIN users u ON u.uid = n.uid -WHERE n.type = 'blog' AND n.status = 1 -GROUP BY u.uid; - uid | name ------+------ -(0 rows) - --- Check views and dependencies --- fail -CREATE TEMP VIEW fdv1 AS -SELECT id, keywords, title, body, created -FROM articles -GROUP BY body; -ERROR: column "articles.id" must appear in the GROUP BY clause or be used in an aggregate function -LINE 2: SELECT id, keywords, title, body, created - ^ --- OK -CREATE TEMP VIEW fdv1 AS -SELECT id, keywords, title, body, created -FROM articles -GROUP BY id; --- fail -ALTER TABLE articles DROP CONSTRAINT articles_pkey RESTRICT; -ERROR: cannot drop constraint articles_pkey on table articles because other objects depend on it -DETAIL: view fdv1 depends on constraint articles_pkey on table articles -HINT: Use DROP ... CASCADE to drop the dependent objects too. -DROP VIEW fdv1; --- multiple dependencies -CREATE TEMP VIEW fdv2 AS -SELECT a.id, a.keywords, a.title, aic.category_id, aic.changed -FROM articles AS a JOIN articles_in_category AS aic ON a.id = aic.article_id -WHERE aic.category_id in (14,62,70,53,138) -GROUP BY a.id, aic.category_id, aic.article_id; -ALTER TABLE articles DROP CONSTRAINT articles_pkey RESTRICT; -- fail -ERROR: cannot drop constraint articles_pkey on table articles because other objects depend on it -DETAIL: view fdv2 depends on constraint articles_pkey on table articles -HINT: Use DROP ... CASCADE to drop the dependent objects too. -ALTER TABLE articles_in_category DROP CONSTRAINT articles_in_category_pkey RESTRICT; --fail -ERROR: cannot drop constraint articles_in_category_pkey on table articles_in_category because other objects depend on it -DETAIL: view fdv2 depends on constraint articles_in_category_pkey on table articles_in_category -HINT: Use DROP ... CASCADE to drop the dependent objects too. -DROP VIEW fdv2; --- nested queries -CREATE TEMP VIEW fdv3 AS -SELECT id, keywords, title, body, created -FROM articles -GROUP BY id -UNION -SELECT id, keywords, title, body, created -FROM articles -GROUP BY id; -ALTER TABLE articles DROP CONSTRAINT articles_pkey RESTRICT; -- fail -ERROR: cannot drop constraint articles_pkey on table articles because other objects depend on it -DETAIL: view fdv3 depends on constraint articles_pkey on table articles -HINT: Use DROP ... CASCADE to drop the dependent objects too. -DROP VIEW fdv3; -CREATE TEMP VIEW fdv4 AS -SELECT * FROM articles WHERE title IN (SELECT title FROM articles GROUP BY id); -ALTER TABLE articles DROP CONSTRAINT articles_pkey RESTRICT; -- fail -ERROR: cannot drop constraint articles_pkey on table articles because other objects depend on it -DETAIL: view fdv4 depends on constraint articles_pkey on table articles -HINT: Use DROP ... CASCADE to drop the dependent objects too. -DROP VIEW fdv4; --- prepared query plans: this results in failure on reuse -PREPARE foo AS - SELECT id, keywords, title, body, created - FROM articles - GROUP BY id; -EXECUTE foo; - id | keywords | title | body | created -----+----------+-------+------+--------- -(0 rows) - -ALTER TABLE articles DROP CONSTRAINT articles_pkey RESTRICT; -EXECUTE foo; -- fail -ERROR: column "articles.keywords" must appear in the GROUP BY clause or be used in an aggregate function +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/advisory_lock.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/advisory_lock.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/advisory_lock.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/advisory_lock.out 2023-02-20 19:47:53.469216498 -0500 @@ -1,275 +1 @@ --- --- ADVISORY LOCKS --- -BEGIN; -SELECT - pg_advisory_xact_lock(1), pg_advisory_xact_lock_shared(2), - pg_advisory_xact_lock(1, 1), pg_advisory_xact_lock_shared(2, 2); - pg_advisory_xact_lock | pg_advisory_xact_lock_shared | pg_advisory_xact_lock | pg_advisory_xact_lock_shared ------------------------+------------------------------+-----------------------+------------------------------ - | | | -(1 row) - -SELECT locktype, classid, objid, objsubid, mode, granted - FROM pg_locks WHERE locktype = 'advisory' - ORDER BY classid, objid, objsubid; - locktype | classid | objid | objsubid | mode | granted -----------+---------+-------+----------+---------------+--------- - advisory | 0 | 1 | 1 | ExclusiveLock | t - advisory | 0 | 2 | 1 | ShareLock | t - advisory | 1 | 1 | 2 | ExclusiveLock | t - advisory | 2 | 2 | 2 | ShareLock | t -(4 rows) - --- pg_advisory_unlock_all() shouldn't release xact locks -SELECT pg_advisory_unlock_all(); - pg_advisory_unlock_all ------------------------- - -(1 row) - -SELECT count(*) FROM pg_locks WHERE locktype = 'advisory'; - count -------- - 4 -(1 row) - --- can't unlock xact locks -SELECT - pg_advisory_unlock(1), pg_advisory_unlock_shared(2), - pg_advisory_unlock(1, 1), pg_advisory_unlock_shared(2, 2); -WARNING: you don't own a lock of type ExclusiveLock -WARNING: you don't own a lock of type ShareLock -WARNING: you don't own a lock of type ExclusiveLock -WARNING: you don't own a lock of type ShareLock - pg_advisory_unlock | pg_advisory_unlock_shared | pg_advisory_unlock | pg_advisory_unlock_shared ---------------------+---------------------------+--------------------+--------------------------- - f | f | f | f -(1 row) - --- automatically release xact locks at commit -COMMIT; -SELECT count(*) FROM pg_locks WHERE locktype = 'advisory'; - count -------- - 0 -(1 row) - -BEGIN; --- holding both session and xact locks on the same objects, xact first -SELECT - pg_advisory_xact_lock(1), pg_advisory_xact_lock_shared(2), - pg_advisory_xact_lock(1, 1), pg_advisory_xact_lock_shared(2, 2); - pg_advisory_xact_lock | pg_advisory_xact_lock_shared | pg_advisory_xact_lock | pg_advisory_xact_lock_shared ------------------------+------------------------------+-----------------------+------------------------------ - | | | -(1 row) - -SELECT locktype, classid, objid, objsubid, mode, granted - FROM pg_locks WHERE locktype = 'advisory' - ORDER BY classid, objid, objsubid; - locktype | classid | objid | objsubid | mode | granted -----------+---------+-------+----------+---------------+--------- - advisory | 0 | 1 | 1 | ExclusiveLock | t - advisory | 0 | 2 | 1 | ShareLock | t - advisory | 1 | 1 | 2 | ExclusiveLock | t - advisory | 2 | 2 | 2 | ShareLock | t -(4 rows) - -SELECT - pg_advisory_lock(1), pg_advisory_lock_shared(2), - pg_advisory_lock(1, 1), pg_advisory_lock_shared(2, 2); - pg_advisory_lock | pg_advisory_lock_shared | pg_advisory_lock | pg_advisory_lock_shared -------------------+-------------------------+------------------+------------------------- - | | | -(1 row) - -ROLLBACK; -SELECT locktype, classid, objid, objsubid, mode, granted - FROM pg_locks WHERE locktype = 'advisory' - ORDER BY classid, objid, objsubid; - locktype | classid | objid | objsubid | mode | granted -----------+---------+-------+----------+---------------+--------- - advisory | 0 | 1 | 1 | ExclusiveLock | t - advisory | 0 | 2 | 1 | ShareLock | t - advisory | 1 | 1 | 2 | ExclusiveLock | t - advisory | 2 | 2 | 2 | ShareLock | t -(4 rows) - --- unlocking session locks -SELECT - pg_advisory_unlock(1), pg_advisory_unlock(1), - pg_advisory_unlock_shared(2), pg_advisory_unlock_shared(2), - pg_advisory_unlock(1, 1), pg_advisory_unlock(1, 1), - pg_advisory_unlock_shared(2, 2), pg_advisory_unlock_shared(2, 2); -WARNING: you don't own a lock of type ExclusiveLock -WARNING: you don't own a lock of type ShareLock -WARNING: you don't own a lock of type ExclusiveLock -WARNING: you don't own a lock of type ShareLock - pg_advisory_unlock | pg_advisory_unlock | pg_advisory_unlock_shared | pg_advisory_unlock_shared | pg_advisory_unlock | pg_advisory_unlock | pg_advisory_unlock_shared | pg_advisory_unlock_shared ---------------------+--------------------+---------------------------+---------------------------+--------------------+--------------------+---------------------------+--------------------------- - t | f | t | f | t | f | t | f -(1 row) - -SELECT count(*) FROM pg_locks WHERE locktype = 'advisory'; - count -------- - 0 -(1 row) - -BEGIN; --- holding both session and xact locks on the same objects, session first -SELECT - pg_advisory_lock(1), pg_advisory_lock_shared(2), - pg_advisory_lock(1, 1), pg_advisory_lock_shared(2, 2); - pg_advisory_lock | pg_advisory_lock_shared | pg_advisory_lock | pg_advisory_lock_shared -------------------+-------------------------+------------------+------------------------- - | | | -(1 row) - -SELECT locktype, classid, objid, objsubid, mode, granted - FROM pg_locks WHERE locktype = 'advisory' - ORDER BY classid, objid, objsubid; - locktype | classid | objid | objsubid | mode | granted -----------+---------+-------+----------+---------------+--------- - advisory | 0 | 1 | 1 | ExclusiveLock | t - advisory | 0 | 2 | 1 | ShareLock | t - advisory | 1 | 1 | 2 | ExclusiveLock | t - advisory | 2 | 2 | 2 | ShareLock | t -(4 rows) - -SELECT - pg_advisory_xact_lock(1), pg_advisory_xact_lock_shared(2), - pg_advisory_xact_lock(1, 1), pg_advisory_xact_lock_shared(2, 2); - pg_advisory_xact_lock | pg_advisory_xact_lock_shared | pg_advisory_xact_lock | pg_advisory_xact_lock_shared ------------------------+------------------------------+-----------------------+------------------------------ - | | | -(1 row) - -ROLLBACK; -SELECT locktype, classid, objid, objsubid, mode, granted - FROM pg_locks WHERE locktype = 'advisory' - ORDER BY classid, objid, objsubid; - locktype | classid | objid | objsubid | mode | granted -----------+---------+-------+----------+---------------+--------- - advisory | 0 | 1 | 1 | ExclusiveLock | t - advisory | 0 | 2 | 1 | ShareLock | t - advisory | 1 | 1 | 2 | ExclusiveLock | t - advisory | 2 | 2 | 2 | ShareLock | t -(4 rows) - --- releasing all session locks -SELECT pg_advisory_unlock_all(); - pg_advisory_unlock_all ------------------------- - -(1 row) - -SELECT count(*) FROM pg_locks WHERE locktype = 'advisory'; - count -------- - 0 -(1 row) - -BEGIN; --- grabbing txn locks multiple times -SELECT - pg_advisory_xact_lock(1), pg_advisory_xact_lock(1), - pg_advisory_xact_lock_shared(2), pg_advisory_xact_lock_shared(2), - pg_advisory_xact_lock(1, 1), pg_advisory_xact_lock(1, 1), - pg_advisory_xact_lock_shared(2, 2), pg_advisory_xact_lock_shared(2, 2); - pg_advisory_xact_lock | pg_advisory_xact_lock | pg_advisory_xact_lock_shared | pg_advisory_xact_lock_shared | pg_advisory_xact_lock | pg_advisory_xact_lock | pg_advisory_xact_lock_shared | pg_advisory_xact_lock_shared ------------------------+-----------------------+------------------------------+------------------------------+-----------------------+-----------------------+------------------------------+------------------------------ - | | | | | | | -(1 row) - -SELECT locktype, classid, objid, objsubid, mode, granted - FROM pg_locks WHERE locktype = 'advisory' - ORDER BY classid, objid, objsubid; - locktype | classid | objid | objsubid | mode | granted -----------+---------+-------+----------+---------------+--------- - advisory | 0 | 1 | 1 | ExclusiveLock | t - advisory | 0 | 2 | 1 | ShareLock | t - advisory | 1 | 1 | 2 | ExclusiveLock | t - advisory | 2 | 2 | 2 | ShareLock | t -(4 rows) - -COMMIT; -SELECT count(*) FROM pg_locks WHERE locktype = 'advisory'; - count -------- - 0 -(1 row) - --- grabbing session locks multiple times -SELECT - pg_advisory_lock(1), pg_advisory_lock(1), - pg_advisory_lock_shared(2), pg_advisory_lock_shared(2), - pg_advisory_lock(1, 1), pg_advisory_lock(1, 1), - pg_advisory_lock_shared(2, 2), pg_advisory_lock_shared(2, 2); - pg_advisory_lock | pg_advisory_lock | pg_advisory_lock_shared | pg_advisory_lock_shared | pg_advisory_lock | pg_advisory_lock | pg_advisory_lock_shared | pg_advisory_lock_shared -------------------+------------------+-------------------------+-------------------------+------------------+------------------+-------------------------+------------------------- - | | | | | | | -(1 row) - -SELECT locktype, classid, objid, objsubid, mode, granted - FROM pg_locks WHERE locktype = 'advisory' - ORDER BY classid, objid, objsubid; - locktype | classid | objid | objsubid | mode | granted -----------+---------+-------+----------+---------------+--------- - advisory | 0 | 1 | 1 | ExclusiveLock | t - advisory | 0 | 2 | 1 | ShareLock | t - advisory | 1 | 1 | 2 | ExclusiveLock | t - advisory | 2 | 2 | 2 | ShareLock | t -(4 rows) - -SELECT - pg_advisory_unlock(1), pg_advisory_unlock(1), - pg_advisory_unlock_shared(2), pg_advisory_unlock_shared(2), - pg_advisory_unlock(1, 1), pg_advisory_unlock(1, 1), - pg_advisory_unlock_shared(2, 2), pg_advisory_unlock_shared(2, 2); - pg_advisory_unlock | pg_advisory_unlock | pg_advisory_unlock_shared | pg_advisory_unlock_shared | pg_advisory_unlock | pg_advisory_unlock | pg_advisory_unlock_shared | pg_advisory_unlock_shared ---------------------+--------------------+---------------------------+---------------------------+--------------------+--------------------+---------------------------+--------------------------- - t | t | t | t | t | t | t | t -(1 row) - -SELECT count(*) FROM pg_locks WHERE locktype = 'advisory'; - count -------- - 0 -(1 row) - --- .. and releasing them all at once -SELECT - pg_advisory_lock(1), pg_advisory_lock(1), - pg_advisory_lock_shared(2), pg_advisory_lock_shared(2), - pg_advisory_lock(1, 1), pg_advisory_lock(1, 1), - pg_advisory_lock_shared(2, 2), pg_advisory_lock_shared(2, 2); - pg_advisory_lock | pg_advisory_lock | pg_advisory_lock_shared | pg_advisory_lock_shared | pg_advisory_lock | pg_advisory_lock | pg_advisory_lock_shared | pg_advisory_lock_shared -------------------+------------------+-------------------------+-------------------------+------------------+------------------+-------------------------+------------------------- - | | | | | | | -(1 row) - -SELECT locktype, classid, objid, objsubid, mode, granted - FROM pg_locks WHERE locktype = 'advisory' - ORDER BY classid, objid, objsubid; - locktype | classid | objid | objsubid | mode | granted -----------+---------+-------+----------+---------------+--------- - advisory | 0 | 1 | 1 | ExclusiveLock | t - advisory | 0 | 2 | 1 | ShareLock | t - advisory | 1 | 1 | 2 | ExclusiveLock | t - advisory | 2 | 2 | 2 | ShareLock | t -(4 rows) - -SELECT pg_advisory_unlock_all(); - pg_advisory_unlock_all ------------------------- - -(1 row) - -SELECT count(*) FROM pg_locks WHERE locktype = 'advisory'; - count -------- - 0 -(1 row) - +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/indirect_toast.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/indirect_toast.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/indirect_toast.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/indirect_toast.out 2023-02-20 19:47:56.369216622 -0500 @@ -11,14 +11,10 @@ INSERT INTO indtoasttest(descr, f1, f2) VALUES('one-toasted,one-null', NULL, repeat('1234567890',50000)); -- check whether indirect tuples works on the most basic level SELECT descr, substring(make_tuple_indirect(indtoasttest)::text, 1, 200) FROM indtoasttest; - descr | substring --------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - two-compressed | (two-compressed,0,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012 - two-toasted | (two-toasted,0,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345 - one-compressed,one-null | ("one-compressed,one-null",0,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 - one-toasted,one-null | ("one-toasted,one-null",0,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123 -(4 rows) - +ERROR: function make_tuple_indirect(indtoasttest) does not exist +LINE 1: SELECT descr, substring(make_tuple_indirect(indtoasttest)::t... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. -- modification without changing varlenas UPDATE indtoasttest SET cnt = cnt +1 RETURNING substring(indtoasttest::text, 1, 200); substring @@ -93,65 +89,61 @@ EXECUTE PROCEDURE update_using_indirect(); -- modification without changing varlenas UPDATE indtoasttest SET cnt = cnt +1 RETURNING substring(indtoasttest::text, 1, 200); - substring ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - (two-compressed,5,-1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901 - (two-toasted,5,-1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234 - ("one-compressed,one-null",5,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 - ("one-toasted,one-null",5,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123 -(4 rows) - +ERROR: function make_tuple_indirect(indtoasttest) does not exist +LINE 1: NEW := make_tuple_indirect(NEW) + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. +QUERY: NEW := make_tuple_indirect(NEW) +CONTEXT: PL/pgSQL function update_using_indirect() line 3 at assignment -- modification without modifying assigned value UPDATE indtoasttest SET cnt = cnt +1, f1 = f1 RETURNING substring(indtoasttest::text, 1, 200); - substring ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - (two-compressed,6,-1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901 - (two-toasted,6,-1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234 - ("one-compressed,one-null",6,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 - ("one-toasted,one-null",6,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123 -(4 rows) - +ERROR: function make_tuple_indirect(indtoasttest) does not exist +LINE 1: NEW := make_tuple_indirect(NEW) + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. +QUERY: NEW := make_tuple_indirect(NEW) +CONTEXT: PL/pgSQL function update_using_indirect() line 3 at assignment -- modification modifying, but effectively not changing UPDATE indtoasttest SET cnt = cnt +1, f1 = f1||'' RETURNING substring(indtoasttest::text, 1, 200); - substring ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - (two-compressed,7,-1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901 - (two-toasted,7,-1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234 - ("one-compressed,one-null",7,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 - ("one-toasted,one-null",7,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123 -(4 rows) - +ERROR: function make_tuple_indirect(indtoasttest) does not exist +LINE 1: NEW := make_tuple_indirect(NEW) + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. +QUERY: NEW := make_tuple_indirect(NEW) +CONTEXT: PL/pgSQL function update_using_indirect() line 3 at assignment UPDATE indtoasttest SET cnt = cnt +1, f1 = '-'||f1||'-' RETURNING substring(indtoasttest::text, 1, 200); - substring ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - (two-compressed,8,--123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 - (two-toasted,8,--123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123 - ("one-compressed,one-null",8,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 - ("one-toasted,one-null",8,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123 -(4 rows) - +ERROR: function make_tuple_indirect(indtoasttest) does not exist +LINE 1: NEW := make_tuple_indirect(NEW) + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. +QUERY: NEW := make_tuple_indirect(NEW) +CONTEXT: PL/pgSQL function update_using_indirect() line 3 at assignment INSERT INTO indtoasttest(descr, f1, f2) VALUES('one-toasted,one-null, via indirect', repeat('1234567890',30000), NULL); +ERROR: function make_tuple_indirect(indtoasttest) does not exist +LINE 1: NEW := make_tuple_indirect(NEW) + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. +QUERY: NEW := make_tuple_indirect(NEW) +CONTEXT: PL/pgSQL function update_using_indirect() line 3 at assignment SELECT substring(indtoasttest::text, 1, 200) FROM indtoasttest; substring ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - (two-compressed,8,--123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 - (two-toasted,8,--123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123 - ("one-compressed,one-null",8,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 - ("one-toasted,one-null",8,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123 - ("one-toasted,one-null, via indirect",0,1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 -(5 rows) + (two-compressed,4,-1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901 + (two-toasted,4,-1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234 + ("one-compressed,one-null",4,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + ("one-toasted,one-null",4,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123 +(4 rows) -- check we didn't screw with main/toast tuple visibility VACUUM FREEZE indtoasttest; SELECT substring(indtoasttest::text, 1, 200) FROM indtoasttest; substring ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - (two-compressed,8,--123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 - (two-toasted,8,--123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123 - ("one-compressed,one-null",8,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 - ("one-toasted,one-null",8,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123 - ("one-toasted,one-null, via indirect",0,1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 -(5 rows) + (two-compressed,4,-1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901 + (two-toasted,4,-1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234 + ("one-compressed,one-null",4,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + ("one-toasted,one-null",4,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123 +(4 rows) DROP TABLE indtoasttest; DROP FUNCTION update_using_indirect(); diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/plancache.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/plancache.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/plancache.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/plancache.out 2023-02-20 19:48:14.729217410 -0500 @@ -2,106 +2,75 @@ -- Tests to exercise the plan caching/invalidation mechanism -- CREATE TEMP TABLE pcachetest AS SELECT * FROM int8_tbl; +ERROR: relation "int8_tbl" does not exist +LINE 1: CREATE TEMP TABLE pcachetest AS SELECT * FROM int8_tbl; + ^ -- create and use a cached plan PREPARE prepstmt AS SELECT * FROM pcachetest; +ERROR: relation "pcachetest" does not exist +LINE 1: PREPARE prepstmt AS SELECT * FROM pcachetest; + ^ EXECUTE prepstmt; - q1 | q2 -------------------+------------------- - 123 | 456 - 123 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(5 rows) - +ERROR: prepared statement "prepstmt" does not exist -- and one with parameters PREPARE prepstmt2(bigint) AS SELECT * FROM pcachetest WHERE q1 = $1; +ERROR: relation "pcachetest" does not exist +LINE 1: PREPARE prepstmt2(bigint) AS SELECT * FROM pcachetest WHERE ... + ^ EXECUTE prepstmt2(123); - q1 | q2 ------+------------------ - 123 | 456 - 123 | 4567890123456789 -(2 rows) - +ERROR: prepared statement "prepstmt2" does not exist -- invalidate the plans and see what happens DROP TABLE pcachetest; +ERROR: table "pcachetest" does not exist EXECUTE prepstmt; -ERROR: relation "pcachetest" does not exist +ERROR: prepared statement "prepstmt" does not exist EXECUTE prepstmt2(123); -ERROR: relation "pcachetest" does not exist +ERROR: prepared statement "prepstmt2" does not exist -- recreate the temp table (this demonstrates that the raw plan is -- purely textual and doesn't depend on OIDs, for instance) CREATE TEMP TABLE pcachetest AS SELECT * FROM int8_tbl ORDER BY 2; +ERROR: relation "int8_tbl" does not exist +LINE 1: CREATE TEMP TABLE pcachetest AS SELECT * FROM int8_tbl ORDER... + ^ EXECUTE prepstmt; - q1 | q2 -------------------+------------------- - 4567890123456789 | -4567890123456789 - 4567890123456789 | 123 - 123 | 456 - 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 -(5 rows) - +ERROR: prepared statement "prepstmt" does not exist EXECUTE prepstmt2(123); - q1 | q2 ------+------------------ - 123 | 456 - 123 | 4567890123456789 -(2 rows) - +ERROR: prepared statement "prepstmt2" does not exist -- prepared statements should prevent change in output tupdesc, -- since clients probably aren't expecting that to change on the fly ALTER TABLE pcachetest ADD COLUMN q3 bigint; +ERROR: relation "pcachetest" does not exist EXECUTE prepstmt; -ERROR: cached plan must not change result type +ERROR: prepared statement "prepstmt" does not exist EXECUTE prepstmt2(123); -ERROR: cached plan must not change result type +ERROR: prepared statement "prepstmt2" does not exist -- but we're nice guys and will let you undo your mistake ALTER TABLE pcachetest DROP COLUMN q3; +ERROR: relation "pcachetest" does not exist EXECUTE prepstmt; - q1 | q2 -------------------+------------------- - 4567890123456789 | -4567890123456789 - 4567890123456789 | 123 - 123 | 456 - 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 -(5 rows) - +ERROR: prepared statement "prepstmt" does not exist EXECUTE prepstmt2(123); - q1 | q2 ------+------------------ - 123 | 456 - 123 | 4567890123456789 -(2 rows) - +ERROR: prepared statement "prepstmt2" does not exist -- Try it with a view, which isn't directly used in the resulting plan -- but should trigger invalidation anyway CREATE TEMP VIEW pcacheview AS SELECT * FROM pcachetest; +ERROR: relation "pcachetest" does not exist +LINE 2: SELECT * FROM pcachetest; + ^ PREPARE vprep AS SELECT * FROM pcacheview; +ERROR: relation "pcacheview" does not exist +LINE 1: PREPARE vprep AS SELECT * FROM pcacheview; + ^ EXECUTE vprep; - q1 | q2 -------------------+------------------- - 4567890123456789 | -4567890123456789 - 4567890123456789 | 123 - 123 | 456 - 123 | 4567890123456789 - 4567890123456789 | 4567890123456789 -(5 rows) - +ERROR: prepared statement "vprep" does not exist CREATE OR REPLACE TEMP VIEW pcacheview AS SELECT q1, q2/2 AS q2 FROM pcachetest; +ERROR: relation "pcachetest" does not exist +LINE 2: SELECT q1, q2/2 AS q2 FROM pcachetest; + ^ EXECUTE vprep; - q1 | q2 -------------------+------------------- - 4567890123456789 | -2283945061728394 - 4567890123456789 | 61 - 123 | 228 - 123 | 2283945061728394 - 4567890123456789 | 2283945061728394 -(5 rows) - +ERROR: prepared statement "vprep" does not exist -- Check basic SPI plan invalidation create function cache_test(int) returns int as $$ declare total int; diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/limit.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/limit.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/limit.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/limit.out 2023-02-20 19:48:14.979217421 -0500 @@ -111,233 +111,91 @@ -- Test null limit and offset. The planner would discard a simple null -- constant, so to ensure executor is exercised, do this: select * from int8_tbl limit (case when random() < 0.5 then null::bigint end); - q1 | q2 -------------------+------------------- - 123 | 456 - 123 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(5 rows) - +ERROR: relation "int8_tbl" does not exist +LINE 1: select * from int8_tbl limit (case when random() < 0.5 then ... + ^ select * from int8_tbl offset (case when random() < 0.5 then null::bigint end); - q1 | q2 -------------------+------------------- - 123 | 456 - 123 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(5 rows) - +ERROR: relation "int8_tbl" does not exist +LINE 1: select * from int8_tbl offset (case when random() < 0.5 then... + ^ -- Test assorted cases involving backwards fetch from a LIMIT plan node begin; declare c1 cursor for select * from int8_tbl limit 10; +ERROR: relation "int8_tbl" does not exist +LINE 1: declare c1 cursor for select * from int8_tbl limit 10; + ^ fetch all in c1; - q1 | q2 -------------------+------------------- - 123 | 456 - 123 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(5 rows) - +ERROR: current transaction is aborted, commands ignored until end of transaction block fetch 1 in c1; - q1 | q2 -----+---- -(0 rows) - +ERROR: current transaction is aborted, commands ignored until end of transaction block fetch backward 1 in c1; - q1 | q2 -------------------+------------------- - 4567890123456789 | -4567890123456789 -(1 row) - +ERROR: current transaction is aborted, commands ignored until end of transaction block fetch backward all in c1; - q1 | q2 -------------------+------------------ - 4567890123456789 | 4567890123456789 - 4567890123456789 | 123 - 123 | 4567890123456789 - 123 | 456 -(4 rows) - +ERROR: current transaction is aborted, commands ignored until end of transaction block fetch backward 1 in c1; - q1 | q2 -----+---- -(0 rows) - +ERROR: current transaction is aborted, commands ignored until end of transaction block fetch all in c1; - q1 | q2 -------------------+------------------- - 123 | 456 - 123 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(5 rows) - +ERROR: current transaction is aborted, commands ignored until end of transaction block declare c2 cursor for select * from int8_tbl limit 3; +ERROR: current transaction is aborted, commands ignored until end of transaction block fetch all in c2; - q1 | q2 -------------------+------------------ - 123 | 456 - 123 | 4567890123456789 - 4567890123456789 | 123 -(3 rows) - +ERROR: current transaction is aborted, commands ignored until end of transaction block fetch 1 in c2; - q1 | q2 -----+---- -(0 rows) - +ERROR: current transaction is aborted, commands ignored until end of transaction block fetch backward 1 in c2; - q1 | q2 -------------------+----- - 4567890123456789 | 123 -(1 row) - +ERROR: current transaction is aborted, commands ignored until end of transaction block fetch backward all in c2; - q1 | q2 ------+------------------ - 123 | 4567890123456789 - 123 | 456 -(2 rows) - +ERROR: current transaction is aborted, commands ignored until end of transaction block fetch backward 1 in c2; - q1 | q2 -----+---- -(0 rows) - +ERROR: current transaction is aborted, commands ignored until end of transaction block fetch all in c2; - q1 | q2 -------------------+------------------ - 123 | 456 - 123 | 4567890123456789 - 4567890123456789 | 123 -(3 rows) - +ERROR: current transaction is aborted, commands ignored until end of transaction block declare c3 cursor for select * from int8_tbl offset 3; +ERROR: current transaction is aborted, commands ignored until end of transaction block fetch all in c3; - q1 | q2 -------------------+------------------- - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(2 rows) - +ERROR: current transaction is aborted, commands ignored until end of transaction block fetch 1 in c3; - q1 | q2 -----+---- -(0 rows) - +ERROR: current transaction is aborted, commands ignored until end of transaction block fetch backward 1 in c3; - q1 | q2 -------------------+------------------- - 4567890123456789 | -4567890123456789 -(1 row) - +ERROR: current transaction is aborted, commands ignored until end of transaction block fetch backward all in c3; - q1 | q2 -------------------+------------------ - 4567890123456789 | 4567890123456789 -(1 row) - +ERROR: current transaction is aborted, commands ignored until end of transaction block fetch backward 1 in c3; - q1 | q2 -----+---- -(0 rows) - +ERROR: current transaction is aborted, commands ignored until end of transaction block fetch all in c3; - q1 | q2 -------------------+------------------- - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(2 rows) - +ERROR: current transaction is aborted, commands ignored until end of transaction block declare c4 cursor for select * from int8_tbl offset 10; +ERROR: current transaction is aborted, commands ignored until end of transaction block fetch all in c4; - q1 | q2 -----+---- -(0 rows) - +ERROR: current transaction is aborted, commands ignored until end of transaction block fetch 1 in c4; - q1 | q2 -----+---- -(0 rows) - +ERROR: current transaction is aborted, commands ignored until end of transaction block fetch backward 1 in c4; - q1 | q2 -----+---- -(0 rows) - +ERROR: current transaction is aborted, commands ignored until end of transaction block fetch backward all in c4; - q1 | q2 -----+---- -(0 rows) - +ERROR: current transaction is aborted, commands ignored until end of transaction block fetch backward 1 in c4; - q1 | q2 -----+---- -(0 rows) - +ERROR: current transaction is aborted, commands ignored until end of transaction block fetch all in c4; - q1 | q2 -----+---- -(0 rows) - +ERROR: current transaction is aborted, commands ignored until end of transaction block declare c5 cursor for select * from int8_tbl order by q1 fetch first 2 rows with ties; +ERROR: current transaction is aborted, commands ignored until end of transaction block fetch all in c5; - q1 | q2 ------+------------------ - 123 | 456 - 123 | 4567890123456789 -(2 rows) - +ERROR: current transaction is aborted, commands ignored until end of transaction block fetch 1 in c5; - q1 | q2 -----+---- -(0 rows) - +ERROR: current transaction is aborted, commands ignored until end of transaction block fetch backward 1 in c5; - q1 | q2 ------+------------------ - 123 | 4567890123456789 -(1 row) - +ERROR: current transaction is aborted, commands ignored until end of transaction block fetch backward 1 in c5; - q1 | q2 ------+----- - 123 | 456 -(1 row) - +ERROR: current transaction is aborted, commands ignored until end of transaction block fetch all in c5; - q1 | q2 ------+------------------ - 123 | 4567890123456789 -(1 row) - +ERROR: current transaction is aborted, commands ignored until end of transaction block fetch backward all in c5; - q1 | q2 ------+------------------ - 123 | 4567890123456789 - 123 | 456 -(2 rows) - +ERROR: current transaction is aborted, commands ignored until end of transaction block fetch all in c5; - q1 | q2 ------+------------------ - 123 | 456 - 123 | 4567890123456789 -(2 rows) - +ERROR: current transaction is aborted, commands ignored until end of transaction block fetch backward all in c5; - q1 | q2 ------+------------------ - 123 | 4567890123456789 - 123 | 456 -(2 rows) - +ERROR: current transaction is aborted, commands ignored until end of transaction block rollback; -- Stress test for variable LIMIT in conjunction with bounded-heap sorting SELECT diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/plpgsql.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/plpgsql.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/plpgsql.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/plpgsql.out 2023-02-20 19:48:24.379217824 -0500 @@ -3175,15 +3175,11 @@ end; $$ language plpgsql; select * from sc_test(); - sc_test -------------- - -2147483647 - 2147483647 - -123456 - 123456 - 0 -(5 rows) - +ERROR: relation "int4_tbl" does not exist +LINE 1: select f1 from int4_tbl + ^ +QUERY: select f1 from int4_tbl +CONTEXT: PL/pgSQL function sc_test() line 6 at OPEN create or replace function sc_test() returns setof integer as $$ declare c no scroll cursor for select f1 from int4_tbl; @@ -3199,9 +3195,11 @@ end; $$ language plpgsql; select * from sc_test(); -- fails because of NO SCROLL specification -ERROR: cursor can only scan forward -HINT: Declare it with SCROLL option to enable backward scan. -CONTEXT: PL/pgSQL function sc_test() line 7 at FETCH +ERROR: relation "int4_tbl" does not exist +LINE 1: select f1 from int4_tbl + ^ +QUERY: select f1 from int4_tbl +CONTEXT: PL/pgSQL function sc_test() line 6 at OPEN create or replace function sc_test() returns setof integer as $$ declare c refcursor; @@ -3217,15 +3215,11 @@ end; $$ language plpgsql; select * from sc_test(); - sc_test -------------- - -2147483647 - 2147483647 - -123456 - 123456 - 0 -(5 rows) - +ERROR: relation "int4_tbl" does not exist +LINE 1: select f1 from int4_tbl + ^ +QUERY: select f1 from int4_tbl +CONTEXT: PL/pgSQL function sc_test() line 6 at OPEN create or replace function sc_test() returns setof integer as $$ declare c refcursor; @@ -3241,13 +3235,11 @@ end; $$ language plpgsql; select * from sc_test(); - sc_test -------------- - -2147483647 - -123456 - 0 -(3 rows) - +ERROR: relation "int4_tbl" does not exist +LINE 1: select f1 from int4_tbl + ^ +QUERY: select f1 from int4_tbl +CONTEXT: PL/pgSQL function sc_test() line 6 at OPEN create or replace function sc_test() returns setof integer as $$ declare c refcursor; @@ -3264,12 +3256,11 @@ end; $$ language plpgsql; select * from sc_test(); - sc_test -------------- - -2147483647 - 123456 -(2 rows) - +ERROR: relation "int4_tbl" does not exist +LINE 1: select f1 from int4_tbl + ^ +QUERY: select f1 from int4_tbl +CONTEXT: PL/pgSQL function sc_test() line 6 at OPEN create or replace function sc_test() returns setof integer as $$ declare c cursor for select * from generate_series(1, 10); @@ -4666,13 +4657,12 @@ end loop; end; $$ language plpgsql; +ERROR: type "int8_tbl" does not exist select * from conflict_test(); -ERROR: column reference "q1" is ambiguous -LINE 1: select q1,q2 from int8_tbl - ^ -DETAIL: It could refer to either a PL/pgSQL variable or a table column. -QUERY: select q1,q2 from int8_tbl -CONTEXT: PL/pgSQL function conflict_test() line 5 at FOR over SELECT rows +ERROR: function conflict_test() does not exist +LINE 1: select * from conflict_test(); + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. create or replace function conflict_test() returns setof int8_tbl as $$ #variable_conflict use_variable declare r record; @@ -4683,16 +4673,12 @@ end loop; end; $$ language plpgsql; +ERROR: type "int8_tbl" does not exist select * from conflict_test(); - q1 | q2 -----+------------------- - 42 | 456 - 42 | 4567890123456789 - 42 | 123 - 42 | 4567890123456789 - 42 | -4567890123456789 -(5 rows) - +ERROR: function conflict_test() does not exist +LINE 1: select * from conflict_test(); + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. create or replace function conflict_test() returns setof int8_tbl as $$ #variable_conflict use_column declare r record; @@ -4703,17 +4689,14 @@ end loop; end; $$ language plpgsql; +ERROR: type "int8_tbl" does not exist select * from conflict_test(); - q1 | q2 -------------------+------------------- - 123 | 456 - 123 | 4567890123456789 - 4567890123456789 | 123 - 4567890123456789 | 4567890123456789 - 4567890123456789 | -4567890123456789 -(5 rows) - +ERROR: function conflict_test() does not exist +LINE 1: select * from conflict_test(); + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. drop function conflict_test(); +ERROR: function conflict_test() does not exist -- Check that an unreserved keyword can be used as a variable name create function unreserved_test() returns int as $$ declare diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/rangefuncs.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/rangefuncs.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/rangefuncs.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/rangefuncs.out 2023-02-20 19:48:41.969218579 -0500 @@ -1404,1044 +1404,7 @@ ) AS ss1 ON TRUE FULL JOIN generate_series(1, v1.r1) AS gs4 ON FALSE ) AS ss0 ON TRUE; - r1 | gs1 | gs2 | gs3 | gs4 -----+-----+-----+-----+----- - 1 | | | | 1 - 1 | 1 | 1 | 1 | - 2 | | | | 1 - 2 | | | | 2 - 2 | 1 | 1 | 1 | - 2 | 2 | 1 | 1 | - 2 | 2 | 2 | 1 | - 2 | 2 | 2 | 2 | -(8 rows) - -DROP FUNCTION rngfunc_sql(int,int); -DROP FUNCTION rngfunc_mat(int,int); -DROP SEQUENCE rngfunc_rescan_seq1; -DROP SEQUENCE rngfunc_rescan_seq2; --- --- Test cases involving OUT parameters --- -CREATE FUNCTION rngfunc(in f1 int, out f2 int) -AS 'select $1+1' LANGUAGE sql; -SELECT rngfunc(42); - rngfunc ---------- - 43 -(1 row) - -SELECT * FROM rngfunc(42); - f2 ----- - 43 -(1 row) - -SELECT * FROM rngfunc(42) AS p(x); - x ----- - 43 -(1 row) - --- explicit spec of return type is OK -CREATE OR REPLACE FUNCTION rngfunc(in f1 int, out f2 int) RETURNS int -AS 'select $1+1' LANGUAGE sql; --- error, wrong result type -CREATE OR REPLACE FUNCTION rngfunc(in f1 int, out f2 int) RETURNS float -AS 'select $1+1' LANGUAGE sql; -ERROR: function result type must be integer because of OUT parameters --- with multiple OUT params you must get a RECORD result -CREATE OR REPLACE FUNCTION rngfunc(in f1 int, out f2 int, out f3 text) RETURNS int -AS 'select $1+1' LANGUAGE sql; -ERROR: function result type must be record because of OUT parameters -CREATE OR REPLACE FUNCTION rngfunc(in f1 int, out f2 int, out f3 text) -RETURNS record -AS 'select $1+1' LANGUAGE sql; -ERROR: cannot change return type of existing function -HINT: Use DROP FUNCTION rngfunc(integer) first. -CREATE OR REPLACE FUNCTION rngfuncr(in f1 int, out f2 int, out text) -AS $$select $1-1, $1::text || 'z'$$ LANGUAGE sql; -SELECT f1, rngfuncr(f1) FROM int4_tbl; - f1 | rngfuncr --------------+---------------------------- - 0 | (-1,0z) - 123456 | (123455,123456z) - -123456 | (-123457,-123456z) - 2147483647 | (2147483646,2147483647z) - -2147483647 | (-2147483648,-2147483647z) -(5 rows) - -SELECT * FROM rngfuncr(42); - f2 | column2 -----+--------- - 41 | 42z -(1 row) - -SELECT * FROM rngfuncr(42) AS p(a,b); - a | b -----+----- - 41 | 42z -(1 row) - -CREATE OR REPLACE FUNCTION rngfuncb(in f1 int, inout f2 int, out text) -AS $$select $2-1, $1::text || 'z'$$ LANGUAGE sql; -SELECT f1, rngfuncb(f1, f1/2) FROM int4_tbl; - f1 | rngfuncb --------------+---------------------------- - 0 | (-1,0z) - 123456 | (61727,123456z) - -123456 | (-61729,-123456z) - 2147483647 | (1073741822,2147483647z) - -2147483647 | (-1073741824,-2147483647z) -(5 rows) - -SELECT * FROM rngfuncb(42, 99); - f2 | column2 -----+--------- - 98 | 42z -(1 row) - -SELECT * FROM rngfuncb(42, 99) AS p(a,b); - a | b -----+----- - 98 | 42z -(1 row) - --- Can reference function with or without OUT params for DROP, etc -DROP FUNCTION rngfunc(int); -DROP FUNCTION rngfuncr(in f2 int, out f1 int, out text); -DROP FUNCTION rngfuncb(in f1 int, inout f2 int); --- --- For my next trick, polymorphic OUT parameters --- -CREATE FUNCTION dup (f1 anyelement, f2 out anyelement, f3 out anyarray) -AS 'select $1, array[$1,$1]' LANGUAGE sql; -SELECT dup(22); - dup ----------------- - (22,"{22,22}") -(1 row) - -SELECT dup('xyz'); -- fails -ERROR: could not determine polymorphic type because input has type unknown -SELECT dup('xyz'::text); - dup -------------------- - (xyz,"{xyz,xyz}") -(1 row) - -SELECT * FROM dup('xyz'::text); - f2 | f3 ------+----------- - xyz | {xyz,xyz} -(1 row) - --- fails, as we are attempting to rename first argument -CREATE OR REPLACE FUNCTION dup (inout f2 anyelement, out f3 anyarray) -AS 'select $1, array[$1,$1]' LANGUAGE sql; -ERROR: cannot change name of input parameter "f1" -HINT: Use DROP FUNCTION dup(anyelement) first. -DROP FUNCTION dup(anyelement); --- equivalent behavior, though different name exposed for input arg -CREATE OR REPLACE FUNCTION dup (inout f2 anyelement, out f3 anyarray) -AS 'select $1, array[$1,$1]' LANGUAGE sql; -SELECT dup(22); - dup ----------------- - (22,"{22,22}") -(1 row) - -DROP FUNCTION dup(anyelement); --- fails, no way to deduce outputs -CREATE FUNCTION bad (f1 int, out f2 anyelement, out f3 anyarray) -AS 'select $1, array[$1,$1]' LANGUAGE sql; -ERROR: cannot determine result data type -DETAIL: A result of type anyelement requires at least one input of type anyelement, anyarray, anynonarray, anyenum, anyrange, or anymultirange. -CREATE FUNCTION dup (f1 anycompatible, f2 anycompatiblearray, f3 out anycompatible, f4 out anycompatiblearray) -AS 'select $1, $2' LANGUAGE sql; -SELECT dup(22, array[44]); - dup ------------ - (22,{44}) -(1 row) - -SELECT dup(4.5, array[44]); - dup ------------- - (4.5,{44}) -(1 row) - -SELECT dup(22, array[44::bigint]); - dup ------------ - (22,{44}) -(1 row) - -SELECT *, pg_typeof(f3), pg_typeof(f4) FROM dup(22, array[44::bigint]); - f3 | f4 | pg_typeof | pg_typeof -----+------+-----------+----------- - 22 | {44} | bigint | bigint[] -(1 row) - -DROP FUNCTION dup(f1 anycompatible, f2 anycompatiblearray); -CREATE FUNCTION dup (f1 anycompatiblerange, f2 out anycompatible, f3 out anycompatiblearray, f4 out anycompatiblerange) -AS 'select lower($1), array[lower($1), upper($1)], $1' LANGUAGE sql; -SELECT dup(int4range(4,7)); - dup ---------------------- - (4,"{4,7}","[4,7)") -(1 row) - -SELECT dup(numrange(4,7)); - dup ---------------------- - (4,"{4,7}","[4,7)") -(1 row) - -SELECT dup(textrange('aaa', 'bbb')); - dup -------------------------------- - (aaa,"{aaa,bbb}","[aaa,bbb)") -(1 row) - -DROP FUNCTION dup(f1 anycompatiblerange); --- fails, no way to deduce outputs -CREATE FUNCTION bad (f1 anyarray, out f2 anycompatible, out f3 anycompatiblearray) -AS 'select $1, array[$1,$1]' LANGUAGE sql; -ERROR: cannot determine result data type -DETAIL: A result of type anycompatible requires at least one input of type anycompatible, anycompatiblearray, anycompatiblenonarray, anycompatiblerange, or anycompatiblemultirange. --- --- table functions --- -CREATE OR REPLACE FUNCTION rngfunc() -RETURNS TABLE(a int) -AS $$ SELECT a FROM generate_series(1,5) a(a) $$ LANGUAGE sql; -SELECT * FROM rngfunc(); - a ---- - 1 - 2 - 3 - 4 - 5 -(5 rows) - -DROP FUNCTION rngfunc(); -CREATE OR REPLACE FUNCTION rngfunc(int) -RETURNS TABLE(a int, b int) -AS $$ SELECT a, b - FROM generate_series(1,$1) a(a), - generate_series(1,$1) b(b) $$ LANGUAGE sql; -SELECT * FROM rngfunc(3); - a | b ----+--- - 1 | 1 - 1 | 2 - 1 | 3 - 2 | 1 - 2 | 2 - 2 | 3 - 3 | 1 - 3 | 2 - 3 | 3 -(9 rows) - -DROP FUNCTION rngfunc(int); --- case that causes change of typmod knowledge during inlining -CREATE OR REPLACE FUNCTION rngfunc() -RETURNS TABLE(a varchar(5)) -AS $$ SELECT 'hello'::varchar(5) $$ LANGUAGE sql STABLE; -SELECT * FROM rngfunc() GROUP BY 1; - a -------- - hello -(1 row) - -DROP FUNCTION rngfunc(); --- --- some tests on SQL functions with RETURNING --- -create temp table tt(f1 serial, data text); -create function insert_tt(text) returns int as -$$ insert into tt(data) values($1) returning f1 $$ -language sql; -select insert_tt('foo'); - insert_tt ------------ - 1 -(1 row) - -select insert_tt('bar'); - insert_tt ------------ - 2 -(1 row) - -select * from tt; - f1 | data -----+------ - 1 | foo - 2 | bar -(2 rows) - --- insert will execute to completion even if function needs just 1 row -create or replace function insert_tt(text) returns int as -$$ insert into tt(data) values($1),($1||$1) returning f1 $$ -language sql; -select insert_tt('fool'); - insert_tt ------------ - 3 -(1 row) - -select * from tt; - f1 | data -----+---------- - 1 | foo - 2 | bar - 3 | fool - 4 | foolfool -(4 rows) - --- setof does what's expected -create or replace function insert_tt2(text,text) returns setof int as -$$ insert into tt(data) values($1),($2) returning f1 $$ -language sql; -select insert_tt2('foolish','barrish'); - insert_tt2 ------------- - 5 - 6 -(2 rows) - -select * from insert_tt2('baz','quux'); - insert_tt2 ------------- - 7 - 8 -(2 rows) - -select * from tt; - f1 | data -----+---------- - 1 | foo - 2 | bar - 3 | fool - 4 | foolfool - 5 | foolish - 6 | barrish - 7 | baz - 8 | quux -(8 rows) - --- limit doesn't prevent execution to completion -select insert_tt2('foolish','barrish') limit 1; - insert_tt2 ------------- - 9 -(1 row) - -select * from tt; - f1 | data -----+---------- - 1 | foo - 2 | bar - 3 | fool - 4 | foolfool - 5 | foolish - 6 | barrish - 7 | baz - 8 | quux - 9 | foolish - 10 | barrish -(10 rows) - --- triggers will fire, too -create function noticetrigger() returns trigger as $$ -begin - raise notice 'noticetrigger % %', new.f1, new.data; - return null; -end $$ language plpgsql; -create trigger tnoticetrigger after insert on tt for each row -execute procedure noticetrigger(); -select insert_tt2('foolme','barme') limit 1; -NOTICE: noticetrigger 11 foolme -NOTICE: noticetrigger 12 barme - insert_tt2 ------------- - 11 -(1 row) - -select * from tt; - f1 | data -----+---------- - 1 | foo - 2 | bar - 3 | fool - 4 | foolfool - 5 | foolish - 6 | barrish - 7 | baz - 8 | quux - 9 | foolish - 10 | barrish - 11 | foolme - 12 | barme -(12 rows) - --- and rules work -create temp table tt_log(f1 int, data text); -create rule insert_tt_rule as on insert to tt do also - insert into tt_log values(new.*); -select insert_tt2('foollog','barlog') limit 1; -NOTICE: noticetrigger 13 foollog -NOTICE: noticetrigger 14 barlog - insert_tt2 ------------- - 13 -(1 row) - -select * from tt; - f1 | data -----+---------- - 1 | foo - 2 | bar - 3 | fool - 4 | foolfool - 5 | foolish - 6 | barrish - 7 | baz - 8 | quux - 9 | foolish - 10 | barrish - 11 | foolme - 12 | barme - 13 | foollog - 14 | barlog -(14 rows) - --- note that nextval() gets executed a second time in the rule expansion, --- which is expected. -select * from tt_log; - f1 | data -----+--------- - 15 | foollog - 16 | barlog -(2 rows) - --- test case for a whole-row-variable bug -create function rngfunc1(n integer, out a text, out b text) - returns setof record - language sql - as $$ select 'foo ' || i, 'bar ' || i from generate_series(1,$1) i $$; -set work_mem='64kB'; -select t.a, t, t.a from rngfunc1(10000) t limit 1; - a | t | a --------+-------------------+------- - foo 1 | ("foo 1","bar 1") | foo 1 -(1 row) - -reset work_mem; -select t.a, t, t.a from rngfunc1(10000) t limit 1; - a | t | a --------+-------------------+------- - foo 1 | ("foo 1","bar 1") | foo 1 -(1 row) - -drop function rngfunc1(n integer); --- test use of SQL functions returning record --- this is supported in some cases where the query doesn't specify --- the actual record type ... -create function array_to_set(anyarray) returns setof record as $$ - select i AS "index", $1[i] AS "value" from generate_subscripts($1, 1) i -$$ language sql strict immutable; -select array_to_set(array['one', 'two']); - array_to_set --------------- - (1,one) - (2,two) -(2 rows) - -select * from array_to_set(array['one', 'two']) as t(f1 int,f2 text); - f1 | f2 -----+----- - 1 | one - 2 | two -(2 rows) - -select * from array_to_set(array['one', 'two']); -- fail -ERROR: a column definition list is required for functions returning "record" -LINE 1: select * from array_to_set(array['one', 'two']); - ^ --- after-the-fact coercion of the columns is now possible, too -select * from array_to_set(array['one', 'two']) as t(f1 numeric(4,2),f2 text); - f1 | f2 -------+----- - 1.00 | one - 2.00 | two -(2 rows) - --- and if it doesn't work, you get a compile-time not run-time error -select * from array_to_set(array['one', 'two']) as t(f1 point,f2 text); -ERROR: return type mismatch in function declared to return record -DETAIL: Final statement returns integer instead of point at column 1. -CONTEXT: SQL function "array_to_set" during startup --- with "strict", this function can't be inlined in FROM -explain (verbose, costs off) - select * from array_to_set(array['one', 'two']) as t(f1 numeric(4,2),f2 text); - QUERY PLAN ----------------------------------------------------- - Function Scan on public.array_to_set t - Output: f1, f2 - Function Call: array_to_set('{one,two}'::text[]) -(3 rows) - --- but without, it can be: -create or replace function array_to_set(anyarray) returns setof record as $$ - select i AS "index", $1[i] AS "value" from generate_subscripts($1, 1) i -$$ language sql immutable; -select array_to_set(array['one', 'two']); - array_to_set --------------- - (1,one) - (2,two) -(2 rows) - -select * from array_to_set(array['one', 'two']) as t(f1 int,f2 text); - f1 | f2 -----+----- - 1 | one - 2 | two -(2 rows) - -select * from array_to_set(array['one', 'two']) as t(f1 numeric(4,2),f2 text); - f1 | f2 -------+----- - 1.00 | one - 2.00 | two -(2 rows) - -select * from array_to_set(array['one', 'two']) as t(f1 point,f2 text); -ERROR: return type mismatch in function declared to return record -DETAIL: Final statement returns integer instead of point at column 1. -CONTEXT: SQL function "array_to_set" during inlining -explain (verbose, costs off) - select * from array_to_set(array['one', 'two']) as t(f1 numeric(4,2),f2 text); - QUERY PLAN --------------------------------------------------------------- - Function Scan on pg_catalog.generate_subscripts i - Output: i.i, ('{one,two}'::text[])[i.i] - Function Call: generate_subscripts('{one,two}'::text[], 1) -(3 rows) - -create temp table rngfunc(f1 int8, f2 int8); -create function testrngfunc() returns record as $$ - insert into rngfunc values (1,2) returning *; -$$ language sql; -select testrngfunc(); - testrngfunc -------------- - (1,2) -(1 row) - -select * from testrngfunc() as t(f1 int8,f2 int8); - f1 | f2 -----+---- - 1 | 2 -(1 row) - -select * from testrngfunc(); -- fail -ERROR: a column definition list is required for functions returning "record" -LINE 1: select * from testrngfunc(); - ^ -drop function testrngfunc(); -create function testrngfunc() returns setof record as $$ - insert into rngfunc values (1,2), (3,4) returning *; -$$ language sql; -select testrngfunc(); - testrngfunc -------------- - (1,2) - (3,4) -(2 rows) - -select * from testrngfunc() as t(f1 int8,f2 int8); - f1 | f2 -----+---- - 1 | 2 - 3 | 4 -(2 rows) - -select * from testrngfunc(); -- fail -ERROR: a column definition list is required for functions returning "record" -LINE 1: select * from testrngfunc(); - ^ -drop function testrngfunc(); --- Check that typmod imposed by a composite type is honored -create type rngfunc_type as (f1 numeric(35,6), f2 numeric(35,2)); -create function testrngfunc() returns rngfunc_type as $$ - select 7.136178319899999964, 7.136178319899999964; -$$ language sql immutable; -explain (verbose, costs off) -select testrngfunc(); - QUERY PLAN -------------------------------------------- - Result - Output: '(7.136178,7.14)'::rngfunc_type -(2 rows) - -select testrngfunc(); - testrngfunc ------------------ - (7.136178,7.14) -(1 row) - -explain (verbose, costs off) -select * from testrngfunc(); - QUERY PLAN --------------------------------------------------- - Function Scan on testrngfunc - Output: f1, f2 - Function Call: '(7.136178,7.14)'::rngfunc_type -(3 rows) - -select * from testrngfunc(); - f1 | f2 -----------+------ - 7.136178 | 7.14 -(1 row) - -create or replace function testrngfunc() returns rngfunc_type as $$ - select 7.136178319899999964, 7.136178319899999964; -$$ language sql volatile; -explain (verbose, costs off) -select testrngfunc(); - QUERY PLAN -------------------------- - Result - Output: testrngfunc() -(2 rows) - -select testrngfunc(); - testrngfunc ------------------ - (7.136178,7.14) -(1 row) - -explain (verbose, costs off) -select * from testrngfunc(); - QUERY PLAN -------------------------------------- - Function Scan on public.testrngfunc - Output: f1, f2 - Function Call: testrngfunc() -(3 rows) - -select * from testrngfunc(); - f1 | f2 -----------+------ - 7.136178 | 7.14 -(1 row) - -drop function testrngfunc(); -create function testrngfunc() returns setof rngfunc_type as $$ - select 7.136178319899999964, 7.136178319899999964; -$$ language sql immutable; -explain (verbose, costs off) -select testrngfunc(); - QUERY PLAN -------------------------- - ProjectSet - Output: testrngfunc() - -> Result -(3 rows) - -select testrngfunc(); - testrngfunc ------------------ - (7.136178,7.14) -(1 row) - -explain (verbose, costs off) -select * from testrngfunc(); - QUERY PLAN --------------------------------------------------------- - Result - Output: 7.136178::numeric(35,6), 7.14::numeric(35,2) -(2 rows) - -select * from testrngfunc(); - f1 | f2 -----------+------ - 7.136178 | 7.14 -(1 row) - -create or replace function testrngfunc() returns setof rngfunc_type as $$ - select 7.136178319899999964, 7.136178319899999964; -$$ language sql volatile; -explain (verbose, costs off) -select testrngfunc(); - QUERY PLAN -------------------------- - ProjectSet - Output: testrngfunc() - -> Result -(3 rows) - -select testrngfunc(); - testrngfunc ------------------ - (7.136178,7.14) -(1 row) - -explain (verbose, costs off) -select * from testrngfunc(); - QUERY PLAN -------------------------------------- - Function Scan on public.testrngfunc - Output: f1, f2 - Function Call: testrngfunc() -(3 rows) - -select * from testrngfunc(); - f1 | f2 -----------+------ - 7.136178 | 7.14 -(1 row) - -create or replace function testrngfunc() returns setof rngfunc_type as $$ - select 1, 2 union select 3, 4 order by 1; -$$ language sql immutable; -explain (verbose, costs off) -select testrngfunc(); - QUERY PLAN -------------------------- - ProjectSet - Output: testrngfunc() - -> Result -(3 rows) - -select testrngfunc(); - testrngfunc ------------------ - (1.000000,2.00) - (3.000000,4.00) -(2 rows) - -explain (verbose, costs off) -select * from testrngfunc(); - QUERY PLAN ----------------------------------------------------------- - Subquery Scan on "*SELECT*" - Output: "*SELECT*"."?column?", "*SELECT*"."?column?_1" - -> Unique - Output: (1), (2) - -> Sort - Output: (1), (2) - Sort Key: (1), (2) - -> Append - -> Result - Output: 1, 2 - -> Result - Output: 3, 4 -(12 rows) - -select * from testrngfunc(); - f1 | f2 -----------+------ - 1.000000 | 2.00 - 3.000000 | 4.00 -(2 rows) - --- Check a couple of error cases while we're here -select * from testrngfunc() as t(f1 int8,f2 int8); -- fail, composite result -ERROR: a column definition list is redundant for a function returning a named composite type -LINE 1: select * from testrngfunc() as t(f1 int8,f2 int8); - ^ -select * from pg_get_keywords() as t(f1 int8,f2 int8); -- fail, OUT params -ERROR: a column definition list is redundant for a function with OUT parameters -LINE 1: select * from pg_get_keywords() as t(f1 int8,f2 int8); - ^ -select * from sin(3) as t(f1 int8,f2 int8); -- fail, scalar result type -ERROR: a column definition list is only allowed for functions returning "record" -LINE 1: select * from sin(3) as t(f1 int8,f2 int8); - ^ -drop type rngfunc_type cascade; -NOTICE: drop cascades to function testrngfunc() --- --- Check some cases involving added/dropped columns in a rowtype result --- -create temp table users (userid text, seq int, email text, todrop bool, moredrop int, enabled bool); -insert into users values ('id',1,'email',true,11,true); -insert into users values ('id2',2,'email2',true,12,true); -alter table users drop column todrop; -create or replace function get_first_user() returns users as -$$ SELECT * FROM users ORDER BY userid LIMIT 1; $$ -language sql stable; -SELECT get_first_user(); - get_first_user -------------------- - (id,1,email,11,t) -(1 row) - -SELECT * FROM get_first_user(); - userid | seq | email | moredrop | enabled ---------+-----+-------+----------+--------- - id | 1 | email | 11 | t -(1 row) - -create or replace function get_users() returns setof users as -$$ SELECT * FROM users ORDER BY userid; $$ -language sql stable; -SELECT get_users(); - get_users ---------------------- - (id,1,email,11,t) - (id2,2,email2,12,t) -(2 rows) - -SELECT * FROM get_users(); - userid | seq | email | moredrop | enabled ---------+-----+--------+----------+--------- - id | 1 | email | 11 | t - id2 | 2 | email2 | 12 | t -(2 rows) - -SELECT * FROM get_users() WITH ORDINALITY; -- make sure ordinality copes - userid | seq | email | moredrop | enabled | ordinality ---------+-----+--------+----------+---------+------------ - id | 1 | email | 11 | t | 1 - id2 | 2 | email2 | 12 | t | 2 -(2 rows) - --- multiple functions vs. dropped columns -SELECT * FROM ROWS FROM(generate_series(10,11), get_users()) WITH ORDINALITY; - generate_series | userid | seq | email | moredrop | enabled | ordinality ------------------+--------+-----+--------+----------+---------+------------ - 10 | id | 1 | email | 11 | t | 1 - 11 | id2 | 2 | email2 | 12 | t | 2 -(2 rows) - -SELECT * FROM ROWS FROM(get_users(), generate_series(10,11)) WITH ORDINALITY; - userid | seq | email | moredrop | enabled | generate_series | ordinality ---------+-----+--------+----------+---------+-----------------+------------ - id | 1 | email | 11 | t | 10 | 1 - id2 | 2 | email2 | 12 | t | 11 | 2 -(2 rows) - --- check that we can cope with post-parsing changes in rowtypes -create temp view usersview as -SELECT * FROM ROWS FROM(get_users(), generate_series(10,11)) WITH ORDINALITY; -select * from usersview; - userid | seq | email | moredrop | enabled | generate_series | ordinality ---------+-----+--------+----------+---------+-----------------+------------ - id | 1 | email | 11 | t | 10 | 1 - id2 | 2 | email2 | 12 | t | 11 | 2 -(2 rows) - -alter table users add column junk text; -select * from usersview; - userid | seq | email | moredrop | enabled | generate_series | ordinality ---------+-----+--------+----------+---------+-----------------+------------ - id | 1 | email | 11 | t | 10 | 1 - id2 | 2 | email2 | 12 | t | 11 | 2 -(2 rows) - -begin; -alter table users drop column moredrop; -select * from usersview; -- expect clean failure -ERROR: attribute 5 of type record has been dropped -rollback; -alter table users alter column seq type numeric; -select * from usersview; -- expect clean failure -ERROR: attribute 2 of type record has wrong type -DETAIL: Table has type numeric, but query expects integer. -drop view usersview; -drop function get_first_user(); -drop function get_users(); -drop table users; --- check behavior with type coercion required for a set-op -create or replace function rngfuncbar() returns setof text as -$$ select 'foo'::varchar union all select 'bar'::varchar ; $$ -language sql stable; -select rngfuncbar(); - rngfuncbar ------------- - foo - bar -(2 rows) - -select * from rngfuncbar(); - rngfuncbar ------------- - foo - bar -(2 rows) - --- this function is now inlinable, too: -explain (verbose, costs off) select * from rngfuncbar(); - QUERY PLAN ------------------------------------------------- - Result - Output: ('foo'::character varying) - -> Append - -> Result - Output: 'foo'::character varying - -> Result - Output: 'bar'::character varying -(7 rows) - -drop function rngfuncbar(); --- check handling of a SQL function with multiple OUT params (bug #5777) -create or replace function rngfuncbar(out integer, out numeric) as -$$ select (1, 2.1) $$ language sql; -select * from rngfuncbar(); - column1 | column2 ----------+--------- - 1 | 2.1 -(1 row) - -create or replace function rngfuncbar(out integer, out numeric) as -$$ select (1, 2) $$ language sql; -select * from rngfuncbar(); -- fail -ERROR: function return row and query-specified return row do not match -DETAIL: Returned type integer at ordinal position 2, but query expects numeric. -create or replace function rngfuncbar(out integer, out numeric) as -$$ select (1, 2.1, 3) $$ language sql; -select * from rngfuncbar(); -- fail -ERROR: function return row and query-specified return row do not match -DETAIL: Returned row contains 3 attributes, but query expects 2. -drop function rngfuncbar(); --- check whole-row-Var handling in nested lateral functions (bug #11703) -create function extractq2(t int8_tbl) returns int8 as $$ - select t.q2 -$$ language sql immutable; -explain (verbose, costs off) -select x from int8_tbl, extractq2(int8_tbl) f(x); - QUERY PLAN ------------------------------------------- - Nested Loop - Output: f.x - -> Seq Scan on public.int8_tbl - Output: int8_tbl.q1, int8_tbl.q2 - -> Function Scan on f - Output: f.x - Function Call: int8_tbl.q2 -(7 rows) - -select x from int8_tbl, extractq2(int8_tbl) f(x); - x -------------------- - 456 - 4567890123456789 - 123 - 4567890123456789 - -4567890123456789 -(5 rows) - -create function extractq2_2(t int8_tbl) returns table(ret1 int8) as $$ - select extractq2(t) offset 0 -$$ language sql immutable; -explain (verbose, costs off) -select x from int8_tbl, extractq2_2(int8_tbl) f(x); - QUERY PLAN ------------------------------------ - Nested Loop - Output: ((int8_tbl.*).q2) - -> Seq Scan on public.int8_tbl - Output: int8_tbl.* - -> Result - Output: (int8_tbl.*).q2 -(6 rows) - -select x from int8_tbl, extractq2_2(int8_tbl) f(x); - x -------------------- - 456 - 4567890123456789 - 123 - 4567890123456789 - -4567890123456789 -(5 rows) - --- without the "offset 0", this function gets optimized quite differently -create function extractq2_2_opt(t int8_tbl) returns table(ret1 int8) as $$ - select extractq2(t) -$$ language sql immutable; -explain (verbose, costs off) -select x from int8_tbl, extractq2_2_opt(int8_tbl) f(x); - QUERY PLAN ------------------------------ - Seq Scan on public.int8_tbl - Output: int8_tbl.q2 -(2 rows) - -select x from int8_tbl, extractq2_2_opt(int8_tbl) f(x); - x -------------------- - 456 - 4567890123456789 - 123 - 4567890123456789 - -4567890123456789 -(5 rows) - --- check handling of nulls in SRF results (bug #7808) -create type rngfunc2 as (a integer, b text); -select *, row_to_json(u) from unnest(array[(1,'foo')::rngfunc2, null::rngfunc2]) u; - a | b | row_to_json ----+-----+--------------------- - 1 | foo | {"a":1,"b":"foo"} - | | {"a":null,"b":null} -(2 rows) - -select *, row_to_json(u) from unnest(array[null::rngfunc2, null::rngfunc2]) u; - a | b | row_to_json ----+---+--------------------- - | | {"a":null,"b":null} - | | {"a":null,"b":null} -(2 rows) - -select *, row_to_json(u) from unnest(array[null::rngfunc2, (1,'foo')::rngfunc2, null::rngfunc2]) u; - a | b | row_to_json ----+-----+--------------------- - | | {"a":null,"b":null} - 1 | foo | {"a":1,"b":"foo"} - | | {"a":null,"b":null} -(3 rows) - -select *, row_to_json(u) from unnest(array[]::rngfunc2[]) u; - a | b | row_to_json ----+---+------------- -(0 rows) - -drop type rngfunc2; --- check handling of functions pulled up into function RTEs (bug #17227) -explain (verbose, costs off) -select * from - (select jsonb_path_query_array(module->'lectures', '$[*]') as lecture - from unnest(array['{"lectures": [{"id": "1"}]}'::jsonb]) - as unnested_modules(module)) as ss, - jsonb_to_recordset(ss.lecture) as j (id text); - QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------- - Nested Loop - Output: jsonb_path_query_array((unnested_modules.module -> 'lectures'::text), '$[*]'::jsonpath, '{}'::jsonb, false), j.id - -> Function Scan on pg_catalog.unnest unnested_modules - Output: unnested_modules.module - Function Call: unnest('{"{\"lectures\": [{\"id\": \"1\"}]}"}'::jsonb[]) - -> Function Scan on pg_catalog.jsonb_to_recordset j - Output: j.id - Function Call: jsonb_to_recordset(jsonb_path_query_array((unnested_modules.module -> 'lectures'::text), '$[*]'::jsonpath, '{}'::jsonb, false)) -(8 rows) - -select * from - (select jsonb_path_query_array(module->'lectures', '$[*]') as lecture - from unnest(array['{"lectures": [{"id": "1"}]}'::jsonb]) - as unnested_modules(module)) as ss, - jsonb_to_recordset(ss.lecture) as j (id text); - lecture | id ----------------+---- - [{"id": "1"}] | 1 -(1 row) - +server closed the connection unexpectedly + This probably means the server terminated abnormally + before or while processing the request. +connection to server was lost diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/conversion.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/conversion.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/conversion.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/conversion.out 2023-02-20 19:48:25.429217869 -0500 @@ -89,132 +89,55 @@ ('\x666f6fe8b1', 'incomplete character at end'); -- Test UTF-8 verification select description, (test_conv(inbytes, 'utf8', 'utf8')).* from utf8_inputs; - description | result | errorat | error -------------------------------------------------------+----------------------+--------------+----------------------------------------------------------- - valid, pure ASCII | \x666f6f | | - valid, extra latin chars | \xc3a4c3b6 | | - valid, cyrillic | \xd184d0bed0be | | - valid, kanji/Chinese | \x666f6fe8b1a1 | | - valid, two chars that combine to one in EUC_JIS_2004 | \xe382abe3829a | | - only first half of combined char in EUC_JIS_2004 | \xe382ab | | - incomplete combination when converted EUC_JIS_2004 | \xe382ab | \xe382 | invalid byte sequence for encoding "UTF8": 0xe3 0x82 - valid, Hangul, Korean | \xecbd94eb81bceba6ac | | - valid, needs mapping function to convert to GB18030 | \x666f6fefa8aa | | - invalid byte sequence | \x66 | \xe8b1ff6f6f | invalid byte sequence for encoding "UTF8": 0xe8 0xb1 0xff - invalid, NUL byte | \x66 | \x006f | invalid byte sequence for encoding "UTF8": 0x00 - invalid, NUL byte | \x666f6f | \xe8b100 | invalid byte sequence for encoding "UTF8": 0xe8 0xb1 0x00 - incomplete character at end | \x666f6f | \xe8b1 | invalid byte sequence for encoding "UTF8": 0xe8 0xb1 -(13 rows) - +ERROR: function test_enc_conversion(bytea, text, text, boolean) does not exist +LINE 1: select * from test_enc_conversion(inpu... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. +QUERY: select * from test_enc_conversion(input, src_encoding, dst_encoding, true) +CONTEXT: PL/pgSQL function test_conv(bytea,text,text) line 14 at SQL statement -- Test conversions from UTF-8 select description, inbytes, (test_conv(inbytes, 'utf8', 'euc_jis_2004')).* from utf8_inputs; - description | inbytes | result | errorat | error -------------------------------------------------------+----------------------+----------------+----------------------+------------------------------------------------------------------------------------------------------------- - valid, pure ASCII | \x666f6f | \x666f6f | | - valid, extra latin chars | \xc3a4c3b6 | \xa9daa9ec | | - valid, cyrillic | \xd184d0bed0be | \xa7e6a7e0a7e0 | | - valid, kanji/Chinese | \x666f6fe8b1a1 | \x666f6fbedd | | - valid, two chars that combine to one in EUC_JIS_2004 | \xe382abe3829a | \xa5f7 | | - only first half of combined char in EUC_JIS_2004 | \xe382ab | \xa5ab | | - incomplete combination when converted EUC_JIS_2004 | \xe382abe382 | \x | \xe382abe382 | invalid byte sequence for encoding "UTF8": 0xe3 0x82 - valid, Hangul, Korean | \xecbd94eb81bceba6ac | \x | \xecbd94eb81bceba6ac | character with byte sequence 0xec 0xbd 0x94 in encoding "UTF8" has no equivalent in encoding "EUC_JIS_2004" - valid, needs mapping function to convert to GB18030 | \x666f6fefa8aa | \x666f6f | \xefa8aa | character with byte sequence 0xef 0xa8 0xaa in encoding "UTF8" has no equivalent in encoding "EUC_JIS_2004" - invalid byte sequence | \x66e8b1ff6f6f | \x66 | \xe8b1ff6f6f | invalid byte sequence for encoding "UTF8": 0xe8 0xb1 0xff - invalid, NUL byte | \x66006f | \x66 | \x006f | invalid byte sequence for encoding "UTF8": 0x00 - invalid, NUL byte | \x666f6fe8b100 | \x666f6f | \xe8b100 | invalid byte sequence for encoding "UTF8": 0xe8 0xb1 0x00 - incomplete character at end | \x666f6fe8b1 | \x666f6f | \xe8b1 | invalid byte sequence for encoding "UTF8": 0xe8 0xb1 -(13 rows) - +ERROR: function test_enc_conversion(bytea, text, text, boolean) does not exist +LINE 1: select * from test_enc_conversion(inpu... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. +QUERY: select * from test_enc_conversion(input, src_encoding, dst_encoding, true) +CONTEXT: PL/pgSQL function test_conv(bytea,text,text) line 14 at SQL statement select description, inbytes, (test_conv(inbytes, 'utf8', 'latin1')).* from utf8_inputs; - description | inbytes | result | errorat | error -------------------------------------------------------+----------------------+----------+----------------------+------------------------------------------------------------------------------------------------------- - valid, pure ASCII | \x666f6f | \x666f6f | | - valid, extra latin chars | \xc3a4c3b6 | \xe4f6 | | - valid, cyrillic | \xd184d0bed0be | \x | \xd184d0bed0be | character with byte sequence 0xd1 0x84 in encoding "UTF8" has no equivalent in encoding "LATIN1" - valid, kanji/Chinese | \x666f6fe8b1a1 | \x666f6f | \xe8b1a1 | character with byte sequence 0xe8 0xb1 0xa1 in encoding "UTF8" has no equivalent in encoding "LATIN1" - valid, two chars that combine to one in EUC_JIS_2004 | \xe382abe3829a | \x | \xe382abe3829a | character with byte sequence 0xe3 0x82 0xab in encoding "UTF8" has no equivalent in encoding "LATIN1" - only first half of combined char in EUC_JIS_2004 | \xe382ab | \x | \xe382ab | character with byte sequence 0xe3 0x82 0xab in encoding "UTF8" has no equivalent in encoding "LATIN1" - incomplete combination when converted EUC_JIS_2004 | \xe382abe382 | \x | \xe382abe382 | character with byte sequence 0xe3 0x82 0xab in encoding "UTF8" has no equivalent in encoding "LATIN1" - valid, Hangul, Korean | \xecbd94eb81bceba6ac | \x | \xecbd94eb81bceba6ac | character with byte sequence 0xec 0xbd 0x94 in encoding "UTF8" has no equivalent in encoding "LATIN1" - valid, needs mapping function to convert to GB18030 | \x666f6fefa8aa | \x666f6f | \xefa8aa | character with byte sequence 0xef 0xa8 0xaa in encoding "UTF8" has no equivalent in encoding "LATIN1" - invalid byte sequence | \x66e8b1ff6f6f | \x66 | \xe8b1ff6f6f | invalid byte sequence for encoding "UTF8": 0xe8 0xb1 0xff - invalid, NUL byte | \x66006f | \x66 | \x006f | invalid byte sequence for encoding "UTF8": 0x00 - invalid, NUL byte | \x666f6fe8b100 | \x666f6f | \xe8b100 | invalid byte sequence for encoding "UTF8": 0xe8 0xb1 0x00 - incomplete character at end | \x666f6fe8b1 | \x666f6f | \xe8b1 | invalid byte sequence for encoding "UTF8": 0xe8 0xb1 -(13 rows) - +ERROR: function test_enc_conversion(bytea, text, text, boolean) does not exist +LINE 1: select * from test_enc_conversion(inpu... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. +QUERY: select * from test_enc_conversion(input, src_encoding, dst_encoding, true) +CONTEXT: PL/pgSQL function test_conv(bytea,text,text) line 14 at SQL statement select description, inbytes, (test_conv(inbytes, 'utf8', 'latin2')).* from utf8_inputs; - description | inbytes | result | errorat | error -------------------------------------------------------+----------------------+----------+----------------------+------------------------------------------------------------------------------------------------------- - valid, pure ASCII | \x666f6f | \x666f6f | | - valid, extra latin chars | \xc3a4c3b6 | \xe4f6 | | - valid, cyrillic | \xd184d0bed0be | \x | \xd184d0bed0be | character with byte sequence 0xd1 0x84 in encoding "UTF8" has no equivalent in encoding "LATIN2" - valid, kanji/Chinese | \x666f6fe8b1a1 | \x666f6f | \xe8b1a1 | character with byte sequence 0xe8 0xb1 0xa1 in encoding "UTF8" has no equivalent in encoding "LATIN2" - valid, two chars that combine to one in EUC_JIS_2004 | \xe382abe3829a | \x | \xe382abe3829a | character with byte sequence 0xe3 0x82 0xab in encoding "UTF8" has no equivalent in encoding "LATIN2" - only first half of combined char in EUC_JIS_2004 | \xe382ab | \x | \xe382ab | character with byte sequence 0xe3 0x82 0xab in encoding "UTF8" has no equivalent in encoding "LATIN2" - incomplete combination when converted EUC_JIS_2004 | \xe382abe382 | \x | \xe382abe382 | character with byte sequence 0xe3 0x82 0xab in encoding "UTF8" has no equivalent in encoding "LATIN2" - valid, Hangul, Korean | \xecbd94eb81bceba6ac | \x | \xecbd94eb81bceba6ac | character with byte sequence 0xec 0xbd 0x94 in encoding "UTF8" has no equivalent in encoding "LATIN2" - valid, needs mapping function to convert to GB18030 | \x666f6fefa8aa | \x666f6f | \xefa8aa | character with byte sequence 0xef 0xa8 0xaa in encoding "UTF8" has no equivalent in encoding "LATIN2" - invalid byte sequence | \x66e8b1ff6f6f | \x66 | \xe8b1ff6f6f | invalid byte sequence for encoding "UTF8": 0xe8 0xb1 0xff - invalid, NUL byte | \x66006f | \x66 | \x006f | invalid byte sequence for encoding "UTF8": 0x00 - invalid, NUL byte | \x666f6fe8b100 | \x666f6f | \xe8b100 | invalid byte sequence for encoding "UTF8": 0xe8 0xb1 0x00 - incomplete character at end | \x666f6fe8b1 | \x666f6f | \xe8b1 | invalid byte sequence for encoding "UTF8": 0xe8 0xb1 -(13 rows) - +ERROR: function test_enc_conversion(bytea, text, text, boolean) does not exist +LINE 1: select * from test_enc_conversion(inpu... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. +QUERY: select * from test_enc_conversion(input, src_encoding, dst_encoding, true) +CONTEXT: PL/pgSQL function test_conv(bytea,text,text) line 14 at SQL statement select description, inbytes, (test_conv(inbytes, 'utf8', 'latin5')).* from utf8_inputs; - description | inbytes | result | errorat | error -------------------------------------------------------+----------------------+----------+----------------------+------------------------------------------------------------------------------------------------------- - valid, pure ASCII | \x666f6f | \x666f6f | | - valid, extra latin chars | \xc3a4c3b6 | \xe4f6 | | - valid, cyrillic | \xd184d0bed0be | \x | \xd184d0bed0be | character with byte sequence 0xd1 0x84 in encoding "UTF8" has no equivalent in encoding "LATIN5" - valid, kanji/Chinese | \x666f6fe8b1a1 | \x666f6f | \xe8b1a1 | character with byte sequence 0xe8 0xb1 0xa1 in encoding "UTF8" has no equivalent in encoding "LATIN5" - valid, two chars that combine to one in EUC_JIS_2004 | \xe382abe3829a | \x | \xe382abe3829a | character with byte sequence 0xe3 0x82 0xab in encoding "UTF8" has no equivalent in encoding "LATIN5" - only first half of combined char in EUC_JIS_2004 | \xe382ab | \x | \xe382ab | character with byte sequence 0xe3 0x82 0xab in encoding "UTF8" has no equivalent in encoding "LATIN5" - incomplete combination when converted EUC_JIS_2004 | \xe382abe382 | \x | \xe382abe382 | character with byte sequence 0xe3 0x82 0xab in encoding "UTF8" has no equivalent in encoding "LATIN5" - valid, Hangul, Korean | \xecbd94eb81bceba6ac | \x | \xecbd94eb81bceba6ac | character with byte sequence 0xec 0xbd 0x94 in encoding "UTF8" has no equivalent in encoding "LATIN5" - valid, needs mapping function to convert to GB18030 | \x666f6fefa8aa | \x666f6f | \xefa8aa | character with byte sequence 0xef 0xa8 0xaa in encoding "UTF8" has no equivalent in encoding "LATIN5" - invalid byte sequence | \x66e8b1ff6f6f | \x66 | \xe8b1ff6f6f | invalid byte sequence for encoding "UTF8": 0xe8 0xb1 0xff - invalid, NUL byte | \x66006f | \x66 | \x006f | invalid byte sequence for encoding "UTF8": 0x00 - invalid, NUL byte | \x666f6fe8b100 | \x666f6f | \xe8b100 | invalid byte sequence for encoding "UTF8": 0xe8 0xb1 0x00 - incomplete character at end | \x666f6fe8b1 | \x666f6f | \xe8b1 | invalid byte sequence for encoding "UTF8": 0xe8 0xb1 -(13 rows) - +ERROR: function test_enc_conversion(bytea, text, text, boolean) does not exist +LINE 1: select * from test_enc_conversion(inpu... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. +QUERY: select * from test_enc_conversion(input, src_encoding, dst_encoding, true) +CONTEXT: PL/pgSQL function test_conv(bytea,text,text) line 14 at SQL statement select description, inbytes, (test_conv(inbytes, 'utf8', 'koi8r')).* from utf8_inputs; - description | inbytes | result | errorat | error -------------------------------------------------------+----------------------+----------+----------------------+------------------------------------------------------------------------------------------------------ - valid, pure ASCII | \x666f6f | \x666f6f | | - valid, extra latin chars | \xc3a4c3b6 | \x | \xc3a4c3b6 | character with byte sequence 0xc3 0xa4 in encoding "UTF8" has no equivalent in encoding "KOI8R" - valid, cyrillic | \xd184d0bed0be | \xc6cfcf | | - valid, kanji/Chinese | \x666f6fe8b1a1 | \x666f6f | \xe8b1a1 | character with byte sequence 0xe8 0xb1 0xa1 in encoding "UTF8" has no equivalent in encoding "KOI8R" - valid, two chars that combine to one in EUC_JIS_2004 | \xe382abe3829a | \x | \xe382abe3829a | character with byte sequence 0xe3 0x82 0xab in encoding "UTF8" has no equivalent in encoding "KOI8R" - only first half of combined char in EUC_JIS_2004 | \xe382ab | \x | \xe382ab | character with byte sequence 0xe3 0x82 0xab in encoding "UTF8" has no equivalent in encoding "KOI8R" - incomplete combination when converted EUC_JIS_2004 | \xe382abe382 | \x | \xe382abe382 | character with byte sequence 0xe3 0x82 0xab in encoding "UTF8" has no equivalent in encoding "KOI8R" - valid, Hangul, Korean | \xecbd94eb81bceba6ac | \x | \xecbd94eb81bceba6ac | character with byte sequence 0xec 0xbd 0x94 in encoding "UTF8" has no equivalent in encoding "KOI8R" - valid, needs mapping function to convert to GB18030 | \x666f6fefa8aa | \x666f6f | \xefa8aa | character with byte sequence 0xef 0xa8 0xaa in encoding "UTF8" has no equivalent in encoding "KOI8R" - invalid byte sequence | \x66e8b1ff6f6f | \x66 | \xe8b1ff6f6f | invalid byte sequence for encoding "UTF8": 0xe8 0xb1 0xff - invalid, NUL byte | \x66006f | \x66 | \x006f | invalid byte sequence for encoding "UTF8": 0x00 - invalid, NUL byte | \x666f6fe8b100 | \x666f6f | \xe8b100 | invalid byte sequence for encoding "UTF8": 0xe8 0xb1 0x00 - incomplete character at end | \x666f6fe8b1 | \x666f6f | \xe8b1 | invalid byte sequence for encoding "UTF8": 0xe8 0xb1 -(13 rows) - +ERROR: function test_enc_conversion(bytea, text, text, boolean) does not exist +LINE 1: select * from test_enc_conversion(inpu... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. +QUERY: select * from test_enc_conversion(input, src_encoding, dst_encoding, true) +CONTEXT: PL/pgSQL function test_conv(bytea,text,text) line 14 at SQL statement select description, inbytes, (test_conv(inbytes, 'utf8', 'gb18030')).* from utf8_inputs; - description | inbytes | result | errorat | error -------------------------------------------------------+----------------------+----------------------------+--------------+----------------------------------------------------------- - valid, pure ASCII | \x666f6f | \x666f6f | | - valid, extra latin chars | \xc3a4c3b6 | \x81308a3181308b32 | | - valid, cyrillic | \xd184d0bed0be | \xa7e6a7e0a7e0 | | - valid, kanji/Chinese | \x666f6fe8b1a1 | \x666f6fcff3 | | - valid, two chars that combine to one in EUC_JIS_2004 | \xe382abe3829a | \xa5ab8139a732 | | - only first half of combined char in EUC_JIS_2004 | \xe382ab | \xa5ab | | - incomplete combination when converted EUC_JIS_2004 | \xe382abe382 | \xa5ab | \xe382 | invalid byte sequence for encoding "UTF8": 0xe3 0x82 - valid, Hangul, Korean | \xecbd94eb81bceba6ac | \x8334e5398238c4338330b335 | | - valid, needs mapping function to convert to GB18030 | \x666f6fefa8aa | \x666f6f84309c38 | | - invalid byte sequence | \x66e8b1ff6f6f | \x66 | \xe8b1ff6f6f | invalid byte sequence for encoding "UTF8": 0xe8 0xb1 0xff - invalid, NUL byte | \x66006f | \x66 | \x006f | invalid byte sequence for encoding "UTF8": 0x00 - invalid, NUL byte | \x666f6fe8b100 | \x666f6f | \xe8b100 | invalid byte sequence for encoding "UTF8": 0xe8 0xb1 0x00 - incomplete character at end | \x666f6fe8b1 | \x666f6f | \xe8b1 | invalid byte sequence for encoding "UTF8": 0xe8 0xb1 -(13 rows) - +ERROR: function test_enc_conversion(bytea, text, text, boolean) does not exist +LINE 1: select * from test_enc_conversion(inpu... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. +QUERY: select * from test_enc_conversion(input, src_encoding, dst_encoding, true) +CONTEXT: PL/pgSQL function test_conv(bytea,text,text) line 14 at SQL statement -- -- EUC_JIS_2004 -- @@ -230,32 +153,20 @@ ('\xbe04', 'invalid byte sequence'); -- Test EUC_JIS_2004 verification select description, inbytes, (test_conv(inbytes, 'euc_jis_2004', 'euc_jis_2004')).* from euc_jis_2004_inputs; - description | inbytes | result | errorat | error ----------------------------------------+----------------+--------------+----------+-------------------------------------------------------------- - valid, pure ASCII | \x666f6f | \x666f6f | | - valid | \x666f6fbedd | \x666f6fbedd | | - valid, translates to two UTF-8 chars | \xa5f7 | \xa5f7 | | - incomplete char | \xbeddbe | \xbedd | \xbe | invalid byte sequence for encoding "EUC_JIS_2004": 0xbe - invalid, NUL byte | \x666f6f00bedd | \x666f6f | \x00bedd | invalid byte sequence for encoding "EUC_JIS_2004": 0x00 - invalid, NUL byte | \x666f6fbe00dd | \x666f6f | \xbe00dd | invalid byte sequence for encoding "EUC_JIS_2004": 0xbe 0x00 - invalid, NUL byte | \x666f6fbedd00 | \x666f6fbedd | \x00 | invalid byte sequence for encoding "EUC_JIS_2004": 0x00 - invalid byte sequence | \xbe04 | \x | \xbe04 | invalid byte sequence for encoding "EUC_JIS_2004": 0xbe 0x04 -(8 rows) - +ERROR: function test_enc_conversion(bytea, text, text, boolean) does not exist +LINE 1: select * from test_enc_conversion(inpu... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. +QUERY: select * from test_enc_conversion(input, src_encoding, dst_encoding, true) +CONTEXT: PL/pgSQL function test_conv(bytea,text,text) line 14 at SQL statement -- Test conversions from EUC_JIS_2004 select description, inbytes, (test_conv(inbytes, 'euc_jis_2004', 'utf8')).* from euc_jis_2004_inputs; - description | inbytes | result | errorat | error ----------------------------------------+----------------+----------------+----------+-------------------------------------------------------------- - valid, pure ASCII | \x666f6f | \x666f6f | | - valid | \x666f6fbedd | \x666f6fe8b1a1 | | - valid, translates to two UTF-8 chars | \xa5f7 | \xe382abe3829a | | - incomplete char | \xbeddbe | \xe8b1a1 | \xbe | invalid byte sequence for encoding "EUC_JIS_2004": 0xbe - invalid, NUL byte | \x666f6f00bedd | \x666f6f | \x00bedd | invalid byte sequence for encoding "EUC_JIS_2004": 0x00 - invalid, NUL byte | \x666f6fbe00dd | \x666f6f | \xbe00dd | invalid byte sequence for encoding "EUC_JIS_2004": 0xbe 0x00 - invalid, NUL byte | \x666f6fbedd00 | \x666f6fe8b1a1 | \x00 | invalid byte sequence for encoding "EUC_JIS_2004": 0x00 - invalid byte sequence | \xbe04 | \x | \xbe04 | invalid byte sequence for encoding "EUC_JIS_2004": 0xbe 0x04 -(8 rows) - +ERROR: function test_enc_conversion(bytea, text, text, boolean) does not exist +LINE 1: select * from test_enc_conversion(inpu... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. +QUERY: select * from test_enc_conversion(input, src_encoding, dst_encoding, true) +CONTEXT: PL/pgSQL function test_conv(bytea,text,text) line 14 at SQL statement -- -- SHIFT-JIS-2004 -- @@ -272,48 +183,27 @@ ('\x666f6f8fdb00', 'invalid, NUL byte'); -- Test SHIFT-JIS-2004 verification select description, inbytes, (test_conv(inbytes, 'shiftjis2004', 'shiftjis2004')).* from shiftjis2004_inputs; - description | inbytes | result | errorat | error ----------------------------------------+----------------+--------------+----------+---------------------------------------------------------------- - valid, pure ASCII | \x666f6f | \x666f6f | | - valid | \x666f6f8fdb | \x666f6f8fdb | | - valid, no translation to UTF-8 | \x666f6f81c0 | \x666f6f81c0 | | - valid, translates to two UTF-8 chars | \x666f6f82f5 | \x666f6f82f5 | | - incomplete char | \x666f6f8fdb8f | \x666f6f8fdb | \x8f | invalid byte sequence for encoding "SHIFT_JIS_2004": 0x8f - incomplete char, followed by newline | \x666f6f820a | \x666f6f | \x820a | invalid byte sequence for encoding "SHIFT_JIS_2004": 0x82 0x0a - invalid, NUL byte | \x666f6f008fdb | \x666f6f | \x008fdb | invalid byte sequence for encoding "SHIFT_JIS_2004": 0x00 - invalid, NUL byte | \x666f6f8f00db | \x666f6f | \x8f00db | invalid byte sequence for encoding "SHIFT_JIS_2004": 0x8f 0x00 - invalid, NUL byte | \x666f6f8fdb00 | \x666f6f8fdb | \x00 | invalid byte sequence for encoding "SHIFT_JIS_2004": 0x00 -(9 rows) - +ERROR: function test_enc_conversion(bytea, text, text, boolean) does not exist +LINE 1: select * from test_enc_conversion(inpu... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. +QUERY: select * from test_enc_conversion(input, src_encoding, dst_encoding, true) +CONTEXT: PL/pgSQL function test_conv(bytea,text,text) line 14 at SQL statement -- Test conversions from SHIFT-JIS-2004 select description, inbytes, (test_conv(inbytes, 'shiftjis2004', 'utf8')).* from shiftjis2004_inputs; - description | inbytes | result | errorat | error ----------------------------------------+----------------+----------------------+----------+---------------------------------------------------------------- - valid, pure ASCII | \x666f6f | \x666f6f | | - valid | \x666f6f8fdb | \x666f6fe8b1a1 | | - valid, no translation to UTF-8 | \x666f6f81c0 | \x666f6fe28a84 | | - valid, translates to two UTF-8 chars | \x666f6f82f5 | \x666f6fe3818be3829a | | - incomplete char | \x666f6f8fdb8f | \x666f6fe8b1a1 | \x8f | invalid byte sequence for encoding "SHIFT_JIS_2004": 0x8f - incomplete char, followed by newline | \x666f6f820a | \x666f6f | \x820a | invalid byte sequence for encoding "SHIFT_JIS_2004": 0x82 0x0a - invalid, NUL byte | \x666f6f008fdb | \x666f6f | \x008fdb | invalid byte sequence for encoding "SHIFT_JIS_2004": 0x00 - invalid, NUL byte | \x666f6f8f00db | \x666f6f | \x8f00db | invalid byte sequence for encoding "SHIFT_JIS_2004": 0x8f 0x00 - invalid, NUL byte | \x666f6f8fdb00 | \x666f6fe8b1a1 | \x00 | invalid byte sequence for encoding "SHIFT_JIS_2004": 0x00 -(9 rows) - +ERROR: function test_enc_conversion(bytea, text, text, boolean) does not exist +LINE 1: select * from test_enc_conversion(inpu... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. +QUERY: select * from test_enc_conversion(input, src_encoding, dst_encoding, true) +CONTEXT: PL/pgSQL function test_conv(bytea,text,text) line 14 at SQL statement select description, inbytes, (test_conv(inbytes, 'shiftjis2004', 'euc_jis_2004')).* from shiftjis2004_inputs; - description | inbytes | result | errorat | error ----------------------------------------+----------------+--------------+----------+---------------------------------------------------------------- - valid, pure ASCII | \x666f6f | \x666f6f | | - valid | \x666f6f8fdb | \x666f6fbedd | | - valid, no translation to UTF-8 | \x666f6f81c0 | \x666f6fa2c2 | | - valid, translates to two UTF-8 chars | \x666f6f82f5 | \x666f6fa4f7 | | - incomplete char | \x666f6f8fdb8f | \x666f6fbedd | \x8f | invalid byte sequence for encoding "SHIFT_JIS_2004": 0x8f - incomplete char, followed by newline | \x666f6f820a | \x666f6f | \x820a | invalid byte sequence for encoding "SHIFT_JIS_2004": 0x82 0x0a - invalid, NUL byte | \x666f6f008fdb | \x666f6f | \x008fdb | invalid byte sequence for encoding "SHIFT_JIS_2004": 0x00 - invalid, NUL byte | \x666f6f8f00db | \x666f6f | \x8f00db | invalid byte sequence for encoding "SHIFT_JIS_2004": 0x8f 0x00 - invalid, NUL byte | \x666f6f8fdb00 | \x666f6fbedd | \x00 | invalid byte sequence for encoding "SHIFT_JIS_2004": 0x00 -(9 rows) - +ERROR: function test_enc_conversion(bytea, text, text, boolean) does not exist +LINE 1: select * from test_enc_conversion(inpu... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. +QUERY: select * from test_enc_conversion(input, src_encoding, dst_encoding, true) +CONTEXT: PL/pgSQL function test_conv(bytea,text,text) line 14 at SQL statement -- -- GB18030 -- @@ -329,32 +219,20 @@ ('\x666f6f84309c0038', 'invalid, NUL byte'); -- Test GB18030 verification select description, inbytes, (test_conv(inbytes, 'gb18030', 'gb18030')).* from gb18030_inputs; - description | inbytes | result | errorat | error -------------------------------------------------+--------------------+------------------+--------------+------------------------------------------------------------------- - valid, pure ASCII | \x666f6f | \x666f6f | | - valid | \x666f6fcff3 | \x666f6fcff3 | | - valid, no translation to UTF-8 | \x666f6f8431a530 | \x666f6f8431a530 | | - valid, translates to UTF-8 by mapping function | \x666f6f84309c38 | \x666f6f84309c38 | | - incomplete char | \x666f6f84309c | \x666f6f | \x84309c | invalid byte sequence for encoding "GB18030": 0x84 0x30 0x9c - incomplete char, followed by newline | \x666f6f84309c0a | \x666f6f | \x84309c0a | invalid byte sequence for encoding "GB18030": 0x84 0x30 0x9c 0x0a - invalid, NUL byte | \x666f6f84309c3800 | \x666f6f84309c38 | \x00 | invalid byte sequence for encoding "GB18030": 0x00 - invalid, NUL byte | \x666f6f84309c0038 | \x666f6f | \x84309c0038 | invalid byte sequence for encoding "GB18030": 0x84 0x30 0x9c 0x00 -(8 rows) - +ERROR: function test_enc_conversion(bytea, text, text, boolean) does not exist +LINE 1: select * from test_enc_conversion(inpu... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. +QUERY: select * from test_enc_conversion(input, src_encoding, dst_encoding, true) +CONTEXT: PL/pgSQL function test_conv(bytea,text,text) line 14 at SQL statement -- Test conversions from GB18030 select description, inbytes, (test_conv(inbytes, 'gb18030', 'utf8')).* from gb18030_inputs; - description | inbytes | result | errorat | error -------------------------------------------------+--------------------+----------------+--------------+------------------------------------------------------------------------------------------------------------- - valid, pure ASCII | \x666f6f | \x666f6f | | - valid | \x666f6fcff3 | \x666f6fe8b1a1 | | - valid, no translation to UTF-8 | \x666f6f8431a530 | \x666f6f | \x8431a530 | character with byte sequence 0x84 0x31 0xa5 0x30 in encoding "GB18030" has no equivalent in encoding "UTF8" - valid, translates to UTF-8 by mapping function | \x666f6f84309c38 | \x666f6fefa8aa | | - incomplete char | \x666f6f84309c | \x666f6f | \x84309c | invalid byte sequence for encoding "GB18030": 0x84 0x30 0x9c - incomplete char, followed by newline | \x666f6f84309c0a | \x666f6f | \x84309c0a | invalid byte sequence for encoding "GB18030": 0x84 0x30 0x9c 0x0a - invalid, NUL byte | \x666f6f84309c3800 | \x666f6fefa8aa | \x00 | invalid byte sequence for encoding "GB18030": 0x00 - invalid, NUL byte | \x666f6f84309c0038 | \x666f6f | \x84309c0038 | invalid byte sequence for encoding "GB18030": 0x84 0x30 0x9c 0x00 -(8 rows) - +ERROR: function test_enc_conversion(bytea, text, text, boolean) does not exist +LINE 1: select * from test_enc_conversion(inpu... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. +QUERY: select * from test_enc_conversion(input, src_encoding, dst_encoding, true) +CONTEXT: PL/pgSQL function test_conv(bytea,text,text) line 14 at SQL statement -- -- ISO-8859-5 -- @@ -367,46 +245,34 @@ ('\xe4dede00', 'invalid, NUL byte'); -- Test ISO-8859-5 verification select description, inbytes, (test_conv(inbytes, 'iso8859-5', 'iso8859-5')).* from iso8859_5_inputs; - description | inbytes | result | errorat | error --------------------+------------+----------+----------+------------------------------------------------------- - valid, pure ASCII | \x666f6f | \x666f6f | | - valid | \xe4dede | \xe4dede | | - invalid, NUL byte | \x00 | \x | \x00 | invalid byte sequence for encoding "ISO_8859_5": 0x00 - invalid, NUL byte | \xe400dede | \xe4 | \x00dede | invalid byte sequence for encoding "ISO_8859_5": 0x00 - invalid, NUL byte | \xe4dede00 | \xe4dede | \x00 | invalid byte sequence for encoding "ISO_8859_5": 0x00 -(5 rows) - +ERROR: function test_enc_conversion(bytea, text, text, boolean) does not exist +LINE 1: select * from test_enc_conversion(inpu... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. +QUERY: select * from test_enc_conversion(input, src_encoding, dst_encoding, true) +CONTEXT: PL/pgSQL function test_conv(bytea,text,text) line 14 at SQL statement -- Test conversions from ISO-8859-5 select description, inbytes, (test_conv(inbytes, 'iso8859-5', 'utf8')).* from iso8859_5_inputs; - description | inbytes | result | errorat | error --------------------+------------+----------------+----------+------------------------------------------------------- - valid, pure ASCII | \x666f6f | \x666f6f | | - valid | \xe4dede | \xd184d0bed0be | | - invalid, NUL byte | \x00 | \x | \x00 | invalid byte sequence for encoding "ISO_8859_5": 0x00 - invalid, NUL byte | \xe400dede | \xd184 | \x00dede | invalid byte sequence for encoding "ISO_8859_5": 0x00 - invalid, NUL byte | \xe4dede00 | \xd184d0bed0be | \x00 | invalid byte sequence for encoding "ISO_8859_5": 0x00 -(5 rows) - +ERROR: function test_enc_conversion(bytea, text, text, boolean) does not exist +LINE 1: select * from test_enc_conversion(inpu... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. +QUERY: select * from test_enc_conversion(input, src_encoding, dst_encoding, true) +CONTEXT: PL/pgSQL function test_conv(bytea,text,text) line 14 at SQL statement select description, inbytes, (test_conv(inbytes, 'iso8859-5', 'koi8r')).* from iso8859_5_inputs; - description | inbytes | result | errorat | error --------------------+------------+----------+----------+------------------------------------------------------- - valid, pure ASCII | \x666f6f | \x666f6f | | - valid | \xe4dede | \xc6cfcf | | - invalid, NUL byte | \x00 | \x | \x00 | invalid byte sequence for encoding "ISO_8859_5": 0x00 - invalid, NUL byte | \xe400dede | \xc6 | \x00dede | invalid byte sequence for encoding "ISO_8859_5": 0x00 - invalid, NUL byte | \xe4dede00 | \xc6cfcf | \x00 | invalid byte sequence for encoding "ISO_8859_5": 0x00 -(5 rows) - +ERROR: function test_enc_conversion(bytea, text, text, boolean) does not exist +LINE 1: select * from test_enc_conversion(inpu... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. +QUERY: select * from test_enc_conversion(input, src_encoding, dst_encoding, true) +CONTEXT: PL/pgSQL function test_conv(bytea,text,text) line 14 at SQL statement select description, inbytes, (test_conv(inbytes, 'iso8859_5', 'mule_internal')).* from iso8859_5_inputs; - description | inbytes | result | errorat | error --------------------+------------+----------------+----------+------------------------------------------------------- - valid, pure ASCII | \x666f6f | \x666f6f | | - valid | \xe4dede | \x8bc68bcf8bcf | | - invalid, NUL byte | \x00 | \x | \x00 | invalid byte sequence for encoding "ISO_8859_5": 0x00 - invalid, NUL byte | \xe400dede | \x8bc6 | \x00dede | invalid byte sequence for encoding "ISO_8859_5": 0x00 - invalid, NUL byte | \xe4dede00 | \x8bc68bcf8bcf | \x00 | invalid byte sequence for encoding "ISO_8859_5": 0x00 -(5 rows) - +ERROR: function test_enc_conversion(bytea, text, text, boolean) does not exist +LINE 1: select * from test_enc_conversion(inpu... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. +QUERY: select * from test_enc_conversion(input, src_encoding, dst_encoding, true) +CONTEXT: PL/pgSQL function test_conv(bytea,text,text) line 14 at SQL statement -- -- Big5 -- @@ -419,36 +285,27 @@ ('\x666f6fb64800', 'invalid, NUL byte'); -- Test Big5 verification select description, inbytes, (test_conv(inbytes, 'big5', 'big5')).* from big5_inputs; - description | inbytes | result | errorat | error ---------------------------------+----------------+--------------+----------+------------------------------------------------------ - valid, pure ASCII | \x666f6f | \x666f6f | | - valid | \x666f6fb648 | \x666f6fb648 | | - valid, no translation to UTF-8 | \x666f6fa27f | \x666f6fa27f | | - invalid, NUL byte | \x666f6fb60048 | \x666f6f | \xb60048 | invalid byte sequence for encoding "BIG5": 0xb6 0x00 - invalid, NUL byte | \x666f6fb64800 | \x666f6fb648 | \x00 | invalid byte sequence for encoding "BIG5": 0x00 -(5 rows) - +ERROR: function test_enc_conversion(bytea, text, text, boolean) does not exist +LINE 1: select * from test_enc_conversion(inpu... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. +QUERY: select * from test_enc_conversion(input, src_encoding, dst_encoding, true) +CONTEXT: PL/pgSQL function test_conv(bytea,text,text) line 14 at SQL statement -- Test conversions from Big5 select description, inbytes, (test_conv(inbytes, 'big5', 'utf8')).* from big5_inputs; - description | inbytes | result | errorat | error ---------------------------------+----------------+----------------+----------+------------------------------------------------------------------------------------------------ - valid, pure ASCII | \x666f6f | \x666f6f | | - valid | \x666f6fb648 | \x666f6fe8b1a1 | | - valid, no translation to UTF-8 | \x666f6fa27f | \x666f6f | \xa27f | character with byte sequence 0xa2 0x7f in encoding "BIG5" has no equivalent in encoding "UTF8" - invalid, NUL byte | \x666f6fb60048 | \x666f6f | \xb60048 | invalid byte sequence for encoding "BIG5": 0xb6 0x00 - invalid, NUL byte | \x666f6fb64800 | \x666f6fe8b1a1 | \x00 | invalid byte sequence for encoding "BIG5": 0x00 -(5 rows) - +ERROR: function test_enc_conversion(bytea, text, text, boolean) does not exist +LINE 1: select * from test_enc_conversion(inpu... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. +QUERY: select * from test_enc_conversion(input, src_encoding, dst_encoding, true) +CONTEXT: PL/pgSQL function test_conv(bytea,text,text) line 14 at SQL statement select description, inbytes, (test_conv(inbytes, 'big5', 'mule_internal')).* from big5_inputs; - description | inbytes | result | errorat | error ---------------------------------+----------------+----------------+----------+------------------------------------------------------ - valid, pure ASCII | \x666f6f | \x666f6f | | - valid | \x666f6fb648 | \x666f6f95e2af | | - valid, no translation to UTF-8 | \x666f6fa27f | \x666f6f95a3c1 | | - invalid, NUL byte | \x666f6fb60048 | \x666f6f | \xb60048 | invalid byte sequence for encoding "BIG5": 0xb6 0x00 - invalid, NUL byte | \x666f6fb64800 | \x666f6f95e2af | \x00 | invalid byte sequence for encoding "BIG5": 0x00 -(5 rows) - +ERROR: function test_enc_conversion(bytea, text, text, boolean) does not exist +LINE 1: select * from test_enc_conversion(inpu... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. +QUERY: select * from test_enc_conversion(input, src_encoding, dst_encoding, true) +CONTEXT: PL/pgSQL function test_conv(bytea,text,text) line 14 at SQL statement -- -- MULE_INTERNAL -- @@ -466,93 +323,45 @@ ('\x8b00c68bcf8bcf', 'invalid, NUL byte'); -- Test MULE_INTERNAL verification select description, inbytes, (test_conv(inbytes, 'mule_internal', 'mule_internal')).* from mic_inputs; - description | inbytes | result | errorat | error ----------------------------+------------------+----------------+------------------+-------------------------------------------------------------------- - valid, pure ASCII | \x666f6f | \x666f6f | | - valid (in KOI8R) | \x8bc68bcf8bcf | \x8bc68bcf8bcf | | - invalid,incomplete char | \x8bc68bcf8b | \x8bc68bcf | \x8b | invalid byte sequence for encoding "MULE_INTERNAL": 0x8b - valid (in SHIFT_JIS) | \x92bedd | \x92bedd | | - invalid, incomplete char) | \x92be | \x | \x92be | invalid byte sequence for encoding "MULE_INTERNAL": 0x92 0xbe - valid (in Big5) | \x666f6f95a3c1 | \x666f6f95a3c1 | | - invalid, incomplete char | \x666f6f95a3 | \x666f6f | \x95a3 | invalid byte sequence for encoding "MULE_INTERNAL": 0x95 0xa3 - invalid, NUL byte | \x9200bedd | \x | \x9200bedd | invalid byte sequence for encoding "MULE_INTERNAL": 0x92 0x00 0xbe - invalid, NUL byte | \x92bedd00 | \x92bedd | \x00 | invalid byte sequence for encoding "MULE_INTERNAL": 0x00 - invalid, NUL byte | \x8b00c68bcf8bcf | \x | \x8b00c68bcf8bcf | invalid byte sequence for encoding "MULE_INTERNAL": 0x8b 0x00 -(10 rows) - +ERROR: function test_enc_conversion(bytea, text, text, boolean) does not exist +LINE 1: select * from test_enc_conversion(inpu... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. +QUERY: select * from test_enc_conversion(input, src_encoding, dst_encoding, true) +CONTEXT: PL/pgSQL function test_conv(bytea,text,text) line 14 at SQL statement -- Test conversions from MULE_INTERNAL select description, inbytes, (test_conv(inbytes, 'mule_internal', 'koi8r')).* from mic_inputs; - description | inbytes | result | errorat | error ----------------------------+------------------+----------+------------------+--------------------------------------------------------------------------------------------------------------- - valid, pure ASCII | \x666f6f | \x666f6f | | - valid (in KOI8R) | \x8bc68bcf8bcf | \xc6cfcf | | - invalid,incomplete char | \x8bc68bcf8b | \xc6cf | \x8b | invalid byte sequence for encoding "MULE_INTERNAL": 0x8b - valid (in SHIFT_JIS) | \x92bedd | \x | \x92bedd | character with byte sequence 0x92 0xbe 0xdd in encoding "MULE_INTERNAL" has no equivalent in encoding "KOI8R" - invalid, incomplete char) | \x92be | \x | \x92be | invalid byte sequence for encoding "MULE_INTERNAL": 0x92 0xbe - valid (in Big5) | \x666f6f95a3c1 | \x666f6f | \x95a3c1 | character with byte sequence 0x95 0xa3 0xc1 in encoding "MULE_INTERNAL" has no equivalent in encoding "KOI8R" - invalid, incomplete char | \x666f6f95a3 | \x666f6f | \x95a3 | invalid byte sequence for encoding "MULE_INTERNAL": 0x95 0xa3 - invalid, NUL byte | \x9200bedd | \x | \x9200bedd | character with byte sequence 0x92 0x00 0xbe in encoding "MULE_INTERNAL" has no equivalent in encoding "KOI8R" - invalid, NUL byte | \x92bedd00 | \x | \x92bedd00 | character with byte sequence 0x92 0xbe 0xdd in encoding "MULE_INTERNAL" has no equivalent in encoding "KOI8R" - invalid, NUL byte | \x8b00c68bcf8bcf | \x | \x8b00c68bcf8bcf | character with byte sequence 0x8b 0x00 in encoding "MULE_INTERNAL" has no equivalent in encoding "KOI8R" -(10 rows) - +ERROR: function test_enc_conversion(bytea, text, text, boolean) does not exist +LINE 1: select * from test_enc_conversion(inpu... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. +QUERY: select * from test_enc_conversion(input, src_encoding, dst_encoding, true) +CONTEXT: PL/pgSQL function test_conv(bytea,text,text) line 14 at SQL statement select description, inbytes, (test_conv(inbytes, 'mule_internal', 'iso8859-5')).* from mic_inputs; - description | inbytes | result | errorat | error ----------------------------+------------------+----------+------------------+-------------------------------------------------------------------------------------------------------------------- - valid, pure ASCII | \x666f6f | \x666f6f | | - valid (in KOI8R) | \x8bc68bcf8bcf | \xe4dede | | - invalid,incomplete char | \x8bc68bcf8b | \xe4de | \x8b | invalid byte sequence for encoding "MULE_INTERNAL": 0x8b - valid (in SHIFT_JIS) | \x92bedd | \x | \x92bedd | character with byte sequence 0x92 0xbe 0xdd in encoding "MULE_INTERNAL" has no equivalent in encoding "ISO_8859_5" - invalid, incomplete char) | \x92be | \x | \x92be | invalid byte sequence for encoding "MULE_INTERNAL": 0x92 0xbe - valid (in Big5) | \x666f6f95a3c1 | \x666f6f | \x95a3c1 | character with byte sequence 0x95 0xa3 0xc1 in encoding "MULE_INTERNAL" has no equivalent in encoding "ISO_8859_5" - invalid, incomplete char | \x666f6f95a3 | \x666f6f | \x95a3 | invalid byte sequence for encoding "MULE_INTERNAL": 0x95 0xa3 - invalid, NUL byte | \x9200bedd | \x | \x9200bedd | character with byte sequence 0x92 0x00 0xbe in encoding "MULE_INTERNAL" has no equivalent in encoding "ISO_8859_5" - invalid, NUL byte | \x92bedd00 | \x | \x92bedd00 | character with byte sequence 0x92 0xbe 0xdd in encoding "MULE_INTERNAL" has no equivalent in encoding "ISO_8859_5" - invalid, NUL byte | \x8b00c68bcf8bcf | \x | \x8b00c68bcf8bcf | character with byte sequence 0x8b 0x00 in encoding "MULE_INTERNAL" has no equivalent in encoding "ISO_8859_5" -(10 rows) - +ERROR: function test_enc_conversion(bytea, text, text, boolean) does not exist +LINE 1: select * from test_enc_conversion(inpu... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. +QUERY: select * from test_enc_conversion(input, src_encoding, dst_encoding, true) +CONTEXT: PL/pgSQL function test_conv(bytea,text,text) line 14 at SQL statement select description, inbytes, (test_conv(inbytes, 'mule_internal', 'sjis')).* from mic_inputs; - description | inbytes | result | errorat | error ----------------------------+------------------+----------+------------------+-------------------------------------------------------------------------------------------------------------- - valid, pure ASCII | \x666f6f | \x666f6f | | - valid (in KOI8R) | \x8bc68bcf8bcf | \x | \x8bc68bcf8bcf | character with byte sequence 0x8b 0xc6 in encoding "MULE_INTERNAL" has no equivalent in encoding "SJIS" - invalid,incomplete char | \x8bc68bcf8b | \x | \x8bc68bcf8b | character with byte sequence 0x8b 0xc6 in encoding "MULE_INTERNAL" has no equivalent in encoding "SJIS" - valid (in SHIFT_JIS) | \x92bedd | \x8fdb | | - invalid, incomplete char) | \x92be | \x | \x92be | invalid byte sequence for encoding "MULE_INTERNAL": 0x92 0xbe - valid (in Big5) | \x666f6f95a3c1 | \x666f6f | \x95a3c1 | character with byte sequence 0x95 0xa3 0xc1 in encoding "MULE_INTERNAL" has no equivalent in encoding "SJIS" - invalid, incomplete char | \x666f6f95a3 | \x666f6f | \x95a3 | invalid byte sequence for encoding "MULE_INTERNAL": 0x95 0xa3 - invalid, NUL byte | \x9200bedd | \x | \x9200bedd | invalid byte sequence for encoding "MULE_INTERNAL": 0x92 0x00 0xbe - invalid, NUL byte | \x92bedd00 | \x8fdb | \x00 | invalid byte sequence for encoding "MULE_INTERNAL": 0x00 - invalid, NUL byte | \x8b00c68bcf8bcf | \x | \x8b00c68bcf8bcf | invalid byte sequence for encoding "MULE_INTERNAL": 0x8b 0x00 -(10 rows) - +ERROR: function test_enc_conversion(bytea, text, text, boolean) does not exist +LINE 1: select * from test_enc_conversion(inpu... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. +QUERY: select * from test_enc_conversion(input, src_encoding, dst_encoding, true) +CONTEXT: PL/pgSQL function test_conv(bytea,text,text) line 14 at SQL statement select description, inbytes, (test_conv(inbytes, 'mule_internal', 'big5')).* from mic_inputs; - description | inbytes | result | errorat | error ----------------------------+------------------+--------------+------------------+-------------------------------------------------------------------------------------------------------------- - valid, pure ASCII | \x666f6f | \x666f6f | | - valid (in KOI8R) | \x8bc68bcf8bcf | \x | \x8bc68bcf8bcf | character with byte sequence 0x8b 0xc6 in encoding "MULE_INTERNAL" has no equivalent in encoding "BIG5" - invalid,incomplete char | \x8bc68bcf8b | \x | \x8bc68bcf8b | character with byte sequence 0x8b 0xc6 in encoding "MULE_INTERNAL" has no equivalent in encoding "BIG5" - valid (in SHIFT_JIS) | \x92bedd | \x | \x92bedd | character with byte sequence 0x92 0xbe 0xdd in encoding "MULE_INTERNAL" has no equivalent in encoding "BIG5" - invalid, incomplete char) | \x92be | \x | \x92be | invalid byte sequence for encoding "MULE_INTERNAL": 0x92 0xbe - valid (in Big5) | \x666f6f95a3c1 | \x666f6fa2a1 | | - invalid, incomplete char | \x666f6f95a3 | \x666f6f | \x95a3 | invalid byte sequence for encoding "MULE_INTERNAL": 0x95 0xa3 - invalid, NUL byte | \x9200bedd | \x | \x9200bedd | invalid byte sequence for encoding "MULE_INTERNAL": 0x92 0x00 0xbe - invalid, NUL byte | \x92bedd00 | \x | \x92bedd00 | character with byte sequence 0x92 0xbe 0xdd in encoding "MULE_INTERNAL" has no equivalent in encoding "BIG5" - invalid, NUL byte | \x8b00c68bcf8bcf | \x | \x8b00c68bcf8bcf | invalid byte sequence for encoding "MULE_INTERNAL": 0x8b 0x00 -(10 rows) - +ERROR: function test_enc_conversion(bytea, text, text, boolean) does not exist +LINE 1: select * from test_enc_conversion(inpu... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. +QUERY: select * from test_enc_conversion(input, src_encoding, dst_encoding, true) +CONTEXT: PL/pgSQL function test_conv(bytea,text,text) line 14 at SQL statement select description, inbytes, (test_conv(inbytes, 'mule_internal', 'euc_jp')).* from mic_inputs; - description | inbytes | result | errorat | error ----------------------------+------------------+----------+------------------+---------------------------------------------------------------------------------------------------------------- - valid, pure ASCII | \x666f6f | \x666f6f | | - valid (in KOI8R) | \x8bc68bcf8bcf | \x | \x8bc68bcf8bcf | character with byte sequence 0x8b 0xc6 in encoding "MULE_INTERNAL" has no equivalent in encoding "EUC_JP" - invalid,incomplete char | \x8bc68bcf8b | \x | \x8bc68bcf8b | character with byte sequence 0x8b 0xc6 in encoding "MULE_INTERNAL" has no equivalent in encoding "EUC_JP" - valid (in SHIFT_JIS) | \x92bedd | \xbedd | | - invalid, incomplete char) | \x92be | \x | \x92be | invalid byte sequence for encoding "MULE_INTERNAL": 0x92 0xbe - valid (in Big5) | \x666f6f95a3c1 | \x666f6f | \x95a3c1 | character with byte sequence 0x95 0xa3 0xc1 in encoding "MULE_INTERNAL" has no equivalent in encoding "EUC_JP" - invalid, incomplete char | \x666f6f95a3 | \x666f6f | \x95a3 | invalid byte sequence for encoding "MULE_INTERNAL": 0x95 0xa3 - invalid, NUL byte | \x9200bedd | \x | \x9200bedd | invalid byte sequence for encoding "MULE_INTERNAL": 0x92 0x00 0xbe - invalid, NUL byte | \x92bedd00 | \xbedd | \x00 | invalid byte sequence for encoding "MULE_INTERNAL": 0x00 - invalid, NUL byte | \x8b00c68bcf8bcf | \x | \x8b00c68bcf8bcf | invalid byte sequence for encoding "MULE_INTERNAL": 0x8b 0x00 -(10 rows) - +ERROR: function test_enc_conversion(bytea, text, text, boolean) does not exist +LINE 1: select * from test_enc_conversion(inpu... + ^ +HINT: No function matches the given name and argument types. You might need to add explicit type casts. +QUERY: select * from test_enc_conversion(input, src_encoding, dst_encoding, true) +CONTEXT: PL/pgSQL function test_conv(bytea,text,text) line 14 at SQL statement diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/alter_table.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/alter_table.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/alter_table.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/alter_table.out 2023-02-20 19:48:42.679218609 -0500 @@ -1,4593 +1 @@ --- --- ALTER_TABLE --- --- Clean up in case a prior regression run failed -SET client_min_messages TO 'warning'; -DROP ROLE IF EXISTS regress_alter_table_user1; -RESET client_min_messages; -CREATE USER regress_alter_table_user1; --- --- add attribute --- -CREATE TABLE attmp (initial int4); -COMMENT ON TABLE attmp_wrong IS 'table comment'; -ERROR: relation "attmp_wrong" does not exist -COMMENT ON TABLE attmp IS 'table comment'; -COMMENT ON TABLE attmp IS NULL; -ALTER TABLE attmp ADD COLUMN xmin integer; -- fails -ERROR: column name "xmin" conflicts with a system column name -ALTER TABLE attmp ADD COLUMN a int4 default 3; -ALTER TABLE attmp ADD COLUMN b name; -ALTER TABLE attmp ADD COLUMN c text; -ALTER TABLE attmp ADD COLUMN d float8; -ALTER TABLE attmp ADD COLUMN e float4; -ALTER TABLE attmp ADD COLUMN f int2; -ALTER TABLE attmp ADD COLUMN g polygon; -ALTER TABLE attmp ADD COLUMN i char; -ALTER TABLE attmp ADD COLUMN k int4; -ALTER TABLE attmp ADD COLUMN l tid; -ALTER TABLE attmp ADD COLUMN m xid; -ALTER TABLE attmp ADD COLUMN n oidvector; ---ALTER TABLE attmp ADD COLUMN o lock; -ALTER TABLE attmp ADD COLUMN p boolean; -ALTER TABLE attmp ADD COLUMN q point; -ALTER TABLE attmp ADD COLUMN r lseg; -ALTER TABLE attmp ADD COLUMN s path; -ALTER TABLE attmp ADD COLUMN t box; -ALTER TABLE attmp ADD COLUMN v timestamp; -ALTER TABLE attmp ADD COLUMN w interval; -ALTER TABLE attmp ADD COLUMN x float8[]; -ALTER TABLE attmp ADD COLUMN y float4[]; -ALTER TABLE attmp ADD COLUMN z int2[]; -INSERT INTO attmp (a, b, c, d, e, f, g, i, k, l, m, n, p, q, r, s, t, - v, w, x, y, z) - VALUES (4, 'name', 'text', 4.1, 4.1, 2, '(4.1,4.1,3.1,3.1)', - 'c', - 314159, '(1,1)', '512', - '1 2 3 4 5 6 7 8', true, '(1.1,1.1)', '(4.1,4.1,3.1,3.1)', - '(0,2,4.1,4.1,3.1,3.1)', '(4.1,4.1,3.1,3.1)', - 'epoch', '01:00:10', '{1.0,2.0,3.0,4.0}', '{1.0,2.0,3.0,4.0}', '{1,2,3,4}'); -SELECT * FROM attmp; - initial | a | b | c | d | e | f | g | i | k | l | m | n | p | q | r | s | t | v | w | x | y | z ----------+---+------+------+-----+-----+---+-----------------------+---+--------+-------+-----+-----------------+---+-----------+-----------------------+-----------------------------+---------------------+--------------------------+------------------+-----------+-----------+----------- - | 4 | name | text | 4.1 | 4.1 | 2 | ((4.1,4.1),(3.1,3.1)) | c | 314159 | (1,1) | 512 | 1 2 3 4 5 6 7 8 | t | (1.1,1.1) | [(4.1,4.1),(3.1,3.1)] | ((0,2),(4.1,4.1),(3.1,3.1)) | (4.1,4.1),(3.1,3.1) | Thu Jan 01 00:00:00 1970 | @ 1 hour 10 secs | {1,2,3,4} | {1,2,3,4} | {1,2,3,4} -(1 row) - -DROP TABLE attmp; --- the wolf bug - schema mods caused inconsistent row descriptors -CREATE TABLE attmp ( - initial int4 -); -ALTER TABLE attmp ADD COLUMN a int4; -ALTER TABLE attmp ADD COLUMN b name; -ALTER TABLE attmp ADD COLUMN c text; -ALTER TABLE attmp ADD COLUMN d float8; -ALTER TABLE attmp ADD COLUMN e float4; -ALTER TABLE attmp ADD COLUMN f int2; -ALTER TABLE attmp ADD COLUMN g polygon; -ALTER TABLE attmp ADD COLUMN i char; -ALTER TABLE attmp ADD COLUMN k int4; -ALTER TABLE attmp ADD COLUMN l tid; -ALTER TABLE attmp ADD COLUMN m xid; -ALTER TABLE attmp ADD COLUMN n oidvector; ---ALTER TABLE attmp ADD COLUMN o lock; -ALTER TABLE attmp ADD COLUMN p boolean; -ALTER TABLE attmp ADD COLUMN q point; -ALTER TABLE attmp ADD COLUMN r lseg; -ALTER TABLE attmp ADD COLUMN s path; -ALTER TABLE attmp ADD COLUMN t box; -ALTER TABLE attmp ADD COLUMN v timestamp; -ALTER TABLE attmp ADD COLUMN w interval; -ALTER TABLE attmp ADD COLUMN x float8[]; -ALTER TABLE attmp ADD COLUMN y float4[]; -ALTER TABLE attmp ADD COLUMN z int2[]; -INSERT INTO attmp (a, b, c, d, e, f, g, i, k, l, m, n, p, q, r, s, t, - v, w, x, y, z) - VALUES (4, 'name', 'text', 4.1, 4.1, 2, '(4.1,4.1,3.1,3.1)', - 'c', - 314159, '(1,1)', '512', - '1 2 3 4 5 6 7 8', true, '(1.1,1.1)', '(4.1,4.1,3.1,3.1)', - '(0,2,4.1,4.1,3.1,3.1)', '(4.1,4.1,3.1,3.1)', - 'epoch', '01:00:10', '{1.0,2.0,3.0,4.0}', '{1.0,2.0,3.0,4.0}', '{1,2,3,4}'); -SELECT * FROM attmp; - initial | a | b | c | d | e | f | g | i | k | l | m | n | p | q | r | s | t | v | w | x | y | z ----------+---+------+------+-----+-----+---+-----------------------+---+--------+-------+-----+-----------------+---+-----------+-----------------------+-----------------------------+---------------------+--------------------------+------------------+-----------+-----------+----------- - | 4 | name | text | 4.1 | 4.1 | 2 | ((4.1,4.1),(3.1,3.1)) | c | 314159 | (1,1) | 512 | 1 2 3 4 5 6 7 8 | t | (1.1,1.1) | [(4.1,4.1),(3.1,3.1)] | ((0,2),(4.1,4.1),(3.1,3.1)) | (4.1,4.1),(3.1,3.1) | Thu Jan 01 00:00:00 1970 | @ 1 hour 10 secs | {1,2,3,4} | {1,2,3,4} | {1,2,3,4} -(1 row) - -CREATE INDEX attmp_idx ON attmp (a, (d + e), b); -ALTER INDEX attmp_idx ALTER COLUMN 0 SET STATISTICS 1000; -ERROR: column number must be in range from 1 to 32767 -LINE 1: ALTER INDEX attmp_idx ALTER COLUMN 0 SET STATISTICS 1000; - ^ -ALTER INDEX attmp_idx ALTER COLUMN 1 SET STATISTICS 1000; -ERROR: cannot alter statistics on non-expression column "a" of index "attmp_idx" -HINT: Alter statistics on table column instead. -ALTER INDEX attmp_idx ALTER COLUMN 2 SET STATISTICS 1000; -\d+ attmp_idx - Index "public.attmp_idx" - Column | Type | Key? | Definition | Storage | Stats target ---------+------------------+------+------------+---------+-------------- - a | integer | yes | a | plain | - expr | double precision | yes | (d + e) | plain | 1000 - b | cstring | yes | b | plain | -btree, for table "public.attmp" - -ALTER INDEX attmp_idx ALTER COLUMN 3 SET STATISTICS 1000; -ERROR: cannot alter statistics on non-expression column "b" of index "attmp_idx" -HINT: Alter statistics on table column instead. -ALTER INDEX attmp_idx ALTER COLUMN 4 SET STATISTICS 1000; -ERROR: column number 4 of relation "attmp_idx" does not exist -ALTER INDEX attmp_idx ALTER COLUMN 2 SET STATISTICS -1; -DROP TABLE attmp; --- fails with incorrect object type -CREATE VIEW at_v1 AS SELECT 1 as a; -ALTER TABLE at_v1 ALTER COLUMN a SET STATISTICS 0; -ERROR: "at_v1" is not a table, materialized view, index, partitioned index, or foreign table -DROP VIEW at_v1; --- --- rename - check on both non-temp and temp tables --- -CREATE TABLE attmp (regtable int); -CREATE TEMP TABLE attmp (attmptable int); -ALTER TABLE attmp RENAME TO attmp_new; -SELECT * FROM attmp; - regtable ----------- -(0 rows) - -SELECT * FROM attmp_new; - attmptable ------------- -(0 rows) - -ALTER TABLE attmp RENAME TO attmp_new2; -SELECT * FROM attmp; -- should fail -ERROR: relation "attmp" does not exist -LINE 1: SELECT * FROM attmp; - ^ -SELECT * FROM attmp_new; - attmptable ------------- -(0 rows) - -SELECT * FROM attmp_new2; - regtable ----------- -(0 rows) - -DROP TABLE attmp_new; -DROP TABLE attmp_new2; --- check rename of partitioned tables and indexes also -CREATE TABLE part_attmp (a int primary key) partition by range (a); -CREATE TABLE part_attmp1 PARTITION OF part_attmp FOR VALUES FROM (0) TO (100); -ALTER INDEX part_attmp_pkey RENAME TO part_attmp_index; -ALTER INDEX part_attmp1_pkey RENAME TO part_attmp1_index; -ALTER TABLE part_attmp RENAME TO part_at2tmp; -ALTER TABLE part_attmp1 RENAME TO part_at2tmp1; -SET ROLE regress_alter_table_user1; -ALTER INDEX part_attmp_index RENAME TO fail; -ERROR: must be owner of index part_attmp_index -ALTER INDEX part_attmp1_index RENAME TO fail; -ERROR: must be owner of index part_attmp1_index -ALTER TABLE part_at2tmp RENAME TO fail; -ERROR: must be owner of table part_at2tmp -ALTER TABLE part_at2tmp1 RENAME TO fail; -ERROR: must be owner of table part_at2tmp1 -RESET ROLE; -DROP TABLE part_at2tmp; --- --- check renaming to a table's array type's autogenerated name --- (the array type's name should get out of the way) --- -CREATE TABLE attmp_array (id int); -CREATE TABLE attmp_array2 (id int); -SELECT typname FROM pg_type WHERE oid = 'attmp_array[]'::regtype; - typname --------------- - _attmp_array -(1 row) - -SELECT typname FROM pg_type WHERE oid = 'attmp_array2[]'::regtype; - typname ---------------- - _attmp_array2 -(1 row) - -ALTER TABLE attmp_array2 RENAME TO _attmp_array; -SELECT typname FROM pg_type WHERE oid = 'attmp_array[]'::regtype; - typname ---------------- - __attmp_array -(1 row) - -SELECT typname FROM pg_type WHERE oid = '_attmp_array[]'::regtype; - typname ----------------- - ___attmp_array -(1 row) - -DROP TABLE _attmp_array; -DROP TABLE attmp_array; --- renaming to table's own array type's name is an interesting corner case -CREATE TABLE attmp_array (id int); -SELECT typname FROM pg_type WHERE oid = 'attmp_array[]'::regtype; - typname --------------- - _attmp_array -(1 row) - -ALTER TABLE attmp_array RENAME TO _attmp_array; -SELECT typname FROM pg_type WHERE oid = '_attmp_array[]'::regtype; - typname ---------------- - __attmp_array -(1 row) - -DROP TABLE _attmp_array; --- ALTER TABLE ... RENAME on non-table relations --- renaming indexes (FIXME: this should probably test the index's functionality) -ALTER INDEX IF EXISTS __onek_unique1 RENAME TO attmp_onek_unique1; -NOTICE: relation "__onek_unique1" does not exist, skipping -ALTER INDEX IF EXISTS __attmp_onek_unique1 RENAME TO onek_unique1; -NOTICE: relation "__attmp_onek_unique1" does not exist, skipping -ALTER INDEX onek_unique1 RENAME TO attmp_onek_unique1; -ALTER INDEX attmp_onek_unique1 RENAME TO onek_unique1; -SET ROLE regress_alter_table_user1; -ALTER INDEX onek_unique1 RENAME TO fail; -- permission denied -ERROR: must be owner of index onek_unique1 -RESET ROLE; --- rename statements with mismatching statement and object types -CREATE TABLE alter_idx_rename_test (a INT); -CREATE INDEX alter_idx_rename_test_idx ON alter_idx_rename_test (a); -CREATE TABLE alter_idx_rename_test_parted (a INT) PARTITION BY LIST (a); -CREATE INDEX alter_idx_rename_test_parted_idx ON alter_idx_rename_test_parted (a); -BEGIN; -ALTER INDEX alter_idx_rename_test RENAME TO alter_idx_rename_test_2; -ALTER INDEX alter_idx_rename_test_parted RENAME TO alter_idx_rename_test_parted_2; -SELECT relation::regclass, mode FROM pg_locks -WHERE pid = pg_backend_pid() AND locktype = 'relation' - AND relation::regclass::text LIKE 'alter\_idx%' -ORDER BY relation::regclass::text COLLATE "C"; - relation | mode ---------------------------------+--------------------- - alter_idx_rename_test_2 | AccessExclusiveLock - alter_idx_rename_test_parted_2 | AccessExclusiveLock -(2 rows) - -COMMIT; -BEGIN; -ALTER INDEX alter_idx_rename_test_idx RENAME TO alter_idx_rename_test_idx_2; -ALTER INDEX alter_idx_rename_test_parted_idx RENAME TO alter_idx_rename_test_parted_idx_2; -SELECT relation::regclass, mode FROM pg_locks -WHERE pid = pg_backend_pid() AND locktype = 'relation' - AND relation::regclass::text LIKE 'alter\_idx%' -ORDER BY relation::regclass::text COLLATE "C"; - relation | mode -------------------------------------+-------------------------- - alter_idx_rename_test_idx_2 | ShareUpdateExclusiveLock - alter_idx_rename_test_parted_idx_2 | ShareUpdateExclusiveLock -(2 rows) - -COMMIT; -BEGIN; -ALTER TABLE alter_idx_rename_test_idx_2 RENAME TO alter_idx_rename_test_idx_3; -ALTER TABLE alter_idx_rename_test_parted_idx_2 RENAME TO alter_idx_rename_test_parted_idx_3; -SELECT relation::regclass, mode FROM pg_locks -WHERE pid = pg_backend_pid() AND locktype = 'relation' - AND relation::regclass::text LIKE 'alter\_idx%' -ORDER BY relation::regclass::text COLLATE "C"; - relation | mode -------------------------------------+--------------------- - alter_idx_rename_test_idx_3 | AccessExclusiveLock - alter_idx_rename_test_parted_idx_3 | AccessExclusiveLock -(2 rows) - -COMMIT; -DROP TABLE alter_idx_rename_test_2; --- renaming views -CREATE VIEW attmp_view (unique1) AS SELECT unique1 FROM tenk1; -ALTER TABLE attmp_view RENAME TO attmp_view_new; -SET ROLE regress_alter_table_user1; -ALTER VIEW attmp_view_new RENAME TO fail; -- permission denied -ERROR: must be owner of view attmp_view_new -RESET ROLE; --- hack to ensure we get an indexscan here -set enable_seqscan to off; -set enable_bitmapscan to off; --- 5 values, sorted -SELECT unique1 FROM tenk1 WHERE unique1 < 5; - unique1 ---------- - 0 - 1 - 2 - 3 - 4 -(5 rows) - -reset enable_seqscan; -reset enable_bitmapscan; -DROP VIEW attmp_view_new; --- toast-like relation name -alter table stud_emp rename to pg_toast_stud_emp; -alter table pg_toast_stud_emp rename to stud_emp; --- renaming index should rename constraint as well -ALTER TABLE onek ADD CONSTRAINT onek_unique1_constraint UNIQUE (unique1); -ALTER INDEX onek_unique1_constraint RENAME TO onek_unique1_constraint_foo; -ALTER TABLE onek DROP CONSTRAINT onek_unique1_constraint_foo; --- renaming constraint -ALTER TABLE onek ADD CONSTRAINT onek_check_constraint CHECK (unique1 >= 0); -ALTER TABLE onek RENAME CONSTRAINT onek_check_constraint TO onek_check_constraint_foo; -ALTER TABLE onek DROP CONSTRAINT onek_check_constraint_foo; --- renaming constraint should rename index as well -ALTER TABLE onek ADD CONSTRAINT onek_unique1_constraint UNIQUE (unique1); -DROP INDEX onek_unique1_constraint; -- to see whether it's there -ERROR: cannot drop index onek_unique1_constraint because constraint onek_unique1_constraint on table onek requires it -HINT: You can drop constraint onek_unique1_constraint on table onek instead. -ALTER TABLE onek RENAME CONSTRAINT onek_unique1_constraint TO onek_unique1_constraint_foo; -DROP INDEX onek_unique1_constraint_foo; -- to see whether it's there -ERROR: cannot drop index onek_unique1_constraint_foo because constraint onek_unique1_constraint_foo on table onek requires it -HINT: You can drop constraint onek_unique1_constraint_foo on table onek instead. -ALTER TABLE onek DROP CONSTRAINT onek_unique1_constraint_foo; --- renaming constraints vs. inheritance -CREATE TABLE constraint_rename_test (a int CONSTRAINT con1 CHECK (a > 0), b int, c int); -\d constraint_rename_test - Table "public.constraint_rename_test" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | - b | integer | | | - c | integer | | | -Check constraints: - "con1" CHECK (a > 0) - -CREATE TABLE constraint_rename_test2 (a int CONSTRAINT con1 CHECK (a > 0), d int) INHERITS (constraint_rename_test); -NOTICE: merging column "a" with inherited definition -NOTICE: merging constraint "con1" with inherited definition -\d constraint_rename_test2 - Table "public.constraint_rename_test2" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | - b | integer | | | - c | integer | | | - d | integer | | | -Check constraints: - "con1" CHECK (a > 0) -Inherits: constraint_rename_test - -ALTER TABLE constraint_rename_test2 RENAME CONSTRAINT con1 TO con1foo; -- fail -ERROR: cannot rename inherited constraint "con1" -ALTER TABLE ONLY constraint_rename_test RENAME CONSTRAINT con1 TO con1foo; -- fail -ERROR: inherited constraint "con1" must be renamed in child tables too -ALTER TABLE constraint_rename_test RENAME CONSTRAINT con1 TO con1foo; -- ok -\d constraint_rename_test - Table "public.constraint_rename_test" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | - b | integer | | | - c | integer | | | -Check constraints: - "con1foo" CHECK (a > 0) -Number of child tables: 1 (Use \d+ to list them.) - -\d constraint_rename_test2 - Table "public.constraint_rename_test2" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | - b | integer | | | - c | integer | | | - d | integer | | | -Check constraints: - "con1foo" CHECK (a > 0) -Inherits: constraint_rename_test - -ALTER TABLE constraint_rename_test ADD CONSTRAINT con2 CHECK (b > 0) NO INHERIT; -ALTER TABLE ONLY constraint_rename_test RENAME CONSTRAINT con2 TO con2foo; -- ok -ALTER TABLE constraint_rename_test RENAME CONSTRAINT con2foo TO con2bar; -- ok -\d constraint_rename_test - Table "public.constraint_rename_test" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | - b | integer | | | - c | integer | | | -Check constraints: - "con1foo" CHECK (a > 0) - "con2bar" CHECK (b > 0) NO INHERIT -Number of child tables: 1 (Use \d+ to list them.) - -\d constraint_rename_test2 - Table "public.constraint_rename_test2" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | - b | integer | | | - c | integer | | | - d | integer | | | -Check constraints: - "con1foo" CHECK (a > 0) -Inherits: constraint_rename_test - -ALTER TABLE constraint_rename_test ADD CONSTRAINT con3 PRIMARY KEY (a); -ALTER TABLE constraint_rename_test RENAME CONSTRAINT con3 TO con3foo; -- ok -\d constraint_rename_test - Table "public.constraint_rename_test" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | not null | - b | integer | | | - c | integer | | | -Indexes: - "con3foo" PRIMARY KEY, btree (a) -Check constraints: - "con1foo" CHECK (a > 0) - "con2bar" CHECK (b > 0) NO INHERIT -Number of child tables: 1 (Use \d+ to list them.) - -\d constraint_rename_test2 - Table "public.constraint_rename_test2" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | not null | - b | integer | | | - c | integer | | | - d | integer | | | -Check constraints: - "con1foo" CHECK (a > 0) -Inherits: constraint_rename_test - -DROP TABLE constraint_rename_test2; -DROP TABLE constraint_rename_test; -ALTER TABLE IF EXISTS constraint_not_exist RENAME CONSTRAINT con3 TO con3foo; -- ok -NOTICE: relation "constraint_not_exist" does not exist, skipping -ALTER TABLE IF EXISTS constraint_rename_test ADD CONSTRAINT con4 UNIQUE (a); -NOTICE: relation "constraint_rename_test" does not exist, skipping --- renaming constraints with cache reset of target relation -CREATE TABLE constraint_rename_cache (a int, - CONSTRAINT chk_a CHECK (a > 0), - PRIMARY KEY (a)); -ALTER TABLE constraint_rename_cache - RENAME CONSTRAINT chk_a TO chk_a_new; -ALTER TABLE constraint_rename_cache - RENAME CONSTRAINT constraint_rename_cache_pkey TO constraint_rename_pkey_new; -CREATE TABLE like_constraint_rename_cache - (LIKE constraint_rename_cache INCLUDING ALL); -\d like_constraint_rename_cache - Table "public.like_constraint_rename_cache" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | not null | -Indexes: - "like_constraint_rename_cache_pkey" PRIMARY KEY, btree (a) -Check constraints: - "chk_a_new" CHECK (a > 0) - -DROP TABLE constraint_rename_cache; -DROP TABLE like_constraint_rename_cache; --- FOREIGN KEY CONSTRAINT adding TEST -CREATE TABLE attmp2 (a int primary key); -CREATE TABLE attmp3 (a int, b int); -CREATE TABLE attmp4 (a int, b int, unique(a,b)); -CREATE TABLE attmp5 (a int, b int); --- Insert rows into attmp2 (pktable) -INSERT INTO attmp2 values (1); -INSERT INTO attmp2 values (2); -INSERT INTO attmp2 values (3); -INSERT INTO attmp2 values (4); --- Insert rows into attmp3 -INSERT INTO attmp3 values (1,10); -INSERT INTO attmp3 values (1,20); -INSERT INTO attmp3 values (5,50); --- Try (and fail) to add constraint due to invalid source columns -ALTER TABLE attmp3 add constraint attmpconstr foreign key(c) references attmp2 match full; -ERROR: column "c" referenced in foreign key constraint does not exist --- Try (and fail) to add constraint due to invalid destination columns explicitly given -ALTER TABLE attmp3 add constraint attmpconstr foreign key(a) references attmp2(b) match full; -ERROR: column "b" referenced in foreign key constraint does not exist --- Try (and fail) to add constraint due to invalid data -ALTER TABLE attmp3 add constraint attmpconstr foreign key (a) references attmp2 match full; -ERROR: insert or update on table "attmp3" violates foreign key constraint "attmpconstr" -DETAIL: Key (a)=(5) is not present in table "attmp2". --- Delete failing row -DELETE FROM attmp3 where a=5; --- Try (and succeed) -ALTER TABLE attmp3 add constraint attmpconstr foreign key (a) references attmp2 match full; -ALTER TABLE attmp3 drop constraint attmpconstr; -INSERT INTO attmp3 values (5,50); --- Try NOT VALID and then VALIDATE CONSTRAINT, but fails. Delete failure then re-validate -ALTER TABLE attmp3 add constraint attmpconstr foreign key (a) references attmp2 match full NOT VALID; -ALTER TABLE attmp3 validate constraint attmpconstr; -ERROR: insert or update on table "attmp3" violates foreign key constraint "attmpconstr" -DETAIL: Key (a)=(5) is not present in table "attmp2". --- Delete failing row -DELETE FROM attmp3 where a=5; --- Try (and succeed) and repeat to show it works on already valid constraint -ALTER TABLE attmp3 validate constraint attmpconstr; -ALTER TABLE attmp3 validate constraint attmpconstr; --- Try a non-verified CHECK constraint -ALTER TABLE attmp3 ADD CONSTRAINT b_greater_than_ten CHECK (b > 10); -- fail -ERROR: check constraint "b_greater_than_ten" of relation "attmp3" is violated by some row -ALTER TABLE attmp3 ADD CONSTRAINT b_greater_than_ten CHECK (b > 10) NOT VALID; -- succeeds -ALTER TABLE attmp3 VALIDATE CONSTRAINT b_greater_than_ten; -- fails -ERROR: check constraint "b_greater_than_ten" of relation "attmp3" is violated by some row -DELETE FROM attmp3 WHERE NOT b > 10; -ALTER TABLE attmp3 VALIDATE CONSTRAINT b_greater_than_ten; -- succeeds -ALTER TABLE attmp3 VALIDATE CONSTRAINT b_greater_than_ten; -- succeeds --- Test inherited NOT VALID CHECK constraints -select * from attmp3; - a | b ----+---- - 1 | 20 -(1 row) - -CREATE TABLE attmp6 () INHERITS (attmp3); -CREATE TABLE attmp7 () INHERITS (attmp3); -INSERT INTO attmp6 VALUES (6, 30), (7, 16); -ALTER TABLE attmp3 ADD CONSTRAINT b_le_20 CHECK (b <= 20) NOT VALID; -ALTER TABLE attmp3 VALIDATE CONSTRAINT b_le_20; -- fails -ERROR: check constraint "b_le_20" of relation "attmp6" is violated by some row -DELETE FROM attmp6 WHERE b > 20; -ALTER TABLE attmp3 VALIDATE CONSTRAINT b_le_20; -- succeeds --- An already validated constraint must not be revalidated -CREATE FUNCTION boo(int) RETURNS int IMMUTABLE STRICT LANGUAGE plpgsql AS $$ BEGIN RAISE NOTICE 'boo: %', $1; RETURN $1; END; $$; -INSERT INTO attmp7 VALUES (8, 18); -ALTER TABLE attmp7 ADD CONSTRAINT identity CHECK (b = boo(b)); -NOTICE: boo: 18 -ALTER TABLE attmp3 ADD CONSTRAINT IDENTITY check (b = boo(b)) NOT VALID; -NOTICE: merging constraint "identity" with inherited definition -ALTER TABLE attmp3 VALIDATE CONSTRAINT identity; -NOTICE: boo: 20 -NOTICE: boo: 16 --- A NO INHERIT constraint should not be looked for in children during VALIDATE CONSTRAINT -create table parent_noinh_convalid (a int); -create table child_noinh_convalid () inherits (parent_noinh_convalid); -insert into parent_noinh_convalid values (1); -insert into child_noinh_convalid values (1); -alter table parent_noinh_convalid add constraint check_a_is_2 check (a = 2) no inherit not valid; --- fail, because of the row in parent -alter table parent_noinh_convalid validate constraint check_a_is_2; -ERROR: check constraint "check_a_is_2" of relation "parent_noinh_convalid" is violated by some row -delete from only parent_noinh_convalid; --- ok (parent itself contains no violating rows) -alter table parent_noinh_convalid validate constraint check_a_is_2; -select convalidated from pg_constraint where conrelid = 'parent_noinh_convalid'::regclass and conname = 'check_a_is_2'; - convalidated --------------- - t -(1 row) - --- cleanup -drop table parent_noinh_convalid, child_noinh_convalid; --- Try (and fail) to create constraint from attmp5(a) to attmp4(a) - unique constraint on --- attmp4 is a,b -ALTER TABLE attmp5 add constraint attmpconstr foreign key(a) references attmp4(a) match full; -ERROR: there is no unique constraint matching given keys for referenced table "attmp4" -DROP TABLE attmp7; -DROP TABLE attmp6; -DROP TABLE attmp5; -DROP TABLE attmp4; -DROP TABLE attmp3; -DROP TABLE attmp2; --- NOT VALID with plan invalidation -- ensure we don't use a constraint for --- exclusion until validated -set constraint_exclusion TO 'partition'; -create table nv_parent (d date, check (false) no inherit not valid); --- not valid constraint added at creation time should automatically become valid -\d nv_parent - Table "public.nv_parent" - Column | Type | Collation | Nullable | Default ---------+------+-----------+----------+--------- - d | date | | | -Check constraints: - "nv_parent_check" CHECK (false) NO INHERIT - -create table nv_child_2010 () inherits (nv_parent); -create table nv_child_2011 () inherits (nv_parent); -alter table nv_child_2010 add check (d between '2010-01-01'::date and '2010-12-31'::date) not valid; -alter table nv_child_2011 add check (d between '2011-01-01'::date and '2011-12-31'::date) not valid; -explain (costs off) select * from nv_parent where d between '2011-08-01' and '2011-08-31'; - QUERY PLAN ---------------------------------------------------------------------------- - Append - -> Seq Scan on nv_parent nv_parent_1 - Filter: ((d >= '08-01-2011'::date) AND (d <= '08-31-2011'::date)) - -> Seq Scan on nv_child_2010 nv_parent_2 - Filter: ((d >= '08-01-2011'::date) AND (d <= '08-31-2011'::date)) - -> Seq Scan on nv_child_2011 nv_parent_3 - Filter: ((d >= '08-01-2011'::date) AND (d <= '08-31-2011'::date)) -(7 rows) - -create table nv_child_2009 (check (d between '2009-01-01'::date and '2009-12-31'::date)) inherits (nv_parent); -explain (costs off) select * from nv_parent where d between '2011-08-01'::date and '2011-08-31'::date; - QUERY PLAN ---------------------------------------------------------------------------- - Append - -> Seq Scan on nv_parent nv_parent_1 - Filter: ((d >= '08-01-2011'::date) AND (d <= '08-31-2011'::date)) - -> Seq Scan on nv_child_2010 nv_parent_2 - Filter: ((d >= '08-01-2011'::date) AND (d <= '08-31-2011'::date)) - -> Seq Scan on nv_child_2011 nv_parent_3 - Filter: ((d >= '08-01-2011'::date) AND (d <= '08-31-2011'::date)) -(7 rows) - -explain (costs off) select * from nv_parent where d between '2009-08-01'::date and '2009-08-31'::date; - QUERY PLAN ---------------------------------------------------------------------------- - Append - -> Seq Scan on nv_parent nv_parent_1 - Filter: ((d >= '08-01-2009'::date) AND (d <= '08-31-2009'::date)) - -> Seq Scan on nv_child_2010 nv_parent_2 - Filter: ((d >= '08-01-2009'::date) AND (d <= '08-31-2009'::date)) - -> Seq Scan on nv_child_2011 nv_parent_3 - Filter: ((d >= '08-01-2009'::date) AND (d <= '08-31-2009'::date)) - -> Seq Scan on nv_child_2009 nv_parent_4 - Filter: ((d >= '08-01-2009'::date) AND (d <= '08-31-2009'::date)) -(9 rows) - --- after validation, the constraint should be used -alter table nv_child_2011 VALIDATE CONSTRAINT nv_child_2011_d_check; -explain (costs off) select * from nv_parent where d between '2009-08-01'::date and '2009-08-31'::date; - QUERY PLAN ---------------------------------------------------------------------------- - Append - -> Seq Scan on nv_parent nv_parent_1 - Filter: ((d >= '08-01-2009'::date) AND (d <= '08-31-2009'::date)) - -> Seq Scan on nv_child_2010 nv_parent_2 - Filter: ((d >= '08-01-2009'::date) AND (d <= '08-31-2009'::date)) - -> Seq Scan on nv_child_2009 nv_parent_3 - Filter: ((d >= '08-01-2009'::date) AND (d <= '08-31-2009'::date)) -(7 rows) - --- add an inherited NOT VALID constraint -alter table nv_parent add check (d between '2001-01-01'::date and '2099-12-31'::date) not valid; -\d nv_child_2009 - Table "public.nv_child_2009" - Column | Type | Collation | Nullable | Default ---------+------+-----------+----------+--------- - d | date | | | -Check constraints: - "nv_child_2009_d_check" CHECK (d >= '01-01-2009'::date AND d <= '12-31-2009'::date) - "nv_parent_d_check" CHECK (d >= '01-01-2001'::date AND d <= '12-31-2099'::date) NOT VALID -Inherits: nv_parent - --- we leave nv_parent and children around to help test pg_dump logic --- Foreign key adding test with mixed types --- Note: these tables are TEMP to avoid name conflicts when this test --- is run in parallel with foreign_key.sql. -CREATE TEMP TABLE PKTABLE (ptest1 int PRIMARY KEY); -INSERT INTO PKTABLE VALUES(42); -CREATE TEMP TABLE FKTABLE (ftest1 inet); --- This next should fail, because int=inet does not exist -ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references pktable; -ERROR: foreign key constraint "fktable_ftest1_fkey" cannot be implemented -DETAIL: Key columns "ftest1" and "ptest1" are of incompatible types: inet and integer. --- This should also fail for the same reason, but here we --- give the column name -ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references pktable(ptest1); -ERROR: foreign key constraint "fktable_ftest1_fkey" cannot be implemented -DETAIL: Key columns "ftest1" and "ptest1" are of incompatible types: inet and integer. -DROP TABLE FKTABLE; --- This should succeed, even though they are different types, --- because int=int8 exists and is a member of the integer opfamily -CREATE TEMP TABLE FKTABLE (ftest1 int8); -ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references pktable; --- Check it actually works -INSERT INTO FKTABLE VALUES(42); -- should succeed -INSERT INTO FKTABLE VALUES(43); -- should fail -ERROR: insert or update on table "fktable" violates foreign key constraint "fktable_ftest1_fkey" -DETAIL: Key (ftest1)=(43) is not present in table "pktable". -DROP TABLE FKTABLE; --- This should fail, because we'd have to cast numeric to int which is --- not an implicit coercion (or use numeric=numeric, but that's not part --- of the integer opfamily) -CREATE TEMP TABLE FKTABLE (ftest1 numeric); -ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references pktable; -ERROR: foreign key constraint "fktable_ftest1_fkey" cannot be implemented -DETAIL: Key columns "ftest1" and "ptest1" are of incompatible types: numeric and integer. -DROP TABLE FKTABLE; -DROP TABLE PKTABLE; --- On the other hand, this should work because int implicitly promotes to --- numeric, and we allow promotion on the FK side -CREATE TEMP TABLE PKTABLE (ptest1 numeric PRIMARY KEY); -INSERT INTO PKTABLE VALUES(42); -CREATE TEMP TABLE FKTABLE (ftest1 int); -ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references pktable; --- Check it actually works -INSERT INTO FKTABLE VALUES(42); -- should succeed -INSERT INTO FKTABLE VALUES(43); -- should fail -ERROR: insert or update on table "fktable" violates foreign key constraint "fktable_ftest1_fkey" -DETAIL: Key (ftest1)=(43) is not present in table "pktable". -DROP TABLE FKTABLE; -DROP TABLE PKTABLE; -CREATE TEMP TABLE PKTABLE (ptest1 int, ptest2 inet, - PRIMARY KEY(ptest1, ptest2)); --- This should fail, because we just chose really odd types -CREATE TEMP TABLE FKTABLE (ftest1 cidr, ftest2 timestamp); -ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1, ftest2) references pktable; -ERROR: foreign key constraint "fktable_ftest1_ftest2_fkey" cannot be implemented -DETAIL: Key columns "ftest1" and "ptest1" are of incompatible types: cidr and integer. -DROP TABLE FKTABLE; --- Again, so should this... -CREATE TEMP TABLE FKTABLE (ftest1 cidr, ftest2 timestamp); -ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1, ftest2) - references pktable(ptest1, ptest2); -ERROR: foreign key constraint "fktable_ftest1_ftest2_fkey" cannot be implemented -DETAIL: Key columns "ftest1" and "ptest1" are of incompatible types: cidr and integer. -DROP TABLE FKTABLE; --- This fails because we mixed up the column ordering -CREATE TEMP TABLE FKTABLE (ftest1 int, ftest2 inet); -ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1, ftest2) - references pktable(ptest2, ptest1); -ERROR: foreign key constraint "fktable_ftest1_ftest2_fkey" cannot be implemented -DETAIL: Key columns "ftest1" and "ptest2" are of incompatible types: integer and inet. --- As does this... -ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest2, ftest1) - references pktable(ptest1, ptest2); -ERROR: foreign key constraint "fktable_ftest2_ftest1_fkey" cannot be implemented -DETAIL: Key columns "ftest2" and "ptest1" are of incompatible types: inet and integer. -DROP TABLE FKTABLE; -DROP TABLE PKTABLE; --- Test that ALTER CONSTRAINT updates trigger deferrability properly -CREATE TEMP TABLE PKTABLE (ptest1 int primary key); -CREATE TEMP TABLE FKTABLE (ftest1 int); -ALTER TABLE FKTABLE ADD CONSTRAINT fknd FOREIGN KEY(ftest1) REFERENCES pktable - ON DELETE CASCADE ON UPDATE NO ACTION NOT DEFERRABLE; -ALTER TABLE FKTABLE ADD CONSTRAINT fkdd FOREIGN KEY(ftest1) REFERENCES pktable - ON DELETE CASCADE ON UPDATE NO ACTION DEFERRABLE INITIALLY DEFERRED; -ALTER TABLE FKTABLE ADD CONSTRAINT fkdi FOREIGN KEY(ftest1) REFERENCES pktable - ON DELETE CASCADE ON UPDATE NO ACTION DEFERRABLE INITIALLY IMMEDIATE; -ALTER TABLE FKTABLE ADD CONSTRAINT fknd2 FOREIGN KEY(ftest1) REFERENCES pktable - ON DELETE CASCADE ON UPDATE NO ACTION DEFERRABLE INITIALLY DEFERRED; -ALTER TABLE FKTABLE ALTER CONSTRAINT fknd2 NOT DEFERRABLE; -ALTER TABLE FKTABLE ADD CONSTRAINT fkdd2 FOREIGN KEY(ftest1) REFERENCES pktable - ON DELETE CASCADE ON UPDATE NO ACTION NOT DEFERRABLE; -ALTER TABLE FKTABLE ALTER CONSTRAINT fkdd2 DEFERRABLE INITIALLY DEFERRED; -ALTER TABLE FKTABLE ADD CONSTRAINT fkdi2 FOREIGN KEY(ftest1) REFERENCES pktable - ON DELETE CASCADE ON UPDATE NO ACTION NOT DEFERRABLE; -ALTER TABLE FKTABLE ALTER CONSTRAINT fkdi2 DEFERRABLE INITIALLY IMMEDIATE; -SELECT conname, tgfoid::regproc, tgtype, tgdeferrable, tginitdeferred -FROM pg_trigger JOIN pg_constraint con ON con.oid = tgconstraint -WHERE tgrelid = 'pktable'::regclass -ORDER BY 1,2,3; - conname | tgfoid | tgtype | tgdeferrable | tginitdeferred ----------+------------------------+--------+--------------+---------------- - fkdd | "RI_FKey_cascade_del" | 9 | f | f - fkdd | "RI_FKey_noaction_upd" | 17 | t | t - fkdd2 | "RI_FKey_cascade_del" | 9 | f | f - fkdd2 | "RI_FKey_noaction_upd" | 17 | t | t - fkdi | "RI_FKey_cascade_del" | 9 | f | f - fkdi | "RI_FKey_noaction_upd" | 17 | t | f - fkdi2 | "RI_FKey_cascade_del" | 9 | f | f - fkdi2 | "RI_FKey_noaction_upd" | 17 | t | f - fknd | "RI_FKey_cascade_del" | 9 | f | f - fknd | "RI_FKey_noaction_upd" | 17 | f | f - fknd2 | "RI_FKey_cascade_del" | 9 | f | f - fknd2 | "RI_FKey_noaction_upd" | 17 | f | f -(12 rows) - -SELECT conname, tgfoid::regproc, tgtype, tgdeferrable, tginitdeferred -FROM pg_trigger JOIN pg_constraint con ON con.oid = tgconstraint -WHERE tgrelid = 'fktable'::regclass -ORDER BY 1,2,3; - conname | tgfoid | tgtype | tgdeferrable | tginitdeferred ----------+---------------------+--------+--------------+---------------- - fkdd | "RI_FKey_check_ins" | 5 | t | t - fkdd | "RI_FKey_check_upd" | 17 | t | t - fkdd2 | "RI_FKey_check_ins" | 5 | t | t - fkdd2 | "RI_FKey_check_upd" | 17 | t | t - fkdi | "RI_FKey_check_ins" | 5 | t | f - fkdi | "RI_FKey_check_upd" | 17 | t | f - fkdi2 | "RI_FKey_check_ins" | 5 | t | f - fkdi2 | "RI_FKey_check_upd" | 17 | t | f - fknd | "RI_FKey_check_ins" | 5 | f | f - fknd | "RI_FKey_check_upd" | 17 | f | f - fknd2 | "RI_FKey_check_ins" | 5 | f | f - fknd2 | "RI_FKey_check_upd" | 17 | f | f -(12 rows) - --- temp tables should go away by themselves, need not drop them. --- test check constraint adding -create table atacc1 ( test int ); --- add a check constraint -alter table atacc1 add constraint atacc_test1 check (test>3); --- should fail -insert into atacc1 (test) values (2); -ERROR: new row for relation "atacc1" violates check constraint "atacc_test1" -DETAIL: Failing row contains (2). --- should succeed -insert into atacc1 (test) values (4); -drop table atacc1; --- let's do one where the check fails when added -create table atacc1 ( test int ); --- insert a soon to be failing row -insert into atacc1 (test) values (2); --- add a check constraint (fails) -alter table atacc1 add constraint atacc_test1 check (test>3); -ERROR: check constraint "atacc_test1" of relation "atacc1" is violated by some row -insert into atacc1 (test) values (4); -drop table atacc1; --- let's do one where the check fails because the column doesn't exist -create table atacc1 ( test int ); --- add a check constraint (fails) -alter table atacc1 add constraint atacc_test1 check (test1>3); -ERROR: column "test1" does not exist -HINT: Perhaps you meant to reference the column "atacc1.test". -drop table atacc1; --- something a little more complicated -create table atacc1 ( test int, test2 int, test3 int); --- add a check constraint (fails) -alter table atacc1 add constraint atacc_test1 check (test+test23), test2 int); -alter table atacc1 add check (test2>test); --- should fail for $2 -insert into atacc1 (test2, test) values (3, 4); -ERROR: new row for relation "atacc1" violates check constraint "atacc1_check" -DETAIL: Failing row contains (4, 3). -drop table atacc1; --- inheritance related tests -create table atacc1 (test int); -create table atacc2 (test2 int); -create table atacc3 (test3 int) inherits (atacc1, atacc2); -alter table atacc2 add constraint foo check (test2>0); --- fail and then succeed on atacc2 -insert into atacc2 (test2) values (-3); -ERROR: new row for relation "atacc2" violates check constraint "foo" -DETAIL: Failing row contains (-3). -insert into atacc2 (test2) values (3); --- fail and then succeed on atacc3 -insert into atacc3 (test2) values (-3); -ERROR: new row for relation "atacc3" violates check constraint "foo" -DETAIL: Failing row contains (null, -3, null). -insert into atacc3 (test2) values (3); -drop table atacc3; -drop table atacc2; -drop table atacc1; --- same things with one created with INHERIT -create table atacc1 (test int); -create table atacc2 (test2 int); -create table atacc3 (test3 int) inherits (atacc1, atacc2); -alter table atacc3 no inherit atacc2; --- fail -alter table atacc3 no inherit atacc2; -ERROR: relation "atacc2" is not a parent of relation "atacc3" --- make sure it really isn't a child -insert into atacc3 (test2) values (3); -select test2 from atacc2; - test2 -------- -(0 rows) - --- fail due to missing constraint -alter table atacc2 add constraint foo check (test2>0); -alter table atacc3 inherit atacc2; -ERROR: child table is missing constraint "foo" --- fail due to missing column -alter table atacc3 rename test2 to testx; -alter table atacc3 inherit atacc2; -ERROR: child table is missing column "test2" --- fail due to mismatched data type -alter table atacc3 add test2 bool; -alter table atacc3 inherit atacc2; -ERROR: child table "atacc3" has different type for column "test2" -alter table atacc3 drop test2; --- succeed -alter table atacc3 add test2 int; -update atacc3 set test2 = 4 where test2 is null; -alter table atacc3 add constraint foo check (test2>0); -alter table atacc3 inherit atacc2; --- fail due to duplicates and circular inheritance -alter table atacc3 inherit atacc2; -ERROR: relation "atacc2" would be inherited from more than once -alter table atacc2 inherit atacc3; -ERROR: circular inheritance not allowed -DETAIL: "atacc3" is already a child of "atacc2". -alter table atacc2 inherit atacc2; -ERROR: circular inheritance not allowed -DETAIL: "atacc2" is already a child of "atacc2". --- test that we really are a child now (should see 4 not 3 and cascade should go through) -select test2 from atacc2; - test2 -------- - 4 -(1 row) - -drop table atacc2 cascade; -NOTICE: drop cascades to table atacc3 -drop table atacc1; --- adding only to a parent is allowed as of 9.2 -create table atacc1 (test int); -create table atacc2 (test2 int) inherits (atacc1); --- ok: -alter table atacc1 add constraint foo check (test>0) no inherit; --- check constraint is not there on child -insert into atacc2 (test) values (-3); --- check constraint is there on parent -insert into atacc1 (test) values (-3); -ERROR: new row for relation "atacc1" violates check constraint "foo" -DETAIL: Failing row contains (-3). -insert into atacc1 (test) values (3); --- fail, violating row: -alter table atacc2 add constraint foo check (test>0) no inherit; -ERROR: check constraint "foo" of relation "atacc2" is violated by some row -drop table atacc2; -drop table atacc1; --- test unique constraint adding -create table atacc1 ( test int ) ; --- add a unique constraint -alter table atacc1 add constraint atacc_test1 unique (test); --- insert first value -insert into atacc1 (test) values (2); --- should fail -insert into atacc1 (test) values (2); -ERROR: duplicate key value violates unique constraint "atacc_test1" -DETAIL: Key (test)=(2) already exists. --- should succeed -insert into atacc1 (test) values (4); --- try to create duplicates via alter table using - should fail -alter table atacc1 alter column test type integer using 0; -ERROR: could not create unique index "atacc_test1" -DETAIL: Key (test)=(0) is duplicated. -drop table atacc1; --- let's do one where the unique constraint fails when added -create table atacc1 ( test int ); --- insert soon to be failing rows -insert into atacc1 (test) values (2); -insert into atacc1 (test) values (2); --- add a unique constraint (fails) -alter table atacc1 add constraint atacc_test1 unique (test); -ERROR: could not create unique index "atacc_test1" -DETAIL: Key (test)=(2) is duplicated. -insert into atacc1 (test) values (3); -drop table atacc1; --- let's do one where the unique constraint fails --- because the column doesn't exist -create table atacc1 ( test int ); --- add a unique constraint (fails) -alter table atacc1 add constraint atacc_test1 unique (test1); -ERROR: column "test1" named in key does not exist -drop table atacc1; --- something a little more complicated -create table atacc1 ( test int, test2 int); --- add a unique constraint -alter table atacc1 add constraint atacc_test1 unique (test, test2); --- insert initial value -insert into atacc1 (test,test2) values (4,4); --- should fail -insert into atacc1 (test,test2) values (4,4); -ERROR: duplicate key value violates unique constraint "atacc_test1" -DETAIL: Key (test, test2)=(4, 4) already exists. --- should all succeed -insert into atacc1 (test,test2) values (4,5); -insert into atacc1 (test,test2) values (5,4); -insert into atacc1 (test,test2) values (5,5); -drop table atacc1; --- lets do some naming tests -create table atacc1 (test int, test2 int, unique(test)); -alter table atacc1 add unique (test2); --- should fail for @@ second one @@ -insert into atacc1 (test2, test) values (3, 3); -insert into atacc1 (test2, test) values (2, 3); -ERROR: duplicate key value violates unique constraint "atacc1_test_key" -DETAIL: Key (test)=(3) already exists. -drop table atacc1; --- test primary key constraint adding -create table atacc1 ( id serial, test int) ; --- add a primary key constraint -alter table atacc1 add constraint atacc_test1 primary key (test); --- insert first value -insert into atacc1 (test) values (2); --- should fail -insert into atacc1 (test) values (2); -ERROR: duplicate key value violates unique constraint "atacc_test1" -DETAIL: Key (test)=(2) already exists. --- should succeed -insert into atacc1 (test) values (4); --- inserting NULL should fail -insert into atacc1 (test) values(NULL); -ERROR: null value in column "test" of relation "atacc1" violates not-null constraint -DETAIL: Failing row contains (4, null). --- try adding a second primary key (should fail) -alter table atacc1 add constraint atacc_oid1 primary key(id); -ERROR: multiple primary keys for table "atacc1" are not allowed --- drop first primary key constraint -alter table atacc1 drop constraint atacc_test1 restrict; --- try adding a primary key on oid (should succeed) -alter table atacc1 add constraint atacc_oid1 primary key(id); -drop table atacc1; --- let's do one where the primary key constraint fails when added -create table atacc1 ( test int ); --- insert soon to be failing rows -insert into atacc1 (test) values (2); -insert into atacc1 (test) values (2); --- add a primary key (fails) -alter table atacc1 add constraint atacc_test1 primary key (test); -ERROR: could not create unique index "atacc_test1" -DETAIL: Key (test)=(2) is duplicated. -insert into atacc1 (test) values (3); -drop table atacc1; --- let's do another one where the primary key constraint fails when added -create table atacc1 ( test int ); --- insert soon to be failing row -insert into atacc1 (test) values (NULL); --- add a primary key (fails) -alter table atacc1 add constraint atacc_test1 primary key (test); -ERROR: column "test" of relation "atacc1" contains null values -insert into atacc1 (test) values (3); -drop table atacc1; --- let's do one where the primary key constraint fails --- because the column doesn't exist -create table atacc1 ( test int ); --- add a primary key constraint (fails) -alter table atacc1 add constraint atacc_test1 primary key (test1); -ERROR: column "test1" of relation "atacc1" does not exist -drop table atacc1; --- adding a new column as primary key to a non-empty table. --- should fail unless the column has a non-null default value. -create table atacc1 ( test int ); -insert into atacc1 (test) values (0); --- add a primary key column without a default (fails). -alter table atacc1 add column test2 int primary key; -ERROR: column "test2" of relation "atacc1" contains null values --- now add a primary key column with a default (succeeds). -alter table atacc1 add column test2 int default 0 primary key; -drop table atacc1; --- this combination used to have order-of-execution problems (bug #15580) -create table atacc1 (a int); -insert into atacc1 values(1); -alter table atacc1 - add column b float8 not null default random(), - add primary key(a); -drop table atacc1; --- additionally, we've seen issues with foreign key validation not being --- properly delayed until after a table rewrite. Check that works ok. -create table atacc1 (a int primary key); -alter table atacc1 add constraint atacc1_fkey foreign key (a) references atacc1 (a) not valid; -alter table atacc1 validate constraint atacc1_fkey, alter a type bigint; -drop table atacc1; --- we've also seen issues with check constraints being validated at the wrong --- time when there's a pending table rewrite. -create table atacc1 (a bigint, b int); -insert into atacc1 values(1,1); -alter table atacc1 add constraint atacc1_chk check(b = 1) not valid; -alter table atacc1 validate constraint atacc1_chk, alter a type int; -drop table atacc1; --- same as above, but ensure the constraint violation is detected -create table atacc1 (a bigint, b int); -insert into atacc1 values(1,2); -alter table atacc1 add constraint atacc1_chk check(b = 1) not valid; -alter table atacc1 validate constraint atacc1_chk, alter a type int; -ERROR: check constraint "atacc1_chk" of relation "atacc1" is violated by some row -drop table atacc1; --- something a little more complicated -create table atacc1 ( test int, test2 int); --- add a primary key constraint -alter table atacc1 add constraint atacc_test1 primary key (test, test2); --- try adding a second primary key - should fail -alter table atacc1 add constraint atacc_test2 primary key (test); -ERROR: multiple primary keys for table "atacc1" are not allowed --- insert initial value -insert into atacc1 (test,test2) values (4,4); --- should fail -insert into atacc1 (test,test2) values (4,4); -ERROR: duplicate key value violates unique constraint "atacc_test1" -DETAIL: Key (test, test2)=(4, 4) already exists. -insert into atacc1 (test,test2) values (NULL,3); -ERROR: null value in column "test" of relation "atacc1" violates not-null constraint -DETAIL: Failing row contains (null, 3). -insert into atacc1 (test,test2) values (3, NULL); -ERROR: null value in column "test2" of relation "atacc1" violates not-null constraint -DETAIL: Failing row contains (3, null). -insert into atacc1 (test,test2) values (NULL,NULL); -ERROR: null value in column "test" of relation "atacc1" violates not-null constraint -DETAIL: Failing row contains (null, null). --- should all succeed -insert into atacc1 (test,test2) values (4,5); -insert into atacc1 (test,test2) values (5,4); -insert into atacc1 (test,test2) values (5,5); -drop table atacc1; --- lets do some naming tests -create table atacc1 (test int, test2 int, primary key(test)); --- only first should succeed -insert into atacc1 (test2, test) values (3, 3); -insert into atacc1 (test2, test) values (2, 3); -ERROR: duplicate key value violates unique constraint "atacc1_pkey" -DETAIL: Key (test)=(3) already exists. -insert into atacc1 (test2, test) values (1, NULL); -ERROR: null value in column "test" of relation "atacc1" violates not-null constraint -DETAIL: Failing row contains (null, 1). -drop table atacc1; --- alter table / alter column [set/drop] not null tests --- try altering system catalogs, should fail -alter table pg_class alter column relname drop not null; -ERROR: permission denied: "pg_class" is a system catalog -alter table pg_class alter relname set not null; -ERROR: permission denied: "pg_class" is a system catalog --- try altering non-existent table, should fail -alter table non_existent alter column bar set not null; -ERROR: relation "non_existent" does not exist -alter table non_existent alter column bar drop not null; -ERROR: relation "non_existent" does not exist --- test setting columns to null and not null and vice versa --- test checking for null values and primary key -create table atacc1 (test int not null); -alter table atacc1 add constraint "atacc1_pkey" primary key (test); -alter table atacc1 alter column test drop not null; -ERROR: column "test" is in a primary key -alter table atacc1 drop constraint "atacc1_pkey"; -alter table atacc1 alter column test drop not null; -insert into atacc1 values (null); -alter table atacc1 alter test set not null; -ERROR: column "test" of relation "atacc1" contains null values -delete from atacc1; -alter table atacc1 alter test set not null; --- try altering a non-existent column, should fail -alter table atacc1 alter bar set not null; -ERROR: column "bar" of relation "atacc1" does not exist -alter table atacc1 alter bar drop not null; -ERROR: column "bar" of relation "atacc1" does not exist --- try creating a view and altering that, should fail -create view myview as select * from atacc1; -alter table myview alter column test drop not null; -ERROR: "myview" is not a table or foreign table -alter table myview alter column test set not null; -ERROR: "myview" is not a table or foreign table -drop view myview; -drop table atacc1; --- set not null verified by constraints -create table atacc1 (test_a int, test_b int); -insert into atacc1 values (null, 1); --- constraint not cover all values, should fail -alter table atacc1 add constraint atacc1_constr_or check(test_a is not null or test_b < 10); -alter table atacc1 alter test_a set not null; -ERROR: column "test_a" of relation "atacc1" contains null values -alter table atacc1 drop constraint atacc1_constr_or; --- not valid constraint, should fail -alter table atacc1 add constraint atacc1_constr_invalid check(test_a is not null) not valid; -alter table atacc1 alter test_a set not null; -ERROR: column "test_a" of relation "atacc1" contains null values -alter table atacc1 drop constraint atacc1_constr_invalid; --- with valid constraint -update atacc1 set test_a = 1; -alter table atacc1 add constraint atacc1_constr_a_valid check(test_a is not null); -alter table atacc1 alter test_a set not null; -delete from atacc1; -insert into atacc1 values (2, null); -alter table atacc1 alter test_a drop not null; --- test multiple set not null at same time --- test_a checked by atacc1_constr_a_valid, test_b should fail by table scan -alter table atacc1 alter test_a set not null, alter test_b set not null; -ERROR: column "test_b" of relation "atacc1" contains null values --- commands order has no importance -alter table atacc1 alter test_b set not null, alter test_a set not null; -ERROR: column "test_b" of relation "atacc1" contains null values --- valid one by table scan, one by check constraints -update atacc1 set test_b = 1; -alter table atacc1 alter test_b set not null, alter test_a set not null; -alter table atacc1 alter test_a drop not null, alter test_b drop not null; --- both column has check constraints -alter table atacc1 add constraint atacc1_constr_b_valid check(test_b is not null); -alter table atacc1 alter test_b set not null, alter test_a set not null; -drop table atacc1; --- test inheritance -create table parent (a int); -create table child (b varchar(255)) inherits (parent); -alter table parent alter a set not null; -insert into parent values (NULL); -ERROR: null value in column "a" of relation "parent" violates not-null constraint -DETAIL: Failing row contains (null). -insert into child (a, b) values (NULL, 'foo'); -ERROR: null value in column "a" of relation "child" violates not-null constraint -DETAIL: Failing row contains (null, foo). -alter table parent alter a drop not null; -insert into parent values (NULL); -insert into child (a, b) values (NULL, 'foo'); -alter table only parent alter a set not null; -ERROR: column "a" of relation "parent" contains null values -alter table child alter a set not null; -ERROR: column "a" of relation "child" contains null values -delete from parent; -alter table only parent alter a set not null; -insert into parent values (NULL); -ERROR: null value in column "a" of relation "parent" violates not-null constraint -DETAIL: Failing row contains (null). -alter table child alter a set not null; -insert into child (a, b) values (NULL, 'foo'); -ERROR: null value in column "a" of relation "child" violates not-null constraint -DETAIL: Failing row contains (null, foo). -delete from child; -alter table child alter a set not null; -insert into child (a, b) values (NULL, 'foo'); -ERROR: null value in column "a" of relation "child" violates not-null constraint -DETAIL: Failing row contains (null, foo). -drop table child; -drop table parent; --- test setting and removing default values -create table def_test ( - c1 int4 default 5, - c2 text default 'initial_default' -); -insert into def_test default values; -alter table def_test alter column c1 drop default; -insert into def_test default values; -alter table def_test alter column c2 drop default; -insert into def_test default values; -alter table def_test alter column c1 set default 10; -alter table def_test alter column c2 set default 'new_default'; -insert into def_test default values; -select * from def_test; - c1 | c2 -----+----------------- - 5 | initial_default - | initial_default - | - 10 | new_default -(4 rows) - --- set defaults to an incorrect type: this should fail -alter table def_test alter column c1 set default 'wrong_datatype'; -ERROR: invalid input syntax for type integer: "wrong_datatype" -alter table def_test alter column c2 set default 20; --- set defaults on a non-existent column: this should fail -alter table def_test alter column c3 set default 30; -ERROR: column "c3" of relation "def_test" does not exist --- set defaults on views: we need to create a view, add a rule --- to allow insertions into it, and then alter the view to add --- a default -create view def_view_test as select * from def_test; -create rule def_view_test_ins as - on insert to def_view_test - do instead insert into def_test select new.*; -insert into def_view_test default values; -alter table def_view_test alter column c1 set default 45; -insert into def_view_test default values; -alter table def_view_test alter column c2 set default 'view_default'; -insert into def_view_test default values; -select * from def_view_test; - c1 | c2 -----+----------------- - 5 | initial_default - | initial_default - | - 10 | new_default - | - 45 | - 45 | view_default -(7 rows) - -drop rule def_view_test_ins on def_view_test; -drop view def_view_test; -drop table def_test; --- alter table / drop column tests --- try altering system catalogs, should fail -alter table pg_class drop column relname; -ERROR: permission denied: "pg_class" is a system catalog --- try altering non-existent table, should fail -alter table nosuchtable drop column bar; -ERROR: relation "nosuchtable" does not exist --- test dropping columns -create table atacc1 (a int4 not null, b int4, c int4 not null, d int4); -insert into atacc1 values (1, 2, 3, 4); -alter table atacc1 drop a; -alter table atacc1 drop a; -ERROR: column "a" of relation "atacc1" does not exist --- SELECTs -select * from atacc1; - b | c | d ----+---+--- - 2 | 3 | 4 -(1 row) - -select * from atacc1 order by a; -ERROR: column "a" does not exist -LINE 1: select * from atacc1 order by a; - ^ -select * from atacc1 order by "........pg.dropped.1........"; -ERROR: column "........pg.dropped.1........" does not exist -LINE 1: select * from atacc1 order by "........pg.dropped.1........"... - ^ -select * from atacc1 group by a; -ERROR: column "a" does not exist -LINE 1: select * from atacc1 group by a; - ^ -select * from atacc1 group by "........pg.dropped.1........"; -ERROR: column "........pg.dropped.1........" does not exist -LINE 1: select * from atacc1 group by "........pg.dropped.1........"... - ^ -select atacc1.* from atacc1; - b | c | d ----+---+--- - 2 | 3 | 4 -(1 row) - -select a from atacc1; -ERROR: column "a" does not exist -LINE 1: select a from atacc1; - ^ -select atacc1.a from atacc1; -ERROR: column atacc1.a does not exist -LINE 1: select atacc1.a from atacc1; - ^ -select b,c,d from atacc1; - b | c | d ----+---+--- - 2 | 3 | 4 -(1 row) - -select a,b,c,d from atacc1; -ERROR: column "a" does not exist -LINE 1: select a,b,c,d from atacc1; - ^ -select * from atacc1 where a = 1; -ERROR: column "a" does not exist -LINE 1: select * from atacc1 where a = 1; - ^ -select "........pg.dropped.1........" from atacc1; -ERROR: column "........pg.dropped.1........" does not exist -LINE 1: select "........pg.dropped.1........" from atacc1; - ^ -select atacc1."........pg.dropped.1........" from atacc1; -ERROR: column atacc1.........pg.dropped.1........ does not exist -LINE 1: select atacc1."........pg.dropped.1........" from atacc1; - ^ -select "........pg.dropped.1........",b,c,d from atacc1; -ERROR: column "........pg.dropped.1........" does not exist -LINE 1: select "........pg.dropped.1........",b,c,d from atacc1; - ^ -select * from atacc1 where "........pg.dropped.1........" = 1; -ERROR: column "........pg.dropped.1........" does not exist -LINE 1: select * from atacc1 where "........pg.dropped.1........" = ... - ^ --- UPDATEs -update atacc1 set a = 3; -ERROR: column "a" of relation "atacc1" does not exist -LINE 1: update atacc1 set a = 3; - ^ -update atacc1 set b = 2 where a = 3; -ERROR: column "a" does not exist -LINE 1: update atacc1 set b = 2 where a = 3; - ^ -update atacc1 set "........pg.dropped.1........" = 3; -ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist -LINE 1: update atacc1 set "........pg.dropped.1........" = 3; - ^ -update atacc1 set b = 2 where "........pg.dropped.1........" = 3; -ERROR: column "........pg.dropped.1........" does not exist -LINE 1: update atacc1 set b = 2 where "........pg.dropped.1........"... - ^ --- INSERTs -insert into atacc1 values (10, 11, 12, 13); -ERROR: INSERT has more expressions than target columns -LINE 1: insert into atacc1 values (10, 11, 12, 13); - ^ -insert into atacc1 values (default, 11, 12, 13); -ERROR: INSERT has more expressions than target columns -LINE 1: insert into atacc1 values (default, 11, 12, 13); - ^ -insert into atacc1 values (11, 12, 13); -insert into atacc1 (a) values (10); -ERROR: column "a" of relation "atacc1" does not exist -LINE 1: insert into atacc1 (a) values (10); - ^ -insert into atacc1 (a) values (default); -ERROR: column "a" of relation "atacc1" does not exist -LINE 1: insert into atacc1 (a) values (default); - ^ -insert into atacc1 (a,b,c,d) values (10,11,12,13); -ERROR: column "a" of relation "atacc1" does not exist -LINE 1: insert into atacc1 (a,b,c,d) values (10,11,12,13); - ^ -insert into atacc1 (a,b,c,d) values (default,11,12,13); -ERROR: column "a" of relation "atacc1" does not exist -LINE 1: insert into atacc1 (a,b,c,d) values (default,11,12,13); - ^ -insert into atacc1 (b,c,d) values (11,12,13); -insert into atacc1 ("........pg.dropped.1........") values (10); -ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist -LINE 1: insert into atacc1 ("........pg.dropped.1........") values (... - ^ -insert into atacc1 ("........pg.dropped.1........") values (default); -ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist -LINE 1: insert into atacc1 ("........pg.dropped.1........") values (... - ^ -insert into atacc1 ("........pg.dropped.1........",b,c,d) values (10,11,12,13); -ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist -LINE 1: insert into atacc1 ("........pg.dropped.1........",b,c,d) va... - ^ -insert into atacc1 ("........pg.dropped.1........",b,c,d) values (default,11,12,13); -ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist -LINE 1: insert into atacc1 ("........pg.dropped.1........",b,c,d) va... - ^ --- DELETEs -delete from atacc1 where a = 3; -ERROR: column "a" does not exist -LINE 1: delete from atacc1 where a = 3; - ^ -delete from atacc1 where "........pg.dropped.1........" = 3; -ERROR: column "........pg.dropped.1........" does not exist -LINE 1: delete from atacc1 where "........pg.dropped.1........" = 3; - ^ -delete from atacc1; --- try dropping a non-existent column, should fail -alter table atacc1 drop bar; -ERROR: column "bar" of relation "atacc1" does not exist --- try removing an oid column, should succeed (as it's nonexistent) -alter table atacc1 SET WITHOUT OIDS; --- try adding an oid column, should fail (not supported) -alter table atacc1 SET WITH OIDS; -ERROR: syntax error at or near "WITH" -LINE 1: alter table atacc1 SET WITH OIDS; - ^ --- try dropping the xmin column, should fail -alter table atacc1 drop xmin; -ERROR: cannot drop system column "xmin" --- try creating a view and altering that, should fail -create view myview as select * from atacc1; -select * from myview; - b | c | d ----+---+--- -(0 rows) - -alter table myview drop d; -ERROR: "myview" is not a table, composite type, or foreign table -drop view myview; --- test some commands to make sure they fail on the dropped column -analyze atacc1(a); -ERROR: column "a" of relation "atacc1" does not exist -analyze atacc1("........pg.dropped.1........"); -ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist -vacuum analyze atacc1(a); -ERROR: column "a" of relation "atacc1" does not exist -vacuum analyze atacc1("........pg.dropped.1........"); -ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist -comment on column atacc1.a is 'testing'; -ERROR: column "a" of relation "atacc1" does not exist -comment on column atacc1."........pg.dropped.1........" is 'testing'; -ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist -alter table atacc1 alter a set storage plain; -ERROR: column "a" of relation "atacc1" does not exist -alter table atacc1 alter "........pg.dropped.1........" set storage plain; -ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist -alter table atacc1 alter a set statistics 0; -ERROR: column "a" of relation "atacc1" does not exist -alter table atacc1 alter "........pg.dropped.1........" set statistics 0; -ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist -alter table atacc1 alter a set default 3; -ERROR: column "a" of relation "atacc1" does not exist -alter table atacc1 alter "........pg.dropped.1........" set default 3; -ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist -alter table atacc1 alter a drop default; -ERROR: column "a" of relation "atacc1" does not exist -alter table atacc1 alter "........pg.dropped.1........" drop default; -ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist -alter table atacc1 alter a set not null; -ERROR: column "a" of relation "atacc1" does not exist -alter table atacc1 alter "........pg.dropped.1........" set not null; -ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist -alter table atacc1 alter a drop not null; -ERROR: column "a" of relation "atacc1" does not exist -alter table atacc1 alter "........pg.dropped.1........" drop not null; -ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist -alter table atacc1 rename a to x; -ERROR: column "a" does not exist -alter table atacc1 rename "........pg.dropped.1........" to x; -ERROR: column "........pg.dropped.1........" does not exist -alter table atacc1 add primary key(a); -ERROR: column "a" of relation "atacc1" does not exist -alter table atacc1 add primary key("........pg.dropped.1........"); -ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist -alter table atacc1 add unique(a); -ERROR: column "a" named in key does not exist -alter table atacc1 add unique("........pg.dropped.1........"); -ERROR: column "........pg.dropped.1........" named in key does not exist -alter table atacc1 add check (a > 3); -ERROR: column "a" does not exist -alter table atacc1 add check ("........pg.dropped.1........" > 3); -ERROR: column "........pg.dropped.1........" does not exist -create table atacc2 (id int4 unique); -alter table atacc1 add foreign key (a) references atacc2(id); -ERROR: column "a" referenced in foreign key constraint does not exist -alter table atacc1 add foreign key ("........pg.dropped.1........") references atacc2(id); -ERROR: column "........pg.dropped.1........" referenced in foreign key constraint does not exist -alter table atacc2 add foreign key (id) references atacc1(a); -ERROR: column "a" referenced in foreign key constraint does not exist -alter table atacc2 add foreign key (id) references atacc1("........pg.dropped.1........"); -ERROR: column "........pg.dropped.1........" referenced in foreign key constraint does not exist -drop table atacc2; -create index "testing_idx" on atacc1(a); -ERROR: column "a" does not exist -create index "testing_idx" on atacc1("........pg.dropped.1........"); -ERROR: column "........pg.dropped.1........" does not exist --- test create as and select into -insert into atacc1 values (21, 22, 23); -create table attest1 as select * from atacc1; -select * from attest1; - b | c | d -----+----+---- - 21 | 22 | 23 -(1 row) - -drop table attest1; -select * into attest2 from atacc1; -select * from attest2; - b | c | d -----+----+---- - 21 | 22 | 23 -(1 row) - -drop table attest2; --- try dropping all columns -alter table atacc1 drop c; -alter table atacc1 drop d; -alter table atacc1 drop b; -select * from atacc1; --- -(1 row) - -drop table atacc1; --- test constraint error reporting in presence of dropped columns -create table atacc1 (id serial primary key, value int check (value < 10)); -insert into atacc1(value) values (100); -ERROR: new row for relation "atacc1" violates check constraint "atacc1_value_check" -DETAIL: Failing row contains (1, 100). -alter table atacc1 drop column value; -alter table atacc1 add column value int check (value < 10); -insert into atacc1(value) values (100); -ERROR: new row for relation "atacc1" violates check constraint "atacc1_value_check" -DETAIL: Failing row contains (2, 100). -insert into atacc1(id, value) values (null, 0); -ERROR: null value in column "id" of relation "atacc1" violates not-null constraint -DETAIL: Failing row contains (null, 0). -drop table atacc1; --- test inheritance -create table parent (a int, b int, c int); -insert into parent values (1, 2, 3); -alter table parent drop a; -create table child (d varchar(255)) inherits (parent); -insert into child values (12, 13, 'testing'); -select * from parent; - b | c -----+---- - 2 | 3 - 12 | 13 -(2 rows) - -select * from child; - b | c | d -----+----+--------- - 12 | 13 | testing -(1 row) - -alter table parent drop c; -select * from parent; - b ----- - 2 - 12 -(2 rows) - -select * from child; - b | d -----+--------- - 12 | testing -(1 row) - -drop table child; -drop table parent; --- check error cases for inheritance column merging -create table parent (a float8, b numeric(10,4), c text collate "C"); -create table child (a float4) inherits (parent); -- fail -NOTICE: merging column "a" with inherited definition -ERROR: column "a" has a type conflict -DETAIL: double precision versus real -create table child (b decimal(10,7)) inherits (parent); -- fail -NOTICE: moving and merging column "b" with inherited definition -DETAIL: User-specified column moved to the position of the inherited column. -ERROR: column "b" has a type conflict -DETAIL: numeric(10,4) versus numeric(10,7) -create table child (c text collate "POSIX") inherits (parent); -- fail -NOTICE: moving and merging column "c" with inherited definition -DETAIL: User-specified column moved to the position of the inherited column. -ERROR: column "c" has a collation conflict -DETAIL: "C" versus "POSIX" -create table child (a double precision, b decimal(10,4)) inherits (parent); -NOTICE: merging column "a" with inherited definition -NOTICE: merging column "b" with inherited definition -drop table child; -drop table parent; --- test copy in/out -create table attest (a int4, b int4, c int4); -insert into attest values (1,2,3); -alter table attest drop a; -copy attest to stdout; -2 3 -copy attest(a) to stdout; -ERROR: column "a" of relation "attest" does not exist -copy attest("........pg.dropped.1........") to stdout; -ERROR: column "........pg.dropped.1........" of relation "attest" does not exist -copy attest from stdin; -ERROR: extra data after last expected column -CONTEXT: COPY attest, line 1: "10 11 12" -select * from attest; - b | c ----+--- - 2 | 3 -(1 row) - -copy attest from stdin; -select * from attest; - b | c -----+---- - 2 | 3 - 21 | 22 -(2 rows) - -copy attest(a) from stdin; -ERROR: column "a" of relation "attest" does not exist -copy attest("........pg.dropped.1........") from stdin; -ERROR: column "........pg.dropped.1........" of relation "attest" does not exist -copy attest(b,c) from stdin; -select * from attest; - b | c -----+---- - 2 | 3 - 21 | 22 - 31 | 32 -(3 rows) - -drop table attest; --- test inheritance -create table dropColumn (a int, b int, e int); -create table dropColumnChild (c int) inherits (dropColumn); -create table dropColumnAnother (d int) inherits (dropColumnChild); --- these two should fail -alter table dropColumnchild drop column a; -ERROR: cannot drop inherited column "a" -alter table only dropColumnChild drop column b; -ERROR: cannot drop inherited column "b" --- these three should work -alter table only dropColumn drop column e; -alter table dropColumnChild drop column c; -alter table dropColumn drop column a; -create table renameColumn (a int); -create table renameColumnChild (b int) inherits (renameColumn); -create table renameColumnAnother (c int) inherits (renameColumnChild); --- these three should fail -alter table renameColumnChild rename column a to d; -ERROR: cannot rename inherited column "a" -alter table only renameColumnChild rename column a to d; -ERROR: inherited column "a" must be renamed in child tables too -alter table only renameColumn rename column a to d; -ERROR: inherited column "a" must be renamed in child tables too --- these should work -alter table renameColumn rename column a to d; -alter table renameColumnChild rename column b to a; --- these should work -alter table if exists doesnt_exist_tab rename column a to d; -NOTICE: relation "doesnt_exist_tab" does not exist, skipping -alter table if exists doesnt_exist_tab rename column b to a; -NOTICE: relation "doesnt_exist_tab" does not exist, skipping --- this should work -alter table renameColumn add column w int; --- this should fail -alter table only renameColumn add column x int; -ERROR: column must be added to child tables too --- Test corner cases in dropping of inherited columns -create table p1 (f1 int, f2 int); -create table c1 (f1 int not null) inherits(p1); -NOTICE: merging column "f1" with inherited definition --- should be rejected since c1.f1 is inherited -alter table c1 drop column f1; -ERROR: cannot drop inherited column "f1" --- should work -alter table p1 drop column f1; --- c1.f1 is still there, but no longer inherited -select f1 from c1; - f1 ----- -(0 rows) - -alter table c1 drop column f1; -select f1 from c1; -ERROR: column "f1" does not exist -LINE 1: select f1 from c1; - ^ -HINT: Perhaps you meant to reference the column "c1.f2". -drop table p1 cascade; -NOTICE: drop cascades to table c1 -create table p1 (f1 int, f2 int); -create table c1 () inherits(p1); --- should be rejected since c1.f1 is inherited -alter table c1 drop column f1; -ERROR: cannot drop inherited column "f1" -alter table p1 drop column f1; --- c1.f1 is dropped now, since there is no local definition for it -select f1 from c1; -ERROR: column "f1" does not exist -LINE 1: select f1 from c1; - ^ -HINT: Perhaps you meant to reference the column "c1.f2". -drop table p1 cascade; -NOTICE: drop cascades to table c1 -create table p1 (f1 int, f2 int); -create table c1 () inherits(p1); --- should be rejected since c1.f1 is inherited -alter table c1 drop column f1; -ERROR: cannot drop inherited column "f1" -alter table only p1 drop column f1; --- c1.f1 is NOT dropped, but must now be considered non-inherited -alter table c1 drop column f1; -drop table p1 cascade; -NOTICE: drop cascades to table c1 -create table p1 (f1 int, f2 int); -create table c1 (f1 int not null) inherits(p1); -NOTICE: merging column "f1" with inherited definition --- should be rejected since c1.f1 is inherited -alter table c1 drop column f1; -ERROR: cannot drop inherited column "f1" -alter table only p1 drop column f1; --- c1.f1 is still there, but no longer inherited -alter table c1 drop column f1; -drop table p1 cascade; -NOTICE: drop cascades to table c1 -create table p1(id int, name text); -create table p2(id2 int, name text, height int); -create table c1(age int) inherits(p1,p2); -NOTICE: merging multiple inherited definitions of column "name" -create table gc1() inherits (c1); -select relname, attname, attinhcount, attislocal -from pg_class join pg_attribute on (pg_class.oid = pg_attribute.attrelid) -where relname in ('p1','p2','c1','gc1') and attnum > 0 and not attisdropped -order by relname, attnum; - relname | attname | attinhcount | attislocal ----------+---------+-------------+------------ - c1 | id | 1 | f - c1 | name | 2 | f - c1 | id2 | 1 | f - c1 | height | 1 | f - c1 | age | 0 | t - gc1 | id | 1 | f - gc1 | name | 1 | f - gc1 | id2 | 1 | f - gc1 | height | 1 | f - gc1 | age | 1 | f - p1 | id | 0 | t - p1 | name | 0 | t - p2 | id2 | 0 | t - p2 | name | 0 | t - p2 | height | 0 | t -(15 rows) - --- should work -alter table only p1 drop column name; --- should work. Now c1.name is local and inhcount is 0. -alter table p2 drop column name; --- should be rejected since its inherited -alter table gc1 drop column name; -ERROR: cannot drop inherited column "name" --- should work, and drop gc1.name along -alter table c1 drop column name; --- should fail: column does not exist -alter table gc1 drop column name; -ERROR: column "name" of relation "gc1" does not exist --- should work and drop the attribute in all tables -alter table p2 drop column height; --- IF EXISTS test -create table dropColumnExists (); -alter table dropColumnExists drop column non_existing; --fail -ERROR: column "non_existing" of relation "dropcolumnexists" does not exist -alter table dropColumnExists drop column if exists non_existing; --succeed -NOTICE: column "non_existing" of relation "dropcolumnexists" does not exist, skipping -select relname, attname, attinhcount, attislocal -from pg_class join pg_attribute on (pg_class.oid = pg_attribute.attrelid) -where relname in ('p1','p2','c1','gc1') and attnum > 0 and not attisdropped -order by relname, attnum; - relname | attname | attinhcount | attislocal ----------+---------+-------------+------------ - c1 | id | 1 | f - c1 | id2 | 1 | f - c1 | age | 0 | t - gc1 | id | 1 | f - gc1 | id2 | 1 | f - gc1 | age | 1 | f - p1 | id | 0 | t - p2 | id2 | 0 | t -(8 rows) - -drop table p1, p2 cascade; -NOTICE: drop cascades to 2 other objects -DETAIL: drop cascades to table c1 -drop cascades to table gc1 --- test attinhcount tracking with merged columns -create table depth0(); -create table depth1(c text) inherits (depth0); -create table depth2() inherits (depth1); -alter table depth0 add c text; -NOTICE: merging definition of column "c" for child "depth1" -select attrelid::regclass, attname, attinhcount, attislocal -from pg_attribute -where attnum > 0 and attrelid::regclass in ('depth0', 'depth1', 'depth2') -order by attrelid::regclass::text, attnum; - attrelid | attname | attinhcount | attislocal -----------+---------+-------------+------------ - depth0 | c | 0 | t - depth1 | c | 1 | t - depth2 | c | 1 | f -(3 rows) - --- test renumbering of child-table columns in inherited operations -create table p1 (f1 int); -create table c1 (f2 text, f3 int) inherits (p1); -alter table p1 add column a1 int check (a1 > 0); -alter table p1 add column f2 text; -NOTICE: merging definition of column "f2" for child "c1" -insert into p1 values (1,2,'abc'); -insert into c1 values(11,'xyz',33,0); -- should fail -ERROR: new row for relation "c1" violates check constraint "p1_a1_check" -DETAIL: Failing row contains (11, xyz, 33, 0). -insert into c1 values(11,'xyz',33,22); -select * from p1; - f1 | a1 | f2 -----+----+----- - 1 | 2 | abc - 11 | 22 | xyz -(2 rows) - -update p1 set a1 = a1 + 1, f2 = upper(f2); -select * from p1; - f1 | a1 | f2 -----+----+----- - 1 | 3 | ABC - 11 | 23 | XYZ -(2 rows) - -drop table p1 cascade; -NOTICE: drop cascades to table c1 --- test that operations with a dropped column do not try to reference --- its datatype -create domain mytype as text; -create temp table foo (f1 text, f2 mytype, f3 text); -insert into foo values('bb','cc','dd'); -select * from foo; - f1 | f2 | f3 -----+----+---- - bb | cc | dd -(1 row) - -drop domain mytype cascade; -NOTICE: drop cascades to column f2 of table foo -select * from foo; - f1 | f3 -----+---- - bb | dd -(1 row) - -insert into foo values('qq','rr'); -select * from foo; - f1 | f3 -----+---- - bb | dd - qq | rr -(2 rows) - -update foo set f3 = 'zz'; -select * from foo; - f1 | f3 -----+---- - bb | zz - qq | zz -(2 rows) - -select f3,max(f1) from foo group by f3; - f3 | max -----+----- - zz | qq -(1 row) - --- Simple tests for alter table column type -alter table foo alter f1 TYPE integer; -- fails -ERROR: column "f1" cannot be cast automatically to type integer -HINT: You might need to specify "USING f1::integer". -alter table foo alter f1 TYPE varchar(10); -create table anothertab (atcol1 serial8, atcol2 boolean, - constraint anothertab_chk check (atcol1 <= 3)); -insert into anothertab (atcol1, atcol2) values (default, true); -insert into anothertab (atcol1, atcol2) values (default, false); -select * from anothertab; - atcol1 | atcol2 ---------+-------- - 1 | t - 2 | f -(2 rows) - -alter table anothertab alter column atcol1 type boolean; -- fails -ERROR: column "atcol1" cannot be cast automatically to type boolean -HINT: You might need to specify "USING atcol1::boolean". -alter table anothertab alter column atcol1 type boolean using atcol1::int; -- fails -ERROR: result of USING clause for column "atcol1" cannot be cast automatically to type boolean -HINT: You might need to add an explicit cast. -alter table anothertab alter column atcol1 type integer; -select * from anothertab; - atcol1 | atcol2 ---------+-------- - 1 | t - 2 | f -(2 rows) - -insert into anothertab (atcol1, atcol2) values (45, null); -- fails -ERROR: new row for relation "anothertab" violates check constraint "anothertab_chk" -DETAIL: Failing row contains (45, null). -insert into anothertab (atcol1, atcol2) values (default, null); -select * from anothertab; - atcol1 | atcol2 ---------+-------- - 1 | t - 2 | f - 3 | -(3 rows) - -alter table anothertab alter column atcol2 type text - using case when atcol2 is true then 'IT WAS TRUE' - when atcol2 is false then 'IT WAS FALSE' - else 'IT WAS NULL!' end; -select * from anothertab; - atcol1 | atcol2 ---------+-------------- - 1 | IT WAS TRUE - 2 | IT WAS FALSE - 3 | IT WAS NULL! -(3 rows) - -alter table anothertab alter column atcol1 type boolean - using case when atcol1 % 2 = 0 then true else false end; -- fails -ERROR: default for column "atcol1" cannot be cast automatically to type boolean -alter table anothertab alter column atcol1 drop default; -alter table anothertab alter column atcol1 type boolean - using case when atcol1 % 2 = 0 then true else false end; -- fails -ERROR: operator does not exist: boolean <= integer -HINT: No operator matches the given name and argument types. You might need to add explicit type casts. -alter table anothertab drop constraint anothertab_chk; -alter table anothertab drop constraint anothertab_chk; -- fails -ERROR: constraint "anothertab_chk" of relation "anothertab" does not exist -alter table anothertab drop constraint IF EXISTS anothertab_chk; -- succeeds -NOTICE: constraint "anothertab_chk" of relation "anothertab" does not exist, skipping -alter table anothertab alter column atcol1 type boolean - using case when atcol1 % 2 = 0 then true else false end; -select * from anothertab; - atcol1 | atcol2 ---------+-------------- - f | IT WAS TRUE - t | IT WAS FALSE - f | IT WAS NULL! -(3 rows) - -drop table anothertab; --- Test index handling in alter table column type (cf. bugs #15835, #15865) -create table anothertab(f1 int primary key, f2 int unique, - f3 int, f4 int, f5 int); -alter table anothertab - add exclude using btree (f3 with =); -alter table anothertab - add exclude using btree (f4 with =) where (f4 is not null); -alter table anothertab - add exclude using btree (f4 with =) where (f5 > 0); -alter table anothertab - add unique(f1,f4); -create index on anothertab(f2,f3); -create unique index on anothertab(f4); -\d anothertab - Table "public.anothertab" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - f1 | integer | | not null | - f2 | integer | | | - f3 | integer | | | - f4 | integer | | | - f5 | integer | | | -Indexes: - "anothertab_pkey" PRIMARY KEY, btree (f1) - "anothertab_f1_f4_key" UNIQUE CONSTRAINT, btree (f1, f4) - "anothertab_f2_f3_idx" btree (f2, f3) - "anothertab_f2_key" UNIQUE CONSTRAINT, btree (f2) - "anothertab_f3_excl" EXCLUDE USING btree (f3 WITH =) - "anothertab_f4_excl" EXCLUDE USING btree (f4 WITH =) WHERE (f4 IS NOT NULL) - "anothertab_f4_excl1" EXCLUDE USING btree (f4 WITH =) WHERE (f5 > 0) - "anothertab_f4_idx" UNIQUE, btree (f4) - -alter table anothertab alter column f1 type bigint; -alter table anothertab - alter column f2 type bigint, - alter column f3 type bigint, - alter column f4 type bigint; -alter table anothertab alter column f5 type bigint; -\d anothertab - Table "public.anothertab" - Column | Type | Collation | Nullable | Default ---------+--------+-----------+----------+--------- - f1 | bigint | | not null | - f2 | bigint | | | - f3 | bigint | | | - f4 | bigint | | | - f5 | bigint | | | -Indexes: - "anothertab_pkey" PRIMARY KEY, btree (f1) - "anothertab_f1_f4_key" UNIQUE CONSTRAINT, btree (f1, f4) - "anothertab_f2_f3_idx" btree (f2, f3) - "anothertab_f2_key" UNIQUE CONSTRAINT, btree (f2) - "anothertab_f3_excl" EXCLUDE USING btree (f3 WITH =) - "anothertab_f4_excl" EXCLUDE USING btree (f4 WITH =) WHERE (f4 IS NOT NULL) - "anothertab_f4_excl1" EXCLUDE USING btree (f4 WITH =) WHERE (f5 > 0) - "anothertab_f4_idx" UNIQUE, btree (f4) - -drop table anothertab; --- test that USING expressions are parsed before column alter type / drop steps -create table another (f1 int, f2 text, f3 text); -insert into another values(1, 'one', 'uno'); -insert into another values(2, 'two', 'due'); -insert into another values(3, 'three', 'tre'); -select * from another; - f1 | f2 | f3 -----+-------+----- - 1 | one | uno - 2 | two | due - 3 | three | tre -(3 rows) - -alter table another - alter f1 type text using f2 || ' and ' || f3 || ' more', - alter f2 type bigint using f1 * 10, - drop column f3; -select * from another; - f1 | f2 ---------------------+---- - one and uno more | 10 - two and due more | 20 - three and tre more | 30 -(3 rows) - -drop table another; --- Create an index that skips WAL, then perform a SET DATA TYPE that skips --- rewriting the index. -begin; -create table skip_wal_skip_rewrite_index (c varchar(10) primary key); -alter table skip_wal_skip_rewrite_index alter c type varchar(20); -commit; --- We disallow changing table's row type if it's used for storage -create table at_tab1 (a int, b text); -create table at_tab2 (x int, y at_tab1); -alter table at_tab1 alter column b type varchar; -- fails -ERROR: cannot alter table "at_tab1" because column "at_tab2.y" uses its row type -drop table at_tab2; --- Use of row type in an expression is defended differently -create table at_tab2 (x int, y text, check((x,y)::at_tab1 = (1,'42')::at_tab1)); -alter table at_tab1 alter column b type varchar; -- allowed, but ... -insert into at_tab2 values(1,'42'); -- ... this will fail -ERROR: ROW() column has type text instead of type character varying -drop table at_tab1, at_tab2; --- Check it for a partitioned table, too -create table at_tab1 (a int, b text) partition by list(a); -create table at_tab2 (x int, y at_tab1); -alter table at_tab1 alter column b type varchar; -- fails -ERROR: cannot alter table "at_tab1" because column "at_tab2.y" uses its row type -drop table at_tab1, at_tab2; --- Alter column type that's part of a partitioned index -create table at_partitioned (a int, b text) partition by range (a); -create table at_part_1 partition of at_partitioned for values from (0) to (1000); -insert into at_partitioned values (512, '0.123'); -create table at_part_2 (b text, a int); -insert into at_part_2 values ('1.234', 1024); -create index on at_partitioned (b); -create index on at_partitioned (a); -\d at_part_1 - Table "public.at_part_1" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | - b | text | | | -Partition of: at_partitioned FOR VALUES FROM (0) TO (1000) -Indexes: - "at_part_1_a_idx" btree (a) - "at_part_1_b_idx" btree (b) - -\d at_part_2 - Table "public.at_part_2" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - b | text | | | - a | integer | | | - -alter table at_partitioned attach partition at_part_2 for values from (1000) to (2000); -\d at_part_2 - Table "public.at_part_2" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - b | text | | | - a | integer | | | -Partition of: at_partitioned FOR VALUES FROM (1000) TO (2000) -Indexes: - "at_part_2_a_idx" btree (a) - "at_part_2_b_idx" btree (b) - -alter table at_partitioned alter column b type numeric using b::numeric; -\d at_part_1 - Table "public.at_part_1" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | - b | numeric | | | -Partition of: at_partitioned FOR VALUES FROM (0) TO (1000) -Indexes: - "at_part_1_a_idx" btree (a) - "at_part_1_b_idx" btree (b) - -\d at_part_2 - Table "public.at_part_2" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - b | numeric | | | - a | integer | | | -Partition of: at_partitioned FOR VALUES FROM (1000) TO (2000) -Indexes: - "at_part_2_a_idx" btree (a) - "at_part_2_b_idx" btree (b) - -drop table at_partitioned; --- Alter column type when no table rewrite is required --- Also check that comments are preserved -create table at_partitioned(id int, name varchar(64), unique (id, name)) - partition by hash(id); -comment on constraint at_partitioned_id_name_key on at_partitioned is 'parent constraint'; -comment on index at_partitioned_id_name_key is 'parent index'; -create table at_partitioned_0 partition of at_partitioned - for values with (modulus 2, remainder 0); -comment on constraint at_partitioned_0_id_name_key on at_partitioned_0 is 'child 0 constraint'; -comment on index at_partitioned_0_id_name_key is 'child 0 index'; -create table at_partitioned_1 partition of at_partitioned - for values with (modulus 2, remainder 1); -comment on constraint at_partitioned_1_id_name_key on at_partitioned_1 is 'child 1 constraint'; -comment on index at_partitioned_1_id_name_key is 'child 1 index'; -insert into at_partitioned values(1, 'foo'); -insert into at_partitioned values(3, 'bar'); -create temp table old_oids as - select relname, oid as oldoid, relfilenode as oldfilenode - from pg_class where relname like 'at_partitioned%'; -select relname, - c.oid = oldoid as orig_oid, - case relfilenode - when 0 then 'none' - when c.oid then 'own' - when oldfilenode then 'orig' - else 'OTHER' - end as storage, - obj_description(c.oid, 'pg_class') as desc - from pg_class c left join old_oids using (relname) - where relname like 'at_partitioned%' - order by relname; - relname | orig_oid | storage | desc -------------------------------+----------+---------+--------------- - at_partitioned | t | none | - at_partitioned_0 | t | own | - at_partitioned_0_id_name_key | t | own | child 0 index - at_partitioned_1 | t | own | - at_partitioned_1_id_name_key | t | own | child 1 index - at_partitioned_id_name_key | t | none | parent index -(6 rows) - -select conname, obj_description(oid, 'pg_constraint') as desc - from pg_constraint where conname like 'at_partitioned%' - order by conname; - conname | desc -------------------------------+-------------------- - at_partitioned_0_id_name_key | child 0 constraint - at_partitioned_1_id_name_key | child 1 constraint - at_partitioned_id_name_key | parent constraint -(3 rows) - -alter table at_partitioned alter column name type varchar(127); --- Note: these tests currently show the wrong behavior for comments :-( -select relname, - c.oid = oldoid as orig_oid, - case relfilenode - when 0 then 'none' - when c.oid then 'own' - when oldfilenode then 'orig' - else 'OTHER' - end as storage, - obj_description(c.oid, 'pg_class') as desc - from pg_class c left join old_oids using (relname) - where relname like 'at_partitioned%' - order by relname; - relname | orig_oid | storage | desc -------------------------------+----------+---------+-------------- - at_partitioned | t | none | - at_partitioned_0 | t | own | - at_partitioned_0_id_name_key | f | own | parent index - at_partitioned_1 | t | own | - at_partitioned_1_id_name_key | f | own | parent index - at_partitioned_id_name_key | f | none | parent index -(6 rows) - -select conname, obj_description(oid, 'pg_constraint') as desc - from pg_constraint where conname like 'at_partitioned%' - order by conname; - conname | desc -------------------------------+------------------- - at_partitioned_0_id_name_key | - at_partitioned_1_id_name_key | - at_partitioned_id_name_key | parent constraint -(3 rows) - --- Don't remove this DROP, it exposes bug #15672 -drop table at_partitioned; --- disallow recursive containment of row types -create temp table recur1 (f1 int); -alter table recur1 add column f2 recur1; -- fails -ERROR: composite type recur1 cannot be made a member of itself -alter table recur1 add column f2 recur1[]; -- fails -ERROR: composite type recur1 cannot be made a member of itself -create domain array_of_recur1 as recur1[]; -alter table recur1 add column f2 array_of_recur1; -- fails -ERROR: composite type recur1 cannot be made a member of itself -create temp table recur2 (f1 int, f2 recur1); -alter table recur1 add column f2 recur2; -- fails -ERROR: composite type recur1 cannot be made a member of itself -alter table recur1 add column f2 int; -alter table recur1 alter column f2 type recur2; -- fails -ERROR: composite type recur1 cannot be made a member of itself --- SET STORAGE may need to add a TOAST table -create table test_storage (a text); -alter table test_storage alter a set storage plain; -alter table test_storage add b int default 0; -- rewrite table to remove its TOAST table -alter table test_storage alter a set storage extended; -- re-add TOAST table -select reltoastrelid <> 0 as has_toast_table -from pg_class -where oid = 'test_storage'::regclass; - has_toast_table ------------------ - t -(1 row) - --- test that SET STORAGE propagates to index correctly -create index test_storage_idx on test_storage (b, a); -alter table test_storage alter column a set storage external; -\d+ test_storage - Table "public.test_storage" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+---------+----------+--------------+------------- - a | text | | | | external | | - b | integer | | | 0 | plain | | -Indexes: - "test_storage_idx" btree (b, a) - -\d+ test_storage_idx - Index "public.test_storage_idx" - Column | Type | Key? | Definition | Storage | Stats target ---------+---------+------+------------+----------+-------------- - b | integer | yes | b | plain | - a | text | yes | a | external | -btree, for table "public.test_storage" - --- ALTER COLUMN TYPE with a check constraint and a child table (bug #13779) -CREATE TABLE test_inh_check (a float check (a > 10.2), b float); -CREATE TABLE test_inh_check_child() INHERITS(test_inh_check); -\d test_inh_check - Table "public.test_inh_check" - Column | Type | Collation | Nullable | Default ---------+------------------+-----------+----------+--------- - a | double precision | | | - b | double precision | | | -Check constraints: - "test_inh_check_a_check" CHECK (a > 10.2::double precision) -Number of child tables: 1 (Use \d+ to list them.) - -\d test_inh_check_child - Table "public.test_inh_check_child" - Column | Type | Collation | Nullable | Default ---------+------------------+-----------+----------+--------- - a | double precision | | | - b | double precision | | | -Check constraints: - "test_inh_check_a_check" CHECK (a > 10.2::double precision) -Inherits: test_inh_check - -select relname, conname, coninhcount, conislocal, connoinherit - from pg_constraint c, pg_class r - where relname like 'test_inh_check%' and c.conrelid = r.oid - order by 1, 2; - relname | conname | coninhcount | conislocal | connoinherit -----------------------+------------------------+-------------+------------+-------------- - test_inh_check | test_inh_check_a_check | 0 | t | f - test_inh_check_child | test_inh_check_a_check | 1 | f | f -(2 rows) - -ALTER TABLE test_inh_check ALTER COLUMN a TYPE numeric; -\d test_inh_check - Table "public.test_inh_check" - Column | Type | Collation | Nullable | Default ---------+------------------+-----------+----------+--------- - a | numeric | | | - b | double precision | | | -Check constraints: - "test_inh_check_a_check" CHECK (a::double precision > 10.2::double precision) -Number of child tables: 1 (Use \d+ to list them.) - -\d test_inh_check_child - Table "public.test_inh_check_child" - Column | Type | Collation | Nullable | Default ---------+------------------+-----------+----------+--------- - a | numeric | | | - b | double precision | | | -Check constraints: - "test_inh_check_a_check" CHECK (a::double precision > 10.2::double precision) -Inherits: test_inh_check - -select relname, conname, coninhcount, conislocal, connoinherit - from pg_constraint c, pg_class r - where relname like 'test_inh_check%' and c.conrelid = r.oid - order by 1, 2; - relname | conname | coninhcount | conislocal | connoinherit -----------------------+------------------------+-------------+------------+-------------- - test_inh_check | test_inh_check_a_check | 0 | t | f - test_inh_check_child | test_inh_check_a_check | 1 | f | f -(2 rows) - --- also try noinherit, local, and local+inherited cases -ALTER TABLE test_inh_check ADD CONSTRAINT bnoinherit CHECK (b > 100) NO INHERIT; -ALTER TABLE test_inh_check_child ADD CONSTRAINT blocal CHECK (b < 1000); -ALTER TABLE test_inh_check_child ADD CONSTRAINT bmerged CHECK (b > 1); -ALTER TABLE test_inh_check ADD CONSTRAINT bmerged CHECK (b > 1); -NOTICE: merging constraint "bmerged" with inherited definition -\d test_inh_check - Table "public.test_inh_check" - Column | Type | Collation | Nullable | Default ---------+------------------+-----------+----------+--------- - a | numeric | | | - b | double precision | | | -Check constraints: - "bmerged" CHECK (b > 1::double precision) - "bnoinherit" CHECK (b > 100::double precision) NO INHERIT - "test_inh_check_a_check" CHECK (a::double precision > 10.2::double precision) -Number of child tables: 1 (Use \d+ to list them.) - -\d test_inh_check_child - Table "public.test_inh_check_child" - Column | Type | Collation | Nullable | Default ---------+------------------+-----------+----------+--------- - a | numeric | | | - b | double precision | | | -Check constraints: - "blocal" CHECK (b < 1000::double precision) - "bmerged" CHECK (b > 1::double precision) - "test_inh_check_a_check" CHECK (a::double precision > 10.2::double precision) -Inherits: test_inh_check - -select relname, conname, coninhcount, conislocal, connoinherit - from pg_constraint c, pg_class r - where relname like 'test_inh_check%' and c.conrelid = r.oid - order by 1, 2; - relname | conname | coninhcount | conislocal | connoinherit -----------------------+------------------------+-------------+------------+-------------- - test_inh_check | bmerged | 0 | t | f - test_inh_check | bnoinherit | 0 | t | t - test_inh_check | test_inh_check_a_check | 0 | t | f - test_inh_check_child | blocal | 0 | t | f - test_inh_check_child | bmerged | 1 | t | f - test_inh_check_child | test_inh_check_a_check | 1 | f | f -(6 rows) - -ALTER TABLE test_inh_check ALTER COLUMN b TYPE numeric; -NOTICE: merging constraint "bmerged" with inherited definition -\d test_inh_check - Table "public.test_inh_check" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | numeric | | | - b | numeric | | | -Check constraints: - "bmerged" CHECK (b::double precision > 1::double precision) - "bnoinherit" CHECK (b::double precision > 100::double precision) NO INHERIT - "test_inh_check_a_check" CHECK (a::double precision > 10.2::double precision) -Number of child tables: 1 (Use \d+ to list them.) - -\d test_inh_check_child - Table "public.test_inh_check_child" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | numeric | | | - b | numeric | | | -Check constraints: - "blocal" CHECK (b::double precision < 1000::double precision) - "bmerged" CHECK (b::double precision > 1::double precision) - "test_inh_check_a_check" CHECK (a::double precision > 10.2::double precision) -Inherits: test_inh_check - -select relname, conname, coninhcount, conislocal, connoinherit - from pg_constraint c, pg_class r - where relname like 'test_inh_check%' and c.conrelid = r.oid - order by 1, 2; - relname | conname | coninhcount | conislocal | connoinherit -----------------------+------------------------+-------------+------------+-------------- - test_inh_check | bmerged | 0 | t | f - test_inh_check | bnoinherit | 0 | t | t - test_inh_check | test_inh_check_a_check | 0 | t | f - test_inh_check_child | blocal | 0 | t | f - test_inh_check_child | bmerged | 1 | t | f - test_inh_check_child | test_inh_check_a_check | 1 | f | f -(6 rows) - --- ALTER COLUMN TYPE with different schema in children --- Bug at https://postgr.es/m/20170102225618.GA10071@telsasoft.com -CREATE TABLE test_type_diff (f1 int); -CREATE TABLE test_type_diff_c (extra smallint) INHERITS (test_type_diff); -ALTER TABLE test_type_diff ADD COLUMN f2 int; -INSERT INTO test_type_diff_c VALUES (1, 2, 3); -ALTER TABLE test_type_diff ALTER COLUMN f2 TYPE bigint USING f2::bigint; -CREATE TABLE test_type_diff2 (int_two int2, int_four int4, int_eight int8); -CREATE TABLE test_type_diff2_c1 (int_four int4, int_eight int8, int_two int2); -CREATE TABLE test_type_diff2_c2 (int_eight int8, int_two int2, int_four int4); -CREATE TABLE test_type_diff2_c3 (int_two int2, int_four int4, int_eight int8); -ALTER TABLE test_type_diff2_c1 INHERIT test_type_diff2; -ALTER TABLE test_type_diff2_c2 INHERIT test_type_diff2; -ALTER TABLE test_type_diff2_c3 INHERIT test_type_diff2; -INSERT INTO test_type_diff2_c1 VALUES (1, 2, 3); -INSERT INTO test_type_diff2_c2 VALUES (4, 5, 6); -INSERT INTO test_type_diff2_c3 VALUES (7, 8, 9); -ALTER TABLE test_type_diff2 ALTER COLUMN int_four TYPE int8 USING int_four::int8; --- whole-row references are disallowed -ALTER TABLE test_type_diff2 ALTER COLUMN int_four TYPE int4 USING (pg_column_size(test_type_diff2)); -ERROR: cannot convert whole-row table reference -DETAIL: USING expression contains a whole-row table reference. --- check for rollback of ANALYZE corrupting table property flags (bug #11638) -CREATE TABLE check_fk_presence_1 (id int PRIMARY KEY, t text); -CREATE TABLE check_fk_presence_2 (id int REFERENCES check_fk_presence_1, t text); -BEGIN; -ALTER TABLE check_fk_presence_2 DROP CONSTRAINT check_fk_presence_2_id_fkey; -ANALYZE check_fk_presence_2; -ROLLBACK; -\d check_fk_presence_2 - Table "public.check_fk_presence_2" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - id | integer | | | - t | text | | | -Foreign-key constraints: - "check_fk_presence_2_id_fkey" FOREIGN KEY (id) REFERENCES check_fk_presence_1(id) - -DROP TABLE check_fk_presence_1, check_fk_presence_2; --- check column addition within a view (bug #14876) -create table at_base_table(id int, stuff text); -insert into at_base_table values (23, 'skidoo'); -create view at_view_1 as select * from at_base_table bt; -create view at_view_2 as select *, to_json(v1) as j from at_view_1 v1; -\d+ at_view_1 - View "public.at_view_1" - Column | Type | Collation | Nullable | Default | Storage | Description ---------+---------+-----------+----------+---------+----------+------------- - id | integer | | | | plain | - stuff | text | | | | extended | -View definition: - SELECT bt.id, - bt.stuff - FROM at_base_table bt; - -\d+ at_view_2 - View "public.at_view_2" - Column | Type | Collation | Nullable | Default | Storage | Description ---------+---------+-----------+----------+---------+----------+------------- - id | integer | | | | plain | - stuff | text | | | | extended | - j | json | | | | extended | -View definition: - SELECT v1.id, - v1.stuff, - to_json(v1.*) AS j - FROM at_view_1 v1; - -explain (verbose, costs off) select * from at_view_2; - QUERY PLAN ----------------------------------------------------------- - Seq Scan on public.at_base_table bt - Output: bt.id, bt.stuff, to_json(ROW(bt.id, bt.stuff)) -(2 rows) - -select * from at_view_2; - id | stuff | j -----+--------+---------------------------- - 23 | skidoo | {"id":23,"stuff":"skidoo"} -(1 row) - -create or replace view at_view_1 as select *, 2+2 as more from at_base_table bt; -\d+ at_view_1 - View "public.at_view_1" - Column | Type | Collation | Nullable | Default | Storage | Description ---------+---------+-----------+----------+---------+----------+------------- - id | integer | | | | plain | - stuff | text | | | | extended | - more | integer | | | | plain | -View definition: - SELECT bt.id, - bt.stuff, - 2 + 2 AS more - FROM at_base_table bt; - -\d+ at_view_2 - View "public.at_view_2" - Column | Type | Collation | Nullable | Default | Storage | Description ---------+---------+-----------+----------+---------+----------+------------- - id | integer | | | | plain | - stuff | text | | | | extended | - j | json | | | | extended | -View definition: - SELECT v1.id, - v1.stuff, - to_json(v1.*) AS j - FROM at_view_1 v1; - -explain (verbose, costs off) select * from at_view_2; - QUERY PLAN ----------------------------------------------------------------- - Seq Scan on public.at_base_table bt - Output: bt.id, bt.stuff, to_json(ROW(bt.id, bt.stuff, NULL)) -(2 rows) - -select * from at_view_2; - id | stuff | j -----+--------+---------------------------------------- - 23 | skidoo | {"id":23,"stuff":"skidoo","more":null} -(1 row) - -drop view at_view_2; -drop view at_view_1; -drop table at_base_table; --- check adding a column not iself requiring a rewrite, together with --- a column requiring a default (bug #16038) --- ensure that rewrites aren't silently optimized away, removing the --- value of the test -CREATE FUNCTION check_ddl_rewrite(p_tablename regclass, p_ddl text) -RETURNS boolean -LANGUAGE plpgsql AS $$ -DECLARE - v_relfilenode oid; -BEGIN - v_relfilenode := relfilenode FROM pg_class WHERE oid = p_tablename; - - EXECUTE p_ddl; - - RETURN v_relfilenode <> (SELECT relfilenode FROM pg_class WHERE oid = p_tablename); -END; -$$; -CREATE TABLE rewrite_test(col text); -INSERT INTO rewrite_test VALUES ('something'); -INSERT INTO rewrite_test VALUES (NULL); --- empty[12] don't need rewrite, but notempty[12]_rewrite will force one -SELECT check_ddl_rewrite('rewrite_test', $$ - ALTER TABLE rewrite_test - ADD COLUMN empty1 text, - ADD COLUMN notempty1_rewrite serial; -$$); - check_ddl_rewrite -------------------- - t -(1 row) - -SELECT check_ddl_rewrite('rewrite_test', $$ - ALTER TABLE rewrite_test - ADD COLUMN notempty2_rewrite serial, - ADD COLUMN empty2 text; -$$); - check_ddl_rewrite -------------------- - t -(1 row) - --- also check that fast defaults cause no problem, first without rewrite -SELECT check_ddl_rewrite('rewrite_test', $$ - ALTER TABLE rewrite_test - ADD COLUMN empty3 text, - ADD COLUMN notempty3_norewrite int default 42; -$$); - check_ddl_rewrite -------------------- - f -(1 row) - -SELECT check_ddl_rewrite('rewrite_test', $$ - ALTER TABLE rewrite_test - ADD COLUMN notempty4_norewrite int default 42, - ADD COLUMN empty4 text; -$$); - check_ddl_rewrite -------------------- - f -(1 row) - --- then with rewrite -SELECT check_ddl_rewrite('rewrite_test', $$ - ALTER TABLE rewrite_test - ADD COLUMN empty5 text, - ADD COLUMN notempty5_norewrite int default 42, - ADD COLUMN notempty5_rewrite serial; -$$); - check_ddl_rewrite -------------------- - t -(1 row) - -SELECT check_ddl_rewrite('rewrite_test', $$ - ALTER TABLE rewrite_test - ADD COLUMN notempty6_rewrite serial, - ADD COLUMN empty6 text, - ADD COLUMN notempty6_norewrite int default 42; -$$); - check_ddl_rewrite -------------------- - t -(1 row) - --- cleanup -DROP FUNCTION check_ddl_rewrite(regclass, text); -DROP TABLE rewrite_test; --- --- lock levels --- -drop type lockmodes; -ERROR: type "lockmodes" does not exist -create type lockmodes as enum ( - 'SIReadLock' -,'AccessShareLock' -,'RowShareLock' -,'RowExclusiveLock' -,'ShareUpdateExclusiveLock' -,'ShareLock' -,'ShareRowExclusiveLock' -,'ExclusiveLock' -,'AccessExclusiveLock' -); -drop view my_locks; -ERROR: view "my_locks" does not exist -create or replace view my_locks as -select case when c.relname like 'pg_toast%' then 'pg_toast' else c.relname end, max(mode::lockmodes) as max_lockmode -from pg_locks l join pg_class c on l.relation = c.oid -where virtualtransaction = ( - select virtualtransaction - from pg_locks - where transactionid = pg_current_xact_id()::xid) -and locktype = 'relation' -and relnamespace != (select oid from pg_namespace where nspname = 'pg_catalog') -and c.relname != 'my_locks' -group by c.relname; -create table alterlock (f1 int primary key, f2 text); -insert into alterlock values (1, 'foo'); -create table alterlock2 (f3 int primary key, f1 int); -insert into alterlock2 values (1, 1); -begin; alter table alterlock alter column f2 set statistics 150; -select * from my_locks order by 1; - relname | max_lockmode ------------+-------------------------- - alterlock | ShareUpdateExclusiveLock -(1 row) - -rollback; -begin; alter table alterlock cluster on alterlock_pkey; -select * from my_locks order by 1; - relname | max_lockmode -----------------+-------------------------- - alterlock | ShareUpdateExclusiveLock - alterlock_pkey | ShareUpdateExclusiveLock -(2 rows) - -commit; -begin; alter table alterlock set without cluster; -select * from my_locks order by 1; - relname | max_lockmode ------------+-------------------------- - alterlock | ShareUpdateExclusiveLock -(1 row) - -commit; -begin; alter table alterlock set (fillfactor = 100); -select * from my_locks order by 1; - relname | max_lockmode ------------+-------------------------- - alterlock | ShareUpdateExclusiveLock - pg_toast | ShareUpdateExclusiveLock -(2 rows) - -commit; -begin; alter table alterlock reset (fillfactor); -select * from my_locks order by 1; - relname | max_lockmode ------------+-------------------------- - alterlock | ShareUpdateExclusiveLock - pg_toast | ShareUpdateExclusiveLock -(2 rows) - -commit; -begin; alter table alterlock set (toast.autovacuum_enabled = off); -select * from my_locks order by 1; - relname | max_lockmode ------------+-------------------------- - alterlock | ShareUpdateExclusiveLock - pg_toast | ShareUpdateExclusiveLock -(2 rows) - -commit; -begin; alter table alterlock set (autovacuum_enabled = off); -select * from my_locks order by 1; - relname | max_lockmode ------------+-------------------------- - alterlock | ShareUpdateExclusiveLock - pg_toast | ShareUpdateExclusiveLock -(2 rows) - -commit; -begin; alter table alterlock alter column f2 set (n_distinct = 1); -select * from my_locks order by 1; - relname | max_lockmode ------------+-------------------------- - alterlock | ShareUpdateExclusiveLock -(1 row) - -rollback; --- test that mixing options with different lock levels works as expected -begin; alter table alterlock set (autovacuum_enabled = off, fillfactor = 80); -select * from my_locks order by 1; - relname | max_lockmode ------------+-------------------------- - alterlock | ShareUpdateExclusiveLock - pg_toast | ShareUpdateExclusiveLock -(2 rows) - -commit; -begin; alter table alterlock alter column f2 set storage extended; -select * from my_locks order by 1; - relname | max_lockmode ------------+--------------------- - alterlock | AccessExclusiveLock -(1 row) - -rollback; -begin; alter table alterlock alter column f2 set default 'x'; -select * from my_locks order by 1; - relname | max_lockmode ------------+--------------------- - alterlock | AccessExclusiveLock -(1 row) - -rollback; -begin; -create trigger ttdummy - before delete or update on alterlock - for each row - execute procedure - ttdummy (1, 1); -select * from my_locks order by 1; - relname | max_lockmode ------------+----------------------- - alterlock | ShareRowExclusiveLock -(1 row) - -rollback; -begin; -select * from my_locks order by 1; - relname | max_lockmode ----------+-------------- -(0 rows) - -alter table alterlock2 add foreign key (f1) references alterlock (f1); -select * from my_locks order by 1; - relname | max_lockmode ------------------+----------------------- - alterlock | ShareRowExclusiveLock - alterlock2 | ShareRowExclusiveLock - alterlock2_pkey | AccessShareLock - alterlock_pkey | AccessShareLock -(4 rows) - -rollback; -begin; -alter table alterlock2 -add constraint alterlock2nv foreign key (f1) references alterlock (f1) NOT VALID; -select * from my_locks order by 1; - relname | max_lockmode -------------+----------------------- - alterlock | ShareRowExclusiveLock - alterlock2 | ShareRowExclusiveLock -(2 rows) - -commit; -begin; -alter table alterlock2 validate constraint alterlock2nv; -select * from my_locks order by 1; - relname | max_lockmode ------------------+-------------------------- - alterlock | RowShareLock - alterlock2 | ShareUpdateExclusiveLock - alterlock2_pkey | AccessShareLock - alterlock_pkey | AccessShareLock -(4 rows) - -rollback; -create or replace view my_locks as -select case when c.relname like 'pg_toast%' then 'pg_toast' else c.relname end, max(mode::lockmodes) as max_lockmode -from pg_locks l join pg_class c on l.relation = c.oid -where virtualtransaction = ( - select virtualtransaction - from pg_locks - where transactionid = pg_current_xact_id()::xid) -and locktype = 'relation' -and relnamespace != (select oid from pg_namespace where nspname = 'pg_catalog') -and c.relname = 'my_locks' -group by c.relname; --- raise exception -alter table my_locks set (autovacuum_enabled = false); -ERROR: unrecognized parameter "autovacuum_enabled" -alter view my_locks set (autovacuum_enabled = false); -ERROR: unrecognized parameter "autovacuum_enabled" -alter table my_locks reset (autovacuum_enabled); -alter view my_locks reset (autovacuum_enabled); -begin; -alter view my_locks set (security_barrier=off); -select * from my_locks order by 1; - relname | max_lockmode -----------+--------------------- - my_locks | AccessExclusiveLock -(1 row) - -alter view my_locks reset (security_barrier); -rollback; --- this test intentionally applies the ALTER TABLE command against a view, but --- uses a view option so we expect this to succeed. This form of SQL is --- accepted for historical reasons, as shown in the docs for ALTER VIEW -begin; -alter table my_locks set (security_barrier=off); -select * from my_locks order by 1; - relname | max_lockmode -----------+--------------------- - my_locks | AccessExclusiveLock -(1 row) - -alter table my_locks reset (security_barrier); -rollback; --- cleanup -drop table alterlock2; -drop table alterlock; -drop view my_locks; -drop type lockmodes; --- --- alter function --- -create function test_strict(text) returns text as - 'select coalesce($1, ''got passed a null'');' - language sql returns null on null input; -select test_strict(NULL); - test_strict -------------- - -(1 row) - -alter function test_strict(text) called on null input; -select test_strict(NULL); - test_strict -------------------- - got passed a null -(1 row) - -create function non_strict(text) returns text as - 'select coalesce($1, ''got passed a null'');' - language sql called on null input; -select non_strict(NULL); - non_strict -------------------- - got passed a null -(1 row) - -alter function non_strict(text) returns null on null input; -select non_strict(NULL); - non_strict ------------- - -(1 row) - --- --- alter object set schema --- -create schema alter1; -create schema alter2; -create table alter1.t1(f1 serial primary key, f2 int check (f2 > 0)); -create view alter1.v1 as select * from alter1.t1; -create function alter1.plus1(int) returns int as 'select $1+1' language sql; -create domain alter1.posint integer check (value > 0); -create type alter1.ctype as (f1 int, f2 text); -create function alter1.same(alter1.ctype, alter1.ctype) returns boolean language sql -as 'select $1.f1 is not distinct from $2.f1 and $1.f2 is not distinct from $2.f2'; -create operator alter1.=(procedure = alter1.same, leftarg = alter1.ctype, rightarg = alter1.ctype); -create operator class alter1.ctype_hash_ops default for type alter1.ctype using hash as - operator 1 alter1.=(alter1.ctype, alter1.ctype); -create conversion alter1.latin1_to_utf8 for 'latin1' to 'utf8' from iso8859_1_to_utf8; -create text search parser alter1.prs(start = prsd_start, gettoken = prsd_nexttoken, end = prsd_end, lextypes = prsd_lextype); -create text search configuration alter1.cfg(parser = alter1.prs); -create text search template alter1.tmpl(init = dsimple_init, lexize = dsimple_lexize); -create text search dictionary alter1.dict(template = alter1.tmpl); -insert into alter1.t1(f2) values(11); -insert into alter1.t1(f2) values(12); -alter table alter1.t1 set schema alter1; -- no-op, same schema -alter table alter1.t1 set schema alter2; -alter table alter1.v1 set schema alter2; -alter function alter1.plus1(int) set schema alter2; -alter domain alter1.posint set schema alter2; -alter operator class alter1.ctype_hash_ops using hash set schema alter2; -alter operator family alter1.ctype_hash_ops using hash set schema alter2; -alter operator alter1.=(alter1.ctype, alter1.ctype) set schema alter2; -alter function alter1.same(alter1.ctype, alter1.ctype) set schema alter2; -alter type alter1.ctype set schema alter1; -- no-op, same schema -alter type alter1.ctype set schema alter2; -alter conversion alter1.latin1_to_utf8 set schema alter2; -alter text search parser alter1.prs set schema alter2; -alter text search configuration alter1.cfg set schema alter2; -alter text search template alter1.tmpl set schema alter2; -alter text search dictionary alter1.dict set schema alter2; --- this should succeed because nothing is left in alter1 -drop schema alter1; -insert into alter2.t1(f2) values(13); -insert into alter2.t1(f2) values(14); -select * from alter2.t1; - f1 | f2 -----+---- - 1 | 11 - 2 | 12 - 3 | 13 - 4 | 14 -(4 rows) - -select * from alter2.v1; - f1 | f2 -----+---- - 1 | 11 - 2 | 12 - 3 | 13 - 4 | 14 -(4 rows) - -select alter2.plus1(41); - plus1 -------- - 42 -(1 row) - --- clean up -drop schema alter2 cascade; -NOTICE: drop cascades to 13 other objects -DETAIL: drop cascades to table alter2.t1 -drop cascades to view alter2.v1 -drop cascades to function alter2.plus1(integer) -drop cascades to type alter2.posint -drop cascades to type alter2.ctype -drop cascades to function alter2.same(alter2.ctype,alter2.ctype) -drop cascades to operator alter2.=(alter2.ctype,alter2.ctype) -drop cascades to operator family alter2.ctype_hash_ops for access method hash -drop cascades to conversion alter2.latin1_to_utf8 -drop cascades to text search parser alter2.prs -drop cascades to text search configuration alter2.cfg -drop cascades to text search template alter2.tmpl -drop cascades to text search dictionary alter2.dict --- --- composite types --- -CREATE TYPE test_type AS (a int); -\d test_type - Composite type "public.test_type" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | - -ALTER TYPE nosuchtype ADD ATTRIBUTE b text; -- fails -ERROR: relation "nosuchtype" does not exist -ALTER TYPE test_type ADD ATTRIBUTE b text; -\d test_type - Composite type "public.test_type" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | - b | text | | | - -ALTER TYPE test_type ADD ATTRIBUTE b text; -- fails -ERROR: column "b" of relation "test_type" already exists -ALTER TYPE test_type ALTER ATTRIBUTE b SET DATA TYPE varchar; -\d test_type - Composite type "public.test_type" - Column | Type | Collation | Nullable | Default ---------+-------------------+-----------+----------+--------- - a | integer | | | - b | character varying | | | - -ALTER TYPE test_type ALTER ATTRIBUTE b SET DATA TYPE integer; -\d test_type - Composite type "public.test_type" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | - b | integer | | | - -ALTER TYPE test_type DROP ATTRIBUTE b; -\d test_type - Composite type "public.test_type" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | - -ALTER TYPE test_type DROP ATTRIBUTE c; -- fails -ERROR: column "c" of relation "test_type" does not exist -ALTER TYPE test_type DROP ATTRIBUTE IF EXISTS c; -NOTICE: column "c" of relation "test_type" does not exist, skipping -ALTER TYPE test_type DROP ATTRIBUTE a, ADD ATTRIBUTE d boolean; -\d test_type - Composite type "public.test_type" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - d | boolean | | | - -ALTER TYPE test_type RENAME ATTRIBUTE a TO aa; -ERROR: column "a" does not exist -ALTER TYPE test_type RENAME ATTRIBUTE d TO dd; -\d test_type - Composite type "public.test_type" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - dd | boolean | | | - -DROP TYPE test_type; -CREATE TYPE test_type1 AS (a int, b text); -CREATE TABLE test_tbl1 (x int, y test_type1); -ALTER TYPE test_type1 ALTER ATTRIBUTE b TYPE varchar; -- fails -ERROR: cannot alter type "test_type1" because column "test_tbl1.y" uses it -CREATE TYPE test_type2 AS (a int, b text); -CREATE TABLE test_tbl2 OF test_type2; -CREATE TABLE test_tbl2_subclass () INHERITS (test_tbl2); -\d test_type2 - Composite type "public.test_type2" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | - b | text | | | - -\d test_tbl2 - Table "public.test_tbl2" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | - b | text | | | -Number of child tables: 1 (Use \d+ to list them.) -Typed table of type: test_type2 - -ALTER TYPE test_type2 ADD ATTRIBUTE c text; -- fails -ERROR: cannot alter type "test_type2" because it is the type of a typed table -HINT: Use ALTER ... CASCADE to alter the typed tables too. -ALTER TYPE test_type2 ADD ATTRIBUTE c text CASCADE; -\d test_type2 - Composite type "public.test_type2" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | - b | text | | | - c | text | | | - -\d test_tbl2 - Table "public.test_tbl2" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | - b | text | | | - c | text | | | -Number of child tables: 1 (Use \d+ to list them.) -Typed table of type: test_type2 - -ALTER TYPE test_type2 ALTER ATTRIBUTE b TYPE varchar; -- fails -ERROR: cannot alter type "test_type2" because it is the type of a typed table -HINT: Use ALTER ... CASCADE to alter the typed tables too. -ALTER TYPE test_type2 ALTER ATTRIBUTE b TYPE varchar CASCADE; -\d test_type2 - Composite type "public.test_type2" - Column | Type | Collation | Nullable | Default ---------+-------------------+-----------+----------+--------- - a | integer | | | - b | character varying | | | - c | text | | | - -\d test_tbl2 - Table "public.test_tbl2" - Column | Type | Collation | Nullable | Default ---------+-------------------+-----------+----------+--------- - a | integer | | | - b | character varying | | | - c | text | | | -Number of child tables: 1 (Use \d+ to list them.) -Typed table of type: test_type2 - -ALTER TYPE test_type2 DROP ATTRIBUTE b; -- fails -ERROR: cannot alter type "test_type2" because it is the type of a typed table -HINT: Use ALTER ... CASCADE to alter the typed tables too. -ALTER TYPE test_type2 DROP ATTRIBUTE b CASCADE; -\d test_type2 - Composite type "public.test_type2" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | - c | text | | | - -\d test_tbl2 - Table "public.test_tbl2" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | - c | text | | | -Number of child tables: 1 (Use \d+ to list them.) -Typed table of type: test_type2 - -ALTER TYPE test_type2 RENAME ATTRIBUTE a TO aa; -- fails -ERROR: cannot alter type "test_type2" because it is the type of a typed table -HINT: Use ALTER ... CASCADE to alter the typed tables too. -ALTER TYPE test_type2 RENAME ATTRIBUTE a TO aa CASCADE; -\d test_type2 - Composite type "public.test_type2" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - aa | integer | | | - c | text | | | - -\d test_tbl2 - Table "public.test_tbl2" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - aa | integer | | | - c | text | | | -Number of child tables: 1 (Use \d+ to list them.) -Typed table of type: test_type2 - -\d test_tbl2_subclass - Table "public.test_tbl2_subclass" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - aa | integer | | | - c | text | | | -Inherits: test_tbl2 - -DROP TABLE test_tbl2_subclass; -CREATE TYPE test_typex AS (a int, b text); -CREATE TABLE test_tblx (x int, y test_typex check ((y).a > 0)); -ALTER TYPE test_typex DROP ATTRIBUTE a; -- fails -ERROR: cannot drop column a of composite type test_typex because other objects depend on it -DETAIL: constraint test_tblx_y_check on table test_tblx depends on column a of composite type test_typex -HINT: Use DROP ... CASCADE to drop the dependent objects too. -ALTER TYPE test_typex DROP ATTRIBUTE a CASCADE; -NOTICE: drop cascades to constraint test_tblx_y_check on table test_tblx -\d test_tblx - Table "public.test_tblx" - Column | Type | Collation | Nullable | Default ---------+------------+-----------+----------+--------- - x | integer | | | - y | test_typex | | | - -DROP TABLE test_tblx; -DROP TYPE test_typex; --- This test isn't that interesting on its own, but the purpose is to leave --- behind a table to test pg_upgrade with. The table has a composite type --- column in it, and the composite type has a dropped attribute. -CREATE TYPE test_type3 AS (a int); -CREATE TABLE test_tbl3 (c) AS SELECT '(1)'::test_type3; -ALTER TYPE test_type3 DROP ATTRIBUTE a, ADD ATTRIBUTE b int; -CREATE TYPE test_type_empty AS (); -DROP TYPE test_type_empty; --- --- typed tables: OF / NOT OF --- -CREATE TYPE tt_t0 AS (z inet, x int, y numeric(8,2)); -ALTER TYPE tt_t0 DROP ATTRIBUTE z; -CREATE TABLE tt0 (x int NOT NULL, y numeric(8,2)); -- OK -CREATE TABLE tt1 (x int, y bigint); -- wrong base type -CREATE TABLE tt2 (x int, y numeric(9,2)); -- wrong typmod -CREATE TABLE tt3 (y numeric(8,2), x int); -- wrong column order -CREATE TABLE tt4 (x int); -- too few columns -CREATE TABLE tt5 (x int, y numeric(8,2), z int); -- too few columns -CREATE TABLE tt6 () INHERITS (tt0); -- can't have a parent -CREATE TABLE tt7 (x int, q text, y numeric(8,2)); -ALTER TABLE tt7 DROP q; -- OK -ALTER TABLE tt0 OF tt_t0; -ALTER TABLE tt1 OF tt_t0; -ERROR: table "tt1" has different type for column "y" -ALTER TABLE tt2 OF tt_t0; -ERROR: table "tt2" has different type for column "y" -ALTER TABLE tt3 OF tt_t0; -ERROR: table has column "y" where type requires "x" -ALTER TABLE tt4 OF tt_t0; -ERROR: table is missing column "y" -ALTER TABLE tt5 OF tt_t0; -ERROR: table has extra column "z" -ALTER TABLE tt6 OF tt_t0; -ERROR: typed tables cannot inherit -ALTER TABLE tt7 OF tt_t0; -CREATE TYPE tt_t1 AS (x int, y numeric(8,2)); -ALTER TABLE tt7 OF tt_t1; -- reassign an already-typed table -ALTER TABLE tt7 NOT OF; -\d tt7 - Table "public.tt7" - Column | Type | Collation | Nullable | Default ---------+--------------+-----------+----------+--------- - x | integer | | | - y | numeric(8,2) | | | - --- make sure we can drop a constraint on the parent but it remains on the child -CREATE TABLE test_drop_constr_parent (c text CHECK (c IS NOT NULL)); -CREATE TABLE test_drop_constr_child () INHERITS (test_drop_constr_parent); -ALTER TABLE ONLY test_drop_constr_parent DROP CONSTRAINT "test_drop_constr_parent_c_check"; --- should fail -INSERT INTO test_drop_constr_child (c) VALUES (NULL); -ERROR: new row for relation "test_drop_constr_child" violates check constraint "test_drop_constr_parent_c_check" -DETAIL: Failing row contains (null). -DROP TABLE test_drop_constr_parent CASCADE; -NOTICE: drop cascades to table test_drop_constr_child --- --- IF EXISTS test --- -ALTER TABLE IF EXISTS tt8 ADD COLUMN f int; -NOTICE: relation "tt8" does not exist, skipping -ALTER TABLE IF EXISTS tt8 ADD CONSTRAINT xxx PRIMARY KEY(f); -NOTICE: relation "tt8" does not exist, skipping -ALTER TABLE IF EXISTS tt8 ADD CHECK (f BETWEEN 0 AND 10); -NOTICE: relation "tt8" does not exist, skipping -ALTER TABLE IF EXISTS tt8 ALTER COLUMN f SET DEFAULT 0; -NOTICE: relation "tt8" does not exist, skipping -ALTER TABLE IF EXISTS tt8 RENAME COLUMN f TO f1; -NOTICE: relation "tt8" does not exist, skipping -ALTER TABLE IF EXISTS tt8 SET SCHEMA alter2; -NOTICE: relation "tt8" does not exist, skipping -CREATE TABLE tt8(a int); -CREATE SCHEMA alter2; -ALTER TABLE IF EXISTS tt8 ADD COLUMN f int; -ALTER TABLE IF EXISTS tt8 ADD CONSTRAINT xxx PRIMARY KEY(f); -ALTER TABLE IF EXISTS tt8 ADD CHECK (f BETWEEN 0 AND 10); -ALTER TABLE IF EXISTS tt8 ALTER COLUMN f SET DEFAULT 0; -ALTER TABLE IF EXISTS tt8 RENAME COLUMN f TO f1; -ALTER TABLE IF EXISTS tt8 SET SCHEMA alter2; -\d alter2.tt8 - Table "alter2.tt8" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | - f1 | integer | | not null | 0 -Indexes: - "xxx" PRIMARY KEY, btree (f1) -Check constraints: - "tt8_f_check" CHECK (f1 >= 0 AND f1 <= 10) - -DROP TABLE alter2.tt8; -DROP SCHEMA alter2; --- --- Check conflicts between index and CHECK constraint names --- -CREATE TABLE tt9(c integer); -ALTER TABLE tt9 ADD CHECK(c > 1); -ALTER TABLE tt9 ADD CHECK(c > 2); -- picks nonconflicting name -ALTER TABLE tt9 ADD CONSTRAINT foo CHECK(c > 3); -ALTER TABLE tt9 ADD CONSTRAINT foo CHECK(c > 4); -- fail, dup name -ERROR: constraint "foo" for relation "tt9" already exists -ALTER TABLE tt9 ADD UNIQUE(c); -ALTER TABLE tt9 ADD UNIQUE(c); -- picks nonconflicting name -ALTER TABLE tt9 ADD CONSTRAINT tt9_c_key UNIQUE(c); -- fail, dup name -ERROR: relation "tt9_c_key" already exists -ALTER TABLE tt9 ADD CONSTRAINT foo UNIQUE(c); -- fail, dup name -ERROR: constraint "foo" for relation "tt9" already exists -ALTER TABLE tt9 ADD CONSTRAINT tt9_c_key CHECK(c > 5); -- fail, dup name -ERROR: constraint "tt9_c_key" for relation "tt9" already exists -ALTER TABLE tt9 ADD CONSTRAINT tt9_c_key2 CHECK(c > 6); -ALTER TABLE tt9 ADD UNIQUE(c); -- picks nonconflicting name -\d tt9 - Table "public.tt9" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - c | integer | | | -Indexes: - "tt9_c_key" UNIQUE CONSTRAINT, btree (c) - "tt9_c_key1" UNIQUE CONSTRAINT, btree (c) - "tt9_c_key3" UNIQUE CONSTRAINT, btree (c) -Check constraints: - "foo" CHECK (c > 3) - "tt9_c_check" CHECK (c > 1) - "tt9_c_check1" CHECK (c > 2) - "tt9_c_key2" CHECK (c > 6) - -DROP TABLE tt9; --- Check that comments on constraints and indexes are not lost at ALTER TABLE. -CREATE TABLE comment_test ( - id int, - positive_col int CHECK (positive_col > 0), - indexed_col int, - CONSTRAINT comment_test_pk PRIMARY KEY (id)); -CREATE INDEX comment_test_index ON comment_test(indexed_col); -COMMENT ON COLUMN comment_test.id IS 'Column ''id'' on comment_test'; -COMMENT ON INDEX comment_test_index IS 'Simple index on comment_test'; -COMMENT ON CONSTRAINT comment_test_positive_col_check ON comment_test IS 'CHECK constraint on comment_test.positive_col'; -COMMENT ON CONSTRAINT comment_test_pk ON comment_test IS 'PRIMARY KEY constraint of comment_test'; -COMMENT ON INDEX comment_test_pk IS 'Index backing the PRIMARY KEY of comment_test'; -SELECT col_description('comment_test'::regclass, 1) as comment; - comment ------------------------------ - Column 'id' on comment_test -(1 row) - -SELECT indexrelid::regclass::text as index, obj_description(indexrelid, 'pg_class') as comment FROM pg_index where indrelid = 'comment_test'::regclass ORDER BY 1, 2; - index | comment ---------------------+----------------------------------------------- - comment_test_index | Simple index on comment_test - comment_test_pk | Index backing the PRIMARY KEY of comment_test -(2 rows) - -SELECT conname as constraint, obj_description(oid, 'pg_constraint') as comment FROM pg_constraint where conrelid = 'comment_test'::regclass ORDER BY 1, 2; - constraint | comment ----------------------------------+----------------------------------------------- - comment_test_pk | PRIMARY KEY constraint of comment_test - comment_test_positive_col_check | CHECK constraint on comment_test.positive_col -(2 rows) - --- Change the datatype of all the columns. ALTER TABLE is optimized to not --- rebuild an index if the new data type is binary compatible with the old --- one. Check do a dummy ALTER TABLE that doesn't change the datatype --- first, to test that no-op codepath, and another one that does. -ALTER TABLE comment_test ALTER COLUMN indexed_col SET DATA TYPE int; -ALTER TABLE comment_test ALTER COLUMN indexed_col SET DATA TYPE text; -ALTER TABLE comment_test ALTER COLUMN id SET DATA TYPE int; -ALTER TABLE comment_test ALTER COLUMN id SET DATA TYPE text; -ALTER TABLE comment_test ALTER COLUMN positive_col SET DATA TYPE int; -ALTER TABLE comment_test ALTER COLUMN positive_col SET DATA TYPE bigint; --- Check that the comments are intact. -SELECT col_description('comment_test'::regclass, 1) as comment; - comment ------------------------------ - Column 'id' on comment_test -(1 row) - -SELECT indexrelid::regclass::text as index, obj_description(indexrelid, 'pg_class') as comment FROM pg_index where indrelid = 'comment_test'::regclass ORDER BY 1, 2; - index | comment ---------------------+----------------------------------------------- - comment_test_index | Simple index on comment_test - comment_test_pk | Index backing the PRIMARY KEY of comment_test -(2 rows) - -SELECT conname as constraint, obj_description(oid, 'pg_constraint') as comment FROM pg_constraint where conrelid = 'comment_test'::regclass ORDER BY 1, 2; - constraint | comment ----------------------------------+----------------------------------------------- - comment_test_pk | PRIMARY KEY constraint of comment_test - comment_test_positive_col_check | CHECK constraint on comment_test.positive_col -(2 rows) - --- Check compatibility for foreign keys and comments. This is done --- separately as rebuilding the column type of the parent leads --- to an error and would reduce the test scope. -CREATE TABLE comment_test_child ( - id text CONSTRAINT comment_test_child_fk REFERENCES comment_test); -CREATE INDEX comment_test_child_fk ON comment_test_child(id); -COMMENT ON COLUMN comment_test_child.id IS 'Column ''id'' on comment_test_child'; -COMMENT ON INDEX comment_test_child_fk IS 'Index backing the FOREIGN KEY of comment_test_child'; -COMMENT ON CONSTRAINT comment_test_child_fk ON comment_test_child IS 'FOREIGN KEY constraint of comment_test_child'; --- Change column type of parent -ALTER TABLE comment_test ALTER COLUMN id SET DATA TYPE text; -ALTER TABLE comment_test ALTER COLUMN id SET DATA TYPE int USING id::integer; -ERROR: foreign key constraint "comment_test_child_fk" cannot be implemented -DETAIL: Key columns "id" and "id" are of incompatible types: text and integer. --- Comments should be intact -SELECT col_description('comment_test_child'::regclass, 1) as comment; - comment ------------------------------------ - Column 'id' on comment_test_child -(1 row) - -SELECT indexrelid::regclass::text as index, obj_description(indexrelid, 'pg_class') as comment FROM pg_index where indrelid = 'comment_test_child'::regclass ORDER BY 1, 2; - index | comment ------------------------+----------------------------------------------------- - comment_test_child_fk | Index backing the FOREIGN KEY of comment_test_child -(1 row) - -SELECT conname as constraint, obj_description(oid, 'pg_constraint') as comment FROM pg_constraint where conrelid = 'comment_test_child'::regclass ORDER BY 1, 2; - constraint | comment ------------------------+---------------------------------------------- - comment_test_child_fk | FOREIGN KEY constraint of comment_test_child -(1 row) - --- Check that we map relation oids to filenodes and back correctly. Only --- display bad mappings so the test output doesn't change all the time. A --- filenode function call can return NULL for a relation dropped concurrently --- with the call's surrounding query, so ignore a NULL mapped_oid for --- relations that no longer exist after all calls finish. -CREATE TEMP TABLE filenode_mapping AS -SELECT - oid, mapped_oid, reltablespace, relfilenode, relname -FROM pg_class, - pg_filenode_relation(reltablespace, pg_relation_filenode(oid)) AS mapped_oid -WHERE relkind IN ('r', 'i', 'S', 't', 'm') AND mapped_oid IS DISTINCT FROM oid; -SELECT m.* FROM filenode_mapping m LEFT JOIN pg_class c ON c.oid = m.oid -WHERE c.oid IS NOT NULL OR m.mapped_oid IS NOT NULL; - oid | mapped_oid | reltablespace | relfilenode | relname ------+------------+---------------+-------------+--------- -(0 rows) - --- Checks on creating and manipulation of user defined relations in --- pg_catalog. -SHOW allow_system_table_mods; - allow_system_table_mods -------------------------- - off -(1 row) - --- disallowed because of search_path issues with pg_dump -CREATE TABLE pg_catalog.new_system_table(); -ERROR: permission denied to create "pg_catalog.new_system_table" -DETAIL: System catalog modifications are currently disallowed. --- instead create in public first, move to catalog -CREATE TABLE new_system_table(id serial primary key, othercol text); -ALTER TABLE new_system_table SET SCHEMA pg_catalog; -ALTER TABLE new_system_table SET SCHEMA public; -ALTER TABLE new_system_table SET SCHEMA pg_catalog; --- will be ignored -- already there: -ALTER TABLE new_system_table SET SCHEMA pg_catalog; -ALTER TABLE new_system_table RENAME TO old_system_table; -CREATE INDEX old_system_table__othercol ON old_system_table (othercol); -INSERT INTO old_system_table(othercol) VALUES ('somedata'), ('otherdata'); -UPDATE old_system_table SET id = -id; -DELETE FROM old_system_table WHERE othercol = 'somedata'; -TRUNCATE old_system_table; -ALTER TABLE old_system_table DROP CONSTRAINT new_system_table_pkey; -ALTER TABLE old_system_table DROP COLUMN othercol; -DROP TABLE old_system_table; --- set logged -CREATE UNLOGGED TABLE unlogged1(f1 SERIAL PRIMARY KEY, f2 TEXT); --- check relpersistence of an unlogged table -SELECT relname, relkind, relpersistence FROM pg_class WHERE relname ~ '^unlogged1' -UNION ALL -SELECT 'toast table', t.relkind, t.relpersistence FROM pg_class r JOIN pg_class t ON t.oid = r.reltoastrelid WHERE r.relname ~ '^unlogged1' -UNION ALL -SELECT 'toast index', ri.relkind, ri.relpersistence FROM pg_class r join pg_class t ON t.oid = r.reltoastrelid JOIN pg_index i ON i.indrelid = t.oid JOIN pg_class ri ON ri.oid = i.indexrelid WHERE r.relname ~ '^unlogged1' -ORDER BY relname; - relname | relkind | relpersistence -------------------+---------+---------------- - toast index | i | u - toast table | t | u - unlogged1 | r | u - unlogged1_f1_seq | S | p - unlogged1_pkey | i | u -(5 rows) - -CREATE UNLOGGED TABLE unlogged2(f1 SERIAL PRIMARY KEY, f2 INTEGER REFERENCES unlogged1); -- foreign key -CREATE UNLOGGED TABLE unlogged3(f1 SERIAL PRIMARY KEY, f2 INTEGER REFERENCES unlogged3); -- self-referencing foreign key -ALTER TABLE unlogged3 SET LOGGED; -- skip self-referencing foreign key -ALTER TABLE unlogged2 SET LOGGED; -- fails because a foreign key to an unlogged table exists -ERROR: could not change table "unlogged2" to logged because it references unlogged table "unlogged1" -ALTER TABLE unlogged1 SET LOGGED; --- check relpersistence of an unlogged table after changing to permanent -SELECT relname, relkind, relpersistence FROM pg_class WHERE relname ~ '^unlogged1' -UNION ALL -SELECT 'toast table', t.relkind, t.relpersistence FROM pg_class r JOIN pg_class t ON t.oid = r.reltoastrelid WHERE r.relname ~ '^unlogged1' -UNION ALL -SELECT 'toast index', ri.relkind, ri.relpersistence FROM pg_class r join pg_class t ON t.oid = r.reltoastrelid JOIN pg_index i ON i.indrelid = t.oid JOIN pg_class ri ON ri.oid = i.indexrelid WHERE r.relname ~ '^unlogged1' -ORDER BY relname; - relname | relkind | relpersistence -------------------+---------+---------------- - toast index | i | p - toast table | t | p - unlogged1 | r | p - unlogged1_f1_seq | S | p - unlogged1_pkey | i | p -(5 rows) - -ALTER TABLE unlogged1 SET LOGGED; -- silently do nothing -DROP TABLE unlogged3; -DROP TABLE unlogged2; -DROP TABLE unlogged1; --- set unlogged -CREATE TABLE logged1(f1 SERIAL PRIMARY KEY, f2 TEXT); --- check relpersistence of a permanent table -SELECT relname, relkind, relpersistence FROM pg_class WHERE relname ~ '^logged1' -UNION ALL -SELECT 'toast table', t.relkind, t.relpersistence FROM pg_class r JOIN pg_class t ON t.oid = r.reltoastrelid WHERE r.relname ~ '^logged1' -UNION ALL -SELECT 'toast index', ri.relkind, ri.relpersistence FROM pg_class r join pg_class t ON t.oid = r.reltoastrelid JOIN pg_index i ON i.indrelid = t.oid JOIN pg_class ri ON ri.oid = i.indexrelid WHERE r.relname ~ '^logged1' -ORDER BY relname; - relname | relkind | relpersistence -----------------+---------+---------------- - logged1 | r | p - logged1_f1_seq | S | p - logged1_pkey | i | p - toast index | i | p - toast table | t | p -(5 rows) - -CREATE TABLE logged2(f1 SERIAL PRIMARY KEY, f2 INTEGER REFERENCES logged1); -- foreign key -CREATE TABLE logged3(f1 SERIAL PRIMARY KEY, f2 INTEGER REFERENCES logged3); -- self-referencing foreign key -ALTER TABLE logged1 SET UNLOGGED; -- fails because a foreign key from a permanent table exists -ERROR: could not change table "logged1" to unlogged because it references logged table "logged2" -ALTER TABLE logged3 SET UNLOGGED; -- skip self-referencing foreign key -ALTER TABLE logged2 SET UNLOGGED; -ALTER TABLE logged1 SET UNLOGGED; --- check relpersistence of a permanent table after changing to unlogged -SELECT relname, relkind, relpersistence FROM pg_class WHERE relname ~ '^logged1' -UNION ALL -SELECT 'toast table', t.relkind, t.relpersistence FROM pg_class r JOIN pg_class t ON t.oid = r.reltoastrelid WHERE r.relname ~ '^logged1' -UNION ALL -SELECT 'toast index', ri.relkind, ri.relpersistence FROM pg_class r join pg_class t ON t.oid = r.reltoastrelid JOIN pg_index i ON i.indrelid = t.oid JOIN pg_class ri ON ri.oid = i.indexrelid WHERE r.relname ~ '^logged1' -ORDER BY relname; - relname | relkind | relpersistence -----------------+---------+---------------- - logged1 | r | u - logged1_f1_seq | S | p - logged1_pkey | i | u - toast index | i | u - toast table | t | u -(5 rows) - -ALTER TABLE logged1 SET UNLOGGED; -- silently do nothing -DROP TABLE logged3; -DROP TABLE logged2; -DROP TABLE logged1; --- test ADD COLUMN IF NOT EXISTS -CREATE TABLE test_add_column(c1 integer); -\d test_add_column - Table "public.test_add_column" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - c1 | integer | | | - -ALTER TABLE test_add_column - ADD COLUMN c2 integer; -\d test_add_column - Table "public.test_add_column" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - c1 | integer | | | - c2 | integer | | | - -ALTER TABLE test_add_column - ADD COLUMN c2 integer; -- fail because c2 already exists -ERROR: column "c2" of relation "test_add_column" already exists -ALTER TABLE ONLY test_add_column - ADD COLUMN c2 integer; -- fail because c2 already exists -ERROR: column "c2" of relation "test_add_column" already exists -\d test_add_column - Table "public.test_add_column" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - c1 | integer | | | - c2 | integer | | | - -ALTER TABLE test_add_column - ADD COLUMN IF NOT EXISTS c2 integer; -- skipping because c2 already exists -NOTICE: column "c2" of relation "test_add_column" already exists, skipping -ALTER TABLE ONLY test_add_column - ADD COLUMN IF NOT EXISTS c2 integer; -- skipping because c2 already exists -NOTICE: column "c2" of relation "test_add_column" already exists, skipping -\d test_add_column - Table "public.test_add_column" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - c1 | integer | | | - c2 | integer | | | - -ALTER TABLE test_add_column - ADD COLUMN c2 integer, -- fail because c2 already exists - ADD COLUMN c3 integer primary key; -ERROR: column "c2" of relation "test_add_column" already exists -\d test_add_column - Table "public.test_add_column" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - c1 | integer | | | - c2 | integer | | | - -ALTER TABLE test_add_column - ADD COLUMN IF NOT EXISTS c2 integer, -- skipping because c2 already exists - ADD COLUMN c3 integer primary key; -NOTICE: column "c2" of relation "test_add_column" already exists, skipping -\d test_add_column - Table "public.test_add_column" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - c1 | integer | | | - c2 | integer | | | - c3 | integer | | not null | -Indexes: - "test_add_column_pkey" PRIMARY KEY, btree (c3) - -ALTER TABLE test_add_column - ADD COLUMN IF NOT EXISTS c2 integer, -- skipping because c2 already exists - ADD COLUMN IF NOT EXISTS c3 integer primary key; -- skipping because c3 already exists -NOTICE: column "c2" of relation "test_add_column" already exists, skipping -NOTICE: column "c3" of relation "test_add_column" already exists, skipping -\d test_add_column - Table "public.test_add_column" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - c1 | integer | | | - c2 | integer | | | - c3 | integer | | not null | -Indexes: - "test_add_column_pkey" PRIMARY KEY, btree (c3) - -ALTER TABLE test_add_column - ADD COLUMN IF NOT EXISTS c2 integer, -- skipping because c2 already exists - ADD COLUMN IF NOT EXISTS c3 integer, -- skipping because c3 already exists - ADD COLUMN c4 integer REFERENCES test_add_column; -NOTICE: column "c2" of relation "test_add_column" already exists, skipping -NOTICE: column "c3" of relation "test_add_column" already exists, skipping -\d test_add_column - Table "public.test_add_column" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - c1 | integer | | | - c2 | integer | | | - c3 | integer | | not null | - c4 | integer | | | -Indexes: - "test_add_column_pkey" PRIMARY KEY, btree (c3) -Foreign-key constraints: - "test_add_column_c4_fkey" FOREIGN KEY (c4) REFERENCES test_add_column(c3) -Referenced by: - TABLE "test_add_column" CONSTRAINT "test_add_column_c4_fkey" FOREIGN KEY (c4) REFERENCES test_add_column(c3) - -ALTER TABLE test_add_column - ADD COLUMN IF NOT EXISTS c4 integer REFERENCES test_add_column; -NOTICE: column "c4" of relation "test_add_column" already exists, skipping -\d test_add_column - Table "public.test_add_column" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - c1 | integer | | | - c2 | integer | | | - c3 | integer | | not null | - c4 | integer | | | -Indexes: - "test_add_column_pkey" PRIMARY KEY, btree (c3) -Foreign-key constraints: - "test_add_column_c4_fkey" FOREIGN KEY (c4) REFERENCES test_add_column(c3) -Referenced by: - TABLE "test_add_column" CONSTRAINT "test_add_column_c4_fkey" FOREIGN KEY (c4) REFERENCES test_add_column(c3) - -ALTER TABLE test_add_column - ADD COLUMN IF NOT EXISTS c5 SERIAL CHECK (c5 > 8); -\d test_add_column - Table "public.test_add_column" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------------------------------------------- - c1 | integer | | | - c2 | integer | | | - c3 | integer | | not null | - c4 | integer | | | - c5 | integer | | not null | nextval('test_add_column_c5_seq'::regclass) -Indexes: - "test_add_column_pkey" PRIMARY KEY, btree (c3) -Check constraints: - "test_add_column_c5_check" CHECK (c5 > 8) -Foreign-key constraints: - "test_add_column_c4_fkey" FOREIGN KEY (c4) REFERENCES test_add_column(c3) -Referenced by: - TABLE "test_add_column" CONSTRAINT "test_add_column_c4_fkey" FOREIGN KEY (c4) REFERENCES test_add_column(c3) - -ALTER TABLE test_add_column - ADD COLUMN IF NOT EXISTS c5 SERIAL CHECK (c5 > 10); -NOTICE: column "c5" of relation "test_add_column" already exists, skipping -\d test_add_column* - Table "public.test_add_column" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------------------------------------------- - c1 | integer | | | - c2 | integer | | | - c3 | integer | | not null | - c4 | integer | | | - c5 | integer | | not null | nextval('test_add_column_c5_seq'::regclass) -Indexes: - "test_add_column_pkey" PRIMARY KEY, btree (c3) -Check constraints: - "test_add_column_c5_check" CHECK (c5 > 8) -Foreign-key constraints: - "test_add_column_c4_fkey" FOREIGN KEY (c4) REFERENCES test_add_column(c3) -Referenced by: - TABLE "test_add_column" CONSTRAINT "test_add_column_c4_fkey" FOREIGN KEY (c4) REFERENCES test_add_column(c3) - - Sequence "public.test_add_column_c5_seq" - Type | Start | Minimum | Maximum | Increment | Cycles? | Cache ----------+-------+---------+------------+-----------+---------+------- - integer | 1 | 1 | 2147483647 | 1 | no | 1 -Owned by: public.test_add_column.c5 - - Index "public.test_add_column_pkey" - Column | Type | Key? | Definition ---------+---------+------+------------ - c3 | integer | yes | c3 -primary key, btree, for table "public.test_add_column" - -DROP TABLE test_add_column; -\d test_add_column* --- assorted cases with multiple ALTER TABLE steps -CREATE TABLE ataddindex(f1 INT); -INSERT INTO ataddindex VALUES (42), (43); -CREATE UNIQUE INDEX ataddindexi0 ON ataddindex(f1); -ALTER TABLE ataddindex - ADD PRIMARY KEY USING INDEX ataddindexi0, - ALTER f1 TYPE BIGINT; -\d ataddindex - Table "public.ataddindex" - Column | Type | Collation | Nullable | Default ---------+--------+-----------+----------+--------- - f1 | bigint | | not null | -Indexes: - "ataddindexi0" PRIMARY KEY, btree (f1) - -DROP TABLE ataddindex; -CREATE TABLE ataddindex(f1 VARCHAR(10)); -INSERT INTO ataddindex(f1) VALUES ('foo'), ('a'); -ALTER TABLE ataddindex - ALTER f1 SET DATA TYPE TEXT, - ADD EXCLUDE ((f1 LIKE 'a') WITH =); -\d ataddindex - Table "public.ataddindex" - Column | Type | Collation | Nullable | Default ---------+------+-----------+----------+--------- - f1 | text | | | -Indexes: - "ataddindex_expr_excl" EXCLUDE USING btree ((f1 ~~ 'a'::text) WITH =) - -DROP TABLE ataddindex; -CREATE TABLE ataddindex(id int, ref_id int); -ALTER TABLE ataddindex - ADD PRIMARY KEY (id), - ADD FOREIGN KEY (ref_id) REFERENCES ataddindex; -\d ataddindex - Table "public.ataddindex" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - id | integer | | not null | - ref_id | integer | | | -Indexes: - "ataddindex_pkey" PRIMARY KEY, btree (id) -Foreign-key constraints: - "ataddindex_ref_id_fkey" FOREIGN KEY (ref_id) REFERENCES ataddindex(id) -Referenced by: - TABLE "ataddindex" CONSTRAINT "ataddindex_ref_id_fkey" FOREIGN KEY (ref_id) REFERENCES ataddindex(id) - -DROP TABLE ataddindex; -CREATE TABLE ataddindex(id int, ref_id int); -ALTER TABLE ataddindex - ADD UNIQUE (id), - ADD FOREIGN KEY (ref_id) REFERENCES ataddindex (id); -\d ataddindex - Table "public.ataddindex" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - id | integer | | | - ref_id | integer | | | -Indexes: - "ataddindex_id_key" UNIQUE CONSTRAINT, btree (id) -Foreign-key constraints: - "ataddindex_ref_id_fkey" FOREIGN KEY (ref_id) REFERENCES ataddindex(id) -Referenced by: - TABLE "ataddindex" CONSTRAINT "ataddindex_ref_id_fkey" FOREIGN KEY (ref_id) REFERENCES ataddindex(id) - -DROP TABLE ataddindex; --- unsupported constraint types for partitioned tables -CREATE TABLE partitioned ( - a int, - b int -) PARTITION BY RANGE (a, (a+b+1)); -ALTER TABLE partitioned ADD EXCLUDE USING gist (a WITH &&); -ERROR: exclusion constraints are not supported on partitioned tables -LINE 1: ALTER TABLE partitioned ADD EXCLUDE USING gist (a WITH &&); - ^ --- cannot drop column that is part of the partition key -ALTER TABLE partitioned DROP COLUMN a; -ERROR: cannot drop column "a" because it is part of the partition key of relation "partitioned" -ALTER TABLE partitioned ALTER COLUMN a TYPE char(5); -ERROR: cannot alter column "a" because it is part of the partition key of relation "partitioned" -ALTER TABLE partitioned DROP COLUMN b; -ERROR: cannot drop column "b" because it is part of the partition key of relation "partitioned" -ALTER TABLE partitioned ALTER COLUMN b TYPE char(5); -ERROR: cannot alter column "b" because it is part of the partition key of relation "partitioned" --- partitioned table cannot participate in regular inheritance -CREATE TABLE nonpartitioned ( - a int, - b int -); -ALTER TABLE partitioned INHERIT nonpartitioned; -ERROR: cannot change inheritance of partitioned table -ALTER TABLE nonpartitioned INHERIT partitioned; -ERROR: cannot inherit from partitioned table "partitioned" --- cannot add NO INHERIT constraint to partitioned tables -ALTER TABLE partitioned ADD CONSTRAINT chk_a CHECK (a > 0) NO INHERIT; -ERROR: cannot add NO INHERIT constraint to partitioned table "partitioned" -DROP TABLE partitioned, nonpartitioned; --- --- ATTACH PARTITION --- --- check that target table is partitioned -CREATE TABLE unparted ( - a int -); -CREATE TABLE fail_part (like unparted); -ALTER TABLE unparted ATTACH PARTITION fail_part FOR VALUES IN ('a'); -ERROR: table "unparted" is not partitioned -DROP TABLE unparted, fail_part; --- check that partition bound is compatible -CREATE TABLE list_parted ( - a int NOT NULL, - b char(2) COLLATE "C", - CONSTRAINT check_a CHECK (a > 0) -) PARTITION BY LIST (a); -CREATE TABLE fail_part (LIKE list_parted); -ALTER TABLE list_parted ATTACH PARTITION fail_part FOR VALUES FROM (1) TO (10); -ERROR: invalid bound specification for a list partition -LINE 1: ...list_parted ATTACH PARTITION fail_part FOR VALUES FROM (1) T... - ^ -DROP TABLE fail_part; --- check that the table being attached exists -ALTER TABLE list_parted ATTACH PARTITION nonexistent FOR VALUES IN (1); -ERROR: relation "nonexistent" does not exist --- check ownership of the source table -CREATE ROLE regress_test_me; -CREATE ROLE regress_test_not_me; -CREATE TABLE not_owned_by_me (LIKE list_parted); -ALTER TABLE not_owned_by_me OWNER TO regress_test_not_me; -SET SESSION AUTHORIZATION regress_test_me; -CREATE TABLE owned_by_me ( - a int -) PARTITION BY LIST (a); -ALTER TABLE owned_by_me ATTACH PARTITION not_owned_by_me FOR VALUES IN (1); -ERROR: must be owner of table not_owned_by_me -RESET SESSION AUTHORIZATION; -DROP TABLE owned_by_me, not_owned_by_me; -DROP ROLE regress_test_not_me; -DROP ROLE regress_test_me; --- check that the table being attached is not part of regular inheritance -CREATE TABLE parent (LIKE list_parted); -CREATE TABLE child () INHERITS (parent); -ALTER TABLE list_parted ATTACH PARTITION child FOR VALUES IN (1); -ERROR: cannot attach inheritance child as partition -ALTER TABLE list_parted ATTACH PARTITION parent FOR VALUES IN (1); -ERROR: cannot attach inheritance parent as partition -DROP TABLE parent CASCADE; -NOTICE: drop cascades to table child --- check any TEMP-ness -CREATE TEMP TABLE temp_parted (a int) PARTITION BY LIST (a); -CREATE TABLE perm_part (a int); -ALTER TABLE temp_parted ATTACH PARTITION perm_part FOR VALUES IN (1); -ERROR: cannot attach a permanent relation as partition of temporary relation "temp_parted" -DROP TABLE temp_parted, perm_part; --- check that the table being attached is not a typed table -CREATE TYPE mytype AS (a int); -CREATE TABLE fail_part OF mytype; -ALTER TABLE list_parted ATTACH PARTITION fail_part FOR VALUES IN (1); -ERROR: cannot attach a typed table as partition -DROP TYPE mytype CASCADE; -NOTICE: drop cascades to table fail_part --- check that the table being attached has only columns present in the parent -CREATE TABLE fail_part (like list_parted, c int); -ALTER TABLE list_parted ATTACH PARTITION fail_part FOR VALUES IN (1); -ERROR: table "fail_part" contains column "c" not found in parent "list_parted" -DETAIL: The new partition may contain only the columns present in parent. -DROP TABLE fail_part; --- check that the table being attached has every column of the parent -CREATE TABLE fail_part (a int NOT NULL); -ALTER TABLE list_parted ATTACH PARTITION fail_part FOR VALUES IN (1); -ERROR: child table is missing column "b" -DROP TABLE fail_part; --- check that columns match in type, collation and NOT NULL status -CREATE TABLE fail_part ( - b char(3), - a int NOT NULL -); -ALTER TABLE list_parted ATTACH PARTITION fail_part FOR VALUES IN (1); -ERROR: child table "fail_part" has different type for column "b" -ALTER TABLE fail_part ALTER b TYPE char (2) COLLATE "POSIX"; -ALTER TABLE list_parted ATTACH PARTITION fail_part FOR VALUES IN (1); -ERROR: child table "fail_part" has different collation for column "b" -DROP TABLE fail_part; --- check that the table being attached has all constraints of the parent -CREATE TABLE fail_part ( - b char(2) COLLATE "C", - a int NOT NULL -); -ALTER TABLE list_parted ATTACH PARTITION fail_part FOR VALUES IN (1); -ERROR: child table is missing constraint "check_a" --- check that the constraint matches in definition with parent's constraint -ALTER TABLE fail_part ADD CONSTRAINT check_a CHECK (a >= 0); -ALTER TABLE list_parted ATTACH PARTITION fail_part FOR VALUES IN (1); -ERROR: child table "fail_part" has different definition for check constraint "check_a" -DROP TABLE fail_part; --- check the attributes and constraints after partition is attached -CREATE TABLE part_1 ( - a int NOT NULL, - b char(2) COLLATE "C", - CONSTRAINT check_a CHECK (a > 0) -); -ALTER TABLE list_parted ATTACH PARTITION part_1 FOR VALUES IN (1); --- attislocal and conislocal are always false for merged attributes and constraints respectively. -SELECT attislocal, attinhcount FROM pg_attribute WHERE attrelid = 'part_1'::regclass AND attnum > 0; - attislocal | attinhcount -------------+------------- - f | 1 - f | 1 -(2 rows) - -SELECT conislocal, coninhcount FROM pg_constraint WHERE conrelid = 'part_1'::regclass AND conname = 'check_a'; - conislocal | coninhcount -------------+------------- - f | 1 -(1 row) - --- check that the new partition won't overlap with an existing partition -CREATE TABLE fail_part (LIKE part_1 INCLUDING CONSTRAINTS); -ALTER TABLE list_parted ATTACH PARTITION fail_part FOR VALUES IN (1); -ERROR: partition "fail_part" would overlap partition "part_1" -LINE 1: ...LE list_parted ATTACH PARTITION fail_part FOR VALUES IN (1); - ^ -DROP TABLE fail_part; --- check that an existing table can be attached as a default partition -CREATE TABLE def_part (LIKE list_parted INCLUDING CONSTRAINTS); -ALTER TABLE list_parted ATTACH PARTITION def_part DEFAULT; --- check attaching default partition fails if a default partition already --- exists -CREATE TABLE fail_def_part (LIKE part_1 INCLUDING CONSTRAINTS); -ALTER TABLE list_parted ATTACH PARTITION fail_def_part DEFAULT; -ERROR: partition "fail_def_part" conflicts with existing default partition "def_part" -LINE 1: ...ER TABLE list_parted ATTACH PARTITION fail_def_part DEFAULT; - ^ --- check validation when attaching list partitions -CREATE TABLE list_parted2 ( - a int, - b char -) PARTITION BY LIST (a); --- check that violating rows are correctly reported -CREATE TABLE part_2 (LIKE list_parted2); -INSERT INTO part_2 VALUES (3, 'a'); -ALTER TABLE list_parted2 ATTACH PARTITION part_2 FOR VALUES IN (2); -ERROR: partition constraint of relation "part_2" is violated by some row --- should be ok after deleting the bad row -DELETE FROM part_2; -ALTER TABLE list_parted2 ATTACH PARTITION part_2 FOR VALUES IN (2); --- check partition cannot be attached if default has some row for its values -CREATE TABLE list_parted2_def PARTITION OF list_parted2 DEFAULT; -INSERT INTO list_parted2_def VALUES (11, 'z'); -CREATE TABLE part_3 (LIKE list_parted2); -ALTER TABLE list_parted2 ATTACH PARTITION part_3 FOR VALUES IN (11); -ERROR: updated partition constraint for default partition "list_parted2_def" would be violated by some row --- should be ok after deleting the bad row -DELETE FROM list_parted2_def WHERE a = 11; -ALTER TABLE list_parted2 ATTACH PARTITION part_3 FOR VALUES IN (11); --- adding constraints that describe the desired partition constraint --- (or more restrictive) will help skip the validation scan -CREATE TABLE part_3_4 ( - LIKE list_parted2, - CONSTRAINT check_a CHECK (a IN (3)) -); --- however, if a list partition does not accept nulls, there should be --- an explicit NOT NULL constraint on the partition key column for the --- validation scan to be skipped; -ALTER TABLE list_parted2 ATTACH PARTITION part_3_4 FOR VALUES IN (3, 4); --- adding a NOT NULL constraint will cause the scan to be skipped -ALTER TABLE list_parted2 DETACH PARTITION part_3_4; -ALTER TABLE part_3_4 ALTER a SET NOT NULL; -ALTER TABLE list_parted2 ATTACH PARTITION part_3_4 FOR VALUES IN (3, 4); --- check if default partition scan skipped -ALTER TABLE list_parted2_def ADD CONSTRAINT check_a CHECK (a IN (5, 6)); -CREATE TABLE part_55_66 PARTITION OF list_parted2 FOR VALUES IN (55, 66); --- check validation when attaching range partitions -CREATE TABLE range_parted ( - a int, - b int -) PARTITION BY RANGE (a, b); --- check that violating rows are correctly reported -CREATE TABLE part1 ( - a int NOT NULL CHECK (a = 1), - b int NOT NULL CHECK (b >= 1 AND b <= 10) -); -INSERT INTO part1 VALUES (1, 10); --- Remember the TO bound is exclusive -ALTER TABLE range_parted ATTACH PARTITION part1 FOR VALUES FROM (1, 1) TO (1, 10); -ERROR: partition constraint of relation "part1" is violated by some row --- should be ok after deleting the bad row -DELETE FROM part1; -ALTER TABLE range_parted ATTACH PARTITION part1 FOR VALUES FROM (1, 1) TO (1, 10); --- adding constraints that describe the desired partition constraint --- (or more restrictive) will help skip the validation scan -CREATE TABLE part2 ( - a int NOT NULL CHECK (a = 1), - b int NOT NULL CHECK (b >= 10 AND b < 18) -); -ALTER TABLE range_parted ATTACH PARTITION part2 FOR VALUES FROM (1, 10) TO (1, 20); --- Create default partition -CREATE TABLE partr_def1 PARTITION OF range_parted DEFAULT; --- Only one default partition is allowed, hence, following should give error -CREATE TABLE partr_def2 (LIKE part1 INCLUDING CONSTRAINTS); -ALTER TABLE range_parted ATTACH PARTITION partr_def2 DEFAULT; -ERROR: partition "partr_def2" conflicts with existing default partition "partr_def1" -LINE 1: ...LTER TABLE range_parted ATTACH PARTITION partr_def2 DEFAULT; - ^ --- Overlapping partitions cannot be attached, hence, following should give error -INSERT INTO partr_def1 VALUES (2, 10); -CREATE TABLE part3 (LIKE range_parted); -ALTER TABLE range_parted ATTACH partition part3 FOR VALUES FROM (2, 10) TO (2, 20); -ERROR: updated partition constraint for default partition "partr_def1" would be violated by some row --- Attaching partitions should be successful when there are no overlapping rows -ALTER TABLE range_parted ATTACH partition part3 FOR VALUES FROM (3, 10) TO (3, 20); --- check that leaf partitions are scanned when attaching a partitioned --- table -CREATE TABLE part_5 ( - LIKE list_parted2 -) PARTITION BY LIST (b); --- check that violating rows are correctly reported -CREATE TABLE part_5_a PARTITION OF part_5 FOR VALUES IN ('a'); -INSERT INTO part_5_a (a, b) VALUES (6, 'a'); -ALTER TABLE list_parted2 ATTACH PARTITION part_5 FOR VALUES IN (5); -ERROR: partition constraint of relation "part_5_a" is violated by some row --- delete the faulting row and also add a constraint to skip the scan -DELETE FROM part_5_a WHERE a NOT IN (3); -ALTER TABLE part_5 ADD CONSTRAINT check_a CHECK (a IS NOT NULL AND a = 5); -ALTER TABLE list_parted2 ATTACH PARTITION part_5 FOR VALUES IN (5); -ALTER TABLE list_parted2 DETACH PARTITION part_5; -ALTER TABLE part_5 DROP CONSTRAINT check_a; --- scan should again be skipped, even though NOT NULL is now a column property -ALTER TABLE part_5 ADD CONSTRAINT check_a CHECK (a IN (5)), ALTER a SET NOT NULL; -ALTER TABLE list_parted2 ATTACH PARTITION part_5 FOR VALUES IN (5); --- Check the case where attnos of the partitioning columns in the table being --- attached differs from the parent. It should not affect the constraint- --- checking logic that allows to skip the scan. -CREATE TABLE part_6 ( - c int, - LIKE list_parted2, - CONSTRAINT check_a CHECK (a IS NOT NULL AND a = 6) -); -ALTER TABLE part_6 DROP c; -ALTER TABLE list_parted2 ATTACH PARTITION part_6 FOR VALUES IN (6); --- Similar to above, but the table being attached is a partitioned table --- whose partition has still different attnos for the root partitioning --- columns. -CREATE TABLE part_7 ( - LIKE list_parted2, - CONSTRAINT check_a CHECK (a IS NOT NULL AND a = 7) -) PARTITION BY LIST (b); -CREATE TABLE part_7_a_null ( - c int, - d int, - e int, - LIKE list_parted2, -- 'a' will have attnum = 4 - CONSTRAINT check_b CHECK (b IS NULL OR b = 'a'), - CONSTRAINT check_a CHECK (a IS NOT NULL AND a = 7) -); -ALTER TABLE part_7_a_null DROP c, DROP d, DROP e; -ALTER TABLE part_7 ATTACH PARTITION part_7_a_null FOR VALUES IN ('a', null); -ALTER TABLE list_parted2 ATTACH PARTITION part_7 FOR VALUES IN (7); --- Same example, but check this time that the constraint correctly detects --- violating rows -ALTER TABLE list_parted2 DETACH PARTITION part_7; -ALTER TABLE part_7 DROP CONSTRAINT check_a; -- thusly, scan won't be skipped -INSERT INTO part_7 (a, b) VALUES (8, null), (9, 'a'); -SELECT tableoid::regclass, a, b FROM part_7 order by a; - tableoid | a | b ----------------+---+--- - part_7_a_null | 8 | - part_7_a_null | 9 | a -(2 rows) - -ALTER TABLE list_parted2 ATTACH PARTITION part_7 FOR VALUES IN (7); -ERROR: partition constraint of relation "part_7_a_null" is violated by some row --- check that leaf partitions of default partition are scanned when --- attaching a partitioned table. -ALTER TABLE part_5 DROP CONSTRAINT check_a; -CREATE TABLE part5_def PARTITION OF part_5 DEFAULT PARTITION BY LIST(a); -CREATE TABLE part5_def_p1 PARTITION OF part5_def FOR VALUES IN (5); -INSERT INTO part5_def_p1 VALUES (5, 'y'); -CREATE TABLE part5_p1 (LIKE part_5); -ALTER TABLE part_5 ATTACH PARTITION part5_p1 FOR VALUES IN ('y'); -ERROR: updated partition constraint for default partition "part5_def_p1" would be violated by some row --- should be ok after deleting the bad row -DELETE FROM part5_def_p1 WHERE b = 'y'; -ALTER TABLE part_5 ATTACH PARTITION part5_p1 FOR VALUES IN ('y'); --- check that the table being attached is not already a partition -ALTER TABLE list_parted2 ATTACH PARTITION part_2 FOR VALUES IN (2); -ERROR: "part_2" is already a partition --- check that circular inheritance is not allowed -ALTER TABLE part_5 ATTACH PARTITION list_parted2 FOR VALUES IN ('b'); -ERROR: circular inheritance not allowed -DETAIL: "part_5" is already a child of "list_parted2". -ALTER TABLE list_parted2 ATTACH PARTITION list_parted2 FOR VALUES IN (0); -ERROR: circular inheritance not allowed -DETAIL: "list_parted2" is already a child of "list_parted2". --- If a partitioned table being created or an existing table being attached --- as a partition does not have a constraint that would allow validation scan --- to be skipped, but an individual partition does, then the partition's --- validation scan is skipped. -CREATE TABLE quuux (a int, b text) PARTITION BY LIST (a); -CREATE TABLE quuux_default PARTITION OF quuux DEFAULT PARTITION BY LIST (b); -CREATE TABLE quuux_default1 PARTITION OF quuux_default ( - CONSTRAINT check_1 CHECK (a IS NOT NULL AND a = 1) -) FOR VALUES IN ('b'); -CREATE TABLE quuux1 (a int, b text); -ALTER TABLE quuux ATTACH PARTITION quuux1 FOR VALUES IN (1); -- validate! -CREATE TABLE quuux2 (a int, b text); -ALTER TABLE quuux ATTACH PARTITION quuux2 FOR VALUES IN (2); -- skip validation -DROP TABLE quuux1, quuux2; --- should validate for quuux1, but not for quuux2 -CREATE TABLE quuux1 PARTITION OF quuux FOR VALUES IN (1); -CREATE TABLE quuux2 PARTITION OF quuux FOR VALUES IN (2); -DROP TABLE quuux; --- check validation when attaching hash partitions --- Use hand-rolled hash functions and operator class to get predictable result --- on different machines. part_test_int4_ops is defined in insert.sql. --- check that the new partition won't overlap with an existing partition -CREATE TABLE hash_parted ( - a int, - b int -) PARTITION BY HASH (a part_test_int4_ops); -CREATE TABLE hpart_1 PARTITION OF hash_parted FOR VALUES WITH (MODULUS 4, REMAINDER 0); -CREATE TABLE fail_part (LIKE hpart_1); -ALTER TABLE hash_parted ATTACH PARTITION fail_part FOR VALUES WITH (MODULUS 8, REMAINDER 4); -ERROR: partition "fail_part" would overlap partition "hpart_1" -LINE 1: ...hash_parted ATTACH PARTITION fail_part FOR VALUES WITH (MODU... - ^ -ALTER TABLE hash_parted ATTACH PARTITION fail_part FOR VALUES WITH (MODULUS 8, REMAINDER 0); -ERROR: partition "fail_part" would overlap partition "hpart_1" -LINE 1: ...hash_parted ATTACH PARTITION fail_part FOR VALUES WITH (MODU... - ^ -DROP TABLE fail_part; --- check validation when attaching hash partitions --- check that violating rows are correctly reported -CREATE TABLE hpart_2 (LIKE hash_parted); -INSERT INTO hpart_2 VALUES (3, 0); -ALTER TABLE hash_parted ATTACH PARTITION hpart_2 FOR VALUES WITH (MODULUS 4, REMAINDER 1); -ERROR: partition constraint of relation "hpart_2" is violated by some row --- should be ok after deleting the bad row -DELETE FROM hpart_2; -ALTER TABLE hash_parted ATTACH PARTITION hpart_2 FOR VALUES WITH (MODULUS 4, REMAINDER 1); --- check that leaf partitions are scanned when attaching a partitioned --- table -CREATE TABLE hpart_5 ( - LIKE hash_parted -) PARTITION BY LIST (b); --- check that violating rows are correctly reported -CREATE TABLE hpart_5_a PARTITION OF hpart_5 FOR VALUES IN ('1', '2', '3'); -INSERT INTO hpart_5_a (a, b) VALUES (7, 1); -ALTER TABLE hash_parted ATTACH PARTITION hpart_5 FOR VALUES WITH (MODULUS 4, REMAINDER 2); -ERROR: partition constraint of relation "hpart_5_a" is violated by some row --- should be ok after deleting the bad row -DELETE FROM hpart_5_a; -ALTER TABLE hash_parted ATTACH PARTITION hpart_5 FOR VALUES WITH (MODULUS 4, REMAINDER 2); --- check that the table being attach is with valid modulus and remainder value -CREATE TABLE fail_part(LIKE hash_parted); -ALTER TABLE hash_parted ATTACH PARTITION fail_part FOR VALUES WITH (MODULUS 0, REMAINDER 1); -ERROR: modulus for hash partition must be an integer value greater than zero -ALTER TABLE hash_parted ATTACH PARTITION fail_part FOR VALUES WITH (MODULUS 8, REMAINDER 8); -ERROR: remainder for hash partition must be less than modulus -ALTER TABLE hash_parted ATTACH PARTITION fail_part FOR VALUES WITH (MODULUS 3, REMAINDER 2); -ERROR: every hash partition modulus must be a factor of the next larger modulus -DETAIL: The new modulus 3 is not a factor of 4, the modulus of existing partition "hpart_1". -DROP TABLE fail_part; --- fails with incorrect object type -CREATE VIEW at_v1 AS SELECT 1 as a; -ALTER TABLE at_v1 ATTACH PARTITION dummy default; -ERROR: "at_v1" is not a table or partitioned index -DROP VIEW at_v1; --- --- DETACH PARTITION --- --- check that the table is partitioned at all -CREATE TABLE regular_table (a int); -ALTER TABLE regular_table DETACH PARTITION any_name; -ERROR: table "regular_table" is not partitioned -DROP TABLE regular_table; --- check that the partition being detached exists at all -ALTER TABLE list_parted2 DETACH PARTITION part_4; -ERROR: relation "part_4" does not exist -ALTER TABLE hash_parted DETACH PARTITION hpart_4; -ERROR: relation "hpart_4" does not exist --- check that the partition being detached is actually a partition of the parent -CREATE TABLE not_a_part (a int); -ALTER TABLE list_parted2 DETACH PARTITION not_a_part; -ERROR: relation "not_a_part" is not a partition of relation "list_parted2" -ALTER TABLE list_parted2 DETACH PARTITION part_1; -ERROR: relation "part_1" is not a partition of relation "list_parted2" -ALTER TABLE hash_parted DETACH PARTITION not_a_part; -ERROR: relation "not_a_part" is not a partition of relation "hash_parted" -DROP TABLE not_a_part; --- check that, after being detached, attinhcount/coninhcount is dropped to 0 and --- attislocal/conislocal is set to true -ALTER TABLE list_parted2 DETACH PARTITION part_3_4; -SELECT attinhcount, attislocal FROM pg_attribute WHERE attrelid = 'part_3_4'::regclass AND attnum > 0; - attinhcount | attislocal --------------+------------ - 0 | t - 0 | t -(2 rows) - -SELECT coninhcount, conislocal FROM pg_constraint WHERE conrelid = 'part_3_4'::regclass AND conname = 'check_a'; - coninhcount | conislocal --------------+------------ - 0 | t -(1 row) - -DROP TABLE part_3_4; --- check that a detached partition is not dropped on dropping a partitioned table -CREATE TABLE range_parted2 ( - a int -) PARTITION BY RANGE(a); -CREATE TABLE part_rp PARTITION OF range_parted2 FOR VALUES FROM (0) to (100); -ALTER TABLE range_parted2 DETACH PARTITION part_rp; -DROP TABLE range_parted2; -SELECT * from part_rp; - a ---- -(0 rows) - -DROP TABLE part_rp; --- concurrent detach -CREATE TABLE range_parted2 ( - a int -) PARTITION BY RANGE(a); -CREATE TABLE part_rp PARTITION OF range_parted2 FOR VALUES FROM (0) to (100); -BEGIN; --- doesn't work in a partition block -ALTER TABLE range_parted2 DETACH PARTITION part_rp CONCURRENTLY; -ERROR: ALTER TABLE ... DETACH CONCURRENTLY cannot run inside a transaction block -COMMIT; -CREATE TABLE part_rpd PARTITION OF range_parted2 DEFAULT; --- doesn't work if there's a default partition -ALTER TABLE range_parted2 DETACH PARTITION part_rp CONCURRENTLY; -ERROR: cannot detach partitions concurrently when a default partition exists --- doesn't work for the default partition -ALTER TABLE range_parted2 DETACH PARTITION part_rpd CONCURRENTLY; -ERROR: cannot detach partitions concurrently when a default partition exists -DROP TABLE part_rpd; --- works fine -ALTER TABLE range_parted2 DETACH PARTITION part_rp CONCURRENTLY; -\d+ range_parted2 - Partitioned table "public.range_parted2" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+---------+---------+--------------+------------- - a | integer | | | | plain | | -Partition key: RANGE (a) -Number of partitions: 0 - --- constraint should be created -\d part_rp - Table "public.part_rp" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | -Check constraints: - "part_rp_a_check" CHECK (a IS NOT NULL AND a >= 0 AND a < 100) - -CREATE TABLE part_rp100 PARTITION OF range_parted2 (CHECK (a>=123 AND a<133 AND a IS NOT NULL)) FOR VALUES FROM (100) to (200); -ALTER TABLE range_parted2 DETACH PARTITION part_rp100 CONCURRENTLY; --- redundant constraint should not be created -\d part_rp100 - Table "public.part_rp100" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | | -Check constraints: - "part_rp100_a_check" CHECK (a >= 123 AND a < 133 AND a IS NOT NULL) - -DROP TABLE range_parted2; --- Check ALTER TABLE commands for partitioned tables and partitions --- cannot add/drop column to/from *only* the parent -ALTER TABLE ONLY list_parted2 ADD COLUMN c int; -ERROR: column must be added to child tables too -ALTER TABLE ONLY list_parted2 DROP COLUMN b; -ERROR: cannot drop column from only the partitioned table when partitions exist -HINT: Do not specify the ONLY keyword. --- cannot add a column to partition or drop an inherited one -ALTER TABLE part_2 ADD COLUMN c text; -ERROR: cannot add column to a partition -ALTER TABLE part_2 DROP COLUMN b; -ERROR: cannot drop inherited column "b" --- Nor rename, alter type -ALTER TABLE part_2 RENAME COLUMN b to c; -ERROR: cannot rename inherited column "b" -ALTER TABLE part_2 ALTER COLUMN b TYPE text; -ERROR: cannot alter inherited column "b" --- cannot add/drop NOT NULL or check constraints to *only* the parent, when --- partitions exist -ALTER TABLE ONLY list_parted2 ALTER b SET NOT NULL; -ERROR: constraint must be added to child tables too -DETAIL: Column "b" of relation "part_2" is not already NOT NULL. -HINT: Do not specify the ONLY keyword. -ALTER TABLE ONLY list_parted2 ADD CONSTRAINT check_b CHECK (b <> 'zz'); -ERROR: constraint must be added to child tables too -ALTER TABLE list_parted2 ALTER b SET NOT NULL; -ALTER TABLE ONLY list_parted2 ALTER b DROP NOT NULL; -ERROR: cannot remove constraint from only the partitioned table when partitions exist -HINT: Do not specify the ONLY keyword. -ALTER TABLE list_parted2 ADD CONSTRAINT check_b CHECK (b <> 'zz'); -ALTER TABLE ONLY list_parted2 DROP CONSTRAINT check_b; -ERROR: cannot remove constraint from only the partitioned table when partitions exist -HINT: Do not specify the ONLY keyword. --- It's alright though, if no partitions are yet created -CREATE TABLE parted_no_parts (a int) PARTITION BY LIST (a); -ALTER TABLE ONLY parted_no_parts ALTER a SET NOT NULL; -ALTER TABLE ONLY parted_no_parts ADD CONSTRAINT check_a CHECK (a > 0); -ALTER TABLE ONLY parted_no_parts ALTER a DROP NOT NULL; -ALTER TABLE ONLY parted_no_parts DROP CONSTRAINT check_a; -DROP TABLE parted_no_parts; --- cannot drop inherited NOT NULL or check constraints from partition -ALTER TABLE list_parted2 ALTER b SET NOT NULL, ADD CONSTRAINT check_a2 CHECK (a > 0); -ALTER TABLE part_2 ALTER b DROP NOT NULL; -ERROR: column "b" is marked NOT NULL in parent table -ALTER TABLE part_2 DROP CONSTRAINT check_a2; -ERROR: cannot drop inherited constraint "check_a2" of relation "part_2" --- Doesn't make sense to add NO INHERIT constraints on partitioned tables -ALTER TABLE list_parted2 add constraint check_b2 check (b <> 'zz') NO INHERIT; -ERROR: cannot add NO INHERIT constraint to partitioned table "list_parted2" --- check that a partition cannot participate in regular inheritance -CREATE TABLE inh_test () INHERITS (part_2); -ERROR: cannot inherit from partition "part_2" -CREATE TABLE inh_test (LIKE part_2); -ALTER TABLE inh_test INHERIT part_2; -ERROR: cannot inherit from a partition -ALTER TABLE part_2 INHERIT inh_test; -ERROR: cannot change inheritance of a partition --- cannot drop or alter type of partition key columns of lower level --- partitioned tables; for example, part_5, which is list_parted2's --- partition, is partitioned on b; -ALTER TABLE list_parted2 DROP COLUMN b; -ERROR: cannot drop column "b" because it is part of the partition key of relation "part_5" -ALTER TABLE list_parted2 ALTER COLUMN b TYPE text; -ERROR: cannot alter column "b" because it is part of the partition key of relation "part_5" --- dropping non-partition key columns should be allowed on the parent table. -ALTER TABLE list_parted DROP COLUMN b; -SELECT * FROM list_parted; - a ---- -(0 rows) - --- cleanup -DROP TABLE list_parted, list_parted2, range_parted; -DROP TABLE fail_def_part; -DROP TABLE hash_parted; --- more tests for certain multi-level partitioning scenarios -create table p (a int, b int) partition by range (a, b); -create table p1 (b int, a int not null) partition by range (b); -create table p11 (like p1); -alter table p11 drop a; -alter table p11 add a int; -alter table p11 drop a; -alter table p11 add a int not null; --- attnum for key attribute 'a' is different in p, p1, and p11 -select attrelid::regclass, attname, attnum -from pg_attribute -where attname = 'a' - and (attrelid = 'p'::regclass - or attrelid = 'p1'::regclass - or attrelid = 'p11'::regclass) -order by attrelid::regclass::text; - attrelid | attname | attnum -----------+---------+-------- - p | a | 1 - p1 | a | 2 - p11 | a | 4 -(3 rows) - -alter table p1 attach partition p11 for values from (2) to (5); -insert into p1 (a, b) values (2, 3); --- check that partition validation scan correctly detects violating rows -alter table p attach partition p1 for values from (1, 2) to (1, 10); -ERROR: partition constraint of relation "p11" is violated by some row --- cleanup -drop table p; -drop table p1; --- validate constraint on partitioned tables should only scan leaf partitions -create table parted_validate_test (a int) partition by list (a); -create table parted_validate_test_1 partition of parted_validate_test for values in (0, 1); -alter table parted_validate_test add constraint parted_validate_test_chka check (a > 0) not valid; -alter table parted_validate_test validate constraint parted_validate_test_chka; -drop table parted_validate_test; --- test alter column options -CREATE TABLE attmp(i integer); -INSERT INTO attmp VALUES (1); -ALTER TABLE attmp ALTER COLUMN i SET (n_distinct = 1, n_distinct_inherited = 2); -ALTER TABLE attmp ALTER COLUMN i RESET (n_distinct_inherited); -ANALYZE attmp; -DROP TABLE attmp; -DROP USER regress_alter_table_user1; --- check that violating rows are correctly reported when attaching as the --- default partition -create table defpart_attach_test (a int) partition by list (a); -create table defpart_attach_test1 partition of defpart_attach_test for values in (1); -create table defpart_attach_test_d (b int, a int); -alter table defpart_attach_test_d drop b; -insert into defpart_attach_test_d values (1), (2); --- error because its constraint as the default partition would be violated --- by the row containing 1 -alter table defpart_attach_test attach partition defpart_attach_test_d default; -ERROR: partition constraint of relation "defpart_attach_test_d" is violated by some row -delete from defpart_attach_test_d where a = 1; -alter table defpart_attach_test_d add check (a > 1); --- should be attached successfully and without needing to be scanned -alter table defpart_attach_test attach partition defpart_attach_test_d default; --- check that attaching a partition correctly reports any rows in the default --- partition that should not be there for the new partition to be attached --- successfully -create table defpart_attach_test_2 (like defpart_attach_test_d); -alter table defpart_attach_test attach partition defpart_attach_test_2 for values in (2); -ERROR: updated partition constraint for default partition "defpart_attach_test_d" would be violated by some row -drop table defpart_attach_test; --- check combinations of temporary and permanent relations when attaching --- partitions. -create table perm_part_parent (a int) partition by list (a); -create temp table temp_part_parent (a int) partition by list (a); -create table perm_part_child (a int); -create temp table temp_part_child (a int); -alter table temp_part_parent attach partition perm_part_child default; -- error -ERROR: cannot attach a permanent relation as partition of temporary relation "temp_part_parent" -alter table perm_part_parent attach partition temp_part_child default; -- error -ERROR: cannot attach a temporary relation as partition of permanent relation "perm_part_parent" -alter table temp_part_parent attach partition temp_part_child default; -- ok -drop table perm_part_parent cascade; -drop table temp_part_parent cascade; --- check that attaching partitions to a table while it is being used is --- prevented -create table tab_part_attach (a int) partition by list (a); -create or replace function func_part_attach() returns trigger - language plpgsql as $$ - begin - execute 'create table tab_part_attach_1 (a int)'; - execute 'alter table tab_part_attach attach partition tab_part_attach_1 for values in (1)'; - return null; - end $$; -create trigger trig_part_attach before insert on tab_part_attach - for each statement execute procedure func_part_attach(); -insert into tab_part_attach values (1); -ERROR: cannot ALTER TABLE "tab_part_attach" because it is being used by active queries in this session -CONTEXT: SQL statement "alter table tab_part_attach attach partition tab_part_attach_1 for values in (1)" -PL/pgSQL function func_part_attach() line 4 at EXECUTE -drop table tab_part_attach; -drop function func_part_attach(); --- test case where the partitioning operator is a SQL function whose --- evaluation results in the table's relcache being rebuilt partway through --- the execution of an ATTACH PARTITION command -create function at_test_sql_partop (int4, int4) returns int language sql -as $$ select case when $1 = $2 then 0 when $1 > $2 then 1 else -1 end; $$; -create operator class at_test_sql_partop for type int4 using btree as - operator 1 < (int4, int4), operator 2 <= (int4, int4), - operator 3 = (int4, int4), operator 4 >= (int4, int4), - operator 5 > (int4, int4), function 1 at_test_sql_partop(int4, int4); -create table at_test_sql_partop (a int) partition by range (a at_test_sql_partop); -create table at_test_sql_partop_1 (a int); -alter table at_test_sql_partop attach partition at_test_sql_partop_1 for values from (0) to (10); -drop table at_test_sql_partop; -drop operator class at_test_sql_partop using btree; -drop function at_test_sql_partop; -/* Test case for bug #16242 */ --- We create a parent and child where the child has missing --- non-null attribute values, and arrange to pass them through --- tuple conversion from the child to the parent tupdesc -create table bar1 (a integer, b integer not null default 1) - partition by range (a); -create table bar2 (a integer); -insert into bar2 values (1); -alter table bar2 add column b integer not null default 1; --- (at this point bar2 contains tuple with natts=1) -alter table bar1 attach partition bar2 default; --- this works: -select * from bar1; - a | b ----+--- - 1 | 1 -(1 row) - --- this exercises tuple conversion: -create function xtrig() - returns trigger language plpgsql -as $$ - declare - r record; - begin - for r in select * from old loop - raise info 'a=%, b=%', r.a, r.b; - end loop; - return NULL; - end; -$$; -create trigger xtrig - after update on bar1 - referencing old table as old - for each statement execute procedure xtrig(); -update bar1 set a = a + 1; -INFO: a=1, b=1 -/* End test case for bug #16242 */ -/* Test case for bug #17409 */ -create table attbl (p1 int constraint pk_attbl primary key); -create table atref (c1 int references attbl(p1)); -cluster attbl using pk_attbl; -alter table attbl alter column p1 set data type bigint; -alter table atref alter column c1 set data type bigint; -drop table attbl, atref; -create table attbl (p1 int constraint pk_attbl primary key); -alter table attbl replica identity using index pk_attbl; -create table atref (c1 int references attbl(p1)); -alter table attbl alter column p1 set data type bigint; -alter table atref alter column c1 set data type bigint; -drop table attbl, atref; -/* End test case for bug #17409 */ --- Test that ALTER TABLE rewrite preserves a clustered index --- for normal indexes and indexes on constraints. -create table alttype_cluster (a int); -alter table alttype_cluster add primary key (a); -create index alttype_cluster_ind on alttype_cluster (a); -alter table alttype_cluster cluster on alttype_cluster_ind; --- Normal index remains clustered. -select indexrelid::regclass, indisclustered from pg_index - where indrelid = 'alttype_cluster'::regclass - order by indexrelid::regclass::text; - indexrelid | indisclustered -----------------------+---------------- - alttype_cluster_ind | t - alttype_cluster_pkey | f -(2 rows) - -alter table alttype_cluster alter a type bigint; -select indexrelid::regclass, indisclustered from pg_index - where indrelid = 'alttype_cluster'::regclass - order by indexrelid::regclass::text; - indexrelid | indisclustered -----------------------+---------------- - alttype_cluster_ind | t - alttype_cluster_pkey | f -(2 rows) - --- Constraint index remains clustered. -alter table alttype_cluster cluster on alttype_cluster_pkey; -select indexrelid::regclass, indisclustered from pg_index - where indrelid = 'alttype_cluster'::regclass - order by indexrelid::regclass::text; - indexrelid | indisclustered -----------------------+---------------- - alttype_cluster_ind | f - alttype_cluster_pkey | t -(2 rows) - -alter table alttype_cluster alter a type int; -select indexrelid::regclass, indisclustered from pg_index - where indrelid = 'alttype_cluster'::regclass - order by indexrelid::regclass::text; - indexrelid | indisclustered -----------------------+---------------- - alttype_cluster_ind | f - alttype_cluster_pkey | t -(2 rows) - -drop table alttype_cluster; --- --- Check that attaching or detaching a partitioned partition correctly leads --- to its partitions' constraint being updated to reflect the parent's --- newly added/removed constraint -create table target_parted (a int, b int) partition by list (a); -create table attach_parted (a int, b int) partition by list (b); -create table attach_parted_part1 partition of attach_parted for values in (1); --- insert a row directly into the leaf partition so that its partition --- constraint is built and stored in the relcache -insert into attach_parted_part1 values (1, 1); --- the following better invalidate the partition constraint of the leaf --- partition too... -alter table target_parted attach partition attach_parted for values in (1); --- ...such that the following insert fails -insert into attach_parted_part1 values (2, 1); -ERROR: new row for relation "attach_parted_part1" violates partition constraint -DETAIL: Failing row contains (2, 1). --- ...and doesn't when the partition is detached along with its own partition -alter table target_parted detach partition attach_parted; -insert into attach_parted_part1 values (2, 1); +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/sequence.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/sequence.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/sequence.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/sequence.out 2023-02-20 19:48:42.679218609 -0500 @@ -1,824 +1 @@ --- --- CREATE SEQUENCE --- --- various error cases -CREATE UNLOGGED SEQUENCE sequence_testx; -ERROR: unlogged sequences are not supported -CREATE SEQUENCE sequence_testx INCREMENT BY 0; -ERROR: INCREMENT must not be zero -CREATE SEQUENCE sequence_testx INCREMENT BY -1 MINVALUE 20; -ERROR: MINVALUE (20) must be less than MAXVALUE (-1) -CREATE SEQUENCE sequence_testx INCREMENT BY 1 MAXVALUE -20; -ERROR: MINVALUE (1) must be less than MAXVALUE (-20) -CREATE SEQUENCE sequence_testx INCREMENT BY -1 START 10; -ERROR: START value (10) cannot be greater than MAXVALUE (-1) -CREATE SEQUENCE sequence_testx INCREMENT BY 1 START -10; -ERROR: START value (-10) cannot be less than MINVALUE (1) -CREATE SEQUENCE sequence_testx CACHE 0; -ERROR: CACHE (0) must be greater than zero --- OWNED BY errors -CREATE SEQUENCE sequence_testx OWNED BY nobody; -- nonsense word -ERROR: invalid OWNED BY option -HINT: Specify OWNED BY table.column or OWNED BY NONE. -CREATE SEQUENCE sequence_testx OWNED BY pg_class_oid_index.oid; -- not a table -ERROR: referenced relation "pg_class_oid_index" is not a table or foreign table -CREATE SEQUENCE sequence_testx OWNED BY pg_class.relname; -- not same schema -ERROR: sequence must be in same schema as table it is linked to -CREATE TABLE sequence_test_table (a int); -CREATE SEQUENCE sequence_testx OWNED BY sequence_test_table.b; -- wrong column -ERROR: column "b" of relation "sequence_test_table" does not exist -DROP TABLE sequence_test_table; --- sequence data types -CREATE SEQUENCE sequence_test5 AS integer; -CREATE SEQUENCE sequence_test6 AS smallint; -CREATE SEQUENCE sequence_test7 AS bigint; -CREATE SEQUENCE sequence_test8 AS integer MAXVALUE 100000; -CREATE SEQUENCE sequence_test9 AS integer INCREMENT BY -1; -CREATE SEQUENCE sequence_test10 AS integer MINVALUE -100000 START 1; -CREATE SEQUENCE sequence_test11 AS smallint; -CREATE SEQUENCE sequence_test12 AS smallint INCREMENT -1; -CREATE SEQUENCE sequence_test13 AS smallint MINVALUE -32768; -CREATE SEQUENCE sequence_test14 AS smallint MAXVALUE 32767 INCREMENT -1; -CREATE SEQUENCE sequence_testx AS text; -ERROR: sequence type must be smallint, integer, or bigint -CREATE SEQUENCE sequence_testx AS nosuchtype; -ERROR: type "nosuchtype" does not exist -LINE 1: CREATE SEQUENCE sequence_testx AS nosuchtype; - ^ -CREATE SEQUENCE sequence_testx AS smallint MAXVALUE 100000; -ERROR: MAXVALUE (100000) is out of range for sequence data type smallint -CREATE SEQUENCE sequence_testx AS smallint MINVALUE -100000; -ERROR: MINVALUE (-100000) is out of range for sequence data type smallint -ALTER SEQUENCE sequence_test5 AS smallint; -- success, max will be adjusted -ALTER SEQUENCE sequence_test8 AS smallint; -- fail, max has to be adjusted -ERROR: MAXVALUE (100000) is out of range for sequence data type smallint -ALTER SEQUENCE sequence_test8 AS smallint MAXVALUE 20000; -- ok now -ALTER SEQUENCE sequence_test9 AS smallint; -- success, min will be adjusted -ALTER SEQUENCE sequence_test10 AS smallint; -- fail, min has to be adjusted -ERROR: MINVALUE (-100000) is out of range for sequence data type smallint -ALTER SEQUENCE sequence_test10 AS smallint MINVALUE -20000; -- ok now -ALTER SEQUENCE sequence_test11 AS int; -- max will be adjusted -ALTER SEQUENCE sequence_test12 AS int; -- min will be adjusted -ALTER SEQUENCE sequence_test13 AS int; -- min and max will be adjusted -ALTER SEQUENCE sequence_test14 AS int; -- min and max will be adjusted ---- ---- test creation of SERIAL column ---- -CREATE TABLE serialTest1 (f1 text, f2 serial); -INSERT INTO serialTest1 VALUES ('foo'); -INSERT INTO serialTest1 VALUES ('bar'); -INSERT INTO serialTest1 VALUES ('force', 100); -INSERT INTO serialTest1 VALUES ('wrong', NULL); -ERROR: null value in column "f2" of relation "serialtest1" violates not-null constraint -DETAIL: Failing row contains (wrong, null). -SELECT * FROM serialTest1; - f1 | f2 --------+----- - foo | 1 - bar | 2 - force | 100 -(3 rows) - -SELECT pg_get_serial_sequence('serialTest1', 'f2'); - pg_get_serial_sequence ---------------------------- - public.serialtest1_f2_seq -(1 row) - --- test smallserial / bigserial -CREATE TABLE serialTest2 (f1 text, f2 serial, f3 smallserial, f4 serial2, - f5 bigserial, f6 serial8); -INSERT INTO serialTest2 (f1) - VALUES ('test_defaults'); -INSERT INTO serialTest2 (f1, f2, f3, f4, f5, f6) - VALUES ('test_max_vals', 2147483647, 32767, 32767, 9223372036854775807, - 9223372036854775807), - ('test_min_vals', -2147483648, -32768, -32768, -9223372036854775808, - -9223372036854775808); --- All these INSERTs should fail: -INSERT INTO serialTest2 (f1, f3) - VALUES ('bogus', -32769); -ERROR: smallint out of range -INSERT INTO serialTest2 (f1, f4) - VALUES ('bogus', -32769); -ERROR: smallint out of range -INSERT INTO serialTest2 (f1, f3) - VALUES ('bogus', 32768); -ERROR: smallint out of range -INSERT INTO serialTest2 (f1, f4) - VALUES ('bogus', 32768); -ERROR: smallint out of range -INSERT INTO serialTest2 (f1, f5) - VALUES ('bogus', -9223372036854775809); -ERROR: bigint out of range -INSERT INTO serialTest2 (f1, f6) - VALUES ('bogus', -9223372036854775809); -ERROR: bigint out of range -INSERT INTO serialTest2 (f1, f5) - VALUES ('bogus', 9223372036854775808); -ERROR: bigint out of range -INSERT INTO serialTest2 (f1, f6) - VALUES ('bogus', 9223372036854775808); -ERROR: bigint out of range -SELECT * FROM serialTest2 ORDER BY f2 ASC; - f1 | f2 | f3 | f4 | f5 | f6 ----------------+-------------+--------+--------+----------------------+---------------------- - test_min_vals | -2147483648 | -32768 | -32768 | -9223372036854775808 | -9223372036854775808 - test_defaults | 1 | 1 | 1 | 1 | 1 - test_max_vals | 2147483647 | 32767 | 32767 | 9223372036854775807 | 9223372036854775807 -(3 rows) - -SELECT nextval('serialTest2_f2_seq'); - nextval ---------- - 2 -(1 row) - -SELECT nextval('serialTest2_f3_seq'); - nextval ---------- - 2 -(1 row) - -SELECT nextval('serialTest2_f4_seq'); - nextval ---------- - 2 -(1 row) - -SELECT nextval('serialTest2_f5_seq'); - nextval ---------- - 2 -(1 row) - -SELECT nextval('serialTest2_f6_seq'); - nextval ---------- - 2 -(1 row) - --- basic sequence operations using both text and oid references -CREATE SEQUENCE sequence_test; -CREATE SEQUENCE IF NOT EXISTS sequence_test; -NOTICE: relation "sequence_test" already exists, skipping -SELECT nextval('sequence_test'::text); - nextval ---------- - 1 -(1 row) - -SELECT nextval('sequence_test'::regclass); - nextval ---------- - 2 -(1 row) - -SELECT currval('sequence_test'::text); - currval ---------- - 2 -(1 row) - -SELECT currval('sequence_test'::regclass); - currval ---------- - 2 -(1 row) - -SELECT setval('sequence_test'::text, 32); - setval --------- - 32 -(1 row) - -SELECT nextval('sequence_test'::regclass); - nextval ---------- - 33 -(1 row) - -SELECT setval('sequence_test'::text, 99, false); - setval --------- - 99 -(1 row) - -SELECT nextval('sequence_test'::regclass); - nextval ---------- - 99 -(1 row) - -SELECT setval('sequence_test'::regclass, 32); - setval --------- - 32 -(1 row) - -SELECT nextval('sequence_test'::text); - nextval ---------- - 33 -(1 row) - -SELECT setval('sequence_test'::regclass, 99, false); - setval --------- - 99 -(1 row) - -SELECT nextval('sequence_test'::text); - nextval ---------- - 99 -(1 row) - -DISCARD SEQUENCES; -SELECT currval('sequence_test'::regclass); -ERROR: currval of sequence "sequence_test" is not yet defined in this session -DROP SEQUENCE sequence_test; --- renaming sequences -CREATE SEQUENCE foo_seq; -ALTER TABLE foo_seq RENAME TO foo_seq_new; -SELECT * FROM foo_seq_new; - last_value | log_cnt | is_called -------------+---------+----------- - 1 | 0 | f -(1 row) - -SELECT nextval('foo_seq_new'); - nextval ---------- - 1 -(1 row) - -SELECT nextval('foo_seq_new'); - nextval ---------- - 2 -(1 row) - --- log_cnt can be higher if there is a checkpoint just at the right --- time, so just test for the expected range -SELECT last_value, log_cnt IN (31, 32) AS log_cnt_ok, is_called FROM foo_seq_new; - last_value | log_cnt_ok | is_called -------------+------------+----------- - 2 | t | t -(1 row) - -DROP SEQUENCE foo_seq_new; --- renaming serial sequences -ALTER TABLE serialtest1_f2_seq RENAME TO serialtest1_f2_foo; -INSERT INTO serialTest1 VALUES ('more'); -SELECT * FROM serialTest1; - f1 | f2 --------+----- - foo | 1 - bar | 2 - force | 100 - more | 3 -(4 rows) - --- --- Check dependencies of serial and ordinary sequences --- -CREATE TEMP SEQUENCE myseq2; -CREATE TEMP SEQUENCE myseq3; -CREATE TEMP TABLE t1 ( - f1 serial, - f2 int DEFAULT nextval('myseq2'), - f3 int DEFAULT nextval('myseq3'::text) -); --- Both drops should fail, but with different error messages: -DROP SEQUENCE t1_f1_seq; -ERROR: cannot drop sequence t1_f1_seq because other objects depend on it -DETAIL: default value for column f1 of table t1 depends on sequence t1_f1_seq -HINT: Use DROP ... CASCADE to drop the dependent objects too. -DROP SEQUENCE myseq2; -ERROR: cannot drop sequence myseq2 because other objects depend on it -DETAIL: default value for column f2 of table t1 depends on sequence myseq2 -HINT: Use DROP ... CASCADE to drop the dependent objects too. --- This however will work: -DROP SEQUENCE myseq3; -DROP TABLE t1; --- Fails because no longer existent: -DROP SEQUENCE t1_f1_seq; -ERROR: sequence "t1_f1_seq" does not exist --- Now OK: -DROP SEQUENCE myseq2; --- --- Alter sequence --- -ALTER SEQUENCE IF EXISTS sequence_test2 RESTART WITH 24 - INCREMENT BY 4 MAXVALUE 36 MINVALUE 5 CYCLE; -NOTICE: relation "sequence_test2" does not exist, skipping -ALTER SEQUENCE serialTest1 CYCLE; -- error, not a sequence -ERROR: "serialtest1" is not a sequence -CREATE SEQUENCE sequence_test2 START WITH 32; -CREATE SEQUENCE sequence_test4 INCREMENT BY -1; -SELECT nextval('sequence_test2'); - nextval ---------- - 32 -(1 row) - -SELECT nextval('sequence_test4'); - nextval ---------- - -1 -(1 row) - -ALTER SEQUENCE sequence_test2 RESTART; -SELECT nextval('sequence_test2'); - nextval ---------- - 32 -(1 row) - -ALTER SEQUENCE sequence_test2 RESTART WITH 0; -- error -ERROR: RESTART value (0) cannot be less than MINVALUE (1) -ALTER SEQUENCE sequence_test4 RESTART WITH 40; -- error -ERROR: RESTART value (40) cannot be greater than MAXVALUE (-1) --- test CYCLE and NO CYCLE -ALTER SEQUENCE sequence_test2 RESTART WITH 24 - INCREMENT BY 4 MAXVALUE 36 MINVALUE 5 CYCLE; -SELECT nextval('sequence_test2'); - nextval ---------- - 24 -(1 row) - -SELECT nextval('sequence_test2'); - nextval ---------- - 28 -(1 row) - -SELECT nextval('sequence_test2'); - nextval ---------- - 32 -(1 row) - -SELECT nextval('sequence_test2'); - nextval ---------- - 36 -(1 row) - -SELECT nextval('sequence_test2'); -- cycled - nextval ---------- - 5 -(1 row) - -ALTER SEQUENCE sequence_test2 RESTART WITH 24 - NO CYCLE; -SELECT nextval('sequence_test2'); - nextval ---------- - 24 -(1 row) - -SELECT nextval('sequence_test2'); - nextval ---------- - 28 -(1 row) - -SELECT nextval('sequence_test2'); - nextval ---------- - 32 -(1 row) - -SELECT nextval('sequence_test2'); - nextval ---------- - 36 -(1 row) - -SELECT nextval('sequence_test2'); -- error -ERROR: nextval: reached maximum value of sequence "sequence_test2" (36) -ALTER SEQUENCE sequence_test2 RESTART WITH -24 START WITH -24 - INCREMENT BY -4 MINVALUE -36 MAXVALUE -5 CYCLE; -SELECT nextval('sequence_test2'); - nextval ---------- - -24 -(1 row) - -SELECT nextval('sequence_test2'); - nextval ---------- - -28 -(1 row) - -SELECT nextval('sequence_test2'); - nextval ---------- - -32 -(1 row) - -SELECT nextval('sequence_test2'); - nextval ---------- - -36 -(1 row) - -SELECT nextval('sequence_test2'); -- cycled - nextval ---------- - -5 -(1 row) - -ALTER SEQUENCE sequence_test2 RESTART WITH -24 - NO CYCLE; -SELECT nextval('sequence_test2'); - nextval ---------- - -24 -(1 row) - -SELECT nextval('sequence_test2'); - nextval ---------- - -28 -(1 row) - -SELECT nextval('sequence_test2'); - nextval ---------- - -32 -(1 row) - -SELECT nextval('sequence_test2'); - nextval ---------- - -36 -(1 row) - -SELECT nextval('sequence_test2'); -- error -ERROR: nextval: reached minimum value of sequence "sequence_test2" (-36) --- reset -ALTER SEQUENCE IF EXISTS sequence_test2 RESTART WITH 32 START WITH 32 - INCREMENT BY 4 MAXVALUE 36 MINVALUE 5 CYCLE; -SELECT setval('sequence_test2', -100); -- error -ERROR: setval: value -100 is out of bounds for sequence "sequence_test2" (5..36) -SELECT setval('sequence_test2', 100); -- error -ERROR: setval: value 100 is out of bounds for sequence "sequence_test2" (5..36) -SELECT setval('sequence_test2', 5); - setval --------- - 5 -(1 row) - -CREATE SEQUENCE sequence_test3; -- not read from, to test is_called --- Information schema -SELECT * FROM information_schema.sequences - WHERE sequence_name ~ ANY(ARRAY['sequence_test', 'serialtest']) - ORDER BY sequence_name ASC; - sequence_catalog | sequence_schema | sequence_name | data_type | numeric_precision | numeric_precision_radix | numeric_scale | start_value | minimum_value | maximum_value | increment | cycle_option -------------------+-----------------+--------------------+-----------+-------------------+-------------------------+---------------+-------------+----------------------+---------------------+-----------+-------------- - regression | public | sequence_test10 | smallint | 16 | 2 | 0 | 1 | -20000 | 32767 | 1 | NO - regression | public | sequence_test11 | integer | 32 | 2 | 0 | 1 | 1 | 2147483647 | 1 | NO - regression | public | sequence_test12 | integer | 32 | 2 | 0 | -1 | -2147483648 | -1 | -1 | NO - regression | public | sequence_test13 | integer | 32 | 2 | 0 | -32768 | -2147483648 | 2147483647 | 1 | NO - regression | public | sequence_test14 | integer | 32 | 2 | 0 | 32767 | -2147483648 | 2147483647 | -1 | NO - regression | public | sequence_test2 | bigint | 64 | 2 | 0 | 32 | 5 | 36 | 4 | YES - regression | public | sequence_test3 | bigint | 64 | 2 | 0 | 1 | 1 | 9223372036854775807 | 1 | NO - regression | public | sequence_test4 | bigint | 64 | 2 | 0 | -1 | -9223372036854775808 | -1 | -1 | NO - regression | public | sequence_test5 | smallint | 16 | 2 | 0 | 1 | 1 | 32767 | 1 | NO - regression | public | sequence_test6 | smallint | 16 | 2 | 0 | 1 | 1 | 32767 | 1 | NO - regression | public | sequence_test7 | bigint | 64 | 2 | 0 | 1 | 1 | 9223372036854775807 | 1 | NO - regression | public | sequence_test8 | smallint | 16 | 2 | 0 | 1 | 1 | 20000 | 1 | NO - regression | public | sequence_test9 | smallint | 16 | 2 | 0 | -1 | -32768 | -1 | -1 | NO - regression | public | serialtest1_f2_foo | integer | 32 | 2 | 0 | 1 | 1 | 2147483647 | 1 | NO - regression | public | serialtest2_f2_seq | integer | 32 | 2 | 0 | 1 | 1 | 2147483647 | 1 | NO - regression | public | serialtest2_f3_seq | smallint | 16 | 2 | 0 | 1 | 1 | 32767 | 1 | NO - regression | public | serialtest2_f4_seq | smallint | 16 | 2 | 0 | 1 | 1 | 32767 | 1 | NO - regression | public | serialtest2_f5_seq | bigint | 64 | 2 | 0 | 1 | 1 | 9223372036854775807 | 1 | NO - regression | public | serialtest2_f6_seq | bigint | 64 | 2 | 0 | 1 | 1 | 9223372036854775807 | 1 | NO -(19 rows) - -SELECT schemaname, sequencename, start_value, min_value, max_value, increment_by, cycle, cache_size, last_value -FROM pg_sequences -WHERE sequencename ~ ANY(ARRAY['sequence_test', 'serialtest']) - ORDER BY sequencename ASC; - schemaname | sequencename | start_value | min_value | max_value | increment_by | cycle | cache_size | last_value -------------+--------------------+-------------+----------------------+---------------------+--------------+-------+------------+------------ - public | sequence_test10 | 1 | -20000 | 32767 | 1 | f | 1 | - public | sequence_test11 | 1 | 1 | 2147483647 | 1 | f | 1 | - public | sequence_test12 | -1 | -2147483648 | -1 | -1 | f | 1 | - public | sequence_test13 | -32768 | -2147483648 | 2147483647 | 1 | f | 1 | - public | sequence_test14 | 32767 | -2147483648 | 2147483647 | -1 | f | 1 | - public | sequence_test2 | 32 | 5 | 36 | 4 | t | 1 | 5 - public | sequence_test3 | 1 | 1 | 9223372036854775807 | 1 | f | 1 | - public | sequence_test4 | -1 | -9223372036854775808 | -1 | -1 | f | 1 | -1 - public | sequence_test5 | 1 | 1 | 32767 | 1 | f | 1 | - public | sequence_test6 | 1 | 1 | 32767 | 1 | f | 1 | - public | sequence_test7 | 1 | 1 | 9223372036854775807 | 1 | f | 1 | - public | sequence_test8 | 1 | 1 | 20000 | 1 | f | 1 | - public | sequence_test9 | -1 | -32768 | -1 | -1 | f | 1 | - public | serialtest1_f2_foo | 1 | 1 | 2147483647 | 1 | f | 1 | 3 - public | serialtest2_f2_seq | 1 | 1 | 2147483647 | 1 | f | 1 | 2 - public | serialtest2_f3_seq | 1 | 1 | 32767 | 1 | f | 1 | 2 - public | serialtest2_f4_seq | 1 | 1 | 32767 | 1 | f | 1 | 2 - public | serialtest2_f5_seq | 1 | 1 | 9223372036854775807 | 1 | f | 1 | 2 - public | serialtest2_f6_seq | 1 | 1 | 9223372036854775807 | 1 | f | 1 | 2 -(19 rows) - -SELECT * FROM pg_sequence_parameters('sequence_test4'::regclass); - start_value | minimum_value | maximum_value | increment | cycle_option | cache_size | data_type --------------+----------------------+---------------+-----------+--------------+------------+----------- - -1 | -9223372036854775808 | -1 | -1 | f | 1 | 20 -(1 row) - -\d sequence_test4 - Sequence "public.sequence_test4" - Type | Start | Minimum | Maximum | Increment | Cycles? | Cache ---------+-------+----------------------+---------+-----------+---------+------- - bigint | -1 | -9223372036854775808 | -1 | -1 | no | 1 - -\d serialtest2_f2_seq - Sequence "public.serialtest2_f2_seq" - Type | Start | Minimum | Maximum | Increment | Cycles? | Cache ----------+-------+---------+------------+-----------+---------+------- - integer | 1 | 1 | 2147483647 | 1 | no | 1 -Owned by: public.serialtest2.f2 - --- Test comments -COMMENT ON SEQUENCE asdf IS 'won''t work'; -ERROR: relation "asdf" does not exist -COMMENT ON SEQUENCE sequence_test2 IS 'will work'; -COMMENT ON SEQUENCE sequence_test2 IS NULL; --- Test lastval() -CREATE SEQUENCE seq; -SELECT nextval('seq'); - nextval ---------- - 1 -(1 row) - -SELECT lastval(); - lastval ---------- - 1 -(1 row) - -SELECT setval('seq', 99); - setval --------- - 99 -(1 row) - -SELECT lastval(); - lastval ---------- - 99 -(1 row) - -DISCARD SEQUENCES; -SELECT lastval(); -ERROR: lastval is not yet defined in this session -CREATE SEQUENCE seq2; -SELECT nextval('seq2'); - nextval ---------- - 1 -(1 row) - -SELECT lastval(); - lastval ---------- - 1 -(1 row) - -DROP SEQUENCE seq2; --- should fail -SELECT lastval(); -ERROR: lastval is not yet defined in this session --- Test sequences in read-only transactions -CREATE TEMPORARY SEQUENCE sequence_test_temp1; -START TRANSACTION READ ONLY; -SELECT nextval('sequence_test_temp1'); -- ok - nextval ---------- - 1 -(1 row) - -SELECT nextval('sequence_test2'); -- error -ERROR: cannot execute nextval() in a read-only transaction -ROLLBACK; -START TRANSACTION READ ONLY; -SELECT setval('sequence_test_temp1', 1); -- ok - setval --------- - 1 -(1 row) - -SELECT setval('sequence_test2', 1); -- error -ERROR: cannot execute setval() in a read-only transaction -ROLLBACK; --- privileges tests -CREATE USER regress_seq_user; --- nextval -BEGIN; -SET LOCAL SESSION AUTHORIZATION regress_seq_user; -CREATE SEQUENCE seq3; -REVOKE ALL ON seq3 FROM regress_seq_user; -GRANT SELECT ON seq3 TO regress_seq_user; -SELECT nextval('seq3'); -ERROR: permission denied for sequence seq3 -ROLLBACK; -BEGIN; -SET LOCAL SESSION AUTHORIZATION regress_seq_user; -CREATE SEQUENCE seq3; -REVOKE ALL ON seq3 FROM regress_seq_user; -GRANT UPDATE ON seq3 TO regress_seq_user; -SELECT nextval('seq3'); - nextval ---------- - 1 -(1 row) - -ROLLBACK; -BEGIN; -SET LOCAL SESSION AUTHORIZATION regress_seq_user; -CREATE SEQUENCE seq3; -REVOKE ALL ON seq3 FROM regress_seq_user; -GRANT USAGE ON seq3 TO regress_seq_user; -SELECT nextval('seq3'); - nextval ---------- - 1 -(1 row) - -ROLLBACK; --- currval -BEGIN; -SET LOCAL SESSION AUTHORIZATION regress_seq_user; -CREATE SEQUENCE seq3; -SELECT nextval('seq3'); - nextval ---------- - 1 -(1 row) - -REVOKE ALL ON seq3 FROM regress_seq_user; -GRANT SELECT ON seq3 TO regress_seq_user; -SELECT currval('seq3'); - currval ---------- - 1 -(1 row) - -ROLLBACK; -BEGIN; -SET LOCAL SESSION AUTHORIZATION regress_seq_user; -CREATE SEQUENCE seq3; -SELECT nextval('seq3'); - nextval ---------- - 1 -(1 row) - -REVOKE ALL ON seq3 FROM regress_seq_user; -GRANT UPDATE ON seq3 TO regress_seq_user; -SELECT currval('seq3'); -ERROR: permission denied for sequence seq3 -ROLLBACK; -BEGIN; -SET LOCAL SESSION AUTHORIZATION regress_seq_user; -CREATE SEQUENCE seq3; -SELECT nextval('seq3'); - nextval ---------- - 1 -(1 row) - -REVOKE ALL ON seq3 FROM regress_seq_user; -GRANT USAGE ON seq3 TO regress_seq_user; -SELECT currval('seq3'); - currval ---------- - 1 -(1 row) - -ROLLBACK; --- lastval -BEGIN; -SET LOCAL SESSION AUTHORIZATION regress_seq_user; -CREATE SEQUENCE seq3; -SELECT nextval('seq3'); - nextval ---------- - 1 -(1 row) - -REVOKE ALL ON seq3 FROM regress_seq_user; -GRANT SELECT ON seq3 TO regress_seq_user; -SELECT lastval(); - lastval ---------- - 1 -(1 row) - -ROLLBACK; -BEGIN; -SET LOCAL SESSION AUTHORIZATION regress_seq_user; -CREATE SEQUENCE seq3; -SELECT nextval('seq3'); - nextval ---------- - 1 -(1 row) - -REVOKE ALL ON seq3 FROM regress_seq_user; -GRANT UPDATE ON seq3 TO regress_seq_user; -SELECT lastval(); -ERROR: permission denied for sequence seq3 -ROLLBACK; -BEGIN; -SET LOCAL SESSION AUTHORIZATION regress_seq_user; -CREATE SEQUENCE seq3; -SELECT nextval('seq3'); - nextval ---------- - 1 -(1 row) - -REVOKE ALL ON seq3 FROM regress_seq_user; -GRANT USAGE ON seq3 TO regress_seq_user; -SELECT lastval(); - lastval ---------- - 1 -(1 row) - -ROLLBACK; --- setval -BEGIN; -SET LOCAL SESSION AUTHORIZATION regress_seq_user; -CREATE SEQUENCE seq3; -REVOKE ALL ON seq3 FROM regress_seq_user; -SAVEPOINT save; -SELECT setval('seq3', 5); -ERROR: permission denied for sequence seq3 -ROLLBACK TO save; -GRANT UPDATE ON seq3 TO regress_seq_user; -SELECT setval('seq3', 5); - setval --------- - 5 -(1 row) - -SELECT nextval('seq3'); - nextval ---------- - 6 -(1 row) - -ROLLBACK; --- ALTER SEQUENCE -BEGIN; -SET LOCAL SESSION AUTHORIZATION regress_seq_user; -ALTER SEQUENCE sequence_test2 START WITH 1; -ERROR: must be owner of sequence sequence_test2 -ROLLBACK; --- Sequences should get wiped out as well: -DROP TABLE serialTest1, serialTest2; --- Make sure sequences are gone: -SELECT * FROM information_schema.sequences WHERE sequence_name IN - ('sequence_test2', 'serialtest2_f2_seq', 'serialtest2_f3_seq', - 'serialtest2_f4_seq', 'serialtest2_f5_seq', 'serialtest2_f6_seq') - ORDER BY sequence_name ASC; - sequence_catalog | sequence_schema | sequence_name | data_type | numeric_precision | numeric_precision_radix | numeric_scale | start_value | minimum_value | maximum_value | increment | cycle_option -------------------+-----------------+----------------+-----------+-------------------+-------------------------+---------------+-------------+---------------+---------------+-----------+-------------- - regression | public | sequence_test2 | bigint | 64 | 2 | 0 | 32 | 5 | 36 | 4 | YES -(1 row) - -DROP USER regress_seq_user; -DROP SEQUENCE seq; --- cache tests -CREATE SEQUENCE test_seq1 CACHE 10; -SELECT nextval('test_seq1'); - nextval ---------- - 1 -(1 row) - -SELECT nextval('test_seq1'); - nextval ---------- - 2 -(1 row) - -SELECT nextval('test_seq1'); - nextval ---------- - 3 -(1 row) - -DROP SEQUENCE test_seq1; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/polymorphism.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/polymorphism.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/polymorphism.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/polymorphism.out 2023-02-20 19:48:42.679218609 -0500 @@ -1,2098 +1 @@ --- --- Tests for polymorphic SQL functions and aggregates based on them. --- Tests for other features related to function-calling have snuck in, too. --- -create function polyf(x anyelement) returns anyelement as $$ - select x + 1 -$$ language sql; -select polyf(42) as int, polyf(4.5) as num; - int | num ------+----- - 43 | 5.5 -(1 row) - -select polyf(point(3,4)); -- fail for lack of + operator -ERROR: operator does not exist: point + integer -LINE 2: select x + 1 - ^ -HINT: No operator matches the given name and argument types. You might need to add explicit type casts. -QUERY: - select x + 1 - -CONTEXT: SQL function "polyf" during inlining -drop function polyf(x anyelement); -create function polyf(x anyelement) returns anyarray as $$ - select array[x + 1, x + 2] -$$ language sql; -select polyf(42) as int, polyf(4.5) as num; - int | num ----------+----------- - {43,44} | {5.5,6.5} -(1 row) - -drop function polyf(x anyelement); -create function polyf(x anyarray) returns anyelement as $$ - select x[1] -$$ language sql; -select polyf(array[2,4]) as int, polyf(array[4.5, 7.7]) as num; - int | num ------+----- - 2 | 4.5 -(1 row) - -select polyf(stavalues1) from pg_statistic; -- fail, can't infer element type -ERROR: cannot determine element type of "anyarray" argument -drop function polyf(x anyarray); -create function polyf(x anyarray) returns anyarray as $$ - select x -$$ language sql; -select polyf(array[2,4]) as int, polyf(array[4.5, 7.7]) as num; - int | num --------+----------- - {2,4} | {4.5,7.7} -(1 row) - -select polyf(stavalues1) from pg_statistic; -- fail, can't infer element type -ERROR: return type anyarray is not supported for SQL functions -CONTEXT: SQL function "polyf" during inlining -drop function polyf(x anyarray); --- fail, can't infer type: -create function polyf(x anyelement) returns anyrange as $$ - select array[x + 1, x + 2] -$$ language sql; -ERROR: cannot determine result data type -DETAIL: A result of type anyrange requires at least one input of type anyrange or anymultirange. -create function polyf(x anyrange) returns anyarray as $$ - select array[lower(x), upper(x)] -$$ language sql; -select polyf(int4range(42, 49)) as int, polyf(float8range(4.5, 7.8)) as num; - int | num ----------+----------- - {42,49} | {4.5,7.8} -(1 row) - -drop function polyf(x anyrange); -create function polyf(x anycompatible, y anycompatible) returns anycompatiblearray as $$ - select array[x, y] -$$ language sql; -select polyf(2, 4) as int, polyf(2, 4.5) as num; - int | num --------+--------- - {2,4} | {2,4.5} -(1 row) - -drop function polyf(x anycompatible, y anycompatible); -create function polyf(x anycompatiblerange, y anycompatible, z anycompatible) returns anycompatiblearray as $$ - select array[lower(x), upper(x), y, z] -$$ language sql; -select polyf(int4range(42, 49), 11, 2::smallint) as int, polyf(float8range(4.5, 7.8), 7.8, 11::real) as num; - int | num ---------------+------------------ - {42,49,11,2} | {4.5,7.8,7.8,11} -(1 row) - -select polyf(int4range(42, 49), 11, 4.5) as fail; -- range type doesn't fit -ERROR: function polyf(int4range, integer, numeric) does not exist -LINE 1: select polyf(int4range(42, 49), 11, 4.5) as fail; - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. -drop function polyf(x anycompatiblerange, y anycompatible, z anycompatible); -create function polyf(x anycompatiblemultirange, y anycompatible, z anycompatible) returns anycompatiblearray as $$ - select array[lower(x), upper(x), y, z] -$$ language sql; -select polyf(multirange(int4range(42, 49)), 11, 2::smallint) as int, polyf(multirange(float8range(4.5, 7.8)), 7.8, 11::real) as num; - int | num ---------------+------------------ - {42,49,11,2} | {4.5,7.8,7.8,11} -(1 row) - -select polyf(multirange(int4range(42, 49)), 11, 4.5) as fail; -- range type doesn't fit -ERROR: function polyf(int4multirange, integer, numeric) does not exist -LINE 1: select polyf(multirange(int4range(42, 49)), 11, 4.5) as fail... - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. -drop function polyf(x anycompatiblemultirange, y anycompatible, z anycompatible); --- fail, can't infer type: -create function polyf(x anycompatible) returns anycompatiblerange as $$ - select array[x + 1, x + 2] -$$ language sql; -ERROR: cannot determine result data type -DETAIL: A result of type anycompatiblerange requires at least one input of type anycompatiblerange or anycompatiblemultirange. -create function polyf(x anycompatiblerange, y anycompatiblearray) returns anycompatiblerange as $$ - select x -$$ language sql; -select polyf(int4range(42, 49), array[11]) as int, polyf(float8range(4.5, 7.8), array[7]) as num; - int | num ----------+----------- - [42,49) | [4.5,7.8) -(1 row) - -drop function polyf(x anycompatiblerange, y anycompatiblearray); --- fail, can't infer type: -create function polyf(x anycompatible) returns anycompatiblemultirange as $$ - select array[x + 1, x + 2] -$$ language sql; -ERROR: cannot determine result data type -DETAIL: A result of type anycompatiblemultirange requires at least one input of type anycompatiblerange or anycompatiblemultirange. -create function polyf(x anycompatiblemultirange, y anycompatiblearray) returns anycompatiblemultirange as $$ - select x -$$ language sql; -select polyf(multirange(int4range(42, 49)), array[11]) as int, polyf(multirange(float8range(4.5, 7.8)), array[7]) as num; - int | num ------------+------------- - {[42,49)} | {[4.5,7.8)} -(1 row) - -drop function polyf(x anycompatiblemultirange, y anycompatiblearray); -create function polyf(a anyelement, b anyarray, - c anycompatible, d anycompatible, - OUT x anyarray, OUT y anycompatiblearray) -as $$ - select a || b, array[c, d] -$$ language sql; -select x, pg_typeof(x), y, pg_typeof(y) - from polyf(11, array[1, 2], 42, 34.5); - x | pg_typeof | y | pg_typeof -----------+-----------+-----------+----------- - {11,1,2} | integer[] | {42,34.5} | numeric[] -(1 row) - -select x, pg_typeof(x), y, pg_typeof(y) - from polyf(11, array[1, 2], point(1,2), point(3,4)); - x | pg_typeof | y | pg_typeof -----------+-----------+-------------------+----------- - {11,1,2} | integer[] | {"(1,2)","(3,4)"} | point[] -(1 row) - -select x, pg_typeof(x), y, pg_typeof(y) - from polyf(11, '{1,2}', point(1,2), '(3,4)'); - x | pg_typeof | y | pg_typeof -----------+-----------+-------------------+----------- - {11,1,2} | integer[] | {"(1,2)","(3,4)"} | point[] -(1 row) - -select x, pg_typeof(x), y, pg_typeof(y) - from polyf(11, array[1, 2.2], 42, 34.5); -- fail -ERROR: function polyf(integer, numeric[], integer, numeric) does not exist -LINE 2: from polyf(11, array[1, 2.2], 42, 34.5); - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. -drop function polyf(a anyelement, b anyarray, - c anycompatible, d anycompatible); -create function polyf(anyrange) returns anymultirange -as 'select multirange($1);' language sql; -select polyf(int4range(1,10)); - polyf ----------- - {[1,10)} -(1 row) - -select polyf(null); -ERROR: could not determine polymorphic type because input has type unknown -drop function polyf(anyrange); -create function polyf(anymultirange) returns anyelement -as 'select lower($1);' language sql; -select polyf(int4multirange(int4range(1,10), int4range(20,30))); - polyf -------- - 1 -(1 row) - -select polyf(null); -ERROR: could not determine polymorphic type because input has type unknown -drop function polyf(anymultirange); -create function polyf(anycompatiblerange) returns anycompatiblemultirange -as 'select multirange($1);' language sql; -select polyf(int4range(1,10)); - polyf ----------- - {[1,10)} -(1 row) - -select polyf(null); -ERROR: could not determine polymorphic type anycompatiblerange because input has type unknown -drop function polyf(anycompatiblerange); -create function polyf(anymultirange) returns anyrange -as 'select range_merge($1);' language sql; -select polyf(int4multirange(int4range(1,10), int4range(20,30))); - polyf --------- - [1,30) -(1 row) - -select polyf(null); -ERROR: could not determine polymorphic type because input has type unknown -drop function polyf(anymultirange); -create function polyf(anycompatiblemultirange) returns anycompatiblerange -as 'select range_merge($1);' language sql; -select polyf(int4multirange(int4range(1,10), int4range(20,30))); - polyf --------- - [1,30) -(1 row) - -select polyf(null); -ERROR: could not determine polymorphic type anycompatiblerange because input has type unknown -drop function polyf(anycompatiblemultirange); -create function polyf(anycompatiblemultirange) returns anycompatible -as 'select lower($1);' language sql; -select polyf(int4multirange(int4range(1,10), int4range(20,30))); - polyf -------- - 1 -(1 row) - -select polyf(null); -ERROR: could not determine polymorphic type anycompatiblemultirange because input has type unknown -drop function polyf(anycompatiblemultirange); --- --- Polymorphic aggregate tests --- --- Legend: ------------ --- A = type is ANY --- P = type is polymorphic --- N = type is non-polymorphic --- B = aggregate base type --- S = aggregate state type --- R = aggregate return type --- 1 = arg1 of a function --- 2 = arg2 of a function --- ag = aggregate --- tf = trans (state) function --- ff = final function --- rt = return type of a function --- -> = implies --- => = allowed --- !> = not allowed --- E = exists --- NE = not-exists --- --- Possible states: --- ---------------- --- B = (A || P || N) --- when (B = A) -> (tf2 = NE) --- S = (P || N) --- ff = (E || NE) --- tf1 = (P || N) --- tf2 = (NE || P || N) --- R = (P || N) --- create functions for use as tf and ff with the needed combinations of --- argument polymorphism, but within the constraints of valid aggregate --- functions, i.e. tf arg1 and tf return type must match --- polymorphic single arg transfn -CREATE FUNCTION stfp(anyarray) RETURNS anyarray AS -'select $1' LANGUAGE SQL; --- non-polymorphic single arg transfn -CREATE FUNCTION stfnp(int[]) RETURNS int[] AS -'select $1' LANGUAGE SQL; --- dual polymorphic transfn -CREATE FUNCTION tfp(anyarray,anyelement) RETURNS anyarray AS -'select $1 || $2' LANGUAGE SQL; --- dual non-polymorphic transfn -CREATE FUNCTION tfnp(int[],int) RETURNS int[] AS -'select $1 || $2' LANGUAGE SQL; --- arg1 only polymorphic transfn -CREATE FUNCTION tf1p(anyarray,int) RETURNS anyarray AS -'select $1' LANGUAGE SQL; --- arg2 only polymorphic transfn -CREATE FUNCTION tf2p(int[],anyelement) RETURNS int[] AS -'select $1' LANGUAGE SQL; --- multi-arg polymorphic -CREATE FUNCTION sum3(anyelement,anyelement,anyelement) returns anyelement AS -'select $1+$2+$3' language sql strict; --- finalfn polymorphic -CREATE FUNCTION ffp(anyarray) RETURNS anyarray AS -'select $1' LANGUAGE SQL; --- finalfn non-polymorphic -CREATE FUNCTION ffnp(int[]) returns int[] as -'select $1' LANGUAGE SQL; --- Try to cover all the possible states: --- --- Note: in Cases 1 & 2, we are trying to return P. Therefore, if the transfn --- is stfnp, tfnp, or tf2p, we must use ffp as finalfn, because stfnp, tfnp, --- and tf2p do not return P. Conversely, in Cases 3 & 4, we are trying to --- return N. Therefore, if the transfn is stfp, tfp, or tf1p, we must use ffnp --- as finalfn, because stfp, tfp, and tf1p do not return N. --- --- Case1 (R = P) && (B = A) --- ------------------------ --- S tf1 --- ------- --- N N --- should CREATE -CREATE AGGREGATE myaggp01a(*) (SFUNC = stfnp, STYPE = int4[], - FINALFUNC = ffp, INITCOND = '{}'); --- P N --- should ERROR: stfnp(anyarray) not matched by stfnp(int[]) -CREATE AGGREGATE myaggp02a(*) (SFUNC = stfnp, STYPE = anyarray, - FINALFUNC = ffp, INITCOND = '{}'); -ERROR: cannot determine transition data type -DETAIL: A result of type anyarray requires at least one input of type anyelement, anyarray, anynonarray, anyenum, anyrange, or anymultirange. --- N P --- should CREATE -CREATE AGGREGATE myaggp03a(*) (SFUNC = stfp, STYPE = int4[], - FINALFUNC = ffp, INITCOND = '{}'); -CREATE AGGREGATE myaggp03b(*) (SFUNC = stfp, STYPE = int4[], - INITCOND = '{}'); --- P P --- should ERROR: we have no way to resolve S -CREATE AGGREGATE myaggp04a(*) (SFUNC = stfp, STYPE = anyarray, - FINALFUNC = ffp, INITCOND = '{}'); -ERROR: cannot determine transition data type -DETAIL: A result of type anyarray requires at least one input of type anyelement, anyarray, anynonarray, anyenum, anyrange, or anymultirange. -CREATE AGGREGATE myaggp04b(*) (SFUNC = stfp, STYPE = anyarray, - INITCOND = '{}'); -ERROR: cannot determine transition data type -DETAIL: A result of type anyarray requires at least one input of type anyelement, anyarray, anynonarray, anyenum, anyrange, or anymultirange. --- Case2 (R = P) && ((B = P) || (B = N)) --- ------------------------------------- --- S tf1 B tf2 --- ----------------------- --- N N N N --- should CREATE -CREATE AGGREGATE myaggp05a(BASETYPE = int, SFUNC = tfnp, STYPE = int[], - FINALFUNC = ffp, INITCOND = '{}'); --- N N N P --- should CREATE -CREATE AGGREGATE myaggp06a(BASETYPE = int, SFUNC = tf2p, STYPE = int[], - FINALFUNC = ffp, INITCOND = '{}'); --- N N P N --- should ERROR: tfnp(int[], anyelement) not matched by tfnp(int[], int) -CREATE AGGREGATE myaggp07a(BASETYPE = anyelement, SFUNC = tfnp, STYPE = int[], - FINALFUNC = ffp, INITCOND = '{}'); -ERROR: function tfnp(integer[], anyelement) does not exist --- N N P P --- should CREATE -CREATE AGGREGATE myaggp08a(BASETYPE = anyelement, SFUNC = tf2p, STYPE = int[], - FINALFUNC = ffp, INITCOND = '{}'); --- N P N N --- should CREATE -CREATE AGGREGATE myaggp09a(BASETYPE = int, SFUNC = tf1p, STYPE = int[], - FINALFUNC = ffp, INITCOND = '{}'); -CREATE AGGREGATE myaggp09b(BASETYPE = int, SFUNC = tf1p, STYPE = int[], - INITCOND = '{}'); --- N P N P --- should CREATE -CREATE AGGREGATE myaggp10a(BASETYPE = int, SFUNC = tfp, STYPE = int[], - FINALFUNC = ffp, INITCOND = '{}'); -CREATE AGGREGATE myaggp10b(BASETYPE = int, SFUNC = tfp, STYPE = int[], - INITCOND = '{}'); --- N P P N --- should ERROR: tf1p(int[],anyelement) not matched by tf1p(anyarray,int) -CREATE AGGREGATE myaggp11a(BASETYPE = anyelement, SFUNC = tf1p, STYPE = int[], - FINALFUNC = ffp, INITCOND = '{}'); -ERROR: function tf1p(integer[], anyelement) does not exist -CREATE AGGREGATE myaggp11b(BASETYPE = anyelement, SFUNC = tf1p, STYPE = int[], - INITCOND = '{}'); -ERROR: function tf1p(integer[], anyelement) does not exist --- N P P P --- should ERROR: tfp(int[],anyelement) not matched by tfp(anyarray,anyelement) -CREATE AGGREGATE myaggp12a(BASETYPE = anyelement, SFUNC = tfp, STYPE = int[], - FINALFUNC = ffp, INITCOND = '{}'); -ERROR: function tfp(integer[], anyelement) does not exist -CREATE AGGREGATE myaggp12b(BASETYPE = anyelement, SFUNC = tfp, STYPE = int[], - INITCOND = '{}'); -ERROR: function tfp(integer[], anyelement) does not exist --- P N N N --- should ERROR: tfnp(anyarray, int) not matched by tfnp(int[],int) -CREATE AGGREGATE myaggp13a(BASETYPE = int, SFUNC = tfnp, STYPE = anyarray, - FINALFUNC = ffp, INITCOND = '{}'); -ERROR: cannot determine transition data type -DETAIL: A result of type anyarray requires at least one input of type anyelement, anyarray, anynonarray, anyenum, anyrange, or anymultirange. --- P N N P --- should ERROR: tf2p(anyarray, int) not matched by tf2p(int[],anyelement) -CREATE AGGREGATE myaggp14a(BASETYPE = int, SFUNC = tf2p, STYPE = anyarray, - FINALFUNC = ffp, INITCOND = '{}'); -ERROR: cannot determine transition data type -DETAIL: A result of type anyarray requires at least one input of type anyelement, anyarray, anynonarray, anyenum, anyrange, or anymultirange. --- P N P N --- should ERROR: tfnp(anyarray, anyelement) not matched by tfnp(int[],int) -CREATE AGGREGATE myaggp15a(BASETYPE = anyelement, SFUNC = tfnp, - STYPE = anyarray, FINALFUNC = ffp, INITCOND = '{}'); -ERROR: function tfnp(anyarray, anyelement) does not exist --- P N P P --- should ERROR: tf2p(anyarray, anyelement) not matched by tf2p(int[],anyelement) -CREATE AGGREGATE myaggp16a(BASETYPE = anyelement, SFUNC = tf2p, - STYPE = anyarray, FINALFUNC = ffp, INITCOND = '{}'); -ERROR: function tf2p(anyarray, anyelement) does not exist --- P P N N --- should ERROR: we have no way to resolve S -CREATE AGGREGATE myaggp17a(BASETYPE = int, SFUNC = tf1p, STYPE = anyarray, - FINALFUNC = ffp, INITCOND = '{}'); -ERROR: cannot determine transition data type -DETAIL: A result of type anyarray requires at least one input of type anyelement, anyarray, anynonarray, anyenum, anyrange, or anymultirange. -CREATE AGGREGATE myaggp17b(BASETYPE = int, SFUNC = tf1p, STYPE = anyarray, - INITCOND = '{}'); -ERROR: cannot determine transition data type -DETAIL: A result of type anyarray requires at least one input of type anyelement, anyarray, anynonarray, anyenum, anyrange, or anymultirange. --- P P N P --- should ERROR: tfp(anyarray, int) not matched by tfp(anyarray, anyelement) -CREATE AGGREGATE myaggp18a(BASETYPE = int, SFUNC = tfp, STYPE = anyarray, - FINALFUNC = ffp, INITCOND = '{}'); -ERROR: cannot determine transition data type -DETAIL: A result of type anyarray requires at least one input of type anyelement, anyarray, anynonarray, anyenum, anyrange, or anymultirange. -CREATE AGGREGATE myaggp18b(BASETYPE = int, SFUNC = tfp, STYPE = anyarray, - INITCOND = '{}'); -ERROR: cannot determine transition data type -DETAIL: A result of type anyarray requires at least one input of type anyelement, anyarray, anynonarray, anyenum, anyrange, or anymultirange. --- P P P N --- should ERROR: tf1p(anyarray, anyelement) not matched by tf1p(anyarray, int) -CREATE AGGREGATE myaggp19a(BASETYPE = anyelement, SFUNC = tf1p, - STYPE = anyarray, FINALFUNC = ffp, INITCOND = '{}'); -ERROR: function tf1p(anyarray, anyelement) does not exist -CREATE AGGREGATE myaggp19b(BASETYPE = anyelement, SFUNC = tf1p, - STYPE = anyarray, INITCOND = '{}'); -ERROR: function tf1p(anyarray, anyelement) does not exist --- P P P P --- should CREATE -CREATE AGGREGATE myaggp20a(BASETYPE = anyelement, SFUNC = tfp, - STYPE = anyarray, FINALFUNC = ffp, INITCOND = '{}'); -CREATE AGGREGATE myaggp20b(BASETYPE = anyelement, SFUNC = tfp, - STYPE = anyarray, INITCOND = '{}'); --- Case3 (R = N) && (B = A) --- ------------------------ --- S tf1 --- ------- --- N N --- should CREATE -CREATE AGGREGATE myaggn01a(*) (SFUNC = stfnp, STYPE = int4[], - FINALFUNC = ffnp, INITCOND = '{}'); -CREATE AGGREGATE myaggn01b(*) (SFUNC = stfnp, STYPE = int4[], - INITCOND = '{}'); --- P N --- should ERROR: stfnp(anyarray) not matched by stfnp(int[]) -CREATE AGGREGATE myaggn02a(*) (SFUNC = stfnp, STYPE = anyarray, - FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: cannot determine transition data type -DETAIL: A result of type anyarray requires at least one input of type anyelement, anyarray, anynonarray, anyenum, anyrange, or anymultirange. -CREATE AGGREGATE myaggn02b(*) (SFUNC = stfnp, STYPE = anyarray, - INITCOND = '{}'); -ERROR: cannot determine transition data type -DETAIL: A result of type anyarray requires at least one input of type anyelement, anyarray, anynonarray, anyenum, anyrange, or anymultirange. --- N P --- should CREATE -CREATE AGGREGATE myaggn03a(*) (SFUNC = stfp, STYPE = int4[], - FINALFUNC = ffnp, INITCOND = '{}'); --- P P --- should ERROR: ffnp(anyarray) not matched by ffnp(int[]) -CREATE AGGREGATE myaggn04a(*) (SFUNC = stfp, STYPE = anyarray, - FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: cannot determine transition data type -DETAIL: A result of type anyarray requires at least one input of type anyelement, anyarray, anynonarray, anyenum, anyrange, or anymultirange. --- Case4 (R = N) && ((B = P) || (B = N)) --- ------------------------------------- --- S tf1 B tf2 --- ----------------------- --- N N N N --- should CREATE -CREATE AGGREGATE myaggn05a(BASETYPE = int, SFUNC = tfnp, STYPE = int[], - FINALFUNC = ffnp, INITCOND = '{}'); -CREATE AGGREGATE myaggn05b(BASETYPE = int, SFUNC = tfnp, STYPE = int[], - INITCOND = '{}'); --- N N N P --- should CREATE -CREATE AGGREGATE myaggn06a(BASETYPE = int, SFUNC = tf2p, STYPE = int[], - FINALFUNC = ffnp, INITCOND = '{}'); -CREATE AGGREGATE myaggn06b(BASETYPE = int, SFUNC = tf2p, STYPE = int[], - INITCOND = '{}'); --- N N P N --- should ERROR: tfnp(int[], anyelement) not matched by tfnp(int[], int) -CREATE AGGREGATE myaggn07a(BASETYPE = anyelement, SFUNC = tfnp, STYPE = int[], - FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: function tfnp(integer[], anyelement) does not exist -CREATE AGGREGATE myaggn07b(BASETYPE = anyelement, SFUNC = tfnp, STYPE = int[], - INITCOND = '{}'); -ERROR: function tfnp(integer[], anyelement) does not exist --- N N P P --- should CREATE -CREATE AGGREGATE myaggn08a(BASETYPE = anyelement, SFUNC = tf2p, STYPE = int[], - FINALFUNC = ffnp, INITCOND = '{}'); -CREATE AGGREGATE myaggn08b(BASETYPE = anyelement, SFUNC = tf2p, STYPE = int[], - INITCOND = '{}'); --- N P N N --- should CREATE -CREATE AGGREGATE myaggn09a(BASETYPE = int, SFUNC = tf1p, STYPE = int[], - FINALFUNC = ffnp, INITCOND = '{}'); --- N P N P --- should CREATE -CREATE AGGREGATE myaggn10a(BASETYPE = int, SFUNC = tfp, STYPE = int[], - FINALFUNC = ffnp, INITCOND = '{}'); --- N P P N --- should ERROR: tf1p(int[],anyelement) not matched by tf1p(anyarray,int) -CREATE AGGREGATE myaggn11a(BASETYPE = anyelement, SFUNC = tf1p, STYPE = int[], - FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: function tf1p(integer[], anyelement) does not exist --- N P P P --- should ERROR: tfp(int[],anyelement) not matched by tfp(anyarray,anyelement) -CREATE AGGREGATE myaggn12a(BASETYPE = anyelement, SFUNC = tfp, STYPE = int[], - FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: function tfp(integer[], anyelement) does not exist --- P N N N --- should ERROR: tfnp(anyarray, int) not matched by tfnp(int[],int) -CREATE AGGREGATE myaggn13a(BASETYPE = int, SFUNC = tfnp, STYPE = anyarray, - FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: cannot determine transition data type -DETAIL: A result of type anyarray requires at least one input of type anyelement, anyarray, anynonarray, anyenum, anyrange, or anymultirange. -CREATE AGGREGATE myaggn13b(BASETYPE = int, SFUNC = tfnp, STYPE = anyarray, - INITCOND = '{}'); -ERROR: cannot determine transition data type -DETAIL: A result of type anyarray requires at least one input of type anyelement, anyarray, anynonarray, anyenum, anyrange, or anymultirange. --- P N N P --- should ERROR: tf2p(anyarray, int) not matched by tf2p(int[],anyelement) -CREATE AGGREGATE myaggn14a(BASETYPE = int, SFUNC = tf2p, STYPE = anyarray, - FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: cannot determine transition data type -DETAIL: A result of type anyarray requires at least one input of type anyelement, anyarray, anynonarray, anyenum, anyrange, or anymultirange. -CREATE AGGREGATE myaggn14b(BASETYPE = int, SFUNC = tf2p, STYPE = anyarray, - INITCOND = '{}'); -ERROR: cannot determine transition data type -DETAIL: A result of type anyarray requires at least one input of type anyelement, anyarray, anynonarray, anyenum, anyrange, or anymultirange. --- P N P N --- should ERROR: tfnp(anyarray, anyelement) not matched by tfnp(int[],int) -CREATE AGGREGATE myaggn15a(BASETYPE = anyelement, SFUNC = tfnp, - STYPE = anyarray, FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: function tfnp(anyarray, anyelement) does not exist -CREATE AGGREGATE myaggn15b(BASETYPE = anyelement, SFUNC = tfnp, - STYPE = anyarray, INITCOND = '{}'); -ERROR: function tfnp(anyarray, anyelement) does not exist --- P N P P --- should ERROR: tf2p(anyarray, anyelement) not matched by tf2p(int[],anyelement) -CREATE AGGREGATE myaggn16a(BASETYPE = anyelement, SFUNC = tf2p, - STYPE = anyarray, FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: function tf2p(anyarray, anyelement) does not exist -CREATE AGGREGATE myaggn16b(BASETYPE = anyelement, SFUNC = tf2p, - STYPE = anyarray, INITCOND = '{}'); -ERROR: function tf2p(anyarray, anyelement) does not exist --- P P N N --- should ERROR: ffnp(anyarray) not matched by ffnp(int[]) -CREATE AGGREGATE myaggn17a(BASETYPE = int, SFUNC = tf1p, STYPE = anyarray, - FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: cannot determine transition data type -DETAIL: A result of type anyarray requires at least one input of type anyelement, anyarray, anynonarray, anyenum, anyrange, or anymultirange. --- P P N P --- should ERROR: tfp(anyarray, int) not matched by tfp(anyarray, anyelement) -CREATE AGGREGATE myaggn18a(BASETYPE = int, SFUNC = tfp, STYPE = anyarray, - FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: cannot determine transition data type -DETAIL: A result of type anyarray requires at least one input of type anyelement, anyarray, anynonarray, anyenum, anyrange, or anymultirange. --- P P P N --- should ERROR: tf1p(anyarray, anyelement) not matched by tf1p(anyarray, int) -CREATE AGGREGATE myaggn19a(BASETYPE = anyelement, SFUNC = tf1p, - STYPE = anyarray, FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: function tf1p(anyarray, anyelement) does not exist --- P P P P --- should ERROR: ffnp(anyarray) not matched by ffnp(int[]) -CREATE AGGREGATE myaggn20a(BASETYPE = anyelement, SFUNC = tfp, - STYPE = anyarray, FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: function ffnp(anyarray) does not exist --- multi-arg polymorphic -CREATE AGGREGATE mysum2(anyelement,anyelement) (SFUNC = sum3, - STYPE = anyelement, INITCOND = '0'); --- create test data for polymorphic aggregates -create temp table t(f1 int, f2 int[], f3 text); -insert into t values(1,array[1],'a'); -insert into t values(1,array[11],'b'); -insert into t values(1,array[111],'c'); -insert into t values(2,array[2],'a'); -insert into t values(2,array[22],'b'); -insert into t values(2,array[222],'c'); -insert into t values(3,array[3],'a'); -insert into t values(3,array[3],'b'); --- test the successfully created polymorphic aggregates -select f3, myaggp01a(*) from t group by f3 order by f3; - f3 | myaggp01a -----+----------- - a | {} - b | {} - c | {} -(3 rows) - -select f3, myaggp03a(*) from t group by f3 order by f3; - f3 | myaggp03a -----+----------- - a | {} - b | {} - c | {} -(3 rows) - -select f3, myaggp03b(*) from t group by f3 order by f3; - f3 | myaggp03b -----+----------- - a | {} - b | {} - c | {} -(3 rows) - -select f3, myaggp05a(f1) from t group by f3 order by f3; - f3 | myaggp05a -----+----------- - a | {1,2,3} - b | {1,2,3} - c | {1,2} -(3 rows) - -select f3, myaggp06a(f1) from t group by f3 order by f3; - f3 | myaggp06a -----+----------- - a | {} - b | {} - c | {} -(3 rows) - -select f3, myaggp08a(f1) from t group by f3 order by f3; - f3 | myaggp08a -----+----------- - a | {} - b | {} - c | {} -(3 rows) - -select f3, myaggp09a(f1) from t group by f3 order by f3; - f3 | myaggp09a -----+----------- - a | {} - b | {} - c | {} -(3 rows) - -select f3, myaggp09b(f1) from t group by f3 order by f3; - f3 | myaggp09b -----+----------- - a | {} - b | {} - c | {} -(3 rows) - -select f3, myaggp10a(f1) from t group by f3 order by f3; - f3 | myaggp10a -----+----------- - a | {1,2,3} - b | {1,2,3} - c | {1,2} -(3 rows) - -select f3, myaggp10b(f1) from t group by f3 order by f3; - f3 | myaggp10b -----+----------- - a | {1,2,3} - b | {1,2,3} - c | {1,2} -(3 rows) - -select f3, myaggp20a(f1) from t group by f3 order by f3; - f3 | myaggp20a -----+----------- - a | {1,2,3} - b | {1,2,3} - c | {1,2} -(3 rows) - -select f3, myaggp20b(f1) from t group by f3 order by f3; - f3 | myaggp20b -----+----------- - a | {1,2,3} - b | {1,2,3} - c | {1,2} -(3 rows) - -select f3, myaggn01a(*) from t group by f3 order by f3; - f3 | myaggn01a -----+----------- - a | {} - b | {} - c | {} -(3 rows) - -select f3, myaggn01b(*) from t group by f3 order by f3; - f3 | myaggn01b -----+----------- - a | {} - b | {} - c | {} -(3 rows) - -select f3, myaggn03a(*) from t group by f3 order by f3; - f3 | myaggn03a -----+----------- - a | {} - b | {} - c | {} -(3 rows) - -select f3, myaggn05a(f1) from t group by f3 order by f3; - f3 | myaggn05a -----+----------- - a | {1,2,3} - b | {1,2,3} - c | {1,2} -(3 rows) - -select f3, myaggn05b(f1) from t group by f3 order by f3; - f3 | myaggn05b -----+----------- - a | {1,2,3} - b | {1,2,3} - c | {1,2} -(3 rows) - -select f3, myaggn06a(f1) from t group by f3 order by f3; - f3 | myaggn06a -----+----------- - a | {} - b | {} - c | {} -(3 rows) - -select f3, myaggn06b(f1) from t group by f3 order by f3; - f3 | myaggn06b -----+----------- - a | {} - b | {} - c | {} -(3 rows) - -select f3, myaggn08a(f1) from t group by f3 order by f3; - f3 | myaggn08a -----+----------- - a | {} - b | {} - c | {} -(3 rows) - -select f3, myaggn08b(f1) from t group by f3 order by f3; - f3 | myaggn08b -----+----------- - a | {} - b | {} - c | {} -(3 rows) - -select f3, myaggn09a(f1) from t group by f3 order by f3; - f3 | myaggn09a -----+----------- - a | {} - b | {} - c | {} -(3 rows) - -select f3, myaggn10a(f1) from t group by f3 order by f3; - f3 | myaggn10a -----+----------- - a | {1,2,3} - b | {1,2,3} - c | {1,2} -(3 rows) - -select mysum2(f1, f1 + 1) from t; - mysum2 --------- - 38 -(1 row) - --- test inlining of polymorphic SQL functions -create function bleat(int) returns int as $$ -begin - raise notice 'bleat %', $1; - return $1; -end$$ language plpgsql; -create function sql_if(bool, anyelement, anyelement) returns anyelement as $$ -select case when $1 then $2 else $3 end $$ language sql; --- Note this would fail with integer overflow, never mind wrong bleat() output, --- if the CASE expression were not successfully inlined -select f1, sql_if(f1 > 0, bleat(f1), bleat(f1 + 1)) from int4_tbl; -NOTICE: bleat 1 -NOTICE: bleat 123456 -NOTICE: bleat -123455 -NOTICE: bleat 2147483647 -NOTICE: bleat -2147483646 - f1 | sql_if --------------+------------- - 0 | 1 - 123456 | 123456 - -123456 | -123455 - 2147483647 | 2147483647 - -2147483647 | -2147483646 -(5 rows) - -select q2, sql_if(q2 > 0, q2, q2 + 1) from int8_tbl; - q2 | sql_if --------------------+------------------- - 456 | 456 - 4567890123456789 | 4567890123456789 - 123 | 123 - 4567890123456789 | 4567890123456789 - -4567890123456789 | -4567890123456788 -(5 rows) - --- another sort of polymorphic aggregate -CREATE AGGREGATE array_larger_accum (anyarray) -( - sfunc = array_larger, - stype = anyarray, - initcond = '{}' -); -SELECT array_larger_accum(i) -FROM (VALUES (ARRAY[1,2]), (ARRAY[3,4])) as t(i); - array_larger_accum --------------------- - {3,4} -(1 row) - -SELECT array_larger_accum(i) -FROM (VALUES (ARRAY[row(1,2),row(3,4)]), (ARRAY[row(5,6),row(7,8)])) as t(i); - array_larger_accum --------------------- - {"(5,6)","(7,8)"} -(1 row) - --- another kind of polymorphic aggregate -create function add_group(grp anyarray, ad anyelement, size integer) - returns anyarray - as $$ -begin - if grp is null then - return array[ad]; - end if; - if array_upper(grp, 1) < size then - return grp || ad; - end if; - return grp; -end; -$$ - language plpgsql immutable; -create aggregate build_group(anyelement, integer) ( - SFUNC = add_group, - STYPE = anyarray -); -select build_group(q1,3) from int8_tbl; - build_group ----------------------------- - {123,123,4567890123456789} -(1 row) - --- this should fail because stype isn't compatible with arg -create aggregate build_group(int8, integer) ( - SFUNC = add_group, - STYPE = int2[] -); -ERROR: function add_group(smallint[], bigint, integer) does not exist --- but we can make a non-poly agg from a poly sfunc if types are OK -create aggregate build_group(int8, integer) ( - SFUNC = add_group, - STYPE = int8[] -); --- check proper resolution of data types for polymorphic transfn/finalfn -create function first_el_transfn(anyarray, anyelement) returns anyarray as -'select $1 || $2' language sql immutable; -create function first_el(anyarray) returns anyelement as -'select $1[1]' language sql strict immutable; -create aggregate first_el_agg_f8(float8) ( - SFUNC = array_append, - STYPE = float8[], - FINALFUNC = first_el -); -create aggregate first_el_agg_any(anyelement) ( - SFUNC = first_el_transfn, - STYPE = anyarray, - FINALFUNC = first_el -); -select first_el_agg_f8(x::float8) from generate_series(1,10) x; - first_el_agg_f8 ------------------ - 1 -(1 row) - -select first_el_agg_any(x) from generate_series(1,10) x; - first_el_agg_any ------------------- - 1 -(1 row) - -select first_el_agg_f8(x::float8) over(order by x) from generate_series(1,10) x; - first_el_agg_f8 ------------------ - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 -(10 rows) - -select first_el_agg_any(x) over(order by x) from generate_series(1,10) x; - first_el_agg_any ------------------- - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 -(10 rows) - --- check that we can apply functions taking ANYARRAY to pg_stats -select distinct array_ndims(histogram_bounds) from pg_stats -where histogram_bounds is not null; - array_ndims -------------- - 1 -(1 row) - --- such functions must protect themselves if varying element type isn't OK --- (WHERE clause here is to avoid possibly getting a collation error instead) -select max(histogram_bounds) from pg_stats where tablename = 'pg_am'; -ERROR: cannot compare arrays of different element types --- another corner case is the input functions for polymorphic pseudotypes -select array_in('{1,2,3}','int4'::regtype,-1); -- this has historically worked - array_in ----------- - {1,2,3} -(1 row) - -select * from array_in('{1,2,3}','int4'::regtype,-1); -- this not -ERROR: function "array_in" in FROM has unsupported return type anyarray -LINE 1: select * from array_in('{1,2,3}','int4'::regtype,-1); - ^ -select anyrange_in('[10,20)','int4range'::regtype,-1); -ERROR: cannot accept a value of type anyrange --- test variadic polymorphic functions -create function myleast(variadic anyarray) returns anyelement as $$ - select min($1[i]) from generate_subscripts($1,1) g(i) -$$ language sql immutable strict; -select myleast(10, 1, 20, 33); - myleast ---------- - 1 -(1 row) - -select myleast(1.1, 0.22, 0.55); - myleast ---------- - 0.22 -(1 row) - -select myleast('z'::text); - myleast ---------- - z -(1 row) - -select myleast(); -- fail -ERROR: function myleast() does not exist -LINE 1: select myleast(); - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. --- test with variadic call parameter -select myleast(variadic array[1,2,3,4,-1]); - myleast ---------- - -1 -(1 row) - -select myleast(variadic array[1.1, -5.5]); - myleast ---------- - -5.5 -(1 row) - ---test with empty variadic call parameter -select myleast(variadic array[]::int[]); - myleast ---------- - -(1 row) - --- an example with some ordinary arguments too -create function concat(text, variadic anyarray) returns text as $$ - select array_to_string($2, $1); -$$ language sql immutable strict; -select concat('%', 1, 2, 3, 4, 5); - concat ------------ - 1%2%3%4%5 -(1 row) - -select concat('|', 'a'::text, 'b', 'c'); - concat --------- - a|b|c -(1 row) - -select concat('|', variadic array[1,2,33]); - concat --------- - 1|2|33 -(1 row) - -select concat('|', variadic array[]::int[]); - concat --------- - -(1 row) - -drop function concat(text, anyarray); --- mix variadic with anyelement -create function formarray(anyelement, variadic anyarray) returns anyarray as $$ - select array_prepend($1, $2); -$$ language sql immutable strict; -select formarray(1,2,3,4,5); - formarray -------------- - {1,2,3,4,5} -(1 row) - -select formarray(1.1, variadic array[1.2,55.5]); - formarray ----------------- - {1.1,1.2,55.5} -(1 row) - -select formarray(1.1, array[1.2,55.5]); -- fail without variadic -ERROR: function formarray(numeric, numeric[]) does not exist -LINE 1: select formarray(1.1, array[1.2,55.5]); - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. -select formarray(1, 'x'::text); -- fail, type mismatch -ERROR: function formarray(integer, text) does not exist -LINE 1: select formarray(1, 'x'::text); - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. -select formarray(1, variadic array['x'::text]); -- fail, type mismatch -ERROR: function formarray(integer, text[]) does not exist -LINE 1: select formarray(1, variadic array['x'::text]); - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. -drop function formarray(anyelement, variadic anyarray); --- test pg_typeof() function -select pg_typeof(null); -- unknown - pg_typeof ------------ - unknown -(1 row) - -select pg_typeof(0); -- integer - pg_typeof ------------ - integer -(1 row) - -select pg_typeof(0.0); -- numeric - pg_typeof ------------ - numeric -(1 row) - -select pg_typeof(1+1 = 2); -- boolean - pg_typeof ------------ - boolean -(1 row) - -select pg_typeof('x'); -- unknown - pg_typeof ------------ - unknown -(1 row) - -select pg_typeof('' || ''); -- text - pg_typeof ------------ - text -(1 row) - -select pg_typeof(pg_typeof(0)); -- regtype - pg_typeof ------------ - regtype -(1 row) - -select pg_typeof(array[1.2,55.5]); -- numeric[] - pg_typeof ------------ - numeric[] -(1 row) - -select pg_typeof(myleast(10, 1, 20, 33)); -- polymorphic input - pg_typeof ------------ - integer -(1 row) - --- test functions with default parameters --- test basic functionality -create function dfunc(a int = 1, int = 2) returns int as $$ - select $1 + $2; -$$ language sql; -select dfunc(); - dfunc -------- - 3 -(1 row) - -select dfunc(10); - dfunc -------- - 12 -(1 row) - -select dfunc(10, 20); - dfunc -------- - 30 -(1 row) - -select dfunc(10, 20, 30); -- fail -ERROR: function dfunc(integer, integer, integer) does not exist -LINE 1: select dfunc(10, 20, 30); - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. -drop function dfunc(); -- fail -ERROR: function dfunc() does not exist -drop function dfunc(int); -- fail -ERROR: function dfunc(integer) does not exist -drop function dfunc(int, int); -- ok --- fail: defaults must be at end of argument list -create function dfunc(a int = 1, b int) returns int as $$ - select $1 + $2; -$$ language sql; -ERROR: input parameters after one with a default value must also have defaults --- however, this should work: -create function dfunc(a int = 1, out sum int, b int = 2) as $$ - select $1 + $2; -$$ language sql; -select dfunc(); - dfunc -------- - 3 -(1 row) - --- verify it lists properly -\df dfunc - List of functions - Schema | Name | Result data type | Argument data types | Type ---------+-------+------------------+-----------------------------------------------------------+------ - public | dfunc | integer | a integer DEFAULT 1, OUT sum integer, b integer DEFAULT 2 | func -(1 row) - -drop function dfunc(int, int); --- check implicit coercion -create function dfunc(a int DEFAULT 1.0, int DEFAULT '-1') returns int as $$ - select $1 + $2; -$$ language sql; -select dfunc(); - dfunc -------- - 0 -(1 row) - -create function dfunc(a text DEFAULT 'Hello', b text DEFAULT 'World') returns text as $$ - select $1 || ', ' || $2; -$$ language sql; -select dfunc(); -- fail: which dfunc should be called? int or text -ERROR: function dfunc() is not unique -LINE 1: select dfunc(); - ^ -HINT: Could not choose a best candidate function. You might need to add explicit type casts. -select dfunc('Hi'); -- ok - dfunc ------------ - Hi, World -(1 row) - -select dfunc('Hi', 'City'); -- ok - dfunc ----------- - Hi, City -(1 row) - -select dfunc(0); -- ok - dfunc -------- - -1 -(1 row) - -select dfunc(10, 20); -- ok - dfunc -------- - 30 -(1 row) - -drop function dfunc(int, int); -drop function dfunc(text, text); -create function dfunc(int = 1, int = 2) returns int as $$ - select 2; -$$ language sql; -create function dfunc(int = 1, int = 2, int = 3, int = 4) returns int as $$ - select 4; -$$ language sql; --- Now, dfunc(nargs = 2) and dfunc(nargs = 4) are ambiguous when called --- with 0 to 2 arguments. -select dfunc(); -- fail -ERROR: function dfunc() is not unique -LINE 1: select dfunc(); - ^ -HINT: Could not choose a best candidate function. You might need to add explicit type casts. -select dfunc(1); -- fail -ERROR: function dfunc(integer) is not unique -LINE 1: select dfunc(1); - ^ -HINT: Could not choose a best candidate function. You might need to add explicit type casts. -select dfunc(1, 2); -- fail -ERROR: function dfunc(integer, integer) is not unique -LINE 1: select dfunc(1, 2); - ^ -HINT: Could not choose a best candidate function. You might need to add explicit type casts. -select dfunc(1, 2, 3); -- ok - dfunc -------- - 4 -(1 row) - -select dfunc(1, 2, 3, 4); -- ok - dfunc -------- - 4 -(1 row) - -drop function dfunc(int, int); -drop function dfunc(int, int, int, int); --- default values are not allowed for output parameters -create function dfunc(out int = 20) returns int as $$ - select 1; -$$ language sql; -ERROR: only input parameters can have default values --- polymorphic parameter test -create function dfunc(anyelement = 'World'::text) returns text as $$ - select 'Hello, ' || $1::text; -$$ language sql; -select dfunc(); - dfunc --------------- - Hello, World -(1 row) - -select dfunc(0); - dfunc ----------- - Hello, 0 -(1 row) - -select dfunc(to_date('20081215','YYYYMMDD')); - dfunc -------------------- - Hello, 12-15-2008 -(1 row) - -select dfunc('City'::text); - dfunc -------------- - Hello, City -(1 row) - -drop function dfunc(anyelement); --- check defaults for variadics -create function dfunc(a variadic int[]) returns int as -$$ select array_upper($1, 1) $$ language sql; -select dfunc(); -- fail -ERROR: function dfunc() does not exist -LINE 1: select dfunc(); - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. -select dfunc(10); - dfunc -------- - 1 -(1 row) - -select dfunc(10,20); - dfunc -------- - 2 -(1 row) - -create or replace function dfunc(a variadic int[] default array[]::int[]) returns int as -$$ select array_upper($1, 1) $$ language sql; -select dfunc(); -- now ok - dfunc -------- - -(1 row) - -select dfunc(10); - dfunc -------- - 1 -(1 row) - -select dfunc(10,20); - dfunc -------- - 2 -(1 row) - --- can't remove the default once it exists -create or replace function dfunc(a variadic int[]) returns int as -$$ select array_upper($1, 1) $$ language sql; -ERROR: cannot remove parameter defaults from existing function -HINT: Use DROP FUNCTION dfunc(integer[]) first. -\df dfunc - List of functions - Schema | Name | Result data type | Argument data types | Type ---------+-------+------------------+-------------------------------------------------+------ - public | dfunc | integer | VARIADIC a integer[] DEFAULT ARRAY[]::integer[] | func -(1 row) - -drop function dfunc(a variadic int[]); --- Ambiguity should be reported only if there's not a better match available -create function dfunc(int = 1, int = 2, int = 3) returns int as $$ - select 3; -$$ language sql; -create function dfunc(int = 1, int = 2) returns int as $$ - select 2; -$$ language sql; -create function dfunc(text) returns text as $$ - select $1; -$$ language sql; --- dfunc(narg=2) and dfunc(narg=3) are ambiguous -select dfunc(1); -- fail -ERROR: function dfunc(integer) is not unique -LINE 1: select dfunc(1); - ^ -HINT: Could not choose a best candidate function. You might need to add explicit type casts. --- but this works since the ambiguous functions aren't preferred anyway -select dfunc('Hi'); - dfunc -------- - Hi -(1 row) - -drop function dfunc(int, int, int); -drop function dfunc(int, int); -drop function dfunc(text); --- --- Tests for named- and mixed-notation function calling --- -create function dfunc(a int, b int, c int = 0, d int = 0) - returns table (a int, b int, c int, d int) as $$ - select $1, $2, $3, $4; -$$ language sql; -select (dfunc(10,20,30)).*; - a | b | c | d -----+----+----+--- - 10 | 20 | 30 | 0 -(1 row) - -select (dfunc(a := 10, b := 20, c := 30)).*; - a | b | c | d -----+----+----+--- - 10 | 20 | 30 | 0 -(1 row) - -select * from dfunc(a := 10, b := 20); - a | b | c | d -----+----+---+--- - 10 | 20 | 0 | 0 -(1 row) - -select * from dfunc(b := 10, a := 20); - a | b | c | d -----+----+---+--- - 20 | 10 | 0 | 0 -(1 row) - -select * from dfunc(0); -- fail -ERROR: function dfunc(integer) does not exist -LINE 1: select * from dfunc(0); - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. -select * from dfunc(1,2); - a | b | c | d ----+---+---+--- - 1 | 2 | 0 | 0 -(1 row) - -select * from dfunc(1,2,c := 3); - a | b | c | d ----+---+---+--- - 1 | 2 | 3 | 0 -(1 row) - -select * from dfunc(1,2,d := 3); - a | b | c | d ----+---+---+--- - 1 | 2 | 0 | 3 -(1 row) - -select * from dfunc(x := 20, b := 10, x := 30); -- fail, duplicate name -ERROR: argument name "x" used more than once -LINE 1: select * from dfunc(x := 20, b := 10, x := 30); - ^ -select * from dfunc(10, b := 20, 30); -- fail, named args must be last -ERROR: positional argument cannot follow named argument -LINE 1: select * from dfunc(10, b := 20, 30); - ^ -select * from dfunc(x := 10, b := 20, c := 30); -- fail, unknown param -ERROR: function dfunc(x => integer, b => integer, c => integer) does not exist -LINE 1: select * from dfunc(x := 10, b := 20, c := 30); - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. -select * from dfunc(10, 10, a := 20); -- fail, a overlaps positional parameter -ERROR: function dfunc(integer, integer, a => integer) does not exist -LINE 1: select * from dfunc(10, 10, a := 20); - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. -select * from dfunc(1,c := 2,d := 3); -- fail, no value for b -ERROR: function dfunc(integer, c => integer, d => integer) does not exist -LINE 1: select * from dfunc(1,c := 2,d := 3); - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. -drop function dfunc(int, int, int, int); --- test with different parameter types -create function dfunc(a varchar, b numeric, c date = current_date) - returns table (a varchar, b numeric, c date) as $$ - select $1, $2, $3; -$$ language sql; -select (dfunc('Hello World', 20, '2009-07-25'::date)).*; - a | b | c --------------+----+------------ - Hello World | 20 | 07-25-2009 -(1 row) - -select * from dfunc('Hello World', 20, '2009-07-25'::date); - a | b | c --------------+----+------------ - Hello World | 20 | 07-25-2009 -(1 row) - -select * from dfunc(c := '2009-07-25'::date, a := 'Hello World', b := 20); - a | b | c --------------+----+------------ - Hello World | 20 | 07-25-2009 -(1 row) - -select * from dfunc('Hello World', b := 20, c := '2009-07-25'::date); - a | b | c --------------+----+------------ - Hello World | 20 | 07-25-2009 -(1 row) - -select * from dfunc('Hello World', c := '2009-07-25'::date, b := 20); - a | b | c --------------+----+------------ - Hello World | 20 | 07-25-2009 -(1 row) - -select * from dfunc('Hello World', c := 20, b := '2009-07-25'::date); -- fail -ERROR: function dfunc(unknown, c => integer, b => date) does not exist -LINE 1: select * from dfunc('Hello World', c := 20, b := '2009-07-25... - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. -drop function dfunc(varchar, numeric, date); --- test out parameters with named params -create function dfunc(a varchar = 'def a', out _a varchar, c numeric = NULL, out _c numeric) -returns record as $$ - select $1, $2; -$$ language sql; -select (dfunc()).*; - _a | _c --------+---- - def a | -(1 row) - -select * from dfunc(); - _a | _c --------+---- - def a | -(1 row) - -select * from dfunc('Hello', 100); - _a | _c --------+----- - Hello | 100 -(1 row) - -select * from dfunc(a := 'Hello', c := 100); - _a | _c --------+----- - Hello | 100 -(1 row) - -select * from dfunc(c := 100, a := 'Hello'); - _a | _c --------+----- - Hello | 100 -(1 row) - -select * from dfunc('Hello'); - _a | _c --------+---- - Hello | -(1 row) - -select * from dfunc('Hello', c := 100); - _a | _c --------+----- - Hello | 100 -(1 row) - -select * from dfunc(c := 100); - _a | _c --------+----- - def a | 100 -(1 row) - --- fail, can no longer change an input parameter's name -create or replace function dfunc(a varchar = 'def a', out _a varchar, x numeric = NULL, out _c numeric) -returns record as $$ - select $1, $2; -$$ language sql; -ERROR: cannot change name of input parameter "c" -HINT: Use DROP FUNCTION dfunc(character varying,numeric) first. -create or replace function dfunc(a varchar = 'def a', out _a varchar, numeric = NULL, out _c numeric) -returns record as $$ - select $1, $2; -$$ language sql; -ERROR: cannot change name of input parameter "c" -HINT: Use DROP FUNCTION dfunc(character varying,numeric) first. -drop function dfunc(varchar, numeric); ---fail, named parameters are not unique -create function testpolym(a int, a int) returns int as $$ select 1;$$ language sql; -ERROR: parameter name "a" used more than once -create function testpolym(int, out a int, out a int) returns int as $$ select 1;$$ language sql; -ERROR: parameter name "a" used more than once -create function testpolym(out a int, inout a int) returns int as $$ select 1;$$ language sql; -ERROR: parameter name "a" used more than once -create function testpolym(a int, inout a int) returns int as $$ select 1;$$ language sql; -ERROR: parameter name "a" used more than once --- valid -create function testpolym(a int, out a int) returns int as $$ select $1;$$ language sql; -select testpolym(37); - testpolym ------------ - 37 -(1 row) - -drop function testpolym(int); -create function testpolym(a int) returns table(a int) as $$ select $1;$$ language sql; -select * from testpolym(37); - a ----- - 37 -(1 row) - -drop function testpolym(int); --- test polymorphic params and defaults -create function dfunc(a anyelement, b anyelement = null, flag bool = true) -returns anyelement as $$ - select case when $3 then $1 else $2 end; -$$ language sql; -select dfunc(1,2); - dfunc -------- - 1 -(1 row) - -select dfunc('a'::text, 'b'); -- positional notation with default - dfunc -------- - a -(1 row) - -select dfunc(a := 1, b := 2); - dfunc -------- - 1 -(1 row) - -select dfunc(a := 'a'::text, b := 'b'); - dfunc -------- - a -(1 row) - -select dfunc(a := 'a'::text, b := 'b', flag := false); -- named notation - dfunc -------- - b -(1 row) - -select dfunc(b := 'b'::text, a := 'a'); -- named notation with default - dfunc -------- - a -(1 row) - -select dfunc(a := 'a'::text, flag := true); -- named notation with default - dfunc -------- - a -(1 row) - -select dfunc(a := 'a'::text, flag := false); -- named notation with default - dfunc -------- - -(1 row) - -select dfunc(b := 'b'::text, a := 'a', flag := true); -- named notation - dfunc -------- - a -(1 row) - -select dfunc('a'::text, 'b', false); -- full positional notation - dfunc -------- - b -(1 row) - -select dfunc('a'::text, 'b', flag := false); -- mixed notation - dfunc -------- - b -(1 row) - -select dfunc('a'::text, 'b', true); -- full positional notation - dfunc -------- - a -(1 row) - -select dfunc('a'::text, 'b', flag := true); -- mixed notation - dfunc -------- - a -(1 row) - --- ansi/sql syntax -select dfunc(a => 1, b => 2); - dfunc -------- - 1 -(1 row) - -select dfunc(a => 'a'::text, b => 'b'); - dfunc -------- - a -(1 row) - -select dfunc(a => 'a'::text, b => 'b', flag => false); -- named notation - dfunc -------- - b -(1 row) - -select dfunc(b => 'b'::text, a => 'a'); -- named notation with default - dfunc -------- - a -(1 row) - -select dfunc(a => 'a'::text, flag => true); -- named notation with default - dfunc -------- - a -(1 row) - -select dfunc(a => 'a'::text, flag => false); -- named notation with default - dfunc -------- - -(1 row) - -select dfunc(b => 'b'::text, a => 'a', flag => true); -- named notation - dfunc -------- - a -(1 row) - -select dfunc('a'::text, 'b', false); -- full positional notation - dfunc -------- - b -(1 row) - -select dfunc('a'::text, 'b', flag => false); -- mixed notation - dfunc -------- - b -(1 row) - -select dfunc('a'::text, 'b', true); -- full positional notation - dfunc -------- - a -(1 row) - -select dfunc('a'::text, 'b', flag => true); -- mixed notation - dfunc -------- - a -(1 row) - --- this tests lexer edge cases around => -select dfunc(a =>-1); - dfunc -------- - -1 -(1 row) - -select dfunc(a =>+1); - dfunc -------- - 1 -(1 row) - -select dfunc(a =>/**/1); - dfunc -------- - 1 -(1 row) - -select dfunc(a =>--comment to be removed by psql - 1); - dfunc -------- - 1 -(1 row) - --- need DO to protect the -- from psql -do $$ - declare r integer; - begin - select dfunc(a=>-- comment - 1) into r; - raise info 'r = %', r; - end; -$$; -INFO: r = 1 --- check reverse-listing of named-arg calls -CREATE VIEW dfview AS - SELECT q1, q2, - dfunc(q1,q2, flag := q1>q2) as c3, - dfunc(q1, flag := q1 int8_tbl.q1 > int8_tbl.q2) AS c3, - dfunc(int8_tbl.q1, flag => int8_tbl.q1 < int8_tbl.q2, b => int8_tbl.q2) AS c4 - FROM int8_tbl; - -drop view dfview; -drop function dfunc(anyelement, anyelement, bool); --- --- Tests for ANYCOMPATIBLE polymorphism family --- -create function anyctest(anycompatible, anycompatible) -returns anycompatible as $$ - select greatest($1, $2) -$$ language sql; -select x, pg_typeof(x) from anyctest(11, 12) x; - x | pg_typeof -----+----------- - 12 | integer -(1 row) - -select x, pg_typeof(x) from anyctest(11, 12.3) x; - x | pg_typeof -------+----------- - 12.3 | numeric -(1 row) - -select x, pg_typeof(x) from anyctest(11, point(1,2)) x; -- fail -ERROR: function anyctest(integer, point) does not exist -LINE 1: select x, pg_typeof(x) from anyctest(11, point(1,2)) x; - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. -select x, pg_typeof(x) from anyctest('11', '12.3') x; -- defaults to text - x | pg_typeof -------+----------- - 12.3 | text -(1 row) - -drop function anyctest(anycompatible, anycompatible); -create function anyctest(anycompatible, anycompatible) -returns anycompatiblearray as $$ - select array[$1, $2] -$$ language sql; -select x, pg_typeof(x) from anyctest(11, 12) x; - x | pg_typeof ----------+----------- - {11,12} | integer[] -(1 row) - -select x, pg_typeof(x) from anyctest(11, 12.3) x; - x | pg_typeof ------------+----------- - {11,12.3} | numeric[] -(1 row) - -select x, pg_typeof(x) from anyctest(11, array[1,2]) x; -- fail -ERROR: function anyctest(integer, integer[]) does not exist -LINE 1: select x, pg_typeof(x) from anyctest(11, array[1,2]) x; - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. -drop function anyctest(anycompatible, anycompatible); -create function anyctest(anycompatible, anycompatiblearray) -returns anycompatiblearray as $$ - select array[$1] || $2 -$$ language sql; -select x, pg_typeof(x) from anyctest(11, array[12]) x; - x | pg_typeof ----------+----------- - {11,12} | integer[] -(1 row) - -select x, pg_typeof(x) from anyctest(11, array[12.3]) x; - x | pg_typeof ------------+----------- - {11,12.3} | numeric[] -(1 row) - -select x, pg_typeof(x) from anyctest(12.3, array[13]) x; - x | pg_typeof ------------+----------- - {12.3,13} | numeric[] -(1 row) - -select x, pg_typeof(x) from anyctest(12.3, '{13,14.4}') x; - x | pg_typeof -----------------+----------- - {12.3,13,14.4} | numeric[] -(1 row) - -select x, pg_typeof(x) from anyctest(11, array[point(1,2)]) x; -- fail -ERROR: function anyctest(integer, point[]) does not exist -LINE 1: select x, pg_typeof(x) from anyctest(11, array[point(1,2)]) ... - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. -select x, pg_typeof(x) from anyctest(11, 12) x; -- fail -ERROR: function anyctest(integer, integer) does not exist -LINE 1: select x, pg_typeof(x) from anyctest(11, 12) x; - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. -drop function anyctest(anycompatible, anycompatiblearray); -create function anyctest(anycompatible, anycompatiblerange) -returns anycompatiblerange as $$ - select $2 -$$ language sql; -select x, pg_typeof(x) from anyctest(11, int4range(4,7)) x; - x | pg_typeof --------+----------- - [4,7) | int4range -(1 row) - -select x, pg_typeof(x) from anyctest(11, numrange(4,7)) x; - x | pg_typeof --------+----------- - [4,7) | numrange -(1 row) - -select x, pg_typeof(x) from anyctest(11, 12) x; -- fail -ERROR: function anyctest(integer, integer) does not exist -LINE 1: select x, pg_typeof(x) from anyctest(11, 12) x; - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. -select x, pg_typeof(x) from anyctest(11.2, int4range(4,7)) x; -- fail -ERROR: function anyctest(numeric, int4range) does not exist -LINE 1: select x, pg_typeof(x) from anyctest(11.2, int4range(4,7)) x... - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. -select x, pg_typeof(x) from anyctest(11.2, '[4,7)') x; -- fail -ERROR: could not determine polymorphic type anycompatiblerange because input has type unknown -drop function anyctest(anycompatible, anycompatiblerange); -create function anyctest(anycompatiblerange, anycompatiblerange) -returns anycompatible as $$ - select lower($1) + upper($2) -$$ language sql; -select x, pg_typeof(x) from anyctest(int4range(11,12), int4range(4,7)) x; - x | pg_typeof -----+----------- - 18 | integer -(1 row) - -select x, pg_typeof(x) from anyctest(int4range(11,12), numrange(4,7)) x; -- fail -ERROR: function anyctest(int4range, numrange) does not exist -LINE 1: select x, pg_typeof(x) from anyctest(int4range(11,12), numra... - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. -drop function anyctest(anycompatiblerange, anycompatiblerange); --- fail, can't infer result type: -create function anyctest(anycompatible) -returns anycompatiblerange as $$ - select $1 -$$ language sql; -ERROR: cannot determine result data type -DETAIL: A result of type anycompatiblerange requires at least one input of type anycompatiblerange or anycompatiblemultirange. -create function anyctest(anycompatible, anycompatiblemultirange) -returns anycompatiblemultirange as $$ - select $2 -$$ language sql; -select x, pg_typeof(x) from anyctest(11, multirange(int4range(4,7))) x; - x | pg_typeof ----------+---------------- - {[4,7)} | int4multirange -(1 row) - -select x, pg_typeof(x) from anyctest(11, multirange(numrange(4,7))) x; - x | pg_typeof ----------+--------------- - {[4,7)} | nummultirange -(1 row) - -select x, pg_typeof(x) from anyctest(11, 12) x; -- fail -ERROR: function anyctest(integer, integer) does not exist -LINE 1: select x, pg_typeof(x) from anyctest(11, 12) x; - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. -select x, pg_typeof(x) from anyctest(11.2, multirange(int4range(4,7))) x; -- fail -ERROR: function anyctest(numeric, int4multirange) does not exist -LINE 1: select x, pg_typeof(x) from anyctest(11.2, multirange(int4ra... - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. -select x, pg_typeof(x) from anyctest(11.2, '{[4,7)}') x; -- fail -ERROR: could not determine polymorphic type anycompatiblemultirange because input has type unknown -drop function anyctest(anycompatible, anycompatiblemultirange); -create function anyctest(anycompatiblemultirange, anycompatiblemultirange) -returns anycompatible as $$ - select lower($1) + upper($2) -$$ language sql; -select x, pg_typeof(x) from anyctest(multirange(int4range(11,12)), multirange(int4range(4,7))) x; - x | pg_typeof -----+----------- - 18 | integer -(1 row) - -select x, pg_typeof(x) from anyctest(multirange(int4range(11,12)), multirange(numrange(4,7))) x; -- fail -ERROR: function anyctest(int4multirange, nummultirange) does not exist -LINE 1: select x, pg_typeof(x) from anyctest(multirange(int4range(11... - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. -drop function anyctest(anycompatiblemultirange, anycompatiblemultirange); --- fail, can't infer result type: -create function anyctest(anycompatible) -returns anycompatiblemultirange as $$ - select $1 -$$ language sql; -ERROR: cannot determine result data type -DETAIL: A result of type anycompatiblemultirange requires at least one input of type anycompatiblerange or anycompatiblemultirange. -create function anyctest(anycompatiblenonarray, anycompatiblenonarray) -returns anycompatiblearray as $$ - select array[$1, $2] -$$ language sql; -select x, pg_typeof(x) from anyctest(11, 12) x; - x | pg_typeof ----------+----------- - {11,12} | integer[] -(1 row) - -select x, pg_typeof(x) from anyctest(11, 12.3) x; - x | pg_typeof ------------+----------- - {11,12.3} | numeric[] -(1 row) - -select x, pg_typeof(x) from anyctest(array[11], array[1,2]) x; -- fail -ERROR: function anyctest(integer[], integer[]) does not exist -LINE 1: select x, pg_typeof(x) from anyctest(array[11], array[1,2]) ... - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. -drop function anyctest(anycompatiblenonarray, anycompatiblenonarray); -create function anyctest(a anyelement, b anyarray, - c anycompatible, d anycompatible) -returns anycompatiblearray as $$ - select array[c, d] -$$ language sql; -select x, pg_typeof(x) from anyctest(11, array[1, 2], 42, 34.5) x; - x | pg_typeof ------------+----------- - {42,34.5} | numeric[] -(1 row) - -select x, pg_typeof(x) from anyctest(11, array[1, 2], point(1,2), point(3,4)) x; - x | pg_typeof --------------------+----------- - {"(1,2)","(3,4)"} | point[] -(1 row) - -select x, pg_typeof(x) from anyctest(11, '{1,2}', point(1,2), '(3,4)') x; - x | pg_typeof --------------------+----------- - {"(1,2)","(3,4)"} | point[] -(1 row) - -select x, pg_typeof(x) from anyctest(11, array[1, 2.2], 42, 34.5) x; -- fail -ERROR: function anyctest(integer, numeric[], integer, numeric) does not exist -LINE 1: select x, pg_typeof(x) from anyctest(11, array[1, 2.2], 42, ... - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. -drop function anyctest(a anyelement, b anyarray, - c anycompatible, d anycompatible); -create function anyctest(variadic anycompatiblearray) -returns anycompatiblearray as $$ - select $1 -$$ language sql; -select x, pg_typeof(x) from anyctest(11, 12) x; - x | pg_typeof ----------+----------- - {11,12} | integer[] -(1 row) - -select x, pg_typeof(x) from anyctest(11, 12.2) x; - x | pg_typeof ------------+----------- - {11,12.2} | numeric[] -(1 row) - -select x, pg_typeof(x) from anyctest(11, '12') x; - x | pg_typeof ----------+----------- - {11,12} | integer[] -(1 row) - -select x, pg_typeof(x) from anyctest(11, '12.2') x; -- fail -ERROR: invalid input syntax for type integer: "12.2" -LINE 1: select x, pg_typeof(x) from anyctest(11, '12.2') x; - ^ -select x, pg_typeof(x) from anyctest(variadic array[11, 12]) x; - x | pg_typeof ----------+----------- - {11,12} | integer[] -(1 row) - -select x, pg_typeof(x) from anyctest(variadic array[11, 12.2]) x; - x | pg_typeof ------------+----------- - {11,12.2} | numeric[] -(1 row) - -drop function anyctest(variadic anycompatiblearray); +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/rowtypes.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/rowtypes.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/rowtypes.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/rowtypes.out 2023-02-20 19:48:42.699218610 -0500 @@ -1,1242 +1 @@ --- --- ROWTYPES --- --- Make both a standalone composite type and a table rowtype -create type complex as (r float8, i float8); -create temp table fullname (first text, last text); --- Nested composite -create type quad as (c1 complex, c2 complex); --- Some simple tests of I/O conversions and row construction -select (1.1,2.2)::complex, row((3.3,4.4),(5.5,null))::quad; - row | row ------------+------------------------ - (1.1,2.2) | ("(3.3,4.4)","(5.5,)") -(1 row) - -select row('Joe', 'Blow')::fullname, '(Joe,Blow)'::fullname; - row | fullname -------------+------------ - (Joe,Blow) | (Joe,Blow) -(1 row) - -select '(Joe,von Blow)'::fullname, '(Joe,d''Blow)'::fullname; - fullname | fullname -------------------+-------------- - (Joe,"von Blow") | (Joe,d'Blow) -(1 row) - -select '(Joe,"von""Blow")'::fullname, E'(Joe,d\\\\Blow)'::fullname; - fullname | fullname --------------------+----------------- - (Joe,"von""Blow") | (Joe,"d\\Blow") -(1 row) - -select '(Joe,"Blow,Jr")'::fullname; - fullname ------------------ - (Joe,"Blow,Jr") -(1 row) - -select '(Joe,)'::fullname; -- ok, null 2nd column - fullname ----------- - (Joe,) -(1 row) - -select '(Joe)'::fullname; -- bad -ERROR: malformed record literal: "(Joe)" -LINE 1: select '(Joe)'::fullname; - ^ -DETAIL: Too few columns. -select '(Joe,,)'::fullname; -- bad -ERROR: malformed record literal: "(Joe,,)" -LINE 1: select '(Joe,,)'::fullname; - ^ -DETAIL: Too many columns. -select '[]'::fullname; -- bad -ERROR: malformed record literal: "[]" -LINE 1: select '[]'::fullname; - ^ -DETAIL: Missing left parenthesis. -select ' (Joe,Blow) '::fullname; -- ok, extra whitespace - fullname ------------- - (Joe,Blow) -(1 row) - -select '(Joe,Blow) /'::fullname; -- bad -ERROR: malformed record literal: "(Joe,Blow) /" -LINE 1: select '(Joe,Blow) /'::fullname; - ^ -DETAIL: Junk after right parenthesis. -create temp table quadtable(f1 int, q quad); -insert into quadtable values (1, ((3.3,4.4),(5.5,6.6))); -insert into quadtable values (2, ((null,4.4),(5.5,6.6))); -select * from quadtable; - f1 | q -----+--------------------------- - 1 | ("(3.3,4.4)","(5.5,6.6)") - 2 | ("(,4.4)","(5.5,6.6)") -(2 rows) - -select f1, q.c1 from quadtable; -- fails, q is a table reference -ERROR: missing FROM-clause entry for table "q" -LINE 1: select f1, q.c1 from quadtable; - ^ -select f1, (q).c1, (qq.q).c1.i from quadtable qq; - f1 | c1 | i -----+-----------+----- - 1 | (3.3,4.4) | 4.4 - 2 | (,4.4) | 4.4 -(2 rows) - -create temp table people (fn fullname, bd date); -insert into people values ('(Joe,Blow)', '1984-01-10'); -select * from people; - fn | bd -------------+------------ - (Joe,Blow) | 01-10-1984 -(1 row) - --- at the moment this will not work due to ALTER TABLE inadequacy: -alter table fullname add column suffix text default ''; -ERROR: cannot alter table "fullname" because column "people.fn" uses its row type --- but this should work: -alter table fullname add column suffix text default null; -select * from people; - fn | bd --------------+------------ - (Joe,Blow,) | 01-10-1984 -(1 row) - --- test insertion/updating of subfields -update people set fn.suffix = 'Jr'; -select * from people; - fn | bd ----------------+------------ - (Joe,Blow,Jr) | 01-10-1984 -(1 row) - -insert into quadtable (f1, q.c1.r, q.c2.i) values(44,55,66); -update quadtable set q.c1.r = 12 where f1 = 2; -update quadtable set q.c1 = 12; -- error, type mismatch -ERROR: subfield "c1" is of type complex but expression is of type integer -LINE 1: update quadtable set q.c1 = 12; - ^ -HINT: You will need to rewrite or cast the expression. -select * from quadtable; - f1 | q -----+--------------------------- - 1 | ("(3.3,4.4)","(5.5,6.6)") - 44 | ("(55,)","(,66)") - 2 | ("(12,4.4)","(5.5,6.6)") -(3 rows) - --- The object here is to ensure that toasted references inside --- composite values don't cause problems. The large f1 value will --- be toasted inside pp, it must still work after being copied to people. -create temp table pp (f1 text); -insert into pp values (repeat('abcdefghijkl', 100000)); -insert into people select ('Jim', f1, null)::fullname, current_date from pp; -select (fn).first, substr((fn).last, 1, 20), length((fn).last) from people; - first | substr | length --------+----------------------+--------- - Joe | Blow | 4 - Jim | abcdefghijklabcdefgh | 1200000 -(2 rows) - --- Test row comparison semantics. Prior to PG 8.2 we did this in a totally --- non-spec-compliant way. -select ROW(1,2) < ROW(1,3) as true; - true ------- - t -(1 row) - -select ROW(1,2) < ROW(1,1) as false; - false -------- - f -(1 row) - -select ROW(1,2) < ROW(1,NULL) as null; - null ------- - -(1 row) - -select ROW(1,2,3) < ROW(1,3,NULL) as true; -- the NULL is not examined - true ------- - t -(1 row) - -select ROW(11,'ABC') < ROW(11,'DEF') as true; - true ------- - t -(1 row) - -select ROW(11,'ABC') > ROW(11,'DEF') as false; - false -------- - f -(1 row) - -select ROW(12,'ABC') > ROW(11,'DEF') as true; - true ------- - t -(1 row) - --- = and <> have different NULL-behavior than < etc -select ROW(1,2,3) < ROW(1,NULL,4) as null; - null ------- - -(1 row) - -select ROW(1,2,3) = ROW(1,NULL,4) as false; - false -------- - f -(1 row) - -select ROW(1,2,3) <> ROW(1,NULL,4) as true; - true ------- - t -(1 row) - --- We allow operators beyond the six standard ones, if they have btree --- operator classes. -select ROW('ABC','DEF') ~<=~ ROW('DEF','ABC') as true; - true ------- - t -(1 row) - -select ROW('ABC','DEF') ~>=~ ROW('DEF','ABC') as false; - false -------- - f -(1 row) - -select ROW('ABC','DEF') ~~ ROW('DEF','ABC') as fail; -ERROR: could not determine interpretation of row comparison operator ~~ -LINE 1: select ROW('ABC','DEF') ~~ ROW('DEF','ABC') as fail; - ^ -HINT: Row comparison operators must be associated with btree operator families. --- Comparisons of ROW() expressions can cope with some type mismatches -select ROW(1,2) = ROW(1,2::int8); - ?column? ----------- - t -(1 row) - -select ROW(1,2) in (ROW(3,4), ROW(1,2)); - ?column? ----------- - t -(1 row) - -select ROW(1,2) in (ROW(3,4), ROW(1,2::int8)); - ?column? ----------- - t -(1 row) - --- Check row comparison with a subselect -select unique1, unique2 from tenk1 -where (unique1, unique2) < any (select ten, ten from tenk1 where hundred < 3) - and unique1 <= 20 -order by 1; - unique1 | unique2 ----------+--------- - 0 | 9998 - 1 | 2838 -(2 rows) - --- Also check row comparison with an indexable condition -explain (costs off) -select thousand, tenthous from tenk1 -where (thousand, tenthous) >= (997, 5000) -order by thousand, tenthous; - QUERY PLAN ------------------------------------------------------------ - Index Only Scan using tenk1_thous_tenthous on tenk1 - Index Cond: (ROW(thousand, tenthous) >= ROW(997, 5000)) -(2 rows) - -select thousand, tenthous from tenk1 -where (thousand, tenthous) >= (997, 5000) -order by thousand, tenthous; - thousand | tenthous -----------+---------- - 997 | 5997 - 997 | 6997 - 997 | 7997 - 997 | 8997 - 997 | 9997 - 998 | 998 - 998 | 1998 - 998 | 2998 - 998 | 3998 - 998 | 4998 - 998 | 5998 - 998 | 6998 - 998 | 7998 - 998 | 8998 - 998 | 9998 - 999 | 999 - 999 | 1999 - 999 | 2999 - 999 | 3999 - 999 | 4999 - 999 | 5999 - 999 | 6999 - 999 | 7999 - 999 | 8999 - 999 | 9999 -(25 rows) - -explain (costs off) -select thousand, tenthous, four from tenk1 -where (thousand, tenthous, four) > (998, 5000, 3) -order by thousand, tenthous; - QUERY PLAN ------------------------------------------------------------------------ - Sort - Sort Key: thousand, tenthous - -> Bitmap Heap Scan on tenk1 - Filter: (ROW(thousand, tenthous, four) > ROW(998, 5000, 3)) - -> Bitmap Index Scan on tenk1_thous_tenthous - Index Cond: (ROW(thousand, tenthous) >= ROW(998, 5000)) -(6 rows) - -select thousand, tenthous, four from tenk1 -where (thousand, tenthous, four) > (998, 5000, 3) -order by thousand, tenthous; - thousand | tenthous | four -----------+----------+------ - 998 | 5998 | 2 - 998 | 6998 | 2 - 998 | 7998 | 2 - 998 | 8998 | 2 - 998 | 9998 | 2 - 999 | 999 | 3 - 999 | 1999 | 3 - 999 | 2999 | 3 - 999 | 3999 | 3 - 999 | 4999 | 3 - 999 | 5999 | 3 - 999 | 6999 | 3 - 999 | 7999 | 3 - 999 | 8999 | 3 - 999 | 9999 | 3 -(15 rows) - -explain (costs off) -select thousand, tenthous from tenk1 -where (998, 5000) < (thousand, tenthous) -order by thousand, tenthous; - QUERY PLAN ----------------------------------------------------------- - Index Only Scan using tenk1_thous_tenthous on tenk1 - Index Cond: (ROW(thousand, tenthous) > ROW(998, 5000)) -(2 rows) - -select thousand, tenthous from tenk1 -where (998, 5000) < (thousand, tenthous) -order by thousand, tenthous; - thousand | tenthous -----------+---------- - 998 | 5998 - 998 | 6998 - 998 | 7998 - 998 | 8998 - 998 | 9998 - 999 | 999 - 999 | 1999 - 999 | 2999 - 999 | 3999 - 999 | 4999 - 999 | 5999 - 999 | 6999 - 999 | 7999 - 999 | 8999 - 999 | 9999 -(15 rows) - -explain (costs off) -select thousand, hundred from tenk1 -where (998, 5000) < (thousand, hundred) -order by thousand, hundred; - QUERY PLAN ------------------------------------------------------------ - Sort - Sort Key: thousand, hundred - -> Bitmap Heap Scan on tenk1 - Filter: (ROW(998, 5000) < ROW(thousand, hundred)) - -> Bitmap Index Scan on tenk1_thous_tenthous - Index Cond: (thousand >= 998) -(6 rows) - -select thousand, hundred from tenk1 -where (998, 5000) < (thousand, hundred) -order by thousand, hundred; - thousand | hundred -----------+--------- - 999 | 99 - 999 | 99 - 999 | 99 - 999 | 99 - 999 | 99 - 999 | 99 - 999 | 99 - 999 | 99 - 999 | 99 - 999 | 99 -(10 rows) - --- Test case for bug #14010: indexed row comparisons fail with nulls -create temp table test_table (a text, b text); -insert into test_table values ('a', 'b'); -insert into test_table select 'a', null from generate_series(1,1000); -insert into test_table values ('b', 'a'); -create index on test_table (a,b); -set enable_sort = off; -explain (costs off) -select a,b from test_table where (a,b) > ('a','a') order by a,b; - QUERY PLAN --------------------------------------------------------- - Index Only Scan using test_table_a_b_idx on test_table - Index Cond: (ROW(a, b) > ROW('a'::text, 'a'::text)) -(2 rows) - -select a,b from test_table where (a,b) > ('a','a') order by a,b; - a | b ----+--- - a | b - b | a -(2 rows) - -reset enable_sort; --- Check row comparisons with IN -select * from int8_tbl i8 where i8 in (row(123,456)); -- fail, type mismatch -ERROR: cannot compare dissimilar column types bigint and integer at record column 1 -explain (costs off) -select * from int8_tbl i8 -where i8 in (row(123,456)::int8_tbl, '(4567890123456789,123)'); - QUERY PLAN -------------------------------------------------------------------------------- - Seq Scan on int8_tbl i8 - Filter: (i8.* = ANY ('{"(123,456)","(4567890123456789,123)"}'::int8_tbl[])) -(2 rows) - -select * from int8_tbl i8 -where i8 in (row(123,456)::int8_tbl, '(4567890123456789,123)'); - q1 | q2 -------------------+----- - 123 | 456 - 4567890123456789 | 123 -(2 rows) - --- Check ability to select columns from an anonymous rowtype -select (row(1, 2.0)).f1; - f1 ----- - 1 -(1 row) - -select (row(1, 2.0)).f2; - f2 ------ - 2.0 -(1 row) - -select (row(1, 2.0)).nosuch; -- fail -ERROR: could not identify column "nosuch" in record data type -LINE 1: select (row(1, 2.0)).nosuch; - ^ -select (row(1, 2.0)).*; - f1 | f2 -----+----- - 1 | 2.0 -(1 row) - -select (r).f1 from (select row(1, 2.0) as r) ss; - f1 ----- - 1 -(1 row) - -select (r).f3 from (select row(1, 2.0) as r) ss; -- fail -ERROR: could not identify column "f3" in record data type -LINE 1: select (r).f3 from (select row(1, 2.0) as r) ss; - ^ -select (r).* from (select row(1, 2.0) as r) ss; - f1 | f2 -----+----- - 1 | 2.0 -(1 row) - --- Check some corner cases involving empty rowtypes -select ROW(); - row ------ - () -(1 row) - -select ROW() IS NULL; - ?column? ----------- - t -(1 row) - -select ROW() = ROW(); -ERROR: cannot compare rows of zero length -LINE 1: select ROW() = ROW(); - ^ --- Check ability to create arrays of anonymous rowtypes -select array[ row(1,2), row(3,4), row(5,6) ]; - array ---------------------------- - {"(1,2)","(3,4)","(5,6)"} -(1 row) - --- Check ability to compare an anonymous row to elements of an array -select row(1,1.1) = any (array[ row(7,7.7), row(1,1.1), row(0,0.0) ]); - ?column? ----------- - t -(1 row) - -select row(1,1.1) = any (array[ row(7,7.7), row(1,1.0), row(0,0.0) ]); - ?column? ----------- - f -(1 row) - --- Check behavior with a non-comparable rowtype -create type cantcompare as (p point, r float8); -create temp table cc (f1 cantcompare); -insert into cc values('("(1,2)",3)'); -insert into cc values('("(4,5)",6)'); -select * from cc order by f1; -- fail, but should complain about cantcompare -ERROR: could not identify an ordering operator for type cantcompare -LINE 1: select * from cc order by f1; - ^ -HINT: Use an explicit ordering operator or modify the query. --- --- Tests for record_{eq,cmp} --- -create type testtype1 as (a int, b int); --- all true -select row(1, 2)::testtype1 < row(1, 3)::testtype1; - ?column? ----------- - t -(1 row) - -select row(1, 2)::testtype1 <= row(1, 3)::testtype1; - ?column? ----------- - t -(1 row) - -select row(1, 2)::testtype1 = row(1, 2)::testtype1; - ?column? ----------- - t -(1 row) - -select row(1, 2)::testtype1 <> row(1, 3)::testtype1; - ?column? ----------- - t -(1 row) - -select row(1, 3)::testtype1 >= row(1, 2)::testtype1; - ?column? ----------- - t -(1 row) - -select row(1, 3)::testtype1 > row(1, 2)::testtype1; - ?column? ----------- - t -(1 row) - --- all false -select row(1, -2)::testtype1 < row(1, -3)::testtype1; - ?column? ----------- - f -(1 row) - -select row(1, -2)::testtype1 <= row(1, -3)::testtype1; - ?column? ----------- - f -(1 row) - -select row(1, -2)::testtype1 = row(1, -3)::testtype1; - ?column? ----------- - f -(1 row) - -select row(1, -2)::testtype1 <> row(1, -2)::testtype1; - ?column? ----------- - f -(1 row) - -select row(1, -3)::testtype1 >= row(1, -2)::testtype1; - ?column? ----------- - f -(1 row) - -select row(1, -3)::testtype1 > row(1, -2)::testtype1; - ?column? ----------- - f -(1 row) - --- true, but see *< below -select row(1, -2)::testtype1 < row(1, 3)::testtype1; - ?column? ----------- - t -(1 row) - --- mismatches -create type testtype3 as (a int, b text); -select row(1, 2)::testtype1 < row(1, 'abc')::testtype3; -ERROR: cannot compare dissimilar column types integer and text at record column 2 -select row(1, 2)::testtype1 <> row(1, 'abc')::testtype3; -ERROR: cannot compare dissimilar column types integer and text at record column 2 -create type testtype5 as (a int); -select row(1, 2)::testtype1 < row(1)::testtype5; -ERROR: cannot compare record types with different numbers of columns -select row(1, 2)::testtype1 <> row(1)::testtype5; -ERROR: cannot compare record types with different numbers of columns --- non-comparable types -create type testtype6 as (a int, b point); -select row(1, '(1,2)')::testtype6 < row(1, '(1,3)')::testtype6; -ERROR: could not identify a comparison function for type point -select row(1, '(1,2)')::testtype6 <> row(1, '(1,3)')::testtype6; -ERROR: could not identify an equality operator for type point -drop type testtype1, testtype3, testtype5, testtype6; --- --- Tests for record_image_{eq,cmp} --- -create type testtype1 as (a int, b int); --- all true -select row(1, 2)::testtype1 *< row(1, 3)::testtype1; - ?column? ----------- - t -(1 row) - -select row(1, 2)::testtype1 *<= row(1, 3)::testtype1; - ?column? ----------- - t -(1 row) - -select row(1, 2)::testtype1 *= row(1, 2)::testtype1; - ?column? ----------- - t -(1 row) - -select row(1, 2)::testtype1 *<> row(1, 3)::testtype1; - ?column? ----------- - t -(1 row) - -select row(1, 3)::testtype1 *>= row(1, 2)::testtype1; - ?column? ----------- - t -(1 row) - -select row(1, 3)::testtype1 *> row(1, 2)::testtype1; - ?column? ----------- - t -(1 row) - --- all false -select row(1, -2)::testtype1 *< row(1, -3)::testtype1; - ?column? ----------- - f -(1 row) - -select row(1, -2)::testtype1 *<= row(1, -3)::testtype1; - ?column? ----------- - f -(1 row) - -select row(1, -2)::testtype1 *= row(1, -3)::testtype1; - ?column? ----------- - f -(1 row) - -select row(1, -2)::testtype1 *<> row(1, -2)::testtype1; - ?column? ----------- - f -(1 row) - -select row(1, -3)::testtype1 *>= row(1, -2)::testtype1; - ?column? ----------- - f -(1 row) - -select row(1, -3)::testtype1 *> row(1, -2)::testtype1; - ?column? ----------- - f -(1 row) - --- This returns the "wrong" order because record_image_cmp works on --- unsigned datums without knowing about the actual data type. -select row(1, -2)::testtype1 *< row(1, 3)::testtype1; - ?column? ----------- - f -(1 row) - --- other types -create type testtype2 as (a smallint, b bool); -- byval different sizes -select row(1, true)::testtype2 *< row(2, true)::testtype2; - ?column? ----------- - t -(1 row) - -select row(-2, true)::testtype2 *< row(-1, true)::testtype2; - ?column? ----------- - t -(1 row) - -select row(0, false)::testtype2 *< row(0, true)::testtype2; - ?column? ----------- - t -(1 row) - -select row(0, false)::testtype2 *<> row(0, true)::testtype2; - ?column? ----------- - t -(1 row) - -create type testtype3 as (a int, b text); -- variable length -select row(1, 'abc')::testtype3 *< row(1, 'abd')::testtype3; - ?column? ----------- - t -(1 row) - -select row(1, 'abc')::testtype3 *< row(1, 'abcd')::testtype3; - ?column? ----------- - t -(1 row) - -select row(1, 'abc')::testtype3 *> row(1, 'abd')::testtype3; - ?column? ----------- - f -(1 row) - -select row(1, 'abc')::testtype3 *<> row(1, 'abd')::testtype3; - ?column? ----------- - t -(1 row) - -create type testtype4 as (a int, b point); -- by ref, fixed length -select row(1, '(1,2)')::testtype4 *< row(1, '(1,3)')::testtype4; - ?column? ----------- - t -(1 row) - -select row(1, '(1,2)')::testtype4 *<> row(1, '(1,3)')::testtype4; - ?column? ----------- - t -(1 row) - --- mismatches -select row(1, 2)::testtype1 *< row(1, 'abc')::testtype3; -ERROR: cannot compare dissimilar column types integer and text at record column 2 -select row(1, 2)::testtype1 *<> row(1, 'abc')::testtype3; -ERROR: cannot compare dissimilar column types integer and text at record column 2 -create type testtype5 as (a int); -select row(1, 2)::testtype1 *< row(1)::testtype5; -ERROR: cannot compare record types with different numbers of columns -select row(1, 2)::testtype1 *<> row(1)::testtype5; -ERROR: cannot compare record types with different numbers of columns --- non-comparable types -create type testtype6 as (a int, b point); -select row(1, '(1,2)')::testtype6 *< row(1, '(1,3)')::testtype6; - ?column? ----------- - t -(1 row) - -select row(1, '(1,2)')::testtype6 *>= row(1, '(1,3)')::testtype6; - ?column? ----------- - f -(1 row) - -select row(1, '(1,2)')::testtype6 *<> row(1, '(1,3)')::testtype6; - ?column? ----------- - t -(1 row) - --- anonymous rowtypes in coldeflists -select q.a, q.b = row(2), q.c = array[row(3)], q.d = row(row(4)) from - unnest(array[row(1, row(2), array[row(3)], row(row(4))), - row(2, row(3), array[row(4)], row(row(5)))]) - as q(a int, b record, c record[], d record); - a | ?column? | ?column? | ?column? ----+----------+----------+---------- - 1 | t | t | t - 2 | f | f | f -(2 rows) - -drop type testtype1, testtype2, testtype3, testtype4, testtype5, testtype6; --- --- Test case derived from bug #5716: check multiple uses of a rowtype result --- -BEGIN; -CREATE TABLE price ( - id SERIAL PRIMARY KEY, - active BOOLEAN NOT NULL, - price NUMERIC -); -CREATE TYPE price_input AS ( - id INTEGER, - price NUMERIC -); -CREATE TYPE price_key AS ( - id INTEGER -); -CREATE FUNCTION price_key_from_table(price) RETURNS price_key AS $$ - SELECT $1.id -$$ LANGUAGE SQL; -CREATE FUNCTION price_key_from_input(price_input) RETURNS price_key AS $$ - SELECT $1.id -$$ LANGUAGE SQL; -insert into price values (1,false,42), (10,false,100), (11,true,17.99); -UPDATE price - SET active = true, price = input_prices.price - FROM unnest(ARRAY[(10, 123.00), (11, 99.99)]::price_input[]) input_prices - WHERE price_key_from_table(price.*) = price_key_from_input(input_prices.*); -select * from price; - id | active | price -----+--------+-------- - 1 | f | 42 - 10 | t | 123.00 - 11 | t | 99.99 -(3 rows) - -rollback; --- --- Test case derived from bug #9085: check * qualification of composite --- parameters for SQL functions --- -create temp table compos (f1 int, f2 text); -create function fcompos1(v compos) returns void as $$ -insert into compos values (v); -- fail -$$ language sql; -ERROR: column "f1" is of type integer but expression is of type compos -LINE 2: insert into compos values (v); -- fail - ^ -HINT: You will need to rewrite or cast the expression. -create function fcompos1(v compos) returns void as $$ -insert into compos values (v.*); -$$ language sql; -create function fcompos2(v compos) returns void as $$ -select fcompos1(v); -$$ language sql; -create function fcompos3(v compos) returns void as $$ -select fcompos1(fcompos3.v.*); -$$ language sql; -select fcompos1(row(1,'one')); - fcompos1 ----------- - -(1 row) - -select fcompos2(row(2,'two')); - fcompos2 ----------- - -(1 row) - -select fcompos3(row(3,'three')); - fcompos3 ----------- - -(1 row) - -select * from compos; - f1 | f2 -----+------- - 1 | one - 2 | two - 3 | three -(3 rows) - --- --- We allow I/O conversion casts from composite types to strings to be --- invoked via cast syntax, but not functional syntax. This is because --- the latter is too prone to be invoked unintentionally. --- -select cast (fullname as text) from fullname; - fullname ----------- -(0 rows) - -select fullname::text from fullname; - fullname ----------- -(0 rows) - -select text(fullname) from fullname; -- error -ERROR: function text(fullname) does not exist -LINE 1: select text(fullname) from fullname; - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. -select fullname.text from fullname; -- error -ERROR: column fullname.text does not exist -LINE 1: select fullname.text from fullname; - ^ --- same, but RECORD instead of named composite type: -select cast (row('Jim', 'Beam') as text); - row ------------- - (Jim,Beam) -(1 row) - -select (row('Jim', 'Beam'))::text; - row ------------- - (Jim,Beam) -(1 row) - -select text(row('Jim', 'Beam')); -- error -ERROR: function text(record) does not exist -LINE 1: select text(row('Jim', 'Beam')); - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. -select (row('Jim', 'Beam')).text; -- error -ERROR: could not identify column "text" in record data type -LINE 1: select (row('Jim', 'Beam')).text; - ^ --- --- Check the equivalence of functional and column notation --- -insert into fullname values ('Joe', 'Blow'); -select f.last from fullname f; - last ------- - Blow -(1 row) - -select last(f) from fullname f; - last ------- - Blow -(1 row) - -create function longname(fullname) returns text language sql -as $$select $1.first || ' ' || $1.last$$; -select f.longname from fullname f; - longname ----------- - Joe Blow -(1 row) - -select longname(f) from fullname f; - longname ----------- - Joe Blow -(1 row) - --- Starting in v11, the notational form does matter if there's ambiguity -alter table fullname add column longname text; -select f.longname from fullname f; - longname ----------- - -(1 row) - -select longname(f) from fullname f; - longname ----------- - Joe Blow -(1 row) - --- --- Test that composite values are seen to have the correct column names --- (bug #11210 and other reports) --- -select row_to_json(i) from int8_tbl i; - row_to_json ------------------------------------------------- - {"q1":123,"q2":456} - {"q1":123,"q2":4567890123456789} - {"q1":4567890123456789,"q2":123} - {"q1":4567890123456789,"q2":4567890123456789} - {"q1":4567890123456789,"q2":-4567890123456789} -(5 rows) - --- since "i" is of type "int8_tbl", attaching aliases doesn't change anything: -select row_to_json(i) from int8_tbl i(x,y); - row_to_json ------------------------------------------------- - {"q1":123,"q2":456} - {"q1":123,"q2":4567890123456789} - {"q1":4567890123456789,"q2":123} - {"q1":4567890123456789,"q2":4567890123456789} - {"q1":4567890123456789,"q2":-4567890123456789} -(5 rows) - --- in these examples, we'll report the exposed column names of the subselect: -select row_to_json(ss) from - (select q1, q2 from int8_tbl) as ss; - row_to_json ------------------------------------------------- - {"q1":123,"q2":456} - {"q1":123,"q2":4567890123456789} - {"q1":4567890123456789,"q2":123} - {"q1":4567890123456789,"q2":4567890123456789} - {"q1":4567890123456789,"q2":-4567890123456789} -(5 rows) - -select row_to_json(ss) from - (select q1, q2 from int8_tbl offset 0) as ss; - row_to_json ------------------------------------------------- - {"q1":123,"q2":456} - {"q1":123,"q2":4567890123456789} - {"q1":4567890123456789,"q2":123} - {"q1":4567890123456789,"q2":4567890123456789} - {"q1":4567890123456789,"q2":-4567890123456789} -(5 rows) - -select row_to_json(ss) from - (select q1 as a, q2 as b from int8_tbl) as ss; - row_to_json ----------------------------------------------- - {"a":123,"b":456} - {"a":123,"b":4567890123456789} - {"a":4567890123456789,"b":123} - {"a":4567890123456789,"b":4567890123456789} - {"a":4567890123456789,"b":-4567890123456789} -(5 rows) - -select row_to_json(ss) from - (select q1 as a, q2 as b from int8_tbl offset 0) as ss; - row_to_json ----------------------------------------------- - {"a":123,"b":456} - {"a":123,"b":4567890123456789} - {"a":4567890123456789,"b":123} - {"a":4567890123456789,"b":4567890123456789} - {"a":4567890123456789,"b":-4567890123456789} -(5 rows) - -select row_to_json(ss) from - (select q1 as a, q2 as b from int8_tbl) as ss(x,y); - row_to_json ----------------------------------------------- - {"x":123,"y":456} - {"x":123,"y":4567890123456789} - {"x":4567890123456789,"y":123} - {"x":4567890123456789,"y":4567890123456789} - {"x":4567890123456789,"y":-4567890123456789} -(5 rows) - -select row_to_json(ss) from - (select q1 as a, q2 as b from int8_tbl offset 0) as ss(x,y); - row_to_json ----------------------------------------------- - {"x":123,"y":456} - {"x":123,"y":4567890123456789} - {"x":4567890123456789,"y":123} - {"x":4567890123456789,"y":4567890123456789} - {"x":4567890123456789,"y":-4567890123456789} -(5 rows) - -explain (costs off) -select row_to_json(q) from - (select thousand, tenthous from tenk1 - where thousand = 42 and tenthous < 2000 offset 0) q; - QUERY PLAN -------------------------------------------------------------- - Subquery Scan on q - -> Index Only Scan using tenk1_thous_tenthous on tenk1 - Index Cond: ((thousand = 42) AND (tenthous < 2000)) -(3 rows) - -select row_to_json(q) from - (select thousand, tenthous from tenk1 - where thousand = 42 and tenthous < 2000 offset 0) q; - row_to_json ---------------------------------- - {"thousand":42,"tenthous":42} - {"thousand":42,"tenthous":1042} -(2 rows) - -select row_to_json(q) from - (select thousand as x, tenthous as y from tenk1 - where thousand = 42 and tenthous < 2000 offset 0) q; - row_to_json -------------------- - {"x":42,"y":42} - {"x":42,"y":1042} -(2 rows) - -select row_to_json(q) from - (select thousand as x, tenthous as y from tenk1 - where thousand = 42 and tenthous < 2000 offset 0) q(a,b); - row_to_json -------------------- - {"a":42,"b":42} - {"a":42,"b":1042} -(2 rows) - -create temp table tt1 as select * from int8_tbl limit 2; -create temp table tt2 () inherits(tt1); -insert into tt2 values(0,0); -select row_to_json(r) from (select q2,q1 from tt1 offset 0) r; - row_to_json ----------------------------------- - {"q2":456,"q1":123} - {"q2":4567890123456789,"q1":123} - {"q2":0,"q1":0} -(3 rows) - --- check no-op rowtype conversions -create temp table tt3 () inherits(tt2); -insert into tt3 values(33,44); -select row_to_json(tt3::tt2::tt1) from tt3; - row_to_json -------------------- - {"q1":33,"q2":44} -(1 row) - --- --- IS [NOT] NULL should not recurse into nested composites (bug #14235) --- -explain (verbose, costs off) -select r, r is null as isnull, r is not null as isnotnull -from (values (1,row(1,2)), (1,row(null,null)), (1,null), - (null,row(1,2)), (null,row(null,null)), (null,null) ) r(a,b); - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Values Scan on "*VALUES*" - Output: ROW("*VALUES*".column1, "*VALUES*".column2), (("*VALUES*".column1 IS NULL) AND ("*VALUES*".column2 IS NOT DISTINCT FROM NULL)), (("*VALUES*".column1 IS NOT NULL) AND ("*VALUES*".column2 IS DISTINCT FROM NULL)) -(2 rows) - -select r, r is null as isnull, r is not null as isnotnull -from (values (1,row(1,2)), (1,row(null,null)), (1,null), - (null,row(1,2)), (null,row(null,null)), (null,null) ) r(a,b); - r | isnull | isnotnull --------------+--------+----------- - (1,"(1,2)") | f | t - (1,"(,)") | f | t - (1,) | f | f - (,"(1,2)") | f | f - (,"(,)") | f | f - (,) | t | f -(6 rows) - -explain (verbose, costs off) -with r(a,b) as materialized - (values (1,row(1,2)), (1,row(null,null)), (1,null), - (null,row(1,2)), (null,row(null,null)), (null,null) ) -select r, r is null as isnull, r is not null as isnotnull from r; - QUERY PLAN ----------------------------------------------------------- - CTE Scan on r - Output: r.*, (r.* IS NULL), (r.* IS NOT NULL) - CTE r - -> Values Scan on "*VALUES*" - Output: "*VALUES*".column1, "*VALUES*".column2 -(5 rows) - -with r(a,b) as materialized - (values (1,row(1,2)), (1,row(null,null)), (1,null), - (null,row(1,2)), (null,row(null,null)), (null,null) ) -select r, r is null as isnull, r is not null as isnotnull from r; - r | isnull | isnotnull --------------+--------+----------- - (1,"(1,2)") | f | t - (1,"(,)") | f | t - (1,) | f | f - (,"(1,2)") | f | f - (,"(,)") | f | f - (,) | t | f -(6 rows) - --- --- Tests for component access / FieldSelect --- -CREATE TABLE compositetable(a text, b text); -INSERT INTO compositetable(a, b) VALUES('fa', 'fb'); --- composite type columns can't directly be accessed (error) -SELECT d.a FROM (SELECT compositetable AS d FROM compositetable) s; -ERROR: missing FROM-clause entry for table "d" -LINE 1: SELECT d.a FROM (SELECT compositetable AS d FROM compositeta... - ^ --- but can be accessed with proper parens -SELECT (d).a, (d).b FROM (SELECT compositetable AS d FROM compositetable) s; - a | b -----+---- - fa | fb -(1 row) - --- system columns can't be accessed in composite types (error) -SELECT (d).ctid FROM (SELECT compositetable AS d FROM compositetable) s; -ERROR: column "ctid" not found in data type compositetable -LINE 1: SELECT (d).ctid FROM (SELECT compositetable AS d FROM compos... - ^ --- accessing non-existing column in NULL datum errors out -SELECT (NULL::compositetable).nonexistent; -ERROR: column "nonexistent" not found in data type compositetable -LINE 1: SELECT (NULL::compositetable).nonexistent; - ^ --- existing column in a NULL composite yield NULL -SELECT (NULL::compositetable).a; - a ---- - -(1 row) - --- oids can't be accessed in composite types (error) -SELECT (NULL::compositetable).oid; -ERROR: column "oid" not found in data type compositetable -LINE 1: SELECT (NULL::compositetable).oid; - ^ -DROP TABLE compositetable; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/returning.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/returning.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/returning.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/returning.out 2023-02-20 19:48:42.659218609 -0500 @@ -1,357 +1 @@ --- --- Test INSERT/UPDATE/DELETE RETURNING --- --- Simple cases -CREATE TEMP TABLE foo (f1 serial, f2 text, f3 int default 42); -INSERT INTO foo (f2,f3) - VALUES ('test', DEFAULT), ('More', 11), (upper('more'), 7+9) - RETURNING *, f1+f3 AS sum; - f1 | f2 | f3 | sum -----+------+----+----- - 1 | test | 42 | 43 - 2 | More | 11 | 13 - 3 | MORE | 16 | 19 -(3 rows) - -SELECT * FROM foo; - f1 | f2 | f3 -----+------+---- - 1 | test | 42 - 2 | More | 11 - 3 | MORE | 16 -(3 rows) - -UPDATE foo SET f2 = lower(f2), f3 = DEFAULT RETURNING foo.*, f1+f3 AS sum13; - f1 | f2 | f3 | sum13 -----+------+----+------- - 1 | test | 42 | 43 - 2 | more | 42 | 44 - 3 | more | 42 | 45 -(3 rows) - -SELECT * FROM foo; - f1 | f2 | f3 -----+------+---- - 1 | test | 42 - 2 | more | 42 - 3 | more | 42 -(3 rows) - -DELETE FROM foo WHERE f1 > 2 RETURNING f3, f2, f1, least(f1,f3); - f3 | f2 | f1 | least -----+------+----+------- - 42 | more | 3 | 3 -(1 row) - -SELECT * FROM foo; - f1 | f2 | f3 -----+------+---- - 1 | test | 42 - 2 | more | 42 -(2 rows) - --- Subplans and initplans in the RETURNING list -INSERT INTO foo SELECT f1+10, f2, f3+99 FROM foo - RETURNING *, f1+112 IN (SELECT q1 FROM int8_tbl) AS subplan, - EXISTS(SELECT * FROM int4_tbl) AS initplan; - f1 | f2 | f3 | subplan | initplan -----+------+-----+---------+---------- - 11 | test | 141 | t | t - 12 | more | 141 | f | t -(2 rows) - -UPDATE foo SET f3 = f3 * 2 - WHERE f1 > 10 - RETURNING *, f1+112 IN (SELECT q1 FROM int8_tbl) AS subplan, - EXISTS(SELECT * FROM int4_tbl) AS initplan; - f1 | f2 | f3 | subplan | initplan -----+------+-----+---------+---------- - 11 | test | 282 | t | t - 12 | more | 282 | f | t -(2 rows) - -DELETE FROM foo - WHERE f1 > 10 - RETURNING *, f1+112 IN (SELECT q1 FROM int8_tbl) AS subplan, - EXISTS(SELECT * FROM int4_tbl) AS initplan; - f1 | f2 | f3 | subplan | initplan -----+------+-----+---------+---------- - 11 | test | 282 | t | t - 12 | more | 282 | f | t -(2 rows) - --- Joins -UPDATE foo SET f3 = f3*2 - FROM int4_tbl i - WHERE foo.f1 + 123455 = i.f1 - RETURNING foo.*, i.f1 as "i.f1"; - f1 | f2 | f3 | i.f1 -----+------+----+-------- - 1 | test | 84 | 123456 -(1 row) - -SELECT * FROM foo; - f1 | f2 | f3 -----+------+---- - 2 | more | 42 - 1 | test | 84 -(2 rows) - -DELETE FROM foo - USING int4_tbl i - WHERE foo.f1 + 123455 = i.f1 - RETURNING foo.*, i.f1 as "i.f1"; - f1 | f2 | f3 | i.f1 -----+------+----+-------- - 1 | test | 84 | 123456 -(1 row) - -SELECT * FROM foo; - f1 | f2 | f3 -----+------+---- - 2 | more | 42 -(1 row) - --- Check inheritance cases -CREATE TEMP TABLE foochild (fc int) INHERITS (foo); -INSERT INTO foochild VALUES(123,'child',999,-123); -ALTER TABLE foo ADD COLUMN f4 int8 DEFAULT 99; -SELECT * FROM foo; - f1 | f2 | f3 | f4 ------+-------+-----+---- - 2 | more | 42 | 99 - 123 | child | 999 | 99 -(2 rows) - -SELECT * FROM foochild; - f1 | f2 | f3 | fc | f4 ------+-------+-----+------+---- - 123 | child | 999 | -123 | 99 -(1 row) - -UPDATE foo SET f4 = f4 + f3 WHERE f4 = 99 RETURNING *; - f1 | f2 | f3 | f4 ------+-------+-----+------ - 2 | more | 42 | 141 - 123 | child | 999 | 1098 -(2 rows) - -SELECT * FROM foo; - f1 | f2 | f3 | f4 ------+-------+-----+------ - 2 | more | 42 | 141 - 123 | child | 999 | 1098 -(2 rows) - -SELECT * FROM foochild; - f1 | f2 | f3 | fc | f4 ------+-------+-----+------+------ - 123 | child | 999 | -123 | 1098 -(1 row) - -UPDATE foo SET f3 = f3*2 - FROM int8_tbl i - WHERE foo.f1 = i.q2 - RETURNING *; - f1 | f2 | f3 | f4 | q1 | q2 ------+-------+------+------+------------------+----- - 123 | child | 1998 | 1098 | 4567890123456789 | 123 -(1 row) - -SELECT * FROM foo; - f1 | f2 | f3 | f4 ------+-------+------+------ - 2 | more | 42 | 141 - 123 | child | 1998 | 1098 -(2 rows) - -SELECT * FROM foochild; - f1 | f2 | f3 | fc | f4 ------+-------+------+------+------ - 123 | child | 1998 | -123 | 1098 -(1 row) - -DELETE FROM foo - USING int8_tbl i - WHERE foo.f1 = i.q2 - RETURNING *; - f1 | f2 | f3 | f4 | q1 | q2 ------+-------+------+------+------------------+----- - 123 | child | 1998 | 1098 | 4567890123456789 | 123 -(1 row) - -SELECT * FROM foo; - f1 | f2 | f3 | f4 -----+------+----+----- - 2 | more | 42 | 141 -(1 row) - -SELECT * FROM foochild; - f1 | f2 | f3 | fc | f4 -----+----+----+----+---- -(0 rows) - -DROP TABLE foochild; --- Rules and views -CREATE TEMP VIEW voo AS SELECT f1, f2 FROM foo; -CREATE RULE voo_i AS ON INSERT TO voo DO INSTEAD - INSERT INTO foo VALUES(new.*, 57); -INSERT INTO voo VALUES(11,'zit'); --- fails: -INSERT INTO voo VALUES(12,'zoo') RETURNING *, f1*2; -ERROR: cannot perform INSERT RETURNING on relation "voo" -HINT: You need an unconditional ON INSERT DO INSTEAD rule with a RETURNING clause. --- fails, incompatible list: -CREATE OR REPLACE RULE voo_i AS ON INSERT TO voo DO INSTEAD - INSERT INTO foo VALUES(new.*, 57) RETURNING *; -ERROR: RETURNING list has too many entries -CREATE OR REPLACE RULE voo_i AS ON INSERT TO voo DO INSTEAD - INSERT INTO foo VALUES(new.*, 57) RETURNING f1, f2; --- should still work -INSERT INTO voo VALUES(13,'zit2'); --- works now -INSERT INTO voo VALUES(14,'zoo2') RETURNING *; - f1 | f2 -----+------ - 14 | zoo2 -(1 row) - -SELECT * FROM foo; - f1 | f2 | f3 | f4 -----+------+----+----- - 2 | more | 42 | 141 - 11 | zit | 57 | 99 - 13 | zit2 | 57 | 99 - 14 | zoo2 | 57 | 99 -(4 rows) - -SELECT * FROM voo; - f1 | f2 -----+------ - 2 | more - 11 | zit - 13 | zit2 - 14 | zoo2 -(4 rows) - -CREATE OR REPLACE RULE voo_u AS ON UPDATE TO voo DO INSTEAD - UPDATE foo SET f1 = new.f1, f2 = new.f2 WHERE f1 = old.f1 - RETURNING f1, f2; -update voo set f1 = f1 + 1 where f2 = 'zoo2'; -update voo set f1 = f1 + 1 where f2 = 'zoo2' RETURNING *, f1*2; - f1 | f2 | ?column? -----+------+---------- - 16 | zoo2 | 32 -(1 row) - -SELECT * FROM foo; - f1 | f2 | f3 | f4 -----+------+----+----- - 2 | more | 42 | 141 - 11 | zit | 57 | 99 - 13 | zit2 | 57 | 99 - 16 | zoo2 | 57 | 99 -(4 rows) - -SELECT * FROM voo; - f1 | f2 -----+------ - 2 | more - 11 | zit - 13 | zit2 - 16 | zoo2 -(4 rows) - -CREATE OR REPLACE RULE voo_d AS ON DELETE TO voo DO INSTEAD - DELETE FROM foo WHERE f1 = old.f1 - RETURNING f1, f2; -DELETE FROM foo WHERE f1 = 13; -DELETE FROM foo WHERE f2 = 'zit' RETURNING *; - f1 | f2 | f3 | f4 -----+-----+----+---- - 11 | zit | 57 | 99 -(1 row) - -SELECT * FROM foo; - f1 | f2 | f3 | f4 -----+------+----+----- - 2 | more | 42 | 141 - 16 | zoo2 | 57 | 99 -(2 rows) - -SELECT * FROM voo; - f1 | f2 -----+------ - 2 | more - 16 | zoo2 -(2 rows) - --- Try a join case -CREATE TEMP TABLE joinme (f2j text, other int); -INSERT INTO joinme VALUES('more', 12345); -INSERT INTO joinme VALUES('zoo2', 54321); -INSERT INTO joinme VALUES('other', 0); -CREATE TEMP VIEW joinview AS - SELECT foo.*, other FROM foo JOIN joinme ON (f2 = f2j); -SELECT * FROM joinview; - f1 | f2 | f3 | f4 | other -----+------+----+-----+------- - 2 | more | 42 | 141 | 12345 - 16 | zoo2 | 57 | 99 | 54321 -(2 rows) - -CREATE RULE joinview_u AS ON UPDATE TO joinview DO INSTEAD - UPDATE foo SET f1 = new.f1, f3 = new.f3 - FROM joinme WHERE f2 = f2j AND f2 = old.f2 - RETURNING foo.*, other; -UPDATE joinview SET f1 = f1 + 1 WHERE f3 = 57 RETURNING *, other + 1; - f1 | f2 | f3 | f4 | other | ?column? -----+------+----+----+-------+---------- - 17 | zoo2 | 57 | 99 | 54321 | 54322 -(1 row) - -SELECT * FROM joinview; - f1 | f2 | f3 | f4 | other -----+------+----+-----+------- - 2 | more | 42 | 141 | 12345 - 17 | zoo2 | 57 | 99 | 54321 -(2 rows) - -SELECT * FROM foo; - f1 | f2 | f3 | f4 -----+------+----+----- - 2 | more | 42 | 141 - 17 | zoo2 | 57 | 99 -(2 rows) - -SELECT * FROM voo; - f1 | f2 -----+------ - 2 | more - 17 | zoo2 -(2 rows) - --- Check aliased target relation -INSERT INTO foo AS bar DEFAULT VALUES RETURNING *; -- ok - f1 | f2 | f3 | f4 -----+----+----+---- - 4 | | 42 | 99 -(1 row) - -INSERT INTO foo AS bar DEFAULT VALUES RETURNING foo.*; -- fails, wrong name -ERROR: invalid reference to FROM-clause entry for table "foo" -LINE 1: INSERT INTO foo AS bar DEFAULT VALUES RETURNING foo.*; - ^ -HINT: Perhaps you meant to reference the table alias "bar". -INSERT INTO foo AS bar DEFAULT VALUES RETURNING bar.*; -- ok - f1 | f2 | f3 | f4 -----+----+----+---- - 5 | | 42 | 99 -(1 row) - -INSERT INTO foo AS bar DEFAULT VALUES RETURNING bar.f3; -- ok - f3 ----- - 42 -(1 row) - +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/largeobject.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/largeobject.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/largeobject.out 2023-02-20 19:42:50.349203492 -0500 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/largeobject.out 2023-02-20 19:48:43.029218624 -0500 @@ -1,492 +1 @@ --- --- Test large object support --- --- ensure consistent test output regardless of the default bytea format -SET bytea_output TO escape; --- Load a file -CREATE TABLE lotest_stash_values (loid oid, fd integer); --- lo_creat(mode integer) returns oid --- The mode arg to lo_creat is unused, some vestigal holdover from ancient times --- returns the large object id -INSERT INTO lotest_stash_values (loid) SELECT lo_creat(42); --- Test ALTER LARGE OBJECT -CREATE ROLE regress_lo_user; -DO $$ - BEGIN - EXECUTE 'ALTER LARGE OBJECT ' || (select loid from lotest_stash_values) - || ' OWNER TO regress_lo_user'; - END -$$; -SELECT - rol.rolname -FROM - lotest_stash_values s - JOIN pg_largeobject_metadata lo ON s.loid = lo.oid - JOIN pg_authid rol ON lo.lomowner = rol.oid; - rolname ------------------ - regress_lo_user -(1 row) - --- NOTE: large objects require transactions -BEGIN; --- lo_open(lobjId oid, mode integer) returns integer --- The mode parameter to lo_open uses two constants: --- INV_READ = 0x20000 --- INV_WRITE = 0x40000 --- The return value is a file descriptor-like value which remains valid for the --- transaction. -UPDATE lotest_stash_values SET fd = lo_open(loid, CAST(x'20000' | x'40000' AS integer)); --- loread/lowrite names are wonky, different from other functions which are lo_* --- lowrite(fd integer, data bytea) returns integer --- the integer is the number of bytes written -SELECT lowrite(fd, ' -I wandered lonely as a cloud -That floats on high o''er vales and hills, -When all at once I saw a crowd, -A host, of golden daffodils; -Beside the lake, beneath the trees, -Fluttering and dancing in the breeze. - -Continuous as the stars that shine -And twinkle on the milky way, -They stretched in never-ending line -Along the margin of a bay: -Ten thousand saw I at a glance, -Tossing their heads in sprightly dance. - -The waves beside them danced; but they -Out-did the sparkling waves in glee: -A poet could not but be gay, -In such a jocund company: -I gazed--and gazed--but little thought -What wealth the show to me had brought: - -For oft, when on my couch I lie -In vacant or in pensive mood, -They flash upon that inward eye -Which is the bliss of solitude; -And then my heart with pleasure fills, -And dances with the daffodils. - - -- William Wordsworth -') FROM lotest_stash_values; - lowrite ---------- - 848 -(1 row) - --- lo_close(fd integer) returns integer --- return value is 0 for success, or <0 for error (actually only -1, but...) -SELECT lo_close(fd) FROM lotest_stash_values; - lo_close ----------- - 0 -(1 row) - -END; --- Copy to another large object. --- Note: we intentionally don't remove the object created here; --- it's left behind to help test pg_dump. -SELECT lo_from_bytea(0, lo_get(loid)) AS newloid FROM lotest_stash_values -\gset --- Add a comment to it, as well, for pg_dump/pg_upgrade testing. -COMMENT ON LARGE OBJECT :newloid IS 'I Wandered Lonely as a Cloud'; --- Read out a portion -BEGIN; -UPDATE lotest_stash_values SET fd=lo_open(loid, CAST(x'20000' | x'40000' AS integer)); --- lo_lseek(fd integer, offset integer, whence integer) returns integer --- offset is in bytes, whence is one of three values: --- SEEK_SET (= 0) meaning relative to beginning --- SEEK_CUR (= 1) meaning relative to current position --- SEEK_END (= 2) meaning relative to end (offset better be negative) --- returns current position in file -SELECT lo_lseek(fd, 104, 0) FROM lotest_stash_values; - lo_lseek ----------- - 104 -(1 row) - --- loread/lowrite names are wonky, different from other functions which are lo_* --- loread(fd integer, len integer) returns bytea -SELECT loread(fd, 28) FROM lotest_stash_values; - loread ------------------------------- - A host, of golden daffodils; -(1 row) - -SELECT lo_lseek(fd, -19, 1) FROM lotest_stash_values; - lo_lseek ----------- - 113 -(1 row) - -SELECT lowrite(fd, 'n') FROM lotest_stash_values; - lowrite ---------- - 1 -(1 row) - -SELECT lo_tell(fd) FROM lotest_stash_values; - lo_tell ---------- - 114 -(1 row) - -SELECT lo_lseek(fd, -744, 2) FROM lotest_stash_values; - lo_lseek ----------- - 104 -(1 row) - -SELECT loread(fd, 28) FROM lotest_stash_values; - loread ------------------------------- - A host, on golden daffodils; -(1 row) - -SELECT lo_close(fd) FROM lotest_stash_values; - lo_close ----------- - 0 -(1 row) - -END; --- Test resource management -BEGIN; -SELECT lo_open(loid, x'40000'::int) from lotest_stash_values; - lo_open ---------- - 0 -(1 row) - -ABORT; -DO $$ -DECLARE - loid oid; -BEGIN - SELECT tbl.loid INTO loid FROM lotest_stash_values tbl; - PERFORM lo_export(loid, '/builddir/build/BUILD/postgresql-14.3/src/test/regress/results/invalid/path'); -EXCEPTION - WHEN UNDEFINED_FILE THEN RAISE NOTICE 'could not open file, as expected'; -END; -$$; -NOTICE: could not open file, as expected --- Test truncation. -BEGIN; -UPDATE lotest_stash_values SET fd=lo_open(loid, CAST(x'20000' | x'40000' AS integer)); -SELECT lo_truncate(fd, 11) FROM lotest_stash_values; - lo_truncate -------------- - 0 -(1 row) - -SELECT loread(fd, 15) FROM lotest_stash_values; - loread ----------------- - \012I wandered -(1 row) - -SELECT lo_truncate(fd, 10000) FROM lotest_stash_values; - lo_truncate -------------- - 0 -(1 row) - -SELECT loread(fd, 10) FROM lotest_stash_values; - loread ------------------------------------------- - \000\000\000\000\000\000\000\000\000\000 -(1 row) - -SELECT lo_lseek(fd, 0, 2) FROM lotest_stash_values; - lo_lseek ----------- - 10000 -(1 row) - -SELECT lo_tell(fd) FROM lotest_stash_values; - lo_tell ---------- - 10000 -(1 row) - -SELECT lo_truncate(fd, 5000) FROM lotest_stash_values; - lo_truncate -------------- - 0 -(1 row) - -SELECT lo_lseek(fd, 0, 2) FROM lotest_stash_values; - lo_lseek ----------- - 5000 -(1 row) - -SELECT lo_tell(fd) FROM lotest_stash_values; - lo_tell ---------- - 5000 -(1 row) - -SELECT lo_close(fd) FROM lotest_stash_values; - lo_close ----------- - 0 -(1 row) - -END; --- Test 64-bit large object functions. -BEGIN; -UPDATE lotest_stash_values SET fd = lo_open(loid, CAST(x'20000' | x'40000' AS integer)); -SELECT lo_lseek64(fd, 4294967296, 0) FROM lotest_stash_values; - lo_lseek64 ------------- - 4294967296 -(1 row) - -SELECT lowrite(fd, 'offset:4GB') FROM lotest_stash_values; - lowrite ---------- - 10 -(1 row) - -SELECT lo_tell64(fd) FROM lotest_stash_values; - lo_tell64 ------------- - 4294967306 -(1 row) - -SELECT lo_lseek64(fd, -10, 1) FROM lotest_stash_values; - lo_lseek64 ------------- - 4294967296 -(1 row) - -SELECT lo_tell64(fd) FROM lotest_stash_values; - lo_tell64 ------------- - 4294967296 -(1 row) - -SELECT loread(fd, 10) FROM lotest_stash_values; - loread ------------- - offset:4GB -(1 row) - -SELECT lo_truncate64(fd, 5000000000) FROM lotest_stash_values; - lo_truncate64 ---------------- - 0 -(1 row) - -SELECT lo_lseek64(fd, 0, 2) FROM lotest_stash_values; - lo_lseek64 ------------- - 5000000000 -(1 row) - -SELECT lo_tell64(fd) FROM lotest_stash_values; - lo_tell64 ------------- - 5000000000 -(1 row) - -SELECT lo_truncate64(fd, 3000000000) FROM lotest_stash_values; - lo_truncate64 ---------------- - 0 -(1 row) - -SELECT lo_lseek64(fd, 0, 2) FROM lotest_stash_values; - lo_lseek64 ------------- - 3000000000 -(1 row) - -SELECT lo_tell64(fd) FROM lotest_stash_values; - lo_tell64 ------------- - 3000000000 -(1 row) - -SELECT lo_close(fd) FROM lotest_stash_values; - lo_close ----------- - 0 -(1 row) - -END; --- lo_unlink(lobjId oid) returns integer --- return value appears to always be 1 -SELECT lo_unlink(loid) from lotest_stash_values; - lo_unlink ------------ - 1 -(1 row) - -TRUNCATE lotest_stash_values; -INSERT INTO lotest_stash_values (loid) SELECT lo_import('/builddir/build/BUILD/postgresql-14.3/src/test/regress/data/tenk.data'); -BEGIN; -UPDATE lotest_stash_values SET fd=lo_open(loid, CAST(x'20000' | x'40000' AS integer)); --- verify length of large object -SELECT lo_lseek(fd, 0, 2) FROM lotest_stash_values; - lo_lseek ----------- - 670800 -(1 row) - --- with the default BLCKSZ, LOBLKSIZE = 2048, so this positions us for a block --- edge case -SELECT lo_lseek(fd, 2030, 0) FROM lotest_stash_values; - lo_lseek ----------- - 2030 -(1 row) - --- this should get half of the value from page 0 and half from page 1 of the --- large object -SELECT loread(fd, 36) FROM lotest_stash_values; - loread ------------------------------------------------------------------ - AAA\011FBAAAA\011VVVVxx\0122513\01132\0111\0111\0113\01113\0111 -(1 row) - -SELECT lo_tell(fd) FROM lotest_stash_values; - lo_tell ---------- - 2066 -(1 row) - -SELECT lo_lseek(fd, -26, 1) FROM lotest_stash_values; - lo_lseek ----------- - 2040 -(1 row) - -SELECT lowrite(fd, 'abcdefghijklmnop') FROM lotest_stash_values; - lowrite ---------- - 16 -(1 row) - -SELECT lo_lseek(fd, 2030, 0) FROM lotest_stash_values; - lo_lseek ----------- - 2030 -(1 row) - -SELECT loread(fd, 36) FROM lotest_stash_values; - loread ------------------------------------------------------ - AAA\011FBAAAAabcdefghijklmnop1\0111\0113\01113\0111 -(1 row) - -SELECT lo_close(fd) FROM lotest_stash_values; - lo_close ----------- - 0 -(1 row) - -END; -SELECT lo_export(loid, '/builddir/build/BUILD/postgresql-14.3/src/test/regress/results/lotest.txt') FROM lotest_stash_values; - lo_export ------------ - 1 -(1 row) - -\lo_import '/builddir/build/BUILD/postgresql-14.3/src/test/regress/results/lotest.txt' -\set newloid :LASTOID --- just make sure \lo_export does not barf -\lo_export :newloid '/builddir/build/BUILD/postgresql-14.3/src/test/regress/results/lotest2.txt' --- This is a hack to test that export/import are reversible --- This uses knowledge about the inner workings of large object mechanism --- which should not be used outside it. This makes it a HACK -SELECT pageno, data FROM pg_largeobject WHERE loid = (SELECT loid from lotest_stash_values) -EXCEPT -SELECT pageno, data FROM pg_largeobject WHERE loid = :newloid; - pageno | data ---------+------ -(0 rows) - -SELECT lo_unlink(loid) FROM lotest_stash_values; - lo_unlink ------------ - 1 -(1 row) - -TRUNCATE lotest_stash_values; -\lo_unlink :newloid -\lo_import '/builddir/build/BUILD/postgresql-14.3/src/test/regress/results/lotest.txt' -\set newloid_1 :LASTOID -SELECT lo_from_bytea(0, lo_get(:newloid_1)) AS newloid_2 -\gset -SELECT md5(lo_get(:newloid_1)) = md5(lo_get(:newloid_2)); - ?column? ----------- - t -(1 row) - -SELECT lo_get(:newloid_1, 0, 20); - lo_get -------------------------------------------- - 8800\0110\0110\0110\0110\0110\0110\011800 -(1 row) - -SELECT lo_get(:newloid_1, 10, 20); - lo_get -------------------------------------------- - \0110\0110\0110\011800\011800\0113800\011 -(1 row) - -SELECT lo_put(:newloid_1, 5, decode('afafafaf', 'hex')); - lo_put --------- - -(1 row) - -SELECT lo_get(:newloid_1, 0, 20); - lo_get -------------------------------------------------- - 8800\011\257\257\257\2570\0110\0110\0110\011800 -(1 row) - -SELECT lo_put(:newloid_1, 4294967310, 'foo'); - lo_put --------- - -(1 row) - -SELECT lo_get(:newloid_1); -ERROR: large object read request is too large -SELECT lo_get(:newloid_1, 4294967294, 100); - lo_get ---------------------------------------------------------------------- - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000foo -(1 row) - -\lo_unlink :newloid_1 -\lo_unlink :newloid_2 --- This object is left in the database for pg_dump test purposes -SELECT lo_from_bytea(0, E'\\xdeadbeef') AS newloid -\gset -SET bytea_output TO hex; -SELECT lo_get(:newloid); - lo_get ------------- - \xdeadbeef -(1 row) - --- Create one more object that we leave behind for testing pg_dump/pg_upgrade; --- this one intentionally has an OID in the system range -SELECT lo_create(2121); - lo_create ------------ - 2121 -(1 row) - -COMMENT ON LARGE OBJECT 2121 IS 'testing comments'; --- Clean up -DROP TABLE lotest_stash_values; -DROP ROLE regress_lo_user; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/with.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/with.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/with.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/with.out 2023-02-20 19:48:42.989218623 -0500 @@ -1,3210 +1 @@ --- --- Tests for common table expressions (WITH query, ... SELECT ...) --- --- Basic WITH -WITH q1(x,y) AS (SELECT 1,2) -SELECT * FROM q1, q1 AS q2; - x | y | x | y ----+---+---+--- - 1 | 2 | 1 | 2 -(1 row) - --- Multiple uses are evaluated only once -SELECT count(*) FROM ( - WITH q1(x) AS (SELECT random() FROM generate_series(1, 5)) - SELECT * FROM q1 - UNION - SELECT * FROM q1 -) ss; - count -------- - 5 -(1 row) - --- WITH RECURSIVE --- sum of 1..100 -WITH RECURSIVE t(n) AS ( - VALUES (1) -UNION ALL - SELECT n+1 FROM t WHERE n < 100 -) -SELECT sum(n) FROM t; - sum ------- - 5050 -(1 row) - -WITH RECURSIVE t(n) AS ( - SELECT (VALUES(1)) -UNION ALL - SELECT n+1 FROM t WHERE n < 5 -) -SELECT * FROM t; - n ---- - 1 - 2 - 3 - 4 - 5 -(5 rows) - --- UNION DISTINCT requires hashable type -WITH RECURSIVE t(n) AS ( - VALUES (1::money) -UNION - SELECT n+1::money FROM t WHERE n < 100::money -) -SELECT sum(n) FROM t; -ERROR: could not implement recursive UNION -DETAIL: All column datatypes must be hashable. --- recursive view -CREATE RECURSIVE VIEW nums (n) AS - VALUES (1) -UNION ALL - SELECT n+1 FROM nums WHERE n < 5; -SELECT * FROM nums; - n ---- - 1 - 2 - 3 - 4 - 5 -(5 rows) - -CREATE OR REPLACE RECURSIVE VIEW nums (n) AS - VALUES (1) -UNION ALL - SELECT n+1 FROM nums WHERE n < 6; -SELECT * FROM nums; - n ---- - 1 - 2 - 3 - 4 - 5 - 6 -(6 rows) - --- This is an infinite loop with UNION ALL, but not with UNION -WITH RECURSIVE t(n) AS ( - SELECT 1 -UNION - SELECT 10-n FROM t) -SELECT * FROM t; - n ---- - 1 - 9 -(2 rows) - --- This'd be an infinite loop, but outside query reads only as much as needed -WITH RECURSIVE t(n) AS ( - VALUES (1) -UNION ALL - SELECT n+1 FROM t) -SELECT * FROM t LIMIT 10; - n ----- - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 -(10 rows) - --- UNION case should have same property -WITH RECURSIVE t(n) AS ( - SELECT 1 -UNION - SELECT n+1 FROM t) -SELECT * FROM t LIMIT 10; - n ----- - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 -(10 rows) - --- Test behavior with an unknown-type literal in the WITH -WITH q AS (SELECT 'foo' AS x) -SELECT x, pg_typeof(x) FROM q; - x | pg_typeof ------+----------- - foo | text -(1 row) - -WITH RECURSIVE t(n) AS ( - SELECT 'foo' -UNION ALL - SELECT n || ' bar' FROM t WHERE length(n) < 20 -) -SELECT n, pg_typeof(n) FROM t; - n | pg_typeof --------------------------+----------- - foo | text - foo bar | text - foo bar bar | text - foo bar bar bar | text - foo bar bar bar bar | text - foo bar bar bar bar bar | text -(6 rows) - --- In a perfect world, this would work and resolve the literal as int ... --- but for now, we have to be content with resolving to text too soon. -WITH RECURSIVE t(n) AS ( - SELECT '7' -UNION ALL - SELECT n+1 FROM t WHERE n < 10 -) -SELECT n, pg_typeof(n) FROM t; -ERROR: operator does not exist: text + integer -LINE 4: SELECT n+1 FROM t WHERE n < 10 - ^ -HINT: No operator matches the given name and argument types. You might need to add explicit type casts. --- Deeply nested WITH caused a list-munging problem in v13 --- Detection of cross-references and self-references -WITH RECURSIVE w1(c1) AS - (WITH w2(c2) AS - (WITH w3(c3) AS - (WITH w4(c4) AS - (WITH w5(c5) AS - (WITH RECURSIVE w6(c6) AS - (WITH w6(c6) AS - (WITH w8(c8) AS - (SELECT 1) - SELECT * FROM w8) - SELECT * FROM w6) - SELECT * FROM w6) - SELECT * FROM w5) - SELECT * FROM w4) - SELECT * FROM w3) - SELECT * FROM w2) -SELECT * FROM w1; - c1 ----- - 1 -(1 row) - --- Detection of invalid self-references -WITH RECURSIVE outermost(x) AS ( - SELECT 1 - UNION (WITH innermost1 AS ( - SELECT 2 - UNION (WITH innermost2 AS ( - SELECT 3 - UNION (WITH innermost3 AS ( - SELECT 4 - UNION (WITH innermost4 AS ( - SELECT 5 - UNION (WITH innermost5 AS ( - SELECT 6 - UNION (WITH innermost6 AS - (SELECT 7) - SELECT * FROM innermost6)) - SELECT * FROM innermost5)) - SELECT * FROM innermost4)) - SELECT * FROM innermost3)) - SELECT * FROM innermost2)) - SELECT * FROM outermost - UNION SELECT * FROM innermost1) - ) - SELECT * FROM outermost ORDER BY 1; - x ---- - 1 - 2 - 3 - 4 - 5 - 6 - 7 -(7 rows) - --- --- Some examples with a tree --- --- department structure represented here is as follows: --- --- ROOT-+->A-+->B-+->C --- | | --- | +->D-+->F --- +->E-+->G -CREATE TEMP TABLE department ( - id INTEGER PRIMARY KEY, -- department ID - parent_department INTEGER REFERENCES department, -- upper department ID - name TEXT -- department name -); -INSERT INTO department VALUES (0, NULL, 'ROOT'); -INSERT INTO department VALUES (1, 0, 'A'); -INSERT INTO department VALUES (2, 1, 'B'); -INSERT INTO department VALUES (3, 2, 'C'); -INSERT INTO department VALUES (4, 2, 'D'); -INSERT INTO department VALUES (5, 0, 'E'); -INSERT INTO department VALUES (6, 4, 'F'); -INSERT INTO department VALUES (7, 5, 'G'); --- extract all departments under 'A'. Result should be A, B, C, D and F -WITH RECURSIVE subdepartment AS -( - -- non recursive term - SELECT name as root_name, * FROM department WHERE name = 'A' - UNION ALL - -- recursive term - SELECT sd.root_name, d.* FROM department AS d, subdepartment AS sd - WHERE d.parent_department = sd.id -) -SELECT * FROM subdepartment ORDER BY name; - root_name | id | parent_department | name ------------+----+-------------------+------ - A | 1 | 0 | A - A | 2 | 1 | B - A | 3 | 2 | C - A | 4 | 2 | D - A | 6 | 4 | F -(5 rows) - --- extract all departments under 'A' with "level" number -WITH RECURSIVE subdepartment(level, id, parent_department, name) AS -( - -- non recursive term - SELECT 1, * FROM department WHERE name = 'A' - UNION ALL - -- recursive term - SELECT sd.level + 1, d.* FROM department AS d, subdepartment AS sd - WHERE d.parent_department = sd.id -) -SELECT * FROM subdepartment ORDER BY name; - level | id | parent_department | name --------+----+-------------------+------ - 1 | 1 | 0 | A - 2 | 2 | 1 | B - 3 | 3 | 2 | C - 3 | 4 | 2 | D - 4 | 6 | 4 | F -(5 rows) - --- extract all departments under 'A' with "level" number. --- Only shows level 2 or more -WITH RECURSIVE subdepartment(level, id, parent_department, name) AS -( - -- non recursive term - SELECT 1, * FROM department WHERE name = 'A' - UNION ALL - -- recursive term - SELECT sd.level + 1, d.* FROM department AS d, subdepartment AS sd - WHERE d.parent_department = sd.id -) -SELECT * FROM subdepartment WHERE level >= 2 ORDER BY name; - level | id | parent_department | name --------+----+-------------------+------ - 2 | 2 | 1 | B - 3 | 3 | 2 | C - 3 | 4 | 2 | D - 4 | 6 | 4 | F -(4 rows) - --- "RECURSIVE" is ignored if the query has no self-reference -WITH RECURSIVE subdepartment AS -( - -- note lack of recursive UNION structure - SELECT * FROM department WHERE name = 'A' -) -SELECT * FROM subdepartment ORDER BY name; - id | parent_department | name -----+-------------------+------ - 1 | 0 | A -(1 row) - --- inside subqueries -SELECT count(*) FROM ( - WITH RECURSIVE t(n) AS ( - SELECT 1 UNION ALL SELECT n + 1 FROM t WHERE n < 500 - ) - SELECT * FROM t) AS t WHERE n < ( - SELECT count(*) FROM ( - WITH RECURSIVE t(n) AS ( - SELECT 1 UNION ALL SELECT n + 1 FROM t WHERE n < 100 - ) - SELECT * FROM t WHERE n < 50000 - ) AS t WHERE n < 100); - count -------- - 98 -(1 row) - --- use same CTE twice at different subquery levels -WITH q1(x,y) AS ( - SELECT hundred, sum(ten) FROM tenk1 GROUP BY hundred - ) -SELECT count(*) FROM q1 WHERE y > (SELECT sum(y)/100 FROM q1 qsub); - count -------- - 50 -(1 row) - --- via a VIEW -CREATE TEMPORARY VIEW vsubdepartment AS - WITH RECURSIVE subdepartment AS - ( - -- non recursive term - SELECT * FROM department WHERE name = 'A' - UNION ALL - -- recursive term - SELECT d.* FROM department AS d, subdepartment AS sd - WHERE d.parent_department = sd.id - ) - SELECT * FROM subdepartment; -SELECT * FROM vsubdepartment ORDER BY name; - id | parent_department | name -----+-------------------+------ - 1 | 0 | A - 2 | 1 | B - 3 | 2 | C - 4 | 2 | D - 6 | 4 | F -(5 rows) - --- Check reverse listing -SELECT pg_get_viewdef('vsubdepartment'::regclass); - pg_get_viewdef ------------------------------------------------ - WITH RECURSIVE subdepartment AS ( + - SELECT department.id, + - department.parent_department, + - department.name + - FROM department + - WHERE (department.name = 'A'::text)+ - UNION ALL + - SELECT d.id, + - d.parent_department, + - d.name + - FROM department d, + - subdepartment sd + - WHERE (d.parent_department = sd.id)+ - ) + - SELECT subdepartment.id, + - subdepartment.parent_department, + - subdepartment.name + - FROM subdepartment; -(1 row) - -SELECT pg_get_viewdef('vsubdepartment'::regclass, true); - pg_get_viewdef ---------------------------------------------- - WITH RECURSIVE subdepartment AS ( + - SELECT department.id, + - department.parent_department, + - department.name + - FROM department + - WHERE department.name = 'A'::text+ - UNION ALL + - SELECT d.id, + - d.parent_department, + - d.name + - FROM department d, + - subdepartment sd + - WHERE d.parent_department = sd.id+ - ) + - SELECT subdepartment.id, + - subdepartment.parent_department, + - subdepartment.name + - FROM subdepartment; -(1 row) - --- Another reverse-listing example -CREATE VIEW sums_1_100 AS -WITH RECURSIVE t(n) AS ( - VALUES (1) -UNION ALL - SELECT n+1 FROM t WHERE n < 100 -) -SELECT sum(n) FROM t; -\d+ sums_1_100 - View "public.sums_1_100" - Column | Type | Collation | Nullable | Default | Storage | Description ---------+--------+-----------+----------+---------+---------+------------- - sum | bigint | | | | plain | -View definition: - WITH RECURSIVE t(n) AS ( - VALUES (1) - UNION ALL - SELECT t_1.n + 1 - FROM t t_1 - WHERE t_1.n < 100 - ) - SELECT sum(t.n) AS sum - FROM t; - --- corner case in which sub-WITH gets initialized first -with recursive q as ( - select * from department - union all - (with x as (select * from q) - select * from x) - ) -select * from q limit 24; - id | parent_department | name -----+-------------------+------ - 0 | | ROOT - 1 | 0 | A - 2 | 1 | B - 3 | 2 | C - 4 | 2 | D - 5 | 0 | E - 6 | 4 | F - 7 | 5 | G - 0 | | ROOT - 1 | 0 | A - 2 | 1 | B - 3 | 2 | C - 4 | 2 | D - 5 | 0 | E - 6 | 4 | F - 7 | 5 | G - 0 | | ROOT - 1 | 0 | A - 2 | 1 | B - 3 | 2 | C - 4 | 2 | D - 5 | 0 | E - 6 | 4 | F - 7 | 5 | G -(24 rows) - -with recursive q as ( - select * from department - union all - (with recursive x as ( - select * from department - union all - (select * from q union all select * from x) - ) - select * from x) - ) -select * from q limit 32; - id | parent_department | name -----+-------------------+------ - 0 | | ROOT - 1 | 0 | A - 2 | 1 | B - 3 | 2 | C - 4 | 2 | D - 5 | 0 | E - 6 | 4 | F - 7 | 5 | G - 0 | | ROOT - 1 | 0 | A - 2 | 1 | B - 3 | 2 | C - 4 | 2 | D - 5 | 0 | E - 6 | 4 | F - 7 | 5 | G - 0 | | ROOT - 1 | 0 | A - 2 | 1 | B - 3 | 2 | C - 4 | 2 | D - 5 | 0 | E - 6 | 4 | F - 7 | 5 | G - 0 | | ROOT - 1 | 0 | A - 2 | 1 | B - 3 | 2 | C - 4 | 2 | D - 5 | 0 | E - 6 | 4 | F - 7 | 5 | G -(32 rows) - --- recursive term has sub-UNION -WITH RECURSIVE t(i,j) AS ( - VALUES (1,2) - UNION ALL - SELECT t2.i, t.j+1 FROM - (SELECT 2 AS i UNION ALL SELECT 3 AS i) AS t2 - JOIN t ON (t2.i = t.i+1)) - SELECT * FROM t; - i | j ----+--- - 1 | 2 - 2 | 3 - 3 | 4 -(3 rows) - --- --- different tree example --- -CREATE TEMPORARY TABLE tree( - id INTEGER PRIMARY KEY, - parent_id INTEGER REFERENCES tree(id) -); -INSERT INTO tree -VALUES (1, NULL), (2, 1), (3,1), (4,2), (5,2), (6,2), (7,3), (8,3), - (9,4), (10,4), (11,7), (12,7), (13,7), (14, 9), (15,11), (16,11); --- --- get all paths from "second level" nodes to leaf nodes --- -WITH RECURSIVE t(id, path) AS ( - VALUES(1,ARRAY[]::integer[]) -UNION ALL - SELECT tree.id, t.path || tree.id - FROM tree JOIN t ON (tree.parent_id = t.id) -) -SELECT t1.*, t2.* FROM t AS t1 JOIN t AS t2 ON - (t1.path[1] = t2.path[1] AND - array_upper(t1.path,1) = 1 AND - array_upper(t2.path,1) > 1) - ORDER BY t1.id, t2.id; - id | path | id | path -----+------+----+------------- - 2 | {2} | 4 | {2,4} - 2 | {2} | 5 | {2,5} - 2 | {2} | 6 | {2,6} - 2 | {2} | 9 | {2,4,9} - 2 | {2} | 10 | {2,4,10} - 2 | {2} | 14 | {2,4,9,14} - 3 | {3} | 7 | {3,7} - 3 | {3} | 8 | {3,8} - 3 | {3} | 11 | {3,7,11} - 3 | {3} | 12 | {3,7,12} - 3 | {3} | 13 | {3,7,13} - 3 | {3} | 15 | {3,7,11,15} - 3 | {3} | 16 | {3,7,11,16} -(13 rows) - --- just count 'em -WITH RECURSIVE t(id, path) AS ( - VALUES(1,ARRAY[]::integer[]) -UNION ALL - SELECT tree.id, t.path || tree.id - FROM tree JOIN t ON (tree.parent_id = t.id) -) -SELECT t1.id, count(t2.*) FROM t AS t1 JOIN t AS t2 ON - (t1.path[1] = t2.path[1] AND - array_upper(t1.path,1) = 1 AND - array_upper(t2.path,1) > 1) - GROUP BY t1.id - ORDER BY t1.id; - id | count -----+------- - 2 | 6 - 3 | 7 -(2 rows) - --- this variant tickled a whole-row-variable bug in 8.4devel -WITH RECURSIVE t(id, path) AS ( - VALUES(1,ARRAY[]::integer[]) -UNION ALL - SELECT tree.id, t.path || tree.id - FROM tree JOIN t ON (tree.parent_id = t.id) -) -SELECT t1.id, t2.path, t2 FROM t AS t1 JOIN t AS t2 ON -(t1.id=t2.id); - id | path | t2 -----+-------------+-------------------- - 1 | {} | (1,{}) - 2 | {2} | (2,{2}) - 3 | {3} | (3,{3}) - 4 | {2,4} | (4,"{2,4}") - 5 | {2,5} | (5,"{2,5}") - 6 | {2,6} | (6,"{2,6}") - 7 | {3,7} | (7,"{3,7}") - 8 | {3,8} | (8,"{3,8}") - 9 | {2,4,9} | (9,"{2,4,9}") - 10 | {2,4,10} | (10,"{2,4,10}") - 11 | {3,7,11} | (11,"{3,7,11}") - 12 | {3,7,12} | (12,"{3,7,12}") - 13 | {3,7,13} | (13,"{3,7,13}") - 14 | {2,4,9,14} | (14,"{2,4,9,14}") - 15 | {3,7,11,15} | (15,"{3,7,11,15}") - 16 | {3,7,11,16} | (16,"{3,7,11,16}") -(16 rows) - --- SEARCH clause -create table graph0( f int, t int, label text ); -insert into graph0 values - (1, 2, 'arc 1 -> 2'), - (1, 3, 'arc 1 -> 3'), - (2, 3, 'arc 2 -> 3'), - (1, 4, 'arc 1 -> 4'), - (4, 5, 'arc 4 -> 5'); -explain (verbose, costs off) -with recursive search_graph(f, t, label) as ( - select * from graph0 g - union all - select g.* - from graph0 g, search_graph sg - where g.f = sg.t -) search depth first by f, t set seq -select * from search_graph order by seq; - QUERY PLAN ----------------------------------------------------------------------------------------------- - Sort - Output: search_graph.f, search_graph.t, search_graph.label, search_graph.seq - Sort Key: search_graph.seq - CTE search_graph - -> Recursive Union - -> Seq Scan on public.graph0 g - Output: g.f, g.t, g.label, ARRAY[ROW(g.f, g.t)] - -> Merge Join - Output: g_1.f, g_1.t, g_1.label, array_cat(sg.seq, ARRAY[ROW(g_1.f, g_1.t)]) - Merge Cond: (g_1.f = sg.t) - -> Sort - Output: g_1.f, g_1.t, g_1.label - Sort Key: g_1.f - -> Seq Scan on public.graph0 g_1 - Output: g_1.f, g_1.t, g_1.label - -> Sort - Output: sg.seq, sg.t - Sort Key: sg.t - -> WorkTable Scan on search_graph sg - Output: sg.seq, sg.t - -> CTE Scan on search_graph - Output: search_graph.f, search_graph.t, search_graph.label, search_graph.seq -(22 rows) - -with recursive search_graph(f, t, label) as ( - select * from graph0 g - union all - select g.* - from graph0 g, search_graph sg - where g.f = sg.t -) search depth first by f, t set seq -select * from search_graph order by seq; - f | t | label | seq ----+---+------------+------------------- - 1 | 2 | arc 1 -> 2 | {"(1,2)"} - 2 | 3 | arc 2 -> 3 | {"(1,2)","(2,3)"} - 1 | 3 | arc 1 -> 3 | {"(1,3)"} - 1 | 4 | arc 1 -> 4 | {"(1,4)"} - 4 | 5 | arc 4 -> 5 | {"(1,4)","(4,5)"} - 2 | 3 | arc 2 -> 3 | {"(2,3)"} - 4 | 5 | arc 4 -> 5 | {"(4,5)"} -(7 rows) - -with recursive search_graph(f, t, label) as ( - select * from graph0 g - union distinct - select g.* - from graph0 g, search_graph sg - where g.f = sg.t -) search depth first by f, t set seq -select * from search_graph order by seq; - f | t | label | seq ----+---+------------+------------------- - 1 | 2 | arc 1 -> 2 | {"(1,2)"} - 2 | 3 | arc 2 -> 3 | {"(1,2)","(2,3)"} - 1 | 3 | arc 1 -> 3 | {"(1,3)"} - 1 | 4 | arc 1 -> 4 | {"(1,4)"} - 4 | 5 | arc 4 -> 5 | {"(1,4)","(4,5)"} - 2 | 3 | arc 2 -> 3 | {"(2,3)"} - 4 | 5 | arc 4 -> 5 | {"(4,5)"} -(7 rows) - -explain (verbose, costs off) -with recursive search_graph(f, t, label) as ( - select * from graph0 g - union all - select g.* - from graph0 g, search_graph sg - where g.f = sg.t -) search breadth first by f, t set seq -select * from search_graph order by seq; - QUERY PLAN -------------------------------------------------------------------------------------------------- - Sort - Output: search_graph.f, search_graph.t, search_graph.label, search_graph.seq - Sort Key: search_graph.seq - CTE search_graph - -> Recursive Union - -> Seq Scan on public.graph0 g - Output: g.f, g.t, g.label, ROW('0'::bigint, g.f, g.t) - -> Merge Join - Output: g_1.f, g_1.t, g_1.label, ROW(int8inc((sg.seq)."*DEPTH*"), g_1.f, g_1.t) - Merge Cond: (g_1.f = sg.t) - -> Sort - Output: g_1.f, g_1.t, g_1.label - Sort Key: g_1.f - -> Seq Scan on public.graph0 g_1 - Output: g_1.f, g_1.t, g_1.label - -> Sort - Output: sg.seq, sg.t - Sort Key: sg.t - -> WorkTable Scan on search_graph sg - Output: sg.seq, sg.t - -> CTE Scan on search_graph - Output: search_graph.f, search_graph.t, search_graph.label, search_graph.seq -(22 rows) - -with recursive search_graph(f, t, label) as ( - select * from graph0 g - union all - select g.* - from graph0 g, search_graph sg - where g.f = sg.t -) search breadth first by f, t set seq -select * from search_graph order by seq; - f | t | label | seq ----+---+------------+--------- - 1 | 2 | arc 1 -> 2 | (0,1,2) - 1 | 3 | arc 1 -> 3 | (0,1,3) - 1 | 4 | arc 1 -> 4 | (0,1,4) - 2 | 3 | arc 2 -> 3 | (0,2,3) - 4 | 5 | arc 4 -> 5 | (0,4,5) - 2 | 3 | arc 2 -> 3 | (1,2,3) - 4 | 5 | arc 4 -> 5 | (1,4,5) -(7 rows) - -with recursive search_graph(f, t, label) as ( - select * from graph0 g - union distinct - select g.* - from graph0 g, search_graph sg - where g.f = sg.t -) search breadth first by f, t set seq -select * from search_graph order by seq; - f | t | label | seq ----+---+------------+--------- - 1 | 2 | arc 1 -> 2 | (0,1,2) - 1 | 3 | arc 1 -> 3 | (0,1,3) - 1 | 4 | arc 1 -> 4 | (0,1,4) - 2 | 3 | arc 2 -> 3 | (0,2,3) - 4 | 5 | arc 4 -> 5 | (0,4,5) - 2 | 3 | arc 2 -> 3 | (1,2,3) - 4 | 5 | arc 4 -> 5 | (1,4,5) -(7 rows) - --- various syntax errors -with recursive search_graph(f, t, label) as ( - select * from graph0 g - union all - select g.* - from graph0 g, search_graph sg - where g.f = sg.t -) search depth first by foo, tar set seq -select * from search_graph; -ERROR: search column "foo" not in WITH query column list -LINE 7: ) search depth first by foo, tar set seq - ^ -with recursive search_graph(f, t, label) as ( - select * from graph0 g - union all - select g.* - from graph0 g, search_graph sg - where g.f = sg.t -) search depth first by f, t set label -select * from search_graph; -ERROR: search sequence column name "label" already used in WITH query column list -LINE 7: ) search depth first by f, t set label - ^ -with recursive search_graph(f, t, label) as ( - select * from graph0 g - union all - select g.* - from graph0 g, search_graph sg - where g.f = sg.t -) search depth first by f, t, f set seq -select * from search_graph; -ERROR: search column "f" specified more than once -LINE 7: ) search depth first by f, t, f set seq - ^ -with recursive search_graph(f, t, label) as ( - select * from graph0 g - union all - select * from graph0 g - union all - select g.* - from graph0 g, search_graph sg - where g.f = sg.t -) search depth first by f, t set seq -select * from search_graph order by seq; -ERROR: with a SEARCH or CYCLE clause, the left side of the UNION must be a SELECT -with recursive search_graph(f, t, label) as ( - select * from graph0 g - union all - (select * from graph0 g - union all - select g.* - from graph0 g, search_graph sg - where g.f = sg.t) -) search depth first by f, t set seq -select * from search_graph order by seq; -ERROR: with a SEARCH or CYCLE clause, the right side of the UNION must be a SELECT --- check that we distinguish same CTE name used at different levels --- (this case could be supported, perhaps, but it isn't today) -with recursive x(col) as ( - select 1 - union - (with x as (select * from x) - select * from x) -) search depth first by col set seq -select * from x; -ERROR: with a SEARCH or CYCLE clause, the recursive reference to WITH query "x" must be at the top level of its right-hand SELECT --- test ruleutils and view expansion -create temp view v_search as -with recursive search_graph(f, t, label) as ( - select * from graph0 g - union all - select g.* - from graph0 g, search_graph sg - where g.f = sg.t -) search depth first by f, t set seq -select f, t, label from search_graph; -select pg_get_viewdef('v_search'); - pg_get_viewdef ------------------------------------------------- - WITH RECURSIVE search_graph(f, t, label) AS (+ - SELECT g.f, + - g.t, + - g.label + - FROM graph0 g + - UNION ALL + - SELECT g.f, + - g.t, + - g.label + - FROM graph0 g, + - search_graph sg + - WHERE (g.f = sg.t) + - ) SEARCH DEPTH FIRST BY f, t SET seq + - SELECT search_graph.f, + - search_graph.t, + - search_graph.label + - FROM search_graph; -(1 row) - -select * from v_search; - f | t | label ----+---+------------ - 1 | 2 | arc 1 -> 2 - 1 | 3 | arc 1 -> 3 - 2 | 3 | arc 2 -> 3 - 1 | 4 | arc 1 -> 4 - 4 | 5 | arc 4 -> 5 - 2 | 3 | arc 2 -> 3 - 4 | 5 | arc 4 -> 5 -(7 rows) - -drop table graph0 cascade; -NOTICE: drop cascades to view v_search --- --- test cycle detection --- -create temp table graph( f int, t int, label text ); -insert into graph values - (1, 2, 'arc 1 -> 2'), - (1, 3, 'arc 1 -> 3'), - (2, 3, 'arc 2 -> 3'), - (1, 4, 'arc 1 -> 4'), - (4, 5, 'arc 4 -> 5'), - (5, 1, 'arc 5 -> 1'); -with recursive search_graph(f, t, label, is_cycle, path) as ( - select *, false, array[row(g.f, g.t)] from graph g - union all - select g.*, row(g.f, g.t) = any(path), path || row(g.f, g.t) - from graph g, search_graph sg - where g.f = sg.t and not is_cycle -) -select * from search_graph; - f | t | label | is_cycle | path ----+---+------------+----------+------------------------------------------- - 1 | 2 | arc 1 -> 2 | f | {"(1,2)"} - 1 | 3 | arc 1 -> 3 | f | {"(1,3)"} - 2 | 3 | arc 2 -> 3 | f | {"(2,3)"} - 1 | 4 | arc 1 -> 4 | f | {"(1,4)"} - 4 | 5 | arc 4 -> 5 | f | {"(4,5)"} - 5 | 1 | arc 5 -> 1 | f | {"(5,1)"} - 1 | 2 | arc 1 -> 2 | f | {"(5,1)","(1,2)"} - 1 | 3 | arc 1 -> 3 | f | {"(5,1)","(1,3)"} - 1 | 4 | arc 1 -> 4 | f | {"(5,1)","(1,4)"} - 2 | 3 | arc 2 -> 3 | f | {"(1,2)","(2,3)"} - 4 | 5 | arc 4 -> 5 | f | {"(1,4)","(4,5)"} - 5 | 1 | arc 5 -> 1 | f | {"(4,5)","(5,1)"} - 1 | 2 | arc 1 -> 2 | f | {"(4,5)","(5,1)","(1,2)"} - 1 | 3 | arc 1 -> 3 | f | {"(4,5)","(5,1)","(1,3)"} - 1 | 4 | arc 1 -> 4 | f | {"(4,5)","(5,1)","(1,4)"} - 2 | 3 | arc 2 -> 3 | f | {"(5,1)","(1,2)","(2,3)"} - 4 | 5 | arc 4 -> 5 | f | {"(5,1)","(1,4)","(4,5)"} - 5 | 1 | arc 5 -> 1 | f | {"(1,4)","(4,5)","(5,1)"} - 1 | 2 | arc 1 -> 2 | f | {"(1,4)","(4,5)","(5,1)","(1,2)"} - 1 | 3 | arc 1 -> 3 | f | {"(1,4)","(4,5)","(5,1)","(1,3)"} - 1 | 4 | arc 1 -> 4 | t | {"(1,4)","(4,5)","(5,1)","(1,4)"} - 2 | 3 | arc 2 -> 3 | f | {"(4,5)","(5,1)","(1,2)","(2,3)"} - 4 | 5 | arc 4 -> 5 | t | {"(4,5)","(5,1)","(1,4)","(4,5)"} - 5 | 1 | arc 5 -> 1 | t | {"(5,1)","(1,4)","(4,5)","(5,1)"} - 2 | 3 | arc 2 -> 3 | f | {"(1,4)","(4,5)","(5,1)","(1,2)","(2,3)"} -(25 rows) - --- UNION DISTINCT exercises row type hashing support -with recursive search_graph(f, t, label, is_cycle, path) as ( - select *, false, array[row(g.f, g.t)] from graph g - union distinct - select g.*, row(g.f, g.t) = any(path), path || row(g.f, g.t) - from graph g, search_graph sg - where g.f = sg.t and not is_cycle -) -select * from search_graph; - f | t | label | is_cycle | path ----+---+------------+----------+------------------------------------------- - 1 | 2 | arc 1 -> 2 | f | {"(1,2)"} - 1 | 3 | arc 1 -> 3 | f | {"(1,3)"} - 2 | 3 | arc 2 -> 3 | f | {"(2,3)"} - 1 | 4 | arc 1 -> 4 | f | {"(1,4)"} - 4 | 5 | arc 4 -> 5 | f | {"(4,5)"} - 5 | 1 | arc 5 -> 1 | f | {"(5,1)"} - 1 | 2 | arc 1 -> 2 | f | {"(5,1)","(1,2)"} - 1 | 3 | arc 1 -> 3 | f | {"(5,1)","(1,3)"} - 1 | 4 | arc 1 -> 4 | f | {"(5,1)","(1,4)"} - 2 | 3 | arc 2 -> 3 | f | {"(1,2)","(2,3)"} - 4 | 5 | arc 4 -> 5 | f | {"(1,4)","(4,5)"} - 5 | 1 | arc 5 -> 1 | f | {"(4,5)","(5,1)"} - 1 | 2 | arc 1 -> 2 | f | {"(4,5)","(5,1)","(1,2)"} - 1 | 3 | arc 1 -> 3 | f | {"(4,5)","(5,1)","(1,3)"} - 1 | 4 | arc 1 -> 4 | f | {"(4,5)","(5,1)","(1,4)"} - 2 | 3 | arc 2 -> 3 | f | {"(5,1)","(1,2)","(2,3)"} - 4 | 5 | arc 4 -> 5 | f | {"(5,1)","(1,4)","(4,5)"} - 5 | 1 | arc 5 -> 1 | f | {"(1,4)","(4,5)","(5,1)"} - 1 | 2 | arc 1 -> 2 | f | {"(1,4)","(4,5)","(5,1)","(1,2)"} - 1 | 3 | arc 1 -> 3 | f | {"(1,4)","(4,5)","(5,1)","(1,3)"} - 1 | 4 | arc 1 -> 4 | t | {"(1,4)","(4,5)","(5,1)","(1,4)"} - 2 | 3 | arc 2 -> 3 | f | {"(4,5)","(5,1)","(1,2)","(2,3)"} - 4 | 5 | arc 4 -> 5 | t | {"(4,5)","(5,1)","(1,4)","(4,5)"} - 5 | 1 | arc 5 -> 1 | t | {"(5,1)","(1,4)","(4,5)","(5,1)"} - 2 | 3 | arc 2 -> 3 | f | {"(1,4)","(4,5)","(5,1)","(1,2)","(2,3)"} -(25 rows) - --- ordering by the path column has same effect as SEARCH DEPTH FIRST -with recursive search_graph(f, t, label, is_cycle, path) as ( - select *, false, array[row(g.f, g.t)] from graph g - union all - select g.*, row(g.f, g.t) = any(path), path || row(g.f, g.t) - from graph g, search_graph sg - where g.f = sg.t and not is_cycle -) -select * from search_graph order by path; - f | t | label | is_cycle | path ----+---+------------+----------+------------------------------------------- - 1 | 2 | arc 1 -> 2 | f | {"(1,2)"} - 2 | 3 | arc 2 -> 3 | f | {"(1,2)","(2,3)"} - 1 | 3 | arc 1 -> 3 | f | {"(1,3)"} - 1 | 4 | arc 1 -> 4 | f | {"(1,4)"} - 4 | 5 | arc 4 -> 5 | f | {"(1,4)","(4,5)"} - 5 | 1 | arc 5 -> 1 | f | {"(1,4)","(4,5)","(5,1)"} - 1 | 2 | arc 1 -> 2 | f | {"(1,4)","(4,5)","(5,1)","(1,2)"} - 2 | 3 | arc 2 -> 3 | f | {"(1,4)","(4,5)","(5,1)","(1,2)","(2,3)"} - 1 | 3 | arc 1 -> 3 | f | {"(1,4)","(4,5)","(5,1)","(1,3)"} - 1 | 4 | arc 1 -> 4 | t | {"(1,4)","(4,5)","(5,1)","(1,4)"} - 2 | 3 | arc 2 -> 3 | f | {"(2,3)"} - 4 | 5 | arc 4 -> 5 | f | {"(4,5)"} - 5 | 1 | arc 5 -> 1 | f | {"(4,5)","(5,1)"} - 1 | 2 | arc 1 -> 2 | f | {"(4,5)","(5,1)","(1,2)"} - 2 | 3 | arc 2 -> 3 | f | {"(4,5)","(5,1)","(1,2)","(2,3)"} - 1 | 3 | arc 1 -> 3 | f | {"(4,5)","(5,1)","(1,3)"} - 1 | 4 | arc 1 -> 4 | f | {"(4,5)","(5,1)","(1,4)"} - 4 | 5 | arc 4 -> 5 | t | {"(4,5)","(5,1)","(1,4)","(4,5)"} - 5 | 1 | arc 5 -> 1 | f | {"(5,1)"} - 1 | 2 | arc 1 -> 2 | f | {"(5,1)","(1,2)"} - 2 | 3 | arc 2 -> 3 | f | {"(5,1)","(1,2)","(2,3)"} - 1 | 3 | arc 1 -> 3 | f | {"(5,1)","(1,3)"} - 1 | 4 | arc 1 -> 4 | f | {"(5,1)","(1,4)"} - 4 | 5 | arc 4 -> 5 | f | {"(5,1)","(1,4)","(4,5)"} - 5 | 1 | arc 5 -> 1 | t | {"(5,1)","(1,4)","(4,5)","(5,1)"} -(25 rows) - --- CYCLE clause -with recursive search_graph(f, t, label) as ( - select * from graph g - union all - select g.* - from graph g, search_graph sg - where g.f = sg.t -) cycle f, t set is_cycle using path -select * from search_graph; - f | t | label | is_cycle | path ----+---+------------+----------+------------------------------------------- - 1 | 2 | arc 1 -> 2 | f | {"(1,2)"} - 1 | 3 | arc 1 -> 3 | f | {"(1,3)"} - 2 | 3 | arc 2 -> 3 | f | {"(2,3)"} - 1 | 4 | arc 1 -> 4 | f | {"(1,4)"} - 4 | 5 | arc 4 -> 5 | f | {"(4,5)"} - 5 | 1 | arc 5 -> 1 | f | {"(5,1)"} - 1 | 2 | arc 1 -> 2 | f | {"(5,1)","(1,2)"} - 1 | 3 | arc 1 -> 3 | f | {"(5,1)","(1,3)"} - 1 | 4 | arc 1 -> 4 | f | {"(5,1)","(1,4)"} - 2 | 3 | arc 2 -> 3 | f | {"(1,2)","(2,3)"} - 4 | 5 | arc 4 -> 5 | f | {"(1,4)","(4,5)"} - 5 | 1 | arc 5 -> 1 | f | {"(4,5)","(5,1)"} - 1 | 2 | arc 1 -> 2 | f | {"(4,5)","(5,1)","(1,2)"} - 1 | 3 | arc 1 -> 3 | f | {"(4,5)","(5,1)","(1,3)"} - 1 | 4 | arc 1 -> 4 | f | {"(4,5)","(5,1)","(1,4)"} - 2 | 3 | arc 2 -> 3 | f | {"(5,1)","(1,2)","(2,3)"} - 4 | 5 | arc 4 -> 5 | f | {"(5,1)","(1,4)","(4,5)"} - 5 | 1 | arc 5 -> 1 | f | {"(1,4)","(4,5)","(5,1)"} - 1 | 2 | arc 1 -> 2 | f | {"(1,4)","(4,5)","(5,1)","(1,2)"} - 1 | 3 | arc 1 -> 3 | f | {"(1,4)","(4,5)","(5,1)","(1,3)"} - 1 | 4 | arc 1 -> 4 | t | {"(1,4)","(4,5)","(5,1)","(1,4)"} - 2 | 3 | arc 2 -> 3 | f | {"(4,5)","(5,1)","(1,2)","(2,3)"} - 4 | 5 | arc 4 -> 5 | t | {"(4,5)","(5,1)","(1,4)","(4,5)"} - 5 | 1 | arc 5 -> 1 | t | {"(5,1)","(1,4)","(4,5)","(5,1)"} - 2 | 3 | arc 2 -> 3 | f | {"(1,4)","(4,5)","(5,1)","(1,2)","(2,3)"} -(25 rows) - -with recursive search_graph(f, t, label) as ( - select * from graph g - union distinct - select g.* - from graph g, search_graph sg - where g.f = sg.t -) cycle f, t set is_cycle to 'Y' default 'N' using path -select * from search_graph; - f | t | label | is_cycle | path ----+---+------------+----------+------------------------------------------- - 1 | 2 | arc 1 -> 2 | N | {"(1,2)"} - 1 | 3 | arc 1 -> 3 | N | {"(1,3)"} - 2 | 3 | arc 2 -> 3 | N | {"(2,3)"} - 1 | 4 | arc 1 -> 4 | N | {"(1,4)"} - 4 | 5 | arc 4 -> 5 | N | {"(4,5)"} - 5 | 1 | arc 5 -> 1 | N | {"(5,1)"} - 1 | 2 | arc 1 -> 2 | N | {"(5,1)","(1,2)"} - 1 | 3 | arc 1 -> 3 | N | {"(5,1)","(1,3)"} - 1 | 4 | arc 1 -> 4 | N | {"(5,1)","(1,4)"} - 2 | 3 | arc 2 -> 3 | N | {"(1,2)","(2,3)"} - 4 | 5 | arc 4 -> 5 | N | {"(1,4)","(4,5)"} - 5 | 1 | arc 5 -> 1 | N | {"(4,5)","(5,1)"} - 1 | 2 | arc 1 -> 2 | N | {"(4,5)","(5,1)","(1,2)"} - 1 | 3 | arc 1 -> 3 | N | {"(4,5)","(5,1)","(1,3)"} - 1 | 4 | arc 1 -> 4 | N | {"(4,5)","(5,1)","(1,4)"} - 2 | 3 | arc 2 -> 3 | N | {"(5,1)","(1,2)","(2,3)"} - 4 | 5 | arc 4 -> 5 | N | {"(5,1)","(1,4)","(4,5)"} - 5 | 1 | arc 5 -> 1 | N | {"(1,4)","(4,5)","(5,1)"} - 1 | 2 | arc 1 -> 2 | N | {"(1,4)","(4,5)","(5,1)","(1,2)"} - 1 | 3 | arc 1 -> 3 | N | {"(1,4)","(4,5)","(5,1)","(1,3)"} - 1 | 4 | arc 1 -> 4 | Y | {"(1,4)","(4,5)","(5,1)","(1,4)"} - 2 | 3 | arc 2 -> 3 | N | {"(4,5)","(5,1)","(1,2)","(2,3)"} - 4 | 5 | arc 4 -> 5 | Y | {"(4,5)","(5,1)","(1,4)","(4,5)"} - 5 | 1 | arc 5 -> 1 | Y | {"(5,1)","(1,4)","(4,5)","(5,1)"} - 2 | 3 | arc 2 -> 3 | N | {"(1,4)","(4,5)","(5,1)","(1,2)","(2,3)"} -(25 rows) - --- multiple CTEs -with recursive -graph(f, t, label) as ( - values (1, 2, 'arc 1 -> 2'), - (1, 3, 'arc 1 -> 3'), - (2, 3, 'arc 2 -> 3'), - (1, 4, 'arc 1 -> 4'), - (4, 5, 'arc 4 -> 5'), - (5, 1, 'arc 5 -> 1') -), -search_graph(f, t, label) as ( - select * from graph g - union all - select g.* - from graph g, search_graph sg - where g.f = sg.t -) cycle f, t set is_cycle to true default false using path -select f, t, label from search_graph; - f | t | label ----+---+------------ - 1 | 2 | arc 1 -> 2 - 1 | 3 | arc 1 -> 3 - 2 | 3 | arc 2 -> 3 - 1 | 4 | arc 1 -> 4 - 4 | 5 | arc 4 -> 5 - 5 | 1 | arc 5 -> 1 - 2 | 3 | arc 2 -> 3 - 4 | 5 | arc 4 -> 5 - 5 | 1 | arc 5 -> 1 - 1 | 4 | arc 1 -> 4 - 1 | 3 | arc 1 -> 3 - 1 | 2 | arc 1 -> 2 - 5 | 1 | arc 5 -> 1 - 1 | 4 | arc 1 -> 4 - 1 | 3 | arc 1 -> 3 - 1 | 2 | arc 1 -> 2 - 4 | 5 | arc 4 -> 5 - 2 | 3 | arc 2 -> 3 - 1 | 4 | arc 1 -> 4 - 1 | 3 | arc 1 -> 3 - 1 | 2 | arc 1 -> 2 - 4 | 5 | arc 4 -> 5 - 2 | 3 | arc 2 -> 3 - 5 | 1 | arc 5 -> 1 - 2 | 3 | arc 2 -> 3 -(25 rows) - --- star expansion -with recursive a as ( - select 1 as b - union all - select * from a -) cycle b set c using p -select * from a; - b | c | p ----+---+----------- - 1 | f | {(1)} - 1 | t | {(1),(1)} -(2 rows) - --- search+cycle -with recursive search_graph(f, t, label) as ( - select * from graph g - union all - select g.* - from graph g, search_graph sg - where g.f = sg.t -) search depth first by f, t set seq - cycle f, t set is_cycle using path -select * from search_graph; - f | t | label | seq | is_cycle | path ----+---+------------+-------------------------------------------+----------+------------------------------------------- - 1 | 2 | arc 1 -> 2 | {"(1,2)"} | f | {"(1,2)"} - 1 | 3 | arc 1 -> 3 | {"(1,3)"} | f | {"(1,3)"} - 2 | 3 | arc 2 -> 3 | {"(2,3)"} | f | {"(2,3)"} - 1 | 4 | arc 1 -> 4 | {"(1,4)"} | f | {"(1,4)"} - 4 | 5 | arc 4 -> 5 | {"(4,5)"} | f | {"(4,5)"} - 5 | 1 | arc 5 -> 1 | {"(5,1)"} | f | {"(5,1)"} - 1 | 2 | arc 1 -> 2 | {"(5,1)","(1,2)"} | f | {"(5,1)","(1,2)"} - 1 | 3 | arc 1 -> 3 | {"(5,1)","(1,3)"} | f | {"(5,1)","(1,3)"} - 1 | 4 | arc 1 -> 4 | {"(5,1)","(1,4)"} | f | {"(5,1)","(1,4)"} - 2 | 3 | arc 2 -> 3 | {"(1,2)","(2,3)"} | f | {"(1,2)","(2,3)"} - 4 | 5 | arc 4 -> 5 | {"(1,4)","(4,5)"} | f | {"(1,4)","(4,5)"} - 5 | 1 | arc 5 -> 1 | {"(4,5)","(5,1)"} | f | {"(4,5)","(5,1)"} - 1 | 2 | arc 1 -> 2 | {"(4,5)","(5,1)","(1,2)"} | f | {"(4,5)","(5,1)","(1,2)"} - 1 | 3 | arc 1 -> 3 | {"(4,5)","(5,1)","(1,3)"} | f | {"(4,5)","(5,1)","(1,3)"} - 1 | 4 | arc 1 -> 4 | {"(4,5)","(5,1)","(1,4)"} | f | {"(4,5)","(5,1)","(1,4)"} - 2 | 3 | arc 2 -> 3 | {"(5,1)","(1,2)","(2,3)"} | f | {"(5,1)","(1,2)","(2,3)"} - 4 | 5 | arc 4 -> 5 | {"(5,1)","(1,4)","(4,5)"} | f | {"(5,1)","(1,4)","(4,5)"} - 5 | 1 | arc 5 -> 1 | {"(1,4)","(4,5)","(5,1)"} | f | {"(1,4)","(4,5)","(5,1)"} - 1 | 2 | arc 1 -> 2 | {"(1,4)","(4,5)","(5,1)","(1,2)"} | f | {"(1,4)","(4,5)","(5,1)","(1,2)"} - 1 | 3 | arc 1 -> 3 | {"(1,4)","(4,5)","(5,1)","(1,3)"} | f | {"(1,4)","(4,5)","(5,1)","(1,3)"} - 1 | 4 | arc 1 -> 4 | {"(1,4)","(4,5)","(5,1)","(1,4)"} | t | {"(1,4)","(4,5)","(5,1)","(1,4)"} - 2 | 3 | arc 2 -> 3 | {"(4,5)","(5,1)","(1,2)","(2,3)"} | f | {"(4,5)","(5,1)","(1,2)","(2,3)"} - 4 | 5 | arc 4 -> 5 | {"(4,5)","(5,1)","(1,4)","(4,5)"} | t | {"(4,5)","(5,1)","(1,4)","(4,5)"} - 5 | 1 | arc 5 -> 1 | {"(5,1)","(1,4)","(4,5)","(5,1)"} | t | {"(5,1)","(1,4)","(4,5)","(5,1)"} - 2 | 3 | arc 2 -> 3 | {"(1,4)","(4,5)","(5,1)","(1,2)","(2,3)"} | f | {"(1,4)","(4,5)","(5,1)","(1,2)","(2,3)"} -(25 rows) - -with recursive search_graph(f, t, label) as ( - select * from graph g - union all - select g.* - from graph g, search_graph sg - where g.f = sg.t -) search breadth first by f, t set seq - cycle f, t set is_cycle using path -select * from search_graph; - f | t | label | seq | is_cycle | path ----+---+------------+---------+----------+------------------------------------------- - 1 | 2 | arc 1 -> 2 | (0,1,2) | f | {"(1,2)"} - 1 | 3 | arc 1 -> 3 | (0,1,3) | f | {"(1,3)"} - 2 | 3 | arc 2 -> 3 | (0,2,3) | f | {"(2,3)"} - 1 | 4 | arc 1 -> 4 | (0,1,4) | f | {"(1,4)"} - 4 | 5 | arc 4 -> 5 | (0,4,5) | f | {"(4,5)"} - 5 | 1 | arc 5 -> 1 | (0,5,1) | f | {"(5,1)"} - 1 | 2 | arc 1 -> 2 | (1,1,2) | f | {"(5,1)","(1,2)"} - 1 | 3 | arc 1 -> 3 | (1,1,3) | f | {"(5,1)","(1,3)"} - 1 | 4 | arc 1 -> 4 | (1,1,4) | f | {"(5,1)","(1,4)"} - 2 | 3 | arc 2 -> 3 | (1,2,3) | f | {"(1,2)","(2,3)"} - 4 | 5 | arc 4 -> 5 | (1,4,5) | f | {"(1,4)","(4,5)"} - 5 | 1 | arc 5 -> 1 | (1,5,1) | f | {"(4,5)","(5,1)"} - 1 | 2 | arc 1 -> 2 | (2,1,2) | f | {"(4,5)","(5,1)","(1,2)"} - 1 | 3 | arc 1 -> 3 | (2,1,3) | f | {"(4,5)","(5,1)","(1,3)"} - 1 | 4 | arc 1 -> 4 | (2,1,4) | f | {"(4,5)","(5,1)","(1,4)"} - 2 | 3 | arc 2 -> 3 | (2,2,3) | f | {"(5,1)","(1,2)","(2,3)"} - 4 | 5 | arc 4 -> 5 | (2,4,5) | f | {"(5,1)","(1,4)","(4,5)"} - 5 | 1 | arc 5 -> 1 | (2,5,1) | f | {"(1,4)","(4,5)","(5,1)"} - 1 | 2 | arc 1 -> 2 | (3,1,2) | f | {"(1,4)","(4,5)","(5,1)","(1,2)"} - 1 | 3 | arc 1 -> 3 | (3,1,3) | f | {"(1,4)","(4,5)","(5,1)","(1,3)"} - 1 | 4 | arc 1 -> 4 | (3,1,4) | t | {"(1,4)","(4,5)","(5,1)","(1,4)"} - 2 | 3 | arc 2 -> 3 | (3,2,3) | f | {"(4,5)","(5,1)","(1,2)","(2,3)"} - 4 | 5 | arc 4 -> 5 | (3,4,5) | t | {"(4,5)","(5,1)","(1,4)","(4,5)"} - 5 | 1 | arc 5 -> 1 | (3,5,1) | t | {"(5,1)","(1,4)","(4,5)","(5,1)"} - 2 | 3 | arc 2 -> 3 | (4,2,3) | f | {"(1,4)","(4,5)","(5,1)","(1,2)","(2,3)"} -(25 rows) - --- various syntax errors -with recursive search_graph(f, t, label) as ( - select * from graph g - union all - select g.* - from graph g, search_graph sg - where g.f = sg.t -) cycle foo, tar set is_cycle using path -select * from search_graph; -ERROR: cycle column "foo" not in WITH query column list -LINE 7: ) cycle foo, tar set is_cycle using path - ^ -with recursive search_graph(f, t, label) as ( - select * from graph g - union all - select g.* - from graph g, search_graph sg - where g.f = sg.t -) cycle f, t set is_cycle to true default 55 using path -select * from search_graph; -ERROR: CYCLE types boolean and integer cannot be matched -LINE 7: ) cycle f, t set is_cycle to true default 55 using path - ^ -with recursive search_graph(f, t, label) as ( - select * from graph g - union all - select g.* - from graph g, search_graph sg - where g.f = sg.t -) cycle f, t set is_cycle to point '(1,1)' default point '(0,0)' using path -select * from search_graph; -ERROR: could not identify an equality operator for type point -with recursive search_graph(f, t, label) as ( - select * from graph g - union all - select g.* - from graph g, search_graph sg - where g.f = sg.t -) cycle f, t set label to true default false using path -select * from search_graph; -ERROR: cycle mark column name "label" already used in WITH query column list -LINE 7: ) cycle f, t set label to true default false using path - ^ -with recursive search_graph(f, t, label) as ( - select * from graph g - union all - select g.* - from graph g, search_graph sg - where g.f = sg.t -) cycle f, t set is_cycle to true default false using label -select * from search_graph; -ERROR: cycle path column name "label" already used in WITH query column list -LINE 7: ) cycle f, t set is_cycle to true default false using label - ^ -with recursive search_graph(f, t, label) as ( - select * from graph g - union all - select g.* - from graph g, search_graph sg - where g.f = sg.t -) cycle f, t set foo to true default false using foo -select * from search_graph; -ERROR: cycle mark column name and cycle path column name are the same -LINE 7: ) cycle f, t set foo to true default false using foo - ^ -with recursive search_graph(f, t, label) as ( - select * from graph g - union all - select g.* - from graph g, search_graph sg - where g.f = sg.t -) cycle f, t, f set is_cycle to true default false using path -select * from search_graph; -ERROR: cycle column "f" specified more than once -LINE 7: ) cycle f, t, f set is_cycle to true default false using pat... - ^ -with recursive search_graph(f, t, label) as ( - select * from graph g - union all - select g.* - from graph g, search_graph sg - where g.f = sg.t -) search depth first by f, t set foo - cycle f, t set foo to true default false using path -select * from search_graph; -ERROR: search sequence column name and cycle mark column name are the same -LINE 7: ) search depth first by f, t set foo - ^ -with recursive search_graph(f, t, label) as ( - select * from graph g - union all - select g.* - from graph g, search_graph sg - where g.f = sg.t -) search depth first by f, t set foo - cycle f, t set is_cycle to true default false using foo -select * from search_graph; -ERROR: search sequence column name and cycle path column name are the same -LINE 7: ) search depth first by f, t set foo - ^ --- test ruleutils and view expansion -create temp view v_cycle1 as -with recursive search_graph(f, t, label) as ( - select * from graph g - union all - select g.* - from graph g, search_graph sg - where g.f = sg.t -) cycle f, t set is_cycle using path -select f, t, label from search_graph; -create temp view v_cycle2 as -with recursive search_graph(f, t, label) as ( - select * from graph g - union all - select g.* - from graph g, search_graph sg - where g.f = sg.t -) cycle f, t set is_cycle to 'Y' default 'N' using path -select f, t, label from search_graph; -select pg_get_viewdef('v_cycle1'); - pg_get_viewdef ------------------------------------------------- - WITH RECURSIVE search_graph(f, t, label) AS (+ - SELECT g.f, + - g.t, + - g.label + - FROM graph g + - UNION ALL + - SELECT g.f, + - g.t, + - g.label + - FROM graph g, + - search_graph sg + - WHERE (g.f = sg.t) + - ) CYCLE f, t SET is_cycle USING path + - SELECT search_graph.f, + - search_graph.t, + - search_graph.label + - FROM search_graph; -(1 row) - -select pg_get_viewdef('v_cycle2'); - pg_get_viewdef ------------------------------------------------------------------------------ - WITH RECURSIVE search_graph(f, t, label) AS ( + - SELECT g.f, + - g.t, + - g.label + - FROM graph g + - UNION ALL + - SELECT g.f, + - g.t, + - g.label + - FROM graph g, + - search_graph sg + - WHERE (g.f = sg.t) + - ) CYCLE f, t SET is_cycle TO 'Y'::text DEFAULT 'N'::text USING path+ - SELECT search_graph.f, + - search_graph.t, + - search_graph.label + - FROM search_graph; -(1 row) - -select * from v_cycle1; - f | t | label ----+---+------------ - 1 | 2 | arc 1 -> 2 - 1 | 3 | arc 1 -> 3 - 2 | 3 | arc 2 -> 3 - 1 | 4 | arc 1 -> 4 - 4 | 5 | arc 4 -> 5 - 5 | 1 | arc 5 -> 1 - 1 | 2 | arc 1 -> 2 - 1 | 3 | arc 1 -> 3 - 1 | 4 | arc 1 -> 4 - 2 | 3 | arc 2 -> 3 - 4 | 5 | arc 4 -> 5 - 5 | 1 | arc 5 -> 1 - 1 | 2 | arc 1 -> 2 - 1 | 3 | arc 1 -> 3 - 1 | 4 | arc 1 -> 4 - 2 | 3 | arc 2 -> 3 - 4 | 5 | arc 4 -> 5 - 5 | 1 | arc 5 -> 1 - 1 | 2 | arc 1 -> 2 - 1 | 3 | arc 1 -> 3 - 1 | 4 | arc 1 -> 4 - 2 | 3 | arc 2 -> 3 - 4 | 5 | arc 4 -> 5 - 5 | 1 | arc 5 -> 1 - 2 | 3 | arc 2 -> 3 -(25 rows) - -select * from v_cycle2; - f | t | label ----+---+------------ - 1 | 2 | arc 1 -> 2 - 1 | 3 | arc 1 -> 3 - 2 | 3 | arc 2 -> 3 - 1 | 4 | arc 1 -> 4 - 4 | 5 | arc 4 -> 5 - 5 | 1 | arc 5 -> 1 - 1 | 2 | arc 1 -> 2 - 1 | 3 | arc 1 -> 3 - 1 | 4 | arc 1 -> 4 - 2 | 3 | arc 2 -> 3 - 4 | 5 | arc 4 -> 5 - 5 | 1 | arc 5 -> 1 - 1 | 2 | arc 1 -> 2 - 1 | 3 | arc 1 -> 3 - 1 | 4 | arc 1 -> 4 - 2 | 3 | arc 2 -> 3 - 4 | 5 | arc 4 -> 5 - 5 | 1 | arc 5 -> 1 - 1 | 2 | arc 1 -> 2 - 1 | 3 | arc 1 -> 3 - 1 | 4 | arc 1 -> 4 - 2 | 3 | arc 2 -> 3 - 4 | 5 | arc 4 -> 5 - 5 | 1 | arc 5 -> 1 - 2 | 3 | arc 2 -> 3 -(25 rows) - --- --- test multiple WITH queries --- -WITH RECURSIVE - y (id) AS (VALUES (1)), - x (id) AS (SELECT * FROM y UNION ALL SELECT id+1 FROM x WHERE id < 5) -SELECT * FROM x; - id ----- - 1 - 2 - 3 - 4 - 5 -(5 rows) - --- forward reference OK -WITH RECURSIVE - x(id) AS (SELECT * FROM y UNION ALL SELECT id+1 FROM x WHERE id < 5), - y(id) AS (values (1)) - SELECT * FROM x; - id ----- - 1 - 2 - 3 - 4 - 5 -(5 rows) - -WITH RECURSIVE - x(id) AS - (VALUES (1) UNION ALL SELECT id+1 FROM x WHERE id < 5), - y(id) AS - (VALUES (1) UNION ALL SELECT id+1 FROM y WHERE id < 10) - SELECT y.*, x.* FROM y LEFT JOIN x USING (id); - id | id -----+---- - 1 | 1 - 2 | 2 - 3 | 3 - 4 | 4 - 5 | 5 - 6 | - 7 | - 8 | - 9 | - 10 | -(10 rows) - -WITH RECURSIVE - x(id) AS - (VALUES (1) UNION ALL SELECT id+1 FROM x WHERE id < 5), - y(id) AS - (VALUES (1) UNION ALL SELECT id+1 FROM x WHERE id < 10) - SELECT y.*, x.* FROM y LEFT JOIN x USING (id); - id | id -----+---- - 1 | 1 - 2 | 2 - 3 | 3 - 4 | 4 - 5 | 5 - 6 | -(6 rows) - -WITH RECURSIVE - x(id) AS - (SELECT 1 UNION ALL SELECT id+1 FROM x WHERE id < 3 ), - y(id) AS - (SELECT * FROM x UNION ALL SELECT * FROM x), - z(id) AS - (SELECT * FROM x UNION ALL SELECT id+1 FROM z WHERE id < 10) - SELECT * FROM z; - id ----- - 1 - 2 - 3 - 2 - 3 - 4 - 3 - 4 - 5 - 4 - 5 - 6 - 5 - 6 - 7 - 6 - 7 - 8 - 7 - 8 - 9 - 8 - 9 - 10 - 9 - 10 - 10 -(27 rows) - -WITH RECURSIVE - x(id) AS - (SELECT 1 UNION ALL SELECT id+1 FROM x WHERE id < 3 ), - y(id) AS - (SELECT * FROM x UNION ALL SELECT * FROM x), - z(id) AS - (SELECT * FROM y UNION ALL SELECT id+1 FROM z WHERE id < 10) - SELECT * FROM z; - id ----- - 1 - 2 - 3 - 1 - 2 - 3 - 2 - 3 - 4 - 2 - 3 - 4 - 3 - 4 - 5 - 3 - 4 - 5 - 4 - 5 - 6 - 4 - 5 - 6 - 5 - 6 - 7 - 5 - 6 - 7 - 6 - 7 - 8 - 6 - 7 - 8 - 7 - 8 - 9 - 7 - 8 - 9 - 8 - 9 - 10 - 8 - 9 - 10 - 9 - 10 - 9 - 10 - 10 - 10 -(54 rows) - --- --- Test WITH attached to a data-modifying statement --- -CREATE TEMPORARY TABLE y (a INTEGER); -INSERT INTO y SELECT generate_series(1, 10); -WITH t AS ( - SELECT a FROM y -) -INSERT INTO y -SELECT a+20 FROM t RETURNING *; - a ----- - 21 - 22 - 23 - 24 - 25 - 26 - 27 - 28 - 29 - 30 -(10 rows) - -SELECT * FROM y; - a ----- - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 21 - 22 - 23 - 24 - 25 - 26 - 27 - 28 - 29 - 30 -(20 rows) - -WITH t AS ( - SELECT a FROM y -) -UPDATE y SET a = y.a-10 FROM t WHERE y.a > 20 AND t.a = y.a RETURNING y.a; - a ----- - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 -(10 rows) - -SELECT * FROM y; - a ----- - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 -(20 rows) - -WITH RECURSIVE t(a) AS ( - SELECT 11 - UNION ALL - SELECT a+1 FROM t WHERE a < 50 -) -DELETE FROM y USING t WHERE t.a = y.a RETURNING y.a; - a ----- - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 -(10 rows) - -SELECT * FROM y; - a ----- - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 -(10 rows) - -DROP TABLE y; --- --- error cases --- --- INTERSECT -WITH RECURSIVE x(n) AS (SELECT 1 INTERSECT SELECT n+1 FROM x) - SELECT * FROM x; -ERROR: recursive query "x" does not have the form non-recursive-term UNION [ALL] recursive-term -LINE 1: WITH RECURSIVE x(n) AS (SELECT 1 INTERSECT SELECT n+1 FROM x... - ^ -WITH RECURSIVE x(n) AS (SELECT 1 INTERSECT ALL SELECT n+1 FROM x) - SELECT * FROM x; -ERROR: recursive query "x" does not have the form non-recursive-term UNION [ALL] recursive-term -LINE 1: WITH RECURSIVE x(n) AS (SELECT 1 INTERSECT ALL SELECT n+1 FR... - ^ --- EXCEPT -WITH RECURSIVE x(n) AS (SELECT 1 EXCEPT SELECT n+1 FROM x) - SELECT * FROM x; -ERROR: recursive query "x" does not have the form non-recursive-term UNION [ALL] recursive-term -LINE 1: WITH RECURSIVE x(n) AS (SELECT 1 EXCEPT SELECT n+1 FROM x) - ^ -WITH RECURSIVE x(n) AS (SELECT 1 EXCEPT ALL SELECT n+1 FROM x) - SELECT * FROM x; -ERROR: recursive query "x" does not have the form non-recursive-term UNION [ALL] recursive-term -LINE 1: WITH RECURSIVE x(n) AS (SELECT 1 EXCEPT ALL SELECT n+1 FROM ... - ^ --- no non-recursive term -WITH RECURSIVE x(n) AS (SELECT n FROM x) - SELECT * FROM x; -ERROR: recursive query "x" does not have the form non-recursive-term UNION [ALL] recursive-term -LINE 1: WITH RECURSIVE x(n) AS (SELECT n FROM x) - ^ --- recursive term in the left hand side (strictly speaking, should allow this) -WITH RECURSIVE x(n) AS (SELECT n FROM x UNION ALL SELECT 1) - SELECT * FROM x; -ERROR: recursive reference to query "x" must not appear within its non-recursive term -LINE 1: WITH RECURSIVE x(n) AS (SELECT n FROM x UNION ALL SELECT 1) - ^ -CREATE TEMPORARY TABLE y (a INTEGER); -INSERT INTO y SELECT generate_series(1, 10); --- LEFT JOIN -WITH RECURSIVE x(n) AS (SELECT a FROM y WHERE a = 1 - UNION ALL - SELECT x.n+1 FROM y LEFT JOIN x ON x.n = y.a WHERE n < 10) -SELECT * FROM x; -ERROR: recursive reference to query "x" must not appear within an outer join -LINE 3: SELECT x.n+1 FROM y LEFT JOIN x ON x.n = y.a WHERE n < 10) - ^ --- RIGHT JOIN -WITH RECURSIVE x(n) AS (SELECT a FROM y WHERE a = 1 - UNION ALL - SELECT x.n+1 FROM x RIGHT JOIN y ON x.n = y.a WHERE n < 10) -SELECT * FROM x; -ERROR: recursive reference to query "x" must not appear within an outer join -LINE 3: SELECT x.n+1 FROM x RIGHT JOIN y ON x.n = y.a WHERE n < 10) - ^ --- FULL JOIN -WITH RECURSIVE x(n) AS (SELECT a FROM y WHERE a = 1 - UNION ALL - SELECT x.n+1 FROM x FULL JOIN y ON x.n = y.a WHERE n < 10) -SELECT * FROM x; -ERROR: recursive reference to query "x" must not appear within an outer join -LINE 3: SELECT x.n+1 FROM x FULL JOIN y ON x.n = y.a WHERE n < 10) - ^ --- subquery -WITH RECURSIVE x(n) AS (SELECT 1 UNION ALL SELECT n+1 FROM x - WHERE n IN (SELECT * FROM x)) - SELECT * FROM x; -ERROR: recursive reference to query "x" must not appear within a subquery -LINE 2: WHERE n IN (SELECT * FROM x)) - ^ --- aggregate functions -WITH RECURSIVE x(n) AS (SELECT 1 UNION ALL SELECT count(*) FROM x) - SELECT * FROM x; -ERROR: aggregate functions are not allowed in a recursive query's recursive term -LINE 1: WITH RECURSIVE x(n) AS (SELECT 1 UNION ALL SELECT count(*) F... - ^ -WITH RECURSIVE x(n) AS (SELECT 1 UNION ALL SELECT sum(n) FROM x) - SELECT * FROM x; -ERROR: aggregate functions are not allowed in a recursive query's recursive term -LINE 1: WITH RECURSIVE x(n) AS (SELECT 1 UNION ALL SELECT sum(n) FRO... - ^ --- ORDER BY -WITH RECURSIVE x(n) AS (SELECT 1 UNION ALL SELECT n+1 FROM x ORDER BY 1) - SELECT * FROM x; -ERROR: ORDER BY in a recursive query is not implemented -LINE 1: ...VE x(n) AS (SELECT 1 UNION ALL SELECT n+1 FROM x ORDER BY 1) - ^ --- LIMIT/OFFSET -WITH RECURSIVE x(n) AS (SELECT 1 UNION ALL SELECT n+1 FROM x LIMIT 10 OFFSET 1) - SELECT * FROM x; -ERROR: OFFSET in a recursive query is not implemented -LINE 1: ... AS (SELECT 1 UNION ALL SELECT n+1 FROM x LIMIT 10 OFFSET 1) - ^ --- FOR UPDATE -WITH RECURSIVE x(n) AS (SELECT 1 UNION ALL SELECT n+1 FROM x FOR UPDATE) - SELECT * FROM x; -ERROR: FOR UPDATE/SHARE in a recursive query is not implemented --- target list has a recursive query name -WITH RECURSIVE x(id) AS (values (1) - UNION ALL - SELECT (SELECT * FROM x) FROM x WHERE id < 5 -) SELECT * FROM x; -ERROR: recursive reference to query "x" must not appear within a subquery -LINE 3: SELECT (SELECT * FROM x) FROM x WHERE id < 5 - ^ --- mutual recursive query (not implemented) -WITH RECURSIVE - x (id) AS (SELECT 1 UNION ALL SELECT id+1 FROM y WHERE id < 5), - y (id) AS (SELECT 1 UNION ALL SELECT id+1 FROM x WHERE id < 5) -SELECT * FROM x; -ERROR: mutual recursion between WITH items is not implemented -LINE 2: x (id) AS (SELECT 1 UNION ALL SELECT id+1 FROM y WHERE id ... - ^ --- non-linear recursion is not allowed -WITH RECURSIVE foo(i) AS - (values (1) - UNION ALL - (SELECT i+1 FROM foo WHERE i < 10 - UNION ALL - SELECT i+1 FROM foo WHERE i < 5) -) SELECT * FROM foo; -ERROR: recursive reference to query "foo" must not appear more than once -LINE 6: SELECT i+1 FROM foo WHERE i < 5) - ^ -WITH RECURSIVE foo(i) AS - (values (1) - UNION ALL - SELECT * FROM - (SELECT i+1 FROM foo WHERE i < 10 - UNION ALL - SELECT i+1 FROM foo WHERE i < 5) AS t -) SELECT * FROM foo; -ERROR: recursive reference to query "foo" must not appear more than once -LINE 7: SELECT i+1 FROM foo WHERE i < 5) AS t - ^ -WITH RECURSIVE foo(i) AS - (values (1) - UNION ALL - (SELECT i+1 FROM foo WHERE i < 10 - EXCEPT - SELECT i+1 FROM foo WHERE i < 5) -) SELECT * FROM foo; -ERROR: recursive reference to query "foo" must not appear within EXCEPT -LINE 6: SELECT i+1 FROM foo WHERE i < 5) - ^ -WITH RECURSIVE foo(i) AS - (values (1) - UNION ALL - (SELECT i+1 FROM foo WHERE i < 10 - INTERSECT - SELECT i+1 FROM foo WHERE i < 5) -) SELECT * FROM foo; -ERROR: recursive reference to query "foo" must not appear more than once -LINE 6: SELECT i+1 FROM foo WHERE i < 5) - ^ --- Wrong type induced from non-recursive term -WITH RECURSIVE foo(i) AS - (SELECT i FROM (VALUES(1),(2)) t(i) - UNION ALL - SELECT (i+1)::numeric(10,0) FROM foo WHERE i < 10) -SELECT * FROM foo; -ERROR: recursive query "foo" column 1 has type integer in non-recursive term but type numeric overall -LINE 2: (SELECT i FROM (VALUES(1),(2)) t(i) - ^ -HINT: Cast the output of the non-recursive term to the correct type. --- rejects different typmod, too (should we allow this?) -WITH RECURSIVE foo(i) AS - (SELECT i::numeric(3,0) FROM (VALUES(1),(2)) t(i) - UNION ALL - SELECT (i+1)::numeric(10,0) FROM foo WHERE i < 10) -SELECT * FROM foo; -ERROR: recursive query "foo" column 1 has type numeric(3,0) in non-recursive term but type numeric overall -LINE 2: (SELECT i::numeric(3,0) FROM (VALUES(1),(2)) t(i) - ^ -HINT: Cast the output of the non-recursive term to the correct type. --- disallow OLD/NEW reference in CTE -CREATE TEMPORARY TABLE x (n integer); -CREATE RULE r2 AS ON UPDATE TO x DO INSTEAD - WITH t AS (SELECT OLD.*) UPDATE y SET a = t.n FROM t; -ERROR: cannot refer to OLD within WITH query --- --- test for bug #4902 --- -with cte(foo) as ( values(42) ) values((select foo from cte)); - column1 ---------- - 42 -(1 row) - -with cte(foo) as ( select 42 ) select * from ((select foo from cte)) q; - foo ------ - 42 -(1 row) - --- test CTE referencing an outer-level variable (to see that changed-parameter --- signaling still works properly after fixing this bug) -select ( with cte(foo) as ( values(f1) ) - select (select foo from cte) ) -from int4_tbl; - foo -------------- - 0 - 123456 - -123456 - 2147483647 - -2147483647 -(5 rows) - -select ( with cte(foo) as ( values(f1) ) - values((select foo from cte)) ) -from int4_tbl; - column1 -------------- - 0 - 123456 - -123456 - 2147483647 - -2147483647 -(5 rows) - --- --- test for nested-recursive-WITH bug --- -WITH RECURSIVE t(j) AS ( - WITH RECURSIVE s(i) AS ( - VALUES (1) - UNION ALL - SELECT i+1 FROM s WHERE i < 10 - ) - SELECT i FROM s - UNION ALL - SELECT j+1 FROM t WHERE j < 10 -) -SELECT * FROM t; - j ----- - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 5 - 6 - 7 - 8 - 9 - 10 - 6 - 7 - 8 - 9 - 10 - 7 - 8 - 9 - 10 - 8 - 9 - 10 - 9 - 10 - 10 -(55 rows) - --- --- test WITH attached to intermediate-level set operation --- -WITH outermost(x) AS ( - SELECT 1 - UNION (WITH innermost as (SELECT 2) - SELECT * FROM innermost - UNION SELECT 3) -) -SELECT * FROM outermost ORDER BY 1; - x ---- - 1 - 2 - 3 -(3 rows) - -WITH outermost(x) AS ( - SELECT 1 - UNION (WITH innermost as (SELECT 2) - SELECT * FROM outermost -- fail - UNION SELECT * FROM innermost) -) -SELECT * FROM outermost ORDER BY 1; -ERROR: relation "outermost" does not exist -LINE 4: SELECT * FROM outermost - ^ -DETAIL: There is a WITH item named "outermost", but it cannot be referenced from this part of the query. -HINT: Use WITH RECURSIVE, or re-order the WITH items to remove forward references. -WITH RECURSIVE outermost(x) AS ( - SELECT 1 - UNION (WITH innermost as (SELECT 2) - SELECT * FROM outermost - UNION SELECT * FROM innermost) -) -SELECT * FROM outermost ORDER BY 1; - x ---- - 1 - 2 -(2 rows) - -WITH RECURSIVE outermost(x) AS ( - WITH innermost as (SELECT 2 FROM outermost) -- fail - SELECT * FROM innermost - UNION SELECT * from outermost -) -SELECT * FROM outermost ORDER BY 1; -ERROR: recursive reference to query "outermost" must not appear within a subquery -LINE 2: WITH innermost as (SELECT 2 FROM outermost) - ^ --- --- This test will fail with the old implementation of PARAM_EXEC parameter --- assignment, because the "q1" Var passed down to A's targetlist subselect --- looks exactly like the "A.id" Var passed down to C's subselect, causing --- the old code to give them the same runtime PARAM_EXEC slot. But the --- lifespans of the two parameters overlap, thanks to B also reading A. --- -with -A as ( select q2 as id, (select q1) as x from int8_tbl ), -B as ( select id, row_number() over (partition by id) as r from A ), -C as ( select A.id, array(select B.id from B where B.id = A.id) from A ) -select * from C; - id | array --------------------+------------------------------------- - 456 | {456} - 4567890123456789 | {4567890123456789,4567890123456789} - 123 | {123} - 4567890123456789 | {4567890123456789,4567890123456789} - -4567890123456789 | {-4567890123456789} -(5 rows) - --- --- Test CTEs read in non-initialization orders --- -WITH RECURSIVE - tab(id_key,link) AS (VALUES (1,17), (2,17), (3,17), (4,17), (6,17), (5,17)), - iter (id_key, row_type, link) AS ( - SELECT 0, 'base', 17 - UNION ALL ( - WITH remaining(id_key, row_type, link, min) AS ( - SELECT tab.id_key, 'true'::text, iter.link, MIN(tab.id_key) OVER () - FROM tab INNER JOIN iter USING (link) - WHERE tab.id_key > iter.id_key - ), - first_remaining AS ( - SELECT id_key, row_type, link - FROM remaining - WHERE id_key=min - ), - effect AS ( - SELECT tab.id_key, 'new'::text, tab.link - FROM first_remaining e INNER JOIN tab ON e.id_key=tab.id_key - WHERE e.row_type = 'false' - ) - SELECT * FROM first_remaining - UNION ALL SELECT * FROM effect - ) - ) -SELECT * FROM iter; - id_key | row_type | link ---------+----------+------ - 0 | base | 17 - 1 | true | 17 - 2 | true | 17 - 3 | true | 17 - 4 | true | 17 - 5 | true | 17 - 6 | true | 17 -(7 rows) - -WITH RECURSIVE - tab(id_key,link) AS (VALUES (1,17), (2,17), (3,17), (4,17), (6,17), (5,17)), - iter (id_key, row_type, link) AS ( - SELECT 0, 'base', 17 - UNION ( - WITH remaining(id_key, row_type, link, min) AS ( - SELECT tab.id_key, 'true'::text, iter.link, MIN(tab.id_key) OVER () - FROM tab INNER JOIN iter USING (link) - WHERE tab.id_key > iter.id_key - ), - first_remaining AS ( - SELECT id_key, row_type, link - FROM remaining - WHERE id_key=min - ), - effect AS ( - SELECT tab.id_key, 'new'::text, tab.link - FROM first_remaining e INNER JOIN tab ON e.id_key=tab.id_key - WHERE e.row_type = 'false' - ) - SELECT * FROM first_remaining - UNION ALL SELECT * FROM effect - ) - ) -SELECT * FROM iter; - id_key | row_type | link ---------+----------+------ - 0 | base | 17 - 1 | true | 17 - 2 | true | 17 - 3 | true | 17 - 4 | true | 17 - 5 | true | 17 - 6 | true | 17 -(7 rows) - --- --- Data-modifying statements in WITH --- --- INSERT ... RETURNING -WITH t AS ( - INSERT INTO y - VALUES - (11), - (12), - (13), - (14), - (15), - (16), - (17), - (18), - (19), - (20) - RETURNING * -) -SELECT * FROM t; - a ----- - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 -(10 rows) - -SELECT * FROM y; - a ----- - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 -(20 rows) - --- UPDATE ... RETURNING -WITH t AS ( - UPDATE y - SET a=a+1 - RETURNING * -) -SELECT * FROM t; - a ----- - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 - 21 -(20 rows) - -SELECT * FROM y; - a ----- - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 - 21 -(20 rows) - --- DELETE ... RETURNING -WITH t AS ( - DELETE FROM y - WHERE a <= 10 - RETURNING * -) -SELECT * FROM t; - a ----- - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 -(9 rows) - -SELECT * FROM y; - a ----- - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 - 21 -(11 rows) - --- forward reference -WITH RECURSIVE t AS ( - INSERT INTO y - SELECT a+5 FROM t2 WHERE a > 5 - RETURNING * -), t2 AS ( - UPDATE y SET a=a-11 RETURNING * -) -SELECT * FROM t -UNION ALL -SELECT * FROM t2; - a ----- - 11 - 12 - 13 - 14 - 15 - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 -(16 rows) - -SELECT * FROM y; - a ----- - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 11 - 7 - 12 - 8 - 13 - 9 - 14 - 10 - 15 -(16 rows) - --- unconditional DO INSTEAD rule -CREATE RULE y_rule AS ON DELETE TO y DO INSTEAD - INSERT INTO y VALUES(42) RETURNING *; -WITH t AS ( - DELETE FROM y RETURNING * -) -SELECT * FROM t; - a ----- - 42 -(1 row) - -SELECT * FROM y; - a ----- - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 11 - 7 - 12 - 8 - 13 - 9 - 14 - 10 - 15 - 42 -(17 rows) - -DROP RULE y_rule ON y; --- check merging of outer CTE with CTE in a rule action -CREATE TEMP TABLE bug6051 AS - select i from generate_series(1,3) as t(i); -SELECT * FROM bug6051; - i ---- - 1 - 2 - 3 -(3 rows) - -WITH t1 AS ( DELETE FROM bug6051 RETURNING * ) -INSERT INTO bug6051 SELECT * FROM t1; -SELECT * FROM bug6051; - i ---- - 1 - 2 - 3 -(3 rows) - -CREATE TEMP TABLE bug6051_2 (i int); -CREATE RULE bug6051_ins AS ON INSERT TO bug6051 DO INSTEAD - INSERT INTO bug6051_2 - VALUES(NEW.i); -WITH t1 AS ( DELETE FROM bug6051 RETURNING * ) -INSERT INTO bug6051 SELECT * FROM t1; -SELECT * FROM bug6051; - i ---- -(0 rows) - -SELECT * FROM bug6051_2; - i ---- - 1 - 2 - 3 -(3 rows) - --- check INSERT...SELECT rule actions are disallowed on commands --- that have modifyingCTEs -CREATE OR REPLACE RULE bug6051_ins AS ON INSERT TO bug6051 DO INSTEAD - INSERT INTO bug6051_2 - SELECT NEW.i; -WITH t1 AS ( DELETE FROM bug6051 RETURNING * ) -INSERT INTO bug6051 SELECT * FROM t1; -ERROR: INSERT...SELECT rule actions are not supported for queries having data-modifying statements in WITH --- silly example to verify that hasModifyingCTE flag is propagated -CREATE TEMP TABLE bug6051_3 AS - SELECT a FROM generate_series(11,13) AS a; -CREATE RULE bug6051_3_ins AS ON INSERT TO bug6051_3 DO INSTEAD - SELECT i FROM bug6051_2; -BEGIN; SET LOCAL force_parallel_mode = on; -WITH t1 AS ( DELETE FROM bug6051_3 RETURNING * ) - INSERT INTO bug6051_3 SELECT * FROM t1; - i ---- - 1 - 2 - 3 - 1 - 2 - 3 - 1 - 2 - 3 -(9 rows) - -COMMIT; -SELECT * FROM bug6051_3; - a ---- -(0 rows) - --- check case where CTE reference is removed due to optimization -EXPLAIN (VERBOSE, COSTS OFF) -SELECT q1 FROM -( - WITH t_cte AS (SELECT * FROM int8_tbl t) - SELECT q1, (SELECT q2 FROM t_cte WHERE t_cte.q1 = i8.q1) AS t_sub - FROM int8_tbl i8 -) ss; - QUERY PLAN --------------------------------------- - Subquery Scan on ss - Output: ss.q1 - -> Seq Scan on public.int8_tbl i8 - Output: i8.q1, NULL::bigint -(4 rows) - -SELECT q1 FROM -( - WITH t_cte AS (SELECT * FROM int8_tbl t) - SELECT q1, (SELECT q2 FROM t_cte WHERE t_cte.q1 = i8.q1) AS t_sub - FROM int8_tbl i8 -) ss; - q1 ------------------- - 123 - 123 - 4567890123456789 - 4567890123456789 - 4567890123456789 -(5 rows) - -EXPLAIN (VERBOSE, COSTS OFF) -SELECT q1 FROM -( - WITH t_cte AS MATERIALIZED (SELECT * FROM int8_tbl t) - SELECT q1, (SELECT q2 FROM t_cte WHERE t_cte.q1 = i8.q1) AS t_sub - FROM int8_tbl i8 -) ss; - QUERY PLAN ---------------------------------------------- - Subquery Scan on ss - Output: ss.q1 - -> Seq Scan on public.int8_tbl i8 - Output: i8.q1, NULL::bigint - CTE t_cte - -> Seq Scan on public.int8_tbl t - Output: t.q1, t.q2 -(7 rows) - -SELECT q1 FROM -( - WITH t_cte AS MATERIALIZED (SELECT * FROM int8_tbl t) - SELECT q1, (SELECT q2 FROM t_cte WHERE t_cte.q1 = i8.q1) AS t_sub - FROM int8_tbl i8 -) ss; - q1 ------------------- - 123 - 123 - 4567890123456789 - 4567890123456789 - 4567890123456789 -(5 rows) - --- a truly recursive CTE in the same list -WITH RECURSIVE t(a) AS ( - SELECT 0 - UNION ALL - SELECT a+1 FROM t WHERE a+1 < 5 -), t2 as ( - INSERT INTO y - SELECT * FROM t RETURNING * -) -SELECT * FROM t2 JOIN y USING (a) ORDER BY a; - a ---- - 0 - 1 - 2 - 3 - 4 -(5 rows) - -SELECT * FROM y; - a ----- - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 11 - 7 - 12 - 8 - 13 - 9 - 14 - 10 - 15 - 42 - 0 - 1 - 2 - 3 - 4 -(22 rows) - --- data-modifying WITH in a modifying statement -WITH t AS ( - DELETE FROM y - WHERE a <= 10 - RETURNING * -) -INSERT INTO y SELECT -a FROM t RETURNING *; - a ------ - 0 - -1 - -2 - -3 - -4 - -5 - -6 - -7 - -8 - -9 - -10 - 0 - -1 - -2 - -3 - -4 -(16 rows) - -SELECT * FROM y; - a ------ - 11 - 12 - 13 - 14 - 15 - 42 - 0 - -1 - -2 - -3 - -4 - -5 - -6 - -7 - -8 - -9 - -10 - 0 - -1 - -2 - -3 - -4 -(22 rows) - --- check that WITH query is run to completion even if outer query isn't -WITH t AS ( - UPDATE y SET a = a * 100 RETURNING * -) -SELECT * FROM t LIMIT 10; - a ------- - 1100 - 1200 - 1300 - 1400 - 1500 - 4200 - 0 - -100 - -200 - -300 -(10 rows) - -SELECT * FROM y; - a -------- - 1100 - 1200 - 1300 - 1400 - 1500 - 4200 - 0 - -100 - -200 - -300 - -400 - -500 - -600 - -700 - -800 - -900 - -1000 - 0 - -100 - -200 - -300 - -400 -(22 rows) - --- data-modifying WITH containing INSERT...ON CONFLICT DO UPDATE -CREATE TABLE withz AS SELECT i AS k, (i || ' v')::text v FROM generate_series(1, 16, 3) i; -ALTER TABLE withz ADD UNIQUE (k); -WITH t AS ( - INSERT INTO withz SELECT i, 'insert' - FROM generate_series(0, 16) i - ON CONFLICT (k) DO UPDATE SET v = withz.v || ', now update' - RETURNING * -) -SELECT * FROM t JOIN y ON t.k = y.a ORDER BY a, k; - k | v | a ----+--------+--- - 0 | insert | 0 - 0 | insert | 0 -(2 rows) - --- Test EXCLUDED.* reference within CTE -WITH aa AS ( - INSERT INTO withz VALUES(1, 5) ON CONFLICT (k) DO UPDATE SET v = EXCLUDED.v - WHERE withz.k != EXCLUDED.k - RETURNING * -) -SELECT * FROM aa; - k | v ----+--- -(0 rows) - --- New query/snapshot demonstrates side-effects of previous query. -SELECT * FROM withz ORDER BY k; - k | v -----+------------------ - 0 | insert - 1 | 1 v, now update - 2 | insert - 3 | insert - 4 | 4 v, now update - 5 | insert - 6 | insert - 7 | 7 v, now update - 8 | insert - 9 | insert - 10 | 10 v, now update - 11 | insert - 12 | insert - 13 | 13 v, now update - 14 | insert - 15 | insert - 16 | 16 v, now update -(17 rows) - --- --- Ensure subqueries within the update clause work, even if they --- reference outside values --- -WITH aa AS (SELECT 1 a, 2 b) -INSERT INTO withz VALUES(1, 'insert') -ON CONFLICT (k) DO UPDATE SET v = (SELECT b || ' update' FROM aa WHERE a = 1 LIMIT 1); -WITH aa AS (SELECT 1 a, 2 b) -INSERT INTO withz VALUES(1, 'insert') -ON CONFLICT (k) DO UPDATE SET v = ' update' WHERE withz.k = (SELECT a FROM aa); -WITH aa AS (SELECT 1 a, 2 b) -INSERT INTO withz VALUES(1, 'insert') -ON CONFLICT (k) DO UPDATE SET v = (SELECT b || ' update' FROM aa WHERE a = 1 LIMIT 1); -WITH aa AS (SELECT 'a' a, 'b' b UNION ALL SELECT 'a' a, 'b' b) -INSERT INTO withz VALUES(1, 'insert') -ON CONFLICT (k) DO UPDATE SET v = (SELECT b || ' update' FROM aa WHERE a = 'a' LIMIT 1); -WITH aa AS (SELECT 1 a, 2 b) -INSERT INTO withz VALUES(1, (SELECT b || ' insert' FROM aa WHERE a = 1 )) -ON CONFLICT (k) DO UPDATE SET v = (SELECT b || ' update' FROM aa WHERE a = 1 LIMIT 1); --- Update a row more than once, in different parts of a wCTE. That is --- an allowed, presumably very rare, edge case, but since it was --- broken in the past, having a test seems worthwhile. -WITH simpletup AS ( - SELECT 2 k, 'Green' v), -upsert_cte AS ( - INSERT INTO withz VALUES(2, 'Blue') ON CONFLICT (k) DO - UPDATE SET (k, v) = (SELECT k, v FROM simpletup WHERE simpletup.k = withz.k) - RETURNING k, v) -INSERT INTO withz VALUES(2, 'Red') ON CONFLICT (k) DO -UPDATE SET (k, v) = (SELECT k, v FROM upsert_cte WHERE upsert_cte.k = withz.k) -RETURNING k, v; - k | v ----+--- -(0 rows) - -DROP TABLE withz; --- check that run to completion happens in proper ordering -TRUNCATE TABLE y; -INSERT INTO y SELECT generate_series(1, 3); -CREATE TEMPORARY TABLE yy (a INTEGER); -WITH RECURSIVE t1 AS ( - INSERT INTO y SELECT * FROM y RETURNING * -), t2 AS ( - INSERT INTO yy SELECT * FROM t1 RETURNING * -) -SELECT 1; - ?column? ----------- - 1 -(1 row) - -SELECT * FROM y; - a ---- - 1 - 2 - 3 - 1 - 2 - 3 -(6 rows) - -SELECT * FROM yy; - a ---- - 1 - 2 - 3 -(3 rows) - -WITH RECURSIVE t1 AS ( - INSERT INTO yy SELECT * FROM t2 RETURNING * -), t2 AS ( - INSERT INTO y SELECT * FROM y RETURNING * -) -SELECT 1; - ?column? ----------- - 1 -(1 row) - -SELECT * FROM y; - a ---- - 1 - 2 - 3 - 1 - 2 - 3 - 1 - 2 - 3 - 1 - 2 - 3 -(12 rows) - -SELECT * FROM yy; - a ---- - 1 - 2 - 3 - 1 - 2 - 3 - 1 - 2 - 3 -(9 rows) - --- triggers -TRUNCATE TABLE y; -INSERT INTO y SELECT generate_series(1, 10); -CREATE FUNCTION y_trigger() RETURNS trigger AS $$ -begin - raise notice 'y_trigger: a = %', new.a; - return new; -end; -$$ LANGUAGE plpgsql; -CREATE TRIGGER y_trig BEFORE INSERT ON y FOR EACH ROW - EXECUTE PROCEDURE y_trigger(); -WITH t AS ( - INSERT INTO y - VALUES - (21), - (22), - (23) - RETURNING * -) -SELECT * FROM t; -NOTICE: y_trigger: a = 21 -NOTICE: y_trigger: a = 22 -NOTICE: y_trigger: a = 23 - a ----- - 21 - 22 - 23 -(3 rows) - -SELECT * FROM y; - a ----- - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 21 - 22 - 23 -(13 rows) - -DROP TRIGGER y_trig ON y; -CREATE TRIGGER y_trig AFTER INSERT ON y FOR EACH ROW - EXECUTE PROCEDURE y_trigger(); -WITH t AS ( - INSERT INTO y - VALUES - (31), - (32), - (33) - RETURNING * -) -SELECT * FROM t LIMIT 1; -NOTICE: y_trigger: a = 31 -NOTICE: y_trigger: a = 32 -NOTICE: y_trigger: a = 33 - a ----- - 31 -(1 row) - -SELECT * FROM y; - a ----- - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 21 - 22 - 23 - 31 - 32 - 33 -(16 rows) - -DROP TRIGGER y_trig ON y; -CREATE OR REPLACE FUNCTION y_trigger() RETURNS trigger AS $$ -begin - raise notice 'y_trigger'; - return null; -end; -$$ LANGUAGE plpgsql; -CREATE TRIGGER y_trig AFTER INSERT ON y FOR EACH STATEMENT - EXECUTE PROCEDURE y_trigger(); -WITH t AS ( - INSERT INTO y - VALUES - (41), - (42), - (43) - RETURNING * -) -SELECT * FROM t; -NOTICE: y_trigger - a ----- - 41 - 42 - 43 -(3 rows) - -SELECT * FROM y; - a ----- - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 21 - 22 - 23 - 31 - 32 - 33 - 41 - 42 - 43 -(19 rows) - -DROP TRIGGER y_trig ON y; -DROP FUNCTION y_trigger(); --- WITH attached to inherited UPDATE or DELETE -CREATE TEMP TABLE parent ( id int, val text ); -CREATE TEMP TABLE child1 ( ) INHERITS ( parent ); -CREATE TEMP TABLE child2 ( ) INHERITS ( parent ); -INSERT INTO parent VALUES ( 1, 'p1' ); -INSERT INTO child1 VALUES ( 11, 'c11' ),( 12, 'c12' ); -INSERT INTO child2 VALUES ( 23, 'c21' ),( 24, 'c22' ); -WITH rcte AS ( SELECT sum(id) AS totalid FROM parent ) -UPDATE parent SET id = id + totalid FROM rcte; -SELECT * FROM parent; - id | val -----+----- - 72 | p1 - 82 | c11 - 83 | c12 - 94 | c21 - 95 | c22 -(5 rows) - -WITH wcte AS ( INSERT INTO child1 VALUES ( 42, 'new' ) RETURNING id AS newid ) -UPDATE parent SET id = id + newid FROM wcte; -SELECT * FROM parent; - id | val ------+----- - 114 | p1 - 42 | new - 124 | c11 - 125 | c12 - 136 | c21 - 137 | c22 -(6 rows) - -WITH rcte AS ( SELECT max(id) AS maxid FROM parent ) -DELETE FROM parent USING rcte WHERE id = maxid; -SELECT * FROM parent; - id | val ------+----- - 114 | p1 - 42 | new - 124 | c11 - 125 | c12 - 136 | c21 -(5 rows) - -WITH wcte AS ( INSERT INTO child2 VALUES ( 42, 'new2' ) RETURNING id AS newid ) -DELETE FROM parent USING wcte WHERE id = newid; -SELECT * FROM parent; - id | val ------+------ - 114 | p1 - 124 | c11 - 125 | c12 - 136 | c21 - 42 | new2 -(5 rows) - --- check EXPLAIN VERBOSE for a wCTE with RETURNING -EXPLAIN (VERBOSE, COSTS OFF) -WITH wcte AS ( INSERT INTO int8_tbl VALUES ( 42, 47 ) RETURNING q2 ) -DELETE FROM a USING wcte WHERE aa = q2; - QUERY PLAN ------------------------------------------------------------- - Delete on public.a - Delete on public.a a_1 - Delete on public.b a_2 - Delete on public.c a_3 - Delete on public.d a_4 - CTE wcte - -> Insert on public.int8_tbl - Output: int8_tbl.q2 - -> Result - Output: '42'::bigint, '47'::bigint - -> Hash Join - Output: wcte.*, a.tableoid, a.ctid - Hash Cond: (a.aa = wcte.q2) - -> Append - -> Seq Scan on public.a a_1 - Output: a_1.aa, a_1.tableoid, a_1.ctid - -> Seq Scan on public.b a_2 - Output: a_2.aa, a_2.tableoid, a_2.ctid - -> Seq Scan on public.c a_3 - Output: a_3.aa, a_3.tableoid, a_3.ctid - -> Seq Scan on public.d a_4 - Output: a_4.aa, a_4.tableoid, a_4.ctid - -> Hash - Output: wcte.*, wcte.q2 - -> CTE Scan on wcte - Output: wcte.*, wcte.q2 -(26 rows) - --- error cases --- data-modifying WITH tries to use its own output -WITH RECURSIVE t AS ( - INSERT INTO y - SELECT * FROM t -) -VALUES(FALSE); -ERROR: recursive query "t" must not contain data-modifying statements -LINE 1: WITH RECURSIVE t AS ( - ^ --- no RETURNING in a referenced data-modifying WITH -WITH t AS ( - INSERT INTO y VALUES(0) -) -SELECT * FROM t; -ERROR: WITH query "t" does not have a RETURNING clause -LINE 4: SELECT * FROM t; - ^ --- data-modifying WITH allowed only at the top level -SELECT * FROM ( - WITH t AS (UPDATE y SET a=a+1 RETURNING *) - SELECT * FROM t -) ss; -ERROR: WITH clause containing a data-modifying statement must be at the top level -LINE 2: WITH t AS (UPDATE y SET a=a+1 RETURNING *) - ^ --- most variants of rules aren't allowed -CREATE RULE y_rule AS ON INSERT TO y WHERE a=0 DO INSTEAD DELETE FROM y; -WITH t AS ( - INSERT INTO y VALUES(0) -) -VALUES(FALSE); -ERROR: conditional DO INSTEAD rules are not supported for data-modifying statements in WITH -CREATE OR REPLACE RULE y_rule AS ON INSERT TO y DO INSTEAD NOTHING; -WITH t AS ( - INSERT INTO y VALUES(0) -) -VALUES(FALSE); -ERROR: DO INSTEAD NOTHING rules are not supported for data-modifying statements in WITH -CREATE OR REPLACE RULE y_rule AS ON INSERT TO y DO INSTEAD NOTIFY foo; -WITH t AS ( - INSERT INTO y VALUES(0) -) -VALUES(FALSE); -ERROR: DO INSTEAD NOTIFY rules are not supported for data-modifying statements in WITH -CREATE OR REPLACE RULE y_rule AS ON INSERT TO y DO ALSO NOTIFY foo; -WITH t AS ( - INSERT INTO y VALUES(0) -) -VALUES(FALSE); -ERROR: DO ALSO rules are not supported for data-modifying statements in WITH -CREATE OR REPLACE RULE y_rule AS ON INSERT TO y - DO INSTEAD (NOTIFY foo; NOTIFY bar); -WITH t AS ( - INSERT INTO y VALUES(0) -) -VALUES(FALSE); -ERROR: multi-statement DO INSTEAD rules are not supported for data-modifying statements in WITH -DROP RULE y_rule ON y; --- check that parser lookahead for WITH doesn't cause any odd behavior -create table foo (with baz); -- fail, WITH is a reserved word -ERROR: syntax error at or near "with" -LINE 1: create table foo (with baz); - ^ -create table foo (with ordinality); -- fail, WITH is a reserved word -ERROR: syntax error at or near "with" -LINE 1: create table foo (with ordinality); - ^ -with ordinality as (select 1 as x) select * from ordinality; - x ---- - 1 -(1 row) - --- check sane response to attempt to modify CTE relation -WITH with_test AS (SELECT 42) INSERT INTO with_test VALUES (1); -ERROR: relation "with_test" does not exist -LINE 1: WITH with_test AS (SELECT 42) INSERT INTO with_test VALUES (... - ^ --- check response to attempt to modify table with same name as a CTE (perhaps --- surprisingly it works, because CTEs don't hide tables from data-modifying --- statements) -create temp table with_test (i int); -with with_test as (select 42) insert into with_test select * from with_test; -select * from with_test; - i ----- - 42 -(1 row) - -drop table with_test; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/xml_1.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/xml.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/xml_1.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/xml.out 2023-02-20 19:48:42.989218623 -0500 @@ -1,1414 +1 @@ -CREATE TABLE xmltest ( - id int, - data xml -); -INSERT INTO xmltest VALUES (1, 'one'); -ERROR: unsupported XML feature -LINE 1: INSERT INTO xmltest VALUES (1, 'one'); - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -INSERT INTO xmltest VALUES (2, 'two'); -ERROR: unsupported XML feature -LINE 1: INSERT INTO xmltest VALUES (2, 'two'); - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -INSERT INTO xmltest VALUES (3, '', NULL, ''); -ERROR: unsupported XML feature -LINE 1: SELECT xmlconcat('', NULL, '', NULL, ''); -ERROR: unsupported XML feature -LINE 1: SELECT xmlconcat('', NULL, 'r'); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlelement(name foo, xml 'br'); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlelement(name foo, array[1, 2, 3]); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SET xmlbinary TO base64; -SELECT xmlelement(name foo, bytea 'bar'); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SET xmlbinary TO hex; -SELECT xmlelement(name foo, bytea 'bar'); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlelement(name foo, xmlattributes(true as bar)); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlelement(name foo, xmlattributes('2009-04-09 00:24:37'::timestamp as bar)); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlelement(name foo, xmlattributes('infinity'::timestamp as bar)); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlelement(name foo, xmlattributes('<>&"''' as funny, xml 'br' as funnier)); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlparse(content ''); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlparse(content ' '); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlparse(content 'abc'); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlparse(content 'x'); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlparse(content '&'); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlparse(content '&idontexist;'); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlparse(content ''); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlparse(content ''); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlparse(content '&idontexist;'); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlparse(content ''); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlparse(document ' '); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlparse(document 'abc'); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlparse(document 'x'); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlparse(document '&'); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlparse(document '&idontexist;'); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlparse(document ''); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlparse(document ''); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlparse(document '&idontexist;'); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlparse(document ''); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlpi(name foo); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlpi(name xml); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlpi(name xmlstuff); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlpi(name foo, 'bar'); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlpi(name foo, 'in?>valid'); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlpi(name foo, null); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlpi(name xml, null); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlpi(name xmlstuff, null); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlpi(name "xml-stylesheet", 'href="mystyle.css" type="text/css"'); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlpi(name foo, ' bar'); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlroot(xml '', version no value, standalone no value); -ERROR: unsupported XML feature -LINE 1: SELECT xmlroot(xml '', version no value, standalone no... - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlroot(xml '', version '2.0'); -ERROR: unsupported XML feature -LINE 1: SELECT xmlroot(xml '', version '2.0'); - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlroot(xml '', version no value, standalone yes); -ERROR: unsupported XML feature -LINE 1: SELECT xmlroot(xml '', version no value, standalone ye... - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlroot(xml '', version no value, standalone yes); -ERROR: unsupported XML feature -LINE 1: SELECT xmlroot(xml '', version no... - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlroot(xmlroot(xml '', version '1.0'), version '1.1', standalone no); -ERROR: unsupported XML feature -LINE 1: SELECT xmlroot(xmlroot(xml '', version '1.0'), version... - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlroot('', version no value, standalone no); -ERROR: unsupported XML feature -LINE 1: SELECT xmlroot('... - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlroot('', version no value, standalone no value); -ERROR: unsupported XML feature -LINE 1: SELECT xmlroot('... - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlroot('', version no value); -ERROR: unsupported XML feature -LINE 1: SELECT xmlroot('... - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlroot ( - xmlelement ( - name gazonk, - xmlattributes ( - 'val' AS name, - 1 + 1 AS num - ), - xmlelement ( - NAME qux, - 'foo' - ) - ), - version '1.0', - standalone yes -); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlserialize(content data as character varying(20)) FROM xmltest; - xmlserialize --------------- -(0 rows) - -SELECT xmlserialize(content 'good' as char(10)); -ERROR: unsupported XML feature -LINE 1: SELECT xmlserialize(content 'good' as char(10)); - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlserialize(document 'bad' as text); -ERROR: unsupported XML feature -LINE 1: SELECT xmlserialize(document 'bad' as text); - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xml 'bar' IS DOCUMENT; -ERROR: unsupported XML feature -LINE 1: SELECT xml 'bar' IS DOCUMENT; - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xml 'barfoo' IS DOCUMENT; -ERROR: unsupported XML feature -LINE 1: SELECT xml 'barfoo' IS DOCUMENT; - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xml '' IS NOT DOCUMENT; -ERROR: unsupported XML feature -LINE 1: SELECT xml '' IS NOT DOCUMENT; - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xml 'abc' IS NOT DOCUMENT; -ERROR: unsupported XML feature -LINE 1: SELECT xml 'abc' IS NOT DOCUMENT; - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT '<>' IS NOT DOCUMENT; -ERROR: unsupported XML feature -LINE 1: SELECT '<>' IS NOT DOCUMENT; - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlagg(data) FROM xmltest; - xmlagg --------- - -(1 row) - -SELECT xmlagg(data) FROM xmltest WHERE id > 10; - xmlagg --------- - -(1 row) - -SELECT xmlelement(name employees, xmlagg(xmlelement(name name, name))) FROM emp; -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. --- Check mapping SQL identifier to XML name -SELECT xmlpi(name ":::_xml_abc135.%-&_"); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlpi(name "123"); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -PREPARE foo (xml) AS SELECT xmlconcat('', $1); -ERROR: unsupported XML feature -LINE 1: PREPARE foo (xml) AS SELECT xmlconcat('', $1); - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SET XML OPTION DOCUMENT; -EXECUTE foo (''); -ERROR: prepared statement "foo" does not exist -EXECUTE foo ('bad'); -ERROR: prepared statement "foo" does not exist -SELECT xml ''; -ERROR: unsupported XML feature -LINE 1: SELECT xml ''; - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SET XML OPTION CONTENT; -EXECUTE foo (''); -ERROR: prepared statement "foo" does not exist -EXECUTE foo ('good'); -ERROR: prepared statement "foo" does not exist -SELECT xml ' '; -ERROR: unsupported XML feature -LINE 1: SELECT xml ' '; -ERROR: unsupported XML feature -LINE 1: SELECT xml ' '; -ERROR: unsupported XML feature -LINE 1: SELECT xml ''; - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xml ' oops '; -ERROR: unsupported XML feature -LINE 1: SELECT xml ' oops '; - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xml ' '; -ERROR: unsupported XML feature -LINE 1: SELECT xml ' '; - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xml ''; -ERROR: unsupported XML feature -LINE 1: SELECT xml ''; - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. --- Test backwards parsing -CREATE VIEW xmlview1 AS SELECT xmlcomment('test'); -CREATE VIEW xmlview2 AS SELECT xmlconcat('hello', 'you'); -ERROR: unsupported XML feature -LINE 1: CREATE VIEW xmlview2 AS SELECT xmlconcat('hello', 'you'); - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -CREATE VIEW xmlview3 AS SELECT xmlelement(name element, xmlattributes (1 as ":one:", 'deuce' as two), 'content&'); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -CREATE VIEW xmlview4 AS SELECT xmlelement(name employee, xmlforest(name, age, salary as pay)) FROM emp; -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -CREATE VIEW xmlview5 AS SELECT xmlparse(content 'x'); -CREATE VIEW xmlview6 AS SELECT xmlpi(name foo, 'bar'); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -CREATE VIEW xmlview7 AS SELECT xmlroot(xml '', version no value, standalone yes); -ERROR: unsupported XML feature -LINE 1: CREATE VIEW xmlview7 AS SELECT xmlroot(xml '', version... - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -CREATE VIEW xmlview8 AS SELECT xmlserialize(content 'good' as char(10)); -ERROR: unsupported XML feature -LINE 1: ...EATE VIEW xmlview8 AS SELECT xmlserialize(content 'good' as ... - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -CREATE VIEW xmlview9 AS SELECT xmlserialize(content 'good' as text); -ERROR: unsupported XML feature -LINE 1: ...EATE VIEW xmlview9 AS SELECT xmlserialize(content 'good' as ... - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT table_name, view_definition FROM information_schema.views - WHERE table_name LIKE 'xmlview%' ORDER BY 1; - table_name | view_definition -------------+-------------------------------------------------------------------------------- - xmlview1 | SELECT xmlcomment('test'::text) AS xmlcomment; - xmlview5 | SELECT XMLPARSE(CONTENT 'x'::text STRIP WHITESPACE) AS "xmlparse"; -(2 rows) - --- Text XPath expressions evaluation -SELECT xpath('/value', data) FROM xmltest; - xpath -------- -(0 rows) - -SELECT xpath(NULL, NULL) IS NULL FROM xmltest; - ?column? ----------- -(0 rows) - -SELECT xpath('', ''); -ERROR: unsupported XML feature -LINE 1: SELECT xpath('', ''); - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xpath('//text()', 'number one'); -ERROR: unsupported XML feature -LINE 1: SELECT xpath('//text()', 'number one', ARRAY[ARRAY['loc', 'http://127.0.0.1']]); -ERROR: unsupported XML feature -LINE 1: SELECT xpath('//loc:piece/@id', 'number one', ARRAY[ARRAY['loc', 'http://127.0.0.1']]); -ERROR: unsupported XML feature -LINE 1: SELECT xpath('//loc:piece', 'number one', ARRAY[ARRAY['loc', 'http://127.0.0.1']]); -ERROR: unsupported XML feature -LINE 1: SELECT xpath('//loc:piece', ''); -ERROR: unsupported XML feature -LINE 1: SELECT xpath('//@value', ''); - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xpath('''<>''', ''); -ERROR: unsupported XML feature -LINE 1: SELECT xpath('''<>''', ''); - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xpath('count(//*)', ''); -ERROR: unsupported XML feature -LINE 1: SELECT xpath('count(//*)', ''); - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xpath('count(//*)=0', ''); -ERROR: unsupported XML feature -LINE 1: SELECT xpath('count(//*)=0', ''); - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xpath('count(//*)=3', ''); -ERROR: unsupported XML feature -LINE 1: SELECT xpath('count(//*)=3', ''); - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xpath('name(/*)', ''); -ERROR: unsupported XML feature -LINE 1: SELECT xpath('name(/*)', ''); - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xpath('/nosuchtag', ''); -ERROR: unsupported XML feature -LINE 1: SELECT xpath('/nosuchtag', ''); - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xpath('root', ''); -ERROR: unsupported XML feature -LINE 1: SELECT xpath('root', ''); - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. --- Round-trip non-ASCII data through xpath(). -DO $$ -DECLARE - xml_declaration text := ''; - degree_symbol text; - res xml[]; -BEGIN - -- Per the documentation, except when the server encoding is UTF8, xpath() - -- may not work on non-ASCII data. The untranslatable_character and - -- undefined_function traps below, currently dead code, will become relevant - -- if we remove this limitation. - IF current_setting('server_encoding') <> 'UTF8' THEN - RAISE LOG 'skip: encoding % unsupported for xpath', - current_setting('server_encoding'); - RETURN; - END IF; - - degree_symbol := convert_from('\xc2b0', 'UTF8'); - res := xpath('text()', (xml_declaration || - '' || degree_symbol || '')::xml); - IF degree_symbol <> res[1]::text THEN - RAISE 'expected % (%), got % (%)', - degree_symbol, convert_to(degree_symbol, 'UTF8'), - res[1], convert_to(res[1]::text, 'UTF8'); - END IF; -EXCEPTION - -- character with byte sequence 0xc2 0xb0 in encoding "UTF8" has no equivalent in encoding "LATIN8" - WHEN untranslatable_character - -- default conversion function for encoding "UTF8" to "MULE_INTERNAL" does not exist - OR undefined_function - -- unsupported XML feature - OR feature_not_supported THEN - RAISE LOG 'skip: %', SQLERRM; -END -$$; --- Test xmlexists and xpath_exists -SELECT xmlexists('//town[text() = ''Toronto'']' PASSING BY REF 'Bidford-on-AvonCwmbranBristol'); -ERROR: unsupported XML feature -LINE 1: ...sts('//town[text() = ''Toronto'']' PASSING BY REF 'Bidford-on-AvonCwmbranBristol'); -ERROR: unsupported XML feature -LINE 1: ...sts('//town[text() = ''Cwmbran'']' PASSING BY REF ''); -ERROR: unsupported XML feature -LINE 1: ...LECT xmlexists('count(/nosuchtag)' PASSING BY REF '')... - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xpath_exists('//town[text() = ''Toronto'']','Bidford-on-AvonCwmbranBristol'::xml); -ERROR: unsupported XML feature -LINE 1: ...ELECT xpath_exists('//town[text() = ''Toronto'']','Bidford-on-AvonCwmbranBristol'::xml); -ERROR: unsupported XML feature -LINE 1: ...ELECT xpath_exists('//town[text() = ''Cwmbran'']',''::xml); -ERROR: unsupported XML feature -LINE 1: SELECT xpath_exists('count(/nosuchtag)', ''::xml); - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -INSERT INTO xmltest VALUES (4, 'BudvarfreeCarlinglots'::xml); -ERROR: unsupported XML feature -LINE 1: INSERT INTO xmltest VALUES (4, 'BudvarMolsonfreeCarlinglots'::xml); -ERROR: unsupported XML feature -LINE 1: INSERT INTO xmltest VALUES (5, 'MolsonBudvarfreeCarlinglots'::xml); -ERROR: unsupported XML feature -LINE 1: INSERT INTO xmltest VALUES (6, 'MolsonfreeCarlinglots'::xml); -ERROR: unsupported XML feature -LINE 1: INSERT INTO xmltest VALUES (7, 'number one'); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xml_is_well_formed('bar'); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xml_is_well_formed('bar'); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xml_is_well_formed('&'); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xml_is_well_formed('&idontexist;'); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xml_is_well_formed(''); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xml_is_well_formed(''); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xml_is_well_formed('&idontexist;'); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SET xmloption TO CONTENT; -SELECT xml_is_well_formed('abc'); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. --- Since xpath() deals with namespaces, it's a bit stricter about --- what's well-formed and what's not. If we don't obey these rules --- (i.e. ignore namespace-related errors from libxml), xpath() --- fails in subtle ways. The following would for example produce --- the xml value --- --- which is invalid because '<' may not appear un-escaped in --- attribute values. --- Since different libxml versions emit slightly different --- error messages, we suppress the DETAIL in this test. -\set VERBOSITY terse -SELECT xpath('/*', ''); -ERROR: unsupported XML feature at character 20 -\set VERBOSITY default --- Again, the XML isn't well-formed for namespace purposes -SELECT xpath('/*', ''); -ERROR: unsupported XML feature -LINE 1: SELECT xpath('/*', ''); - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. --- XPath deprecates relative namespaces, but they're not supposed to --- throw an error, only a warning. -SELECT xpath('/*', ''); -ERROR: unsupported XML feature -LINE 1: SELECT xpath('/*', ''); - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. --- External entity references should not leak filesystem information. -SELECT XMLPARSE(DOCUMENT ']>&c;'); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT XMLPARSE(DOCUMENT ']>&c;'); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. --- This might or might not load the requested DTD, but it mustn't throw error. -SELECT XMLPARSE(DOCUMENT ' '); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. --- XMLPATH tests -CREATE TABLE xmldata(data xml); -INSERT INTO xmldata VALUES(' - - AU - Australia - 3 - - - CN - China - 3 - - - HK - HongKong - 3 - - - IN - India - 3 - - - JP - Japan - 3Sinzo Abe - - - SG - Singapore - 3791 - -'); -ERROR: unsupported XML feature -LINE 1: INSERT INTO xmldata VALUES(' - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. --- XMLTABLE with columns -SELECT xmltable.* - FROM (SELECT data FROM xmldata) x, - LATERAL XMLTABLE('/ROWS/ROW' - PASSING data - COLUMNS id int PATH '@id', - _id FOR ORDINALITY, - country_name text PATH 'COUNTRY_NAME/text()' NOT NULL, - country_id text PATH 'COUNTRY_ID', - region_id int PATH 'REGION_ID', - size float PATH 'SIZE', - unit text PATH 'SIZE/@unit', - premier_name text PATH 'PREMIER_NAME' DEFAULT 'not specified'); - id | _id | country_name | country_id | region_id | size | unit | premier_name -----+-----+--------------+------------+-----------+------+------+-------------- -(0 rows) - -CREATE VIEW xmltableview1 AS SELECT xmltable.* - FROM (SELECT data FROM xmldata) x, - LATERAL XMLTABLE('/ROWS/ROW' - PASSING data - COLUMNS id int PATH '@id', - _id FOR ORDINALITY, - country_name text PATH 'COUNTRY_NAME/text()' NOT NULL, - country_id text PATH 'COUNTRY_ID', - region_id int PATH 'REGION_ID', - size float PATH 'SIZE', - unit text PATH 'SIZE/@unit', - premier_name text PATH 'PREMIER_NAME' DEFAULT 'not specified'); -SELECT * FROM xmltableview1; - id | _id | country_name | country_id | region_id | size | unit | premier_name -----+-----+--------------+------------+-----------+------+------+-------------- -(0 rows) - -\sv xmltableview1 -CREATE OR REPLACE VIEW public.xmltableview1 AS - SELECT "xmltable".id, - "xmltable"._id, - "xmltable".country_name, - "xmltable".country_id, - "xmltable".region_id, - "xmltable".size, - "xmltable".unit, - "xmltable".premier_name - FROM ( SELECT xmldata.data - FROM xmldata) x, - LATERAL XMLTABLE(('/ROWS/ROW'::text) PASSING (x.data) COLUMNS id integer PATH ('@id'::text), _id FOR ORDINALITY, country_name text PATH ('COUNTRY_NAME/text()'::text) NOT NULL, country_id text PATH ('COUNTRY_ID'::text), region_id integer PATH ('REGION_ID'::text), size double precision PATH ('SIZE'::text), unit text PATH ('SIZE/@unit'::text), premier_name text DEFAULT ('not specified'::text) PATH ('PREMIER_NAME'::text)) -EXPLAIN (COSTS OFF) SELECT * FROM xmltableview1; - QUERY PLAN ------------------------------------------ - Nested Loop - -> Seq Scan on xmldata - -> Table Function Scan on "xmltable" -(3 rows) - -EXPLAIN (COSTS OFF, VERBOSE) SELECT * FROM xmltableview1; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Nested Loop - Output: "xmltable".id, "xmltable"._id, "xmltable".country_name, "xmltable".country_id, "xmltable".region_id, "xmltable".size, "xmltable".unit, "xmltable".premier_name - -> Seq Scan on public.xmldata - Output: xmldata.data - -> Table Function Scan on "xmltable" - Output: "xmltable".id, "xmltable"._id, "xmltable".country_name, "xmltable".country_id, "xmltable".region_id, "xmltable".size, "xmltable".unit, "xmltable".premier_name - Table Function Call: XMLTABLE(('/ROWS/ROW'::text) PASSING (xmldata.data) COLUMNS id integer PATH ('@id'::text), _id FOR ORDINALITY, country_name text PATH ('COUNTRY_NAME/text()'::text) NOT NULL, country_id text PATH ('COUNTRY_ID'::text), region_id integer PATH ('REGION_ID'::text), size double precision PATH ('SIZE'::text), unit text PATH ('SIZE/@unit'::text), premier_name text DEFAULT ('not specified'::text) PATH ('PREMIER_NAME'::text)) -(7 rows) - --- XMLNAMESPACES tests -SELECT * FROM XMLTABLE(XMLNAMESPACES('http://x.y' AS zz), - '/zz:rows/zz:row' - PASSING '10' - COLUMNS a int PATH 'zz:a'); -ERROR: unsupported XML feature -LINE 3: PASSING '10' - COLUMNS a int PATH 'zz:a'); -ERROR: unsupported XML feature -LINE 3: PASSING '10' - COLUMNS a int PATH 'a'); -ERROR: unsupported XML feature -LINE 3: PASSING '' - COLUMNS a text PATH 'foo/namespace::node()'); -ERROR: unsupported XML feature -LINE 2: PASSING '' - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. --- used in prepare statements -PREPARE pp AS -SELECT xmltable.* - FROM (SELECT data FROM xmldata) x, - LATERAL XMLTABLE('/ROWS/ROW' - PASSING data - COLUMNS id int PATH '@id', - _id FOR ORDINALITY, - country_name text PATH 'COUNTRY_NAME' NOT NULL, - country_id text PATH 'COUNTRY_ID', - region_id int PATH 'REGION_ID', - size float PATH 'SIZE', - unit text PATH 'SIZE/@unit', - premier_name text PATH 'PREMIER_NAME' DEFAULT 'not specified'); -EXECUTE pp; - id | _id | country_name | country_id | region_id | size | unit | premier_name -----+-----+--------------+------------+-----------+------+------+-------------- -(0 rows) - -SELECT xmltable.* FROM xmldata, LATERAL xmltable('/ROWS/ROW[COUNTRY_NAME="Japan" or COUNTRY_NAME="India"]' PASSING data COLUMNS "COUNTRY_NAME" text, "REGION_ID" int); - COUNTRY_NAME | REGION_ID ---------------+----------- -(0 rows) - -SELECT xmltable.* FROM xmldata, LATERAL xmltable('/ROWS/ROW[COUNTRY_NAME="Japan" or COUNTRY_NAME="India"]' PASSING data COLUMNS id FOR ORDINALITY, "COUNTRY_NAME" text, "REGION_ID" int); - id | COUNTRY_NAME | REGION_ID -----+--------------+----------- -(0 rows) - -SELECT xmltable.* FROM xmldata, LATERAL xmltable('/ROWS/ROW[COUNTRY_NAME="Japan" or COUNTRY_NAME="India"]' PASSING data COLUMNS id int PATH '@id', "COUNTRY_NAME" text, "REGION_ID" int); - id | COUNTRY_NAME | REGION_ID -----+--------------+----------- -(0 rows) - -SELECT xmltable.* FROM xmldata, LATERAL xmltable('/ROWS/ROW[COUNTRY_NAME="Japan" or COUNTRY_NAME="India"]' PASSING data COLUMNS id int PATH '@id'); - id ----- -(0 rows) - -SELECT xmltable.* FROM xmldata, LATERAL xmltable('/ROWS/ROW[COUNTRY_NAME="Japan" or COUNTRY_NAME="India"]' PASSING data COLUMNS id FOR ORDINALITY); - id ----- -(0 rows) - -SELECT xmltable.* FROM xmldata, LATERAL xmltable('/ROWS/ROW[COUNTRY_NAME="Japan" or COUNTRY_NAME="India"]' PASSING data COLUMNS id int PATH '@id', "COUNTRY_NAME" text, "REGION_ID" int, rawdata xml PATH '.'); - id | COUNTRY_NAME | REGION_ID | rawdata -----+--------------+-----------+--------- -(0 rows) - -SELECT xmltable.* FROM xmldata, LATERAL xmltable('/ROWS/ROW[COUNTRY_NAME="Japan" or COUNTRY_NAME="India"]' PASSING data COLUMNS id int PATH '@id', "COUNTRY_NAME" text, "REGION_ID" int, rawdata xml PATH './*'); - id | COUNTRY_NAME | REGION_ID | rawdata -----+--------------+-----------+--------- -(0 rows) - -SELECT * FROM xmltable('/root' passing 'a1aa2a bbbbxxxcccc' COLUMNS element text); -ERROR: unsupported XML feature -LINE 1: SELECT * FROM xmltable('/root' passing 'a1aa1aa2a bbbbxxxcccc' COLUMNS element text PATH 'element/text()'); -- should fail -ERROR: unsupported XML feature -LINE 1: SELECT * FROM xmltable('/root' passing 'a1a &"<>!foo]]>2' columns c text); -ERROR: unsupported XML feature -LINE 1: select * from xmltable('d/r' passing ''"&<>' COLUMNS ent text); -ERROR: unsupported XML feature -LINE 1: SELECT * FROM xmltable('/x/a' PASSING '''"&<>' COLUMNS ent xml); -ERROR: unsupported XML feature -LINE 1: SELECT * FROM xmltable('/x/a' PASSING '' Seq Scan on public.xmldata - Output: xmldata.data - -> Table Function Scan on "xmltable" - Output: "xmltable".id, "xmltable"._id, "xmltable".country_name, "xmltable".country_id, "xmltable".region_id, "xmltable".size, "xmltable".unit, "xmltable".premier_name - Table Function Call: XMLTABLE(('/ROWS/ROW'::text) PASSING (xmldata.data) COLUMNS id integer PATH ('@id'::text), _id FOR ORDINALITY, country_name text PATH ('COUNTRY_NAME'::text) NOT NULL, country_id text PATH ('COUNTRY_ID'::text), region_id integer PATH ('REGION_ID'::text), size double precision PATH ('SIZE'::text), unit text PATH ('SIZE/@unit'::text), premier_name text DEFAULT ('not specified'::text) PATH ('PREMIER_NAME'::text)) -(7 rows) - --- test qual -SELECT xmltable.* FROM xmldata, LATERAL xmltable('/ROWS/ROW[COUNTRY_NAME="Japan" or COUNTRY_NAME="India"]' PASSING data COLUMNS "COUNTRY_NAME" text, "REGION_ID" int) WHERE "COUNTRY_NAME" = 'Japan'; - COUNTRY_NAME | REGION_ID ---------------+----------- -(0 rows) - -EXPLAIN (VERBOSE, COSTS OFF) -SELECT xmltable.* FROM xmldata, LATERAL xmltable('/ROWS/ROW[COUNTRY_NAME="Japan" or COUNTRY_NAME="India"]' PASSING data COLUMNS "COUNTRY_NAME" text, "REGION_ID" int) WHERE "COUNTRY_NAME" = 'Japan'; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Nested Loop - Output: "xmltable"."COUNTRY_NAME", "xmltable"."REGION_ID" - -> Seq Scan on public.xmldata - Output: xmldata.data - -> Table Function Scan on "xmltable" - Output: "xmltable"."COUNTRY_NAME", "xmltable"."REGION_ID" - Table Function Call: XMLTABLE(('/ROWS/ROW[COUNTRY_NAME="Japan" or COUNTRY_NAME="India"]'::text) PASSING (xmldata.data) COLUMNS "COUNTRY_NAME" text, "REGION_ID" integer) - Filter: ("xmltable"."COUNTRY_NAME" = 'Japan'::text) -(8 rows) - --- should to work with more data -INSERT INTO xmldata VALUES(' - - CZ - Czech Republic - 2Milos Zeman - - - DE - Germany - 2 - - - FR - France - 2 - -'); -ERROR: unsupported XML feature -LINE 1: INSERT INTO xmldata VALUES(' - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -INSERT INTO xmldata VALUES(' - - EG - Egypt - 1 - - - SD - Sudan - 1 - -'); -ERROR: unsupported XML feature -LINE 1: INSERT INTO xmldata VALUES(' - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmltable.* - FROM (SELECT data FROM xmldata) x, - LATERAL XMLTABLE('/ROWS/ROW' - PASSING data - COLUMNS id int PATH '@id', - _id FOR ORDINALITY, - country_name text PATH 'COUNTRY_NAME' NOT NULL, - country_id text PATH 'COUNTRY_ID', - region_id int PATH 'REGION_ID', - size float PATH 'SIZE', - unit text PATH 'SIZE/@unit', - premier_name text PATH 'PREMIER_NAME' DEFAULT 'not specified'); - id | _id | country_name | country_id | region_id | size | unit | premier_name -----+-----+--------------+------------+-----------+------+------+-------------- -(0 rows) - -SELECT xmltable.* - FROM (SELECT data FROM xmldata) x, - LATERAL XMLTABLE('/ROWS/ROW' - PASSING data - COLUMNS id int PATH '@id', - _id FOR ORDINALITY, - country_name text PATH 'COUNTRY_NAME' NOT NULL, - country_id text PATH 'COUNTRY_ID', - region_id int PATH 'REGION_ID', - size float PATH 'SIZE', - unit text PATH 'SIZE/@unit', - premier_name text PATH 'PREMIER_NAME' DEFAULT 'not specified') - WHERE region_id = 2; - id | _id | country_name | country_id | region_id | size | unit | premier_name -----+-----+--------------+------------+-----------+------+------+-------------- -(0 rows) - -EXPLAIN (VERBOSE, COSTS OFF) -SELECT xmltable.* - FROM (SELECT data FROM xmldata) x, - LATERAL XMLTABLE('/ROWS/ROW' - PASSING data - COLUMNS id int PATH '@id', - _id FOR ORDINALITY, - country_name text PATH 'COUNTRY_NAME' NOT NULL, - country_id text PATH 'COUNTRY_ID', - region_id int PATH 'REGION_ID', - size float PATH 'SIZE', - unit text PATH 'SIZE/@unit', - premier_name text PATH 'PREMIER_NAME' DEFAULT 'not specified') - WHERE region_id = 2; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Nested Loop - Output: "xmltable".id, "xmltable"._id, "xmltable".country_name, "xmltable".country_id, "xmltable".region_id, "xmltable".size, "xmltable".unit, "xmltable".premier_name - -> Seq Scan on public.xmldata - Output: xmldata.data - -> Table Function Scan on "xmltable" - Output: "xmltable".id, "xmltable"._id, "xmltable".country_name, "xmltable".country_id, "xmltable".region_id, "xmltable".size, "xmltable".unit, "xmltable".premier_name - Table Function Call: XMLTABLE(('/ROWS/ROW'::text) PASSING (xmldata.data) COLUMNS id integer PATH ('@id'::text), _id FOR ORDINALITY, country_name text PATH ('COUNTRY_NAME'::text) NOT NULL, country_id text PATH ('COUNTRY_ID'::text), region_id integer PATH ('REGION_ID'::text), size double precision PATH ('SIZE'::text), unit text PATH ('SIZE/@unit'::text), premier_name text DEFAULT ('not specified'::text) PATH ('PREMIER_NAME'::text)) - Filter: ("xmltable".region_id = 2) -(8 rows) - --- should fail, NULL value -SELECT xmltable.* - FROM (SELECT data FROM xmldata) x, - LATERAL XMLTABLE('/ROWS/ROW' - PASSING data - COLUMNS id int PATH '@id', - _id FOR ORDINALITY, - country_name text PATH 'COUNTRY_NAME' NOT NULL, - country_id text PATH 'COUNTRY_ID', - region_id int PATH 'REGION_ID', - size float PATH 'SIZE' NOT NULL, - unit text PATH 'SIZE/@unit', - premier_name text PATH 'PREMIER_NAME' DEFAULT 'not specified'); - id | _id | country_name | country_id | region_id | size | unit | premier_name -----+-----+--------------+------------+-----------+------+------+-------------- -(0 rows) - --- if all is ok, then result is empty --- one line xml test -WITH - x AS (SELECT proname, proowner, procost::numeric, pronargs, - array_to_string(proargnames,',') as proargnames, - case when proargtypes <> '' then array_to_string(proargtypes::oid[],',') end as proargtypes - FROM pg_proc WHERE proname = 'f_leak'), - y AS (SELECT xmlelement(name proc, - xmlforest(proname, proowner, - procost, pronargs, - proargnames, proargtypes)) as proc - FROM x), - z AS (SELECT xmltable.* - FROM y, - LATERAL xmltable('/proc' PASSING proc - COLUMNS proname name, - proowner oid, - procost float, - pronargs int, - proargnames text, - proargtypes text)) - SELECT * FROM z - EXCEPT SELECT * FROM x; -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. --- multi line xml test, result should be empty too -WITH - x AS (SELECT proname, proowner, procost::numeric, pronargs, - array_to_string(proargnames,',') as proargnames, - case when proargtypes <> '' then array_to_string(proargtypes::oid[],',') end as proargtypes - FROM pg_proc), - y AS (SELECT xmlelement(name data, - xmlagg(xmlelement(name proc, - xmlforest(proname, proowner, procost, - pronargs, proargnames, proargtypes)))) as doc - FROM x), - z AS (SELECT xmltable.* - FROM y, - LATERAL xmltable('/data/proc' PASSING doc - COLUMNS proname name, - proowner oid, - procost float, - pronargs int, - proargnames text, - proargtypes text)) - SELECT * FROM z - EXCEPT SELECT * FROM x; -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -CREATE TABLE xmltest2(x xml, _path text); -INSERT INTO xmltest2 VALUES('1', 'A'); -ERROR: unsupported XML feature -LINE 1: INSERT INTO xmltest2 VALUES('1', 'A')... - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -INSERT INTO xmltest2 VALUES('2', 'B'); -ERROR: unsupported XML feature -LINE 1: INSERT INTO xmltest2 VALUES('2', 'B')... - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -INSERT INTO xmltest2 VALUES('3', 'C'); -ERROR: unsupported XML feature -LINE 1: INSERT INTO xmltest2 VALUES('3', 'C')... - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -INSERT INTO xmltest2 VALUES('2', 'D'); -ERROR: unsupported XML feature -LINE 1: INSERT INTO xmltest2 VALUES('2', 'D')... - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmltable.* FROM xmltest2, LATERAL xmltable('/d/r' PASSING x COLUMNS a int PATH '' || lower(_path) || 'c'); - a ---- -(0 rows) - -SELECT xmltable.* FROM xmltest2, LATERAL xmltable(('/d/r/' || lower(_path) || 'c') PASSING x COLUMNS a int PATH '.'); - a ---- -(0 rows) - -SELECT xmltable.* FROM xmltest2, LATERAL xmltable(('/d/r/' || lower(_path) || 'c') PASSING x COLUMNS a int PATH 'x' DEFAULT ascii(_path) - 54); - a ---- -(0 rows) - --- XPath result can be boolean or number too -SELECT * FROM XMLTABLE('*' PASSING 'a' COLUMNS a xml PATH '.', b text PATH '.', c text PATH '"hi"', d boolean PATH '. = "a"', e integer PATH 'string-length(.)'); -ERROR: unsupported XML feature -LINE 1: SELECT * FROM XMLTABLE('*' PASSING 'a' COLUMNS a xml ... - ^ -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. -\x -SELECT * FROM XMLTABLE('*' PASSING 'pre&deeppost' COLUMNS x xml PATH 'node()', y xml PATH '/'); -ERROR: unsupported XML feature -LINE 1: SELECT * FROM XMLTABLE('*' PASSING 'pre"', b xml PATH '""'); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/partition_join.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/partition_join.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/partition_join.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/partition_join.out 2023-02-20 19:49:02.919219478 -0500 @@ -1926,28 +1926,9 @@ FROM int4_tbl, LATERAL (SELECT int4_tbl.f1 FROM int8_tbl LIMIT 2) ss WHERE prt1_l.c IS NULL); - QUERY PLAN ----------------------------------------------------------- - Delete on prt1_l - Delete on prt1_l_p1 prt1_l_1 - Delete on prt1_l_p3_p1 prt1_l_2 - Delete on prt1_l_p3_p2 prt1_l_3 - -> Nested Loop Semi Join - -> Append - -> Seq Scan on prt1_l_p1 prt1_l_1 - Filter: (c IS NULL) - -> Seq Scan on prt1_l_p3_p1 prt1_l_2 - Filter: (c IS NULL) - -> Seq Scan on prt1_l_p3_p2 prt1_l_3 - Filter: (c IS NULL) - -> Materialize - -> Nested Loop - -> Seq Scan on int4_tbl - -> Subquery Scan on ss - -> Limit - -> Seq Scan on int8_tbl -(18 rows) - +ERROR: relation "int4_tbl" does not exist +LINE 5: FROM int4_tbl, + ^ -- -- negative testcases -- diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/partition_prune.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/partition_prune.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/partition_prune.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/partition_prune.out 2023-02-20 19:49:12.079219871 -0500 @@ -2569,1297 +2569,7 @@ set enable_mergejoin = off; explain (analyze, costs off, summary off, timing off) select * from tbl1 join tprt on tbl1.col1 > tprt.col1; - QUERY PLAN --------------------------------------------------------------------------- - Nested Loop (actual rows=6 loops=1) - -> Seq Scan on tbl1 (actual rows=2 loops=1) - -> Append (actual rows=3 loops=2) - -> Index Scan using tprt1_idx on tprt_1 (actual rows=2 loops=2) - Index Cond: (col1 < tbl1.col1) - -> Index Scan using tprt2_idx on tprt_2 (actual rows=2 loops=1) - Index Cond: (col1 < tbl1.col1) - -> Index Scan using tprt3_idx on tprt_3 (never executed) - Index Cond: (col1 < tbl1.col1) - -> Index Scan using tprt4_idx on tprt_4 (never executed) - Index Cond: (col1 < tbl1.col1) - -> Index Scan using tprt5_idx on tprt_5 (never executed) - Index Cond: (col1 < tbl1.col1) - -> Index Scan using tprt6_idx on tprt_6 (never executed) - Index Cond: (col1 < tbl1.col1) -(15 rows) - -explain (analyze, costs off, summary off, timing off) -select * from tbl1 join tprt on tbl1.col1 = tprt.col1; - QUERY PLAN --------------------------------------------------------------------------- - Nested Loop (actual rows=2 loops=1) - -> Seq Scan on tbl1 (actual rows=2 loops=1) - -> Append (actual rows=1 loops=2) - -> Index Scan using tprt1_idx on tprt_1 (never executed) - Index Cond: (col1 = tbl1.col1) - -> Index Scan using tprt2_idx on tprt_2 (actual rows=1 loops=2) - Index Cond: (col1 = tbl1.col1) - -> Index Scan using tprt3_idx on tprt_3 (never executed) - Index Cond: (col1 = tbl1.col1) - -> Index Scan using tprt4_idx on tprt_4 (never executed) - Index Cond: (col1 = tbl1.col1) - -> Index Scan using tprt5_idx on tprt_5 (never executed) - Index Cond: (col1 = tbl1.col1) - -> Index Scan using tprt6_idx on tprt_6 (never executed) - Index Cond: (col1 = tbl1.col1) -(15 rows) - -select tbl1.col1, tprt.col1 from tbl1 -inner join tprt on tbl1.col1 > tprt.col1 -order by tbl1.col1, tprt.col1; - col1 | col1 -------+------ - 501 | 10 - 501 | 20 - 505 | 10 - 505 | 20 - 505 | 501 - 505 | 502 -(6 rows) - -select tbl1.col1, tprt.col1 from tbl1 -inner join tprt on tbl1.col1 = tprt.col1 -order by tbl1.col1, tprt.col1; - col1 | col1 -------+------ - 501 | 501 - 505 | 505 -(2 rows) - --- Multiple partitions -insert into tbl1 values (1001), (1010), (1011); -explain (analyze, costs off, summary off, timing off) -select * from tbl1 inner join tprt on tbl1.col1 > tprt.col1; - QUERY PLAN --------------------------------------------------------------------------- - Nested Loop (actual rows=23 loops=1) - -> Seq Scan on tbl1 (actual rows=5 loops=1) - -> Append (actual rows=5 loops=5) - -> Index Scan using tprt1_idx on tprt_1 (actual rows=2 loops=5) - Index Cond: (col1 < tbl1.col1) - -> Index Scan using tprt2_idx on tprt_2 (actual rows=3 loops=4) - Index Cond: (col1 < tbl1.col1) - -> Index Scan using tprt3_idx on tprt_3 (actual rows=1 loops=2) - Index Cond: (col1 < tbl1.col1) - -> Index Scan using tprt4_idx on tprt_4 (never executed) - Index Cond: (col1 < tbl1.col1) - -> Index Scan using tprt5_idx on tprt_5 (never executed) - Index Cond: (col1 < tbl1.col1) - -> Index Scan using tprt6_idx on tprt_6 (never executed) - Index Cond: (col1 < tbl1.col1) -(15 rows) - -explain (analyze, costs off, summary off, timing off) -select * from tbl1 inner join tprt on tbl1.col1 = tprt.col1; - QUERY PLAN --------------------------------------------------------------------------- - Nested Loop (actual rows=3 loops=1) - -> Seq Scan on tbl1 (actual rows=5 loops=1) - -> Append (actual rows=1 loops=5) - -> Index Scan using tprt1_idx on tprt_1 (never executed) - Index Cond: (col1 = tbl1.col1) - -> Index Scan using tprt2_idx on tprt_2 (actual rows=1 loops=2) - Index Cond: (col1 = tbl1.col1) - -> Index Scan using tprt3_idx on tprt_3 (actual rows=0 loops=3) - Index Cond: (col1 = tbl1.col1) - -> Index Scan using tprt4_idx on tprt_4 (never executed) - Index Cond: (col1 = tbl1.col1) - -> Index Scan using tprt5_idx on tprt_5 (never executed) - Index Cond: (col1 = tbl1.col1) - -> Index Scan using tprt6_idx on tprt_6 (never executed) - Index Cond: (col1 = tbl1.col1) -(15 rows) - -select tbl1.col1, tprt.col1 from tbl1 -inner join tprt on tbl1.col1 > tprt.col1 -order by tbl1.col1, tprt.col1; - col1 | col1 -------+------ - 501 | 10 - 501 | 20 - 505 | 10 - 505 | 20 - 505 | 501 - 505 | 502 - 1001 | 10 - 1001 | 20 - 1001 | 501 - 1001 | 502 - 1001 | 505 - 1010 | 10 - 1010 | 20 - 1010 | 501 - 1010 | 502 - 1010 | 505 - 1010 | 1001 - 1011 | 10 - 1011 | 20 - 1011 | 501 - 1011 | 502 - 1011 | 505 - 1011 | 1001 -(23 rows) - -select tbl1.col1, tprt.col1 from tbl1 -inner join tprt on tbl1.col1 = tprt.col1 -order by tbl1.col1, tprt.col1; - col1 | col1 -------+------ - 501 | 501 - 505 | 505 - 1001 | 1001 -(3 rows) - --- Last partition -delete from tbl1; -insert into tbl1 values (4400); -explain (analyze, costs off, summary off, timing off) -select * from tbl1 join tprt on tbl1.col1 < tprt.col1; - QUERY PLAN --------------------------------------------------------------------------- - Nested Loop (actual rows=1 loops=1) - -> Seq Scan on tbl1 (actual rows=1 loops=1) - -> Append (actual rows=1 loops=1) - -> Index Scan using tprt1_idx on tprt_1 (never executed) - Index Cond: (col1 > tbl1.col1) - -> Index Scan using tprt2_idx on tprt_2 (never executed) - Index Cond: (col1 > tbl1.col1) - -> Index Scan using tprt3_idx on tprt_3 (never executed) - Index Cond: (col1 > tbl1.col1) - -> Index Scan using tprt4_idx on tprt_4 (never executed) - Index Cond: (col1 > tbl1.col1) - -> Index Scan using tprt5_idx on tprt_5 (never executed) - Index Cond: (col1 > tbl1.col1) - -> Index Scan using tprt6_idx on tprt_6 (actual rows=1 loops=1) - Index Cond: (col1 > tbl1.col1) -(15 rows) - -select tbl1.col1, tprt.col1 from tbl1 -inner join tprt on tbl1.col1 < tprt.col1 -order by tbl1.col1, tprt.col1; - col1 | col1 -------+------ - 4400 | 4500 -(1 row) - --- No matching partition -delete from tbl1; -insert into tbl1 values (10000); -explain (analyze, costs off, summary off, timing off) -select * from tbl1 join tprt on tbl1.col1 = tprt.col1; - QUERY PLAN -------------------------------------------------------------------- - Nested Loop (actual rows=0 loops=1) - -> Seq Scan on tbl1 (actual rows=1 loops=1) - -> Append (actual rows=0 loops=1) - -> Index Scan using tprt1_idx on tprt_1 (never executed) - Index Cond: (col1 = tbl1.col1) - -> Index Scan using tprt2_idx on tprt_2 (never executed) - Index Cond: (col1 = tbl1.col1) - -> Index Scan using tprt3_idx on tprt_3 (never executed) - Index Cond: (col1 = tbl1.col1) - -> Index Scan using tprt4_idx on tprt_4 (never executed) - Index Cond: (col1 = tbl1.col1) - -> Index Scan using tprt5_idx on tprt_5 (never executed) - Index Cond: (col1 = tbl1.col1) - -> Index Scan using tprt6_idx on tprt_6 (never executed) - Index Cond: (col1 = tbl1.col1) -(15 rows) - -select tbl1.col1, tprt.col1 from tbl1 -inner join tprt on tbl1.col1 = tprt.col1 -order by tbl1.col1, tprt.col1; - col1 | col1 -------+------ -(0 rows) - -drop table tbl1, tprt; --- Test with columns defined in varying orders between each level -create table part_abc (a int not null, b int not null, c int not null) partition by list (a); -create table part_bac (b int not null, a int not null, c int not null) partition by list (b); -create table part_cab (c int not null, a int not null, b int not null) partition by list (c); -create table part_abc_p1 (a int not null, b int not null, c int not null); -alter table part_abc attach partition part_bac for values in(1); -alter table part_bac attach partition part_cab for values in(2); -alter table part_cab attach partition part_abc_p1 for values in(3); -prepare part_abc_q1 (int, int, int) as -select * from part_abc where a = $1 and b = $2 and c = $3; --- Single partition should be scanned. -explain (analyze, costs off, summary off, timing off) execute part_abc_q1 (1, 2, 3); - QUERY PLAN ----------------------------------------------------------- - Seq Scan on part_abc_p1 part_abc (actual rows=0 loops=1) - Filter: ((a = $1) AND (b = $2) AND (c = $3)) -(2 rows) - -deallocate part_abc_q1; -drop table part_abc; --- Ensure that an Append node properly handles a sub-partitioned table --- matching without any of its leaf partitions matching the clause. -create table listp (a int, b int) partition by list (a); -create table listp_1 partition of listp for values in(1) partition by list (b); -create table listp_1_1 partition of listp_1 for values in(1); -create table listp_2 partition of listp for values in(2) partition by list (b); -create table listp_2_1 partition of listp_2 for values in(2); -select * from listp where b = 1; - a | b ----+--- -(0 rows) - --- Ensure that an Append node properly can handle selection of all first level --- partitions before finally detecting the correct set of 2nd level partitions --- which match the given parameter. -prepare q1 (int,int) as select * from listp where b in ($1,$2); -explain (analyze, costs off, summary off, timing off) execute q1 (1,1); - QUERY PLAN -------------------------------------------------------------- - Append (actual rows=0 loops=1) - Subplans Removed: 1 - -> Seq Scan on listp_1_1 listp_1 (actual rows=0 loops=1) - Filter: (b = ANY (ARRAY[$1, $2])) -(4 rows) - -explain (analyze, costs off, summary off, timing off) execute q1 (2,2); - QUERY PLAN -------------------------------------------------------------- - Append (actual rows=0 loops=1) - Subplans Removed: 1 - -> Seq Scan on listp_2_1 listp_1 (actual rows=0 loops=1) - Filter: (b = ANY (ARRAY[$1, $2])) -(4 rows) - --- Try with no matching partitions. -explain (analyze, costs off, summary off, timing off) execute q1 (0,0); - QUERY PLAN --------------------------------- - Append (actual rows=0 loops=1) - Subplans Removed: 2 -(2 rows) - -deallocate q1; --- Test more complex cases where a not-equal condition further eliminates partitions. -prepare q1 (int,int,int,int) as select * from listp where b in($1,$2) and $3 <> b and $4 <> b; --- Both partitions allowed by IN clause, but one disallowed by <> clause -explain (analyze, costs off, summary off, timing off) execute q1 (1,2,2,0); - QUERY PLAN -------------------------------------------------------------------------- - Append (actual rows=0 loops=1) - Subplans Removed: 1 - -> Seq Scan on listp_1_1 listp_1 (actual rows=0 loops=1) - Filter: ((b = ANY (ARRAY[$1, $2])) AND ($3 <> b) AND ($4 <> b)) -(4 rows) - --- Both partitions allowed by IN clause, then both excluded again by <> clauses. -explain (analyze, costs off, summary off, timing off) execute q1 (1,2,2,1); - QUERY PLAN --------------------------------- - Append (actual rows=0 loops=1) - Subplans Removed: 2 -(2 rows) - --- Ensure Params that evaluate to NULL properly prune away all partitions -explain (analyze, costs off, summary off, timing off) -select * from listp where a = (select null::int); - QUERY PLAN ------------------------------------------------------- - Append (actual rows=0 loops=1) - InitPlan 1 (returns $0) - -> Result (actual rows=1 loops=1) - -> Seq Scan on listp_1_1 listp_1 (never executed) - Filter: (a = $0) - -> Seq Scan on listp_2_1 listp_2 (never executed) - Filter: (a = $0) -(7 rows) - -drop table listp; --- --- check that stable query clauses are only used in run-time pruning --- -create table stable_qual_pruning (a timestamp) partition by range (a); -create table stable_qual_pruning1 partition of stable_qual_pruning - for values from ('2000-01-01') to ('2000-02-01'); -create table stable_qual_pruning2 partition of stable_qual_pruning - for values from ('2000-02-01') to ('2000-03-01'); -create table stable_qual_pruning3 partition of stable_qual_pruning - for values from ('3000-02-01') to ('3000-03-01'); --- comparison against a stable value requires run-time pruning -explain (analyze, costs off, summary off, timing off) -select * from stable_qual_pruning where a < localtimestamp; - QUERY PLAN --------------------------------------------------------------------------------------- - Append (actual rows=0 loops=1) - Subplans Removed: 1 - -> Seq Scan on stable_qual_pruning1 stable_qual_pruning_1 (actual rows=0 loops=1) - Filter: (a < LOCALTIMESTAMP) - -> Seq Scan on stable_qual_pruning2 stable_qual_pruning_2 (actual rows=0 loops=1) - Filter: (a < LOCALTIMESTAMP) -(6 rows) - --- timestamp < timestamptz comparison is only stable, not immutable -explain (analyze, costs off, summary off, timing off) -select * from stable_qual_pruning where a < '2000-02-01'::timestamptz; - QUERY PLAN --------------------------------------------------------------------------------------- - Append (actual rows=0 loops=1) - Subplans Removed: 2 - -> Seq Scan on stable_qual_pruning1 stable_qual_pruning_1 (actual rows=0 loops=1) - Filter: (a < 'Tue Feb 01 00:00:00 2000 PST'::timestamp with time zone) -(4 rows) - --- check ScalarArrayOp cases -explain (analyze, costs off, summary off, timing off) -select * from stable_qual_pruning - where a = any(array['2010-02-01', '2020-01-01']::timestamp[]); - QUERY PLAN --------------------------------- - Result (actual rows=0 loops=1) - One-Time Filter: false -(2 rows) - -explain (analyze, costs off, summary off, timing off) -select * from stable_qual_pruning - where a = any(array['2000-02-01', '2010-01-01']::timestamp[]); - QUERY PLAN ----------------------------------------------------------------------------------------------------------------- - Seq Scan on stable_qual_pruning2 stable_qual_pruning (actual rows=0 loops=1) - Filter: (a = ANY ('{"Tue Feb 01 00:00:00 2000","Fri Jan 01 00:00:00 2010"}'::timestamp without time zone[])) -(2 rows) - -explain (analyze, costs off, summary off, timing off) -select * from stable_qual_pruning - where a = any(array['2000-02-01', localtimestamp]::timestamp[]); - QUERY PLAN ------------------------------------------------------------------------------------------------------------- - Append (actual rows=0 loops=1) - Subplans Removed: 2 - -> Seq Scan on stable_qual_pruning2 stable_qual_pruning_1 (actual rows=0 loops=1) - Filter: (a = ANY (ARRAY['Tue Feb 01 00:00:00 2000'::timestamp without time zone, LOCALTIMESTAMP])) -(4 rows) - -explain (analyze, costs off, summary off, timing off) -select * from stable_qual_pruning - where a = any(array['2010-02-01', '2020-01-01']::timestamptz[]); - QUERY PLAN --------------------------------- - Append (actual rows=0 loops=1) - Subplans Removed: 3 -(2 rows) - -explain (analyze, costs off, summary off, timing off) -select * from stable_qual_pruning - where a = any(array['2000-02-01', '2010-01-01']::timestamptz[]); - QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------- - Append (actual rows=0 loops=1) - Subplans Removed: 2 - -> Seq Scan on stable_qual_pruning2 stable_qual_pruning_1 (actual rows=0 loops=1) - Filter: (a = ANY ('{"Tue Feb 01 00:00:00 2000 PST","Fri Jan 01 00:00:00 2010 PST"}'::timestamp with time zone[])) -(4 rows) - -explain (analyze, costs off, summary off, timing off) -select * from stable_qual_pruning - where a = any(null::timestamptz[]); - QUERY PLAN --------------------------------------------------------------------------------------- - Append (actual rows=0 loops=1) - -> Seq Scan on stable_qual_pruning1 stable_qual_pruning_1 (actual rows=0 loops=1) - Filter: (a = ANY (NULL::timestamp with time zone[])) - -> Seq Scan on stable_qual_pruning2 stable_qual_pruning_2 (actual rows=0 loops=1) - Filter: (a = ANY (NULL::timestamp with time zone[])) - -> Seq Scan on stable_qual_pruning3 stable_qual_pruning_3 (actual rows=0 loops=1) - Filter: (a = ANY (NULL::timestamp with time zone[])) -(7 rows) - -drop table stable_qual_pruning; --- --- Check that pruning with composite range partitioning works correctly when --- it must ignore clauses for trailing keys once it has seen a clause with --- non-inclusive operator for an earlier key --- -create table mc3p (a int, b int, c int) partition by range (a, abs(b), c); -create table mc3p0 partition of mc3p - for values from (0, 0, 0) to (0, maxvalue, maxvalue); -create table mc3p1 partition of mc3p - for values from (1, 1, 1) to (2, minvalue, minvalue); -create table mc3p2 partition of mc3p - for values from (2, minvalue, minvalue) to (3, maxvalue, maxvalue); -insert into mc3p values (0, 1, 1), (1, 1, 1), (2, 1, 1); -explain (analyze, costs off, summary off, timing off) -select * from mc3p where a < 3 and abs(b) = 1; - QUERY PLAN --------------------------------------------------------- - Append (actual rows=3 loops=1) - -> Seq Scan on mc3p0 mc3p_1 (actual rows=1 loops=1) - Filter: ((a < 3) AND (abs(b) = 1)) - -> Seq Scan on mc3p1 mc3p_2 (actual rows=1 loops=1) - Filter: ((a < 3) AND (abs(b) = 1)) - -> Seq Scan on mc3p2 mc3p_3 (actual rows=1 loops=1) - Filter: ((a < 3) AND (abs(b) = 1)) -(7 rows) - --- --- Check that pruning with composite range partitioning works correctly when --- a combination of runtime parameters is specified, not all of whose values --- are available at the same time --- -prepare ps1 as - select * from mc3p where a = $1 and abs(b) < (select 3); -explain (analyze, costs off, summary off, timing off) -execute ps1(1); - QUERY PLAN --------------------------------------------------------- - Append (actual rows=1 loops=1) - Subplans Removed: 2 - InitPlan 1 (returns $0) - -> Result (actual rows=1 loops=1) - -> Seq Scan on mc3p1 mc3p_1 (actual rows=1 loops=1) - Filter: ((a = $1) AND (abs(b) < $0)) -(6 rows) - -deallocate ps1; -prepare ps2 as - select * from mc3p where a <= $1 and abs(b) < (select 3); -explain (analyze, costs off, summary off, timing off) -execute ps2(1); - QUERY PLAN --------------------------------------------------------- - Append (actual rows=2 loops=1) - Subplans Removed: 1 - InitPlan 1 (returns $0) - -> Result (actual rows=1 loops=1) - -> Seq Scan on mc3p0 mc3p_1 (actual rows=1 loops=1) - Filter: ((a <= $1) AND (abs(b) < $0)) - -> Seq Scan on mc3p1 mc3p_2 (actual rows=1 loops=1) - Filter: ((a <= $1) AND (abs(b) < $0)) -(8 rows) - -deallocate ps2; -drop table mc3p; --- Ensure runtime pruning works with initplans params with boolean types -create table boolvalues (value bool not null); -insert into boolvalues values('t'),('f'); -create table boolp (a bool) partition by list (a); -create table boolp_t partition of boolp for values in('t'); -create table boolp_f partition of boolp for values in('f'); -explain (analyze, costs off, summary off, timing off) -select * from boolp where a = (select value from boolvalues where value); - QUERY PLAN ------------------------------------------------------------ - Append (actual rows=0 loops=1) - InitPlan 1 (returns $0) - -> Seq Scan on boolvalues (actual rows=1 loops=1) - Filter: value - Rows Removed by Filter: 1 - -> Seq Scan on boolp_f boolp_1 (never executed) - Filter: (a = $0) - -> Seq Scan on boolp_t boolp_2 (actual rows=0 loops=1) - Filter: (a = $0) -(9 rows) - -explain (analyze, costs off, summary off, timing off) -select * from boolp where a = (select value from boolvalues where not value); - QUERY PLAN ------------------------------------------------------------ - Append (actual rows=0 loops=1) - InitPlan 1 (returns $0) - -> Seq Scan on boolvalues (actual rows=1 loops=1) - Filter: (NOT value) - Rows Removed by Filter: 1 - -> Seq Scan on boolp_f boolp_1 (actual rows=0 loops=1) - Filter: (a = $0) - -> Seq Scan on boolp_t boolp_2 (never executed) - Filter: (a = $0) -(9 rows) - -drop table boolp; --- --- Test run-time pruning of MergeAppend subnodes --- -set enable_seqscan = off; -set enable_sort = off; -create table ma_test (a int, b int) partition by range (a); -create table ma_test_p1 partition of ma_test for values from (0) to (10); -create table ma_test_p2 partition of ma_test for values from (10) to (20); -create table ma_test_p3 partition of ma_test for values from (20) to (30); -insert into ma_test select x,x from generate_series(0,29) t(x); -create index on ma_test (b); -analyze ma_test; -prepare mt_q1 (int) as select a from ma_test where a >= $1 and a % 10 = 5 order by b; -explain (analyze, costs off, summary off, timing off) execute mt_q1(15); - QUERY PLAN ------------------------------------------------------------------------------------------ - Merge Append (actual rows=2 loops=1) - Sort Key: ma_test.b - Subplans Removed: 1 - -> Index Scan using ma_test_p2_b_idx on ma_test_p2 ma_test_1 (actual rows=1 loops=1) - Filter: ((a >= $1) AND ((a % 10) = 5)) - Rows Removed by Filter: 9 - -> Index Scan using ma_test_p3_b_idx on ma_test_p3 ma_test_2 (actual rows=1 loops=1) - Filter: ((a >= $1) AND ((a % 10) = 5)) - Rows Removed by Filter: 9 -(9 rows) - -execute mt_q1(15); - a ----- - 15 - 25 -(2 rows) - -explain (analyze, costs off, summary off, timing off) execute mt_q1(25); - QUERY PLAN ------------------------------------------------------------------------------------------ - Merge Append (actual rows=1 loops=1) - Sort Key: ma_test.b - Subplans Removed: 2 - -> Index Scan using ma_test_p3_b_idx on ma_test_p3 ma_test_1 (actual rows=1 loops=1) - Filter: ((a >= $1) AND ((a % 10) = 5)) - Rows Removed by Filter: 9 -(6 rows) - -execute mt_q1(25); - a ----- - 25 -(1 row) - --- Ensure MergeAppend behaves correctly when no subplans match -explain (analyze, costs off, summary off, timing off) execute mt_q1(35); - QUERY PLAN --------------------------------------- - Merge Append (actual rows=0 loops=1) - Sort Key: ma_test.b - Subplans Removed: 3 -(3 rows) - -execute mt_q1(35); - a ---- -(0 rows) - -deallocate mt_q1; -prepare mt_q2 (int) as select * from ma_test where a >= $1 order by b limit 1; --- Ensure output list looks sane when the MergeAppend has no subplans. -explain (analyze, verbose, costs off, summary off, timing off) execute mt_q2 (35); - QUERY PLAN --------------------------------------------- - Limit (actual rows=0 loops=1) - Output: ma_test.a, ma_test.b - -> Merge Append (actual rows=0 loops=1) - Sort Key: ma_test.b - Subplans Removed: 3 -(5 rows) - -deallocate mt_q2; --- ensure initplan params properly prune partitions -explain (analyze, costs off, summary off, timing off) select * from ma_test where a >= (select min(b) from ma_test_p2) order by b; - QUERY PLAN ------------------------------------------------------------------------------------------------ - Merge Append (actual rows=20 loops=1) - Sort Key: ma_test.b - InitPlan 2 (returns $1) - -> Result (actual rows=1 loops=1) - InitPlan 1 (returns $0) - -> Limit (actual rows=1 loops=1) - -> Index Scan using ma_test_p2_b_idx on ma_test_p2 (actual rows=1 loops=1) - Index Cond: (b IS NOT NULL) - -> Index Scan using ma_test_p1_b_idx on ma_test_p1 ma_test_1 (never executed) - Filter: (a >= $1) - -> Index Scan using ma_test_p2_b_idx on ma_test_p2 ma_test_2 (actual rows=10 loops=1) - Filter: (a >= $1) - -> Index Scan using ma_test_p3_b_idx on ma_test_p3 ma_test_3 (actual rows=10 loops=1) - Filter: (a >= $1) -(14 rows) - -reset enable_seqscan; -reset enable_sort; -drop table ma_test; -reset enable_indexonlyscan; --- --- check that pruning works properly when the partition key is of a --- pseudotype --- --- array type list partition key -create table pp_arrpart (a int[]) partition by list (a); -create table pp_arrpart1 partition of pp_arrpart for values in ('{1}'); -create table pp_arrpart2 partition of pp_arrpart for values in ('{2, 3}', '{4, 5}'); -explain (costs off) select * from pp_arrpart where a = '{1}'; - QUERY PLAN ------------------------------------- - Seq Scan on pp_arrpart1 pp_arrpart - Filter: (a = '{1}'::integer[]) -(2 rows) - -explain (costs off) select * from pp_arrpart where a = '{1, 2}'; - QUERY PLAN --------------------------- - Result - One-Time Filter: false -(2 rows) - -explain (costs off) select * from pp_arrpart where a in ('{4, 5}', '{1}'); - QUERY PLAN ----------------------------------------------------------------------- - Append - -> Seq Scan on pp_arrpart1 pp_arrpart_1 - Filter: ((a = '{4,5}'::integer[]) OR (a = '{1}'::integer[])) - -> Seq Scan on pp_arrpart2 pp_arrpart_2 - Filter: ((a = '{4,5}'::integer[]) OR (a = '{1}'::integer[])) -(5 rows) - -explain (costs off) update pp_arrpart set a = a where a = '{1}'; - QUERY PLAN --------------------------------------------- - Update on pp_arrpart - Update on pp_arrpart1 pp_arrpart_1 - -> Seq Scan on pp_arrpart1 pp_arrpart_1 - Filter: (a = '{1}'::integer[]) -(4 rows) - -explain (costs off) delete from pp_arrpart where a = '{1}'; - QUERY PLAN --------------------------------------------- - Delete on pp_arrpart - Delete on pp_arrpart1 pp_arrpart_1 - -> Seq Scan on pp_arrpart1 pp_arrpart_1 - Filter: (a = '{1}'::integer[]) -(4 rows) - -drop table pp_arrpart; --- array type hash partition key -create table pph_arrpart (a int[]) partition by hash (a); -create table pph_arrpart1 partition of pph_arrpart for values with (modulus 2, remainder 0); -create table pph_arrpart2 partition of pph_arrpart for values with (modulus 2, remainder 1); -insert into pph_arrpart values ('{1}'), ('{1, 2}'), ('{4, 5}'); -select tableoid::regclass, * from pph_arrpart order by 1; - tableoid | a ---------------+------- - pph_arrpart1 | {1,2} - pph_arrpart1 | {4,5} - pph_arrpart2 | {1} -(3 rows) - -explain (costs off) select * from pph_arrpart where a = '{1}'; - QUERY PLAN --------------------------------------- - Seq Scan on pph_arrpart2 pph_arrpart - Filter: (a = '{1}'::integer[]) -(2 rows) - -explain (costs off) select * from pph_arrpart where a = '{1, 2}'; - QUERY PLAN --------------------------------------- - Seq Scan on pph_arrpart1 pph_arrpart - Filter: (a = '{1,2}'::integer[]) -(2 rows) - -explain (costs off) select * from pph_arrpart where a in ('{4, 5}', '{1}'); - QUERY PLAN ----------------------------------------------------------------------- - Append - -> Seq Scan on pph_arrpart1 pph_arrpart_1 - Filter: ((a = '{4,5}'::integer[]) OR (a = '{1}'::integer[])) - -> Seq Scan on pph_arrpart2 pph_arrpart_2 - Filter: ((a = '{4,5}'::integer[]) OR (a = '{1}'::integer[])) -(5 rows) - -drop table pph_arrpart; --- enum type list partition key -create type pp_colors as enum ('green', 'blue', 'black'); -create table pp_enumpart (a pp_colors) partition by list (a); -create table pp_enumpart_green partition of pp_enumpart for values in ('green'); -create table pp_enumpart_blue partition of pp_enumpart for values in ('blue'); -explain (costs off) select * from pp_enumpart where a = 'blue'; - QUERY PLAN ------------------------------------------- - Seq Scan on pp_enumpart_blue pp_enumpart - Filter: (a = 'blue'::pp_colors) -(2 rows) - -explain (costs off) select * from pp_enumpart where a = 'black'; - QUERY PLAN --------------------------- - Result - One-Time Filter: false -(2 rows) - -drop table pp_enumpart; -drop type pp_colors; --- record type as partition key -create type pp_rectype as (a int, b int); -create table pp_recpart (a pp_rectype) partition by list (a); -create table pp_recpart_11 partition of pp_recpart for values in ('(1,1)'); -create table pp_recpart_23 partition of pp_recpart for values in ('(2,3)'); -explain (costs off) select * from pp_recpart where a = '(1,1)'::pp_rectype; - QUERY PLAN --------------------------------------- - Seq Scan on pp_recpart_11 pp_recpart - Filter: (a = '(1,1)'::pp_rectype) -(2 rows) - -explain (costs off) select * from pp_recpart where a = '(1,2)'::pp_rectype; - QUERY PLAN --------------------------- - Result - One-Time Filter: false -(2 rows) - -drop table pp_recpart; -drop type pp_rectype; --- range type partition key -create table pp_intrangepart (a int4range) partition by list (a); -create table pp_intrangepart12 partition of pp_intrangepart for values in ('[1,2]'); -create table pp_intrangepart2inf partition of pp_intrangepart for values in ('[2,)'); -explain (costs off) select * from pp_intrangepart where a = '[1,2]'::int4range; - QUERY PLAN ------------------------------------------------ - Seq Scan on pp_intrangepart12 pp_intrangepart - Filter: (a = '[1,3)'::int4range) -(2 rows) - -explain (costs off) select * from pp_intrangepart where a = '(1,2)'::int4range; - QUERY PLAN --------------------------- - Result - One-Time Filter: false -(2 rows) - -drop table pp_intrangepart; --- --- Ensure the enable_partition_prune GUC properly disables partition pruning. --- -create table pp_lp (a int, value int) partition by list (a); -create table pp_lp1 partition of pp_lp for values in(1); -create table pp_lp2 partition of pp_lp for values in(2); -explain (costs off) select * from pp_lp where a = 1; - QUERY PLAN --------------------------- - Seq Scan on pp_lp1 pp_lp - Filter: (a = 1) -(2 rows) - -explain (costs off) update pp_lp set value = 10 where a = 1; - QUERY PLAN ----------------------------------- - Update on pp_lp - Update on pp_lp1 pp_lp_1 - -> Seq Scan on pp_lp1 pp_lp_1 - Filter: (a = 1) -(4 rows) - -explain (costs off) delete from pp_lp where a = 1; - QUERY PLAN ----------------------------------- - Delete on pp_lp - Delete on pp_lp1 pp_lp_1 - -> Seq Scan on pp_lp1 pp_lp_1 - Filter: (a = 1) -(4 rows) - -set enable_partition_pruning = off; -set constraint_exclusion = 'partition'; -- this should not affect the result. -explain (costs off) select * from pp_lp where a = 1; - QUERY PLAN ----------------------------------- - Append - -> Seq Scan on pp_lp1 pp_lp_1 - Filter: (a = 1) - -> Seq Scan on pp_lp2 pp_lp_2 - Filter: (a = 1) -(5 rows) - -explain (costs off) update pp_lp set value = 10 where a = 1; - QUERY PLAN ----------------------------------------- - Update on pp_lp - Update on pp_lp1 pp_lp_1 - Update on pp_lp2 pp_lp_2 - -> Append - -> Seq Scan on pp_lp1 pp_lp_1 - Filter: (a = 1) - -> Seq Scan on pp_lp2 pp_lp_2 - Filter: (a = 1) -(8 rows) - -explain (costs off) delete from pp_lp where a = 1; - QUERY PLAN ----------------------------------------- - Delete on pp_lp - Delete on pp_lp1 pp_lp_1 - Delete on pp_lp2 pp_lp_2 - -> Append - -> Seq Scan on pp_lp1 pp_lp_1 - Filter: (a = 1) - -> Seq Scan on pp_lp2 pp_lp_2 - Filter: (a = 1) -(8 rows) - -set constraint_exclusion = 'off'; -- this should not affect the result. -explain (costs off) select * from pp_lp where a = 1; - QUERY PLAN ----------------------------------- - Append - -> Seq Scan on pp_lp1 pp_lp_1 - Filter: (a = 1) - -> Seq Scan on pp_lp2 pp_lp_2 - Filter: (a = 1) -(5 rows) - -explain (costs off) update pp_lp set value = 10 where a = 1; - QUERY PLAN ----------------------------------------- - Update on pp_lp - Update on pp_lp1 pp_lp_1 - Update on pp_lp2 pp_lp_2 - -> Append - -> Seq Scan on pp_lp1 pp_lp_1 - Filter: (a = 1) - -> Seq Scan on pp_lp2 pp_lp_2 - Filter: (a = 1) -(8 rows) - -explain (costs off) delete from pp_lp where a = 1; - QUERY PLAN ----------------------------------------- - Delete on pp_lp - Delete on pp_lp1 pp_lp_1 - Delete on pp_lp2 pp_lp_2 - -> Append - -> Seq Scan on pp_lp1 pp_lp_1 - Filter: (a = 1) - -> Seq Scan on pp_lp2 pp_lp_2 - Filter: (a = 1) -(8 rows) - -drop table pp_lp; --- Ensure enable_partition_prune does not affect non-partitioned tables. -create table inh_lp (a int, value int); -create table inh_lp1 (a int, value int, check(a = 1)) inherits (inh_lp); -NOTICE: merging column "a" with inherited definition -NOTICE: merging column "value" with inherited definition -create table inh_lp2 (a int, value int, check(a = 2)) inherits (inh_lp); -NOTICE: merging column "a" with inherited definition -NOTICE: merging column "value" with inherited definition -set constraint_exclusion = 'partition'; --- inh_lp2 should be removed in the following 3 cases. -explain (costs off) select * from inh_lp where a = 1; - QUERY PLAN ------------------------------------- - Append - -> Seq Scan on inh_lp inh_lp_1 - Filter: (a = 1) - -> Seq Scan on inh_lp1 inh_lp_2 - Filter: (a = 1) -(5 rows) - -explain (costs off) update inh_lp set value = 10 where a = 1; - QUERY PLAN ------------------------------------------------- - Update on inh_lp - Update on inh_lp inh_lp_1 - Update on inh_lp1 inh_lp_2 - -> Result - -> Append - -> Seq Scan on inh_lp inh_lp_1 - Filter: (a = 1) - -> Seq Scan on inh_lp1 inh_lp_2 - Filter: (a = 1) -(9 rows) - -explain (costs off) delete from inh_lp where a = 1; - QUERY PLAN ------------------------------------------- - Delete on inh_lp - Delete on inh_lp inh_lp_1 - Delete on inh_lp1 inh_lp_2 - -> Append - -> Seq Scan on inh_lp inh_lp_1 - Filter: (a = 1) - -> Seq Scan on inh_lp1 inh_lp_2 - Filter: (a = 1) -(8 rows) - --- Ensure we don't exclude normal relations when we only expect to exclude --- inheritance children -explain (costs off) update inh_lp1 set value = 10 where a = 2; - QUERY PLAN ---------------------------- - Update on inh_lp1 - -> Seq Scan on inh_lp1 - Filter: (a = 2) -(3 rows) - -drop table inh_lp cascade; -NOTICE: drop cascades to 2 other objects -DETAIL: drop cascades to table inh_lp1 -drop cascades to table inh_lp2 -reset enable_partition_pruning; -reset constraint_exclusion; --- Check pruning for a partition tree containing only temporary relations -create temp table pp_temp_parent (a int) partition by list (a); -create temp table pp_temp_part_1 partition of pp_temp_parent for values in (1); -create temp table pp_temp_part_def partition of pp_temp_parent default; -explain (costs off) select * from pp_temp_parent where true; - QUERY PLAN ------------------------------------------------------ - Append - -> Seq Scan on pp_temp_part_1 pp_temp_parent_1 - -> Seq Scan on pp_temp_part_def pp_temp_parent_2 -(3 rows) - -explain (costs off) select * from pp_temp_parent where a = 2; - QUERY PLAN ---------------------------------------------- - Seq Scan on pp_temp_part_def pp_temp_parent - Filter: (a = 2) -(2 rows) - -drop table pp_temp_parent; --- Stress run-time partition pruning a bit more, per bug reports -create temp table p (a int, b int, c int) partition by list (a); -create temp table p1 partition of p for values in (1); -create temp table p2 partition of p for values in (2); -create temp table q (a int, b int, c int) partition by list (a); -create temp table q1 partition of q for values in (1) partition by list (b); -create temp table q11 partition of q1 for values in (1) partition by list (c); -create temp table q111 partition of q11 for values in (1); -create temp table q2 partition of q for values in (2) partition by list (b); -create temp table q21 partition of q2 for values in (1); -create temp table q22 partition of q2 for values in (2); -insert into q22 values (2, 2, 3); -explain (costs off) -select * -from ( - select * from p - union all - select * from q1 - union all - select 1, 1, 1 - ) s(a, b, c) -where s.a = 1 and s.b = 1 and s.c = (select 1); - QUERY PLAN ----------------------------------------------------- - Append - InitPlan 1 (returns $0) - -> Result - -> Seq Scan on p1 p - Filter: ((a = 1) AND (b = 1) AND (c = $0)) - -> Seq Scan on q111 q1 - Filter: ((a = 1) AND (b = 1) AND (c = $0)) - -> Result - One-Time Filter: (1 = $0) -(9 rows) - -select * -from ( - select * from p - union all - select * from q1 - union all - select 1, 1, 1 - ) s(a, b, c) -where s.a = 1 and s.b = 1 and s.c = (select 1); - a | b | c ----+---+--- - 1 | 1 | 1 -(1 row) - -prepare q (int, int) as -select * -from ( - select * from p - union all - select * from q1 - union all - select 1, 1, 1 - ) s(a, b, c) -where s.a = $1 and s.b = $2 and s.c = (select 1); -explain (costs off) execute q (1, 1); - QUERY PLAN ---------------------------------------------------------------- - Append - Subplans Removed: 1 - InitPlan 1 (returns $0) - -> Result - -> Seq Scan on p1 p - Filter: ((a = $1) AND (b = $2) AND (c = $0)) - -> Seq Scan on q111 q1 - Filter: ((a = $1) AND (b = $2) AND (c = $0)) - -> Result - One-Time Filter: ((1 = $1) AND (1 = $2) AND (1 = $0)) -(10 rows) - -execute q (1, 1); - a | b | c ----+---+--- - 1 | 1 | 1 -(1 row) - -drop table p, q; --- Ensure run-time pruning works correctly when we match a partitioned table --- on the first level but find no matching partitions on the second level. -create table listp (a int, b int) partition by list (a); -create table listp1 partition of listp for values in(1); -create table listp2 partition of listp for values in(2) partition by list(b); -create table listp2_10 partition of listp2 for values in (10); -explain (analyze, costs off, summary off, timing off) -select * from listp where a = (select 2) and b <> 10; - QUERY PLAN --------------------------------------------------- - Seq Scan on listp1 listp (actual rows=0 loops=1) - Filter: ((b <> 10) AND (a = $0)) - InitPlan 1 (returns $0) - -> Result (never executed) -(4 rows) - --- --- check that a partition directly accessed in a query is excluded with --- constraint_exclusion = on --- --- turn off partition pruning, so that it doesn't interfere -set enable_partition_pruning to off; --- setting constraint_exclusion to 'partition' disables exclusion -set constraint_exclusion to 'partition'; -explain (costs off) select * from listp1 where a = 2; - QUERY PLAN --------------------- - Seq Scan on listp1 - Filter: (a = 2) -(2 rows) - -explain (costs off) update listp1 set a = 1 where a = 2; - QUERY PLAN --------------------------- - Update on listp1 - -> Seq Scan on listp1 - Filter: (a = 2) -(3 rows) - --- constraint exclusion enabled -set constraint_exclusion to 'on'; -explain (costs off) select * from listp1 where a = 2; - QUERY PLAN --------------------------- - Result - One-Time Filter: false -(2 rows) - -explain (costs off) update listp1 set a = 1 where a = 2; - QUERY PLAN --------------------------------- - Update on listp1 - -> Result - One-Time Filter: false -(3 rows) - -reset constraint_exclusion; -reset enable_partition_pruning; -drop table listp; --- Ensure run-time pruning works correctly for nested Append nodes -set parallel_setup_cost to 0; -set parallel_tuple_cost to 0; -create table listp (a int) partition by list(a); -create table listp_12 partition of listp for values in(1,2) partition by list(a); -create table listp_12_1 partition of listp_12 for values in(1); -create table listp_12_2 partition of listp_12 for values in(2); --- Force the 2nd subnode of the Append to be non-parallel. This results in --- a nested Append node because the mixed parallel / non-parallel paths cannot --- be pulled into the top-level Append. -alter table listp_12_1 set (parallel_workers = 0); --- Ensure that listp_12_2 is not scanned. (The nested Append is not seen in --- the plan as it's pulled in setref.c due to having just a single subnode). -select explain_parallel_append('select * from listp where a = (select 1);'); - explain_parallel_append ----------------------------------------------------------------------- - Gather (actual rows=N loops=N) - Workers Planned: 2 - Params Evaluated: $0 - Workers Launched: N - InitPlan 1 (returns $0) - -> Result (actual rows=N loops=N) - -> Parallel Append (actual rows=N loops=N) - -> Seq Scan on listp_12_1 listp_1 (actual rows=N loops=N) - Filter: (a = $0) - -> Parallel Seq Scan on listp_12_2 listp_2 (never executed) - Filter: (a = $0) -(11 rows) - --- Like the above but throw some more complexity at the planner by adding --- a UNION ALL. We expect both sides of the union not to scan the --- non-required partitions. -select explain_parallel_append( -'select * from listp where a = (select 1) - union all -select * from listp where a = (select 2);'); - explain_parallel_append ------------------------------------------------------------------------------------ - Append (actual rows=N loops=N) - -> Gather (actual rows=N loops=N) - Workers Planned: 2 - Params Evaluated: $0 - Workers Launched: N - InitPlan 1 (returns $0) - -> Result (actual rows=N loops=N) - -> Parallel Append (actual rows=N loops=N) - -> Seq Scan on listp_12_1 listp_1 (actual rows=N loops=N) - Filter: (a = $0) - -> Parallel Seq Scan on listp_12_2 listp_2 (never executed) - Filter: (a = $0) - -> Gather (actual rows=N loops=N) - Workers Planned: 2 - Params Evaluated: $1 - Workers Launched: N - InitPlan 2 (returns $1) - -> Result (actual rows=N loops=N) - -> Parallel Append (actual rows=N loops=N) - -> Seq Scan on listp_12_1 listp_4 (never executed) - Filter: (a = $1) - -> Parallel Seq Scan on listp_12_2 listp_5 (actual rows=N loops=N) - Filter: (a = $1) -(23 rows) - -drop table listp; -reset parallel_tuple_cost; -reset parallel_setup_cost; --- Test case for run-time pruning with a nested Merge Append -set enable_sort to 0; -create table rangep (a int, b int) partition by range (a); -create table rangep_0_to_100 partition of rangep for values from (0) to (100) partition by list (b); --- We need 3 sub-partitions. 1 to validate pruning worked and another two --- because a single remaining partition would be pulled up to the main Append. -create table rangep_0_to_100_1 partition of rangep_0_to_100 for values in(1); -create table rangep_0_to_100_2 partition of rangep_0_to_100 for values in(2); -create table rangep_0_to_100_3 partition of rangep_0_to_100 for values in(3); -create table rangep_100_to_200 partition of rangep for values from (100) to (200); -create index on rangep (a); --- Ensure run-time pruning works on the nested Merge Append -explain (analyze on, costs off, timing off, summary off) -select * from rangep where b IN((select 1),(select 2)) order by a; - QUERY PLAN ------------------------------------------------------------------------------------------------------------- - Append (actual rows=0 loops=1) - InitPlan 1 (returns $0) - -> Result (actual rows=1 loops=1) - InitPlan 2 (returns $1) - -> Result (actual rows=1 loops=1) - -> Merge Append (actual rows=0 loops=1) - Sort Key: rangep_2.a - -> Index Scan using rangep_0_to_100_1_a_idx on rangep_0_to_100_1 rangep_2 (actual rows=0 loops=1) - Filter: (b = ANY (ARRAY[$0, $1])) - -> Index Scan using rangep_0_to_100_2_a_idx on rangep_0_to_100_2 rangep_3 (actual rows=0 loops=1) - Filter: (b = ANY (ARRAY[$0, $1])) - -> Index Scan using rangep_0_to_100_3_a_idx on rangep_0_to_100_3 rangep_4 (never executed) - Filter: (b = ANY (ARRAY[$0, $1])) - -> Index Scan using rangep_100_to_200_a_idx on rangep_100_to_200 rangep_5 (actual rows=0 loops=1) - Filter: (b = ANY (ARRAY[$0, $1])) -(15 rows) - -reset enable_sort; -drop table rangep; --- --- Check that gen_prune_steps_from_opexps() works well for various cases of --- clauses for different partition keys --- -create table rp_prefix_test1 (a int, b varchar) partition by range(a, b); -create table rp_prefix_test1_p1 partition of rp_prefix_test1 for values from (1, 'a') to (1, 'b'); -create table rp_prefix_test1_p2 partition of rp_prefix_test1 for values from (2, 'a') to (2, 'b'); --- Don't call get_steps_using_prefix() with the last partition key b plus --- an empty prefix -explain (costs off) select * from rp_prefix_test1 where a <= 1 and b = 'a'; - QUERY PLAN --------------------------------------------------- - Seq Scan on rp_prefix_test1_p1 rp_prefix_test1 - Filter: ((a <= 1) AND ((b)::text = 'a'::text)) -(2 rows) - -create table rp_prefix_test2 (a int, b int, c int) partition by range(a, b, c); -create table rp_prefix_test2_p1 partition of rp_prefix_test2 for values from (1, 1, 0) to (1, 1, 10); -create table rp_prefix_test2_p2 partition of rp_prefix_test2 for values from (2, 2, 0) to (2, 2, 10); --- Don't call get_steps_using_prefix() with the last partition key c plus --- an invalid prefix (ie, b = 1) -explain (costs off) select * from rp_prefix_test2 where a <= 1 and b = 1 and c >= 0; - QUERY PLAN ------------------------------------------------- - Seq Scan on rp_prefix_test2_p1 rp_prefix_test2 - Filter: ((a <= 1) AND (c >= 0) AND (b = 1)) -(2 rows) - -create table rp_prefix_test3 (a int, b int, c int, d int) partition by range(a, b, c, d); -create table rp_prefix_test3_p1 partition of rp_prefix_test3 for values from (1, 1, 1, 0) to (1, 1, 1, 10); -create table rp_prefix_test3_p2 partition of rp_prefix_test3 for values from (2, 2, 2, 0) to (2, 2, 2, 10); --- Test that get_steps_using_prefix() handles a prefix that contains multiple --- clauses for the partition key b (ie, b >= 1 and b >= 2) -explain (costs off) select * from rp_prefix_test3 where a >= 1 and b >= 1 and b >= 2 and c >= 2 and d >= 0; - QUERY PLAN --------------------------------------------------------------------------- - Seq Scan on rp_prefix_test3_p2 rp_prefix_test3 - Filter: ((a >= 1) AND (b >= 1) AND (b >= 2) AND (c >= 2) AND (d >= 0)) -(2 rows) - --- Test that get_steps_using_prefix() handles a prefix that contains multiple --- clauses for the partition key b (ie, b >= 1 and b = 2) (This also tests --- that the caller arranges clauses in that prefix in the required order) -explain (costs off) select * from rp_prefix_test3 where a >= 1 and b >= 1 and b = 2 and c = 2 and d >= 0; - QUERY PLAN ------------------------------------------------------------------------- - Seq Scan on rp_prefix_test3_p2 rp_prefix_test3 - Filter: ((a >= 1) AND (b >= 1) AND (d >= 0) AND (b = 2) AND (c = 2)) -(2 rows) - -create table hp_prefix_test (a int, b int, c int, d int) partition by hash (a part_test_int4_ops, b part_test_int4_ops, c part_test_int4_ops, d part_test_int4_ops); -create table hp_prefix_test_p1 partition of hp_prefix_test for values with (modulus 2, remainder 0); -create table hp_prefix_test_p2 partition of hp_prefix_test for values with (modulus 2, remainder 1); --- Test that get_steps_using_prefix() handles non-NULL step_nullkeys -explain (costs off) select * from hp_prefix_test where a = 1 and b is null and c = 1 and d = 1; - QUERY PLAN -------------------------------------------------------------- - Seq Scan on hp_prefix_test_p1 hp_prefix_test - Filter: ((b IS NULL) AND (a = 1) AND (c = 1) AND (d = 1)) -(2 rows) - -drop table rp_prefix_test1; -drop table rp_prefix_test2; -drop table rp_prefix_test3; -drop table hp_prefix_test; --- --- Check that gen_partprune_steps() detects self-contradiction from clauses --- regardless of the order of the clauses (Here we use a custom operator to --- prevent the equivclass.c machinery from reordering the clauses) --- -create operator === ( - leftarg = int4, - rightarg = int4, - procedure = int4eq, - commutator = ===, - hashes -); -create operator class part_test_int4_ops2 -for type int4 -using hash as -operator 1 ===, -function 2 part_hashint4_noop(int4, int8); -create table hp_contradict_test (a int, b int) partition by hash (a part_test_int4_ops2, b part_test_int4_ops2); -create table hp_contradict_test_p1 partition of hp_contradict_test for values with (modulus 2, remainder 0); -create table hp_contradict_test_p2 partition of hp_contradict_test for values with (modulus 2, remainder 1); -explain (costs off) select * from hp_contradict_test where a is null and a === 1 and b === 1; - QUERY PLAN --------------------------- - Result - One-Time Filter: false -(2 rows) - -explain (costs off) select * from hp_contradict_test where a === 1 and b === 1 and a is null; - QUERY PLAN --------------------------- - Result - One-Time Filter: false -(2 rows) - -drop table hp_contradict_test; -drop operator class part_test_int4_ops2 using hash; -drop operator ===(int4, int4); +server closed the connection unexpectedly + This probably means the server terminated abnormally + before or while processing the request. +connection to server was lost diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/partition_aggregate.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/partition_aggregate.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/partition_aggregate.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/partition_aggregate.out 2023-02-20 19:49:12.759219900 -0500 @@ -1,1519 +1 @@ --- --- PARTITION_AGGREGATE --- Test partitionwise aggregation on partitioned tables --- --- Note: to ensure plan stability, it's a good idea to make the partitions of --- any one partitioned table in this test all have different numbers of rows. --- --- Enable partitionwise aggregate, which by default is disabled. -SET enable_partitionwise_aggregate TO true; --- Enable partitionwise join, which by default is disabled. -SET enable_partitionwise_join TO true; --- Disable parallel plans. -SET max_parallel_workers_per_gather TO 0; --- Disable incremental sort, which can influence selected plans due to fuzz factor. -SET enable_incremental_sort TO off; --- --- Tests for list partitioned tables. --- -CREATE TABLE pagg_tab (a int, b int, c text, d int) PARTITION BY LIST(c); -CREATE TABLE pagg_tab_p1 PARTITION OF pagg_tab FOR VALUES IN ('0000', '0001', '0002', '0003', '0004'); -CREATE TABLE pagg_tab_p2 PARTITION OF pagg_tab FOR VALUES IN ('0005', '0006', '0007', '0008'); -CREATE TABLE pagg_tab_p3 PARTITION OF pagg_tab FOR VALUES IN ('0009', '0010', '0011'); -INSERT INTO pagg_tab SELECT i % 20, i % 30, to_char(i % 12, 'FM0000'), i % 30 FROM generate_series(0, 2999) i; -ANALYZE pagg_tab; --- When GROUP BY clause matches; full aggregation is performed for each partition. -EXPLAIN (COSTS OFF) -SELECT c, sum(a), avg(b), count(*), min(a), max(b) FROM pagg_tab GROUP BY c HAVING avg(d) < 15 ORDER BY 1, 2, 3; - QUERY PLAN --------------------------------------------------------------- - Sort - Sort Key: pagg_tab.c, (sum(pagg_tab.a)), (avg(pagg_tab.b)) - -> Append - -> HashAggregate - Group Key: pagg_tab.c - Filter: (avg(pagg_tab.d) < '15'::numeric) - -> Seq Scan on pagg_tab_p1 pagg_tab - -> HashAggregate - Group Key: pagg_tab_1.c - Filter: (avg(pagg_tab_1.d) < '15'::numeric) - -> Seq Scan on pagg_tab_p2 pagg_tab_1 - -> HashAggregate - Group Key: pagg_tab_2.c - Filter: (avg(pagg_tab_2.d) < '15'::numeric) - -> Seq Scan on pagg_tab_p3 pagg_tab_2 -(15 rows) - -SELECT c, sum(a), avg(b), count(*), min(a), max(b) FROM pagg_tab GROUP BY c HAVING avg(d) < 15 ORDER BY 1, 2, 3; - c | sum | avg | count | min | max -------+------+---------------------+-------+-----+----- - 0000 | 2000 | 12.0000000000000000 | 250 | 0 | 24 - 0001 | 2250 | 13.0000000000000000 | 250 | 1 | 25 - 0002 | 2500 | 14.0000000000000000 | 250 | 2 | 26 - 0006 | 2500 | 12.0000000000000000 | 250 | 2 | 24 - 0007 | 2750 | 13.0000000000000000 | 250 | 3 | 25 - 0008 | 2000 | 14.0000000000000000 | 250 | 0 | 26 -(6 rows) - --- When GROUP BY clause does not match; partial aggregation is performed for each partition. -EXPLAIN (COSTS OFF) -SELECT a, sum(b), avg(b), count(*), min(a), max(b) FROM pagg_tab GROUP BY a HAVING avg(d) < 15 ORDER BY 1, 2, 3; - QUERY PLAN --------------------------------------------------------------- - Sort - Sort Key: pagg_tab.a, (sum(pagg_tab.b)), (avg(pagg_tab.b)) - -> Finalize HashAggregate - Group Key: pagg_tab.a - Filter: (avg(pagg_tab.d) < '15'::numeric) - -> Append - -> Partial HashAggregate - Group Key: pagg_tab.a - -> Seq Scan on pagg_tab_p1 pagg_tab - -> Partial HashAggregate - Group Key: pagg_tab_1.a - -> Seq Scan on pagg_tab_p2 pagg_tab_1 - -> Partial HashAggregate - Group Key: pagg_tab_2.a - -> Seq Scan on pagg_tab_p3 pagg_tab_2 -(15 rows) - -SELECT a, sum(b), avg(b), count(*), min(a), max(b) FROM pagg_tab GROUP BY a HAVING avg(d) < 15 ORDER BY 1, 2, 3; - a | sum | avg | count | min | max -----+------+---------------------+-------+-----+----- - 0 | 1500 | 10.0000000000000000 | 150 | 0 | 20 - 1 | 1650 | 11.0000000000000000 | 150 | 1 | 21 - 2 | 1800 | 12.0000000000000000 | 150 | 2 | 22 - 3 | 1950 | 13.0000000000000000 | 150 | 3 | 23 - 4 | 2100 | 14.0000000000000000 | 150 | 4 | 24 - 10 | 1500 | 10.0000000000000000 | 150 | 10 | 20 - 11 | 1650 | 11.0000000000000000 | 150 | 11 | 21 - 12 | 1800 | 12.0000000000000000 | 150 | 12 | 22 - 13 | 1950 | 13.0000000000000000 | 150 | 13 | 23 - 14 | 2100 | 14.0000000000000000 | 150 | 14 | 24 -(10 rows) - --- Check with multiple columns in GROUP BY -EXPLAIN (COSTS OFF) -SELECT a, c, count(*) FROM pagg_tab GROUP BY a, c; - QUERY PLAN ------------------------------------------------- - Append - -> HashAggregate - Group Key: pagg_tab.a, pagg_tab.c - -> Seq Scan on pagg_tab_p1 pagg_tab - -> HashAggregate - Group Key: pagg_tab_1.a, pagg_tab_1.c - -> Seq Scan on pagg_tab_p2 pagg_tab_1 - -> HashAggregate - Group Key: pagg_tab_2.a, pagg_tab_2.c - -> Seq Scan on pagg_tab_p3 pagg_tab_2 -(10 rows) - --- Check with multiple columns in GROUP BY, order in GROUP BY is reversed -EXPLAIN (COSTS OFF) -SELECT a, c, count(*) FROM pagg_tab GROUP BY c, a; - QUERY PLAN ------------------------------------------------- - Append - -> HashAggregate - Group Key: pagg_tab.c, pagg_tab.a - -> Seq Scan on pagg_tab_p1 pagg_tab - -> HashAggregate - Group Key: pagg_tab_1.c, pagg_tab_1.a - -> Seq Scan on pagg_tab_p2 pagg_tab_1 - -> HashAggregate - Group Key: pagg_tab_2.c, pagg_tab_2.a - -> Seq Scan on pagg_tab_p3 pagg_tab_2 -(10 rows) - --- Check with multiple columns in GROUP BY, order in target-list is reversed -EXPLAIN (COSTS OFF) -SELECT c, a, count(*) FROM pagg_tab GROUP BY a, c; - QUERY PLAN ------------------------------------------------- - Append - -> HashAggregate - Group Key: pagg_tab.a, pagg_tab.c - -> Seq Scan on pagg_tab_p1 pagg_tab - -> HashAggregate - Group Key: pagg_tab_1.a, pagg_tab_1.c - -> Seq Scan on pagg_tab_p2 pagg_tab_1 - -> HashAggregate - Group Key: pagg_tab_2.a, pagg_tab_2.c - -> Seq Scan on pagg_tab_p3 pagg_tab_2 -(10 rows) - --- Test when input relation for grouping is dummy -EXPLAIN (COSTS OFF) -SELECT c, sum(a) FROM pagg_tab WHERE 1 = 2 GROUP BY c; - QUERY PLAN --------------------------------- - HashAggregate - Group Key: c - -> Result - One-Time Filter: false -(4 rows) - -SELECT c, sum(a) FROM pagg_tab WHERE 1 = 2 GROUP BY c; - c | sum ----+----- -(0 rows) - -EXPLAIN (COSTS OFF) -SELECT c, sum(a) FROM pagg_tab WHERE c = 'x' GROUP BY c; - QUERY PLAN --------------------------------- - GroupAggregate - Group Key: c - -> Result - One-Time Filter: false -(4 rows) - -SELECT c, sum(a) FROM pagg_tab WHERE c = 'x' GROUP BY c; - c | sum ----+----- -(0 rows) - --- Test GroupAggregate paths by disabling hash aggregates. -SET enable_hashagg TO false; --- When GROUP BY clause matches full aggregation is performed for each partition. -EXPLAIN (COSTS OFF) -SELECT c, sum(a), avg(b), count(*) FROM pagg_tab GROUP BY 1 HAVING avg(d) < 15 ORDER BY 1, 2, 3; - QUERY PLAN --------------------------------------------------------------- - Sort - Sort Key: pagg_tab.c, (sum(pagg_tab.a)), (avg(pagg_tab.b)) - -> Append - -> GroupAggregate - Group Key: pagg_tab.c - Filter: (avg(pagg_tab.d) < '15'::numeric) - -> Sort - Sort Key: pagg_tab.c - -> Seq Scan on pagg_tab_p1 pagg_tab - -> GroupAggregate - Group Key: pagg_tab_1.c - Filter: (avg(pagg_tab_1.d) < '15'::numeric) - -> Sort - Sort Key: pagg_tab_1.c - -> Seq Scan on pagg_tab_p2 pagg_tab_1 - -> GroupAggregate - Group Key: pagg_tab_2.c - Filter: (avg(pagg_tab_2.d) < '15'::numeric) - -> Sort - Sort Key: pagg_tab_2.c - -> Seq Scan on pagg_tab_p3 pagg_tab_2 -(21 rows) - -SELECT c, sum(a), avg(b), count(*) FROM pagg_tab GROUP BY 1 HAVING avg(d) < 15 ORDER BY 1, 2, 3; - c | sum | avg | count -------+------+---------------------+------- - 0000 | 2000 | 12.0000000000000000 | 250 - 0001 | 2250 | 13.0000000000000000 | 250 - 0002 | 2500 | 14.0000000000000000 | 250 - 0006 | 2500 | 12.0000000000000000 | 250 - 0007 | 2750 | 13.0000000000000000 | 250 - 0008 | 2000 | 14.0000000000000000 | 250 -(6 rows) - --- When GROUP BY clause does not match; partial aggregation is performed for each partition. -EXPLAIN (COSTS OFF) -SELECT a, sum(b), avg(b), count(*) FROM pagg_tab GROUP BY 1 HAVING avg(d) < 15 ORDER BY 1, 2, 3; - QUERY PLAN ------------------------------------------------------------------- - Sort - Sort Key: pagg_tab.a, (sum(pagg_tab.b)), (avg(pagg_tab.b)) - -> Finalize GroupAggregate - Group Key: pagg_tab.a - Filter: (avg(pagg_tab.d) < '15'::numeric) - -> Merge Append - Sort Key: pagg_tab.a - -> Partial GroupAggregate - Group Key: pagg_tab.a - -> Sort - Sort Key: pagg_tab.a - -> Seq Scan on pagg_tab_p1 pagg_tab - -> Partial GroupAggregate - Group Key: pagg_tab_1.a - -> Sort - Sort Key: pagg_tab_1.a - -> Seq Scan on pagg_tab_p2 pagg_tab_1 - -> Partial GroupAggregate - Group Key: pagg_tab_2.a - -> Sort - Sort Key: pagg_tab_2.a - -> Seq Scan on pagg_tab_p3 pagg_tab_2 -(22 rows) - -SELECT a, sum(b), avg(b), count(*) FROM pagg_tab GROUP BY 1 HAVING avg(d) < 15 ORDER BY 1, 2, 3; - a | sum | avg | count -----+------+---------------------+------- - 0 | 1500 | 10.0000000000000000 | 150 - 1 | 1650 | 11.0000000000000000 | 150 - 2 | 1800 | 12.0000000000000000 | 150 - 3 | 1950 | 13.0000000000000000 | 150 - 4 | 2100 | 14.0000000000000000 | 150 - 10 | 1500 | 10.0000000000000000 | 150 - 11 | 1650 | 11.0000000000000000 | 150 - 12 | 1800 | 12.0000000000000000 | 150 - 13 | 1950 | 13.0000000000000000 | 150 - 14 | 2100 | 14.0000000000000000 | 150 -(10 rows) - --- Test partitionwise grouping without any aggregates -EXPLAIN (COSTS OFF) -SELECT c FROM pagg_tab GROUP BY c ORDER BY 1; - QUERY PLAN ------------------------------------------------------- - Merge Append - Sort Key: pagg_tab.c - -> Group - Group Key: pagg_tab.c - -> Sort - Sort Key: pagg_tab.c - -> Seq Scan on pagg_tab_p1 pagg_tab - -> Group - Group Key: pagg_tab_1.c - -> Sort - Sort Key: pagg_tab_1.c - -> Seq Scan on pagg_tab_p2 pagg_tab_1 - -> Group - Group Key: pagg_tab_2.c - -> Sort - Sort Key: pagg_tab_2.c - -> Seq Scan on pagg_tab_p3 pagg_tab_2 -(17 rows) - -SELECT c FROM pagg_tab GROUP BY c ORDER BY 1; - c ------- - 0000 - 0001 - 0002 - 0003 - 0004 - 0005 - 0006 - 0007 - 0008 - 0009 - 0010 - 0011 -(12 rows) - -EXPLAIN (COSTS OFF) -SELECT a FROM pagg_tab WHERE a < 3 GROUP BY a ORDER BY 1; - QUERY PLAN ------------------------------------------------------------- - Group - Group Key: pagg_tab.a - -> Merge Append - Sort Key: pagg_tab.a - -> Group - Group Key: pagg_tab.a - -> Sort - Sort Key: pagg_tab.a - -> Seq Scan on pagg_tab_p1 pagg_tab - Filter: (a < 3) - -> Group - Group Key: pagg_tab_1.a - -> Sort - Sort Key: pagg_tab_1.a - -> Seq Scan on pagg_tab_p2 pagg_tab_1 - Filter: (a < 3) - -> Group - Group Key: pagg_tab_2.a - -> Sort - Sort Key: pagg_tab_2.a - -> Seq Scan on pagg_tab_p3 pagg_tab_2 - Filter: (a < 3) -(22 rows) - -SELECT a FROM pagg_tab WHERE a < 3 GROUP BY a ORDER BY 1; - a ---- - 0 - 1 - 2 -(3 rows) - -RESET enable_hashagg; --- ROLLUP, partitionwise aggregation does not apply -EXPLAIN (COSTS OFF) -SELECT c, sum(a) FROM pagg_tab GROUP BY rollup(c) ORDER BY 1, 2; - QUERY PLAN ------------------------------------------------------- - Sort - Sort Key: pagg_tab.c, (sum(pagg_tab.a)) - -> MixedAggregate - Hash Key: pagg_tab.c - Group Key: () - -> Append - -> Seq Scan on pagg_tab_p1 pagg_tab_1 - -> Seq Scan on pagg_tab_p2 pagg_tab_2 - -> Seq Scan on pagg_tab_p3 pagg_tab_3 -(9 rows) - --- ORDERED SET within the aggregate. --- Full aggregation; since all the rows that belong to the same group come --- from the same partition, having an ORDER BY within the aggregate doesn't --- make any difference. -EXPLAIN (COSTS OFF) -SELECT c, sum(b order by a) FROM pagg_tab GROUP BY c ORDER BY 1, 2; - QUERY PLAN ---------------------------------------------------------------- - Sort - Sort Key: pagg_tab.c, (sum(pagg_tab.b ORDER BY pagg_tab.a)) - -> Append - -> GroupAggregate - Group Key: pagg_tab.c - -> Sort - Sort Key: pagg_tab.c - -> Seq Scan on pagg_tab_p1 pagg_tab - -> GroupAggregate - Group Key: pagg_tab_1.c - -> Sort - Sort Key: pagg_tab_1.c - -> Seq Scan on pagg_tab_p2 pagg_tab_1 - -> GroupAggregate - Group Key: pagg_tab_2.c - -> Sort - Sort Key: pagg_tab_2.c - -> Seq Scan on pagg_tab_p3 pagg_tab_2 -(18 rows) - --- Since GROUP BY clause does not match with PARTITION KEY; we need to do --- partial aggregation. However, ORDERED SET are not partial safe and thus --- partitionwise aggregation plan is not generated. -EXPLAIN (COSTS OFF) -SELECT a, sum(b order by a) FROM pagg_tab GROUP BY a ORDER BY 1, 2; - QUERY PLAN ---------------------------------------------------------------- - Sort - Sort Key: pagg_tab.a, (sum(pagg_tab.b ORDER BY pagg_tab.a)) - -> GroupAggregate - Group Key: pagg_tab.a - -> Sort - Sort Key: pagg_tab.a - -> Append - -> Seq Scan on pagg_tab_p1 pagg_tab_1 - -> Seq Scan on pagg_tab_p2 pagg_tab_2 - -> Seq Scan on pagg_tab_p3 pagg_tab_3 -(10 rows) - --- JOIN query -CREATE TABLE pagg_tab1(x int, y int) PARTITION BY RANGE(x); -CREATE TABLE pagg_tab1_p1 PARTITION OF pagg_tab1 FOR VALUES FROM (0) TO (10); -CREATE TABLE pagg_tab1_p2 PARTITION OF pagg_tab1 FOR VALUES FROM (10) TO (20); -CREATE TABLE pagg_tab1_p3 PARTITION OF pagg_tab1 FOR VALUES FROM (20) TO (30); -CREATE TABLE pagg_tab2(x int, y int) PARTITION BY RANGE(y); -CREATE TABLE pagg_tab2_p1 PARTITION OF pagg_tab2 FOR VALUES FROM (0) TO (10); -CREATE TABLE pagg_tab2_p2 PARTITION OF pagg_tab2 FOR VALUES FROM (10) TO (20); -CREATE TABLE pagg_tab2_p3 PARTITION OF pagg_tab2 FOR VALUES FROM (20) TO (30); -INSERT INTO pagg_tab1 SELECT i % 30, i % 20 FROM generate_series(0, 299, 2) i; -INSERT INTO pagg_tab2 SELECT i % 20, i % 30 FROM generate_series(0, 299, 3) i; -ANALYZE pagg_tab1; -ANALYZE pagg_tab2; --- When GROUP BY clause matches; full aggregation is performed for each partition. -EXPLAIN (COSTS OFF) -SELECT t1.x, sum(t1.y), count(*) FROM pagg_tab1 t1, pagg_tab2 t2 WHERE t1.x = t2.y GROUP BY t1.x ORDER BY 1, 2, 3; - QUERY PLAN -------------------------------------------------------------- - Sort - Sort Key: t1.x, (sum(t1.y)), (count(*)) - -> Append - -> HashAggregate - Group Key: t1.x - -> Hash Join - Hash Cond: (t1.x = t2.y) - -> Seq Scan on pagg_tab1_p1 t1 - -> Hash - -> Seq Scan on pagg_tab2_p1 t2 - -> HashAggregate - Group Key: t1_1.x - -> Hash Join - Hash Cond: (t1_1.x = t2_1.y) - -> Seq Scan on pagg_tab1_p2 t1_1 - -> Hash - -> Seq Scan on pagg_tab2_p2 t2_1 - -> HashAggregate - Group Key: t1_2.x - -> Hash Join - Hash Cond: (t2_2.y = t1_2.x) - -> Seq Scan on pagg_tab2_p3 t2_2 - -> Hash - -> Seq Scan on pagg_tab1_p3 t1_2 -(24 rows) - -SELECT t1.x, sum(t1.y), count(*) FROM pagg_tab1 t1, pagg_tab2 t2 WHERE t1.x = t2.y GROUP BY t1.x ORDER BY 1, 2, 3; - x | sum | count -----+------+------- - 0 | 500 | 100 - 6 | 1100 | 100 - 12 | 700 | 100 - 18 | 1300 | 100 - 24 | 900 | 100 -(5 rows) - --- Check with whole-row reference; partitionwise aggregation does not apply -EXPLAIN (COSTS OFF) -SELECT t1.x, sum(t1.y), count(t1) FROM pagg_tab1 t1, pagg_tab2 t2 WHERE t1.x = t2.y GROUP BY t1.x ORDER BY 1, 2, 3; - QUERY PLAN -------------------------------------------------------------- - Sort - Sort Key: t1.x, (sum(t1.y)), (count(((t1.*)::pagg_tab1))) - -> HashAggregate - Group Key: t1.x - -> Hash Join - Hash Cond: (t1.x = t2.y) - -> Append - -> Seq Scan on pagg_tab1_p1 t1_1 - -> Seq Scan on pagg_tab1_p2 t1_2 - -> Seq Scan on pagg_tab1_p3 t1_3 - -> Hash - -> Append - -> Seq Scan on pagg_tab2_p1 t2_1 - -> Seq Scan on pagg_tab2_p2 t2_2 - -> Seq Scan on pagg_tab2_p3 t2_3 -(15 rows) - -SELECT t1.x, sum(t1.y), count(t1) FROM pagg_tab1 t1, pagg_tab2 t2 WHERE t1.x = t2.y GROUP BY t1.x ORDER BY 1, 2, 3; - x | sum | count -----+------+------- - 0 | 500 | 100 - 6 | 1100 | 100 - 12 | 700 | 100 - 18 | 1300 | 100 - 24 | 900 | 100 -(5 rows) - --- GROUP BY having other matching key -EXPLAIN (COSTS OFF) -SELECT t2.y, sum(t1.y), count(*) FROM pagg_tab1 t1, pagg_tab2 t2 WHERE t1.x = t2.y GROUP BY t2.y ORDER BY 1, 2, 3; - QUERY PLAN -------------------------------------------------------------- - Sort - Sort Key: t2.y, (sum(t1.y)), (count(*)) - -> Append - -> HashAggregate - Group Key: t2.y - -> Hash Join - Hash Cond: (t1.x = t2.y) - -> Seq Scan on pagg_tab1_p1 t1 - -> Hash - -> Seq Scan on pagg_tab2_p1 t2 - -> HashAggregate - Group Key: t2_1.y - -> Hash Join - Hash Cond: (t1_1.x = t2_1.y) - -> Seq Scan on pagg_tab1_p2 t1_1 - -> Hash - -> Seq Scan on pagg_tab2_p2 t2_1 - -> HashAggregate - Group Key: t2_2.y - -> Hash Join - Hash Cond: (t2_2.y = t1_2.x) - -> Seq Scan on pagg_tab2_p3 t2_2 - -> Hash - -> Seq Scan on pagg_tab1_p3 t1_2 -(24 rows) - --- When GROUP BY clause does not match; partial aggregation is performed for each partition. --- Also test GroupAggregate paths by disabling hash aggregates. -SET enable_hashagg TO false; -EXPLAIN (COSTS OFF) -SELECT t1.y, sum(t1.x), count(*) FROM pagg_tab1 t1, pagg_tab2 t2 WHERE t1.x = t2.y GROUP BY t1.y HAVING avg(t1.x) > 10 ORDER BY 1, 2, 3; - QUERY PLAN -------------------------------------------------------------------------- - Sort - Sort Key: t1.y, (sum(t1.x)), (count(*)) - -> Finalize GroupAggregate - Group Key: t1.y - Filter: (avg(t1.x) > '10'::numeric) - -> Merge Append - Sort Key: t1.y - -> Partial GroupAggregate - Group Key: t1.y - -> Sort - Sort Key: t1.y - -> Hash Join - Hash Cond: (t1.x = t2.y) - -> Seq Scan on pagg_tab1_p1 t1 - -> Hash - -> Seq Scan on pagg_tab2_p1 t2 - -> Partial GroupAggregate - Group Key: t1_1.y - -> Sort - Sort Key: t1_1.y - -> Hash Join - Hash Cond: (t1_1.x = t2_1.y) - -> Seq Scan on pagg_tab1_p2 t1_1 - -> Hash - -> Seq Scan on pagg_tab2_p2 t2_1 - -> Partial GroupAggregate - Group Key: t1_2.y - -> Sort - Sort Key: t1_2.y - -> Hash Join - Hash Cond: (t2_2.y = t1_2.x) - -> Seq Scan on pagg_tab2_p3 t2_2 - -> Hash - -> Seq Scan on pagg_tab1_p3 t1_2 -(34 rows) - -SELECT t1.y, sum(t1.x), count(*) FROM pagg_tab1 t1, pagg_tab2 t2 WHERE t1.x = t2.y GROUP BY t1.y HAVING avg(t1.x) > 10 ORDER BY 1, 2, 3; - y | sum | count -----+------+------- - 2 | 600 | 50 - 4 | 1200 | 50 - 8 | 900 | 50 - 12 | 600 | 50 - 14 | 1200 | 50 - 18 | 900 | 50 -(6 rows) - -RESET enable_hashagg; --- Check with LEFT/RIGHT/FULL OUTER JOINs which produces NULL values for --- aggregation --- LEFT JOIN, should produce partial partitionwise aggregation plan as --- GROUP BY is on nullable column -EXPLAIN (COSTS OFF) -SELECT b.y, sum(a.y) FROM pagg_tab1 a LEFT JOIN pagg_tab2 b ON a.x = b.y GROUP BY b.y ORDER BY 1 NULLS LAST; - QUERY PLAN ------------------------------------------------------------------- - Finalize GroupAggregate - Group Key: b.y - -> Sort - Sort Key: b.y - -> Append - -> Partial HashAggregate - Group Key: b.y - -> Hash Left Join - Hash Cond: (a.x = b.y) - -> Seq Scan on pagg_tab1_p1 a - -> Hash - -> Seq Scan on pagg_tab2_p1 b - -> Partial HashAggregate - Group Key: b_1.y - -> Hash Left Join - Hash Cond: (a_1.x = b_1.y) - -> Seq Scan on pagg_tab1_p2 a_1 - -> Hash - -> Seq Scan on pagg_tab2_p2 b_1 - -> Partial HashAggregate - Group Key: b_2.y - -> Hash Right Join - Hash Cond: (b_2.y = a_2.x) - -> Seq Scan on pagg_tab2_p3 b_2 - -> Hash - -> Seq Scan on pagg_tab1_p3 a_2 -(26 rows) - -SELECT b.y, sum(a.y) FROM pagg_tab1 a LEFT JOIN pagg_tab2 b ON a.x = b.y GROUP BY b.y ORDER BY 1 NULLS LAST; - y | sum -----+------ - 0 | 500 - 6 | 1100 - 12 | 700 - 18 | 1300 - 24 | 900 - | 900 -(6 rows) - --- RIGHT JOIN, should produce full partitionwise aggregation plan as --- GROUP BY is on non-nullable column -EXPLAIN (COSTS OFF) -SELECT b.y, sum(a.y) FROM pagg_tab1 a RIGHT JOIN pagg_tab2 b ON a.x = b.y GROUP BY b.y ORDER BY 1 NULLS LAST; - QUERY PLAN ------------------------------------------------------------- - Sort - Sort Key: b.y - -> Append - -> HashAggregate - Group Key: b.y - -> Hash Right Join - Hash Cond: (a.x = b.y) - -> Seq Scan on pagg_tab1_p1 a - -> Hash - -> Seq Scan on pagg_tab2_p1 b - -> HashAggregate - Group Key: b_1.y - -> Hash Right Join - Hash Cond: (a_1.x = b_1.y) - -> Seq Scan on pagg_tab1_p2 a_1 - -> Hash - -> Seq Scan on pagg_tab2_p2 b_1 - -> HashAggregate - Group Key: b_2.y - -> Hash Left Join - Hash Cond: (b_2.y = a_2.x) - -> Seq Scan on pagg_tab2_p3 b_2 - -> Hash - -> Seq Scan on pagg_tab1_p3 a_2 -(24 rows) - -SELECT b.y, sum(a.y) FROM pagg_tab1 a RIGHT JOIN pagg_tab2 b ON a.x = b.y GROUP BY b.y ORDER BY 1 NULLS LAST; - y | sum -----+------ - 0 | 500 - 3 | - 6 | 1100 - 9 | - 12 | 700 - 15 | - 18 | 1300 - 21 | - 24 | 900 - 27 | -(10 rows) - --- FULL JOIN, should produce partial partitionwise aggregation plan as --- GROUP BY is on nullable column -EXPLAIN (COSTS OFF) -SELECT a.x, sum(b.x) FROM pagg_tab1 a FULL OUTER JOIN pagg_tab2 b ON a.x = b.y GROUP BY a.x ORDER BY 1 NULLS LAST; - QUERY PLAN ------------------------------------------------------------------- - Finalize GroupAggregate - Group Key: a.x - -> Sort - Sort Key: a.x - -> Append - -> Partial HashAggregate - Group Key: a.x - -> Hash Full Join - Hash Cond: (a.x = b.y) - -> Seq Scan on pagg_tab1_p1 a - -> Hash - -> Seq Scan on pagg_tab2_p1 b - -> Partial HashAggregate - Group Key: a_1.x - -> Hash Full Join - Hash Cond: (a_1.x = b_1.y) - -> Seq Scan on pagg_tab1_p2 a_1 - -> Hash - -> Seq Scan on pagg_tab2_p2 b_1 - -> Partial HashAggregate - Group Key: a_2.x - -> Hash Full Join - Hash Cond: (b_2.y = a_2.x) - -> Seq Scan on pagg_tab2_p3 b_2 - -> Hash - -> Seq Scan on pagg_tab1_p3 a_2 -(26 rows) - -SELECT a.x, sum(b.x) FROM pagg_tab1 a FULL OUTER JOIN pagg_tab2 b ON a.x = b.y GROUP BY a.x ORDER BY 1 NULLS LAST; - x | sum -----+------ - 0 | 500 - 2 | - 4 | - 6 | 1100 - 8 | - 10 | - 12 | 700 - 14 | - 16 | - 18 | 1300 - 20 | - 22 | - 24 | 900 - 26 | - 28 | - | 500 -(16 rows) - --- LEFT JOIN, with dummy relation on right side, ideally --- should produce full partitionwise aggregation plan as GROUP BY is on --- non-nullable columns. --- But right now we are unable to do partitionwise join in this case. -EXPLAIN (COSTS OFF) -SELECT a.x, b.y, count(*) FROM (SELECT * FROM pagg_tab1 WHERE x < 20) a LEFT JOIN (SELECT * FROM pagg_tab2 WHERE y > 10) b ON a.x = b.y WHERE a.x > 5 or b.y < 20 GROUP BY a.x, b.y ORDER BY 1, 2; - QUERY PLAN --------------------------------------------------------------------- - Sort - Sort Key: pagg_tab1.x, pagg_tab2.y - -> HashAggregate - Group Key: pagg_tab1.x, pagg_tab2.y - -> Hash Left Join - Hash Cond: (pagg_tab1.x = pagg_tab2.y) - Filter: ((pagg_tab1.x > 5) OR (pagg_tab2.y < 20)) - -> Append - -> Seq Scan on pagg_tab1_p1 pagg_tab1_1 - Filter: (x < 20) - -> Seq Scan on pagg_tab1_p2 pagg_tab1_2 - Filter: (x < 20) - -> Hash - -> Append - -> Seq Scan on pagg_tab2_p2 pagg_tab2_1 - Filter: (y > 10) - -> Seq Scan on pagg_tab2_p3 pagg_tab2_2 - Filter: (y > 10) -(18 rows) - -SELECT a.x, b.y, count(*) FROM (SELECT * FROM pagg_tab1 WHERE x < 20) a LEFT JOIN (SELECT * FROM pagg_tab2 WHERE y > 10) b ON a.x = b.y WHERE a.x > 5 or b.y < 20 GROUP BY a.x, b.y ORDER BY 1, 2; - x | y | count -----+----+------- - 6 | | 10 - 8 | | 10 - 10 | | 10 - 12 | 12 | 100 - 14 | | 10 - 16 | | 10 - 18 | 18 | 100 -(7 rows) - --- FULL JOIN, with dummy relations on both sides, ideally --- should produce partial partitionwise aggregation plan as GROUP BY is on --- nullable columns. --- But right now we are unable to do partitionwise join in this case. -EXPLAIN (COSTS OFF) -SELECT a.x, b.y, count(*) FROM (SELECT * FROM pagg_tab1 WHERE x < 20) a FULL JOIN (SELECT * FROM pagg_tab2 WHERE y > 10) b ON a.x = b.y WHERE a.x > 5 or b.y < 20 GROUP BY a.x, b.y ORDER BY 1, 2; - QUERY PLAN --------------------------------------------------------------------- - Sort - Sort Key: pagg_tab1.x, pagg_tab2.y - -> HashAggregate - Group Key: pagg_tab1.x, pagg_tab2.y - -> Hash Full Join - Hash Cond: (pagg_tab1.x = pagg_tab2.y) - Filter: ((pagg_tab1.x > 5) OR (pagg_tab2.y < 20)) - -> Append - -> Seq Scan on pagg_tab1_p1 pagg_tab1_1 - Filter: (x < 20) - -> Seq Scan on pagg_tab1_p2 pagg_tab1_2 - Filter: (x < 20) - -> Hash - -> Append - -> Seq Scan on pagg_tab2_p2 pagg_tab2_1 - Filter: (y > 10) - -> Seq Scan on pagg_tab2_p3 pagg_tab2_2 - Filter: (y > 10) -(18 rows) - -SELECT a.x, b.y, count(*) FROM (SELECT * FROM pagg_tab1 WHERE x < 20) a FULL JOIN (SELECT * FROM pagg_tab2 WHERE y > 10) b ON a.x = b.y WHERE a.x > 5 or b.y < 20 GROUP BY a.x, b.y ORDER BY 1, 2; - x | y | count -----+----+------- - 6 | | 10 - 8 | | 10 - 10 | | 10 - 12 | 12 | 100 - 14 | | 10 - 16 | | 10 - 18 | 18 | 100 - | 15 | 10 -(8 rows) - --- Empty join relation because of empty outer side, no partitionwise agg plan -EXPLAIN (COSTS OFF) -SELECT a.x, a.y, count(*) FROM (SELECT * FROM pagg_tab1 WHERE x = 1 AND x = 2) a LEFT JOIN pagg_tab2 b ON a.x = b.y GROUP BY a.x, a.y ORDER BY 1, 2; - QUERY PLAN ---------------------------------------- - GroupAggregate - Group Key: pagg_tab1.x, pagg_tab1.y - -> Sort - Sort Key: pagg_tab1.y - -> Result - One-Time Filter: false -(6 rows) - -SELECT a.x, a.y, count(*) FROM (SELECT * FROM pagg_tab1 WHERE x = 1 AND x = 2) a LEFT JOIN pagg_tab2 b ON a.x = b.y GROUP BY a.x, a.y ORDER BY 1, 2; - x | y | count ----+---+------- -(0 rows) - --- Partition by multiple columns -CREATE TABLE pagg_tab_m (a int, b int, c int) PARTITION BY RANGE(a, ((a+b)/2)); -CREATE TABLE pagg_tab_m_p1 PARTITION OF pagg_tab_m FOR VALUES FROM (0, 0) TO (12, 12); -CREATE TABLE pagg_tab_m_p2 PARTITION OF pagg_tab_m FOR VALUES FROM (12, 12) TO (22, 22); -CREATE TABLE pagg_tab_m_p3 PARTITION OF pagg_tab_m FOR VALUES FROM (22, 22) TO (30, 30); -INSERT INTO pagg_tab_m SELECT i % 30, i % 40, i % 50 FROM generate_series(0, 2999) i; -ANALYZE pagg_tab_m; --- Partial aggregation as GROUP BY clause does not match with PARTITION KEY -EXPLAIN (COSTS OFF) -SELECT a, sum(b), avg(c), count(*) FROM pagg_tab_m GROUP BY a HAVING avg(c) < 22 ORDER BY 1, 2, 3; - QUERY PLAN --------------------------------------------------------------------- - Sort - Sort Key: pagg_tab_m.a, (sum(pagg_tab_m.b)), (avg(pagg_tab_m.c)) - -> Finalize HashAggregate - Group Key: pagg_tab_m.a - Filter: (avg(pagg_tab_m.c) < '22'::numeric) - -> Append - -> Partial HashAggregate - Group Key: pagg_tab_m.a - -> Seq Scan on pagg_tab_m_p1 pagg_tab_m - -> Partial HashAggregate - Group Key: pagg_tab_m_1.a - -> Seq Scan on pagg_tab_m_p2 pagg_tab_m_1 - -> Partial HashAggregate - Group Key: pagg_tab_m_2.a - -> Seq Scan on pagg_tab_m_p3 pagg_tab_m_2 -(15 rows) - -SELECT a, sum(b), avg(c), count(*) FROM pagg_tab_m GROUP BY a HAVING avg(c) < 22 ORDER BY 1, 2, 3; - a | sum | avg | count -----+------+---------------------+------- - 0 | 1500 | 20.0000000000000000 | 100 - 1 | 1600 | 21.0000000000000000 | 100 - 10 | 1500 | 20.0000000000000000 | 100 - 11 | 1600 | 21.0000000000000000 | 100 - 20 | 1500 | 20.0000000000000000 | 100 - 21 | 1600 | 21.0000000000000000 | 100 -(6 rows) - --- Full aggregation as GROUP BY clause matches with PARTITION KEY -EXPLAIN (COSTS OFF) -SELECT a, sum(b), avg(c), count(*) FROM pagg_tab_m GROUP BY a, (a+b)/2 HAVING sum(b) < 50 ORDER BY 1, 2, 3; - QUERY PLAN ----------------------------------------------------------------------------------- - Sort - Sort Key: pagg_tab_m.a, (sum(pagg_tab_m.b)), (avg(pagg_tab_m.c)) - -> Append - -> HashAggregate - Group Key: pagg_tab_m.a, ((pagg_tab_m.a + pagg_tab_m.b) / 2) - Filter: (sum(pagg_tab_m.b) < 50) - -> Seq Scan on pagg_tab_m_p1 pagg_tab_m - -> HashAggregate - Group Key: pagg_tab_m_1.a, ((pagg_tab_m_1.a + pagg_tab_m_1.b) / 2) - Filter: (sum(pagg_tab_m_1.b) < 50) - -> Seq Scan on pagg_tab_m_p2 pagg_tab_m_1 - -> HashAggregate - Group Key: pagg_tab_m_2.a, ((pagg_tab_m_2.a + pagg_tab_m_2.b) / 2) - Filter: (sum(pagg_tab_m_2.b) < 50) - -> Seq Scan on pagg_tab_m_p3 pagg_tab_m_2 -(15 rows) - -SELECT a, sum(b), avg(c), count(*) FROM pagg_tab_m GROUP BY a, (a+b)/2 HAVING sum(b) < 50 ORDER BY 1, 2, 3; - a | sum | avg | count -----+-----+---------------------+------- - 0 | 0 | 20.0000000000000000 | 25 - 1 | 25 | 21.0000000000000000 | 25 - 10 | 0 | 20.0000000000000000 | 25 - 11 | 25 | 21.0000000000000000 | 25 - 20 | 0 | 20.0000000000000000 | 25 - 21 | 25 | 21.0000000000000000 | 25 -(6 rows) - --- Full aggregation as PARTITION KEY is part of GROUP BY clause -EXPLAIN (COSTS OFF) -SELECT a, c, sum(b), avg(c), count(*) FROM pagg_tab_m GROUP BY (a+b)/2, 2, 1 HAVING sum(b) = 50 AND avg(c) > 25 ORDER BY 1, 2, 3; - QUERY PLAN --------------------------------------------------------------------------------------------------- - Sort - Sort Key: pagg_tab_m.a, pagg_tab_m.c, (sum(pagg_tab_m.b)) - -> Append - -> HashAggregate - Group Key: ((pagg_tab_m.a + pagg_tab_m.b) / 2), pagg_tab_m.c, pagg_tab_m.a - Filter: ((sum(pagg_tab_m.b) = 50) AND (avg(pagg_tab_m.c) > '25'::numeric)) - -> Seq Scan on pagg_tab_m_p1 pagg_tab_m - -> HashAggregate - Group Key: ((pagg_tab_m_1.a + pagg_tab_m_1.b) / 2), pagg_tab_m_1.c, pagg_tab_m_1.a - Filter: ((sum(pagg_tab_m_1.b) = 50) AND (avg(pagg_tab_m_1.c) > '25'::numeric)) - -> Seq Scan on pagg_tab_m_p2 pagg_tab_m_1 - -> HashAggregate - Group Key: ((pagg_tab_m_2.a + pagg_tab_m_2.b) / 2), pagg_tab_m_2.c, pagg_tab_m_2.a - Filter: ((sum(pagg_tab_m_2.b) = 50) AND (avg(pagg_tab_m_2.c) > '25'::numeric)) - -> Seq Scan on pagg_tab_m_p3 pagg_tab_m_2 -(15 rows) - -SELECT a, c, sum(b), avg(c), count(*) FROM pagg_tab_m GROUP BY (a+b)/2, 2, 1 HAVING sum(b) = 50 AND avg(c) > 25 ORDER BY 1, 2, 3; - a | c | sum | avg | count -----+----+-----+---------------------+------- - 0 | 30 | 50 | 30.0000000000000000 | 5 - 0 | 40 | 50 | 40.0000000000000000 | 5 - 10 | 30 | 50 | 30.0000000000000000 | 5 - 10 | 40 | 50 | 40.0000000000000000 | 5 - 20 | 30 | 50 | 30.0000000000000000 | 5 - 20 | 40 | 50 | 40.0000000000000000 | 5 -(6 rows) - --- Test with multi-level partitioning scheme -CREATE TABLE pagg_tab_ml (a int, b int, c text) PARTITION BY RANGE(a); -CREATE TABLE pagg_tab_ml_p1 PARTITION OF pagg_tab_ml FOR VALUES FROM (0) TO (12); -CREATE TABLE pagg_tab_ml_p2 PARTITION OF pagg_tab_ml FOR VALUES FROM (12) TO (20) PARTITION BY LIST (c); -CREATE TABLE pagg_tab_ml_p2_s1 PARTITION OF pagg_tab_ml_p2 FOR VALUES IN ('0000', '0001', '0002'); -CREATE TABLE pagg_tab_ml_p2_s2 PARTITION OF pagg_tab_ml_p2 FOR VALUES IN ('0003'); --- This level of partitioning has different column positions than the parent -CREATE TABLE pagg_tab_ml_p3(b int, c text, a int) PARTITION BY RANGE (b); -CREATE TABLE pagg_tab_ml_p3_s1(c text, a int, b int); -CREATE TABLE pagg_tab_ml_p3_s2 PARTITION OF pagg_tab_ml_p3 FOR VALUES FROM (7) TO (10); -ALTER TABLE pagg_tab_ml_p3 ATTACH PARTITION pagg_tab_ml_p3_s1 FOR VALUES FROM (0) TO (7); -ALTER TABLE pagg_tab_ml ATTACH PARTITION pagg_tab_ml_p3 FOR VALUES FROM (20) TO (30); -INSERT INTO pagg_tab_ml SELECT i % 30, i % 10, to_char(i % 4, 'FM0000') FROM generate_series(0, 29999) i; -ANALYZE pagg_tab_ml; --- For Parallel Append -SET max_parallel_workers_per_gather TO 2; --- Full aggregation at level 1 as GROUP BY clause matches with PARTITION KEY --- for level 1 only. For subpartitions, GROUP BY clause does not match with --- PARTITION KEY, but still we do not see a partial aggregation as array_agg() --- is not partial agg safe. -EXPLAIN (COSTS OFF) -SELECT a, sum(b), array_agg(distinct c), count(*) FROM pagg_tab_ml GROUP BY a HAVING avg(b) < 3 ORDER BY 1, 2, 3; - QUERY PLAN --------------------------------------------------------------------------------------- - Sort - Sort Key: pagg_tab_ml.a, (sum(pagg_tab_ml.b)), (array_agg(DISTINCT pagg_tab_ml.c)) - -> Gather - Workers Planned: 2 - -> Parallel Append - -> GroupAggregate - Group Key: pagg_tab_ml.a - Filter: (avg(pagg_tab_ml.b) < '3'::numeric) - -> Sort - Sort Key: pagg_tab_ml.a - -> Seq Scan on pagg_tab_ml_p1 pagg_tab_ml - -> GroupAggregate - Group Key: pagg_tab_ml_5.a - Filter: (avg(pagg_tab_ml_5.b) < '3'::numeric) - -> Sort - Sort Key: pagg_tab_ml_5.a - -> Append - -> Seq Scan on pagg_tab_ml_p3_s1 pagg_tab_ml_5 - -> Seq Scan on pagg_tab_ml_p3_s2 pagg_tab_ml_6 - -> GroupAggregate - Group Key: pagg_tab_ml_2.a - Filter: (avg(pagg_tab_ml_2.b) < '3'::numeric) - -> Sort - Sort Key: pagg_tab_ml_2.a - -> Append - -> Seq Scan on pagg_tab_ml_p2_s1 pagg_tab_ml_2 - -> Seq Scan on pagg_tab_ml_p2_s2 pagg_tab_ml_3 -(27 rows) - -SELECT a, sum(b), array_agg(distinct c), count(*) FROM pagg_tab_ml GROUP BY a HAVING avg(b) < 3 ORDER BY 1, 2, 3; - a | sum | array_agg | count -----+------+-------------+------- - 0 | 0 | {0000,0002} | 1000 - 1 | 1000 | {0001,0003} | 1000 - 2 | 2000 | {0000,0002} | 1000 - 10 | 0 | {0000,0002} | 1000 - 11 | 1000 | {0001,0003} | 1000 - 12 | 2000 | {0000,0002} | 1000 - 20 | 0 | {0000,0002} | 1000 - 21 | 1000 | {0001,0003} | 1000 - 22 | 2000 | {0000,0002} | 1000 -(9 rows) - --- Without ORDER BY clause, to test Gather at top-most path -EXPLAIN (COSTS OFF) -SELECT a, sum(b), array_agg(distinct c), count(*) FROM pagg_tab_ml GROUP BY a HAVING avg(b) < 3; - QUERY PLAN ---------------------------------------------------------------------------- - Gather - Workers Planned: 2 - -> Parallel Append - -> GroupAggregate - Group Key: pagg_tab_ml.a - Filter: (avg(pagg_tab_ml.b) < '3'::numeric) - -> Sort - Sort Key: pagg_tab_ml.a - -> Seq Scan on pagg_tab_ml_p1 pagg_tab_ml - -> GroupAggregate - Group Key: pagg_tab_ml_5.a - Filter: (avg(pagg_tab_ml_5.b) < '3'::numeric) - -> Sort - Sort Key: pagg_tab_ml_5.a - -> Append - -> Seq Scan on pagg_tab_ml_p3_s1 pagg_tab_ml_5 - -> Seq Scan on pagg_tab_ml_p3_s2 pagg_tab_ml_6 - -> GroupAggregate - Group Key: pagg_tab_ml_2.a - Filter: (avg(pagg_tab_ml_2.b) < '3'::numeric) - -> Sort - Sort Key: pagg_tab_ml_2.a - -> Append - -> Seq Scan on pagg_tab_ml_p2_s1 pagg_tab_ml_2 - -> Seq Scan on pagg_tab_ml_p2_s2 pagg_tab_ml_3 -(25 rows) - --- Full aggregation at level 1 as GROUP BY clause matches with PARTITION KEY --- for level 1 only. For subpartitions, GROUP BY clause does not match with --- PARTITION KEY, thus we will have a partial aggregation for them. -EXPLAIN (COSTS OFF) -SELECT a, sum(b), count(*) FROM pagg_tab_ml GROUP BY a HAVING avg(b) < 3 ORDER BY 1, 2, 3; - QUERY PLAN ---------------------------------------------------------------------------------- - Sort - Sort Key: pagg_tab_ml.a, (sum(pagg_tab_ml.b)), (count(*)) - -> Append - -> HashAggregate - Group Key: pagg_tab_ml.a - Filter: (avg(pagg_tab_ml.b) < '3'::numeric) - -> Seq Scan on pagg_tab_ml_p1 pagg_tab_ml - -> Finalize GroupAggregate - Group Key: pagg_tab_ml_2.a - Filter: (avg(pagg_tab_ml_2.b) < '3'::numeric) - -> Sort - Sort Key: pagg_tab_ml_2.a - -> Append - -> Partial HashAggregate - Group Key: pagg_tab_ml_2.a - -> Seq Scan on pagg_tab_ml_p2_s1 pagg_tab_ml_2 - -> Partial HashAggregate - Group Key: pagg_tab_ml_3.a - -> Seq Scan on pagg_tab_ml_p2_s2 pagg_tab_ml_3 - -> Finalize GroupAggregate - Group Key: pagg_tab_ml_5.a - Filter: (avg(pagg_tab_ml_5.b) < '3'::numeric) - -> Sort - Sort Key: pagg_tab_ml_5.a - -> Append - -> Partial HashAggregate - Group Key: pagg_tab_ml_5.a - -> Seq Scan on pagg_tab_ml_p3_s1 pagg_tab_ml_5 - -> Partial HashAggregate - Group Key: pagg_tab_ml_6.a - -> Seq Scan on pagg_tab_ml_p3_s2 pagg_tab_ml_6 -(31 rows) - -SELECT a, sum(b), count(*) FROM pagg_tab_ml GROUP BY a HAVING avg(b) < 3 ORDER BY 1, 2, 3; - a | sum | count -----+------+------- - 0 | 0 | 1000 - 1 | 1000 | 1000 - 2 | 2000 | 1000 - 10 | 0 | 1000 - 11 | 1000 | 1000 - 12 | 2000 | 1000 - 20 | 0 | 1000 - 21 | 1000 | 1000 - 22 | 2000 | 1000 -(9 rows) - --- Partial aggregation at all levels as GROUP BY clause does not match with --- PARTITION KEY -EXPLAIN (COSTS OFF) -SELECT b, sum(a), count(*) FROM pagg_tab_ml GROUP BY b ORDER BY 1, 2, 3; - QUERY PLAN ---------------------------------------------------------------------------- - Sort - Sort Key: pagg_tab_ml.b, (sum(pagg_tab_ml.a)), (count(*)) - -> Finalize GroupAggregate - Group Key: pagg_tab_ml.b - -> Sort - Sort Key: pagg_tab_ml.b - -> Append - -> Partial HashAggregate - Group Key: pagg_tab_ml.b - -> Seq Scan on pagg_tab_ml_p1 pagg_tab_ml - -> Partial HashAggregate - Group Key: pagg_tab_ml_1.b - -> Seq Scan on pagg_tab_ml_p2_s1 pagg_tab_ml_1 - -> Partial HashAggregate - Group Key: pagg_tab_ml_2.b - -> Seq Scan on pagg_tab_ml_p2_s2 pagg_tab_ml_2 - -> Partial HashAggregate - Group Key: pagg_tab_ml_3.b - -> Seq Scan on pagg_tab_ml_p3_s1 pagg_tab_ml_3 - -> Partial HashAggregate - Group Key: pagg_tab_ml_4.b - -> Seq Scan on pagg_tab_ml_p3_s2 pagg_tab_ml_4 -(22 rows) - -SELECT b, sum(a), count(*) FROM pagg_tab_ml GROUP BY b HAVING avg(a) < 15 ORDER BY 1, 2, 3; - b | sum | count ----+-------+------- - 0 | 30000 | 3000 - 1 | 33000 | 3000 - 2 | 36000 | 3000 - 3 | 39000 | 3000 - 4 | 42000 | 3000 -(5 rows) - --- Full aggregation at all levels as GROUP BY clause matches with PARTITION KEY -EXPLAIN (COSTS OFF) -SELECT a, sum(b), count(*) FROM pagg_tab_ml GROUP BY a, b, c HAVING avg(b) > 7 ORDER BY 1, 2, 3; - QUERY PLAN ----------------------------------------------------------------------------- - Sort - Sort Key: pagg_tab_ml.a, (sum(pagg_tab_ml.b)), (count(*)) - -> Append - -> HashAggregate - Group Key: pagg_tab_ml.a, pagg_tab_ml.b, pagg_tab_ml.c - Filter: (avg(pagg_tab_ml.b) > '7'::numeric) - -> Seq Scan on pagg_tab_ml_p1 pagg_tab_ml - -> HashAggregate - Group Key: pagg_tab_ml_1.a, pagg_tab_ml_1.b, pagg_tab_ml_1.c - Filter: (avg(pagg_tab_ml_1.b) > '7'::numeric) - -> Seq Scan on pagg_tab_ml_p2_s1 pagg_tab_ml_1 - -> HashAggregate - Group Key: pagg_tab_ml_2.a, pagg_tab_ml_2.b, pagg_tab_ml_2.c - Filter: (avg(pagg_tab_ml_2.b) > '7'::numeric) - -> Seq Scan on pagg_tab_ml_p2_s2 pagg_tab_ml_2 - -> HashAggregate - Group Key: pagg_tab_ml_3.a, pagg_tab_ml_3.b, pagg_tab_ml_3.c - Filter: (avg(pagg_tab_ml_3.b) > '7'::numeric) - -> Seq Scan on pagg_tab_ml_p3_s1 pagg_tab_ml_3 - -> HashAggregate - Group Key: pagg_tab_ml_4.a, pagg_tab_ml_4.b, pagg_tab_ml_4.c - Filter: (avg(pagg_tab_ml_4.b) > '7'::numeric) - -> Seq Scan on pagg_tab_ml_p3_s2 pagg_tab_ml_4 -(23 rows) - -SELECT a, sum(b), count(*) FROM pagg_tab_ml GROUP BY a, b, c HAVING avg(b) > 7 ORDER BY 1, 2, 3; - a | sum | count -----+------+------- - 8 | 4000 | 500 - 8 | 4000 | 500 - 9 | 4500 | 500 - 9 | 4500 | 500 - 18 | 4000 | 500 - 18 | 4000 | 500 - 19 | 4500 | 500 - 19 | 4500 | 500 - 28 | 4000 | 500 - 28 | 4000 | 500 - 29 | 4500 | 500 - 29 | 4500 | 500 -(12 rows) - --- Parallelism within partitionwise aggregates -SET min_parallel_table_scan_size TO '8kB'; -SET parallel_setup_cost TO 0; --- Full aggregation at level 1 as GROUP BY clause matches with PARTITION KEY --- for level 1 only. For subpartitions, GROUP BY clause does not match with --- PARTITION KEY, thus we will have a partial aggregation for them. -EXPLAIN (COSTS OFF) -SELECT a, sum(b), count(*) FROM pagg_tab_ml GROUP BY a HAVING avg(b) < 3 ORDER BY 1, 2, 3; - QUERY PLAN ------------------------------------------------------------------------------------------------- - Sort - Sort Key: pagg_tab_ml.a, (sum(pagg_tab_ml.b)), (count(*)) - -> Append - -> Finalize GroupAggregate - Group Key: pagg_tab_ml.a - Filter: (avg(pagg_tab_ml.b) < '3'::numeric) - -> Gather Merge - Workers Planned: 2 - -> Sort - Sort Key: pagg_tab_ml.a - -> Partial HashAggregate - Group Key: pagg_tab_ml.a - -> Parallel Seq Scan on pagg_tab_ml_p1 pagg_tab_ml - -> Finalize GroupAggregate - Group Key: pagg_tab_ml_2.a - Filter: (avg(pagg_tab_ml_2.b) < '3'::numeric) - -> Gather Merge - Workers Planned: 2 - -> Sort - Sort Key: pagg_tab_ml_2.a - -> Parallel Append - -> Partial HashAggregate - Group Key: pagg_tab_ml_2.a - -> Parallel Seq Scan on pagg_tab_ml_p2_s1 pagg_tab_ml_2 - -> Partial HashAggregate - Group Key: pagg_tab_ml_3.a - -> Parallel Seq Scan on pagg_tab_ml_p2_s2 pagg_tab_ml_3 - -> Finalize GroupAggregate - Group Key: pagg_tab_ml_5.a - Filter: (avg(pagg_tab_ml_5.b) < '3'::numeric) - -> Gather Merge - Workers Planned: 2 - -> Sort - Sort Key: pagg_tab_ml_5.a - -> Parallel Append - -> Partial HashAggregate - Group Key: pagg_tab_ml_5.a - -> Parallel Seq Scan on pagg_tab_ml_p3_s1 pagg_tab_ml_5 - -> Partial HashAggregate - Group Key: pagg_tab_ml_6.a - -> Parallel Seq Scan on pagg_tab_ml_p3_s2 pagg_tab_ml_6 -(41 rows) - -SELECT a, sum(b), count(*) FROM pagg_tab_ml GROUP BY a HAVING avg(b) < 3 ORDER BY 1, 2, 3; - a | sum | count -----+------+------- - 0 | 0 | 1000 - 1 | 1000 | 1000 - 2 | 2000 | 1000 - 10 | 0 | 1000 - 11 | 1000 | 1000 - 12 | 2000 | 1000 - 20 | 0 | 1000 - 21 | 1000 | 1000 - 22 | 2000 | 1000 -(9 rows) - --- Partial aggregation at all levels as GROUP BY clause does not match with --- PARTITION KEY -EXPLAIN (COSTS OFF) -SELECT b, sum(a), count(*) FROM pagg_tab_ml GROUP BY b ORDER BY 1, 2, 3; - QUERY PLAN ------------------------------------------------------------------------------------------- - Sort - Sort Key: pagg_tab_ml.b, (sum(pagg_tab_ml.a)), (count(*)) - -> Finalize GroupAggregate - Group Key: pagg_tab_ml.b - -> Gather Merge - Workers Planned: 2 - -> Sort - Sort Key: pagg_tab_ml.b - -> Parallel Append - -> Partial HashAggregate - Group Key: pagg_tab_ml.b - -> Parallel Seq Scan on pagg_tab_ml_p1 pagg_tab_ml - -> Partial HashAggregate - Group Key: pagg_tab_ml_3.b - -> Parallel Seq Scan on pagg_tab_ml_p3_s1 pagg_tab_ml_3 - -> Partial HashAggregate - Group Key: pagg_tab_ml_1.b - -> Parallel Seq Scan on pagg_tab_ml_p2_s1 pagg_tab_ml_1 - -> Partial HashAggregate - Group Key: pagg_tab_ml_4.b - -> Parallel Seq Scan on pagg_tab_ml_p3_s2 pagg_tab_ml_4 - -> Partial HashAggregate - Group Key: pagg_tab_ml_2.b - -> Parallel Seq Scan on pagg_tab_ml_p2_s2 pagg_tab_ml_2 -(24 rows) - -SELECT b, sum(a), count(*) FROM pagg_tab_ml GROUP BY b HAVING avg(a) < 15 ORDER BY 1, 2, 3; - b | sum | count ----+-------+------- - 0 | 30000 | 3000 - 1 | 33000 | 3000 - 2 | 36000 | 3000 - 3 | 39000 | 3000 - 4 | 42000 | 3000 -(5 rows) - --- Full aggregation at all levels as GROUP BY clause matches with PARTITION KEY -EXPLAIN (COSTS OFF) -SELECT a, sum(b), count(*) FROM pagg_tab_ml GROUP BY a, b, c HAVING avg(b) > 7 ORDER BY 1, 2, 3; - QUERY PLAN ----------------------------------------------------------------------------------- - Gather Merge - Workers Planned: 2 - -> Sort - Sort Key: pagg_tab_ml.a, (sum(pagg_tab_ml.b)), (count(*)) - -> Parallel Append - -> HashAggregate - Group Key: pagg_tab_ml.a, pagg_tab_ml.b, pagg_tab_ml.c - Filter: (avg(pagg_tab_ml.b) > '7'::numeric) - -> Seq Scan on pagg_tab_ml_p1 pagg_tab_ml - -> HashAggregate - Group Key: pagg_tab_ml_3.a, pagg_tab_ml_3.b, pagg_tab_ml_3.c - Filter: (avg(pagg_tab_ml_3.b) > '7'::numeric) - -> Seq Scan on pagg_tab_ml_p3_s1 pagg_tab_ml_3 - -> HashAggregate - Group Key: pagg_tab_ml_1.a, pagg_tab_ml_1.b, pagg_tab_ml_1.c - Filter: (avg(pagg_tab_ml_1.b) > '7'::numeric) - -> Seq Scan on pagg_tab_ml_p2_s1 pagg_tab_ml_1 - -> HashAggregate - Group Key: pagg_tab_ml_4.a, pagg_tab_ml_4.b, pagg_tab_ml_4.c - Filter: (avg(pagg_tab_ml_4.b) > '7'::numeric) - -> Seq Scan on pagg_tab_ml_p3_s2 pagg_tab_ml_4 - -> HashAggregate - Group Key: pagg_tab_ml_2.a, pagg_tab_ml_2.b, pagg_tab_ml_2.c - Filter: (avg(pagg_tab_ml_2.b) > '7'::numeric) - -> Seq Scan on pagg_tab_ml_p2_s2 pagg_tab_ml_2 -(25 rows) - -SELECT a, sum(b), count(*) FROM pagg_tab_ml GROUP BY a, b, c HAVING avg(b) > 7 ORDER BY 1, 2, 3; - a | sum | count -----+------+------- - 8 | 4000 | 500 - 8 | 4000 | 500 - 9 | 4500 | 500 - 9 | 4500 | 500 - 18 | 4000 | 500 - 18 | 4000 | 500 - 19 | 4500 | 500 - 19 | 4500 | 500 - 28 | 4000 | 500 - 28 | 4000 | 500 - 29 | 4500 | 500 - 29 | 4500 | 500 -(12 rows) - --- Parallelism within partitionwise aggregates (single level) --- Add few parallel setup cost, so that we will see a plan which gathers --- partially created paths even for full aggregation and sticks a single Gather --- followed by finalization step. --- Without this, the cost of doing partial aggregation + Gather + finalization --- for each partition and then Append over it turns out to be same and this --- wins as we add it first. This parallel_setup_cost plays a vital role in --- costing such plans. -SET parallel_setup_cost TO 10; -CREATE TABLE pagg_tab_para(x int, y int) PARTITION BY RANGE(x); -CREATE TABLE pagg_tab_para_p1 PARTITION OF pagg_tab_para FOR VALUES FROM (0) TO (12); -CREATE TABLE pagg_tab_para_p2 PARTITION OF pagg_tab_para FOR VALUES FROM (12) TO (22); -CREATE TABLE pagg_tab_para_p3 PARTITION OF pagg_tab_para FOR VALUES FROM (22) TO (30); -INSERT INTO pagg_tab_para SELECT i % 30, i % 20 FROM generate_series(0, 29999) i; -ANALYZE pagg_tab_para; --- When GROUP BY clause matches; full aggregation is performed for each partition. -EXPLAIN (COSTS OFF) -SELECT x, sum(y), avg(y), count(*) FROM pagg_tab_para GROUP BY x HAVING avg(y) < 7 ORDER BY 1, 2, 3; - QUERY PLAN -------------------------------------------------------------------------------------------- - Sort - Sort Key: pagg_tab_para.x, (sum(pagg_tab_para.y)), (avg(pagg_tab_para.y)) - -> Finalize GroupAggregate - Group Key: pagg_tab_para.x - Filter: (avg(pagg_tab_para.y) < '7'::numeric) - -> Gather Merge - Workers Planned: 2 - -> Sort - Sort Key: pagg_tab_para.x - -> Parallel Append - -> Partial HashAggregate - Group Key: pagg_tab_para.x - -> Parallel Seq Scan on pagg_tab_para_p1 pagg_tab_para - -> Partial HashAggregate - Group Key: pagg_tab_para_1.x - -> Parallel Seq Scan on pagg_tab_para_p2 pagg_tab_para_1 - -> Partial HashAggregate - Group Key: pagg_tab_para_2.x - -> Parallel Seq Scan on pagg_tab_para_p3 pagg_tab_para_2 -(19 rows) - -SELECT x, sum(y), avg(y), count(*) FROM pagg_tab_para GROUP BY x HAVING avg(y) < 7 ORDER BY 1, 2, 3; - x | sum | avg | count -----+------+--------------------+------- - 0 | 5000 | 5.0000000000000000 | 1000 - 1 | 6000 | 6.0000000000000000 | 1000 - 10 | 5000 | 5.0000000000000000 | 1000 - 11 | 6000 | 6.0000000000000000 | 1000 - 20 | 5000 | 5.0000000000000000 | 1000 - 21 | 6000 | 6.0000000000000000 | 1000 -(6 rows) - --- When GROUP BY clause does not match; partial aggregation is performed for each partition. -EXPLAIN (COSTS OFF) -SELECT y, sum(x), avg(x), count(*) FROM pagg_tab_para GROUP BY y HAVING avg(x) < 12 ORDER BY 1, 2, 3; - QUERY PLAN -------------------------------------------------------------------------------------------- - Sort - Sort Key: pagg_tab_para.y, (sum(pagg_tab_para.x)), (avg(pagg_tab_para.x)) - -> Finalize GroupAggregate - Group Key: pagg_tab_para.y - Filter: (avg(pagg_tab_para.x) < '12'::numeric) - -> Gather Merge - Workers Planned: 2 - -> Sort - Sort Key: pagg_tab_para.y - -> Parallel Append - -> Partial HashAggregate - Group Key: pagg_tab_para.y - -> Parallel Seq Scan on pagg_tab_para_p1 pagg_tab_para - -> Partial HashAggregate - Group Key: pagg_tab_para_1.y - -> Parallel Seq Scan on pagg_tab_para_p2 pagg_tab_para_1 - -> Partial HashAggregate - Group Key: pagg_tab_para_2.y - -> Parallel Seq Scan on pagg_tab_para_p3 pagg_tab_para_2 -(19 rows) - -SELECT y, sum(x), avg(x), count(*) FROM pagg_tab_para GROUP BY y HAVING avg(x) < 12 ORDER BY 1, 2, 3; - y | sum | avg | count -----+-------+---------------------+------- - 0 | 15000 | 10.0000000000000000 | 1500 - 1 | 16500 | 11.0000000000000000 | 1500 - 10 | 15000 | 10.0000000000000000 | 1500 - 11 | 16500 | 11.0000000000000000 | 1500 -(4 rows) - --- Test when parent can produce parallel paths but not any (or some) of its children --- (Use one more aggregate to tilt the cost estimates for the plan we want) -ALTER TABLE pagg_tab_para_p1 SET (parallel_workers = 0); -ALTER TABLE pagg_tab_para_p3 SET (parallel_workers = 0); -ANALYZE pagg_tab_para; -EXPLAIN (COSTS OFF) -SELECT x, sum(y), avg(y), sum(x+y), count(*) FROM pagg_tab_para GROUP BY x HAVING avg(y) < 7 ORDER BY 1, 2, 3; - QUERY PLAN -------------------------------------------------------------------------------------------- - Sort - Sort Key: pagg_tab_para.x, (sum(pagg_tab_para.y)), (avg(pagg_tab_para.y)) - -> Finalize GroupAggregate - Group Key: pagg_tab_para.x - Filter: (avg(pagg_tab_para.y) < '7'::numeric) - -> Gather Merge - Workers Planned: 2 - -> Sort - Sort Key: pagg_tab_para.x - -> Partial HashAggregate - Group Key: pagg_tab_para.x - -> Parallel Append - -> Seq Scan on pagg_tab_para_p1 pagg_tab_para_1 - -> Seq Scan on pagg_tab_para_p3 pagg_tab_para_3 - -> Parallel Seq Scan on pagg_tab_para_p2 pagg_tab_para_2 -(15 rows) - -SELECT x, sum(y), avg(y), sum(x+y), count(*) FROM pagg_tab_para GROUP BY x HAVING avg(y) < 7 ORDER BY 1, 2, 3; - x | sum | avg | sum | count -----+------+--------------------+-------+------- - 0 | 5000 | 5.0000000000000000 | 5000 | 1000 - 1 | 6000 | 6.0000000000000000 | 7000 | 1000 - 10 | 5000 | 5.0000000000000000 | 15000 | 1000 - 11 | 6000 | 6.0000000000000000 | 17000 | 1000 - 20 | 5000 | 5.0000000000000000 | 25000 | 1000 - 21 | 6000 | 6.0000000000000000 | 27000 | 1000 -(6 rows) - -ALTER TABLE pagg_tab_para_p2 SET (parallel_workers = 0); -ANALYZE pagg_tab_para; -EXPLAIN (COSTS OFF) -SELECT x, sum(y), avg(y), sum(x+y), count(*) FROM pagg_tab_para GROUP BY x HAVING avg(y) < 7 ORDER BY 1, 2, 3; - QUERY PLAN ----------------------------------------------------------------------------------- - Sort - Sort Key: pagg_tab_para.x, (sum(pagg_tab_para.y)), (avg(pagg_tab_para.y)) - -> Finalize GroupAggregate - Group Key: pagg_tab_para.x - Filter: (avg(pagg_tab_para.y) < '7'::numeric) - -> Gather Merge - Workers Planned: 2 - -> Sort - Sort Key: pagg_tab_para.x - -> Partial HashAggregate - Group Key: pagg_tab_para.x - -> Parallel Append - -> Seq Scan on pagg_tab_para_p1 pagg_tab_para_1 - -> Seq Scan on pagg_tab_para_p2 pagg_tab_para_2 - -> Seq Scan on pagg_tab_para_p3 pagg_tab_para_3 -(15 rows) - -SELECT x, sum(y), avg(y), sum(x+y), count(*) FROM pagg_tab_para GROUP BY x HAVING avg(y) < 7 ORDER BY 1, 2, 3; - x | sum | avg | sum | count -----+------+--------------------+-------+------- - 0 | 5000 | 5.0000000000000000 | 5000 | 1000 - 1 | 6000 | 6.0000000000000000 | 7000 | 1000 - 10 | 5000 | 5.0000000000000000 | 15000 | 1000 - 11 | 6000 | 6.0000000000000000 | 17000 | 1000 - 20 | 5000 | 5.0000000000000000 | 25000 | 1000 - 21 | 6000 | 6.0000000000000000 | 27000 | 1000 -(6 rows) - --- Reset parallelism parameters to get partitionwise aggregation plan. -RESET min_parallel_table_scan_size; -RESET parallel_setup_cost; -EXPLAIN (COSTS OFF) -SELECT x, sum(y), avg(y), count(*) FROM pagg_tab_para GROUP BY x HAVING avg(y) < 7 ORDER BY 1, 2, 3; - QUERY PLAN ------------------------------------------------------------------------------ - Sort - Sort Key: pagg_tab_para.x, (sum(pagg_tab_para.y)), (avg(pagg_tab_para.y)) - -> Append - -> HashAggregate - Group Key: pagg_tab_para.x - Filter: (avg(pagg_tab_para.y) < '7'::numeric) - -> Seq Scan on pagg_tab_para_p1 pagg_tab_para - -> HashAggregate - Group Key: pagg_tab_para_1.x - Filter: (avg(pagg_tab_para_1.y) < '7'::numeric) - -> Seq Scan on pagg_tab_para_p2 pagg_tab_para_1 - -> HashAggregate - Group Key: pagg_tab_para_2.x - Filter: (avg(pagg_tab_para_2.y) < '7'::numeric) - -> Seq Scan on pagg_tab_para_p3 pagg_tab_para_2 -(15 rows) - -SELECT x, sum(y), avg(y), count(*) FROM pagg_tab_para GROUP BY x HAVING avg(y) < 7 ORDER BY 1, 2, 3; - x | sum | avg | count -----+------+--------------------+------- - 0 | 5000 | 5.0000000000000000 | 1000 - 1 | 6000 | 6.0000000000000000 | 1000 - 10 | 5000 | 5.0000000000000000 | 1000 - 11 | 6000 | 6.0000000000000000 | 1000 - 20 | 5000 | 5.0000000000000000 | 1000 - 21 | 6000 | 6.0000000000000000 | 1000 -(6 rows) - +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/partition_info.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/partition_info.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/partition_info.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/partition_info.out 2023-02-20 19:49:12.769219901 -0500 @@ -1,351 +1 @@ --- --- Tests for functions providing information about partitions --- -SELECT * FROM pg_partition_tree(NULL); - relid | parentrelid | isleaf | level --------+-------------+--------+------- -(0 rows) - -SELECT * FROM pg_partition_tree(0); - relid | parentrelid | isleaf | level --------+-------------+--------+------- -(0 rows) - -SELECT * FROM pg_partition_ancestors(NULL); - relid -------- -(0 rows) - -SELECT * FROM pg_partition_ancestors(0); - relid -------- -(0 rows) - -SELECT pg_partition_root(NULL); - pg_partition_root -------------------- - -(1 row) - -SELECT pg_partition_root(0); - pg_partition_root -------------------- - -(1 row) - --- Test table partition trees -CREATE TABLE ptif_test (a int, b int) PARTITION BY range (a); -CREATE TABLE ptif_test0 PARTITION OF ptif_test - FOR VALUES FROM (minvalue) TO (0) PARTITION BY list (b); -CREATE TABLE ptif_test01 PARTITION OF ptif_test0 FOR VALUES IN (1); -CREATE TABLE ptif_test1 PARTITION OF ptif_test - FOR VALUES FROM (0) TO (100) PARTITION BY list (b); -CREATE TABLE ptif_test11 PARTITION OF ptif_test1 FOR VALUES IN (1); -CREATE TABLE ptif_test2 PARTITION OF ptif_test - FOR VALUES FROM (100) TO (200); --- This partitioned table should remain with no partitions. -CREATE TABLE ptif_test3 PARTITION OF ptif_test - FOR VALUES FROM (200) TO (maxvalue) PARTITION BY list (b); --- Test pg_partition_root for tables -SELECT pg_partition_root('ptif_test'); - pg_partition_root -------------------- - ptif_test -(1 row) - -SELECT pg_partition_root('ptif_test0'); - pg_partition_root -------------------- - ptif_test -(1 row) - -SELECT pg_partition_root('ptif_test01'); - pg_partition_root -------------------- - ptif_test -(1 row) - -SELECT pg_partition_root('ptif_test3'); - pg_partition_root -------------------- - ptif_test -(1 row) - --- Test index partition tree -CREATE INDEX ptif_test_index ON ONLY ptif_test (a); -CREATE INDEX ptif_test0_index ON ONLY ptif_test0 (a); -ALTER INDEX ptif_test_index ATTACH PARTITION ptif_test0_index; -CREATE INDEX ptif_test01_index ON ptif_test01 (a); -ALTER INDEX ptif_test0_index ATTACH PARTITION ptif_test01_index; -CREATE INDEX ptif_test1_index ON ONLY ptif_test1 (a); -ALTER INDEX ptif_test_index ATTACH PARTITION ptif_test1_index; -CREATE INDEX ptif_test11_index ON ptif_test11 (a); -ALTER INDEX ptif_test1_index ATTACH PARTITION ptif_test11_index; -CREATE INDEX ptif_test2_index ON ptif_test2 (a); -ALTER INDEX ptif_test_index ATTACH PARTITION ptif_test2_index; -CREATE INDEX ptif_test3_index ON ptif_test3 (a); -ALTER INDEX ptif_test_index ATTACH PARTITION ptif_test3_index; --- Test pg_partition_root for indexes -SELECT pg_partition_root('ptif_test_index'); - pg_partition_root -------------------- - ptif_test_index -(1 row) - -SELECT pg_partition_root('ptif_test0_index'); - pg_partition_root -------------------- - ptif_test_index -(1 row) - -SELECT pg_partition_root('ptif_test01_index'); - pg_partition_root -------------------- - ptif_test_index -(1 row) - -SELECT pg_partition_root('ptif_test3_index'); - pg_partition_root -------------------- - ptif_test_index -(1 row) - --- List all tables members of the tree -SELECT relid, parentrelid, level, isleaf - FROM pg_partition_tree('ptif_test'); - relid | parentrelid | level | isleaf --------------+-------------+-------+-------- - ptif_test | | 0 | f - ptif_test0 | ptif_test | 1 | f - ptif_test1 | ptif_test | 1 | f - ptif_test2 | ptif_test | 1 | t - ptif_test3 | ptif_test | 1 | f - ptif_test01 | ptif_test0 | 2 | t - ptif_test11 | ptif_test1 | 2 | t -(7 rows) - --- List tables from an intermediate level -SELECT relid, parentrelid, level, isleaf - FROM pg_partition_tree('ptif_test0') p - JOIN pg_class c ON (p.relid = c.oid); - relid | parentrelid | level | isleaf --------------+-------------+-------+-------- - ptif_test0 | ptif_test | 0 | f - ptif_test01 | ptif_test0 | 1 | t -(2 rows) - --- List from leaf table -SELECT relid, parentrelid, level, isleaf - FROM pg_partition_tree('ptif_test01') p - JOIN pg_class c ON (p.relid = c.oid); - relid | parentrelid | level | isleaf --------------+-------------+-------+-------- - ptif_test01 | ptif_test0 | 0 | t -(1 row) - --- List from partitioned table with no partitions -SELECT relid, parentrelid, level, isleaf - FROM pg_partition_tree('ptif_test3') p - JOIN pg_class c ON (p.relid = c.oid); - relid | parentrelid | level | isleaf -------------+-------------+-------+-------- - ptif_test3 | ptif_test | 0 | f -(1 row) - --- List all ancestors of root and leaf tables -SELECT * FROM pg_partition_ancestors('ptif_test01'); - relid -------------- - ptif_test01 - ptif_test0 - ptif_test -(3 rows) - -SELECT * FROM pg_partition_ancestors('ptif_test'); - relid ------------ - ptif_test -(1 row) - --- List all members using pg_partition_root with leaf table reference -SELECT relid, parentrelid, level, isleaf - FROM pg_partition_tree(pg_partition_root('ptif_test01')) p - JOIN pg_class c ON (p.relid = c.oid); - relid | parentrelid | level | isleaf --------------+-------------+-------+-------- - ptif_test | | 0 | f - ptif_test0 | ptif_test | 1 | f - ptif_test1 | ptif_test | 1 | f - ptif_test2 | ptif_test | 1 | t - ptif_test3 | ptif_test | 1 | f - ptif_test01 | ptif_test0 | 2 | t - ptif_test11 | ptif_test1 | 2 | t -(7 rows) - --- List all indexes members of the tree -SELECT relid, parentrelid, level, isleaf - FROM pg_partition_tree('ptif_test_index'); - relid | parentrelid | level | isleaf --------------------+------------------+-------+-------- - ptif_test_index | | 0 | f - ptif_test0_index | ptif_test_index | 1 | f - ptif_test1_index | ptif_test_index | 1 | f - ptif_test2_index | ptif_test_index | 1 | t - ptif_test3_index | ptif_test_index | 1 | f - ptif_test01_index | ptif_test0_index | 2 | t - ptif_test11_index | ptif_test1_index | 2 | t -(7 rows) - --- List indexes from an intermediate level -SELECT relid, parentrelid, level, isleaf - FROM pg_partition_tree('ptif_test0_index') p - JOIN pg_class c ON (p.relid = c.oid); - relid | parentrelid | level | isleaf --------------------+------------------+-------+-------- - ptif_test0_index | ptif_test_index | 0 | f - ptif_test01_index | ptif_test0_index | 1 | t -(2 rows) - --- List from leaf index -SELECT relid, parentrelid, level, isleaf - FROM pg_partition_tree('ptif_test01_index') p - JOIN pg_class c ON (p.relid = c.oid); - relid | parentrelid | level | isleaf --------------------+------------------+-------+-------- - ptif_test01_index | ptif_test0_index | 0 | t -(1 row) - --- List from partitioned index with no partitions -SELECT relid, parentrelid, level, isleaf - FROM pg_partition_tree('ptif_test3_index') p - JOIN pg_class c ON (p.relid = c.oid); - relid | parentrelid | level | isleaf -------------------+-----------------+-------+-------- - ptif_test3_index | ptif_test_index | 0 | f -(1 row) - --- List all members using pg_partition_root with leaf index reference -SELECT relid, parentrelid, level, isleaf - FROM pg_partition_tree(pg_partition_root('ptif_test01_index')) p - JOIN pg_class c ON (p.relid = c.oid); - relid | parentrelid | level | isleaf --------------------+------------------+-------+-------- - ptif_test_index | | 0 | f - ptif_test0_index | ptif_test_index | 1 | f - ptif_test1_index | ptif_test_index | 1 | f - ptif_test2_index | ptif_test_index | 1 | t - ptif_test3_index | ptif_test_index | 1 | f - ptif_test01_index | ptif_test0_index | 2 | t - ptif_test11_index | ptif_test1_index | 2 | t -(7 rows) - --- List all ancestors of root and leaf indexes -SELECT * FROM pg_partition_ancestors('ptif_test01_index'); - relid -------------------- - ptif_test01_index - ptif_test0_index - ptif_test_index -(3 rows) - -SELECT * FROM pg_partition_ancestors('ptif_test_index'); - relid ------------------ - ptif_test_index -(1 row) - -DROP TABLE ptif_test; --- Table that is not part of any partition tree is not listed. -CREATE TABLE ptif_normal_table(a int); -SELECT relid, parentrelid, level, isleaf - FROM pg_partition_tree('ptif_normal_table'); - relid | parentrelid | level | isleaf --------+-------------+-------+-------- -(0 rows) - -SELECT * FROM pg_partition_ancestors('ptif_normal_table'); - relid -------- -(0 rows) - -SELECT pg_partition_root('ptif_normal_table'); - pg_partition_root -------------------- - -(1 row) - -DROP TABLE ptif_normal_table; --- Various partitioning-related functions return empty/NULL if passed relations --- of types that cannot be part of a partition tree; for example, views, --- materialized views, legacy inheritance children or parents, etc. -CREATE VIEW ptif_test_view AS SELECT 1; -CREATE MATERIALIZED VIEW ptif_test_matview AS SELECT 1; -CREATE TABLE ptif_li_parent (); -CREATE TABLE ptif_li_child () INHERITS (ptif_li_parent); -SELECT * FROM pg_partition_tree('ptif_test_view'); - relid | parentrelid | isleaf | level --------+-------------+--------+------- -(0 rows) - -SELECT * FROM pg_partition_tree('ptif_test_matview'); - relid | parentrelid | isleaf | level --------+-------------+--------+------- -(0 rows) - -SELECT * FROM pg_partition_tree('ptif_li_parent'); - relid | parentrelid | isleaf | level --------+-------------+--------+------- -(0 rows) - -SELECT * FROM pg_partition_tree('ptif_li_child'); - relid | parentrelid | isleaf | level --------+-------------+--------+------- -(0 rows) - -SELECT * FROM pg_partition_ancestors('ptif_test_view'); - relid -------- -(0 rows) - -SELECT * FROM pg_partition_ancestors('ptif_test_matview'); - relid -------- -(0 rows) - -SELECT * FROM pg_partition_ancestors('ptif_li_parent'); - relid -------- -(0 rows) - -SELECT * FROM pg_partition_ancestors('ptif_li_child'); - relid -------- -(0 rows) - -SELECT pg_partition_root('ptif_test_view'); - pg_partition_root -------------------- - -(1 row) - -SELECT pg_partition_root('ptif_test_matview'); - pg_partition_root -------------------- - -(1 row) - -SELECT pg_partition_root('ptif_li_parent'); - pg_partition_root -------------------- - -(1 row) - -SELECT pg_partition_root('ptif_li_child'); - pg_partition_root -------------------- - -(1 row) - -DROP VIEW ptif_test_view; -DROP MATERIALIZED VIEW ptif_test_matview; -DROP TABLE ptif_li_parent, ptif_li_child; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/tuplesort.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/tuplesort.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/tuplesort.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/tuplesort.out 2023-02-20 19:49:12.769219901 -0500 @@ -1,686 +1 @@ --- only use parallelism when explicitly intending to do so -SET max_parallel_maintenance_workers = 0; -SET max_parallel_workers = 0; --- A table with contents that, when sorted, triggers abbreviated --- key aborts. One easy way to achieve that is to use uuids that all --- have the same prefix, as abbreviated keys for uuids just use the --- first sizeof(Datum) bytes. -CREATE TEMP TABLE abbrev_abort_uuids ( - id serial not null, - abort_increasing uuid, - abort_decreasing uuid, - noabort_increasing uuid, - noabort_decreasing uuid); -INSERT INTO abbrev_abort_uuids (abort_increasing, abort_decreasing, noabort_increasing, noabort_decreasing) - SELECT - ('00000000-0000-0000-0000-'||to_char(g.i, '000000000000FM'))::uuid abort_increasing, - ('00000000-0000-0000-0000-'||to_char(20000 - g.i, '000000000000FM'))::uuid abort_decreasing, - (to_char(g.i % 10009, '00000000FM')||'-0000-0000-0000-'||to_char(g.i, '000000000000FM'))::uuid noabort_increasing, - (to_char(((20000 - g.i) % 10009), '00000000FM')||'-0000-0000-0000-'||to_char(20000 - g.i, '000000000000FM'))::uuid noabort_decreasing - FROM generate_series(0, 20000, 1) g(i); --- and a few NULLs -INSERT INTO abbrev_abort_uuids(id) VALUES(0); -INSERT INTO abbrev_abort_uuids DEFAULT VALUES; -INSERT INTO abbrev_abort_uuids DEFAULT VALUES; --- add just a few duplicates -INSERT INTO abbrev_abort_uuids (abort_increasing, abort_decreasing, noabort_increasing, noabort_decreasing) - SELECT abort_increasing, abort_decreasing, noabort_increasing, noabort_decreasing - FROM abbrev_abort_uuids - WHERE (id < 10 OR id > 19990) AND id % 3 = 0 AND abort_increasing is not null; ----- --- Check sort node uses of tuplesort wrt. abbreviated keys ----- --- plain sort triggering abbreviated abort -SELECT abort_increasing, abort_decreasing FROM abbrev_abort_uuids ORDER BY abort_increasing OFFSET 20000 - 4; - abort_increasing | abort_decreasing ---------------------------------------+-------------------------------------- - 00000000-0000-0000-0000-000000019992 | 00000000-0000-0000-0000-000000000008 - 00000000-0000-0000-0000-000000019993 | 00000000-0000-0000-0000-000000000007 - 00000000-0000-0000-0000-000000019994 | 00000000-0000-0000-0000-000000000006 - 00000000-0000-0000-0000-000000019994 | 00000000-0000-0000-0000-000000000006 - 00000000-0000-0000-0000-000000019995 | 00000000-0000-0000-0000-000000000005 - 00000000-0000-0000-0000-000000019996 | 00000000-0000-0000-0000-000000000004 - 00000000-0000-0000-0000-000000019997 | 00000000-0000-0000-0000-000000000003 - 00000000-0000-0000-0000-000000019997 | 00000000-0000-0000-0000-000000000003 - 00000000-0000-0000-0000-000000019998 | 00000000-0000-0000-0000-000000000002 - 00000000-0000-0000-0000-000000019999 | 00000000-0000-0000-0000-000000000001 - 00000000-0000-0000-0000-000000020000 | 00000000-0000-0000-0000-000000000000 - 00000000-0000-0000-0000-000000020000 | 00000000-0000-0000-0000-000000000000 - | - | - | -(15 rows) - -SELECT abort_increasing, abort_decreasing FROM abbrev_abort_uuids ORDER BY abort_decreasing NULLS FIRST OFFSET 20000 - 4; - abort_increasing | abort_decreasing ---------------------------------------+-------------------------------------- - 00000000-0000-0000-0000-000000000011 | 00000000-0000-0000-0000-000000019989 - 00000000-0000-0000-0000-000000000010 | 00000000-0000-0000-0000-000000019990 - 00000000-0000-0000-0000-000000000009 | 00000000-0000-0000-0000-000000019991 - 00000000-0000-0000-0000-000000000008 | 00000000-0000-0000-0000-000000019992 - 00000000-0000-0000-0000-000000000008 | 00000000-0000-0000-0000-000000019992 - 00000000-0000-0000-0000-000000000007 | 00000000-0000-0000-0000-000000019993 - 00000000-0000-0000-0000-000000000006 | 00000000-0000-0000-0000-000000019994 - 00000000-0000-0000-0000-000000000005 | 00000000-0000-0000-0000-000000019995 - 00000000-0000-0000-0000-000000000005 | 00000000-0000-0000-0000-000000019995 - 00000000-0000-0000-0000-000000000004 | 00000000-0000-0000-0000-000000019996 - 00000000-0000-0000-0000-000000000003 | 00000000-0000-0000-0000-000000019997 - 00000000-0000-0000-0000-000000000002 | 00000000-0000-0000-0000-000000019998 - 00000000-0000-0000-0000-000000000002 | 00000000-0000-0000-0000-000000019998 - 00000000-0000-0000-0000-000000000001 | 00000000-0000-0000-0000-000000019999 - 00000000-0000-0000-0000-000000000000 | 00000000-0000-0000-0000-000000020000 -(15 rows) - --- plain sort not triggering abbreviated abort -SELECT noabort_increasing, noabort_decreasing FROM abbrev_abort_uuids ORDER BY noabort_increasing OFFSET 20000 - 4; - noabort_increasing | noabort_decreasing ---------------------------------------+-------------------------------------- - 00009997-0000-0000-0000-000000009997 | 00010003-0000-0000-0000-000000010003 - 00009998-0000-0000-0000-000000009998 | 00010002-0000-0000-0000-000000010002 - 00009999-0000-0000-0000-000000009999 | 00010001-0000-0000-0000-000000010001 - 00010000-0000-0000-0000-000000010000 | 00010000-0000-0000-0000-000000010000 - 00010001-0000-0000-0000-000000010001 | 00009999-0000-0000-0000-000000009999 - 00010002-0000-0000-0000-000000010002 | 00009998-0000-0000-0000-000000009998 - 00010003-0000-0000-0000-000000010003 | 00009997-0000-0000-0000-000000009997 - 00010004-0000-0000-0000-000000010004 | 00009996-0000-0000-0000-000000009996 - 00010005-0000-0000-0000-000000010005 | 00009995-0000-0000-0000-000000009995 - 00010006-0000-0000-0000-000000010006 | 00009994-0000-0000-0000-000000009994 - 00010007-0000-0000-0000-000000010007 | 00009993-0000-0000-0000-000000009993 - 00010008-0000-0000-0000-000000010008 | 00009992-0000-0000-0000-000000009992 - | - | - | -(15 rows) - -SELECT noabort_increasing, noabort_decreasing FROM abbrev_abort_uuids ORDER BY noabort_decreasing NULLS FIRST OFFSET 20000 - 4; - noabort_increasing | noabort_decreasing ---------------------------------------+-------------------------------------- - 00010006-0000-0000-0000-000000010006 | 00009994-0000-0000-0000-000000009994 - 00010005-0000-0000-0000-000000010005 | 00009995-0000-0000-0000-000000009995 - 00010004-0000-0000-0000-000000010004 | 00009996-0000-0000-0000-000000009996 - 00010003-0000-0000-0000-000000010003 | 00009997-0000-0000-0000-000000009997 - 00010002-0000-0000-0000-000000010002 | 00009998-0000-0000-0000-000000009998 - 00010001-0000-0000-0000-000000010001 | 00009999-0000-0000-0000-000000009999 - 00010000-0000-0000-0000-000000010000 | 00010000-0000-0000-0000-000000010000 - 00009999-0000-0000-0000-000000009999 | 00010001-0000-0000-0000-000000010001 - 00009998-0000-0000-0000-000000009998 | 00010002-0000-0000-0000-000000010002 - 00009997-0000-0000-0000-000000009997 | 00010003-0000-0000-0000-000000010003 - 00009996-0000-0000-0000-000000009996 | 00010004-0000-0000-0000-000000010004 - 00009995-0000-0000-0000-000000009995 | 00010005-0000-0000-0000-000000010005 - 00009994-0000-0000-0000-000000009994 | 00010006-0000-0000-0000-000000010006 - 00009993-0000-0000-0000-000000009993 | 00010007-0000-0000-0000-000000010007 - 00009992-0000-0000-0000-000000009992 | 00010008-0000-0000-0000-000000010008 -(15 rows) - --- bounded sort (disables abbreviated keys) -SELECT abort_increasing, noabort_increasing FROM abbrev_abort_uuids ORDER BY abort_increasing LIMIT 5; - abort_increasing | noabort_increasing ---------------------------------------+-------------------------------------- - 00000000-0000-0000-0000-000000000000 | 00000000-0000-0000-0000-000000000000 - 00000000-0000-0000-0000-000000000001 | 00000001-0000-0000-0000-000000000001 - 00000000-0000-0000-0000-000000000002 | 00000002-0000-0000-0000-000000000002 - 00000000-0000-0000-0000-000000000002 | 00000002-0000-0000-0000-000000000002 - 00000000-0000-0000-0000-000000000003 | 00000003-0000-0000-0000-000000000003 -(5 rows) - -SELECT abort_increasing, noabort_increasing FROM abbrev_abort_uuids ORDER BY noabort_increasing NULLS FIRST LIMIT 5; - abort_increasing | noabort_increasing ---------------------------------------+-------------------------------------- - | - | - | - 00000000-0000-0000-0000-000000000000 | 00000000-0000-0000-0000-000000000000 - 00000000-0000-0000-0000-000000010009 | 00000000-0000-0000-0000-000000010009 -(5 rows) - ----- --- Check index creation uses of tuplesort wrt. abbreviated keys ----- --- index creation using abbreviated keys successfully -CREATE INDEX abbrev_abort_uuids__noabort_increasing_idx ON abbrev_abort_uuids (noabort_increasing); -CREATE INDEX abbrev_abort_uuids__noabort_decreasing_idx ON abbrev_abort_uuids (noabort_decreasing); --- verify -EXPLAIN (COSTS OFF) -SELECT id, noabort_increasing, noabort_decreasing FROM abbrev_abort_uuids ORDER BY noabort_increasing LIMIT 5; - QUERY PLAN ------------------------------------------------------------------------------------------ - Limit - -> Index Scan using abbrev_abort_uuids__noabort_increasing_idx on abbrev_abort_uuids -(2 rows) - -SELECT id, noabort_increasing, noabort_decreasing FROM abbrev_abort_uuids ORDER BY noabort_increasing LIMIT 5; - id | noabort_increasing | noabort_decreasing --------+--------------------------------------+-------------------------------------- - 1 | 00000000-0000-0000-0000-000000000000 | 00009991-0000-0000-0000-000000020000 - 10010 | 00000000-0000-0000-0000-000000010009 | 00009991-0000-0000-0000-000000009991 - 2 | 00000001-0000-0000-0000-000000000001 | 00009990-0000-0000-0000-000000019999 - 10011 | 00000001-0000-0000-0000-000000010010 | 00009990-0000-0000-0000-000000009990 - 3 | 00000002-0000-0000-0000-000000000002 | 00009989-0000-0000-0000-000000019998 -(5 rows) - -EXPLAIN (COSTS OFF) -SELECT id, noabort_increasing, noabort_decreasing FROM abbrev_abort_uuids ORDER BY noabort_decreasing LIMIT 5; - QUERY PLAN ------------------------------------------------------------------------------------------ - Limit - -> Index Scan using abbrev_abort_uuids__noabort_decreasing_idx on abbrev_abort_uuids -(2 rows) - -SELECT id, noabort_increasing, noabort_decreasing FROM abbrev_abort_uuids ORDER BY noabort_decreasing LIMIT 5; - id | noabort_increasing | noabort_decreasing --------+--------------------------------------+-------------------------------------- - 20001 | 00009991-0000-0000-0000-000000020000 | 00000000-0000-0000-0000-000000000000 - 20010 | 00009991-0000-0000-0000-000000020000 | 00000000-0000-0000-0000-000000000000 - 9992 | 00009991-0000-0000-0000-000000009991 | 00000000-0000-0000-0000-000000010009 - 20000 | 00009990-0000-0000-0000-000000019999 | 00000001-0000-0000-0000-000000000001 - 9991 | 00009990-0000-0000-0000-000000009990 | 00000001-0000-0000-0000-000000010010 -(5 rows) - --- index creation using abbreviated keys, hitting abort -CREATE INDEX abbrev_abort_uuids__abort_increasing_idx ON abbrev_abort_uuids (abort_increasing); -CREATE INDEX abbrev_abort_uuids__abort_decreasing_idx ON abbrev_abort_uuids (abort_decreasing); --- verify -EXPLAIN (COSTS OFF) -SELECT id, abort_increasing, abort_decreasing FROM abbrev_abort_uuids ORDER BY abort_increasing LIMIT 5; - QUERY PLAN ---------------------------------------------------------------------------------------- - Limit - -> Index Scan using abbrev_abort_uuids__abort_increasing_idx on abbrev_abort_uuids -(2 rows) - -SELECT id, abort_increasing, abort_decreasing FROM abbrev_abort_uuids ORDER BY abort_increasing LIMIT 5; - id | abort_increasing | abort_decreasing --------+--------------------------------------+-------------------------------------- - 1 | 00000000-0000-0000-0000-000000000000 | 00000000-0000-0000-0000-000000020000 - 2 | 00000000-0000-0000-0000-000000000001 | 00000000-0000-0000-0000-000000019999 - 3 | 00000000-0000-0000-0000-000000000002 | 00000000-0000-0000-0000-000000019998 - 20004 | 00000000-0000-0000-0000-000000000002 | 00000000-0000-0000-0000-000000019998 - 4 | 00000000-0000-0000-0000-000000000003 | 00000000-0000-0000-0000-000000019997 -(5 rows) - -EXPLAIN (COSTS OFF) -SELECT id, abort_increasing, abort_decreasing FROM abbrev_abort_uuids ORDER BY abort_decreasing LIMIT 5; - QUERY PLAN ---------------------------------------------------------------------------------------- - Limit - -> Index Scan using abbrev_abort_uuids__abort_decreasing_idx on abbrev_abort_uuids -(2 rows) - -SELECT id, abort_increasing, abort_decreasing FROM abbrev_abort_uuids ORDER BY abort_decreasing LIMIT 5; - id | abort_increasing | abort_decreasing --------+--------------------------------------+-------------------------------------- - 20001 | 00000000-0000-0000-0000-000000020000 | 00000000-0000-0000-0000-000000000000 - 20010 | 00000000-0000-0000-0000-000000020000 | 00000000-0000-0000-0000-000000000000 - 20000 | 00000000-0000-0000-0000-000000019999 | 00000000-0000-0000-0000-000000000001 - 19999 | 00000000-0000-0000-0000-000000019998 | 00000000-0000-0000-0000-000000000002 - 19998 | 00000000-0000-0000-0000-000000019997 | 00000000-0000-0000-0000-000000000003 -(5 rows) - ----- --- Check CLUSTER uses of tuplesort wrt. abbreviated keys ----- --- when aborting, increasing order -BEGIN; -SET LOCAL enable_indexscan = false; -CLUSTER abbrev_abort_uuids USING abbrev_abort_uuids__abort_increasing_idx; --- head -SELECT id, abort_increasing, abort_decreasing, noabort_increasing, noabort_decreasing -FROM abbrev_abort_uuids -ORDER BY ctid LIMIT 5; - id | abort_increasing | abort_decreasing | noabort_increasing | noabort_decreasing --------+--------------------------------------+--------------------------------------+--------------------------------------+-------------------------------------- - 1 | 00000000-0000-0000-0000-000000000000 | 00000000-0000-0000-0000-000000020000 | 00000000-0000-0000-0000-000000000000 | 00009991-0000-0000-0000-000000020000 - 2 | 00000000-0000-0000-0000-000000000001 | 00000000-0000-0000-0000-000000019999 | 00000001-0000-0000-0000-000000000001 | 00009990-0000-0000-0000-000000019999 - 3 | 00000000-0000-0000-0000-000000000002 | 00000000-0000-0000-0000-000000019998 | 00000002-0000-0000-0000-000000000002 | 00009989-0000-0000-0000-000000019998 - 20004 | 00000000-0000-0000-0000-000000000002 | 00000000-0000-0000-0000-000000019998 | 00000002-0000-0000-0000-000000000002 | 00009989-0000-0000-0000-000000019998 - 4 | 00000000-0000-0000-0000-000000000003 | 00000000-0000-0000-0000-000000019997 | 00000003-0000-0000-0000-000000000003 | 00009988-0000-0000-0000-000000019997 -(5 rows) - --- tail -SELECT id, abort_increasing, abort_decreasing, noabort_increasing, noabort_decreasing -FROM abbrev_abort_uuids -ORDER BY ctid DESC LIMIT 5; - id | abort_increasing | abort_decreasing | noabort_increasing | noabort_decreasing --------+--------------------------------------+--------------------------------------+--------------------------------------+-------------------------------------- - 0 | | | | - 20002 | | | | - 20003 | | | | - 20001 | 00000000-0000-0000-0000-000000020000 | 00000000-0000-0000-0000-000000000000 | 00009991-0000-0000-0000-000000020000 | 00000000-0000-0000-0000-000000000000 - 20010 | 00000000-0000-0000-0000-000000020000 | 00000000-0000-0000-0000-000000000000 | 00009991-0000-0000-0000-000000020000 | 00000000-0000-0000-0000-000000000000 -(5 rows) - -ROLLBACK; --- when aborting, decreasing order -BEGIN; -SET LOCAL enable_indexscan = false; -CLUSTER abbrev_abort_uuids USING abbrev_abort_uuids__abort_decreasing_idx; --- head -SELECT id, abort_increasing, abort_decreasing, noabort_increasing, noabort_decreasing -FROM abbrev_abort_uuids -ORDER BY ctid LIMIT 5; - id | abort_increasing | abort_decreasing | noabort_increasing | noabort_decreasing --------+--------------------------------------+--------------------------------------+--------------------------------------+-------------------------------------- - 20010 | 00000000-0000-0000-0000-000000020000 | 00000000-0000-0000-0000-000000000000 | 00009991-0000-0000-0000-000000020000 | 00000000-0000-0000-0000-000000000000 - 20001 | 00000000-0000-0000-0000-000000020000 | 00000000-0000-0000-0000-000000000000 | 00009991-0000-0000-0000-000000020000 | 00000000-0000-0000-0000-000000000000 - 20000 | 00000000-0000-0000-0000-000000019999 | 00000000-0000-0000-0000-000000000001 | 00009990-0000-0000-0000-000000019999 | 00000001-0000-0000-0000-000000000001 - 19999 | 00000000-0000-0000-0000-000000019998 | 00000000-0000-0000-0000-000000000002 | 00009989-0000-0000-0000-000000019998 | 00000002-0000-0000-0000-000000000002 - 20009 | 00000000-0000-0000-0000-000000019997 | 00000000-0000-0000-0000-000000000003 | 00009988-0000-0000-0000-000000019997 | 00000003-0000-0000-0000-000000000003 -(5 rows) - --- tail -SELECT id, abort_increasing, abort_decreasing, noabort_increasing, noabort_decreasing -FROM abbrev_abort_uuids -ORDER BY ctid DESC LIMIT 5; - id | abort_increasing | abort_decreasing | noabort_increasing | noabort_decreasing --------+--------------------------------------+--------------------------------------+--------------------------------------+-------------------------------------- - 0 | | | | - 20002 | | | | - 20003 | | | | - 1 | 00000000-0000-0000-0000-000000000000 | 00000000-0000-0000-0000-000000020000 | 00000000-0000-0000-0000-000000000000 | 00009991-0000-0000-0000-000000020000 - 2 | 00000000-0000-0000-0000-000000000001 | 00000000-0000-0000-0000-000000019999 | 00000001-0000-0000-0000-000000000001 | 00009990-0000-0000-0000-000000019999 -(5 rows) - -ROLLBACK; --- when not aborting, increasing order -BEGIN; -SET LOCAL enable_indexscan = false; -CLUSTER abbrev_abort_uuids USING abbrev_abort_uuids__noabort_increasing_idx; --- head -SELECT id, abort_increasing, abort_decreasing, noabort_increasing, noabort_decreasing -FROM abbrev_abort_uuids -ORDER BY ctid LIMIT 5; - id | abort_increasing | abort_decreasing | noabort_increasing | noabort_decreasing --------+--------------------------------------+--------------------------------------+--------------------------------------+-------------------------------------- - 1 | 00000000-0000-0000-0000-000000000000 | 00000000-0000-0000-0000-000000020000 | 00000000-0000-0000-0000-000000000000 | 00009991-0000-0000-0000-000000020000 - 10010 | 00000000-0000-0000-0000-000000010009 | 00000000-0000-0000-0000-000000009991 | 00000000-0000-0000-0000-000000010009 | 00009991-0000-0000-0000-000000009991 - 2 | 00000000-0000-0000-0000-000000000001 | 00000000-0000-0000-0000-000000019999 | 00000001-0000-0000-0000-000000000001 | 00009990-0000-0000-0000-000000019999 - 10011 | 00000000-0000-0000-0000-000000010010 | 00000000-0000-0000-0000-000000009990 | 00000001-0000-0000-0000-000000010010 | 00009990-0000-0000-0000-000000009990 - 20004 | 00000000-0000-0000-0000-000000000002 | 00000000-0000-0000-0000-000000019998 | 00000002-0000-0000-0000-000000000002 | 00009989-0000-0000-0000-000000019998 -(5 rows) - --- tail -SELECT id, abort_increasing, abort_decreasing, noabort_increasing, noabort_decreasing -FROM abbrev_abort_uuids -ORDER BY ctid DESC LIMIT 5; - id | abort_increasing | abort_decreasing | noabort_increasing | noabort_decreasing --------+--------------------------------------+--------------------------------------+--------------------------------------+-------------------------------------- - 0 | | | | - 20002 | | | | - 20003 | | | | - 10009 | 00000000-0000-0000-0000-000000010008 | 00000000-0000-0000-0000-000000009992 | 00010008-0000-0000-0000-000000010008 | 00009992-0000-0000-0000-000000009992 - 10008 | 00000000-0000-0000-0000-000000010007 | 00000000-0000-0000-0000-000000009993 | 00010007-0000-0000-0000-000000010007 | 00009993-0000-0000-0000-000000009993 -(5 rows) - -ROLLBACK; --- when no aborting, decreasing order -BEGIN; -SET LOCAL enable_indexscan = false; -CLUSTER abbrev_abort_uuids USING abbrev_abort_uuids__noabort_decreasing_idx; --- head -SELECT id, abort_increasing, abort_decreasing, noabort_increasing, noabort_decreasing -FROM abbrev_abort_uuids -ORDER BY ctid LIMIT 5; - id | abort_increasing | abort_decreasing | noabort_increasing | noabort_decreasing --------+--------------------------------------+--------------------------------------+--------------------------------------+-------------------------------------- - 20010 | 00000000-0000-0000-0000-000000020000 | 00000000-0000-0000-0000-000000000000 | 00009991-0000-0000-0000-000000020000 | 00000000-0000-0000-0000-000000000000 - 20001 | 00000000-0000-0000-0000-000000020000 | 00000000-0000-0000-0000-000000000000 | 00009991-0000-0000-0000-000000020000 | 00000000-0000-0000-0000-000000000000 - 9992 | 00000000-0000-0000-0000-000000009991 | 00000000-0000-0000-0000-000000010009 | 00009991-0000-0000-0000-000000009991 | 00000000-0000-0000-0000-000000010009 - 20000 | 00000000-0000-0000-0000-000000019999 | 00000000-0000-0000-0000-000000000001 | 00009990-0000-0000-0000-000000019999 | 00000001-0000-0000-0000-000000000001 - 9991 | 00000000-0000-0000-0000-000000009990 | 00000000-0000-0000-0000-000000010010 | 00009990-0000-0000-0000-000000009990 | 00000001-0000-0000-0000-000000010010 -(5 rows) - --- tail -SELECT id, abort_increasing, abort_decreasing, noabort_increasing, noabort_decreasing -FROM abbrev_abort_uuids -ORDER BY ctid DESC LIMIT 5; - id | abort_increasing | abort_decreasing | noabort_increasing | noabort_decreasing --------+--------------------------------------+--------------------------------------+--------------------------------------+-------------------------------------- - 0 | | | | - 20003 | | | | - 20002 | | | | - 9993 | 00000000-0000-0000-0000-000000009992 | 00000000-0000-0000-0000-000000010008 | 00009992-0000-0000-0000-000000009992 | 00010008-0000-0000-0000-000000010008 - 9994 | 00000000-0000-0000-0000-000000009993 | 00000000-0000-0000-0000-000000010007 | 00009993-0000-0000-0000-000000009993 | 00010007-0000-0000-0000-000000010007 -(5 rows) - -ROLLBACK; ----- --- test forward and backward scans for in-memory and disk based tuplesort ----- --- in-memory -BEGIN; -SET LOCAL enable_indexscan = false; --- unfortunately can't show analyze output confirming sort method, --- the memory used output wouldn't be stable -EXPLAIN (COSTS OFF) DECLARE c SCROLL CURSOR FOR SELECT noabort_decreasing FROM abbrev_abort_uuids ORDER BY noabort_decreasing; - QUERY PLAN --------------------------------------- - Sort - Sort Key: noabort_decreasing - -> Seq Scan on abbrev_abort_uuids -(3 rows) - -DECLARE c SCROLL CURSOR FOR SELECT noabort_decreasing FROM abbrev_abort_uuids ORDER BY noabort_decreasing; --- first and second -FETCH NEXT FROM c; - noabort_decreasing --------------------------------------- - 00000000-0000-0000-0000-000000000000 -(1 row) - -FETCH NEXT FROM c; - noabort_decreasing --------------------------------------- - 00000000-0000-0000-0000-000000000000 -(1 row) - --- scroll beyond beginning -FETCH BACKWARD FROM c; - noabort_decreasing --------------------------------------- - 00000000-0000-0000-0000-000000000000 -(1 row) - -FETCH BACKWARD FROM c; - noabort_decreasing --------------------- -(0 rows) - -FETCH BACKWARD FROM c; - noabort_decreasing --------------------- -(0 rows) - -FETCH BACKWARD FROM c; - noabort_decreasing --------------------- -(0 rows) - -FETCH NEXT FROM c; - noabort_decreasing --------------------------------------- - 00000000-0000-0000-0000-000000000000 -(1 row) - --- scroll beyond end end -FETCH LAST FROM c; - noabort_decreasing --------------------- - -(1 row) - -FETCH BACKWARD FROM c; - noabort_decreasing --------------------- - -(1 row) - -FETCH NEXT FROM c; - noabort_decreasing --------------------- - -(1 row) - -FETCH NEXT FROM c; - noabort_decreasing --------------------- -(0 rows) - -FETCH NEXT FROM c; - noabort_decreasing --------------------- -(0 rows) - -FETCH BACKWARD FROM c; - noabort_decreasing --------------------- - -(1 row) - -FETCH NEXT FROM c; - noabort_decreasing --------------------- -(0 rows) - -COMMIT; --- disk based -BEGIN; -SET LOCAL enable_indexscan = false; -SET LOCAL work_mem = '100kB'; --- unfortunately can't show analyze output confirming sort method, --- the memory used output wouldn't be stable -EXPLAIN (COSTS OFF) DECLARE c SCROLL CURSOR FOR SELECT noabort_decreasing FROM abbrev_abort_uuids ORDER BY noabort_decreasing; - QUERY PLAN --------------------------------------- - Sort - Sort Key: noabort_decreasing - -> Seq Scan on abbrev_abort_uuids -(3 rows) - -DECLARE c SCROLL CURSOR FOR SELECT noabort_decreasing FROM abbrev_abort_uuids ORDER BY noabort_decreasing; --- first and second -FETCH NEXT FROM c; - noabort_decreasing --------------------------------------- - 00000000-0000-0000-0000-000000000000 -(1 row) - -FETCH NEXT FROM c; - noabort_decreasing --------------------------------------- - 00000000-0000-0000-0000-000000000000 -(1 row) - --- scroll beyond beginning -FETCH BACKWARD FROM c; - noabort_decreasing --------------------------------------- - 00000000-0000-0000-0000-000000000000 -(1 row) - -FETCH BACKWARD FROM c; - noabort_decreasing --------------------- -(0 rows) - -FETCH BACKWARD FROM c; - noabort_decreasing --------------------- -(0 rows) - -FETCH BACKWARD FROM c; - noabort_decreasing --------------------- -(0 rows) - -FETCH NEXT FROM c; - noabort_decreasing --------------------------------------- - 00000000-0000-0000-0000-000000000000 -(1 row) - --- scroll beyond end end -FETCH LAST FROM c; - noabort_decreasing --------------------- - -(1 row) - -FETCH BACKWARD FROM c; - noabort_decreasing --------------------- - -(1 row) - -FETCH NEXT FROM c; - noabort_decreasing --------------------- - -(1 row) - -FETCH NEXT FROM c; - noabort_decreasing --------------------- -(0 rows) - -FETCH NEXT FROM c; - noabort_decreasing --------------------- -(0 rows) - -FETCH BACKWARD FROM c; - noabort_decreasing --------------------- - -(1 row) - -FETCH NEXT FROM c; - noabort_decreasing --------------------- -(0 rows) - -COMMIT; ----- --- test tuplesort using both in-memory and disk sort ---- --- memory based -SELECT - -- fixed-width by-value datum - (array_agg(id ORDER BY id DESC NULLS FIRST))[0:5], - -- fixed-width by-ref datum - (array_agg(abort_increasing ORDER BY abort_increasing DESC NULLS LAST))[0:5], - -- variable-width datum - (array_agg(id::text ORDER BY id::text DESC NULLS LAST))[0:5], - -- fixed width by-value datum tuplesort - percentile_disc(0.99) WITHIN GROUP (ORDER BY id), - -- ensure state is shared - percentile_disc(0.01) WITHIN GROUP (ORDER BY id), - -- fixed width by-ref datum tuplesort - percentile_disc(0.8) WITHIN GROUP (ORDER BY abort_increasing), - -- variable width by-ref datum tuplesort - percentile_disc(0.2) WITHIN GROUP (ORDER BY id::text), - -- multi-column tuplesort - rank('00000000-0000-0000-0000-000000000000', '2', '2') WITHIN GROUP (ORDER BY noabort_increasing, id, id::text) -FROM ( - SELECT * FROM abbrev_abort_uuids - UNION ALL - SELECT NULL, NULL, NULL, NULL, NULL) s; - array_agg | array_agg | array_agg | percentile_disc | percentile_disc | percentile_disc | percentile_disc | rank ---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------+-----------------+-----------------+--------------------------------------+-----------------+------ - {NULL,20010,20009,20008,20007} | {00000000-0000-0000-0000-000000020000,00000000-0000-0000-0000-000000020000,00000000-0000-0000-0000-000000019999,00000000-0000-0000-0000-000000019998,00000000-0000-0000-0000-000000019997} | {9999,9998,9997,9996,9995} | 19810 | 200 | 00000000-0000-0000-0000-000000016003 | 136 | 2 -(1 row) - --- disk based (see also above) -BEGIN; -SET LOCAL work_mem = '100kB'; -SELECT - (array_agg(id ORDER BY id DESC NULLS FIRST))[0:5], - (array_agg(abort_increasing ORDER BY abort_increasing DESC NULLS LAST))[0:5], - (array_agg(id::text ORDER BY id::text DESC NULLS LAST))[0:5], - percentile_disc(0.99) WITHIN GROUP (ORDER BY id), - percentile_disc(0.01) WITHIN GROUP (ORDER BY id), - percentile_disc(0.8) WITHIN GROUP (ORDER BY abort_increasing), - percentile_disc(0.2) WITHIN GROUP (ORDER BY id::text), - rank('00000000-0000-0000-0000-000000000000', '2', '2') WITHIN GROUP (ORDER BY noabort_increasing, id, id::text) -FROM ( - SELECT * FROM abbrev_abort_uuids - UNION ALL - SELECT NULL, NULL, NULL, NULL, NULL) s; - array_agg | array_agg | array_agg | percentile_disc | percentile_disc | percentile_disc | percentile_disc | rank ---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------+-----------------+-----------------+--------------------------------------+-----------------+------ - {NULL,20010,20009,20008,20007} | {00000000-0000-0000-0000-000000020000,00000000-0000-0000-0000-000000020000,00000000-0000-0000-0000-000000019999,00000000-0000-0000-0000-000000019998,00000000-0000-0000-0000-000000019997} | {9999,9998,9997,9996,9995} | 19810 | 200 | 00000000-0000-0000-0000-000000016003 | 136 | 2 -(1 row) - -ROLLBACK; ----- --- test tuplesort mark/restore ---- -CREATE TEMP TABLE test_mark_restore(col1 int, col2 int, col12 int); --- need a few duplicates for mark/restore to matter -INSERT INTO test_mark_restore(col1, col2, col12) - SELECT a.i, b.i, a.i * b.i FROM generate_series(1, 500) a(i), generate_series(1, 5) b(i); -BEGIN; -SET LOCAL enable_nestloop = off; -SET LOCAL enable_hashjoin = off; -SET LOCAL enable_material = off; --- set query into variable once, to avoid repetition of the fairly long query -SELECT $$ - SELECT col12, count(distinct a.col1), count(distinct a.col2), count(distinct b.col1), count(distinct b.col2), count(*) - FROM test_mark_restore a - JOIN test_mark_restore b USING(col12) - GROUP BY 1 - HAVING count(*) > 1 - ORDER BY 2 DESC, 1 DESC, 3 DESC, 4 DESC, 5 DESC, 6 DESC - LIMIT 10 -$$ AS qry \gset --- test mark/restore with in-memory sorts -EXPLAIN (COSTS OFF) :qry; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Limit - -> Sort - Sort Key: (count(DISTINCT a.col1)) DESC, a.col12 DESC, (count(DISTINCT a.col2)) DESC, (count(DISTINCT b.col1)) DESC, (count(DISTINCT b.col2)) DESC, (count(*)) DESC - -> GroupAggregate - Group Key: a.col12 - Filter: (count(*) > 1) - -> Merge Join - Merge Cond: (a.col12 = b.col12) - -> Sort - Sort Key: a.col12 DESC - -> Seq Scan on test_mark_restore a - -> Sort - Sort Key: b.col12 DESC - -> Seq Scan on test_mark_restore b -(14 rows) - -:qry; - col12 | count | count | count | count | count --------+-------+-------+-------+-------+------- - 480 | 5 | 5 | 5 | 5 | 25 - 420 | 5 | 5 | 5 | 5 | 25 - 360 | 5 | 5 | 5 | 5 | 25 - 300 | 5 | 5 | 5 | 5 | 25 - 240 | 5 | 5 | 5 | 5 | 25 - 180 | 5 | 5 | 5 | 5 | 25 - 120 | 5 | 5 | 5 | 5 | 25 - 60 | 5 | 5 | 5 | 5 | 25 - 960 | 4 | 4 | 4 | 4 | 16 - 900 | 4 | 4 | 4 | 4 | 16 -(10 rows) - --- test mark/restore with on-disk sorts -SET LOCAL work_mem = '100kB'; -EXPLAIN (COSTS OFF) :qry; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Limit - -> Sort - Sort Key: (count(DISTINCT a.col1)) DESC, a.col12 DESC, (count(DISTINCT a.col2)) DESC, (count(DISTINCT b.col1)) DESC, (count(DISTINCT b.col2)) DESC, (count(*)) DESC - -> GroupAggregate - Group Key: a.col12 - Filter: (count(*) > 1) - -> Merge Join - Merge Cond: (a.col12 = b.col12) - -> Sort - Sort Key: a.col12 DESC - -> Seq Scan on test_mark_restore a - -> Sort - Sort Key: b.col12 DESC - -> Seq Scan on test_mark_restore b -(14 rows) - -:qry; - col12 | count | count | count | count | count --------+-------+-------+-------+-------+------- - 480 | 5 | 5 | 5 | 5 | 25 - 420 | 5 | 5 | 5 | 5 | 25 - 360 | 5 | 5 | 5 | 5 | 25 - 300 | 5 | 5 | 5 | 5 | 25 - 240 | 5 | 5 | 5 | 5 | 25 - 180 | 5 | 5 | 5 | 5 | 25 - 120 | 5 | 5 | 5 | 5 | 25 - 60 | 5 | 5 | 5 | 5 | 25 - 960 | 4 | 4 | 4 | 4 | 16 - 900 | 4 | 4 | 4 | 4 | 16 -(10 rows) - -COMMIT; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/explain.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/explain.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/explain.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/explain.out 2023-02-20 19:49:12.789219901 -0500 @@ -1,488 +1 @@ --- --- EXPLAIN --- --- There are many test cases elsewhere that use EXPLAIN as a vehicle for --- checking something else (usually planner behavior). This file is --- concerned with testing EXPLAIN in its own right. --- --- To produce stable regression test output, it's usually necessary to --- ignore details such as exact costs or row counts. These filter --- functions replace changeable output details with fixed strings. -create function explain_filter(text) returns setof text -language plpgsql as -$$ -declare - ln text; -begin - for ln in execute $1 - loop - -- Replace any numeric word with just 'N' - ln := regexp_replace(ln, '-?\m\d+\M', 'N', 'g'); - -- In sort output, the above won't match units-suffixed numbers - ln := regexp_replace(ln, '\m\d+kB', 'NkB', 'g'); - -- Ignore text-mode buffers output because it varies depending - -- on the system state - CONTINUE WHEN (ln ~ ' +Buffers: .*'); - -- Ignore text-mode "Planning:" line because whether it's output - -- varies depending on the system state - CONTINUE WHEN (ln = 'Planning:'); - return next ln; - end loop; -end; -$$; --- To produce valid JSON output, replace numbers with "0" or "0.0" not "N" -create function explain_filter_to_json(text) returns jsonb -language plpgsql as -$$ -declare - data text := ''; - ln text; -begin - for ln in execute $1 - loop - -- Replace any numeric word with just '0' - ln := regexp_replace(ln, '\m\d+\M', '0', 'g'); - data := data || ln; - end loop; - return data::jsonb; -end; -$$; --- Simple cases -select explain_filter('explain select * from int8_tbl i8'); - explain_filter ---------------------------------------------------------- - Seq Scan on int8_tbl i8 (cost=N.N..N.N rows=N width=N) -(1 row) - -select explain_filter('explain (analyze) select * from int8_tbl i8'); - explain_filter ------------------------------------------------------------------------------------------------ - Seq Scan on int8_tbl i8 (cost=N.N..N.N rows=N width=N) (actual time=N.N..N.N rows=N loops=N) - Planning Time: N.N ms - Execution Time: N.N ms -(3 rows) - -select explain_filter('explain (analyze, verbose) select * from int8_tbl i8'); - explain_filter ------------------------------------------------------------------------------------------------------- - Seq Scan on public.int8_tbl i8 (cost=N.N..N.N rows=N width=N) (actual time=N.N..N.N rows=N loops=N) - Output: q1, q2 - Planning Time: N.N ms - Execution Time: N.N ms -(4 rows) - -select explain_filter('explain (analyze, buffers, format text) select * from int8_tbl i8'); - explain_filter ------------------------------------------------------------------------------------------------ - Seq Scan on int8_tbl i8 (cost=N.N..N.N rows=N width=N) (actual time=N.N..N.N rows=N loops=N) - Planning Time: N.N ms - Execution Time: N.N ms -(3 rows) - -select explain_filter('explain (analyze, buffers, format json) select * from int8_tbl i8'); - explain_filter ------------------------------------- - [ + - { + - "Plan": { + - "Node Type": "Seq Scan", + - "Parallel Aware": false, + - "Async Capable": false, + - "Relation Name": "int8_tbl",+ - "Alias": "i8", + - "Startup Cost": N.N, + - "Total Cost": N.N, + - "Plan Rows": N, + - "Plan Width": N, + - "Actual Startup Time": N.N, + - "Actual Total Time": N.N, + - "Actual Rows": N, + - "Actual Loops": N, + - "Shared Hit Blocks": N, + - "Shared Read Blocks": N, + - "Shared Dirtied Blocks": N, + - "Shared Written Blocks": N, + - "Local Hit Blocks": N, + - "Local Read Blocks": N, + - "Local Dirtied Blocks": N, + - "Local Written Blocks": N, + - "Temp Read Blocks": N, + - "Temp Written Blocks": N + - }, + - "Planning": { + - "Shared Hit Blocks": N, + - "Shared Read Blocks": N, + - "Shared Dirtied Blocks": N, + - "Shared Written Blocks": N, + - "Local Hit Blocks": N, + - "Local Read Blocks": N, + - "Local Dirtied Blocks": N, + - "Local Written Blocks": N, + - "Temp Read Blocks": N, + - "Temp Written Blocks": N + - }, + - "Planning Time": N.N, + - "Triggers": [ + - ], + - "Execution Time": N.N + - } + - ] -(1 row) - -select explain_filter('explain (analyze, buffers, format xml) select * from int8_tbl i8'); - explain_filter --------------------------------------------------------- - + - + - + - Seq Scan + - false + - false + - int8_tbl + - i8 + - N.N + - N.N + - N + - N + - N.N + - N.N + - N + - N + - N + - N + - N+ - N+ - N + - N + - N + - N + - N + - N + - + - + - N + - N + - N+ - N+ - N + - N + - N + - N + - N + - N + - + - N.N + - + - + - N.N + - + - -(1 row) - -select explain_filter('explain (analyze, buffers, format yaml) select * from int8_tbl i8'); - explain_filter -------------------------------- - - Plan: + - Node Type: "Seq Scan" + - Parallel Aware: false + - Async Capable: false + - Relation Name: "int8_tbl"+ - Alias: "i8" + - Startup Cost: N.N + - Total Cost: N.N + - Plan Rows: N + - Plan Width: N + - Actual Startup Time: N.N + - Actual Total Time: N.N + - Actual Rows: N + - Actual Loops: N + - Shared Hit Blocks: N + - Shared Read Blocks: N + - Shared Dirtied Blocks: N + - Shared Written Blocks: N + - Local Hit Blocks: N + - Local Read Blocks: N + - Local Dirtied Blocks: N + - Local Written Blocks: N + - Temp Read Blocks: N + - Temp Written Blocks: N + - Planning: + - Shared Hit Blocks: N + - Shared Read Blocks: N + - Shared Dirtied Blocks: N + - Shared Written Blocks: N + - Local Hit Blocks: N + - Local Read Blocks: N + - Local Dirtied Blocks: N + - Local Written Blocks: N + - Temp Read Blocks: N + - Temp Written Blocks: N + - Planning Time: N.N + - Triggers: + - Execution Time: N.N -(1 row) - -select explain_filter('explain (buffers, format text) select * from int8_tbl i8'); - explain_filter ---------------------------------------------------------- - Seq Scan on int8_tbl i8 (cost=N.N..N.N rows=N width=N) -(1 row) - -select explain_filter('explain (buffers, format json) select * from int8_tbl i8'); - explain_filter ------------------------------------- - [ + - { + - "Plan": { + - "Node Type": "Seq Scan", + - "Parallel Aware": false, + - "Async Capable": false, + - "Relation Name": "int8_tbl",+ - "Alias": "i8", + - "Startup Cost": N.N, + - "Total Cost": N.N, + - "Plan Rows": N, + - "Plan Width": N, + - "Shared Hit Blocks": N, + - "Shared Read Blocks": N, + - "Shared Dirtied Blocks": N, + - "Shared Written Blocks": N, + - "Local Hit Blocks": N, + - "Local Read Blocks": N, + - "Local Dirtied Blocks": N, + - "Local Written Blocks": N, + - "Temp Read Blocks": N, + - "Temp Written Blocks": N + - }, + - "Planning": { + - "Shared Hit Blocks": N, + - "Shared Read Blocks": N, + - "Shared Dirtied Blocks": N, + - "Shared Written Blocks": N, + - "Local Hit Blocks": N, + - "Local Read Blocks": N, + - "Local Dirtied Blocks": N, + - "Local Written Blocks": N, + - "Temp Read Blocks": N, + - "Temp Written Blocks": N + - } + - } + - ] -(1 row) - --- SETTINGS option --- We have to ignore other settings that might be imposed by the environment, --- so printing the whole Settings field unfortunately won't do. -begin; -set local plan_cache_mode = force_generic_plan; -select true as "OK" - from explain_filter('explain (settings) select * from int8_tbl i8') ln - where ln ~ '^ *Settings: .*plan_cache_mode = ''force_generic_plan'''; - OK ----- - t -(1 row) - -select explain_filter_to_json('explain (settings, format json) select * from int8_tbl i8') #> '{0,Settings,plan_cache_mode}'; - ?column? ----------------------- - "force_generic_plan" -(1 row) - -rollback; --- --- Test production of per-worker data --- --- Unfortunately, because we don't know how many worker processes we'll --- actually get (maybe none at all), we can't examine the "Workers" output --- in any detail. We can check that it parses correctly as JSON, and then --- remove it from the displayed results. -begin; --- encourage use of parallel plans -set parallel_setup_cost=0; -set parallel_tuple_cost=0; -set min_parallel_table_scan_size=0; -set max_parallel_workers_per_gather=4; -select jsonb_pretty( - explain_filter_to_json('explain (analyze, verbose, buffers, format json) - select * from tenk1 order by tenthous') - -- remove "Workers" node of the Seq Scan plan node - #- '{0,Plan,Plans,0,Plans,0,Workers}' - -- remove "Workers" node of the Sort plan node - #- '{0,Plan,Plans,0,Workers}' - -- Also remove its sort-type fields, as those aren't 100% stable - #- '{0,Plan,Plans,0,Sort Method}' - #- '{0,Plan,Plans,0,Sort Space Type}' -); - jsonb_pretty -------------------------------------------------------------- - [ + - { + - "Plan": { + - "Plans": [ + - { + - "Plans": [ + - { + - "Alias": "tenk1", + - "Output": [ + - "unique1", + - "unique2", + - "two", + - "four", + - "ten", + - "twenty", + - "hundred", + - "thousand", + - "twothousand", + - "fivethous", + - "tenthous", + - "odd", + - "even", + - "stringu1", + - "stringu2", + - "string4" + - ], + - "Schema": "public", + - "Node Type": "Seq Scan", + - "Plan Rows": 0, + - "Plan Width": 0, + - "Total Cost": 0.0, + - "Actual Rows": 0, + - "Actual Loops": 0, + - "Startup Cost": 0.0, + - "Async Capable": false, + - "Relation Name": "tenk1", + - "Parallel Aware": true, + - "Local Hit Blocks": 0, + - "Temp Read Blocks": 0, + - "Actual Total Time": 0.0, + - "Local Read Blocks": 0, + - "Shared Hit Blocks": 0, + - "Shared Read Blocks": 0, + - "Actual Startup Time": 0.0, + - "Parent Relationship": "Outer",+ - "Temp Written Blocks": 0, + - "Local Dirtied Blocks": 0, + - "Local Written Blocks": 0, + - "Shared Dirtied Blocks": 0, + - "Shared Written Blocks": 0 + - } + - ], + - "Output": [ + - "unique1", + - "unique2", + - "two", + - "four", + - "ten", + - "twenty", + - "hundred", + - "thousand", + - "twothousand", + - "fivethous", + - "tenthous", + - "odd", + - "even", + - "stringu1", + - "stringu2", + - "string4" + - ], + - "Sort Key": [ + - "tenk1.tenthous" + - ], + - "Node Type": "Sort", + - "Plan Rows": 0, + - "Plan Width": 0, + - "Total Cost": 0.0, + - "Actual Rows": 0, + - "Actual Loops": 0, + - "Startup Cost": 0.0, + - "Async Capable": false, + - "Parallel Aware": false, + - "Sort Space Used": 0, + - "Local Hit Blocks": 0, + - "Temp Read Blocks": 0, + - "Actual Total Time": 0.0, + - "Local Read Blocks": 0, + - "Shared Hit Blocks": 0, + - "Shared Read Blocks": 0, + - "Actual Startup Time": 0.0, + - "Parent Relationship": "Outer", + - "Temp Written Blocks": 0, + - "Local Dirtied Blocks": 0, + - "Local Written Blocks": 0, + - "Shared Dirtied Blocks": 0, + - "Shared Written Blocks": 0 + - } + - ], + - "Output": [ + - "unique1", + - "unique2", + - "two", + - "four", + - "ten", + - "twenty", + - "hundred", + - "thousand", + - "twothousand", + - "fivethous", + - "tenthous", + - "odd", + - "even", + - "stringu1", + - "stringu2", + - "string4" + - ], + - "Node Type": "Gather Merge", + - "Plan Rows": 0, + - "Plan Width": 0, + - "Total Cost": 0.0, + - "Actual Rows": 0, + - "Actual Loops": 0, + - "Startup Cost": 0.0, + - "Async Capable": false, + - "Parallel Aware": false, + - "Workers Planned": 0, + - "Local Hit Blocks": 0, + - "Temp Read Blocks": 0, + - "Workers Launched": 0, + - "Actual Total Time": 0.0, + - "Local Read Blocks": 0, + - "Shared Hit Blocks": 0, + - "Shared Read Blocks": 0, + - "Actual Startup Time": 0.0, + - "Temp Written Blocks": 0, + - "Local Dirtied Blocks": 0, + - "Local Written Blocks": 0, + - "Shared Dirtied Blocks": 0, + - "Shared Written Blocks": 0 + - }, + - "Planning": { + - "Local Hit Blocks": 0, + - "Temp Read Blocks": 0, + - "Local Read Blocks": 0, + - "Shared Hit Blocks": 0, + - "Shared Read Blocks": 0, + - "Temp Written Blocks": 0, + - "Local Dirtied Blocks": 0, + - "Local Written Blocks": 0, + - "Shared Dirtied Blocks": 0, + - "Shared Written Blocks": 0 + - }, + - "Triggers": [ + - ], + - "Planning Time": 0.0, + - "Execution Time": 0.0 + - } + - ] -(1 row) - -rollback; -set compute_query_id = on; -select explain_filter('explain (verbose) select * from int8_tbl i8'); - explain_filter ----------------------------------------------------------------- - Seq Scan on public.int8_tbl i8 (cost=N.N..N.N rows=N width=N) - Output: q1, q2 - Query Identifier: N -(3 rows) - +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/compression_1.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/compression.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/compression_1.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/compression.out 2023-02-20 19:49:12.779219901 -0500 @@ -1,361 +1 @@ -\set HIDE_TOAST_COMPRESSION false --- ensure we get stable results regardless of installation's default -SET default_toast_compression = 'pglz'; --- test creating table with compression method -CREATE TABLE cmdata(f1 text COMPRESSION pglz); -CREATE INDEX idx ON cmdata(f1); -INSERT INTO cmdata VALUES(repeat('1234567890', 1000)); -\d+ cmdata - Table "public.cmdata" - Column | Type | Collation | Nullable | Default | Storage | Compression | Stats target | Description ---------+------+-----------+----------+---------+----------+-------------+--------------+------------- - f1 | text | | | | extended | pglz | | -Indexes: - "idx" btree (f1) - -CREATE TABLE cmdata1(f1 TEXT COMPRESSION lz4); -ERROR: compression method lz4 not supported -DETAIL: This functionality requires the server to be built with lz4 support. -HINT: You need to rebuild PostgreSQL using --with-lz4. -INSERT INTO cmdata1 VALUES(repeat('1234567890', 1004)); -ERROR: relation "cmdata1" does not exist -LINE 1: INSERT INTO cmdata1 VALUES(repeat('1234567890', 1004)); - ^ -\d+ cmdata1 --- verify stored compression method in the data -SELECT pg_column_compression(f1) FROM cmdata; - pg_column_compression ------------------------ - pglz -(1 row) - -SELECT pg_column_compression(f1) FROM cmdata1; -ERROR: relation "cmdata1" does not exist -LINE 1: SELECT pg_column_compression(f1) FROM cmdata1; - ^ --- decompress data slice -SELECT SUBSTR(f1, 200, 5) FROM cmdata; - substr --------- - 01234 -(1 row) - -SELECT SUBSTR(f1, 2000, 50) FROM cmdata1; -ERROR: relation "cmdata1" does not exist -LINE 1: SELECT SUBSTR(f1, 2000, 50) FROM cmdata1; - ^ --- copy with table creation -SELECT * INTO cmmove1 FROM cmdata; -\d+ cmmove1 - Table "public.cmmove1" - Column | Type | Collation | Nullable | Default | Storage | Compression | Stats target | Description ---------+------+-----------+----------+---------+----------+-------------+--------------+------------- - f1 | text | | | | extended | | | - -SELECT pg_column_compression(f1) FROM cmmove1; - pg_column_compression ------------------------ - pglz -(1 row) - --- copy to existing table -CREATE TABLE cmmove3(f1 text COMPRESSION pglz); -INSERT INTO cmmove3 SELECT * FROM cmdata; -INSERT INTO cmmove3 SELECT * FROM cmdata1; -ERROR: relation "cmdata1" does not exist -LINE 1: INSERT INTO cmmove3 SELECT * FROM cmdata1; - ^ -SELECT pg_column_compression(f1) FROM cmmove3; - pg_column_compression ------------------------ - pglz -(1 row) - --- test LIKE INCLUDING COMPRESSION -CREATE TABLE cmdata2 (LIKE cmdata1 INCLUDING COMPRESSION); -ERROR: relation "cmdata1" does not exist -LINE 1: CREATE TABLE cmdata2 (LIKE cmdata1 INCLUDING COMPRESSION); - ^ -\d+ cmdata2 -DROP TABLE cmdata2; -ERROR: table "cmdata2" does not exist --- try setting compression for incompressible data type -CREATE TABLE cmdata2 (f1 int COMPRESSION pglz); -ERROR: column data type integer does not support compression --- update using datum from different table -CREATE TABLE cmmove2(f1 text COMPRESSION pglz); -INSERT INTO cmmove2 VALUES (repeat('1234567890', 1004)); -SELECT pg_column_compression(f1) FROM cmmove2; - pg_column_compression ------------------------ - pglz -(1 row) - -UPDATE cmmove2 SET f1 = cmdata1.f1 FROM cmdata1; -ERROR: relation "cmdata1" does not exist -LINE 1: UPDATE cmmove2 SET f1 = cmdata1.f1 FROM cmdata1; - ^ -SELECT pg_column_compression(f1) FROM cmmove2; - pg_column_compression ------------------------ - pglz -(1 row) - --- test externally stored compressed data -CREATE OR REPLACE FUNCTION large_val() RETURNS TEXT LANGUAGE SQL AS -'select array_agg(md5(g::text))::text from generate_series(1, 256) g'; -CREATE TABLE cmdata2 (f1 text COMPRESSION pglz); -INSERT INTO cmdata2 SELECT large_val() || repeat('a', 4000); -SELECT pg_column_compression(f1) FROM cmdata2; - pg_column_compression ------------------------ - pglz -(1 row) - -INSERT INTO cmdata1 SELECT large_val() || repeat('a', 4000); -ERROR: relation "cmdata1" does not exist -LINE 1: INSERT INTO cmdata1 SELECT large_val() || repeat('a', 4000); - ^ -SELECT pg_column_compression(f1) FROM cmdata1; -ERROR: relation "cmdata1" does not exist -LINE 1: SELECT pg_column_compression(f1) FROM cmdata1; - ^ -SELECT SUBSTR(f1, 200, 5) FROM cmdata1; -ERROR: relation "cmdata1" does not exist -LINE 1: SELECT SUBSTR(f1, 200, 5) FROM cmdata1; - ^ -SELECT SUBSTR(f1, 200, 5) FROM cmdata2; - substr --------- - 8f14e -(1 row) - -DROP TABLE cmdata2; ---test column type update varlena/non-varlena -CREATE TABLE cmdata2 (f1 int); -\d+ cmdata2 - Table "public.cmdata2" - Column | Type | Collation | Nullable | Default | Storage | Compression | Stats target | Description ---------+---------+-----------+----------+---------+---------+-------------+--------------+------------- - f1 | integer | | | | plain | | | - -ALTER TABLE cmdata2 ALTER COLUMN f1 TYPE varchar; -\d+ cmdata2 - Table "public.cmdata2" - Column | Type | Collation | Nullable | Default | Storage | Compression | Stats target | Description ---------+-------------------+-----------+----------+---------+----------+-------------+--------------+------------- - f1 | character varying | | | | extended | | | - -ALTER TABLE cmdata2 ALTER COLUMN f1 TYPE int USING f1::integer; -\d+ cmdata2 - Table "public.cmdata2" - Column | Type | Collation | Nullable | Default | Storage | Compression | Stats target | Description ---------+---------+-----------+----------+---------+---------+-------------+--------------+------------- - f1 | integer | | | | plain | | | - ---changing column storage should not impact the compression method ---but the data should not be compressed -ALTER TABLE cmdata2 ALTER COLUMN f1 TYPE varchar; -ALTER TABLE cmdata2 ALTER COLUMN f1 SET COMPRESSION pglz; -\d+ cmdata2 - Table "public.cmdata2" - Column | Type | Collation | Nullable | Default | Storage | Compression | Stats target | Description ---------+-------------------+-----------+----------+---------+----------+-------------+--------------+------------- - f1 | character varying | | | | extended | pglz | | - -ALTER TABLE cmdata2 ALTER COLUMN f1 SET STORAGE plain; -\d+ cmdata2 - Table "public.cmdata2" - Column | Type | Collation | Nullable | Default | Storage | Compression | Stats target | Description ---------+-------------------+-----------+----------+---------+---------+-------------+--------------+------------- - f1 | character varying | | | | plain | pglz | | - -INSERT INTO cmdata2 VALUES (repeat('123456789', 800)); -SELECT pg_column_compression(f1) FROM cmdata2; - pg_column_compression ------------------------ - -(1 row) - --- test compression with materialized view -CREATE MATERIALIZED VIEW compressmv(x) AS SELECT * FROM cmdata1; -ERROR: relation "cmdata1" does not exist -LINE 1: ...TE MATERIALIZED VIEW compressmv(x) AS SELECT * FROM cmdata1; - ^ -\d+ compressmv -SELECT pg_column_compression(f1) FROM cmdata1; -ERROR: relation "cmdata1" does not exist -LINE 1: SELECT pg_column_compression(f1) FROM cmdata1; - ^ -SELECT pg_column_compression(x) FROM compressmv; -ERROR: relation "compressmv" does not exist -LINE 1: SELECT pg_column_compression(x) FROM compressmv; - ^ --- test compression with partition -CREATE TABLE cmpart(f1 text COMPRESSION lz4) PARTITION BY HASH(f1); -ERROR: compression method lz4 not supported -DETAIL: This functionality requires the server to be built with lz4 support. -HINT: You need to rebuild PostgreSQL using --with-lz4. -CREATE TABLE cmpart1 PARTITION OF cmpart FOR VALUES WITH (MODULUS 2, REMAINDER 0); -ERROR: relation "cmpart" does not exist -CREATE TABLE cmpart2(f1 text COMPRESSION pglz); -ALTER TABLE cmpart ATTACH PARTITION cmpart2 FOR VALUES WITH (MODULUS 2, REMAINDER 1); -ERROR: relation "cmpart" does not exist -INSERT INTO cmpart VALUES (repeat('123456789', 1004)); -ERROR: relation "cmpart" does not exist -LINE 1: INSERT INTO cmpart VALUES (repeat('123456789', 1004)); - ^ -INSERT INTO cmpart VALUES (repeat('123456789', 4004)); -ERROR: relation "cmpart" does not exist -LINE 1: INSERT INTO cmpart VALUES (repeat('123456789', 4004)); - ^ -SELECT pg_column_compression(f1) FROM cmpart1; -ERROR: relation "cmpart1" does not exist -LINE 1: SELECT pg_column_compression(f1) FROM cmpart1; - ^ -SELECT pg_column_compression(f1) FROM cmpart2; - pg_column_compression ------------------------ -(0 rows) - --- test compression with inheritance, error -CREATE TABLE cminh() INHERITS(cmdata, cmdata1); -ERROR: relation "cmdata1" does not exist -CREATE TABLE cminh(f1 TEXT COMPRESSION lz4) INHERITS(cmdata); -NOTICE: merging column "f1" with inherited definition -ERROR: column "f1" has a compression method conflict -DETAIL: pglz versus lz4 --- test default_toast_compression GUC -SET default_toast_compression = ''; -ERROR: invalid value for parameter "default_toast_compression": "" -HINT: Available values: pglz. -SET default_toast_compression = 'I do not exist compression'; -ERROR: invalid value for parameter "default_toast_compression": "I do not exist compression" -HINT: Available values: pglz. -SET default_toast_compression = 'lz4'; -ERROR: invalid value for parameter "default_toast_compression": "lz4" -HINT: Available values: pglz. -SET default_toast_compression = 'pglz'; --- test alter compression method -ALTER TABLE cmdata ALTER COLUMN f1 SET COMPRESSION lz4; -ERROR: compression method lz4 not supported -DETAIL: This functionality requires the server to be built with lz4 support. -HINT: You need to rebuild PostgreSQL using --with-lz4. -INSERT INTO cmdata VALUES (repeat('123456789', 4004)); -\d+ cmdata - Table "public.cmdata" - Column | Type | Collation | Nullable | Default | Storage | Compression | Stats target | Description ---------+------+-----------+----------+---------+----------+-------------+--------------+------------- - f1 | text | | | | extended | pglz | | -Indexes: - "idx" btree (f1) - -SELECT pg_column_compression(f1) FROM cmdata; - pg_column_compression ------------------------ - pglz - pglz -(2 rows) - -ALTER TABLE cmdata2 ALTER COLUMN f1 SET COMPRESSION default; -\d+ cmdata2 - Table "public.cmdata2" - Column | Type | Collation | Nullable | Default | Storage | Compression | Stats target | Description ---------+-------------------+-----------+----------+---------+---------+-------------+--------------+------------- - f1 | character varying | | | | plain | | | - --- test alter compression method for materialized views -ALTER MATERIALIZED VIEW compressmv ALTER COLUMN x SET COMPRESSION lz4; -ERROR: relation "compressmv" does not exist -\d+ compressmv --- test alter compression method for partitioned tables -ALTER TABLE cmpart1 ALTER COLUMN f1 SET COMPRESSION pglz; -ERROR: relation "cmpart1" does not exist -ALTER TABLE cmpart2 ALTER COLUMN f1 SET COMPRESSION lz4; -ERROR: compression method lz4 not supported -DETAIL: This functionality requires the server to be built with lz4 support. -HINT: You need to rebuild PostgreSQL using --with-lz4. --- new data should be compressed with the current compression method -INSERT INTO cmpart VALUES (repeat('123456789', 1004)); -ERROR: relation "cmpart" does not exist -LINE 1: INSERT INTO cmpart VALUES (repeat('123456789', 1004)); - ^ -INSERT INTO cmpart VALUES (repeat('123456789', 4004)); -ERROR: relation "cmpart" does not exist -LINE 1: INSERT INTO cmpart VALUES (repeat('123456789', 4004)); - ^ -SELECT pg_column_compression(f1) FROM cmpart1; -ERROR: relation "cmpart1" does not exist -LINE 1: SELECT pg_column_compression(f1) FROM cmpart1; - ^ -SELECT pg_column_compression(f1) FROM cmpart2; - pg_column_compression ------------------------ -(0 rows) - --- VACUUM FULL does not recompress -SELECT pg_column_compression(f1) FROM cmdata; - pg_column_compression ------------------------ - pglz - pglz -(2 rows) - -VACUUM FULL cmdata; -SELECT pg_column_compression(f1) FROM cmdata; - pg_column_compression ------------------------ - pglz - pglz -(2 rows) - --- test expression index -DROP TABLE cmdata2; -CREATE TABLE cmdata2 (f1 TEXT COMPRESSION pglz, f2 TEXT COMPRESSION lz4); -ERROR: compression method lz4 not supported -DETAIL: This functionality requires the server to be built with lz4 support. -HINT: You need to rebuild PostgreSQL using --with-lz4. -CREATE UNIQUE INDEX idx1 ON cmdata2 ((f1 || f2)); -ERROR: relation "cmdata2" does not exist -INSERT INTO cmdata2 VALUES((SELECT array_agg(md5(g::TEXT))::TEXT FROM -generate_series(1, 50) g), VERSION()); -ERROR: relation "cmdata2" does not exist -LINE 1: INSERT INTO cmdata2 VALUES((SELECT array_agg(md5(g::TEXT))::... - ^ --- check data is ok -SELECT length(f1) FROM cmdata; - length --------- - 10000 - 36036 -(2 rows) - -SELECT length(f1) FROM cmdata1; -ERROR: relation "cmdata1" does not exist -LINE 1: SELECT length(f1) FROM cmdata1; - ^ -SELECT length(f1) FROM cmmove1; - length --------- - 10000 -(1 row) - -SELECT length(f1) FROM cmmove2; - length --------- - 10040 -(1 row) - -SELECT length(f1) FROM cmmove3; - length --------- - 10000 -(1 row) - -CREATE TABLE badcompresstbl (a text COMPRESSION I_Do_Not_Exist_Compression); -- fails -ERROR: invalid compression method "i_do_not_exist_compression" -CREATE TABLE badcompresstbl (a text); -ALTER TABLE badcompresstbl ALTER a SET COMPRESSION I_Do_Not_Exist_Compression; -- fails -ERROR: invalid compression method "i_do_not_exist_compression" -DROP TABLE badcompresstbl; -\set HIDE_TOAST_COMPRESSION true +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/memoize.out /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/memoize.out --- /builddir/build/BUILD/postgresql-14.3/src/test/regress/expected/memoize.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/test/regress/results/memoize.out 2023-02-20 19:49:13.119219916 -0500 @@ -1,283 +1 @@ --- Perform tests on the Memoize node. --- The cache hits/misses/evictions from the Memoize node can vary between --- machines. Let's just replace the number with an 'N'. In order to allow us --- to perform validation when the measure was zero, we replace a zero value --- with "Zero". All other numbers are replaced with 'N'. -create function explain_memoize(query text, hide_hitmiss bool) returns setof text -language plpgsql as -$$ -declare - ln text; -begin - for ln in - execute format('explain (analyze, costs off, summary off, timing off) %s', - query) - loop - if hide_hitmiss = true then - ln := regexp_replace(ln, 'Hits: 0', 'Hits: Zero'); - ln := regexp_replace(ln, 'Hits: \d+', 'Hits: N'); - ln := regexp_replace(ln, 'Misses: 0', 'Misses: Zero'); - ln := regexp_replace(ln, 'Misses: \d+', 'Misses: N'); - end if; - ln := regexp_replace(ln, 'Evictions: 0', 'Evictions: Zero'); - ln := regexp_replace(ln, 'Evictions: \d+', 'Evictions: N'); - ln := regexp_replace(ln, 'Memory Usage: \d+', 'Memory Usage: N'); - ln := regexp_replace(ln, 'Heap Fetches: \d+', 'Heap Fetches: N'); - ln := regexp_replace(ln, 'loops=\d+', 'loops=N'); - return next ln; - end loop; -end; -$$; --- Ensure we get a memoize node on the inner side of the nested loop -SET enable_hashjoin TO off; -SET enable_bitmapscan TO off; -SELECT explain_memoize(' -SELECT COUNT(*),AVG(t1.unique1) FROM tenk1 t1 -INNER JOIN tenk1 t2 ON t1.unique1 = t2.twenty -WHERE t2.unique1 < 1000;', false); - explain_memoize -------------------------------------------------------------------------------------------- - Aggregate (actual rows=1 loops=N) - -> Nested Loop (actual rows=1000 loops=N) - -> Seq Scan on tenk1 t2 (actual rows=1000 loops=N) - Filter: (unique1 < 1000) - Rows Removed by Filter: 9000 - -> Memoize (actual rows=1 loops=N) - Cache Key: t2.twenty - Cache Mode: logical - Hits: 980 Misses: 20 Evictions: Zero Overflows: 0 Memory Usage: NkB - -> Index Only Scan using tenk1_unique1 on tenk1 t1 (actual rows=1 loops=N) - Index Cond: (unique1 = t2.twenty) - Heap Fetches: N -(12 rows) - --- And check we get the expected results. -SELECT COUNT(*),AVG(t1.unique1) FROM tenk1 t1 -INNER JOIN tenk1 t2 ON t1.unique1 = t2.twenty -WHERE t2.unique1 < 1000; - count | avg --------+-------------------- - 1000 | 9.5000000000000000 -(1 row) - --- Try with LATERAL joins -SELECT explain_memoize(' -SELECT COUNT(*),AVG(t2.unique1) FROM tenk1 t1, -LATERAL (SELECT t2.unique1 FROM tenk1 t2 WHERE t1.twenty = t2.unique1) t2 -WHERE t1.unique1 < 1000;', false); - explain_memoize -------------------------------------------------------------------------------------------- - Aggregate (actual rows=1 loops=N) - -> Nested Loop (actual rows=1000 loops=N) - -> Seq Scan on tenk1 t1 (actual rows=1000 loops=N) - Filter: (unique1 < 1000) - Rows Removed by Filter: 9000 - -> Memoize (actual rows=1 loops=N) - Cache Key: t1.twenty - Cache Mode: logical - Hits: 980 Misses: 20 Evictions: Zero Overflows: 0 Memory Usage: NkB - -> Index Only Scan using tenk1_unique1 on tenk1 t2 (actual rows=1 loops=N) - Index Cond: (unique1 = t1.twenty) - Heap Fetches: N -(12 rows) - --- And check we get the expected results. -SELECT COUNT(*),AVG(t2.unique1) FROM tenk1 t1, -LATERAL (SELECT t2.unique1 FROM tenk1 t2 WHERE t1.twenty = t2.unique1) t2 -WHERE t1.unique1 < 1000; - count | avg --------+-------------------- - 1000 | 9.5000000000000000 -(1 row) - --- Reduce work_mem so that we see some cache evictions -SET work_mem TO '64kB'; -SET enable_mergejoin TO off; --- Ensure we get some evictions. We're unable to validate the hits and misses --- here as the number of entries that fit in the cache at once will vary --- between different machines. -SELECT explain_memoize(' -SELECT COUNT(*),AVG(t1.unique1) FROM tenk1 t1 -INNER JOIN tenk1 t2 ON t1.unique1 = t2.thousand -WHERE t2.unique1 < 1200;', true); - explain_memoize -------------------------------------------------------------------------------------------- - Aggregate (actual rows=1 loops=N) - -> Nested Loop (actual rows=1200 loops=N) - -> Seq Scan on tenk1 t2 (actual rows=1200 loops=N) - Filter: (unique1 < 1200) - Rows Removed by Filter: 8800 - -> Memoize (actual rows=1 loops=N) - Cache Key: t2.thousand - Cache Mode: logical - Hits: N Misses: N Evictions: N Overflows: 0 Memory Usage: NkB - -> Index Only Scan using tenk1_unique1 on tenk1 t1 (actual rows=1 loops=N) - Index Cond: (unique1 = t2.thousand) - Heap Fetches: N -(12 rows) - -CREATE TABLE flt (f float); -CREATE INDEX flt_f_idx ON flt (f); -INSERT INTO flt VALUES('-0.0'::float),('+0.0'::float); -ANALYZE flt; -SET enable_seqscan TO off; --- Ensure memoize operates in logical mode -SELECT explain_memoize(' -SELECT * FROM flt f1 INNER JOIN flt f2 ON f1.f = f2.f;', false); - explain_memoize -------------------------------------------------------------------------------- - Nested Loop (actual rows=4 loops=N) - -> Index Only Scan using flt_f_idx on flt f1 (actual rows=2 loops=N) - Heap Fetches: N - -> Memoize (actual rows=2 loops=N) - Cache Key: f1.f - Cache Mode: logical - Hits: 1 Misses: 1 Evictions: Zero Overflows: 0 Memory Usage: NkB - -> Index Only Scan using flt_f_idx on flt f2 (actual rows=2 loops=N) - Index Cond: (f = f1.f) - Heap Fetches: N -(10 rows) - --- Ensure memoize operates in binary mode -SELECT explain_memoize(' -SELECT * FROM flt f1 INNER JOIN flt f2 ON f1.f >= f2.f;', false); - explain_memoize -------------------------------------------------------------------------------- - Nested Loop (actual rows=4 loops=N) - -> Index Only Scan using flt_f_idx on flt f1 (actual rows=2 loops=N) - Heap Fetches: N - -> Memoize (actual rows=2 loops=N) - Cache Key: f1.f - Cache Mode: binary - Hits: 0 Misses: 2 Evictions: Zero Overflows: 0 Memory Usage: NkB - -> Index Only Scan using flt_f_idx on flt f2 (actual rows=2 loops=N) - Index Cond: (f <= f1.f) - Heap Fetches: N -(10 rows) - -DROP TABLE flt; --- Exercise Memoize in binary mode with a large fixed width type and a --- varlena type. -CREATE TABLE strtest (n name, t text); -CREATE INDEX strtest_n_idx ON strtest (n); -CREATE INDEX strtest_t_idx ON strtest (t); -INSERT INTO strtest VALUES('one','one'),('two','two'),('three',repeat(md5('three'),100)); --- duplicate rows so we get some cache hits -INSERT INTO strtest SELECT * FROM strtest; -ANALYZE strtest; --- Ensure we get 3 hits and 3 misses -SELECT explain_memoize(' -SELECT * FROM strtest s1 INNER JOIN strtest s2 ON s1.n >= s2.n;', false); - explain_memoize ----------------------------------------------------------------------------------- - Nested Loop (actual rows=24 loops=N) - -> Seq Scan on strtest s1 (actual rows=6 loops=N) - -> Memoize (actual rows=4 loops=N) - Cache Key: s1.n - Cache Mode: binary - Hits: 3 Misses: 3 Evictions: Zero Overflows: 0 Memory Usage: NkB - -> Index Scan using strtest_n_idx on strtest s2 (actual rows=4 loops=N) - Index Cond: (n <= s1.n) -(8 rows) - --- Ensure we get 3 hits and 3 misses -SELECT explain_memoize(' -SELECT * FROM strtest s1 INNER JOIN strtest s2 ON s1.t >= s2.t;', false); - explain_memoize ----------------------------------------------------------------------------------- - Nested Loop (actual rows=24 loops=N) - -> Seq Scan on strtest s1 (actual rows=6 loops=N) - -> Memoize (actual rows=4 loops=N) - Cache Key: s1.t - Cache Mode: binary - Hits: 3 Misses: 3 Evictions: Zero Overflows: 0 Memory Usage: NkB - -> Index Scan using strtest_t_idx on strtest s2 (actual rows=4 loops=N) - Index Cond: (t <= s1.t) -(8 rows) - -DROP TABLE strtest; --- Exercise Memoize code that flushes the cache when a parameter changes which --- is not part of the cache key. --- Ensure we get a Memoize plan -EXPLAIN (COSTS OFF) -SELECT unique1 FROM tenk1 t0 -WHERE unique1 < 3 - AND EXISTS ( - SELECT 1 FROM tenk1 t1 - INNER JOIN tenk1 t2 ON t1.unique1 = t2.hundred - WHERE t0.ten = t1.twenty AND t0.two <> t2.four OFFSET 0); - QUERY PLAN ----------------------------------------------------------------- - Index Scan using tenk1_unique1 on tenk1 t0 - Index Cond: (unique1 < 3) - Filter: (SubPlan 1) - SubPlan 1 - -> Nested Loop - -> Index Scan using tenk1_hundred on tenk1 t2 - Filter: (t0.two <> four) - -> Memoize - Cache Key: t2.hundred - Cache Mode: logical - -> Index Scan using tenk1_unique1 on tenk1 t1 - Index Cond: (unique1 = t2.hundred) - Filter: (t0.ten = twenty) -(13 rows) - --- Ensure the above query returns the correct result -SELECT unique1 FROM tenk1 t0 -WHERE unique1 < 3 - AND EXISTS ( - SELECT 1 FROM tenk1 t1 - INNER JOIN tenk1 t2 ON t1.unique1 = t2.hundred - WHERE t0.ten = t1.twenty AND t0.two <> t2.four OFFSET 0); - unique1 ---------- - 2 -(1 row) - -RESET enable_seqscan; -RESET enable_mergejoin; -RESET work_mem; -RESET enable_bitmapscan; -RESET enable_hashjoin; --- Test parallel plans with Memoize -SET min_parallel_table_scan_size TO 0; -SET parallel_setup_cost TO 0; -SET parallel_tuple_cost TO 0; -SET max_parallel_workers_per_gather TO 2; --- Ensure we get a parallel plan. -EXPLAIN (COSTS OFF) -SELECT COUNT(*),AVG(t2.unique1) FROM tenk1 t1, -LATERAL (SELECT t2.unique1 FROM tenk1 t2 WHERE t1.twenty = t2.unique1) t2 -WHERE t1.unique1 < 1000; - QUERY PLAN -------------------------------------------------------------------------------- - Finalize Aggregate - -> Gather - Workers Planned: 2 - -> Partial Aggregate - -> Nested Loop - -> Parallel Bitmap Heap Scan on tenk1 t1 - Recheck Cond: (unique1 < 1000) - -> Bitmap Index Scan on tenk1_unique1 - Index Cond: (unique1 < 1000) - -> Memoize - Cache Key: t1.twenty - Cache Mode: logical - -> Index Only Scan using tenk1_unique1 on tenk1 t2 - Index Cond: (unique1 = t1.twenty) -(14 rows) - --- And ensure the parallel plan gives us the correct results. -SELECT COUNT(*),AVG(t2.unique1) FROM tenk1 t1, -LATERAL (SELECT t2.unique1 FROM tenk1 t2 WHERE t1.twenty = t2.unique1) t2 -WHERE t1.unique1 < 1000; - count | avg --------+-------------------- - 1000 | 9.5000000000000000 -(1 row) - -RESET max_parallel_workers_per_gather; -RESET parallel_tuple_cost; -RESET parallel_setup_cost; -RESET min_parallel_table_scan_size; +psql: error: connection to server on socket "/tmp/pg_regress-nnnlp5/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode make: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' rm -f regress.so libregress.a libregress.pc rm -f regress.o refint.so autoinc.so rm -f pg_regress_main.o pg_regress.o pg_regress rm -f expected/constraints.out expected/copy.out expected/create_function_0.out expected/create_function_1.out expected/create_function_2.out expected/largeobject.out expected/largeobject_1.out expected/misc.out expected/tablespace.out sql/constraints.sql sql/copy.sql sql/create_function_0.sql sql/create_function_1.sql sql/create_function_2.sql sql/largeobject.sql sql/misc.sql sql/tablespace.sql rm -rf testtablespace rm -rf results/ regression.diffs regression.out tmp_check/ tmp_check_iso/ log/ output_iso/ make: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl' make -C ../../src/backend generated-headers make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend' make -C catalog distprep generated-header-symlinks make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[2]: Nothing to be done for 'distprep'. make[2]: Nothing to be done for 'generated-header-symlinks'. make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make -C utils distprep generated-header-symlinks make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils' make[2]: Nothing to be done for 'distprep'. make[2]: Nothing to be done for 'generated-header-symlinks'. make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils' make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend' rm -rf '/builddir/build/BUILD/postgresql-14.3'/tmp_install + make clean -C src/test/regress + run_testsuite src/pl + make -k -C src/pl MAX_CONNECTIONS=5 check /usr/bin/mkdir -p '/builddir/build/BUILD/postgresql-14.3'/tmp_install/log make -C '../..' DESTDIR='/builddir/build/BUILD/postgresql-14.3'/tmp_install install >'/builddir/build/BUILD/postgresql-14.3'/tmp_install/log/install.log 2>&1 make -j1 checkprep >>'/builddir/build/BUILD/postgresql-14.3'/tmp_install/log/install.log 2>&1 make -C plpgsql check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql' make -C src check make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' make -C ../../../../src/test/regress pg_regress make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=pl_regression plpgsql_array plpgsql_call plpgsql_control plpgsql_copy plpgsql_domain plpgsql_record plpgsql_cache plpgsql_simple plpgsql_transaction plpgsql_trap plpgsql_trigger plpgsql_varprops ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 290040 ============== creating database "pl_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test plpgsql_array ... ok 948 ms test plpgsql_call ... ok 1124 ms test plpgsql_control ... ok 947 ms test plpgsql_copy ... ok 1544 ms test plpgsql_domain ... ok 1023 ms test plpgsql_record ... ok 2035 ms test plpgsql_cache ... ok 557 ms test plpgsql_simple ... ok 656 ms test plpgsql_transaction ... ok 1971 ms test plpgsql_trap ... FAILED (test process exited with exit code 2) 14181 ms test plpgsql_trigger ... FAILED (test process exited with exit code 2) 258 ms test plpgsql_varprops ... FAILED (test process exited with exit code 2) 245 ms ============== shutting down postmaster ============== ======================= 3 of 12 tests failed. ======================= The differences that caused some tests to fail can be viewed in the file "/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src/regression.diffs". A copy of the test summary that you see above is saved in the file "/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src/regression.out". make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src' make[2]: *** [Makefile:102: check] Error 1 make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql' make[1]: *** [Makefile:17: check-src-recurse] Error 2 make[1]: Target 'check' not remade because of errors. make: *** [Makefile:35: check-plpgsql-recurse] Error 2 make -C plperl check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' make -C ../../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/src/pl/plperl:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=pl_regression plperl_setup plperl plperl_lc plperl_trigger plperl_shared plperl_elog plperl_util plperl_init plperlu plperl_array plperl_call plperl_transaction plperl_plperlu ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 290154 ============== creating database "pl_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test plperl_setup ... ok 2066 ms test plperl ... ok 1959 ms test plperl_lc ... ok 717 ms test plperl_trigger ... ok 1523 ms test plperl_shared ... ok 724 ms test plperl_elog ... ok 906 ms test plperl_util ... ok 906 ms test plperl_init ... ok 620 ms test plperlu ... ok 608 ms test plperl_array ... ok 992 ms test plperl_call ... ok 818 ms test plperl_transaction ... ok 1365 ms test plperl_plperlu ... ok 1013 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ====================== All 13 tests passed. ====================== make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plperl' make -C plpython check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' make -C ../../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' /usr/bin/mkdir -p sql/python3 expected/python3 results/python3 for file in ./sql/plpython_schema.sql ./sql/plpython_populate.sql ./sql/plpython_test.sql ./sql/plpython_do.sql ./sql/plpython_global.sql ./sql/plpython_import.sql ./sql/plpython_spi.sql ./sql/plpython_newline.sql ./sql/plpython_void.sql ./sql/plpython_call.sql ./sql/plpython_params.sql ./sql/plpython_setof.sql ./sql/plpython_record.sql ./sql/plpython_trigger.sql ./sql/plpython_types.sql ./sql/plpython_error.sql ./sql/plpython_ereport.sql ./sql/plpython_unicode.sql ./sql/plpython_quote.sql ./sql/plpython_composite.sql ./sql/plpython_subtransaction.sql ./sql/plpython_transaction.sql ./sql/plpython_drop.sql ./expected/plpython_schema*.out ./expected/plpython_populate*.out ./expected/plpython_test*.out ./expected/plpython_do*.out ./expected/plpython_global*.out ./expected/plpython_import*.out ./expected/plpython_spi*.out ./expected/plpython_newline*.out ./expected/plpython_void*.out ./expected/plpython_call*.out ./expected/plpython_params*.out ./expected/plpython_setof*.out ./expected/plpython_record*.out ./expected/plpython_trigger*.out ./expected/plpython_types*.out ./expected/plpython_error*.out ./expected/plpython_ereport*.out ./expected/plpython_unicode*.out ./expected/plpython_quote*.out ./expected/plpython_composite*.out ./expected/plpython_subtransaction*.out ./expected/plpython_transaction*.out ./expected/plpython_drop*.out; do \ sed \ -e "s///g" \ -e "s///g" \ -e "s/\([0-9][0-9]*\)L/\1/g" \ -e 's/\([ [{]\)u"/\1"/g' \ -e "s/\([ [{]\)u'/\1'/g" \ -e "s/def next/def __next__/g" \ -e "s/LANGUAGE plpythonu/LANGUAGE plpython3u/g" \ -e "s/LANGUAGE plpython2u/LANGUAGE plpython3u/g" \ -e "s/EXTENSION plpythonu/EXTENSION plpython3u/g" \ -e "s/EXTENSION plpython2u/EXTENSION plpython3u/g" \ -e "s/EXTENSION \([^ ]*\)_plpythonu/EXTENSION \1_plpython3u/g" \ -e "s/EXTENSION \([^ ]*\)_plpython2u/EXTENSION \1_plpython3u/g" \ -e 's/installing required extension "plpython2u"/installing required extension "plpython3u"/g' \ $file >`echo $file | sed 's,^.*/\([^/][^/]*/\)\([^/][^/]*\)$,\1python3/\2,'` || exit; \ done PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/src/pl/plpython:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=pl_regression python3/plpython_schema python3/plpython_populate python3/plpython_test python3/plpython_do python3/plpython_global python3/plpython_import python3/plpython_spi python3/plpython_newline python3/plpython_void python3/plpython_call python3/plpython_params python3/plpython_setof python3/plpython_record python3/plpython_trigger python3/plpython_types python3/plpython_error python3/plpython_ereport python3/plpython_unicode python3/plpython_quote python3/plpython_composite python3/plpython_subtransaction python3/plpython_transaction python3/plpython_drop ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 290440 ============== creating database "pl_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test python3/plpython_schema ... ok 919 ms test python3/plpython_populate ... ok 798 ms test python3/plpython_test ... ok 1357 ms test python3/plpython_do ... ok 776 ms test python3/plpython_global ... ok 1052 ms test python3/plpython_import ... ok 1302 ms test python3/plpython_spi ... ok 1771 ms test python3/plpython_newline ... ok 820 ms test python3/plpython_void ... ok 815 ms test python3/plpython_call ... ok 1103 ms test python3/plpython_params ... ok 1092 ms test python3/plpython_setof ... ok 1146 ms test python3/plpython_record ... ok 1441 ms test python3/plpython_trigger ... ok 2761 ms test python3/plpython_types ... ok 2798 ms test python3/plpython_error ... ok 1346 ms test python3/plpython_ereport ... ok 1056 ms test python3/plpython_unicode ... ok 959 ms test python3/plpython_quote ... ok 776 ms test python3/plpython_composite ... ok 1563 ms test python3/plpython_subtransaction ... ok 1305 ms test python3/plpython_transaction ... ok 1290 ms test python3/plpython_drop ... ok 527 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ====================== All 23 tests passed. ====================== make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/plpython' make -C tcl check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/pl/tcl' make -C ../../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/src/pl/tcl:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=pl_regression --load-extension=pltcl pltcl_setup pltcl_queries pltcl_trigger pltcl_call pltcl_start_proc pltcl_subxact pltcl_unicode pltcl_transaction ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 290574 ============== creating database "pl_regression" ============== CREATE DATABASE ALTER DATABASE ============== installing pltcl ============== CREATE EXTENSION ============== running regression test queries ============== test pltcl_setup ... ok 1330 ms test pltcl_queries ... ok 1224 ms test pltcl_trigger ... ok 1775 ms test pltcl_call ... ok 615 ms test pltcl_start_proc ... ok 560 ms test pltcl_subxact ... ok 728 ms test pltcl_unicode ... ok 577 ms test pltcl_transaction ... ok 933 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ===================== All 8 tests passed. ===================== make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl/tcl' make: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/pl' make: Target 'check' not remade because of errors. + test_failure=1 + set +x === trying to find all regression.diffs files in build directory === === make failure: src/pl/plpgsql/src/regression.diffs === diff -U3 /builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src/expected/plpgsql_trap.out /builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src/results/plpgsql_trap.out --- /builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src/expected/plpgsql_trap.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src/results/plpgsql_trap.out 2023-02-20 19:58:23.699257838 -0500 @@ -155,101 +155,7 @@ begin; set statement_timeout to 1000; select trap_timeout(); -NOTICE: nyeah nyeah, can't stop me -ERROR: end of function -CONTEXT: PL/pgSQL function trap_timeout() line 15 at RAISE -rollback; --- Test for pass-by-ref values being stored in proper context -create function test_variable_storage() returns text as $$ -declare x text; -begin - x := '1234'; - begin - x := x || '5678'; - -- force error inside subtransaction SPI context - perform trap_zero_divide(-100); - exception - when others then - x := x || '9012'; - end; - return x; -end$$ language plpgsql; -select test_variable_storage(); -NOTICE: should see this -NOTICE: should see this only if -100 <> 0 -NOTICE: should see this only if -100 fits in smallint - test_variable_storage ------------------------ - 123456789012 -(1 row) - --- --- test foreign key error trapping --- -create temp table root(f1 int primary key); -create temp table leaf(f1 int references root deferrable); -insert into root values(1); -insert into leaf values(1); -insert into leaf values(2); -- fails -ERROR: insert or update on table "leaf" violates foreign key constraint "leaf_f1_fkey" -DETAIL: Key (f1)=(2) is not present in table "root". -create function trap_foreign_key(int) returns int as $$ -begin - begin -- start a subtransaction - insert into leaf values($1); - exception - when foreign_key_violation then - raise notice 'caught foreign_key_violation'; - return 0; - end; - return 1; -end$$ language plpgsql; -create function trap_foreign_key_2() returns int as $$ -begin - begin -- start a subtransaction - set constraints all immediate; - exception - when foreign_key_violation then - raise notice 'caught foreign_key_violation'; - return 0; - end; - return 1; -end$$ language plpgsql; -select trap_foreign_key(1); - trap_foreign_key ------------------- - 1 -(1 row) - -select trap_foreign_key(2); -- detects FK violation -NOTICE: caught foreign_key_violation - trap_foreign_key ------------------- - 0 -(1 row) - -begin; - set constraints all deferred; - select trap_foreign_key(2); -- should not detect FK violation - trap_foreign_key ------------------- - 1 -(1 row) - - savepoint x; - set constraints all immediate; -- fails -ERROR: insert or update on table "leaf" violates foreign key constraint "leaf_f1_fkey" -DETAIL: Key (f1)=(2) is not present in table "root". - rollback to x; - select trap_foreign_key_2(); -- detects FK violation -NOTICE: caught foreign_key_violation - trap_foreign_key_2 --------------------- - 0 -(1 row) - -commit; -- still fails -ERROR: insert or update on table "leaf" violates foreign key constraint "leaf_f1_fkey" -DETAIL: Key (f1)=(2) is not present in table "root". -drop function trap_foreign_key(int); -drop function trap_foreign_key_2(); +server closed the connection unexpectedly + This probably means the server terminated abnormally + before or while processing the request. +connection to server was lost diff -U3 /builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src/expected/plpgsql_trigger.out /builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src/results/plpgsql_trigger.out --- /builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src/expected/plpgsql_trigger.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src/results/plpgsql_trigger.out 2023-02-20 19:58:24.319257887 -0500 @@ -1,36 +1 @@ --- Simple test to verify accessibility of the OLD and NEW trigger variables -create table testtr (a int, b text); -create function testtr_trigger() returns trigger language plpgsql as -$$begin - raise notice 'tg_op = %', tg_op; - raise notice 'old(%) = %', old.a, row(old.*); - raise notice 'new(%) = %', new.a, row(new.*); - if (tg_op = 'DELETE') then - return old; - else - return new; - end if; -end$$; -create trigger testtr_trigger before insert or delete or update on testtr - for each row execute function testtr_trigger(); -insert into testtr values (1, 'one'), (2, 'two'); -NOTICE: tg_op = INSERT -NOTICE: old() = (,) -NOTICE: new(1) = (1,one) -NOTICE: tg_op = INSERT -NOTICE: old() = (,) -NOTICE: new(2) = (2,two) -update testtr set a = a + 1; -NOTICE: tg_op = UPDATE -NOTICE: old(1) = (1,one) -NOTICE: new(2) = (2,one) -NOTICE: tg_op = UPDATE -NOTICE: old(2) = (2,two) -NOTICE: new(3) = (3,two) -delete from testtr; -NOTICE: tg_op = DELETE -NOTICE: old(2) = (2,one) -NOTICE: new() = (,) -NOTICE: tg_op = DELETE -NOTICE: old(3) = (3,two) -NOTICE: new() = (,) +psql: error: connection to server on socket "/tmp/pg_regress-CdMA0A/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode diff -U3 /builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src/expected/plpgsql_varprops.out /builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src/results/plpgsql_varprops.out --- /builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src/expected/plpgsql_varprops.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/src/pl/plpgsql/src/results/plpgsql_varprops.out 2023-02-20 19:58:24.889257933 -0500 @@ -1,298 +1 @@ --- --- Tests for PL/pgSQL variable properties: CONSTANT, NOT NULL, initializers --- -create type var_record as (f1 int4, f2 int4); -create domain int_nn as int not null; -create domain var_record_nn as var_record not null; -create domain var_record_colnn as var_record check((value).f2 is not null); --- CONSTANT -do $$ -declare x constant int := 42; -begin - raise notice 'x = %', x; -end$$; -NOTICE: x = 42 -do $$ -declare x constant int; -begin - x := 42; -- fail -end$$; -ERROR: variable "x" is declared CONSTANT -LINE 4: x := 42; -- fail - ^ -do $$ -declare x constant int; y int; -begin - for x, y in select 1, 2 loop -- fail - end loop; -end$$; -ERROR: variable "x" is declared CONSTANT -LINE 4: for x, y in select 1, 2 loop -- fail - ^ -do $$ -declare x constant int[]; -begin - x[1] := 42; -- fail -end$$; -ERROR: variable "x" is declared CONSTANT -LINE 4: x[1] := 42; -- fail - ^ -do $$ -declare x constant int[]; y int; -begin - for x[1], y in select 1, 2 loop -- fail (currently, unsupported syntax) - end loop; -end$$; -ERROR: syntax error at or near "[" -LINE 4: for x[1], y in select 1, 2 loop -- fail (currently, unsup... - ^ -do $$ -declare x constant var_record; -begin - x.f1 := 42; -- fail -end$$; -ERROR: variable "x" is declared CONSTANT -LINE 4: x.f1 := 42; -- fail - ^ -do $$ -declare x constant var_record; y int; -begin - for x.f1, y in select 1, 2 loop -- fail - end loop; -end$$; -ERROR: variable "x" is declared CONSTANT -LINE 4: for x.f1, y in select 1, 2 loop -- fail - ^ --- initializer expressions -do $$ -declare x int := sin(0); -begin - raise notice 'x = %', x; -end$$; -NOTICE: x = 0 -do $$ -declare x int := 1/0; -- fail -begin - raise notice 'x = %', x; -end$$; -ERROR: division by zero -CONTEXT: SQL expression "1/0" -PL/pgSQL function inline_code_block line 3 during statement block local variable initialization -do $$ -declare x bigint[] := array[1,3,5]; -begin - raise notice 'x = %', x; -end$$; -NOTICE: x = {1,3,5} -do $$ -declare x record := row(1,2,3); -begin - raise notice 'x = %', x; -end$$; -NOTICE: x = (1,2,3) -do $$ -declare x var_record := row(1,2); -begin - raise notice 'x = %', x; -end$$; -NOTICE: x = (1,2) --- NOT NULL -do $$ -declare x int not null; -- fail -begin - raise notice 'x = %', x; -end$$; -ERROR: variable "x" must have a default value, since it's declared NOT NULL -LINE 2: declare x int not null; -- fail - ^ -do $$ -declare x int not null := 42; -begin - raise notice 'x = %', x; - x := null; -- fail -end$$; -NOTICE: x = 42 -ERROR: null value cannot be assigned to variable "x" declared NOT NULL -CONTEXT: PL/pgSQL function inline_code_block line 5 at assignment -do $$ -declare x int not null := null; -- fail -begin - raise notice 'x = %', x; -end$$; -ERROR: null value cannot be assigned to variable "x" declared NOT NULL -CONTEXT: PL/pgSQL function inline_code_block line 3 during statement block local variable initialization -do $$ -declare x record not null; -- fail -begin - raise notice 'x = %', x; -end$$; -ERROR: variable "x" must have a default value, since it's declared NOT NULL -LINE 2: declare x record not null; -- fail - ^ -do $$ -declare x record not null := row(42); -begin - raise notice 'x = %', x; - x := row(null); -- ok - raise notice 'x = %', x; - x := null; -- fail -end$$; -NOTICE: x = (42) -NOTICE: x = () -ERROR: null value cannot be assigned to variable "x" declared NOT NULL -CONTEXT: PL/pgSQL function inline_code_block line 7 at assignment -do $$ -declare x record not null := null; -- fail -begin - raise notice 'x = %', x; -end$$; -ERROR: null value cannot be assigned to variable "x" declared NOT NULL -CONTEXT: PL/pgSQL function inline_code_block line 3 during statement block local variable initialization -do $$ -declare x var_record not null; -- fail -begin - raise notice 'x = %', x; -end$$; -ERROR: variable "x" must have a default value, since it's declared NOT NULL -LINE 2: declare x var_record not null; -- fail - ^ -do $$ -declare x var_record not null := row(41,42); -begin - raise notice 'x = %', x; - x := row(null,null); -- ok - raise notice 'x = %', x; - x := null; -- fail -end$$; -NOTICE: x = (41,42) -NOTICE: x = (,) -ERROR: null value cannot be assigned to variable "x" declared NOT NULL -CONTEXT: PL/pgSQL function inline_code_block line 7 at assignment -do $$ -declare x var_record not null := null; -- fail -begin - raise notice 'x = %', x; -end$$; -ERROR: null value cannot be assigned to variable "x" declared NOT NULL -CONTEXT: PL/pgSQL function inline_code_block line 3 during statement block local variable initialization --- Check that variables are reinitialized on block re-entry. -do $$ -begin - for i in 1..3 loop - declare - x int; - y int := i; - r record; - c var_record; - begin - if i = 1 then - x := 42; - r := row(i, i+1); - c := row(i, i+1); - end if; - raise notice 'x = %', x; - raise notice 'y = %', y; - raise notice 'r = %', r; - raise notice 'c = %', c; - end; - end loop; -end$$; -NOTICE: x = 42 -NOTICE: y = 1 -NOTICE: r = (1,2) -NOTICE: c = (1,2) -NOTICE: x = -NOTICE: y = 2 -NOTICE: r = -NOTICE: c = -NOTICE: x = -NOTICE: y = 3 -NOTICE: r = -NOTICE: c = --- Check enforcement of domain constraints during initialization -do $$ -declare x int_nn; -- fail -begin - raise notice 'x = %', x; -end$$; -ERROR: domain int_nn does not allow null values -CONTEXT: PL/pgSQL function inline_code_block line 3 during statement block local variable initialization -do $$ -declare x int_nn := null; -- fail -begin - raise notice 'x = %', x; -end$$; -ERROR: domain int_nn does not allow null values -CONTEXT: PL/pgSQL function inline_code_block line 3 during statement block local variable initialization -do $$ -declare x int_nn := 42; -begin - raise notice 'x = %', x; - x := null; -- fail -end$$; -NOTICE: x = 42 -ERROR: domain int_nn does not allow null values -CONTEXT: PL/pgSQL function inline_code_block line 5 at assignment -do $$ -declare x var_record_nn; -- fail -begin - raise notice 'x = %', x; -end$$; -ERROR: domain var_record_nn does not allow null values -CONTEXT: PL/pgSQL function inline_code_block line 3 during statement block local variable initialization -do $$ -declare x var_record_nn := null; -- fail -begin - raise notice 'x = %', x; -end$$; -ERROR: domain var_record_nn does not allow null values -CONTEXT: PL/pgSQL function inline_code_block line 3 during statement block local variable initialization -do $$ -declare x var_record_nn := row(1,2); -begin - raise notice 'x = %', x; - x := row(null,null); -- ok - x := null; -- fail -end$$; -NOTICE: x = (1,2) -ERROR: domain var_record_nn does not allow null values -CONTEXT: PL/pgSQL function inline_code_block line 6 at assignment -do $$ -declare x var_record_colnn; -- fail -begin - raise notice 'x = %', x; -end$$; -ERROR: value for domain var_record_colnn violates check constraint "var_record_colnn_check" -CONTEXT: PL/pgSQL function inline_code_block line 3 during statement block local variable initialization -do $$ -declare x var_record_colnn := null; -- fail -begin - raise notice 'x = %', x; -end$$; -ERROR: value for domain var_record_colnn violates check constraint "var_record_colnn_check" -CONTEXT: PL/pgSQL function inline_code_block line 3 during statement block local variable initialization -do $$ -declare x var_record_colnn := row(1,null); -- fail -begin - raise notice 'x = %', x; -end$$; -ERROR: value for domain var_record_colnn violates check constraint "var_record_colnn_check" -CONTEXT: PL/pgSQL function inline_code_block line 3 during statement block local variable initialization -do $$ -declare x var_record_colnn := row(1,2); -begin - raise notice 'x = %', x; - x := null; -- fail -end$$; -NOTICE: x = (1,2) -ERROR: value for domain var_record_colnn violates check constraint "var_record_colnn_check" -CONTEXT: PL/pgSQL function inline_code_block line 5 at assignment -do $$ -declare x var_record_colnn := row(1,2); -begin - raise notice 'x = %', x; - x := row(null,null); -- fail -end$$; -NOTICE: x = (1,2) -ERROR: value for domain var_record_colnn violates check constraint "var_record_colnn_check" -CONTEXT: PL/pgSQL function inline_code_block line 5 at assignment +psql: error: connection to server on socket "/tmp/pg_regress-CdMA0A/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode make: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib' make -C ../src/backend generated-headers make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend' make -C catalog distprep generated-header-symlinks + run_testsuite contrib + make -k -C contrib MAX_CONNECTIONS=5 check make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make[2]: Nothing to be done for 'distprep'. make[2]: Nothing to be done for 'generated-header-symlinks'. make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/catalog' make -C utils distprep generated-header-symlinks make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils' make[2]: Nothing to be done for 'distprep'. make[2]: Nothing to be done for 'generated-header-symlinks'. make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend/utils' make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/backend' rm -rf '/builddir/build/BUILD/postgresql-14.3'/tmp_install /usr/bin/mkdir -p '/builddir/build/BUILD/postgresql-14.3'/tmp_install/log make -C '..' DESTDIR='/builddir/build/BUILD/postgresql-14.3'/tmp_install install >'/builddir/build/BUILD/postgresql-14.3'/tmp_install/log/install.log 2>&1 make -j1 checkprep >>'/builddir/build/BUILD/postgresql-14.3'/tmp_install/log/install.log 2>&1 make -C adminpack check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/adminpack' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/adminpack:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression adminpack ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 293249 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test adminpack ... ok 877 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ===================== All 1 tests passed. ===================== make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/adminpack' make -C amcheck check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/amcheck' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/amcheck:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression check check_btree check_heap ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 293297 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test check ... ok 727 ms test check_btree ... ok 29208 ms test check_heap ... ok 1346 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ===================== All 3 tests passed. ===================== TAP tests not enabled make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/amcheck' make -C auth_delay check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/auth_delay' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/auth_delay' make -C auto_explain check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/auto_explain' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' TAP tests not enabled make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/auto_explain' make -C bloom check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/bloom' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/bloom:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression bloom ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 293374 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test bloom ... FAILED (test process exited with exit code 2) 14857 ms ============== shutting down postmaster ============== ====================== 1 of 1 tests failed. ====================== The differences that caused some tests to fail can be viewed in the file "/builddir/build/BUILD/postgresql-14.3/contrib/bloom/regression.diffs". A copy of the test summary that you see above is saved in the file "/builddir/build/BUILD/postgresql-14.3/contrib/bloom/regression.out". make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/bloom' make[1]: *** [../../src/makefiles/pgxs.mk:451: check] Error 1 make: *** [Makefile:94: check-bloom-recurse] Error 2 make -C btree_gin check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gin' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/btree_gin:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression install_btree_gin int2 int4 int8 float4 float8 money oid timestamp timestamptz time timetz date interval macaddr macaddr8 inet cidr text varchar char bytea bit varbit numeric enum uuid name bool bpchar ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 293434 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test install_btree_gin ... ok 1245 ms test int2 ... ok 584 ms test int4 ... ok 552 ms test int8 ... ok 521 ms test float4 ... ok 622 ms test float8 ... ok 609 ms test money ... ok 639 ms test oid ... ok 556 ms test timestamp ... ok 502 ms test timestamptz ... ok 504 ms test time ... ok 534 ms test timetz ... ok 529 ms test date ... ok 465 ms test interval ... ok 586 ms test macaddr ... ok 551 ms test macaddr8 ... ok 505 ms test inet ... ok 548 ms test cidr ... ok 578 ms test text ... ok 546 ms test varchar ... ok 511 ms test char ... ok 535 ms test bytea ... ok 475 ms test bit ... ok 495 ms test varbit ... ok 550 ms test numeric ... ok 534 ms test enum ... ok 3499 ms test uuid ... ok 565 ms test name ... ok 690 ms test bool ... ok 3499 ms test bpchar ... ok 544 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ====================== All 30 tests passed. ====================== make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gin' make -C btree_gist check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression init int2 int4 int8 float4 float8 cash oid timestamp timestamptz time timetz date interval macaddr macaddr8 inet cidr text varchar char bytea bit varbit numeric uuid not_equal enum ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 293598 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test init ... ok 1976 ms test int2 ... ok 741 ms test int4 ... ok 725 ms test int8 ... ok 684 ms test float4 ... ok 624 ms test float8 ... ok 628 ms test cash ... ok 722 ms test oid ... ok 598 ms test timestamp ... ok 846 ms test timestamptz ... ok 957 ms test time ... ok 655 ms test timetz ... FAILED (test process exited with exit code 2) 18389 ms test date ... FAILED (test process exited with exit code 2) 325 ms test interval ... ok 1103 ms test macaddr ... ok 728 ms test macaddr8 ... ok 613 ms test inet ... ok 753 ms test cidr ... ok 587 ms test text ... ok 741 ms test varchar ... ok 735 ms test char ... ok 788 ms test bytea ... ok 752 ms test bit ... ok 718 ms test varbit ... ok 669 ms test numeric ... ok 1085 ms test uuid ... ok 644 ms test not_equal ... ok 893 ms test enum ... ok 749 ms ============== shutting down postmaster ============== ======================= 2 of 28 tests failed. ======================= The differences that caused some tests to fail can be viewed in the file "/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist/regression.diffs". A copy of the test summary that you see above is saved in the file "/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist/regression.out". make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/btree_gist' make[1]: *** [../../src/makefiles/pgxs.mk:451: check] Error 1 make: *** [Makefile:94: check-btree_gist-recurse] Error 2 make -C citext check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/citext' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/citext:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression citext ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 293775 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test citext ... ok 3624 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ===================== All 1 tests passed. ===================== make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/citext' make -C cube check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/cube' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/cube:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression cube cube_sci ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 293823 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test cube ... ok 3631 ms test cube_sci ... ok 478 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ===================== All 2 tests passed. ===================== make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/cube' make -C dblink check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/dblink' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/dblink:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dlpath=../../src/test/regress --dbname=contrib_regression paths dblink ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 293874 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test paths ... ok 523 ms test dblink ... ok 5277 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ===================== All 2 tests passed. ===================== make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/dblink' make -C dict_int check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/dict_int' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/dict_int:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression dict_int ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 293945 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test dict_int ... ok 864 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ===================== All 1 tests passed. ===================== make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/dict_int' make -C dict_xsyn check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/dict_xsyn' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/dict_xsyn:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression dict_xsyn ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 293992 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test dict_xsyn ... ok 637 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ===================== All 1 tests passed. ===================== make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/dict_xsyn' make -C earthdistance check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/earthdistance' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/earthdistance:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression earthdistance ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 294039 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test earthdistance ... ok 4845 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ===================== All 1 tests passed. ===================== make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/earthdistance' make -C file_fdw check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/file_fdw' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/file_fdw:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression file_fdw ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 294087 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test file_fdw ... ok 1923 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ===================== All 1 tests passed. ===================== make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/file_fdw' make -C fuzzystrmatch check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/fuzzystrmatch' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/fuzzystrmatch:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression fuzzystrmatch ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 294134 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test fuzzystrmatch ... ok 694 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ===================== All 1 tests passed. ===================== make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/fuzzystrmatch' make -C hstore check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/hstore:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression hstore ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 294181 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test hstore ... FAILED (test process exited with exit code 2) 21247 ms ============== shutting down postmaster ============== ====================== 1 of 1 tests failed. ====================== The differences that caused some tests to fail can be viewed in the file "/builddir/build/BUILD/postgresql-14.3/contrib/hstore/regression.diffs". A copy of the test summary that you see above is saved in the file "/builddir/build/BUILD/postgresql-14.3/contrib/hstore/regression.out". make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore' make[1]: *** [../../src/makefiles/pgxs.mk:451: check] Error 1 make -C intagg check make: *** [Makefile:94: check-hstore-recurse] Error 2 make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/intagg' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/intagg' make -C intarray check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/intarray' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/intarray:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression _int ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 294250 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test _int ... FAILED (test process exited with exit code 2) 24612 ms ============== shutting down postmaster ============== ====================== 1 of 1 tests failed. ====================== The differences that caused some tests to fail can be viewed in the file "/builddir/build/BUILD/postgresql-14.3/contrib/intarray/regression.diffs". A copy of the test summary that you see above is saved in the file "/builddir/build/BUILD/postgresql-14.3/contrib/intarray/regression.out". make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/intarray' make -C isn check make[1]: *** [../../src/makefiles/pgxs.mk:451: check] Error 1 make: *** [Makefile:94: check-intarray-recurse] Error 2 make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/isn' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/isn:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression isn ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 294309 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test isn ... ok 3294 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ===================== All 1 tests passed. ===================== make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/isn' make -C lo check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/lo' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/lo:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression lo ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 294357 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test lo ... ok 997 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ===================== All 1 tests passed. ===================== make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/lo' make -C ltree check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/ltree:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression ltree ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 294405 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test ltree ... FAILED (test process exited with exit code 2) 20354 ms ============== shutting down postmaster ============== ====================== 1 of 1 tests failed. ====================== The differences that caused some tests to fail can be viewed in the file "/builddir/build/BUILD/postgresql-14.3/contrib/ltree/regression.diffs". A copy of the test summary that you see above is saved in the file "/builddir/build/BUILD/postgresql-14.3/contrib/ltree/regression.out". make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree' make[1]: *** [../../src/makefiles/pgxs.mk:451: check] Error 1 make: *** [Makefile:94: check-ltree-recurse] Error 2 make -C oid2name check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/oid2name' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' TAP tests not enabled make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/oid2name' make -C old_snapshot check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/old_snapshot' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/old_snapshot' make -C pageinspect check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression page btree brin gin gist hash checksum oldextversions ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 294483 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test page ... ok 1345 ms test btree ... ok 661 ms test brin ... ok 594 ms test gin ... ok 2629 ms test gist ... ok 726 ms test hash ... ok 841 ms test checksum ... ok 444 ms test oldextversions ... ok 768 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ===================== All 8 tests passed. ===================== make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pageinspect' make -C passwordcheck check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/passwordcheck' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/passwordcheck:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression passwordcheck ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 294559 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test passwordcheck ... ok 649 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ===================== All 1 tests passed. ===================== make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/passwordcheck' make -C pg_buffercache check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_buffercache' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_buffercache' make -C pg_freespacemap check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_freespacemap' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_freespacemap' make -C pg_prewarm check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_prewarm' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_prewarm' make -C pg_stat_statements check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_stat_statements' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/pg_stat_statements:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --temp-config ../../contrib/pg_stat_statements/pg_stat_statements.conf --dbname=contrib_regression pg_stat_statements ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 294636 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test pg_stat_statements ... ok 2494 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ===================== All 1 tests passed. ===================== make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_stat_statements' make -C pg_surgery check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_surgery' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/pg_surgery:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression heap_surgery ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 294686 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test heap_surgery ... ok 1167 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ===================== All 1 tests passed. ===================== make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_surgery' make -C pg_trgm check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_trgm' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/pg_trgm:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression pg_trgm pg_word_trgm pg_strict_word_trgm ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 294733 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test pg_trgm ... ok 7651 ms test pg_word_trgm ... ok 1083 ms test pg_strict_word_trgm ... ok 1122 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ===================== All 3 tests passed. ===================== make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_trgm' make -C pgcrypto check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression init md5 sha1 hmac-md5 hmac-sha1 rijndael sha2 crypt-md5 pgp-armor pgp-decrypt pgp-encrypt pgp-compression pgp-pubkey-decrypt pgp-pubkey-encrypt pgp-info ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 294789 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test init ... ok 748 ms test md5 ... ok 435 ms test sha1 ... ok 501 ms test hmac-md5 ... ok 442 ms test hmac-sha1 ... ok 577 ms test rijndael ... ok 419 ms test sha2 ... ok 687 ms test crypt-md5 ... ok 706 ms test pgp-armor ... ok 735 ms test pgp-decrypt ... ok 938 ms test pgp-encrypt ... ok 10861 ms test pgp-compression ... ok 792 ms test pgp-pubkey-decrypt ... ok 1162 ms test pgp-pubkey-encrypt ... ok 896 ms test pgp-info ... ok 681 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ====================== All 15 tests passed. ====================== make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgcrypto' make -C pgrowlocks check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgrowlocks' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgrowlocks' make -C pgstattuple check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgstattuple' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/pgstattuple:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression pgstattuple ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 294902 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test pgstattuple ... ok 1411 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ===================== All 1 tests passed. ===================== make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pgstattuple' make -C pg_visibility check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_visibility' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/pg_visibility:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression pg_visibility ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 294950 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test pg_visibility ... ok 2124 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ===================== All 1 tests passed. ===================== make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/pg_visibility' make -C postgres_fdw check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/postgres_fdw' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/postgres_fdw:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression postgres_fdw ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 294998 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test postgres_fdw ... FAILED (test process exited with exit code 2) 51178 ms ============== shutting down postmaster ============== ====================== 1 of 1 tests failed. ====================== The differences that caused some tests to fail can be viewed in the file "/builddir/build/BUILD/postgresql-14.3/contrib/postgres_fdw/regression.diffs". A copy of the test summary that you see above is saved in the file "/builddir/build/BUILD/postgresql-14.3/contrib/postgres_fdw/regression.out". make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/postgres_fdw' make[1]: *** [../../src/makefiles/pgxs.mk:451: check] Error 1 make: *** [Makefile:94: check-postgres_fdw-recurse] Error 2 make -C seg check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/seg' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/seg:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression seg ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 295080 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test seg ... ok 1913 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ===================== All 1 tests passed. ===================== make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/seg' make -C spi check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/spi' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/spi' make -C tablefunc check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/tablefunc' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/tablefunc:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression tablefunc ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 295137 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test tablefunc ... ok 1693 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ===================== All 1 tests passed. ===================== make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/tablefunc' make -C tcn check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/tcn' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/tcn' make -C test_decoding check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/test_decoding' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/test_decoding:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --temp-config ../../contrib/test_decoding/logical.conf --dbname=contrib_regression ddl xact rewrite toast permissions decoding_in_xact decoding_into_rel binary prepared replorigin time messages spill slot truncate stream stats twophase twophase_stream ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 295194 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test ddl ... ok 27758 ms test xact ... ok 637 ms test rewrite ... ok 4854 ms test toast ... ok 7568 ms test permissions ... ok 817 ms test decoding_in_xact ... ok 743 ms test decoding_into_rel ... ok 909 ms test binary ... ok 515 ms test prepared ... ok 684 ms test replorigin ... ok 1050 ms test time ... ok 580 ms test messages ... ok 885 ms test spill ... ok 60720 ms test slot ... ok 1615 ms test truncate ... ok 610 ms test stream ... ok 921 ms test stats ... ok 2644 ms test twophase ... ok 1843 ms test twophase_stream ... ok 808 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ====================== All 19 tests passed. ====================== PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/test_decoding:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/isolation/pg_isolation_regress --temp-instance=./tmp_check_iso --inputdir=. --outputdir=output_iso --bindir= --temp-config ../../contrib/test_decoding/logical.conf --dbname=isolation_regression mxact delayed_startup ondisk_startup concurrent_ddl_dml oldest_xmin snapshot_transfer subxact_without_top concurrent_stream twophase_snapshot ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 295311 ============== creating database "isolation_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test mxact ... ok 1491 ms test delayed_startup ... ok 1084 ms test ondisk_startup ... ok 1568 ms test concurrent_ddl_dml ... ok 5346 ms test oldest_xmin ... ok 1171 ms test snapshot_transfer ... ok 983 ms test subxact_without_top ... ok 1111 ms test concurrent_stream ... ok 5636 ms test twophase_snapshot ... ok 1326 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ===================== All 9 tests passed. ===================== TAP tests not enabled make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/test_decoding' make -C tsm_system_rows check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/tsm_system_rows' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/tsm_system_rows:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression tsm_system_rows ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 295416 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test tsm_system_rows ... ok 924 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ===================== All 1 tests passed. ===================== make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/tsm_system_rows' make -C tsm_system_time check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/tsm_system_time' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/tsm_system_time:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression tsm_system_time ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 295465 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test tsm_system_time ... ok 862 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ===================== All 1 tests passed. ===================== make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/tsm_system_time' make -C unaccent check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/unaccent' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/unaccent:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --encoding=UTF8 --no-locale --dbname=contrib_regression unaccent ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 295512 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test unaccent ... ok 669 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ===================== All 1 tests passed. ===================== make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/unaccent' make -C vacuumlo check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/vacuumlo' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' TAP tests not enabled make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/vacuumlo' make -C sslinfo check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/sslinfo' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/sslinfo' make -C uuid-ossp check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/uuid-ossp' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/uuid-ossp:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression uuid_ossp ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 295580 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test uuid_ossp ... ok 910 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ===================== All 1 tests passed. ===================== make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/uuid-ossp' make -C xml2 check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/xml2' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/xml2:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression xml2 ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 295627 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test xml2 ... ok 1033 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ===================== All 1 tests passed. ===================== make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/xml2' make -C sepgsql check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/sepgsql' make -C bool_plperl check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/bool_plperl' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/bool_plperl:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression bool_plperl bool_plperlu ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 295684 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test bool_plperl ... ok 2132 ms test bool_plperlu ... ok 862 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ===================== All 2 tests passed. ===================== make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/bool_plperl' make -C hstore_plperl check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore_plperl' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/hstore_plperl:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression hstore_plperl hstore_plperlu create_transform ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 295737 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test hstore_plperl ... ok 2246 ms test hstore_plperlu ... ok 2284 ms test create_transform ... ok 1280 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ===================== All 3 tests passed. ===================== make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore_plperl' make -C jsonb_plperl check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/jsonb_plperl' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/jsonb_plperl:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression jsonb_plperl jsonb_plperlu ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 295793 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test jsonb_plperl ... ok 1393 ms test jsonb_plperlu ... ok 1276 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ===================== All 2 tests passed. ===================== make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/jsonb_plperl' make -C hstore_plpython check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore_plpython' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' /usr/bin/mkdir -p sql/python3 expected/python3 results/python3 for file in ./sql/hstore_plpython.sql ./expected/hstore_plpython*.out; do \ sed \ -e "s///g" \ -e "s///g" \ -e "s/\([0-9][0-9]*\)L/\1/g" \ -e 's/\([ [{]\)u"/\1"/g' \ -e "s/\([ [{]\)u'/\1'/g" \ -e "s/def next/def __next__/g" \ -e "s/LANGUAGE plpythonu/LANGUAGE plpython3u/g" \ -e "s/LANGUAGE plpython2u/LANGUAGE plpython3u/g" \ -e "s/EXTENSION plpythonu/EXTENSION plpython3u/g" \ -e "s/EXTENSION plpython2u/EXTENSION plpython3u/g" \ -e "s/EXTENSION \([^ ]*\)_plpythonu/EXTENSION \1_plpython3u/g" \ -e "s/EXTENSION \([^ ]*\)_plpython2u/EXTENSION \1_plpython3u/g" \ -e 's/installing required extension "plpython2u"/installing required extension "plpython3u"/g' \ $file >`echo $file | sed 's,^.*/\([^/][^/]*/\)\([^/][^/]*\)$,\1python3/\2,'` || exit; \ done PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/hstore_plpython:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression --load-extension=hstore python3/hstore_plpython ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 295855 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== installing hstore ============== CREATE EXTENSION ============== running regression test queries ============== test python3/hstore_plpython ... ok 1509 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ===================== All 1 tests passed. ===================== make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/hstore_plpython' make -C jsonb_plpython check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/jsonb_plpython' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' /usr/bin/mkdir -p sql/python3 expected/python3 results/python3 for file in ./sql/jsonb_plpython.sql ./expected/jsonb_plpython*.out; do \ sed \ -e "s///g" \ -e "s///g" \ -e "s/\([0-9][0-9]*\)L/\1/g" \ -e 's/\([ [{]\)u"/\1"/g' \ -e "s/\([ [{]\)u'/\1'/g" \ -e "s/def next/def __next__/g" \ -e "s/LANGUAGE plpythonu/LANGUAGE plpython3u/g" \ -e "s/LANGUAGE plpython2u/LANGUAGE plpython3u/g" \ -e "s/EXTENSION plpythonu/EXTENSION plpython3u/g" \ -e "s/EXTENSION plpython2u/EXTENSION plpython3u/g" \ -e "s/EXTENSION \([^ ]*\)_plpythonu/EXTENSION \1_plpython3u/g" \ -e "s/EXTENSION \([^ ]*\)_plpython2u/EXTENSION \1_plpython3u/g" \ -e 's/installing required extension "plpython2u"/installing required extension "plpython3u"/g' \ $file >`echo $file | sed 's,^.*/\([^/][^/]*/\)\([^/][^/]*\)$,\1python3/\2,'` || exit; \ done PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/jsonb_plpython:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression python3/jsonb_plpython ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 295914 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test python3/jsonb_plpython ... ok 1570 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ===================== All 1 tests passed. ===================== make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/jsonb_plpython' make -C ltree_plpython check make[1]: Entering directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree_plpython' make -C ../../src/test/regress pg_regress make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/regress' make -C ../../src/test/isolation all make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' make -C ../../../src/interfaces/libpq all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[4]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/interfaces/libpq' make -C ../../../src/port all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/port' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/port' make -C ../../../src/common all make[3]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/common' make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/test/isolation' /usr/bin/mkdir -p sql/python3 expected/python3 results/python3 for file in ./sql/ltree_plpython.sql ./expected/ltree_plpython*.out; do \ sed \ -e "s///g" \ -e "s///g" \ -e "s/\([0-9][0-9]*\)L/\1/g" \ -e 's/\([ [{]\)u"/\1"/g' \ -e "s/\([ [{]\)u'/\1'/g" \ -e "s/def next/def __next__/g" \ -e "s/LANGUAGE plpythonu/LANGUAGE plpython3u/g" \ -e "s/LANGUAGE plpython2u/LANGUAGE plpython3u/g" \ -e "s/EXTENSION plpythonu/EXTENSION plpython3u/g" \ -e "s/EXTENSION plpython2u/EXTENSION plpython3u/g" \ -e "s/EXTENSION \([^ ]*\)_plpythonu/EXTENSION \1_plpython3u/g" \ -e "s/EXTENSION \([^ ]*\)_plpython2u/EXTENSION \1_plpython3u/g" \ -e 's/installing required extension "plpython2u"/installing required extension "plpython3u"/g' \ $file >`echo $file | sed 's,^.*/\([^/][^/]*/\)\([^/][^/]*\)$,\1python3/\2,'` || exit; \ done PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/bin:/builddir/build/BUILD/postgresql-14.3/contrib/ltree_plpython:$PATH" LD_LIBRARY_PATH="/builddir/build/BUILD/postgresql-14.3/tmp_install/usr/lib64" ../../src/test/regress/pg_regress --temp-instance=./tmp_check --inputdir=. --bindir= --dbname=contrib_regression --load-extension=ltree python3/ltree_plpython ============== creating temporary instance ============== ============== initializing database system ============== ============== starting postmaster ============== running on port 58083 with PID 295971 ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== installing ltree ============== CREATE EXTENSION ============== running regression test queries ============== test python3/ltree_plpython ... ok 1052 ms ============== shutting down postmaster ============== ============== removing temporary instance ============== ===================== All 1 tests passed. ===================== make[1]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib/ltree_plpython' make: Leaving directory '/builddir/build/BUILD/postgresql-14.3/contrib' make: Target 'check' not remade because of errors. + test_failure=1 + set +x === trying to find all regression.diffs files in build directory === === make failure: contrib/intarray/regression.diffs === diff -U3 /builddir/build/BUILD/postgresql-14.3/contrib/intarray/expected/_int.out /builddir/build/BUILD/postgresql-14.3/contrib/intarray/results/_int.out --- /builddir/build/BUILD/postgresql-14.3/contrib/intarray/expected/_int.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/contrib/intarray/results/_int.out 2023-02-20 20:16:17.099321214 -0500 @@ -506,353 +506,7 @@ (1 row) SELECT count(*) from test__int WHERE a <@ '{73,23,20}'; - count -------- - 10 -(1 row) - -SELECT count(*) from test__int WHERE a = '{73,23,20}'; - count -------- - 1 -(1 row) - -SELECT count(*) from test__int WHERE a @@ '50&68'; - count -------- - 9 -(1 row) - -SELECT count(*) from test__int WHERE a @> '{20,23}' or a @> '{50,68}'; - count -------- - 21 -(1 row) - -SELECT count(*) from test__int WHERE a @@ '(20&23)|(50&68)'; - count -------- - 21 -(1 row) - -SELECT count(*) from test__int WHERE a @@ '20 | !21'; - count -------- - 6566 -(1 row) - -SELECT count(*) from test__int WHERE a @@ '!20 & !21'; - count -------- - 6343 -(1 row) - -DROP INDEX text_idx; -CREATE INDEX text_idx on test__int using gist (a gist__int_ops(numranges = 0)); -ERROR: value 0 out of bounds for option "numranges" -DETAIL: Valid values are between "1" and "252". -CREATE INDEX text_idx on test__int using gist (a gist__int_ops(numranges = 253)); -ERROR: value 253 out of bounds for option "numranges" -DETAIL: Valid values are between "1" and "252". -CREATE INDEX text_idx on test__int using gist (a gist__int_ops(numranges = 252)); -SELECT count(*) from test__int WHERE a && '{23,50}'; - count -------- - 403 -(1 row) - -SELECT count(*) from test__int WHERE a @@ '23|50'; - count -------- - 403 -(1 row) - -SELECT count(*) from test__int WHERE a @> '{23,50}'; - count -------- - 12 -(1 row) - -SELECT count(*) from test__int WHERE a @@ '23&50'; - count -------- - 12 -(1 row) - -SELECT count(*) from test__int WHERE a @> '{20,23}'; - count -------- - 12 -(1 row) - -SELECT count(*) from test__int WHERE a <@ '{73,23,20}'; - count -------- - 10 -(1 row) - -SELECT count(*) from test__int WHERE a = '{73,23,20}'; - count -------- - 1 -(1 row) - -SELECT count(*) from test__int WHERE a @@ '50&68'; - count -------- - 9 -(1 row) - -SELECT count(*) from test__int WHERE a @> '{20,23}' or a @> '{50,68}'; - count -------- - 21 -(1 row) - -SELECT count(*) from test__int WHERE a @@ '(20&23)|(50&68)'; - count -------- - 21 -(1 row) - -SELECT count(*) from test__int WHERE a @@ '20 | !21'; - count -------- - 6566 -(1 row) - -SELECT count(*) from test__int WHERE a @@ '!20 & !21'; - count -------- - 6343 -(1 row) - -DROP INDEX text_idx; -CREATE INDEX text_idx on test__int using gist (a gist__intbig_ops(siglen = 0)); -ERROR: value 0 out of bounds for option "siglen" -DETAIL: Valid values are between "1" and "2024". -CREATE INDEX text_idx on test__int using gist (a gist__intbig_ops(siglen = 2025)); -ERROR: value 2025 out of bounds for option "siglen" -DETAIL: Valid values are between "1" and "2024". -CREATE INDEX text_idx on test__int using gist (a gist__intbig_ops(siglen = 2024)); -SELECT count(*) from test__int WHERE a && '{23,50}'; - count -------- - 403 -(1 row) - -SELECT count(*) from test__int WHERE a @@ '23|50'; - count -------- - 403 -(1 row) - -SELECT count(*) from test__int WHERE a @> '{23,50}'; - count -------- - 12 -(1 row) - -SELECT count(*) from test__int WHERE a @@ '23&50'; - count -------- - 12 -(1 row) - -SELECT count(*) from test__int WHERE a @> '{20,23}'; - count -------- - 12 -(1 row) - -SELECT count(*) from test__int WHERE a <@ '{73,23,20}'; - count -------- - 10 -(1 row) - -SELECT count(*) from test__int WHERE a = '{73,23,20}'; - count -------- - 1 -(1 row) - -SELECT count(*) from test__int WHERE a @@ '50&68'; - count -------- - 9 -(1 row) - -SELECT count(*) from test__int WHERE a @> '{20,23}' or a @> '{50,68}'; - count -------- - 21 -(1 row) - -SELECT count(*) from test__int WHERE a @@ '(20&23)|(50&68)'; - count -------- - 21 -(1 row) - -SELECT count(*) from test__int WHERE a @@ '20 | !21'; - count -------- - 6566 -(1 row) - -SELECT count(*) from test__int WHERE a @@ '!20 & !21'; - count -------- - 6343 -(1 row) - -DROP INDEX text_idx; -CREATE INDEX text_idx on test__int using gist ( a gist__intbig_ops ); -SELECT count(*) from test__int WHERE a && '{23,50}'; - count -------- - 403 -(1 row) - -SELECT count(*) from test__int WHERE a @@ '23|50'; - count -------- - 403 -(1 row) - -SELECT count(*) from test__int WHERE a @> '{23,50}'; - count -------- - 12 -(1 row) - -SELECT count(*) from test__int WHERE a @@ '23&50'; - count -------- - 12 -(1 row) - -SELECT count(*) from test__int WHERE a @> '{20,23}'; - count -------- - 12 -(1 row) - -SELECT count(*) from test__int WHERE a <@ '{73,23,20}'; - count -------- - 10 -(1 row) - -SELECT count(*) from test__int WHERE a = '{73,23,20}'; - count -------- - 1 -(1 row) - -SELECT count(*) from test__int WHERE a @@ '50&68'; - count -------- - 9 -(1 row) - -SELECT count(*) from test__int WHERE a @> '{20,23}' or a @> '{50,68}'; - count -------- - 21 -(1 row) - -SELECT count(*) from test__int WHERE a @@ '(20&23)|(50&68)'; - count -------- - 21 -(1 row) - -SELECT count(*) from test__int WHERE a @@ '20 | !21'; - count -------- - 6566 -(1 row) - -SELECT count(*) from test__int WHERE a @@ '!20 & !21'; - count -------- - 6343 -(1 row) - -DROP INDEX text_idx; -CREATE INDEX text_idx on test__int using gin ( a gin__int_ops ); -SELECT count(*) from test__int WHERE a && '{23,50}'; - count -------- - 403 -(1 row) - -SELECT count(*) from test__int WHERE a @@ '23|50'; - count -------- - 403 -(1 row) - -SELECT count(*) from test__int WHERE a @> '{23,50}'; - count -------- - 12 -(1 row) - -SELECT count(*) from test__int WHERE a @@ '23&50'; - count -------- - 12 -(1 row) - -SELECT count(*) from test__int WHERE a @> '{20,23}'; - count -------- - 12 -(1 row) - -SELECT count(*) from test__int WHERE a <@ '{73,23,20}'; - count -------- - 10 -(1 row) - -SELECT count(*) from test__int WHERE a = '{73,23,20}'; - count -------- - 1 -(1 row) - -SELECT count(*) from test__int WHERE a @@ '50&68'; - count -------- - 9 -(1 row) - -SELECT count(*) from test__int WHERE a @> '{20,23}' or a @> '{50,68}'; - count -------- - 21 -(1 row) - -SELECT count(*) from test__int WHERE a @@ '(20&23)|(50&68)'; - count -------- - 21 -(1 row) - -SELECT count(*) from test__int WHERE a @@ '20 | !21'; - count -------- - 6566 -(1 row) - -SELECT count(*) from test__int WHERE a @@ '!20 & !21'; - count -------- - 6343 -(1 row) - -RESET enable_seqscan; +server closed the connection unexpectedly + This probably means the server terminated abnormally + before or while processing the request. +connection to server was lost === make failure: contrib/btree_gist/regression.diffs === diff -U3 /builddir/build/BUILD/postgresql-14.3/contrib/btree_gist/expected/timetz.out /builddir/build/BUILD/postgresql-14.3/contrib/btree_gist/results/timetz.out --- /builddir/build/BUILD/postgresql-14.3/contrib/btree_gist/expected/timetz.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/contrib/btree_gist/results/timetz.out 2023-02-20 20:10:20.759311666 -0500 @@ -21,23 +21,7 @@ CREATE INDEX timetzidx ON timetztmp USING gist ( a ); SET enable_seqscan=off; UPDATE timetzcmp SET b=c FROM ( SELECT count(*) AS c FROM timetztmp WHERE a < '07:46:45 GMT+3'::timetz ) q WHERE r_id=1 ; -UPDATE timetzcmp SET b=c FROM ( SELECT count(*) AS c FROM timetztmp WHERE a <= '07:46:45 GMT+3'::timetz ) q WHERE r_id=2 ; -UPDATE timetzcmp SET b=c FROM ( SELECT count(*) AS c FROM timetztmp WHERE a = '07:46:45 GMT+3'::timetz ) q WHERE r_id=3 ; -UPDATE timetzcmp SET b=c FROM ( SELECT count(*) AS c FROM timetztmp WHERE a >= '07:46:45 GMT+3'::timetz ) q WHERE r_id=4 ; -UPDATE timetzcmp SET b=c FROM ( SELECT count(*) AS c FROM timetztmp WHERE a > '07:46:45 GMT+3'::timetz ) q WHERE r_id=5 ; -UPDATE timetzcmp SET b=c FROM ( SELECT count(*) AS c FROM timetztmp WHERE a < '07:46:45 GMT+2'::timetz ) q WHERE r_id=11 ; -UPDATE timetzcmp SET b=c FROM ( SELECT count(*) AS c FROM timetztmp WHERE a <= '07:46:45 GMT+2'::timetz ) q WHERE r_id=12 ; -UPDATE timetzcmp SET b=c FROM ( SELECT count(*) AS c FROM timetztmp WHERE a = '07:46:45 GMT+2'::timetz ) q WHERE r_id=13 ; -UPDATE timetzcmp SET b=c FROM ( SELECT count(*) AS c FROM timetztmp WHERE a >= '07:46:45 GMT+2'::timetz ) q WHERE r_id=14 ; -UPDATE timetzcmp SET b=c FROM ( SELECT count(*) AS c FROM timetztmp WHERE a > '07:46:45 GMT+2'::timetz ) q WHERE r_id=15 ; -UPDATE timetzcmp SET b=c FROM ( SELECT count(*) AS c FROM timetztmp WHERE a < '07:46:45 GMT+4'::timetz ) q WHERE r_id=21 ; -UPDATE timetzcmp SET b=c FROM ( SELECT count(*) AS c FROM timetztmp WHERE a <= '07:46:45 GMT+4'::timetz ) q WHERE r_id=22 ; -UPDATE timetzcmp SET b=c FROM ( SELECT count(*) AS c FROM timetztmp WHERE a = '07:46:45 GMT+4'::timetz ) q WHERE r_id=23 ; -UPDATE timetzcmp SET b=c FROM ( SELECT count(*) AS c FROM timetztmp WHERE a >= '07:46:45 GMT+4'::timetz ) q WHERE r_id=24 ; -UPDATE timetzcmp SET b=c FROM ( SELECT count(*) AS c FROM timetztmp WHERE a > '07:46:45 GMT+4'::timetz ) q WHERE r_id=25 ; -SELECT count(*) FROM timetzcmp WHERE a=b; - count -------- - 15 -(1 row) - +server closed the connection unexpectedly + This probably means the server terminated abnormally + before or while processing the request. +connection to server was lost diff -U3 /builddir/build/BUILD/postgresql-14.3/contrib/btree_gist/expected/date.out /builddir/build/BUILD/postgresql-14.3/contrib/btree_gist/results/date.out --- /builddir/build/BUILD/postgresql-14.3/contrib/btree_gist/expected/date.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/contrib/btree_gist/results/date.out 2023-02-20 20:10:21.609311688 -0500 @@ -1,91 +1 @@ --- date check -CREATE TABLE datetmp (a date); -\copy datetmp from 'data/date.data' -SET enable_seqscan=on; -SELECT count(*) FROM datetmp WHERE a < '2001-02-13'; - count -------- - 230 -(1 row) - -SELECT count(*) FROM datetmp WHERE a <= '2001-02-13'; - count -------- - 231 -(1 row) - -SELECT count(*) FROM datetmp WHERE a = '2001-02-13'; - count -------- - 1 -(1 row) - -SELECT count(*) FROM datetmp WHERE a >= '2001-02-13'; - count -------- - 314 -(1 row) - -SELECT count(*) FROM datetmp WHERE a > '2001-02-13'; - count -------- - 313 -(1 row) - -SELECT a, a <-> '2001-02-13' FROM datetmp ORDER BY a <-> '2001-02-13' LIMIT 3; - a | ?column? -------------+---------- - 02-13-2001 | 0 - 02-11-2001 | 2 - 03-24-2001 | 39 -(3 rows) - -CREATE INDEX dateidx ON datetmp USING gist ( a ); -SET enable_seqscan=off; -SELECT count(*) FROM datetmp WHERE a < '2001-02-13'::date; - count -------- - 230 -(1 row) - -SELECT count(*) FROM datetmp WHERE a <= '2001-02-13'::date; - count -------- - 231 -(1 row) - -SELECT count(*) FROM datetmp WHERE a = '2001-02-13'::date; - count -------- - 1 -(1 row) - -SELECT count(*) FROM datetmp WHERE a >= '2001-02-13'::date; - count -------- - 314 -(1 row) - -SELECT count(*) FROM datetmp WHERE a > '2001-02-13'::date; - count -------- - 313 -(1 row) - -EXPLAIN (COSTS OFF) -SELECT a, a <-> '2001-02-13' FROM datetmp ORDER BY a <-> '2001-02-13' LIMIT 3; - QUERY PLAN ------------------------------------------------- - Limit - -> Index Only Scan using dateidx on datetmp - Order By: (a <-> '02-13-2001'::date) -(3 rows) - -SELECT a, a <-> '2001-02-13' FROM datetmp ORDER BY a <-> '2001-02-13' LIMIT 3; - a | ?column? -------------+---------- - 02-13-2001 | 0 - 02-11-2001 | 2 - 03-24-2001 | 39 -(3 rows) - +psql: error: connection to server on socket "/tmp/pg_regress-D9ggov/.s.PGSQL.58083" failed: FATAL: the database system is in recovery mode === make failure: contrib/postgres_fdw/regression.diffs === diff -U3 /builddir/build/BUILD/postgresql-14.3/contrib/postgres_fdw/expected/postgres_fdw.out /builddir/build/BUILD/postgresql-14.3/contrib/postgres_fdw/results/postgres_fdw.out --- /builddir/build/BUILD/postgresql-14.3/contrib/postgres_fdw/expected/postgres_fdw.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/contrib/postgres_fdw/results/postgres_fdw.out 2023-02-20 20:24:12.209333944 -0500 @@ -7697,3098 +7697,7 @@ (1 row) update bar set f2 = null where current of c; -ERROR: WHERE CURRENT OF is not supported for this table type -rollback; -explain (verbose, costs off) -delete from foo where f1 < 5 returning *; - QUERY PLAN --------------------------------------------------------------------------------------- - Delete on public.foo - Output: foo_1.f1, foo_1.f2 - Delete on public.foo foo_1 - Foreign Delete on public.foo2 foo_2 - -> Append - -> Index Scan using i_foo_f1 on public.foo foo_1 - Output: foo_1.tableoid, foo_1.ctid - Index Cond: (foo_1.f1 < 5) - -> Foreign Delete on public.foo2 foo_2 - Remote SQL: DELETE FROM public.loct1 WHERE ((f1 < 5)) RETURNING f1, f2 -(10 rows) - -delete from foo where f1 < 5 returning *; - f1 | f2 -----+---- - 1 | 1 - 3 | 3 - 0 | 0 - 2 | 2 - 4 | 4 -(5 rows) - -explain (verbose, costs off) -update bar set f2 = f2 + 100 returning *; - QUERY PLAN ------------------------------------------------------------------------------------------- - Update on public.bar - Output: bar_1.f1, bar_1.f2 - Update on public.bar bar_1 - Foreign Update on public.bar2 bar_2 - -> Result - Output: (bar.f2 + 100), bar.tableoid, bar.ctid, (NULL::record) - -> Append - -> Seq Scan on public.bar bar_1 - Output: bar_1.f2, bar_1.tableoid, bar_1.ctid, NULL::record - -> Foreign Update on public.bar2 bar_2 - Remote SQL: UPDATE public.loct2 SET f2 = (f2 + 100) RETURNING f1, f2 -(11 rows) - -update bar set f2 = f2 + 100 returning *; - f1 | f2 -----+----- - 1 | 311 - 2 | 322 - 6 | 266 - 3 | 333 - 4 | 344 - 7 | 277 -(6 rows) - --- Test that UPDATE/DELETE with inherited target works with row-level triggers -CREATE TRIGGER trig_row_before -BEFORE UPDATE OR DELETE ON bar2 -FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); -CREATE TRIGGER trig_row_after -AFTER UPDATE OR DELETE ON bar2 -FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); -explain (verbose, costs off) -update bar set f2 = f2 + 100; - QUERY PLAN --------------------------------------------------------------------------------------------------------- - Update on public.bar - Update on public.bar bar_1 - Foreign Update on public.bar2 bar_2 - Remote SQL: UPDATE public.loct2 SET f1 = $2, f2 = $3, f3 = $4 WHERE ctid = $1 RETURNING f1, f2, f3 - -> Result - Output: (bar.f2 + 100), bar.tableoid, bar.ctid, (NULL::record) - -> Append - -> Seq Scan on public.bar bar_1 - Output: bar_1.f2, bar_1.tableoid, bar_1.ctid, NULL::record - -> Foreign Scan on public.bar2 bar_2 - Output: bar_2.f2, bar_2.tableoid, bar_2.ctid, bar_2.* - Remote SQL: SELECT f1, f2, f3, ctid FROM public.loct2 FOR UPDATE -(12 rows) - -update bar set f2 = f2 + 100; -NOTICE: trig_row_before(23, skidoo) BEFORE ROW UPDATE ON bar2 -NOTICE: OLD: (3,333,33),NEW: (3,433,33) -NOTICE: trig_row_before(23, skidoo) BEFORE ROW UPDATE ON bar2 -NOTICE: OLD: (4,344,44),NEW: (4,444,44) -NOTICE: trig_row_before(23, skidoo) BEFORE ROW UPDATE ON bar2 -NOTICE: OLD: (7,277,77),NEW: (7,377,77) -NOTICE: trig_row_after(23, skidoo) AFTER ROW UPDATE ON bar2 -NOTICE: OLD: (3,333,33),NEW: (3,433,33) -NOTICE: trig_row_after(23, skidoo) AFTER ROW UPDATE ON bar2 -NOTICE: OLD: (4,344,44),NEW: (4,444,44) -NOTICE: trig_row_after(23, skidoo) AFTER ROW UPDATE ON bar2 -NOTICE: OLD: (7,277,77),NEW: (7,377,77) -explain (verbose, costs off) -delete from bar where f2 < 400; - QUERY PLAN ---------------------------------------------------------------------------------------------------- - Delete on public.bar - Delete on public.bar bar_1 - Foreign Delete on public.bar2 bar_2 - Remote SQL: DELETE FROM public.loct2 WHERE ctid = $1 RETURNING f1, f2, f3 - -> Append - -> Seq Scan on public.bar bar_1 - Output: bar_1.tableoid, bar_1.ctid, NULL::record - Filter: (bar_1.f2 < 400) - -> Foreign Scan on public.bar2 bar_2 - Output: bar_2.tableoid, bar_2.ctid, bar_2.* - Remote SQL: SELECT f1, f2, f3, ctid FROM public.loct2 WHERE ((f2 < 400)) FOR UPDATE -(11 rows) - -delete from bar where f2 < 400; -NOTICE: trig_row_before(23, skidoo) BEFORE ROW DELETE ON bar2 -NOTICE: OLD: (7,377,77) -NOTICE: trig_row_after(23, skidoo) AFTER ROW DELETE ON bar2 -NOTICE: OLD: (7,377,77) --- cleanup -drop table foo cascade; -NOTICE: drop cascades to foreign table foo2 -drop table bar cascade; -NOTICE: drop cascades to foreign table bar2 -drop table loct1; -drop table loct2; --- Test pushing down UPDATE/DELETE joins to the remote server -create table parent (a int, b text); -create table loct1 (a int, b text); -create table loct2 (a int, b text); -create foreign table remt1 (a int, b text) - server loopback options (table_name 'loct1'); -create foreign table remt2 (a int, b text) - server loopback options (table_name 'loct2'); -alter foreign table remt1 inherit parent; -insert into remt1 values (1, 'foo'); -insert into remt1 values (2, 'bar'); -insert into remt2 values (1, 'foo'); -insert into remt2 values (2, 'bar'); -analyze remt1; -analyze remt2; -explain (verbose, costs off) -update parent set b = parent.b || remt2.b from remt2 where parent.a = remt2.a returning *; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------- - Update on public.parent - Output: parent_1.a, parent_1.b, remt2.a, remt2.b - Update on public.parent parent_1 - Foreign Update on public.remt1 parent_2 - Remote SQL: UPDATE public.loct1 SET b = $2 WHERE ctid = $1 RETURNING a, b - -> Nested Loop - Output: (parent.b || remt2.b), remt2.*, remt2.a, remt2.b, parent.tableoid, parent.ctid, (NULL::record) - Join Filter: (parent.a = remt2.a) - -> Append - -> Seq Scan on public.parent parent_1 - Output: parent_1.b, parent_1.a, parent_1.tableoid, parent_1.ctid, NULL::record - -> Foreign Scan on public.remt1 parent_2 - Output: parent_2.b, parent_2.a, parent_2.tableoid, parent_2.ctid, parent_2.* - Remote SQL: SELECT a, b, ctid FROM public.loct1 FOR UPDATE - -> Materialize - Output: remt2.b, remt2.*, remt2.a - -> Foreign Scan on public.remt2 - Output: remt2.b, remt2.*, remt2.a - Remote SQL: SELECT a, b FROM public.loct2 -(19 rows) - -update parent set b = parent.b || remt2.b from remt2 where parent.a = remt2.a returning *; - a | b | a | b ----+--------+---+----- - 1 | foofoo | 1 | foo - 2 | barbar | 2 | bar -(2 rows) - -explain (verbose, costs off) -delete from parent using remt2 where parent.a = remt2.a returning parent; - QUERY PLAN ------------------------------------------------------------------------------ - Delete on public.parent - Output: parent_1.* - Delete on public.parent parent_1 - Foreign Delete on public.remt1 parent_2 - Remote SQL: DELETE FROM public.loct1 WHERE ctid = $1 RETURNING a, b - -> Nested Loop - Output: remt2.*, parent.tableoid, parent.ctid - Join Filter: (parent.a = remt2.a) - -> Append - -> Seq Scan on public.parent parent_1 - Output: parent_1.a, parent_1.tableoid, parent_1.ctid - -> Foreign Scan on public.remt1 parent_2 - Output: parent_2.a, parent_2.tableoid, parent_2.ctid - Remote SQL: SELECT a, ctid FROM public.loct1 FOR UPDATE - -> Materialize - Output: remt2.*, remt2.a - -> Foreign Scan on public.remt2 - Output: remt2.*, remt2.a - Remote SQL: SELECT a, b FROM public.loct2 -(19 rows) - -delete from parent using remt2 where parent.a = remt2.a returning parent; - parent ------------- - (1,foofoo) - (2,barbar) -(2 rows) - --- cleanup -drop foreign table remt1; -drop foreign table remt2; -drop table loct1; -drop table loct2; -drop table parent; --- =================================================================== --- test tuple routing for foreign-table partitions --- =================================================================== --- Test insert tuple routing -create table itrtest (a int, b text) partition by list (a); -create table loct1 (a int check (a in (1)), b text); -create foreign table remp1 (a int check (a in (1)), b text) server loopback options (table_name 'loct1'); -create table loct2 (a int check (a in (2)), b text); -create foreign table remp2 (b text, a int check (a in (2))) server loopback options (table_name 'loct2'); -alter table itrtest attach partition remp1 for values in (1); -alter table itrtest attach partition remp2 for values in (2); -insert into itrtest values (1, 'foo'); -insert into itrtest values (1, 'bar') returning *; - a | b ----+----- - 1 | bar -(1 row) - -insert into itrtest values (2, 'baz'); -insert into itrtest values (2, 'qux') returning *; - a | b ----+----- - 2 | qux -(1 row) - -insert into itrtest values (1, 'test1'), (2, 'test2') returning *; - a | b ----+------- - 1 | test1 - 2 | test2 -(2 rows) - -select tableoid::regclass, * FROM itrtest; - tableoid | a | b -----------+---+------- - remp1 | 1 | foo - remp1 | 1 | bar - remp1 | 1 | test1 - remp2 | 2 | baz - remp2 | 2 | qux - remp2 | 2 | test2 -(6 rows) - -select tableoid::regclass, * FROM remp1; - tableoid | a | b -----------+---+------- - remp1 | 1 | foo - remp1 | 1 | bar - remp1 | 1 | test1 -(3 rows) - -select tableoid::regclass, * FROM remp2; - tableoid | b | a -----------+-------+--- - remp2 | baz | 2 - remp2 | qux | 2 - remp2 | test2 | 2 -(3 rows) - -delete from itrtest; -create unique index loct1_idx on loct1 (a); --- DO NOTHING without an inference specification is supported -insert into itrtest values (1, 'foo') on conflict do nothing returning *; - a | b ----+----- - 1 | foo -(1 row) - -insert into itrtest values (1, 'foo') on conflict do nothing returning *; - a | b ----+--- -(0 rows) - --- But other cases are not supported -insert into itrtest values (1, 'bar') on conflict (a) do nothing; -ERROR: there is no unique or exclusion constraint matching the ON CONFLICT specification -insert into itrtest values (1, 'bar') on conflict (a) do update set b = excluded.b; -ERROR: there is no unique or exclusion constraint matching the ON CONFLICT specification -select tableoid::regclass, * FROM itrtest; - tableoid | a | b -----------+---+----- - remp1 | 1 | foo -(1 row) - -delete from itrtest; -drop index loct1_idx; --- Test that remote triggers work with insert tuple routing -create function br_insert_trigfunc() returns trigger as $$ -begin - new.b := new.b || ' triggered !'; - return new; -end -$$ language plpgsql; -create trigger loct1_br_insert_trigger before insert on loct1 - for each row execute procedure br_insert_trigfunc(); -create trigger loct2_br_insert_trigger before insert on loct2 - for each row execute procedure br_insert_trigfunc(); --- The new values are concatenated with ' triggered !' -insert into itrtest values (1, 'foo') returning *; - a | b ----+----------------- - 1 | foo triggered ! -(1 row) - -insert into itrtest values (2, 'qux') returning *; - a | b ----+----------------- - 2 | qux triggered ! -(1 row) - -insert into itrtest values (1, 'test1'), (2, 'test2') returning *; - a | b ----+------------------- - 1 | test1 triggered ! - 2 | test2 triggered ! -(2 rows) - -with result as (insert into itrtest values (1, 'test1'), (2, 'test2') returning *) select * from result; - a | b ----+------------------- - 1 | test1 triggered ! - 2 | test2 triggered ! -(2 rows) - -drop trigger loct1_br_insert_trigger on loct1; -drop trigger loct2_br_insert_trigger on loct2; -drop table itrtest; -drop table loct1; -drop table loct2; --- Test update tuple routing -create table utrtest (a int, b text) partition by list (a); -create table loct (a int check (a in (1)), b text); -create foreign table remp (a int check (a in (1)), b text) server loopback options (table_name 'loct'); -create table locp (a int check (a in (2)), b text); -alter table utrtest attach partition remp for values in (1); -alter table utrtest attach partition locp for values in (2); -insert into utrtest values (1, 'foo'); -insert into utrtest values (2, 'qux'); -select tableoid::regclass, * FROM utrtest; - tableoid | a | b -----------+---+----- - remp | 1 | foo - locp | 2 | qux -(2 rows) - -select tableoid::regclass, * FROM remp; - tableoid | a | b -----------+---+----- - remp | 1 | foo -(1 row) - -select tableoid::regclass, * FROM locp; - tableoid | a | b -----------+---+----- - locp | 2 | qux -(1 row) - --- It's not allowed to move a row from a partition that is foreign to another -update utrtest set a = 2 where b = 'foo' returning *; -ERROR: new row for relation "loct" violates check constraint "loct_a_check" -DETAIL: Failing row contains (2, foo). -CONTEXT: remote SQL command: UPDATE public.loct SET a = 2 WHERE ((b = 'foo'::text)) RETURNING a, b --- But the reverse is allowed -update utrtest set a = 1 where b = 'qux' returning *; -ERROR: cannot route tuples into foreign table to be updated "remp" -select tableoid::regclass, * FROM utrtest; - tableoid | a | b -----------+---+----- - remp | 1 | foo - locp | 2 | qux -(2 rows) - -select tableoid::regclass, * FROM remp; - tableoid | a | b -----------+---+----- - remp | 1 | foo -(1 row) - -select tableoid::regclass, * FROM locp; - tableoid | a | b -----------+---+----- - locp | 2 | qux -(1 row) - --- The executor should not let unexercised FDWs shut down -update utrtest set a = 1 where b = 'foo'; --- Test that remote triggers work with update tuple routing -create trigger loct_br_insert_trigger before insert on loct - for each row execute procedure br_insert_trigfunc(); -delete from utrtest; -insert into utrtest values (2, 'qux'); --- Check case where the foreign partition is a subplan target rel -explain (verbose, costs off) -update utrtest set a = 1 where a = 1 or a = 2 returning *; - QUERY PLAN ----------------------------------------------------------------------------------------------------- - Update on public.utrtest - Output: utrtest_1.a, utrtest_1.b - Foreign Update on public.remp utrtest_1 - Update on public.locp utrtest_2 - -> Append - -> Foreign Update on public.remp utrtest_1 - Remote SQL: UPDATE public.loct SET a = 1 WHERE (((a = 1) OR (a = 2))) RETURNING a, b - -> Seq Scan on public.locp utrtest_2 - Output: 1, utrtest_2.tableoid, utrtest_2.ctid, NULL::record - Filter: ((utrtest_2.a = 1) OR (utrtest_2.a = 2)) -(10 rows) - --- The new values are concatenated with ' triggered !' -update utrtest set a = 1 where a = 1 or a = 2 returning *; -ERROR: cannot route tuples into foreign table to be updated "remp" -delete from utrtest; -insert into utrtest values (2, 'qux'); --- Check case where the foreign partition isn't a subplan target rel -explain (verbose, costs off) -update utrtest set a = 1 where a = 2 returning *; - QUERY PLAN -------------------------------------------------------- - Update on public.utrtest - Output: utrtest_1.a, utrtest_1.b - Update on public.locp utrtest_1 - -> Seq Scan on public.locp utrtest_1 - Output: 1, utrtest_1.tableoid, utrtest_1.ctid - Filter: (utrtest_1.a = 2) -(6 rows) - --- The new values are concatenated with ' triggered !' -update utrtest set a = 1 where a = 2 returning *; - a | b ----+----------------- - 1 | qux triggered ! -(1 row) - -drop trigger loct_br_insert_trigger on loct; --- We can move rows to a foreign partition that has been updated already, --- but can't move rows to a foreign partition that hasn't been updated yet -delete from utrtest; -insert into utrtest values (1, 'foo'); -insert into utrtest values (2, 'qux'); --- Test the former case: --- with a direct modification plan -explain (verbose, costs off) -update utrtest set a = 1 returning *; - QUERY PLAN ---------------------------------------------------------------------------- - Update on public.utrtest - Output: utrtest_1.a, utrtest_1.b - Foreign Update on public.remp utrtest_1 - Update on public.locp utrtest_2 - -> Append - -> Foreign Update on public.remp utrtest_1 - Remote SQL: UPDATE public.loct SET a = 1 RETURNING a, b - -> Seq Scan on public.locp utrtest_2 - Output: 1, utrtest_2.tableoid, utrtest_2.ctid, NULL::record -(9 rows) - -update utrtest set a = 1 returning *; -ERROR: cannot route tuples into foreign table to be updated "remp" -delete from utrtest; -insert into utrtest values (1, 'foo'); -insert into utrtest values (2, 'qux'); --- with a non-direct modification plan -explain (verbose, costs off) -update utrtest set a = 1 from (values (1), (2)) s(x) where a = s.x returning *; - QUERY PLAN ------------------------------------------------------------------------------------------------- - Update on public.utrtest - Output: utrtest_1.a, utrtest_1.b, "*VALUES*".column1 - Foreign Update on public.remp utrtest_1 - Remote SQL: UPDATE public.loct SET a = $2 WHERE ctid = $1 RETURNING a, b - Update on public.locp utrtest_2 - -> Hash Join - Output: 1, "*VALUES*".*, "*VALUES*".column1, utrtest.tableoid, utrtest.ctid, utrtest.* - Hash Cond: (utrtest.a = "*VALUES*".column1) - -> Append - -> Foreign Scan on public.remp utrtest_1 - Output: utrtest_1.a, utrtest_1.tableoid, utrtest_1.ctid, utrtest_1.* - Remote SQL: SELECT a, b, ctid FROM public.loct FOR UPDATE - -> Seq Scan on public.locp utrtest_2 - Output: utrtest_2.a, utrtest_2.tableoid, utrtest_2.ctid, NULL::record - -> Hash - Output: "*VALUES*".*, "*VALUES*".column1 - -> Values Scan on "*VALUES*" - Output: "*VALUES*".*, "*VALUES*".column1 -(18 rows) - -update utrtest set a = 1 from (values (1), (2)) s(x) where a = s.x returning *; -ERROR: cannot route tuples into foreign table to be updated "remp" --- Change the definition of utrtest so that the foreign partition get updated --- after the local partition -delete from utrtest; -alter table utrtest detach partition remp; -drop foreign table remp; -alter table loct drop constraint loct_a_check; -alter table loct add check (a in (3)); -create foreign table remp (a int check (a in (3)), b text) server loopback options (table_name 'loct'); -alter table utrtest attach partition remp for values in (3); -insert into utrtest values (2, 'qux'); -insert into utrtest values (3, 'xyzzy'); --- Test the latter case: --- with a direct modification plan -explain (verbose, costs off) -update utrtest set a = 3 returning *; - QUERY PLAN ---------------------------------------------------------------------------- - Update on public.utrtest - Output: utrtest_1.a, utrtest_1.b - Update on public.locp utrtest_1 - Foreign Update on public.remp utrtest_2 - -> Append - -> Seq Scan on public.locp utrtest_1 - Output: 3, utrtest_1.tableoid, utrtest_1.ctid, NULL::record - -> Foreign Update on public.remp utrtest_2 - Remote SQL: UPDATE public.loct SET a = 3 RETURNING a, b -(9 rows) - -update utrtest set a = 3 returning *; -- ERROR -ERROR: cannot route tuples into foreign table to be updated "remp" --- with a non-direct modification plan -explain (verbose, costs off) -update utrtest set a = 3 from (values (2), (3)) s(x) where a = s.x returning *; - QUERY PLAN ------------------------------------------------------------------------------------------------------ - Update on public.utrtest - Output: utrtest_1.a, utrtest_1.b, "*VALUES*".column1 - Update on public.locp utrtest_1 - Foreign Update on public.remp utrtest_2 - Remote SQL: UPDATE public.loct SET a = $2 WHERE ctid = $1 RETURNING a, b - -> Hash Join - Output: 3, "*VALUES*".*, "*VALUES*".column1, utrtest.tableoid, utrtest.ctid, (NULL::record) - Hash Cond: (utrtest.a = "*VALUES*".column1) - -> Append - -> Seq Scan on public.locp utrtest_1 - Output: utrtest_1.a, utrtest_1.tableoid, utrtest_1.ctid, NULL::record - -> Foreign Scan on public.remp utrtest_2 - Output: utrtest_2.a, utrtest_2.tableoid, utrtest_2.ctid, utrtest_2.* - Remote SQL: SELECT a, b, ctid FROM public.loct FOR UPDATE - -> Hash - Output: "*VALUES*".*, "*VALUES*".column1 - -> Values Scan on "*VALUES*" - Output: "*VALUES*".*, "*VALUES*".column1 -(18 rows) - -update utrtest set a = 3 from (values (2), (3)) s(x) where a = s.x returning *; -- ERROR -ERROR: cannot route tuples into foreign table to be updated "remp" -drop table utrtest; -drop table loct; --- Test copy tuple routing -create table ctrtest (a int, b text) partition by list (a); -create table loct1 (a int check (a in (1)), b text); -create foreign table remp1 (a int check (a in (1)), b text) server loopback options (table_name 'loct1'); -create table loct2 (a int check (a in (2)), b text); -create foreign table remp2 (b text, a int check (a in (2))) server loopback options (table_name 'loct2'); -alter table ctrtest attach partition remp1 for values in (1); -alter table ctrtest attach partition remp2 for values in (2); -copy ctrtest from stdin; -select tableoid::regclass, * FROM ctrtest; - tableoid | a | b -----------+---+----- - remp1 | 1 | foo - remp2 | 2 | qux -(2 rows) - -select tableoid::regclass, * FROM remp1; - tableoid | a | b -----------+---+----- - remp1 | 1 | foo -(1 row) - -select tableoid::regclass, * FROM remp2; - tableoid | b | a -----------+-----+--- - remp2 | qux | 2 -(1 row) - --- Copying into foreign partitions directly should work as well -copy remp1 from stdin; -select tableoid::regclass, * FROM remp1; - tableoid | a | b -----------+---+----- - remp1 | 1 | foo - remp1 | 1 | bar -(2 rows) - -drop table ctrtest; -drop table loct1; -drop table loct2; --- =================================================================== --- test COPY FROM --- =================================================================== -create table loc2 (f1 int, f2 text); -alter table loc2 set (autovacuum_enabled = 'false'); -create foreign table rem2 (f1 int, f2 text) server loopback options(table_name 'loc2'); --- Test basic functionality -copy rem2 from stdin; -select * from rem2; - f1 | f2 -----+----- - 1 | foo - 2 | bar -(2 rows) - -delete from rem2; --- Test check constraints -alter table loc2 add constraint loc2_f1positive check (f1 >= 0); -alter foreign table rem2 add constraint rem2_f1positive check (f1 >= 0); --- check constraint is enforced on the remote side, not locally -copy rem2 from stdin; -copy rem2 from stdin; -- ERROR -ERROR: new row for relation "loc2" violates check constraint "loc2_f1positive" -DETAIL: Failing row contains (-1, xyzzy). -CONTEXT: remote SQL command: INSERT INTO public.loc2(f1, f2) VALUES ($1, $2) -COPY rem2, line 1: "-1 xyzzy" -select * from rem2; - f1 | f2 -----+----- - 1 | foo - 2 | bar -(2 rows) - -alter foreign table rem2 drop constraint rem2_f1positive; -alter table loc2 drop constraint loc2_f1positive; -delete from rem2; --- Test local triggers -create trigger trig_stmt_before before insert on rem2 - for each statement execute procedure trigger_func(); -create trigger trig_stmt_after after insert on rem2 - for each statement execute procedure trigger_func(); -create trigger trig_row_before before insert on rem2 - for each row execute procedure trigger_data(23,'skidoo'); -create trigger trig_row_after after insert on rem2 - for each row execute procedure trigger_data(23,'skidoo'); -copy rem2 from stdin; -NOTICE: trigger_func() called: action = INSERT, when = BEFORE, level = STATEMENT -NOTICE: trig_row_before(23, skidoo) BEFORE ROW INSERT ON rem2 -NOTICE: NEW: (1,foo) -NOTICE: trig_row_before(23, skidoo) BEFORE ROW INSERT ON rem2 -NOTICE: NEW: (2,bar) -NOTICE: trig_row_after(23, skidoo) AFTER ROW INSERT ON rem2 -NOTICE: NEW: (1,foo) -NOTICE: trig_row_after(23, skidoo) AFTER ROW INSERT ON rem2 -NOTICE: NEW: (2,bar) -NOTICE: trigger_func() called: action = INSERT, when = AFTER, level = STATEMENT -select * from rem2; - f1 | f2 -----+----- - 1 | foo - 2 | bar -(2 rows) - -drop trigger trig_row_before on rem2; -drop trigger trig_row_after on rem2; -drop trigger trig_stmt_before on rem2; -drop trigger trig_stmt_after on rem2; -delete from rem2; -create trigger trig_row_before_insert before insert on rem2 - for each row execute procedure trig_row_before_insupdate(); --- The new values are concatenated with ' triggered !' -copy rem2 from stdin; -select * from rem2; - f1 | f2 -----+----------------- - 1 | foo triggered ! - 2 | bar triggered ! -(2 rows) - -drop trigger trig_row_before_insert on rem2; -delete from rem2; -create trigger trig_null before insert on rem2 - for each row execute procedure trig_null(); --- Nothing happens -copy rem2 from stdin; -select * from rem2; - f1 | f2 -----+---- -(0 rows) - -drop trigger trig_null on rem2; -delete from rem2; --- Test remote triggers -create trigger trig_row_before_insert before insert on loc2 - for each row execute procedure trig_row_before_insupdate(); --- The new values are concatenated with ' triggered !' -copy rem2 from stdin; -select * from rem2; - f1 | f2 -----+----------------- - 1 | foo triggered ! - 2 | bar triggered ! -(2 rows) - -drop trigger trig_row_before_insert on loc2; -delete from rem2; -create trigger trig_null before insert on loc2 - for each row execute procedure trig_null(); --- Nothing happens -copy rem2 from stdin; -select * from rem2; - f1 | f2 -----+---- -(0 rows) - -drop trigger trig_null on loc2; -delete from rem2; --- Test a combination of local and remote triggers -create trigger rem2_trig_row_before before insert on rem2 - for each row execute procedure trigger_data(23,'skidoo'); -create trigger rem2_trig_row_after after insert on rem2 - for each row execute procedure trigger_data(23,'skidoo'); -create trigger loc2_trig_row_before_insert before insert on loc2 - for each row execute procedure trig_row_before_insupdate(); -copy rem2 from stdin; -NOTICE: rem2_trig_row_before(23, skidoo) BEFORE ROW INSERT ON rem2 -NOTICE: NEW: (1,foo) -NOTICE: rem2_trig_row_before(23, skidoo) BEFORE ROW INSERT ON rem2 -NOTICE: NEW: (2,bar) -NOTICE: rem2_trig_row_after(23, skidoo) AFTER ROW INSERT ON rem2 -NOTICE: NEW: (1,"foo triggered !") -NOTICE: rem2_trig_row_after(23, skidoo) AFTER ROW INSERT ON rem2 -NOTICE: NEW: (2,"bar triggered !") -select * from rem2; - f1 | f2 -----+----------------- - 1 | foo triggered ! - 2 | bar triggered ! -(2 rows) - -drop trigger rem2_trig_row_before on rem2; -drop trigger rem2_trig_row_after on rem2; -drop trigger loc2_trig_row_before_insert on loc2; -delete from rem2; --- test COPY FROM with foreign table created in the same transaction -create table loc3 (f1 int, f2 text); -begin; -create foreign table rem3 (f1 int, f2 text) - server loopback options(table_name 'loc3'); -copy rem3 from stdin; -commit; -select * from rem3; - f1 | f2 -----+----- - 1 | foo - 2 | bar -(2 rows) - -drop foreign table rem3; -drop table loc3; --- =================================================================== --- test for TRUNCATE --- =================================================================== -CREATE TABLE tru_rtable0 (id int primary key); -CREATE FOREIGN TABLE tru_ftable (id int) - SERVER loopback OPTIONS (table_name 'tru_rtable0'); -INSERT INTO tru_rtable0 (SELECT x FROM generate_series(1,10) x); -CREATE TABLE tru_ptable (id int) PARTITION BY HASH(id); -CREATE TABLE tru_ptable__p0 PARTITION OF tru_ptable - FOR VALUES WITH (MODULUS 2, REMAINDER 0); -CREATE TABLE tru_rtable1 (id int primary key); -CREATE FOREIGN TABLE tru_ftable__p1 PARTITION OF tru_ptable - FOR VALUES WITH (MODULUS 2, REMAINDER 1) - SERVER loopback OPTIONS (table_name 'tru_rtable1'); -INSERT INTO tru_ptable (SELECT x FROM generate_series(11,20) x); -CREATE TABLE tru_pk_table(id int primary key); -CREATE TABLE tru_fk_table(fkey int references tru_pk_table(id)); -INSERT INTO tru_pk_table (SELECT x FROM generate_series(1,10) x); -INSERT INTO tru_fk_table (SELECT x % 10 + 1 FROM generate_series(5,25) x); -CREATE FOREIGN TABLE tru_pk_ftable (id int) - SERVER loopback OPTIONS (table_name 'tru_pk_table'); -CREATE TABLE tru_rtable_parent (id int); -CREATE TABLE tru_rtable_child (id int); -CREATE FOREIGN TABLE tru_ftable_parent (id int) - SERVER loopback OPTIONS (table_name 'tru_rtable_parent'); -CREATE FOREIGN TABLE tru_ftable_child () INHERITS (tru_ftable_parent) - SERVER loopback OPTIONS (table_name 'tru_rtable_child'); -INSERT INTO tru_rtable_parent (SELECT x FROM generate_series(1,8) x); -INSERT INTO tru_rtable_child (SELECT x FROM generate_series(10, 18) x); --- normal truncate -SELECT sum(id) FROM tru_ftable; -- 55 - sum ------ - 55 -(1 row) - -TRUNCATE tru_ftable; -SELECT count(*) FROM tru_rtable0; -- 0 - count -------- - 0 -(1 row) - -SELECT count(*) FROM tru_ftable; -- 0 - count -------- - 0 -(1 row) - --- 'truncatable' option -ALTER SERVER loopback OPTIONS (ADD truncatable 'false'); -TRUNCATE tru_ftable; -- error -ERROR: foreign table "tru_ftable" does not allow truncates -ALTER FOREIGN TABLE tru_ftable OPTIONS (ADD truncatable 'true'); -TRUNCATE tru_ftable; -- accepted -ALTER FOREIGN TABLE tru_ftable OPTIONS (SET truncatable 'false'); -TRUNCATE tru_ftable; -- error -ERROR: foreign table "tru_ftable" does not allow truncates -ALTER SERVER loopback OPTIONS (DROP truncatable); -ALTER FOREIGN TABLE tru_ftable OPTIONS (SET truncatable 'false'); -TRUNCATE tru_ftable; -- error -ERROR: foreign table "tru_ftable" does not allow truncates -ALTER FOREIGN TABLE tru_ftable OPTIONS (SET truncatable 'true'); -TRUNCATE tru_ftable; -- accepted --- partitioned table with both local and foreign tables as partitions -SELECT sum(id) FROM tru_ptable; -- 155 - sum ------ - 155 -(1 row) - -TRUNCATE tru_ptable; -SELECT count(*) FROM tru_ptable; -- 0 - count -------- - 0 -(1 row) - -SELECT count(*) FROM tru_ptable__p0; -- 0 - count -------- - 0 -(1 row) - -SELECT count(*) FROM tru_ftable__p1; -- 0 - count -------- - 0 -(1 row) - -SELECT count(*) FROM tru_rtable1; -- 0 - count -------- - 0 -(1 row) - --- 'CASCADE' option -SELECT sum(id) FROM tru_pk_ftable; -- 55 - sum ------ - 55 -(1 row) - -TRUNCATE tru_pk_ftable; -- failed by FK reference -ERROR: cannot truncate a table referenced in a foreign key constraint -DETAIL: Table "tru_fk_table" references "tru_pk_table". -HINT: Truncate table "tru_fk_table" at the same time, or use TRUNCATE ... CASCADE. -CONTEXT: remote SQL command: TRUNCATE public.tru_pk_table CONTINUE IDENTITY RESTRICT -TRUNCATE tru_pk_ftable CASCADE; -SELECT count(*) FROM tru_pk_ftable; -- 0 - count -------- - 0 -(1 row) - -SELECT count(*) FROM tru_fk_table; -- also truncated,0 - count -------- - 0 -(1 row) - --- truncate two tables at a command -INSERT INTO tru_ftable (SELECT x FROM generate_series(1,8) x); -INSERT INTO tru_pk_ftable (SELECT x FROM generate_series(3,10) x); -SELECT count(*) from tru_ftable; -- 8 - count -------- - 8 -(1 row) - -SELECT count(*) from tru_pk_ftable; -- 8 - count -------- - 8 -(1 row) - -TRUNCATE tru_ftable, tru_pk_ftable CASCADE; -SELECT count(*) from tru_ftable; -- 0 - count -------- - 0 -(1 row) - -SELECT count(*) from tru_pk_ftable; -- 0 - count -------- - 0 -(1 row) - --- truncate with ONLY clause --- Since ONLY is specified, the table tru_ftable_child that inherits --- tru_ftable_parent locally is not truncated. -TRUNCATE ONLY tru_ftable_parent; -SELECT sum(id) FROM tru_ftable_parent; -- 126 - sum ------ - 126 -(1 row) - -TRUNCATE tru_ftable_parent; -SELECT count(*) FROM tru_ftable_parent; -- 0 - count -------- - 0 -(1 row) - --- in case when remote table has inherited children -CREATE TABLE tru_rtable0_child () INHERITS (tru_rtable0); -INSERT INTO tru_rtable0 (SELECT x FROM generate_series(5,9) x); -INSERT INTO tru_rtable0_child (SELECT x FROM generate_series(10,14) x); -SELECT sum(id) FROM tru_ftable; -- 95 - sum ------ - 95 -(1 row) - --- Both parent and child tables in the foreign server are truncated --- even though ONLY is specified because ONLY has no effect --- when truncating a foreign table. -TRUNCATE ONLY tru_ftable; -SELECT count(*) FROM tru_ftable; -- 0 - count -------- - 0 -(1 row) - -INSERT INTO tru_rtable0 (SELECT x FROM generate_series(21,25) x); -INSERT INTO tru_rtable0_child (SELECT x FROM generate_series(26,30) x); -SELECT sum(id) FROM tru_ftable; -- 255 - sum ------ - 255 -(1 row) - -TRUNCATE tru_ftable; -- truncate both of parent and child -SELECT count(*) FROM tru_ftable; -- 0 - count -------- - 0 -(1 row) - --- cleanup -DROP FOREIGN TABLE tru_ftable_parent, tru_ftable_child, tru_pk_ftable,tru_ftable__p1,tru_ftable; -DROP TABLE tru_rtable0, tru_rtable1, tru_ptable, tru_ptable__p0, tru_pk_table, tru_fk_table, -tru_rtable_parent,tru_rtable_child, tru_rtable0_child; --- =================================================================== --- test IMPORT FOREIGN SCHEMA --- =================================================================== -CREATE SCHEMA import_source; -CREATE TABLE import_source.t1 (c1 int, c2 varchar NOT NULL); -CREATE TABLE import_source.t2 (c1 int default 42, c2 varchar NULL, c3 text collate "POSIX"); -CREATE TYPE typ1 AS (m1 int, m2 varchar); -CREATE TABLE import_source.t3 (c1 timestamptz default now(), c2 typ1); -CREATE TABLE import_source."x 4" (c1 float8, "C 2" text, c3 varchar(42)); -CREATE TABLE import_source."x 5" (c1 float8); -ALTER TABLE import_source."x 5" DROP COLUMN c1; -CREATE TABLE import_source."x 6" (c1 int, c2 int generated always as (c1 * 2) stored); -CREATE TABLE import_source.t4 (c1 int) PARTITION BY RANGE (c1); -CREATE TABLE import_source.t4_part PARTITION OF import_source.t4 - FOR VALUES FROM (1) TO (100); -CREATE TABLE import_source.t4_part2 PARTITION OF import_source.t4 - FOR VALUES FROM (100) TO (200); -CREATE SCHEMA import_dest1; -IMPORT FOREIGN SCHEMA import_source FROM SERVER loopback INTO import_dest1; -\det+ import_dest1.* - List of foreign tables - Schema | Table | Server | FDW options | Description ---------------+-------+----------+-------------------------------------------------+------------- - import_dest1 | t1 | loopback | (schema_name 'import_source', table_name 't1') | - import_dest1 | t2 | loopback | (schema_name 'import_source', table_name 't2') | - import_dest1 | t3 | loopback | (schema_name 'import_source', table_name 't3') | - import_dest1 | t4 | loopback | (schema_name 'import_source', table_name 't4') | - import_dest1 | x 4 | loopback | (schema_name 'import_source', table_name 'x 4') | - import_dest1 | x 5 | loopback | (schema_name 'import_source', table_name 'x 5') | - import_dest1 | x 6 | loopback | (schema_name 'import_source', table_name 'x 6') | -(7 rows) - -\d import_dest1.* - Foreign table "import_dest1.t1" - Column | Type | Collation | Nullable | Default | FDW options ---------+-------------------+-----------+----------+---------+-------------------- - c1 | integer | | | | (column_name 'c1') - c2 | character varying | | not null | | (column_name 'c2') -Server: loopback -FDW options: (schema_name 'import_source', table_name 't1') - - Foreign table "import_dest1.t2" - Column | Type | Collation | Nullable | Default | FDW options ---------+-------------------+-----------+----------+---------+-------------------- - c1 | integer | | | | (column_name 'c1') - c2 | character varying | | | | (column_name 'c2') - c3 | text | POSIX | | | (column_name 'c3') -Server: loopback -FDW options: (schema_name 'import_source', table_name 't2') - - Foreign table "import_dest1.t3" - Column | Type | Collation | Nullable | Default | FDW options ---------+--------------------------+-----------+----------+---------+-------------------- - c1 | timestamp with time zone | | | | (column_name 'c1') - c2 | typ1 | | | | (column_name 'c2') -Server: loopback -FDW options: (schema_name 'import_source', table_name 't3') - - Foreign table "import_dest1.t4" - Column | Type | Collation | Nullable | Default | FDW options ---------+---------+-----------+----------+---------+-------------------- - c1 | integer | | | | (column_name 'c1') -Server: loopback -FDW options: (schema_name 'import_source', table_name 't4') - - Foreign table "import_dest1.x 4" - Column | Type | Collation | Nullable | Default | FDW options ---------+-----------------------+-----------+----------+---------+--------------------- - c1 | double precision | | | | (column_name 'c1') - C 2 | text | | | | (column_name 'C 2') - c3 | character varying(42) | | | | (column_name 'c3') -Server: loopback -FDW options: (schema_name 'import_source', table_name 'x 4') - - Foreign table "import_dest1.x 5" - Column | Type | Collation | Nullable | Default | FDW options ---------+------+-----------+----------+---------+------------- -Server: loopback -FDW options: (schema_name 'import_source', table_name 'x 5') - - Foreign table "import_dest1.x 6" - Column | Type | Collation | Nullable | Default | FDW options ---------+---------+-----------+----------+-------------------------------------+-------------------- - c1 | integer | | | | (column_name 'c1') - c2 | integer | | | generated always as (c1 * 2) stored | (column_name 'c2') -Server: loopback -FDW options: (schema_name 'import_source', table_name 'x 6') - --- Options -CREATE SCHEMA import_dest2; -IMPORT FOREIGN SCHEMA import_source FROM SERVER loopback INTO import_dest2 - OPTIONS (import_default 'true'); -\det+ import_dest2.* - List of foreign tables - Schema | Table | Server | FDW options | Description ---------------+-------+----------+-------------------------------------------------+------------- - import_dest2 | t1 | loopback | (schema_name 'import_source', table_name 't1') | - import_dest2 | t2 | loopback | (schema_name 'import_source', table_name 't2') | - import_dest2 | t3 | loopback | (schema_name 'import_source', table_name 't3') | - import_dest2 | t4 | loopback | (schema_name 'import_source', table_name 't4') | - import_dest2 | x 4 | loopback | (schema_name 'import_source', table_name 'x 4') | - import_dest2 | x 5 | loopback | (schema_name 'import_source', table_name 'x 5') | - import_dest2 | x 6 | loopback | (schema_name 'import_source', table_name 'x 6') | -(7 rows) - -\d import_dest2.* - Foreign table "import_dest2.t1" - Column | Type | Collation | Nullable | Default | FDW options ---------+-------------------+-----------+----------+---------+-------------------- - c1 | integer | | | | (column_name 'c1') - c2 | character varying | | not null | | (column_name 'c2') -Server: loopback -FDW options: (schema_name 'import_source', table_name 't1') - - Foreign table "import_dest2.t2" - Column | Type | Collation | Nullable | Default | FDW options ---------+-------------------+-----------+----------+---------+-------------------- - c1 | integer | | | 42 | (column_name 'c1') - c2 | character varying | | | | (column_name 'c2') - c3 | text | POSIX | | | (column_name 'c3') -Server: loopback -FDW options: (schema_name 'import_source', table_name 't2') - - Foreign table "import_dest2.t3" - Column | Type | Collation | Nullable | Default | FDW options ---------+--------------------------+-----------+----------+---------+-------------------- - c1 | timestamp with time zone | | | now() | (column_name 'c1') - c2 | typ1 | | | | (column_name 'c2') -Server: loopback -FDW options: (schema_name 'import_source', table_name 't3') - - Foreign table "import_dest2.t4" - Column | Type | Collation | Nullable | Default | FDW options ---------+---------+-----------+----------+---------+-------------------- - c1 | integer | | | | (column_name 'c1') -Server: loopback -FDW options: (schema_name 'import_source', table_name 't4') - - Foreign table "import_dest2.x 4" - Column | Type | Collation | Nullable | Default | FDW options ---------+-----------------------+-----------+----------+---------+--------------------- - c1 | double precision | | | | (column_name 'c1') - C 2 | text | | | | (column_name 'C 2') - c3 | character varying(42) | | | | (column_name 'c3') -Server: loopback -FDW options: (schema_name 'import_source', table_name 'x 4') - - Foreign table "import_dest2.x 5" - Column | Type | Collation | Nullable | Default | FDW options ---------+------+-----------+----------+---------+------------- -Server: loopback -FDW options: (schema_name 'import_source', table_name 'x 5') - - Foreign table "import_dest2.x 6" - Column | Type | Collation | Nullable | Default | FDW options ---------+---------+-----------+----------+-------------------------------------+-------------------- - c1 | integer | | | | (column_name 'c1') - c2 | integer | | | generated always as (c1 * 2) stored | (column_name 'c2') -Server: loopback -FDW options: (schema_name 'import_source', table_name 'x 6') - -CREATE SCHEMA import_dest3; -IMPORT FOREIGN SCHEMA import_source FROM SERVER loopback INTO import_dest3 - OPTIONS (import_collate 'false', import_generated 'false', import_not_null 'false'); -\det+ import_dest3.* - List of foreign tables - Schema | Table | Server | FDW options | Description ---------------+-------+----------+-------------------------------------------------+------------- - import_dest3 | t1 | loopback | (schema_name 'import_source', table_name 't1') | - import_dest3 | t2 | loopback | (schema_name 'import_source', table_name 't2') | - import_dest3 | t3 | loopback | (schema_name 'import_source', table_name 't3') | - import_dest3 | t4 | loopback | (schema_name 'import_source', table_name 't4') | - import_dest3 | x 4 | loopback | (schema_name 'import_source', table_name 'x 4') | - import_dest3 | x 5 | loopback | (schema_name 'import_source', table_name 'x 5') | - import_dest3 | x 6 | loopback | (schema_name 'import_source', table_name 'x 6') | -(7 rows) - -\d import_dest3.* - Foreign table "import_dest3.t1" - Column | Type | Collation | Nullable | Default | FDW options ---------+-------------------+-----------+----------+---------+-------------------- - c1 | integer | | | | (column_name 'c1') - c2 | character varying | | | | (column_name 'c2') -Server: loopback -FDW options: (schema_name 'import_source', table_name 't1') - - Foreign table "import_dest3.t2" - Column | Type | Collation | Nullable | Default | FDW options ---------+-------------------+-----------+----------+---------+-------------------- - c1 | integer | | | | (column_name 'c1') - c2 | character varying | | | | (column_name 'c2') - c3 | text | | | | (column_name 'c3') -Server: loopback -FDW options: (schema_name 'import_source', table_name 't2') - - Foreign table "import_dest3.t3" - Column | Type | Collation | Nullable | Default | FDW options ---------+--------------------------+-----------+----------+---------+-------------------- - c1 | timestamp with time zone | | | | (column_name 'c1') - c2 | typ1 | | | | (column_name 'c2') -Server: loopback -FDW options: (schema_name 'import_source', table_name 't3') - - Foreign table "import_dest3.t4" - Column | Type | Collation | Nullable | Default | FDW options ---------+---------+-----------+----------+---------+-------------------- - c1 | integer | | | | (column_name 'c1') -Server: loopback -FDW options: (schema_name 'import_source', table_name 't4') - - Foreign table "import_dest3.x 4" - Column | Type | Collation | Nullable | Default | FDW options ---------+-----------------------+-----------+----------+---------+--------------------- - c1 | double precision | | | | (column_name 'c1') - C 2 | text | | | | (column_name 'C 2') - c3 | character varying(42) | | | | (column_name 'c3') -Server: loopback -FDW options: (schema_name 'import_source', table_name 'x 4') - - Foreign table "import_dest3.x 5" - Column | Type | Collation | Nullable | Default | FDW options ---------+------+-----------+----------+---------+------------- -Server: loopback -FDW options: (schema_name 'import_source', table_name 'x 5') - - Foreign table "import_dest3.x 6" - Column | Type | Collation | Nullable | Default | FDW options ---------+---------+-----------+----------+---------+-------------------- - c1 | integer | | | | (column_name 'c1') - c2 | integer | | | | (column_name 'c2') -Server: loopback -FDW options: (schema_name 'import_source', table_name 'x 6') - --- Check LIMIT TO and EXCEPT -CREATE SCHEMA import_dest4; -IMPORT FOREIGN SCHEMA import_source LIMIT TO (t1, nonesuch, t4_part) - FROM SERVER loopback INTO import_dest4; -\det+ import_dest4.* - List of foreign tables - Schema | Table | Server | FDW options | Description ---------------+---------+----------+-----------------------------------------------------+------------- - import_dest4 | t1 | loopback | (schema_name 'import_source', table_name 't1') | - import_dest4 | t4_part | loopback | (schema_name 'import_source', table_name 't4_part') | -(2 rows) - -IMPORT FOREIGN SCHEMA import_source EXCEPT (t1, "x 4", nonesuch, t4_part) - FROM SERVER loopback INTO import_dest4; -\det+ import_dest4.* - List of foreign tables - Schema | Table | Server | FDW options | Description ---------------+---------+----------+-----------------------------------------------------+------------- - import_dest4 | t1 | loopback | (schema_name 'import_source', table_name 't1') | - import_dest4 | t2 | loopback | (schema_name 'import_source', table_name 't2') | - import_dest4 | t3 | loopback | (schema_name 'import_source', table_name 't3') | - import_dest4 | t4 | loopback | (schema_name 'import_source', table_name 't4') | - import_dest4 | t4_part | loopback | (schema_name 'import_source', table_name 't4_part') | - import_dest4 | x 5 | loopback | (schema_name 'import_source', table_name 'x 5') | - import_dest4 | x 6 | loopback | (schema_name 'import_source', table_name 'x 6') | -(7 rows) - --- Assorted error cases -IMPORT FOREIGN SCHEMA import_source FROM SERVER loopback INTO import_dest4; -ERROR: relation "t1" already exists -CONTEXT: importing foreign table "t1" -IMPORT FOREIGN SCHEMA nonesuch FROM SERVER loopback INTO import_dest4; -ERROR: schema "nonesuch" is not present on foreign server "loopback" -IMPORT FOREIGN SCHEMA nonesuch FROM SERVER loopback INTO notthere; -ERROR: schema "notthere" does not exist -IMPORT FOREIGN SCHEMA nonesuch FROM SERVER nowhere INTO notthere; -ERROR: server "nowhere" does not exist --- Check case of a type present only on the remote server. --- We can fake this by dropping the type locally in our transaction. -CREATE TYPE "Colors" AS ENUM ('red', 'green', 'blue'); -CREATE TABLE import_source.t5 (c1 int, c2 text collate "C", "Col" "Colors"); -CREATE SCHEMA import_dest5; -BEGIN; -DROP TYPE "Colors" CASCADE; -NOTICE: drop cascades to column Col of table import_source.t5 -IMPORT FOREIGN SCHEMA import_source LIMIT TO (t5) - FROM SERVER loopback INTO import_dest5; -- ERROR -ERROR: type "public.Colors" does not exist -LINE 4: "Col" public."Colors" OPTIONS (column_name 'Col') - ^ -QUERY: CREATE FOREIGN TABLE t5 ( - c1 integer OPTIONS (column_name 'c1'), - c2 text OPTIONS (column_name 'c2') COLLATE pg_catalog."C", - "Col" public."Colors" OPTIONS (column_name 'Col') -) SERVER loopback -OPTIONS (schema_name 'import_source', table_name 't5'); -CONTEXT: importing foreign table "t5" -ROLLBACK; -BEGIN; -CREATE SERVER fetch101 FOREIGN DATA WRAPPER postgres_fdw OPTIONS( fetch_size '101' ); -SELECT count(*) -FROM pg_foreign_server -WHERE srvname = 'fetch101' -AND srvoptions @> array['fetch_size=101']; - count -------- - 1 -(1 row) - -ALTER SERVER fetch101 OPTIONS( SET fetch_size '202' ); -SELECT count(*) -FROM pg_foreign_server -WHERE srvname = 'fetch101' -AND srvoptions @> array['fetch_size=101']; - count -------- - 0 -(1 row) - -SELECT count(*) -FROM pg_foreign_server -WHERE srvname = 'fetch101' -AND srvoptions @> array['fetch_size=202']; - count -------- - 1 -(1 row) - -CREATE FOREIGN TABLE table30000 ( x int ) SERVER fetch101 OPTIONS ( fetch_size '30000' ); -SELECT COUNT(*) -FROM pg_foreign_table -WHERE ftrelid = 'table30000'::regclass -AND ftoptions @> array['fetch_size=30000']; - count -------- - 1 -(1 row) - -ALTER FOREIGN TABLE table30000 OPTIONS ( SET fetch_size '60000'); -SELECT COUNT(*) -FROM pg_foreign_table -WHERE ftrelid = 'table30000'::regclass -AND ftoptions @> array['fetch_size=30000']; - count -------- - 0 -(1 row) - -SELECT COUNT(*) -FROM pg_foreign_table -WHERE ftrelid = 'table30000'::regclass -AND ftoptions @> array['fetch_size=60000']; - count -------- - 1 -(1 row) - -ROLLBACK; --- =================================================================== --- test partitionwise joins --- =================================================================== -SET enable_partitionwise_join=on; -CREATE TABLE fprt1 (a int, b int, c varchar) PARTITION BY RANGE(a); -CREATE TABLE fprt1_p1 (LIKE fprt1); -CREATE TABLE fprt1_p2 (LIKE fprt1); -ALTER TABLE fprt1_p1 SET (autovacuum_enabled = 'false'); -ALTER TABLE fprt1_p2 SET (autovacuum_enabled = 'false'); -INSERT INTO fprt1_p1 SELECT i, i, to_char(i/50, 'FM0000') FROM generate_series(0, 249, 2) i; -INSERT INTO fprt1_p2 SELECT i, i, to_char(i/50, 'FM0000') FROM generate_series(250, 499, 2) i; -CREATE FOREIGN TABLE ftprt1_p1 PARTITION OF fprt1 FOR VALUES FROM (0) TO (250) - SERVER loopback OPTIONS (table_name 'fprt1_p1', use_remote_estimate 'true'); -CREATE FOREIGN TABLE ftprt1_p2 PARTITION OF fprt1 FOR VALUES FROM (250) TO (500) - SERVER loopback OPTIONS (TABLE_NAME 'fprt1_p2'); -ANALYZE fprt1; -ANALYZE fprt1_p1; -ANALYZE fprt1_p2; -CREATE TABLE fprt2 (a int, b int, c varchar) PARTITION BY RANGE(b); -CREATE TABLE fprt2_p1 (LIKE fprt2); -CREATE TABLE fprt2_p2 (LIKE fprt2); -ALTER TABLE fprt2_p1 SET (autovacuum_enabled = 'false'); -ALTER TABLE fprt2_p2 SET (autovacuum_enabled = 'false'); -INSERT INTO fprt2_p1 SELECT i, i, to_char(i/50, 'FM0000') FROM generate_series(0, 249, 3) i; -INSERT INTO fprt2_p2 SELECT i, i, to_char(i/50, 'FM0000') FROM generate_series(250, 499, 3) i; -CREATE FOREIGN TABLE ftprt2_p1 (b int, c varchar, a int) - SERVER loopback OPTIONS (table_name 'fprt2_p1', use_remote_estimate 'true'); -ALTER TABLE fprt2 ATTACH PARTITION ftprt2_p1 FOR VALUES FROM (0) TO (250); -CREATE FOREIGN TABLE ftprt2_p2 PARTITION OF fprt2 FOR VALUES FROM (250) TO (500) - SERVER loopback OPTIONS (table_name 'fprt2_p2', use_remote_estimate 'true'); -ANALYZE fprt2; -ANALYZE fprt2_p1; -ANALYZE fprt2_p2; --- inner join three tables -EXPLAIN (COSTS OFF) -SELECT t1.a,t2.b,t3.c FROM fprt1 t1 INNER JOIN fprt2 t2 ON (t1.a = t2.b) INNER JOIN fprt1 t3 ON (t2.b = t3.a) WHERE t1.a % 25 =0 ORDER BY 1,2,3; - QUERY PLAN ------------------------------------------------------------------------------------------------------ - Sort - Sort Key: t1.a, t3.c - -> Append - -> Foreign Scan - Relations: ((ftprt1_p1 t1_1) INNER JOIN (ftprt2_p1 t2_1)) INNER JOIN (ftprt1_p1 t3_1) - -> Foreign Scan - Relations: ((ftprt1_p2 t1_2) INNER JOIN (ftprt2_p2 t2_2)) INNER JOIN (ftprt1_p2 t3_2) -(7 rows) - -SELECT t1.a,t2.b,t3.c FROM fprt1 t1 INNER JOIN fprt2 t2 ON (t1.a = t2.b) INNER JOIN fprt1 t3 ON (t2.b = t3.a) WHERE t1.a % 25 =0 ORDER BY 1,2,3; - a | b | c ------+-----+------ - 0 | 0 | 0000 - 150 | 150 | 0003 - 250 | 250 | 0005 - 400 | 400 | 0008 -(4 rows) - --- left outer join + nullable clause -EXPLAIN (VERBOSE, COSTS OFF) -SELECT t1.a,t2.b,t2.c FROM fprt1 t1 LEFT JOIN (SELECT * FROM fprt2 WHERE a < 10) t2 ON (t1.a = t2.b and t1.b = t2.a) WHERE t1.a < 10 ORDER BY 1,2,3; - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Foreign Scan - Output: t1.a, fprt2.b, fprt2.c - Relations: (public.ftprt1_p1 t1) LEFT JOIN (public.ftprt2_p1 fprt2) - Remote SQL: SELECT r5.a, r6.b, r6.c FROM (public.fprt1_p1 r5 LEFT JOIN public.fprt2_p1 r6 ON (((r5.a = r6.b)) AND ((r5.b = r6.a)) AND ((r6.a < 10)))) WHERE ((r5.a < 10)) ORDER BY r5.a ASC NULLS LAST, r6.b ASC NULLS LAST, r6.c ASC NULLS LAST -(4 rows) - -SELECT t1.a,t2.b,t2.c FROM fprt1 t1 LEFT JOIN (SELECT * FROM fprt2 WHERE a < 10) t2 ON (t1.a = t2.b and t1.b = t2.a) WHERE t1.a < 10 ORDER BY 1,2,3; - a | b | c ----+---+------ - 0 | 0 | 0000 - 2 | | - 4 | | - 6 | 6 | 0000 - 8 | | -(5 rows) - --- with whole-row reference; partitionwise join does not apply -EXPLAIN (COSTS OFF) -SELECT t1.wr, t2.wr FROM (SELECT t1 wr, a FROM fprt1 t1 WHERE t1.a % 25 = 0) t1 FULL JOIN (SELECT t2 wr, b FROM fprt2 t2 WHERE t2.b % 25 = 0) t2 ON (t1.a = t2.b) ORDER BY 1,2; - QUERY PLAN --------------------------------------------------------- - Sort - Sort Key: ((t1.*)::fprt1), ((t2.*)::fprt2) - -> Hash Full Join - Hash Cond: (t1.a = t2.b) - -> Append - -> Foreign Scan on ftprt1_p1 t1_1 - -> Foreign Scan on ftprt1_p2 t1_2 - -> Hash - -> Append - -> Foreign Scan on ftprt2_p1 t2_1 - -> Foreign Scan on ftprt2_p2 t2_2 -(11 rows) - -SELECT t1.wr, t2.wr FROM (SELECT t1 wr, a FROM fprt1 t1 WHERE t1.a % 25 = 0) t1 FULL JOIN (SELECT t2 wr, b FROM fprt2 t2 WHERE t2.b % 25 = 0) t2 ON (t1.a = t2.b) ORDER BY 1,2; - wr | wr -----------------+---------------- - (0,0,0000) | (0,0,0000) - (50,50,0001) | - (100,100,0002) | - (150,150,0003) | (150,150,0003) - (200,200,0004) | - (250,250,0005) | (250,250,0005) - (300,300,0006) | - (350,350,0007) | - (400,400,0008) | (400,400,0008) - (450,450,0009) | - | (75,75,0001) - | (225,225,0004) - | (325,325,0006) - | (475,475,0009) -(14 rows) - --- join with lateral reference -EXPLAIN (COSTS OFF) -SELECT t1.a,t1.b FROM fprt1 t1, LATERAL (SELECT t2.a, t2.b FROM fprt2 t2 WHERE t1.a = t2.b AND t1.b = t2.a) q WHERE t1.a%25 = 0 ORDER BY 1,2; - QUERY PLAN ------------------------------------------------------------------------ - Sort - Sort Key: t1.a, t1.b - -> Append - -> Foreign Scan - Relations: (ftprt1_p1 t1_1) INNER JOIN (ftprt2_p1 t2_1) - -> Foreign Scan - Relations: (ftprt1_p2 t1_2) INNER JOIN (ftprt2_p2 t2_2) -(7 rows) - -SELECT t1.a,t1.b FROM fprt1 t1, LATERAL (SELECT t2.a, t2.b FROM fprt2 t2 WHERE t1.a = t2.b AND t1.b = t2.a) q WHERE t1.a%25 = 0 ORDER BY 1,2; - a | b ------+----- - 0 | 0 - 150 | 150 - 250 | 250 - 400 | 400 -(4 rows) - --- with PHVs, partitionwise join selected but no join pushdown -EXPLAIN (COSTS OFF) -SELECT t1.a, t1.phv, t2.b, t2.phv FROM (SELECT 't1_phv' phv, * FROM fprt1 WHERE a % 25 = 0) t1 FULL JOIN (SELECT 't2_phv' phv, * FROM fprt2 WHERE b % 25 = 0) t2 ON (t1.a = t2.b) ORDER BY t1.a, t2.b; - QUERY PLAN ------------------------------------------------------------ - Sort - Sort Key: fprt1.a, fprt2.b - -> Append - -> Hash Full Join - Hash Cond: (fprt1_1.a = fprt2_1.b) - -> Foreign Scan on ftprt1_p1 fprt1_1 - -> Hash - -> Foreign Scan on ftprt2_p1 fprt2_1 - -> Hash Full Join - Hash Cond: (fprt1_2.a = fprt2_2.b) - -> Foreign Scan on ftprt1_p2 fprt1_2 - -> Hash - -> Foreign Scan on ftprt2_p2 fprt2_2 -(13 rows) - -SELECT t1.a, t1.phv, t2.b, t2.phv FROM (SELECT 't1_phv' phv, * FROM fprt1 WHERE a % 25 = 0) t1 FULL JOIN (SELECT 't2_phv' phv, * FROM fprt2 WHERE b % 25 = 0) t2 ON (t1.a = t2.b) ORDER BY t1.a, t2.b; - a | phv | b | phv ------+--------+-----+-------- - 0 | t1_phv | 0 | t2_phv - 50 | t1_phv | | - 100 | t1_phv | | - 150 | t1_phv | 150 | t2_phv - 200 | t1_phv | | - 250 | t1_phv | 250 | t2_phv - 300 | t1_phv | | - 350 | t1_phv | | - 400 | t1_phv | 400 | t2_phv - 450 | t1_phv | | - | | 75 | t2_phv - | | 225 | t2_phv - | | 325 | t2_phv - | | 475 | t2_phv -(14 rows) - --- test FOR UPDATE; partitionwise join does not apply -EXPLAIN (COSTS OFF) -SELECT t1.a, t2.b FROM fprt1 t1 INNER JOIN fprt2 t2 ON (t1.a = t2.b) WHERE t1.a % 25 = 0 ORDER BY 1,2 FOR UPDATE OF t1; - QUERY PLAN --------------------------------------------------------------- - LockRows - -> Sort - Sort Key: t1.a - -> Hash Join - Hash Cond: (t2.b = t1.a) - -> Append - -> Foreign Scan on ftprt2_p1 t2_1 - -> Foreign Scan on ftprt2_p2 t2_2 - -> Hash - -> Append - -> Foreign Scan on ftprt1_p1 t1_1 - -> Foreign Scan on ftprt1_p2 t1_2 -(12 rows) - -SELECT t1.a, t2.b FROM fprt1 t1 INNER JOIN fprt2 t2 ON (t1.a = t2.b) WHERE t1.a % 25 = 0 ORDER BY 1,2 FOR UPDATE OF t1; - a | b ------+----- - 0 | 0 - 150 | 150 - 250 | 250 - 400 | 400 -(4 rows) - -RESET enable_partitionwise_join; --- =================================================================== --- test partitionwise aggregates --- =================================================================== -CREATE TABLE pagg_tab (a int, b int, c text) PARTITION BY RANGE(a); -CREATE TABLE pagg_tab_p1 (LIKE pagg_tab); -CREATE TABLE pagg_tab_p2 (LIKE pagg_tab); -CREATE TABLE pagg_tab_p3 (LIKE pagg_tab); -INSERT INTO pagg_tab_p1 SELECT i % 30, i % 50, to_char(i/30, 'FM0000') FROM generate_series(1, 3000) i WHERE (i % 30) < 10; -INSERT INTO pagg_tab_p2 SELECT i % 30, i % 50, to_char(i/30, 'FM0000') FROM generate_series(1, 3000) i WHERE (i % 30) < 20 and (i % 30) >= 10; -INSERT INTO pagg_tab_p3 SELECT i % 30, i % 50, to_char(i/30, 'FM0000') FROM generate_series(1, 3000) i WHERE (i % 30) < 30 and (i % 30) >= 20; --- Create foreign partitions -CREATE FOREIGN TABLE fpagg_tab_p1 PARTITION OF pagg_tab FOR VALUES FROM (0) TO (10) SERVER loopback OPTIONS (table_name 'pagg_tab_p1'); -CREATE FOREIGN TABLE fpagg_tab_p2 PARTITION OF pagg_tab FOR VALUES FROM (10) TO (20) SERVER loopback OPTIONS (table_name 'pagg_tab_p2'); -CREATE FOREIGN TABLE fpagg_tab_p3 PARTITION OF pagg_tab FOR VALUES FROM (20) TO (30) SERVER loopback OPTIONS (table_name 'pagg_tab_p3'); -ANALYZE pagg_tab; -ANALYZE fpagg_tab_p1; -ANALYZE fpagg_tab_p2; -ANALYZE fpagg_tab_p3; --- When GROUP BY clause matches with PARTITION KEY. --- Plan with partitionwise aggregates is disabled -SET enable_partitionwise_aggregate TO false; -EXPLAIN (COSTS OFF) -SELECT a, sum(b), min(b), count(*) FROM pagg_tab GROUP BY a HAVING avg(b) < 22 ORDER BY 1; - QUERY PLAN ------------------------------------------------------------ - Sort - Sort Key: pagg_tab.a - -> HashAggregate - Group Key: pagg_tab.a - Filter: (avg(pagg_tab.b) < '22'::numeric) - -> Append - -> Foreign Scan on fpagg_tab_p1 pagg_tab_1 - -> Foreign Scan on fpagg_tab_p2 pagg_tab_2 - -> Foreign Scan on fpagg_tab_p3 pagg_tab_3 -(9 rows) - --- Plan with partitionwise aggregates is enabled -SET enable_partitionwise_aggregate TO true; -EXPLAIN (COSTS OFF) -SELECT a, sum(b), min(b), count(*) FROM pagg_tab GROUP BY a HAVING avg(b) < 22 ORDER BY 1; - QUERY PLAN ------------------------------------------------------------------ - Sort - Sort Key: pagg_tab.a - -> Append - -> Foreign Scan - Relations: Aggregate on (fpagg_tab_p1 pagg_tab) - -> Foreign Scan - Relations: Aggregate on (fpagg_tab_p2 pagg_tab_1) - -> Foreign Scan - Relations: Aggregate on (fpagg_tab_p3 pagg_tab_2) -(9 rows) - -SELECT a, sum(b), min(b), count(*) FROM pagg_tab GROUP BY a HAVING avg(b) < 22 ORDER BY 1; - a | sum | min | count -----+------+-----+------- - 0 | 2000 | 0 | 100 - 1 | 2100 | 1 | 100 - 10 | 2000 | 0 | 100 - 11 | 2100 | 1 | 100 - 20 | 2000 | 0 | 100 - 21 | 2100 | 1 | 100 -(6 rows) - --- Check with whole-row reference --- Should have all the columns in the target list for the given relation -EXPLAIN (VERBOSE, COSTS OFF) -SELECT a, count(t1) FROM pagg_tab t1 GROUP BY a HAVING avg(b) < 22 ORDER BY 1; - QUERY PLAN ------------------------------------------------------------------------- - Sort - Output: t1.a, (count(((t1.*)::pagg_tab))) - Sort Key: t1.a - -> Append - -> HashAggregate - Output: t1.a, count(((t1.*)::pagg_tab)) - Group Key: t1.a - Filter: (avg(t1.b) < '22'::numeric) - -> Foreign Scan on public.fpagg_tab_p1 t1 - Output: t1.a, t1.*, t1.b - Remote SQL: SELECT a, b, c FROM public.pagg_tab_p1 - -> HashAggregate - Output: t1_1.a, count(((t1_1.*)::pagg_tab)) - Group Key: t1_1.a - Filter: (avg(t1_1.b) < '22'::numeric) - -> Foreign Scan on public.fpagg_tab_p2 t1_1 - Output: t1_1.a, t1_1.*, t1_1.b - Remote SQL: SELECT a, b, c FROM public.pagg_tab_p2 - -> HashAggregate - Output: t1_2.a, count(((t1_2.*)::pagg_tab)) - Group Key: t1_2.a - Filter: (avg(t1_2.b) < '22'::numeric) - -> Foreign Scan on public.fpagg_tab_p3 t1_2 - Output: t1_2.a, t1_2.*, t1_2.b - Remote SQL: SELECT a, b, c FROM public.pagg_tab_p3 -(25 rows) - -SELECT a, count(t1) FROM pagg_tab t1 GROUP BY a HAVING avg(b) < 22 ORDER BY 1; - a | count -----+------- - 0 | 100 - 1 | 100 - 10 | 100 - 11 | 100 - 20 | 100 - 21 | 100 -(6 rows) - --- When GROUP BY clause does not match with PARTITION KEY. -EXPLAIN (COSTS OFF) -SELECT b, avg(a), max(a), count(*) FROM pagg_tab GROUP BY b HAVING sum(a) < 700 ORDER BY 1; - QUERY PLAN ------------------------------------------------------------------ - Sort - Sort Key: pagg_tab.b - -> Finalize HashAggregate - Group Key: pagg_tab.b - Filter: (sum(pagg_tab.a) < 700) - -> Append - -> Partial HashAggregate - Group Key: pagg_tab.b - -> Foreign Scan on fpagg_tab_p1 pagg_tab - -> Partial HashAggregate - Group Key: pagg_tab_1.b - -> Foreign Scan on fpagg_tab_p2 pagg_tab_1 - -> Partial HashAggregate - Group Key: pagg_tab_2.b - -> Foreign Scan on fpagg_tab_p3 pagg_tab_2 -(15 rows) - --- =================================================================== --- access rights and superuser --- =================================================================== --- Non-superuser cannot create a FDW without a password in the connstr -CREATE ROLE regress_nosuper NOSUPERUSER; -GRANT USAGE ON FOREIGN DATA WRAPPER postgres_fdw TO regress_nosuper; -SET ROLE regress_nosuper; -SHOW is_superuser; - is_superuser --------------- - off -(1 row) - --- This will be OK, we can create the FDW -DO $d$ - BEGIN - EXECUTE $$CREATE SERVER loopback_nopw FOREIGN DATA WRAPPER postgres_fdw - OPTIONS (dbname '$$||current_database()||$$', - port '$$||current_setting('port')||$$' - )$$; - END; -$d$; --- But creation of user mappings for non-superusers should fail -CREATE USER MAPPING FOR public SERVER loopback_nopw; -CREATE USER MAPPING FOR CURRENT_USER SERVER loopback_nopw; -CREATE FOREIGN TABLE ft1_nopw ( - c1 int NOT NULL, - c2 int NOT NULL, - c3 text, - c4 timestamptz, - c5 timestamp, - c6 varchar(10), - c7 char(10) default 'ft1', - c8 user_enum -) SERVER loopback_nopw OPTIONS (schema_name 'public', table_name 'ft1'); -SELECT 1 FROM ft1_nopw LIMIT 1; -ERROR: password is required -DETAIL: Non-superusers must provide a password in the user mapping. --- If we add a password to the connstr it'll fail, because we don't allow passwords --- in connstrs only in user mappings. -DO $d$ - BEGIN - EXECUTE $$ALTER SERVER loopback_nopw OPTIONS (ADD password 'dummypw')$$; - END; -$d$; -ERROR: invalid option "password" -HINT: Valid options in this context are: service, passfile, channel_binding, connect_timeout, dbname, host, hostaddr, port, options, application_name, keepalives, keepalives_idle, keepalives_interval, keepalives_count, tcp_user_timeout, sslmode, sslcompression, sslcert, sslkey, sslrootcert, sslcrl, sslcrldir, sslsni, requirepeer, ssl_min_protocol_version, ssl_max_protocol_version, gssencmode, krbsrvname, gsslib, target_session_attrs, use_remote_estimate, fdw_startup_cost, fdw_tuple_cost, extensions, updatable, truncatable, fetch_size, batch_size, async_capable, keep_connections -CONTEXT: SQL statement "ALTER SERVER loopback_nopw OPTIONS (ADD password 'dummypw')" -PL/pgSQL function inline_code_block line 3 at EXECUTE --- If we add a password for our user mapping instead, we should get a different --- error because the password wasn't actually *used* when we run with trust auth. --- --- This won't work with installcheck, but neither will most of the FDW checks. -ALTER USER MAPPING FOR CURRENT_USER SERVER loopback_nopw OPTIONS (ADD password 'dummypw'); -SELECT 1 FROM ft1_nopw LIMIT 1; -ERROR: password is required -DETAIL: Non-superuser cannot connect if the server does not request a password. -HINT: Target server's authentication method must be changed or password_required=false set in the user mapping attributes. --- Unpriv user cannot make the mapping passwordless -ALTER USER MAPPING FOR CURRENT_USER SERVER loopback_nopw OPTIONS (ADD password_required 'false'); -ERROR: password_required=false is superuser-only -HINT: User mappings with the password_required option set to false may only be created or modified by the superuser -SELECT 1 FROM ft1_nopw LIMIT 1; -ERROR: password is required -DETAIL: Non-superuser cannot connect if the server does not request a password. -HINT: Target server's authentication method must be changed or password_required=false set in the user mapping attributes. -RESET ROLE; --- But the superuser can -ALTER USER MAPPING FOR regress_nosuper SERVER loopback_nopw OPTIONS (ADD password_required 'false'); -SET ROLE regress_nosuper; --- Should finally work now -SELECT 1 FROM ft1_nopw LIMIT 1; - ?column? ----------- - 1 -(1 row) - --- unpriv user also cannot set sslcert / sslkey on the user mapping --- first set password_required so we see the right error messages -ALTER USER MAPPING FOR CURRENT_USER SERVER loopback_nopw OPTIONS (SET password_required 'true'); -ALTER USER MAPPING FOR CURRENT_USER SERVER loopback_nopw OPTIONS (ADD sslcert 'foo.crt'); -ERROR: sslcert and sslkey are superuser-only -HINT: User mappings with the sslcert or sslkey options set may only be created or modified by the superuser -ALTER USER MAPPING FOR CURRENT_USER SERVER loopback_nopw OPTIONS (ADD sslkey 'foo.key'); -ERROR: sslcert and sslkey are superuser-only -HINT: User mappings with the sslcert or sslkey options set may only be created or modified by the superuser --- We're done with the role named after a specific user and need to check the --- changes to the public mapping. -DROP USER MAPPING FOR CURRENT_USER SERVER loopback_nopw; --- This will fail again as it'll resolve the user mapping for public, which --- lacks password_required=false -SELECT 1 FROM ft1_nopw LIMIT 1; -ERROR: password is required -DETAIL: Non-superusers must provide a password in the user mapping. -RESET ROLE; --- The user mapping for public is passwordless and lacks the password_required=false --- mapping option, but will work because the current user is a superuser. -SELECT 1 FROM ft1_nopw LIMIT 1; - ?column? ----------- - 1 -(1 row) - --- cleanup -DROP USER MAPPING FOR public SERVER loopback_nopw; -DROP OWNED BY regress_nosuper; -DROP ROLE regress_nosuper; --- Clean-up -RESET enable_partitionwise_aggregate; --- Two-phase transactions are not supported. -BEGIN; -SELECT count(*) FROM ft1; - count -------- - 822 -(1 row) - --- error here -PREPARE TRANSACTION 'fdw_tpc'; -ERROR: cannot PREPARE a transaction that has operated on postgres_fdw foreign tables -ROLLBACK; -WARNING: there is no transaction in progress --- =================================================================== --- reestablish new connection --- =================================================================== --- Change application_name of remote connection to special one --- so that we can easily terminate the connection later. -ALTER SERVER loopback OPTIONS (application_name 'fdw_retry_check'); --- If debug_discard_caches is active, it results in --- dropping remote connections after every transaction, making it --- impossible to test termination meaningfully. So turn that off --- for this test. -SET debug_discard_caches = 0; --- Make sure we have a remote connection. -SELECT 1 FROM ft1 LIMIT 1; - ?column? ----------- - 1 -(1 row) - --- Terminate the remote connection and wait for the termination to complete. -SELECT pg_terminate_backend(pid, 180000) FROM pg_stat_activity - WHERE application_name = 'fdw_retry_check'; - pg_terminate_backend ----------------------- - t -(1 row) - --- This query should detect the broken connection when starting new remote --- transaction, reestablish new connection, and then succeed. -BEGIN; -SELECT 1 FROM ft1 LIMIT 1; - ?column? ----------- - 1 -(1 row) - --- If we detect the broken connection when starting a new remote --- subtransaction, we should fail instead of establishing a new connection. --- Terminate the remote connection and wait for the termination to complete. -SELECT pg_terminate_backend(pid, 180000) FROM pg_stat_activity - WHERE application_name = 'fdw_retry_check'; - pg_terminate_backend ----------------------- - t -(1 row) - -SAVEPOINT s; --- The text of the error might vary across platforms, so only show SQLSTATE. -\set VERBOSITY sqlstate -SELECT 1 FROM ft1 LIMIT 1; -- should fail -ERROR: 08006 -\set VERBOSITY default -COMMIT; -RESET debug_discard_caches; --- ============================================================================= --- test connection invalidation cases and postgres_fdw_get_connections function --- ============================================================================= --- Let's ensure to close all the existing cached connections. -SELECT 1 FROM postgres_fdw_disconnect_all(); - ?column? ----------- - 1 -(1 row) - --- No cached connections, so no records should be output. -SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; - server_name -------------- -(0 rows) - --- This test case is for closing the connection in pgfdw_xact_callback -BEGIN; --- Connection xact depth becomes 1 i.e. the connection is in midst of the xact. -SELECT 1 FROM ft1 LIMIT 1; - ?column? ----------- - 1 -(1 row) - -SELECT 1 FROM ft7 LIMIT 1; - ?column? ----------- - 1 -(1 row) - --- List all the existing cached connections. loopback and loopback3 should be --- output. -SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; - server_name -------------- - loopback - loopback3 -(2 rows) - --- Connections are not closed at the end of the alter and drop statements. --- That's because the connections are in midst of this xact, --- they are just marked as invalid in pgfdw_inval_callback. -ALTER SERVER loopback OPTIONS (ADD use_remote_estimate 'off'); -DROP SERVER loopback3 CASCADE; -NOTICE: drop cascades to 2 other objects -DETAIL: drop cascades to user mapping for public on server loopback3 -drop cascades to foreign table ft7 --- List all the existing cached connections. loopback and loopback3 --- should be output as invalid connections. Also the server name for --- loopback3 should be NULL because the server was dropped. -SELECT * FROM postgres_fdw_get_connections() ORDER BY 1; - server_name | valid --------------+------- - loopback | f - | f -(2 rows) - --- The invalid connections get closed in pgfdw_xact_callback during commit. -COMMIT; --- All cached connections were closed while committing above xact, so no --- records should be output. -SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; - server_name -------------- -(0 rows) - --- ======================================================================= --- test postgres_fdw_disconnect and postgres_fdw_disconnect_all functions --- ======================================================================= -BEGIN; --- Ensure to cache loopback connection. -SELECT 1 FROM ft1 LIMIT 1; - ?column? ----------- - 1 -(1 row) - --- Ensure to cache loopback2 connection. -SELECT 1 FROM ft6 LIMIT 1; - ?column? ----------- - 1 -(1 row) - --- List all the existing cached connections. loopback and loopback2 should be --- output. -SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; - server_name -------------- - loopback - loopback2 -(2 rows) - --- Issue a warning and return false as loopback connection is still in use and --- can not be closed. -SELECT postgres_fdw_disconnect('loopback'); -WARNING: cannot close connection for server "loopback" because it is still in use - postgres_fdw_disconnect -------------------------- - f -(1 row) - --- List all the existing cached connections. loopback and loopback2 should be --- output. -SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; - server_name -------------- - loopback - loopback2 -(2 rows) - --- Return false as connections are still in use, warnings are issued. --- But disable warnings temporarily because the order of them is not stable. -SET client_min_messages = 'ERROR'; -SELECT postgres_fdw_disconnect_all(); - postgres_fdw_disconnect_all ------------------------------ - f -(1 row) - -RESET client_min_messages; -COMMIT; --- Ensure that loopback2 connection is closed. -SELECT 1 FROM postgres_fdw_disconnect('loopback2'); - ?column? ----------- - 1 -(1 row) - -SELECT server_name FROM postgres_fdw_get_connections() WHERE server_name = 'loopback2'; - server_name -------------- -(0 rows) - --- Return false as loopback2 connection is closed already. -SELECT postgres_fdw_disconnect('loopback2'); - postgres_fdw_disconnect -------------------------- - f -(1 row) - --- Return an error as there is no foreign server with given name. -SELECT postgres_fdw_disconnect('unknownserver'); -ERROR: server "unknownserver" does not exist --- Let's ensure to close all the existing cached connections. -SELECT 1 FROM postgres_fdw_disconnect_all(); - ?column? ----------- - 1 -(1 row) - --- No cached connections, so no records should be output. -SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; - server_name -------------- -(0 rows) - --- ============================================================================= --- test case for having multiple cached connections for a foreign server --- ============================================================================= -CREATE ROLE regress_multi_conn_user1 SUPERUSER; -CREATE ROLE regress_multi_conn_user2 SUPERUSER; -CREATE USER MAPPING FOR regress_multi_conn_user1 SERVER loopback; -CREATE USER MAPPING FOR regress_multi_conn_user2 SERVER loopback; -BEGIN; --- Will cache loopback connection with user mapping for regress_multi_conn_user1 -SET ROLE regress_multi_conn_user1; -SELECT 1 FROM ft1 LIMIT 1; - ?column? ----------- - 1 -(1 row) - -RESET ROLE; --- Will cache loopback connection with user mapping for regress_multi_conn_user2 -SET ROLE regress_multi_conn_user2; -SELECT 1 FROM ft1 LIMIT 1; - ?column? ----------- - 1 -(1 row) - -RESET ROLE; --- Should output two connections for loopback server -SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; - server_name -------------- - loopback - loopback -(2 rows) - -COMMIT; --- Let's ensure to close all the existing cached connections. -SELECT 1 FROM postgres_fdw_disconnect_all(); - ?column? ----------- - 1 -(1 row) - --- No cached connections, so no records should be output. -SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; - server_name -------------- -(0 rows) - --- Clean up -DROP USER MAPPING FOR regress_multi_conn_user1 SERVER loopback; -DROP USER MAPPING FOR regress_multi_conn_user2 SERVER loopback; -DROP ROLE regress_multi_conn_user1; -DROP ROLE regress_multi_conn_user2; --- =================================================================== --- Test foreign server level option keep_connections --- =================================================================== --- By default, the connections associated with foreign server are cached i.e. --- keep_connections option is on. Set it to off. -ALTER SERVER loopback OPTIONS (keep_connections 'off'); --- connection to loopback server is closed at the end of xact --- as keep_connections was set to off. -SELECT 1 FROM ft1 LIMIT 1; - ?column? ----------- - 1 -(1 row) - --- No cached connections, so no records should be output. -SELECT server_name FROM postgres_fdw_get_connections() ORDER BY 1; - server_name -------------- -(0 rows) - -ALTER SERVER loopback OPTIONS (SET keep_connections 'on'); --- =================================================================== --- batch insert --- =================================================================== -BEGIN; -CREATE SERVER batch10 FOREIGN DATA WRAPPER postgres_fdw OPTIONS( batch_size '10' ); -SELECT count(*) -FROM pg_foreign_server -WHERE srvname = 'batch10' -AND srvoptions @> array['batch_size=10']; - count -------- - 1 -(1 row) - -ALTER SERVER batch10 OPTIONS( SET batch_size '20' ); -SELECT count(*) -FROM pg_foreign_server -WHERE srvname = 'batch10' -AND srvoptions @> array['batch_size=10']; - count -------- - 0 -(1 row) - -SELECT count(*) -FROM pg_foreign_server -WHERE srvname = 'batch10' -AND srvoptions @> array['batch_size=20']; - count -------- - 1 -(1 row) - -CREATE FOREIGN TABLE table30 ( x int ) SERVER batch10 OPTIONS ( batch_size '30' ); -SELECT COUNT(*) -FROM pg_foreign_table -WHERE ftrelid = 'table30'::regclass -AND ftoptions @> array['batch_size=30']; - count -------- - 1 -(1 row) - -ALTER FOREIGN TABLE table30 OPTIONS ( SET batch_size '40'); -SELECT COUNT(*) -FROM pg_foreign_table -WHERE ftrelid = 'table30'::regclass -AND ftoptions @> array['batch_size=30']; - count -------- - 0 -(1 row) - -SELECT COUNT(*) -FROM pg_foreign_table -WHERE ftrelid = 'table30'::regclass -AND ftoptions @> array['batch_size=40']; - count -------- - 1 -(1 row) - -ROLLBACK; -CREATE TABLE batch_table ( x int ); -CREATE FOREIGN TABLE ftable ( x int ) SERVER loopback OPTIONS ( table_name 'batch_table', batch_size '10' ); -EXPLAIN (VERBOSE, COSTS OFF) INSERT INTO ftable SELECT * FROM generate_series(1, 10) i; - QUERY PLAN -------------------------------------------------------------- - Insert on public.ftable - Remote SQL: INSERT INTO public.batch_table(x) VALUES ($1) - Batch Size: 10 - -> Function Scan on pg_catalog.generate_series i - Output: i.i - Function Call: generate_series(1, 10) -(6 rows) - -INSERT INTO ftable SELECT * FROM generate_series(1, 10) i; -INSERT INTO ftable SELECT * FROM generate_series(11, 31) i; -INSERT INTO ftable VALUES (32); -INSERT INTO ftable VALUES (33), (34); -SELECT COUNT(*) FROM ftable; - count -------- - 34 -(1 row) - -TRUNCATE batch_table; -DROP FOREIGN TABLE ftable; --- try if large batches exceed max number of bind parameters -CREATE FOREIGN TABLE ftable ( x int ) SERVER loopback OPTIONS ( table_name 'batch_table', batch_size '100000' ); -INSERT INTO ftable SELECT * FROM generate_series(1, 70000) i; -SELECT COUNT(*) FROM ftable; - count -------- - 70000 -(1 row) - -TRUNCATE batch_table; -DROP FOREIGN TABLE ftable; --- Disable batch insert -CREATE FOREIGN TABLE ftable ( x int ) SERVER loopback OPTIONS ( table_name 'batch_table', batch_size '1' ); -EXPLAIN (VERBOSE, COSTS OFF) INSERT INTO ftable VALUES (1), (2); - QUERY PLAN -------------------------------------------------------------- - Insert on public.ftable - Remote SQL: INSERT INTO public.batch_table(x) VALUES ($1) - Batch Size: 1 - -> Values Scan on "*VALUES*" - Output: "*VALUES*".column1 -(5 rows) - -INSERT INTO ftable VALUES (1), (2); -SELECT COUNT(*) FROM ftable; - count -------- - 2 -(1 row) - --- Disable batch inserting into foreign tables with BEFORE ROW INSERT triggers --- even if the batch_size option is enabled. -ALTER FOREIGN TABLE ftable OPTIONS ( SET batch_size '10' ); -CREATE TRIGGER trig_row_before BEFORE INSERT ON ftable -FOR EACH ROW EXECUTE PROCEDURE trigger_data(23,'skidoo'); -EXPLAIN (VERBOSE, COSTS OFF) INSERT INTO ftable VALUES (3), (4); - QUERY PLAN -------------------------------------------------------------- - Insert on public.ftable - Remote SQL: INSERT INTO public.batch_table(x) VALUES ($1) - Batch Size: 1 - -> Values Scan on "*VALUES*" - Output: "*VALUES*".column1 -(5 rows) - -INSERT INTO ftable VALUES (3), (4); -NOTICE: trig_row_before(23, skidoo) BEFORE ROW INSERT ON ftable -NOTICE: NEW: (3) -NOTICE: trig_row_before(23, skidoo) BEFORE ROW INSERT ON ftable -NOTICE: NEW: (4) -SELECT COUNT(*) FROM ftable; - count -------- - 4 -(1 row) - --- Clean up -DROP TRIGGER trig_row_before ON ftable; -DROP FOREIGN TABLE ftable; -DROP TABLE batch_table; --- Use partitioning -CREATE TABLE batch_table ( x int ) PARTITION BY HASH (x); -CREATE TABLE batch_table_p0 (LIKE batch_table); -CREATE FOREIGN TABLE batch_table_p0f - PARTITION OF batch_table - FOR VALUES WITH (MODULUS 3, REMAINDER 0) - SERVER loopback - OPTIONS (table_name 'batch_table_p0', batch_size '10'); -CREATE TABLE batch_table_p1 (LIKE batch_table); -CREATE FOREIGN TABLE batch_table_p1f - PARTITION OF batch_table - FOR VALUES WITH (MODULUS 3, REMAINDER 1) - SERVER loopback - OPTIONS (table_name 'batch_table_p1', batch_size '1'); -CREATE TABLE batch_table_p2 - PARTITION OF batch_table - FOR VALUES WITH (MODULUS 3, REMAINDER 2); -INSERT INTO batch_table SELECT * FROM generate_series(1, 66) i; -SELECT COUNT(*) FROM batch_table; - count -------- - 66 -(1 row) - --- Check that enabling batched inserts doesn't interfere with cross-partition --- updates -CREATE TABLE batch_cp_upd_test (a int) PARTITION BY LIST (a); -CREATE TABLE batch_cp_upd_test1 (LIKE batch_cp_upd_test); -CREATE FOREIGN TABLE batch_cp_upd_test1_f - PARTITION OF batch_cp_upd_test - FOR VALUES IN (1) - SERVER loopback - OPTIONS (table_name 'batch_cp_upd_test1', batch_size '10'); -CREATE TABLE batch_cp_up_test1 PARTITION OF batch_cp_upd_test - FOR VALUES IN (2); -INSERT INTO batch_cp_upd_test VALUES (1), (2); --- The following moves a row from the local partition to the foreign one -UPDATE batch_cp_upd_test t SET a = 1 FROM (VALUES (1), (2)) s(a) WHERE t.a = s.a; -ERROR: cannot route tuples into foreign table to be updated "batch_cp_upd_test1_f" -SELECT tableoid::regclass, * FROM batch_cp_upd_test; - tableoid | a -----------------------+--- - batch_cp_upd_test1_f | 1 - batch_cp_up_test1 | 2 -(2 rows) - --- Clean up -DROP TABLE batch_table, batch_cp_upd_test, batch_table_p0, batch_table_p1 CASCADE; --- Use partitioning -ALTER SERVER loopback OPTIONS (ADD batch_size '10'); -CREATE TABLE batch_table ( x int, field1 text, field2 text) PARTITION BY HASH (x); -CREATE TABLE batch_table_p0 (LIKE batch_table); -ALTER TABLE batch_table_p0 ADD CONSTRAINT p0_pkey PRIMARY KEY (x); -CREATE FOREIGN TABLE batch_table_p0f - PARTITION OF batch_table - FOR VALUES WITH (MODULUS 2, REMAINDER 0) - SERVER loopback - OPTIONS (table_name 'batch_table_p0'); -CREATE TABLE batch_table_p1 (LIKE batch_table); -ALTER TABLE batch_table_p1 ADD CONSTRAINT p1_pkey PRIMARY KEY (x); -CREATE FOREIGN TABLE batch_table_p1f - PARTITION OF batch_table - FOR VALUES WITH (MODULUS 2, REMAINDER 1) - SERVER loopback - OPTIONS (table_name 'batch_table_p1'); -INSERT INTO batch_table SELECT i, 'test'||i, 'test'|| i FROM generate_series(1, 50) i; -SELECT COUNT(*) FROM batch_table; - count -------- - 50 -(1 row) - -SELECT * FROM batch_table ORDER BY x; - x | field1 | field2 -----+--------+-------- - 1 | test1 | test1 - 2 | test2 | test2 - 3 | test3 | test3 - 4 | test4 | test4 - 5 | test5 | test5 - 6 | test6 | test6 - 7 | test7 | test7 - 8 | test8 | test8 - 9 | test9 | test9 - 10 | test10 | test10 - 11 | test11 | test11 - 12 | test12 | test12 - 13 | test13 | test13 - 14 | test14 | test14 - 15 | test15 | test15 - 16 | test16 | test16 - 17 | test17 | test17 - 18 | test18 | test18 - 19 | test19 | test19 - 20 | test20 | test20 - 21 | test21 | test21 - 22 | test22 | test22 - 23 | test23 | test23 - 24 | test24 | test24 - 25 | test25 | test25 - 26 | test26 | test26 - 27 | test27 | test27 - 28 | test28 | test28 - 29 | test29 | test29 - 30 | test30 | test30 - 31 | test31 | test31 - 32 | test32 | test32 - 33 | test33 | test33 - 34 | test34 | test34 - 35 | test35 | test35 - 36 | test36 | test36 - 37 | test37 | test37 - 38 | test38 | test38 - 39 | test39 | test39 - 40 | test40 | test40 - 41 | test41 | test41 - 42 | test42 | test42 - 43 | test43 | test43 - 44 | test44 | test44 - 45 | test45 | test45 - 46 | test46 | test46 - 47 | test47 | test47 - 48 | test48 | test48 - 49 | test49 | test49 - 50 | test50 | test50 -(50 rows) - -ALTER SERVER loopback OPTIONS (DROP batch_size); --- =================================================================== --- test asynchronous execution --- =================================================================== -ALTER SERVER loopback OPTIONS (DROP extensions); -ALTER SERVER loopback OPTIONS (ADD async_capable 'true'); -ALTER SERVER loopback2 OPTIONS (ADD async_capable 'true'); -CREATE TABLE async_pt (a int, b int, c text) PARTITION BY RANGE (a); -CREATE TABLE base_tbl1 (a int, b int, c text); -CREATE TABLE base_tbl2 (a int, b int, c text); -CREATE FOREIGN TABLE async_p1 PARTITION OF async_pt FOR VALUES FROM (1000) TO (2000) - SERVER loopback OPTIONS (table_name 'base_tbl1'); -CREATE FOREIGN TABLE async_p2 PARTITION OF async_pt FOR VALUES FROM (2000) TO (3000) - SERVER loopback2 OPTIONS (table_name 'base_tbl2'); -INSERT INTO async_p1 SELECT 1000 + i, i, to_char(i, 'FM0000') FROM generate_series(0, 999, 5) i; -INSERT INTO async_p2 SELECT 2000 + i, i, to_char(i, 'FM0000') FROM generate_series(0, 999, 5) i; -ANALYZE async_pt; --- simple queries -CREATE TABLE result_tbl (a int, b int, c text); -EXPLAIN (VERBOSE, COSTS OFF) -INSERT INTO result_tbl SELECT * FROM async_pt WHERE b % 100 = 0; - QUERY PLAN ----------------------------------------------------------------------------------------- - Insert on public.result_tbl - -> Append - -> Async Foreign Scan on public.async_p1 async_pt_1 - Output: async_pt_1.a, async_pt_1.b, async_pt_1.c - Remote SQL: SELECT a, b, c FROM public.base_tbl1 WHERE (((b % 100) = 0)) - -> Async Foreign Scan on public.async_p2 async_pt_2 - Output: async_pt_2.a, async_pt_2.b, async_pt_2.c - Remote SQL: SELECT a, b, c FROM public.base_tbl2 WHERE (((b % 100) = 0)) -(8 rows) - -INSERT INTO result_tbl SELECT * FROM async_pt WHERE b % 100 = 0; -SELECT * FROM result_tbl ORDER BY a; - a | b | c -------+-----+------ - 1000 | 0 | 0000 - 1100 | 100 | 0100 - 1200 | 200 | 0200 - 1300 | 300 | 0300 - 1400 | 400 | 0400 - 1500 | 500 | 0500 - 1600 | 600 | 0600 - 1700 | 700 | 0700 - 1800 | 800 | 0800 - 1900 | 900 | 0900 - 2000 | 0 | 0000 - 2100 | 100 | 0100 - 2200 | 200 | 0200 - 2300 | 300 | 0300 - 2400 | 400 | 0400 - 2500 | 500 | 0500 - 2600 | 600 | 0600 - 2700 | 700 | 0700 - 2800 | 800 | 0800 - 2900 | 900 | 0900 -(20 rows) - -DELETE FROM result_tbl; -EXPLAIN (VERBOSE, COSTS OFF) -INSERT INTO result_tbl SELECT * FROM async_pt WHERE b === 505; - QUERY PLAN ----------------------------------------------------------------- - Insert on public.result_tbl - -> Append - -> Async Foreign Scan on public.async_p1 async_pt_1 - Output: async_pt_1.a, async_pt_1.b, async_pt_1.c - Filter: (async_pt_1.b === 505) - Remote SQL: SELECT a, b, c FROM public.base_tbl1 - -> Async Foreign Scan on public.async_p2 async_pt_2 - Output: async_pt_2.a, async_pt_2.b, async_pt_2.c - Filter: (async_pt_2.b === 505) - Remote SQL: SELECT a, b, c FROM public.base_tbl2 -(10 rows) - -INSERT INTO result_tbl SELECT * FROM async_pt WHERE b === 505; -SELECT * FROM result_tbl ORDER BY a; - a | b | c -------+-----+------ - 1505 | 505 | 0505 - 2505 | 505 | 0505 -(2 rows) - -DELETE FROM result_tbl; --- Check case where multiple partitions use the same connection -CREATE TABLE base_tbl3 (a int, b int, c text); -CREATE FOREIGN TABLE async_p3 PARTITION OF async_pt FOR VALUES FROM (3000) TO (4000) - SERVER loopback2 OPTIONS (table_name 'base_tbl3'); -INSERT INTO async_p3 SELECT 3000 + i, i, to_char(i, 'FM0000') FROM generate_series(0, 999, 5) i; -ANALYZE async_pt; -EXPLAIN (VERBOSE, COSTS OFF) -INSERT INTO result_tbl SELECT * FROM async_pt WHERE b === 505; - QUERY PLAN ----------------------------------------------------------------- - Insert on public.result_tbl - -> Append - -> Async Foreign Scan on public.async_p1 async_pt_1 - Output: async_pt_1.a, async_pt_1.b, async_pt_1.c - Filter: (async_pt_1.b === 505) - Remote SQL: SELECT a, b, c FROM public.base_tbl1 - -> Async Foreign Scan on public.async_p2 async_pt_2 - Output: async_pt_2.a, async_pt_2.b, async_pt_2.c - Filter: (async_pt_2.b === 505) - Remote SQL: SELECT a, b, c FROM public.base_tbl2 - -> Async Foreign Scan on public.async_p3 async_pt_3 - Output: async_pt_3.a, async_pt_3.b, async_pt_3.c - Filter: (async_pt_3.b === 505) - Remote SQL: SELECT a, b, c FROM public.base_tbl3 -(14 rows) - -INSERT INTO result_tbl SELECT * FROM async_pt WHERE b === 505; -SELECT * FROM result_tbl ORDER BY a; - a | b | c -------+-----+------ - 1505 | 505 | 0505 - 2505 | 505 | 0505 - 3505 | 505 | 0505 -(3 rows) - -DELETE FROM result_tbl; -DROP FOREIGN TABLE async_p3; -DROP TABLE base_tbl3; --- Check case where the partitioned table has local/remote partitions -CREATE TABLE async_p3 PARTITION OF async_pt FOR VALUES FROM (3000) TO (4000); -INSERT INTO async_p3 SELECT 3000 + i, i, to_char(i, 'FM0000') FROM generate_series(0, 999, 5) i; -ANALYZE async_pt; -EXPLAIN (VERBOSE, COSTS OFF) -INSERT INTO result_tbl SELECT * FROM async_pt WHERE b === 505; - QUERY PLAN ----------------------------------------------------------------- - Insert on public.result_tbl - -> Append - -> Async Foreign Scan on public.async_p1 async_pt_1 - Output: async_pt_1.a, async_pt_1.b, async_pt_1.c - Filter: (async_pt_1.b === 505) - Remote SQL: SELECT a, b, c FROM public.base_tbl1 - -> Async Foreign Scan on public.async_p2 async_pt_2 - Output: async_pt_2.a, async_pt_2.b, async_pt_2.c - Filter: (async_pt_2.b === 505) - Remote SQL: SELECT a, b, c FROM public.base_tbl2 - -> Seq Scan on public.async_p3 async_pt_3 - Output: async_pt_3.a, async_pt_3.b, async_pt_3.c - Filter: (async_pt_3.b === 505) -(13 rows) - -INSERT INTO result_tbl SELECT * FROM async_pt WHERE b === 505; -SELECT * FROM result_tbl ORDER BY a; - a | b | c -------+-----+------ - 1505 | 505 | 0505 - 2505 | 505 | 0505 - 3505 | 505 | 0505 -(3 rows) - -DELETE FROM result_tbl; --- partitionwise joins -SET enable_partitionwise_join TO true; -CREATE TABLE join_tbl (a1 int, b1 int, c1 text, a2 int, b2 int, c2 text); -EXPLAIN (VERBOSE, COSTS OFF) -INSERT INTO join_tbl SELECT * FROM async_pt t1, async_pt t2 WHERE t1.a = t2.a AND t1.b = t2.b AND t1.b % 100 = 0; - QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Insert on public.join_tbl - -> Append - -> Async Foreign Scan - Output: t1_1.a, t1_1.b, t1_1.c, t2_1.a, t2_1.b, t2_1.c - Relations: (public.async_p1 t1_1) INNER JOIN (public.async_p1 t2_1) - Remote SQL: SELECT r5.a, r5.b, r5.c, r8.a, r8.b, r8.c FROM (public.base_tbl1 r5 INNER JOIN public.base_tbl1 r8 ON (((r5.a = r8.a)) AND ((r5.b = r8.b)) AND (((r5.b % 100) = 0)))) - -> Async Foreign Scan - Output: t1_2.a, t1_2.b, t1_2.c, t2_2.a, t2_2.b, t2_2.c - Relations: (public.async_p2 t1_2) INNER JOIN (public.async_p2 t2_2) - Remote SQL: SELECT r6.a, r6.b, r6.c, r9.a, r9.b, r9.c FROM (public.base_tbl2 r6 INNER JOIN public.base_tbl2 r9 ON (((r6.a = r9.a)) AND ((r6.b = r9.b)) AND (((r6.b % 100) = 0)))) - -> Hash Join - Output: t1_3.a, t1_3.b, t1_3.c, t2_3.a, t2_3.b, t2_3.c - Hash Cond: ((t2_3.a = t1_3.a) AND (t2_3.b = t1_3.b)) - -> Seq Scan on public.async_p3 t2_3 - Output: t2_3.a, t2_3.b, t2_3.c - -> Hash - Output: t1_3.a, t1_3.b, t1_3.c - -> Seq Scan on public.async_p3 t1_3 - Output: t1_3.a, t1_3.b, t1_3.c - Filter: ((t1_3.b % 100) = 0) -(20 rows) - -INSERT INTO join_tbl SELECT * FROM async_pt t1, async_pt t2 WHERE t1.a = t2.a AND t1.b = t2.b AND t1.b % 100 = 0; -SELECT * FROM join_tbl ORDER BY a1; - a1 | b1 | c1 | a2 | b2 | c2 -------+-----+------+------+-----+------ - 1000 | 0 | 0000 | 1000 | 0 | 0000 - 1100 | 100 | 0100 | 1100 | 100 | 0100 - 1200 | 200 | 0200 | 1200 | 200 | 0200 - 1300 | 300 | 0300 | 1300 | 300 | 0300 - 1400 | 400 | 0400 | 1400 | 400 | 0400 - 1500 | 500 | 0500 | 1500 | 500 | 0500 - 1600 | 600 | 0600 | 1600 | 600 | 0600 - 1700 | 700 | 0700 | 1700 | 700 | 0700 - 1800 | 800 | 0800 | 1800 | 800 | 0800 - 1900 | 900 | 0900 | 1900 | 900 | 0900 - 2000 | 0 | 0000 | 2000 | 0 | 0000 - 2100 | 100 | 0100 | 2100 | 100 | 0100 - 2200 | 200 | 0200 | 2200 | 200 | 0200 - 2300 | 300 | 0300 | 2300 | 300 | 0300 - 2400 | 400 | 0400 | 2400 | 400 | 0400 - 2500 | 500 | 0500 | 2500 | 500 | 0500 - 2600 | 600 | 0600 | 2600 | 600 | 0600 - 2700 | 700 | 0700 | 2700 | 700 | 0700 - 2800 | 800 | 0800 | 2800 | 800 | 0800 - 2900 | 900 | 0900 | 2900 | 900 | 0900 - 3000 | 0 | 0000 | 3000 | 0 | 0000 - 3100 | 100 | 0100 | 3100 | 100 | 0100 - 3200 | 200 | 0200 | 3200 | 200 | 0200 - 3300 | 300 | 0300 | 3300 | 300 | 0300 - 3400 | 400 | 0400 | 3400 | 400 | 0400 - 3500 | 500 | 0500 | 3500 | 500 | 0500 - 3600 | 600 | 0600 | 3600 | 600 | 0600 - 3700 | 700 | 0700 | 3700 | 700 | 0700 - 3800 | 800 | 0800 | 3800 | 800 | 0800 - 3900 | 900 | 0900 | 3900 | 900 | 0900 -(30 rows) - -DELETE FROM join_tbl; -RESET enable_partitionwise_join; --- Test rescan of an async Append node with do_exec_prune=false -SET enable_hashjoin TO false; -EXPLAIN (VERBOSE, COSTS OFF) -INSERT INTO join_tbl SELECT * FROM async_p1 t1, async_pt t2 WHERE t1.a = t2.a AND t1.b = t2.b AND t1.b % 100 = 0; - QUERY PLAN ----------------------------------------------------------------------------------------- - Insert on public.join_tbl - -> Nested Loop - Output: t1.a, t1.b, t1.c, t2.a, t2.b, t2.c - Join Filter: ((t1.a = t2.a) AND (t1.b = t2.b)) - -> Foreign Scan on public.async_p1 t1 - Output: t1.a, t1.b, t1.c - Remote SQL: SELECT a, b, c FROM public.base_tbl1 WHERE (((b % 100) = 0)) - -> Append - -> Async Foreign Scan on public.async_p1 t2_1 - Output: t2_1.a, t2_1.b, t2_1.c - Remote SQL: SELECT a, b, c FROM public.base_tbl1 - -> Async Foreign Scan on public.async_p2 t2_2 - Output: t2_2.a, t2_2.b, t2_2.c - Remote SQL: SELECT a, b, c FROM public.base_tbl2 - -> Seq Scan on public.async_p3 t2_3 - Output: t2_3.a, t2_3.b, t2_3.c -(16 rows) - -INSERT INTO join_tbl SELECT * FROM async_p1 t1, async_pt t2 WHERE t1.a = t2.a AND t1.b = t2.b AND t1.b % 100 = 0; -SELECT * FROM join_tbl ORDER BY a1; - a1 | b1 | c1 | a2 | b2 | c2 -------+-----+------+------+-----+------ - 1000 | 0 | 0000 | 1000 | 0 | 0000 - 1100 | 100 | 0100 | 1100 | 100 | 0100 - 1200 | 200 | 0200 | 1200 | 200 | 0200 - 1300 | 300 | 0300 | 1300 | 300 | 0300 - 1400 | 400 | 0400 | 1400 | 400 | 0400 - 1500 | 500 | 0500 | 1500 | 500 | 0500 - 1600 | 600 | 0600 | 1600 | 600 | 0600 - 1700 | 700 | 0700 | 1700 | 700 | 0700 - 1800 | 800 | 0800 | 1800 | 800 | 0800 - 1900 | 900 | 0900 | 1900 | 900 | 0900 -(10 rows) - -DELETE FROM join_tbl; -RESET enable_hashjoin; --- Test interaction of async execution with plan-time partition pruning -EXPLAIN (VERBOSE, COSTS OFF) -SELECT * FROM async_pt WHERE a < 3000; - QUERY PLAN ------------------------------------------------------------------------------ - Append - -> Async Foreign Scan on public.async_p1 async_pt_1 - Output: async_pt_1.a, async_pt_1.b, async_pt_1.c - Remote SQL: SELECT a, b, c FROM public.base_tbl1 WHERE ((a < 3000)) - -> Async Foreign Scan on public.async_p2 async_pt_2 - Output: async_pt_2.a, async_pt_2.b, async_pt_2.c - Remote SQL: SELECT a, b, c FROM public.base_tbl2 WHERE ((a < 3000)) -(7 rows) - -EXPLAIN (VERBOSE, COSTS OFF) -SELECT * FROM async_pt WHERE a < 2000; - QUERY PLAN ------------------------------------------------------------------------ - Foreign Scan on public.async_p1 async_pt - Output: async_pt.a, async_pt.b, async_pt.c - Remote SQL: SELECT a, b, c FROM public.base_tbl1 WHERE ((a < 2000)) -(3 rows) - --- Test interaction of async execution with run-time partition pruning -SET plan_cache_mode TO force_generic_plan; -PREPARE async_pt_query (int, int) AS - INSERT INTO result_tbl SELECT * FROM async_pt WHERE a < $1 AND b === $2; -EXPLAIN (VERBOSE, COSTS OFF) -EXECUTE async_pt_query (3000, 505); - QUERY PLAN ------------------------------------------------------------------------------------------- - Insert on public.result_tbl - -> Append - Subplans Removed: 1 - -> Async Foreign Scan on public.async_p1 async_pt_1 - Output: async_pt_1.a, async_pt_1.b, async_pt_1.c - Filter: (async_pt_1.b === $2) - Remote SQL: SELECT a, b, c FROM public.base_tbl1 WHERE ((a < $1::integer)) - -> Async Foreign Scan on public.async_p2 async_pt_2 - Output: async_pt_2.a, async_pt_2.b, async_pt_2.c - Filter: (async_pt_2.b === $2) - Remote SQL: SELECT a, b, c FROM public.base_tbl2 WHERE ((a < $1::integer)) -(11 rows) - -EXECUTE async_pt_query (3000, 505); -SELECT * FROM result_tbl ORDER BY a; - a | b | c -------+-----+------ - 1505 | 505 | 0505 - 2505 | 505 | 0505 -(2 rows) - -DELETE FROM result_tbl; -EXPLAIN (VERBOSE, COSTS OFF) -EXECUTE async_pt_query (2000, 505); - QUERY PLAN ------------------------------------------------------------------------------------------- - Insert on public.result_tbl - -> Append - Subplans Removed: 2 - -> Async Foreign Scan on public.async_p1 async_pt_1 - Output: async_pt_1.a, async_pt_1.b, async_pt_1.c - Filter: (async_pt_1.b === $2) - Remote SQL: SELECT a, b, c FROM public.base_tbl1 WHERE ((a < $1::integer)) -(7 rows) - -EXECUTE async_pt_query (2000, 505); -SELECT * FROM result_tbl ORDER BY a; - a | b | c -------+-----+------ - 1505 | 505 | 0505 -(1 row) - -DELETE FROM result_tbl; -RESET plan_cache_mode; -CREATE TABLE local_tbl(a int, b int, c text); -INSERT INTO local_tbl VALUES (1505, 505, 'foo'), (2505, 505, 'bar'); -ANALYZE local_tbl; -CREATE INDEX base_tbl1_idx ON base_tbl1 (a); -CREATE INDEX base_tbl2_idx ON base_tbl2 (a); -CREATE INDEX async_p3_idx ON async_p3 (a); -ANALYZE base_tbl1; -ANALYZE base_tbl2; -ANALYZE async_p3; -ALTER FOREIGN TABLE async_p1 OPTIONS (use_remote_estimate 'true'); -ALTER FOREIGN TABLE async_p2 OPTIONS (use_remote_estimate 'true'); -EXPLAIN (VERBOSE, COSTS OFF) -SELECT * FROM local_tbl, async_pt WHERE local_tbl.a = async_pt.a AND local_tbl.c = 'bar'; - QUERY PLAN ------------------------------------------------------------------------------------------- - Nested Loop - Output: local_tbl.a, local_tbl.b, local_tbl.c, async_pt.a, async_pt.b, async_pt.c - -> Seq Scan on public.local_tbl - Output: local_tbl.a, local_tbl.b, local_tbl.c - Filter: (local_tbl.c = 'bar'::text) - -> Append - -> Async Foreign Scan on public.async_p1 async_pt_1 - Output: async_pt_1.a, async_pt_1.b, async_pt_1.c - Remote SQL: SELECT a, b, c FROM public.base_tbl1 WHERE (($1::integer = a)) - -> Async Foreign Scan on public.async_p2 async_pt_2 - Output: async_pt_2.a, async_pt_2.b, async_pt_2.c - Remote SQL: SELECT a, b, c FROM public.base_tbl2 WHERE (($1::integer = a)) - -> Seq Scan on public.async_p3 async_pt_3 - Output: async_pt_3.a, async_pt_3.b, async_pt_3.c - Filter: (local_tbl.a = async_pt_3.a) -(15 rows) - -EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) -SELECT * FROM local_tbl, async_pt WHERE local_tbl.a = async_pt.a AND local_tbl.c = 'bar'; - QUERY PLAN -------------------------------------------------------------------------------- - Nested Loop (actual rows=1 loops=1) - -> Seq Scan on local_tbl (actual rows=1 loops=1) - Filter: (c = 'bar'::text) - Rows Removed by Filter: 1 - -> Append (actual rows=1 loops=1) - -> Async Foreign Scan on async_p1 async_pt_1 (never executed) - -> Async Foreign Scan on async_p2 async_pt_2 (actual rows=1 loops=1) - -> Seq Scan on async_p3 async_pt_3 (never executed) - Filter: (local_tbl.a = a) -(9 rows) - -SELECT * FROM local_tbl, async_pt WHERE local_tbl.a = async_pt.a AND local_tbl.c = 'bar'; - a | b | c | a | b | c -------+-----+-----+------+-----+------ - 2505 | 505 | bar | 2505 | 505 | 0505 -(1 row) - -ALTER FOREIGN TABLE async_p1 OPTIONS (DROP use_remote_estimate); -ALTER FOREIGN TABLE async_p2 OPTIONS (DROP use_remote_estimate); -DROP TABLE local_tbl; -DROP INDEX base_tbl1_idx; -DROP INDEX base_tbl2_idx; -DROP INDEX async_p3_idx; --- Disable async execution if we use gating Result nodes for pseudoconstant --- quals -EXPLAIN (VERBOSE, COSTS OFF) -SELECT * FROM async_pt WHERE CURRENT_USER = SESSION_USER; - QUERY PLAN ----------------------------------------------------------------- - Append - -> Result - Output: async_pt_1.a, async_pt_1.b, async_pt_1.c - One-Time Filter: (CURRENT_USER = SESSION_USER) - -> Foreign Scan on public.async_p1 async_pt_1 - Output: async_pt_1.a, async_pt_1.b, async_pt_1.c - Remote SQL: SELECT a, b, c FROM public.base_tbl1 - -> Result - Output: async_pt_2.a, async_pt_2.b, async_pt_2.c - One-Time Filter: (CURRENT_USER = SESSION_USER) - -> Foreign Scan on public.async_p2 async_pt_2 - Output: async_pt_2.a, async_pt_2.b, async_pt_2.c - Remote SQL: SELECT a, b, c FROM public.base_tbl2 - -> Result - Output: async_pt_3.a, async_pt_3.b, async_pt_3.c - One-Time Filter: (CURRENT_USER = SESSION_USER) - -> Seq Scan on public.async_p3 async_pt_3 - Output: async_pt_3.a, async_pt_3.b, async_pt_3.c -(18 rows) - --- Test that pending requests are processed properly -SET enable_mergejoin TO false; -SET enable_hashjoin TO false; -EXPLAIN (VERBOSE, COSTS OFF) -SELECT * FROM async_pt t1, async_p2 t2 WHERE t1.a = t2.a AND t1.b === 505; - QUERY PLAN ----------------------------------------------------------------- - Nested Loop - Output: t1.a, t1.b, t1.c, t2.a, t2.b, t2.c - Join Filter: (t1.a = t2.a) - -> Append - -> Async Foreign Scan on public.async_p1 t1_1 - Output: t1_1.a, t1_1.b, t1_1.c - Filter: (t1_1.b === 505) - Remote SQL: SELECT a, b, c FROM public.base_tbl1 - -> Async Foreign Scan on public.async_p2 t1_2 - Output: t1_2.a, t1_2.b, t1_2.c - Filter: (t1_2.b === 505) - Remote SQL: SELECT a, b, c FROM public.base_tbl2 - -> Seq Scan on public.async_p3 t1_3 - Output: t1_3.a, t1_3.b, t1_3.c - Filter: (t1_3.b === 505) - -> Materialize - Output: t2.a, t2.b, t2.c - -> Foreign Scan on public.async_p2 t2 - Output: t2.a, t2.b, t2.c - Remote SQL: SELECT a, b, c FROM public.base_tbl2 -(20 rows) - -SELECT * FROM async_pt t1, async_p2 t2 WHERE t1.a = t2.a AND t1.b === 505; - a | b | c | a | b | c -------+-----+------+------+-----+------ - 2505 | 505 | 0505 | 2505 | 505 | 0505 -(1 row) - -CREATE TABLE local_tbl (a int, b int, c text); -INSERT INTO local_tbl VALUES (1505, 505, 'foo'); -ANALYZE local_tbl; -EXPLAIN (VERBOSE, COSTS OFF) -SELECT * FROM local_tbl t1 LEFT JOIN (SELECT *, (SELECT count(*) FROM async_pt WHERE a < 3000) FROM async_pt WHERE a < 3000) t2 ON t1.a = t2.a; - QUERY PLAN ----------------------------------------------------------------------------------------- - Nested Loop Left Join - Output: t1.a, t1.b, t1.c, async_pt.a, async_pt.b, async_pt.c, ($0) - Join Filter: (t1.a = async_pt.a) - InitPlan 1 (returns $0) - -> Aggregate - Output: count(*) - -> Append - -> Async Foreign Scan on public.async_p1 async_pt_4 - Remote SQL: SELECT NULL FROM public.base_tbl1 WHERE ((a < 3000)) - -> Async Foreign Scan on public.async_p2 async_pt_5 - Remote SQL: SELECT NULL FROM public.base_tbl2 WHERE ((a < 3000)) - -> Seq Scan on public.local_tbl t1 - Output: t1.a, t1.b, t1.c - -> Append - -> Async Foreign Scan on public.async_p1 async_pt_1 - Output: async_pt_1.a, async_pt_1.b, async_pt_1.c, $0 - Remote SQL: SELECT a, b, c FROM public.base_tbl1 WHERE ((a < 3000)) - -> Async Foreign Scan on public.async_p2 async_pt_2 - Output: async_pt_2.a, async_pt_2.b, async_pt_2.c, $0 - Remote SQL: SELECT a, b, c FROM public.base_tbl2 WHERE ((a < 3000)) -(20 rows) - -EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) -SELECT * FROM local_tbl t1 LEFT JOIN (SELECT *, (SELECT count(*) FROM async_pt WHERE a < 3000) FROM async_pt WHERE a < 3000) t2 ON t1.a = t2.a; - QUERY PLAN ------------------------------------------------------------------------------------------ - Nested Loop Left Join (actual rows=1 loops=1) - Join Filter: (t1.a = async_pt.a) - Rows Removed by Join Filter: 399 - InitPlan 1 (returns $0) - -> Aggregate (actual rows=1 loops=1) - -> Append (actual rows=400 loops=1) - -> Async Foreign Scan on async_p1 async_pt_4 (actual rows=200 loops=1) - -> Async Foreign Scan on async_p2 async_pt_5 (actual rows=200 loops=1) - -> Seq Scan on local_tbl t1 (actual rows=1 loops=1) - -> Append (actual rows=400 loops=1) - -> Async Foreign Scan on async_p1 async_pt_1 (actual rows=200 loops=1) - -> Async Foreign Scan on async_p2 async_pt_2 (actual rows=200 loops=1) -(12 rows) - -SELECT * FROM local_tbl t1 LEFT JOIN (SELECT *, (SELECT count(*) FROM async_pt WHERE a < 3000) FROM async_pt WHERE a < 3000) t2 ON t1.a = t2.a; - a | b | c | a | b | c | count -------+-----+-----+------+-----+------+------- - 1505 | 505 | foo | 1505 | 505 | 0505 | 400 -(1 row) - -EXPLAIN (VERBOSE, COSTS OFF) -SELECT * FROM async_pt t1 WHERE t1.b === 505 LIMIT 1; - QUERY PLAN ----------------------------------------------------------------- - Limit - Output: t1.a, t1.b, t1.c - -> Append - -> Async Foreign Scan on public.async_p1 t1_1 - Output: t1_1.a, t1_1.b, t1_1.c - Filter: (t1_1.b === 505) - Remote SQL: SELECT a, b, c FROM public.base_tbl1 - -> Async Foreign Scan on public.async_p2 t1_2 - Output: t1_2.a, t1_2.b, t1_2.c - Filter: (t1_2.b === 505) - Remote SQL: SELECT a, b, c FROM public.base_tbl2 - -> Seq Scan on public.async_p3 t1_3 - Output: t1_3.a, t1_3.b, t1_3.c - Filter: (t1_3.b === 505) -(14 rows) - -EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) -SELECT * FROM async_pt t1 WHERE t1.b === 505 LIMIT 1; - QUERY PLAN -------------------------------------------------------------------------- - Limit (actual rows=1 loops=1) - -> Append (actual rows=1 loops=1) - -> Async Foreign Scan on async_p1 t1_1 (actual rows=0 loops=1) - Filter: (b === 505) - -> Async Foreign Scan on async_p2 t1_2 (actual rows=0 loops=1) - Filter: (b === 505) - -> Seq Scan on async_p3 t1_3 (actual rows=1 loops=1) - Filter: (b === 505) - Rows Removed by Filter: 101 -(9 rows) - -SELECT * FROM async_pt t1 WHERE t1.b === 505 LIMIT 1; - a | b | c -------+-----+------ - 3505 | 505 | 0505 -(1 row) - --- Check with foreign modify -CREATE TABLE base_tbl3 (a int, b int, c text); -CREATE FOREIGN TABLE remote_tbl (a int, b int, c text) - SERVER loopback OPTIONS (table_name 'base_tbl3'); -INSERT INTO remote_tbl VALUES (2505, 505, 'bar'); -CREATE TABLE base_tbl4 (a int, b int, c text); -CREATE FOREIGN TABLE insert_tbl (a int, b int, c text) - SERVER loopback OPTIONS (table_name 'base_tbl4'); -EXPLAIN (VERBOSE, COSTS OFF) -INSERT INTO insert_tbl (SELECT * FROM local_tbl UNION ALL SELECT * FROM remote_tbl); - QUERY PLAN -------------------------------------------------------------------------- - Insert on public.insert_tbl - Remote SQL: INSERT INTO public.base_tbl4(a, b, c) VALUES ($1, $2, $3) - Batch Size: 1 - -> Append - -> Seq Scan on public.local_tbl - Output: local_tbl.a, local_tbl.b, local_tbl.c - -> Async Foreign Scan on public.remote_tbl - Output: remote_tbl.a, remote_tbl.b, remote_tbl.c - Remote SQL: SELECT a, b, c FROM public.base_tbl3 -(9 rows) - -INSERT INTO insert_tbl (SELECT * FROM local_tbl UNION ALL SELECT * FROM remote_tbl); -SELECT * FROM insert_tbl ORDER BY a; - a | b | c -------+-----+----- - 1505 | 505 | foo - 2505 | 505 | bar -(2 rows) - --- Check with direct modify -EXPLAIN (VERBOSE, COSTS OFF) -WITH t AS (UPDATE remote_tbl SET c = c || c RETURNING *) -INSERT INTO join_tbl SELECT * FROM async_pt LEFT JOIN t ON (async_pt.a = t.a AND async_pt.b = t.b) WHERE async_pt.b === 505; - QUERY PLAN ----------------------------------------------------------------------------------------- - Insert on public.join_tbl - CTE t - -> Update on public.remote_tbl - Output: remote_tbl.a, remote_tbl.b, remote_tbl.c - -> Foreign Update on public.remote_tbl - Remote SQL: UPDATE public.base_tbl3 SET c = (c || c) RETURNING a, b, c - -> Nested Loop Left Join - Output: async_pt.a, async_pt.b, async_pt.c, t.a, t.b, t.c - Join Filter: ((async_pt.a = t.a) AND (async_pt.b = t.b)) - -> Append - -> Async Foreign Scan on public.async_p1 async_pt_1 - Output: async_pt_1.a, async_pt_1.b, async_pt_1.c - Filter: (async_pt_1.b === 505) - Remote SQL: SELECT a, b, c FROM public.base_tbl1 - -> Async Foreign Scan on public.async_p2 async_pt_2 - Output: async_pt_2.a, async_pt_2.b, async_pt_2.c - Filter: (async_pt_2.b === 505) - Remote SQL: SELECT a, b, c FROM public.base_tbl2 - -> Seq Scan on public.async_p3 async_pt_3 - Output: async_pt_3.a, async_pt_3.b, async_pt_3.c - Filter: (async_pt_3.b === 505) - -> CTE Scan on t - Output: t.a, t.b, t.c -(23 rows) - -WITH t AS (UPDATE remote_tbl SET c = c || c RETURNING *) -INSERT INTO join_tbl SELECT * FROM async_pt LEFT JOIN t ON (async_pt.a = t.a AND async_pt.b = t.b) WHERE async_pt.b === 505; -SELECT * FROM join_tbl ORDER BY a1; - a1 | b1 | c1 | a2 | b2 | c2 -------+-----+------+------+-----+-------- - 1505 | 505 | 0505 | | | - 2505 | 505 | 0505 | 2505 | 505 | barbar - 3505 | 505 | 0505 | | | -(3 rows) - -DELETE FROM join_tbl; -DROP TABLE local_tbl; -DROP FOREIGN TABLE remote_tbl; -DROP FOREIGN TABLE insert_tbl; -DROP TABLE base_tbl3; -DROP TABLE base_tbl4; -RESET enable_mergejoin; -RESET enable_hashjoin; --- Test that UPDATE/DELETE with inherited target works with async_capable enabled -EXPLAIN (VERBOSE, COSTS OFF) -UPDATE async_pt SET c = c || c WHERE b = 0 RETURNING *; - QUERY PLAN ----------------------------------------------------------------------------------------------------------- - Update on public.async_pt - Output: async_pt_1.a, async_pt_1.b, async_pt_1.c - Foreign Update on public.async_p1 async_pt_1 - Foreign Update on public.async_p2 async_pt_2 - Update on public.async_p3 async_pt_3 - -> Append - -> Foreign Update on public.async_p1 async_pt_1 - Remote SQL: UPDATE public.base_tbl1 SET c = (c || c) WHERE ((b = 0)) RETURNING a, b, c - -> Foreign Update on public.async_p2 async_pt_2 - Remote SQL: UPDATE public.base_tbl2 SET c = (c || c) WHERE ((b = 0)) RETURNING a, b, c - -> Seq Scan on public.async_p3 async_pt_3 - Output: (async_pt_3.c || async_pt_3.c), async_pt_3.tableoid, async_pt_3.ctid, NULL::record - Filter: (async_pt_3.b = 0) -(13 rows) - -UPDATE async_pt SET c = c || c WHERE b = 0 RETURNING *; - a | b | c -------+---+---------- - 1000 | 0 | 00000000 - 2000 | 0 | 00000000 - 3000 | 0 | 00000000 -(3 rows) - -EXPLAIN (VERBOSE, COSTS OFF) -DELETE FROM async_pt WHERE b = 0 RETURNING *; - QUERY PLAN ------------------------------------------------------------------------------------------- - Delete on public.async_pt - Output: async_pt_1.a, async_pt_1.b, async_pt_1.c - Foreign Delete on public.async_p1 async_pt_1 - Foreign Delete on public.async_p2 async_pt_2 - Delete on public.async_p3 async_pt_3 - -> Append - -> Foreign Delete on public.async_p1 async_pt_1 - Remote SQL: DELETE FROM public.base_tbl1 WHERE ((b = 0)) RETURNING a, b, c - -> Foreign Delete on public.async_p2 async_pt_2 - Remote SQL: DELETE FROM public.base_tbl2 WHERE ((b = 0)) RETURNING a, b, c - -> Seq Scan on public.async_p3 async_pt_3 - Output: async_pt_3.tableoid, async_pt_3.ctid - Filter: (async_pt_3.b = 0) -(13 rows) - -DELETE FROM async_pt WHERE b = 0 RETURNING *; - a | b | c -------+---+---------- - 1000 | 0 | 00000000 - 2000 | 0 | 00000000 - 3000 | 0 | 00000000 -(3 rows) - --- Check EXPLAIN ANALYZE for a query that scans empty partitions asynchronously -DELETE FROM async_p1; -DELETE FROM async_p2; -DELETE FROM async_p3; -EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) -SELECT * FROM async_pt; - QUERY PLAN -------------------------------------------------------------------------- - Append (actual rows=0 loops=1) - -> Async Foreign Scan on async_p1 async_pt_1 (actual rows=0 loops=1) - -> Async Foreign Scan on async_p2 async_pt_2 (actual rows=0 loops=1) - -> Seq Scan on async_p3 async_pt_3 (actual rows=0 loops=1) -(4 rows) - --- Clean up -DROP TABLE async_pt; -DROP TABLE base_tbl1; -DROP TABLE base_tbl2; -DROP TABLE result_tbl; -DROP TABLE join_tbl; --- Test that an asynchronous fetch is processed before restarting the scan in --- ReScanForeignScan -CREATE TABLE base_tbl (a int, b int); -INSERT INTO base_tbl VALUES (1, 11), (2, 22), (3, 33); -CREATE FOREIGN TABLE foreign_tbl (b int) - SERVER loopback OPTIONS (table_name 'base_tbl'); -CREATE FOREIGN TABLE foreign_tbl2 () INHERITS (foreign_tbl) - SERVER loopback OPTIONS (table_name 'base_tbl'); -EXPLAIN (VERBOSE, COSTS OFF) -SELECT a FROM base_tbl WHERE a IN (SELECT a FROM foreign_tbl); - QUERY PLAN ------------------------------------------------------------------------------ - Seq Scan on public.base_tbl - Output: base_tbl.a - Filter: (SubPlan 1) - SubPlan 1 - -> Result - Output: base_tbl.a - -> Append - -> Async Foreign Scan on public.foreign_tbl foreign_tbl_1 - Remote SQL: SELECT NULL FROM public.base_tbl - -> Async Foreign Scan on public.foreign_tbl2 foreign_tbl_2 - Remote SQL: SELECT NULL FROM public.base_tbl -(11 rows) - -SELECT a FROM base_tbl WHERE a IN (SELECT a FROM foreign_tbl); - a ---- - 1 - 2 - 3 -(3 rows) - --- Clean up -DROP FOREIGN TABLE foreign_tbl CASCADE; -NOTICE: drop cascades to foreign table foreign_tbl2 -DROP TABLE base_tbl; -ALTER SERVER loopback OPTIONS (DROP async_capable); -ALTER SERVER loopback2 OPTIONS (DROP async_capable); --- =================================================================== --- test invalid server and foreign table options --- =================================================================== --- Invalid fdw_startup_cost option -CREATE SERVER inv_scst FOREIGN DATA WRAPPER postgres_fdw - OPTIONS(fdw_startup_cost '100$%$#$#'); -ERROR: invalid value for floating point option "fdw_startup_cost": 100$%$#$# --- Invalid fdw_tuple_cost option -CREATE SERVER inv_scst FOREIGN DATA WRAPPER postgres_fdw - OPTIONS(fdw_tuple_cost '100$%$#$#'); -ERROR: invalid value for floating point option "fdw_tuple_cost": 100$%$#$# --- Invalid fetch_size option -CREATE FOREIGN TABLE inv_fsz (c1 int ) - SERVER loopback OPTIONS (fetch_size '100$%$#$#'); -ERROR: invalid value for integer option "fetch_size": 100$%$#$# --- Invalid batch_size option -CREATE FOREIGN TABLE inv_bsz (c1 int ) - SERVER loopback OPTIONS (batch_size '100$%$#$#'); -ERROR: invalid value for integer option "batch_size": 100$%$#$# +server closed the connection unexpectedly + This probably means the server terminated abnormally + before or while processing the request. +connection to server was lost === make failure: contrib/ltree/regression.diffs === diff -U3 /builddir/build/BUILD/postgresql-14.3/contrib/ltree/expected/ltree.out /builddir/build/BUILD/postgresql-14.3/contrib/ltree/results/ltree.out --- /builddir/build/BUILD/postgresql-14.3/contrib/ltree/expected/ltree.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/contrib/ltree/results/ltree.out 2023-02-20 20:18:09.019324212 -0500 @@ -7913,174 +7913,7 @@ create table _ltreetest (t ltree[]); \copy _ltreetest FROM 'data/_ltree.data' SELECT count(*) FROM _ltreetest WHERE t @> '1.1.1' ; - count -------- - 15 -(1 row) - -SELECT count(*) FROM _ltreetest WHERE t <@ '1.1.1' ; - count -------- - 19 -(1 row) - -SELECT count(*) FROM _ltreetest WHERE t @ '23 & 1' ; - count -------- - 147 -(1 row) - -SELECT count(*) FROM _ltreetest WHERE t ~ '1.1.1.*' ; - count -------- - 19 -(1 row) - -SELECT count(*) FROM _ltreetest WHERE t ~ '*.1' ; - count -------- - 109 -(1 row) - -SELECT count(*) FROM _ltreetest WHERE t ~ '23.*{1}.1' ; - count -------- - 5 -(1 row) - -SELECT count(*) FROM _ltreetest WHERE t ~ '23.*.1' ; - count -------- - 11 -(1 row) - -SELECT count(*) FROM _ltreetest WHERE t ~ '23.*.2' ; - count -------- - 5 -(1 row) - -SELECT count(*) FROM _ltreetest WHERE t ? '{23.*.1,23.*.2}' ; - count -------- - 15 -(1 row) - -create index _tstidx on _ltreetest using gist (t); -set enable_seqscan=off; -SELECT count(*) FROM _ltreetest WHERE t @> '1.1.1' ; - count -------- - 15 -(1 row) - -SELECT count(*) FROM _ltreetest WHERE t <@ '1.1.1' ; - count -------- - 19 -(1 row) - -SELECT count(*) FROM _ltreetest WHERE t @ '23 & 1' ; - count -------- - 147 -(1 row) - -SELECT count(*) FROM _ltreetest WHERE t ~ '1.1.1.*' ; - count -------- - 19 -(1 row) - -SELECT count(*) FROM _ltreetest WHERE t ~ '*.1' ; - count -------- - 109 -(1 row) - -SELECT count(*) FROM _ltreetest WHERE t ~ '23.*{1}.1' ; - count -------- - 5 -(1 row) - -SELECT count(*) FROM _ltreetest WHERE t ~ '23.*.1' ; - count -------- - 11 -(1 row) - -SELECT count(*) FROM _ltreetest WHERE t ~ '23.*.2' ; - count -------- - 5 -(1 row) - -SELECT count(*) FROM _ltreetest WHERE t ? '{23.*.1,23.*.2}' ; - count -------- - 15 -(1 row) - -drop index _tstidx; -create index _tstidx on _ltreetest using gist (t gist__ltree_ops(siglen=0)); -ERROR: value 0 out of bounds for option "siglen" -DETAIL: Valid values are between "1" and "2024". -create index _tstidx on _ltreetest using gist (t gist__ltree_ops(siglen=2025)); -ERROR: value 2025 out of bounds for option "siglen" -DETAIL: Valid values are between "1" and "2024". -create index _tstidx on _ltreetest using gist (t gist__ltree_ops(siglen=2024)); -SELECT count(*) FROM _ltreetest WHERE t @> '1.1.1' ; - count -------- - 15 -(1 row) - -SELECT count(*) FROM _ltreetest WHERE t <@ '1.1.1' ; - count -------- - 19 -(1 row) - -SELECT count(*) FROM _ltreetest WHERE t @ '23 & 1' ; - count -------- - 147 -(1 row) - -SELECT count(*) FROM _ltreetest WHERE t ~ '1.1.1.*' ; - count -------- - 19 -(1 row) - -SELECT count(*) FROM _ltreetest WHERE t ~ '*.1' ; - count -------- - 109 -(1 row) - -SELECT count(*) FROM _ltreetest WHERE t ~ '23.*{1}.1' ; - count -------- - 5 -(1 row) - -SELECT count(*) FROM _ltreetest WHERE t ~ '23.*.1' ; - count -------- - 11 -(1 row) - -SELECT count(*) FROM _ltreetest WHERE t ~ '23.*.2' ; - count -------- - 5 -(1 row) - -SELECT count(*) FROM _ltreetest WHERE t ? '{23.*.1,23.*.2}' ; - count -------- - 15 -(1 row) - +server closed the connection unexpectedly + This probably means the server terminated abnormally + before or while processing the request. +connection to server was lost === make failure: contrib/bloom/regression.diffs === diff -U3 /builddir/build/BUILD/postgresql-14.3/contrib/bloom/expected/bloom.out /builddir/build/BUILD/postgresql-14.3/contrib/bloom/results/bloom.out --- /builddir/build/BUILD/postgresql-14.3/contrib/bloom/expected/bloom.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/contrib/bloom/results/bloom.out 2023-02-20 20:08:30.019306261 -0500 @@ -79,152 +79,7 @@ (1 row) DELETE FROM tst; -INSERT INTO tst SELECT i%10, substr(md5(i::text), 1, 1) FROM generate_series(1,2000) i; -VACUUM ANALYZE tst; -SELECT count(*) FROM tst WHERE i = 7; - count -------- - 200 -(1 row) - -SELECT count(*) FROM tst WHERE t = '5'; - count -------- - 112 -(1 row) - -SELECT count(*) FROM tst WHERE i = 7 AND t = '5'; - count -------- - 13 -(1 row) - -DELETE FROM tst WHERE i > 1 OR t = '5'; -VACUUM tst; -INSERT INTO tst SELECT i%10, substr(md5(i::text), 1, 1) FROM generate_series(1,2000) i; -SELECT count(*) FROM tst WHERE i = 7; - count -------- - 200 -(1 row) - -SELECT count(*) FROM tst WHERE t = '5'; - count -------- - 112 -(1 row) - -SELECT count(*) FROM tst WHERE i = 7 AND t = '5'; - count -------- - 13 -(1 row) - -VACUUM FULL tst; -SELECT count(*) FROM tst WHERE i = 7; - count -------- - 200 -(1 row) - -SELECT count(*) FROM tst WHERE t = '5'; - count -------- - 112 -(1 row) - -SELECT count(*) FROM tst WHERE i = 7 AND t = '5'; - count -------- - 13 -(1 row) - --- Try an unlogged table too -CREATE UNLOGGED TABLE tstu ( - i int4, - t text -); -INSERT INTO tstu SELECT i%10, substr(md5(i::text), 1, 1) FROM generate_series(1,2000) i; -CREATE INDEX bloomidxu ON tstu USING bloom (i, t) WITH (col2 = 4); -SET enable_seqscan=off; -SET enable_bitmapscan=on; -SET enable_indexscan=on; -EXPLAIN (COSTS OFF) SELECT count(*) FROM tstu WHERE i = 7; - QUERY PLAN --------------------------------------------- - Aggregate - -> Bitmap Heap Scan on tstu - Recheck Cond: (i = 7) - -> Bitmap Index Scan on bloomidxu - Index Cond: (i = 7) -(5 rows) - -EXPLAIN (COSTS OFF) SELECT count(*) FROM tstu WHERE t = '5'; - QUERY PLAN --------------------------------------------- - Aggregate - -> Bitmap Heap Scan on tstu - Recheck Cond: (t = '5'::text) - -> Bitmap Index Scan on bloomidxu - Index Cond: (t = '5'::text) -(5 rows) - -EXPLAIN (COSTS OFF) SELECT count(*) FROM tstu WHERE i = 7 AND t = '5'; - QUERY PLAN ---------------------------------------------------------- - Aggregate - -> Bitmap Heap Scan on tstu - Recheck Cond: ((i = 7) AND (t = '5'::text)) - -> Bitmap Index Scan on bloomidxu - Index Cond: ((i = 7) AND (t = '5'::text)) -(5 rows) - -SELECT count(*) FROM tstu WHERE i = 7; - count -------- - 200 -(1 row) - -SELECT count(*) FROM tstu WHERE t = '5'; - count -------- - 112 -(1 row) - -SELECT count(*) FROM tstu WHERE i = 7 AND t = '5'; - count -------- - 13 -(1 row) - -RESET enable_seqscan; -RESET enable_bitmapscan; -RESET enable_indexscan; --- Run amvalidator function on our opclasses -SELECT opcname, amvalidate(opc.oid) -FROM pg_opclass opc JOIN pg_am am ON am.oid = opcmethod -WHERE amname = 'bloom' -ORDER BY 1; - opcname | amvalidate -----------+------------ - int4_ops | t - text_ops | t -(2 rows) - --- --- relation options --- -DROP INDEX bloomidx; -CREATE INDEX bloomidx ON tst USING bloom (i, t) WITH (length=7, col1=4); -SELECT reloptions FROM pg_class WHERE oid = 'bloomidx'::regclass; - reloptions -------------------- - {length=7,col1=4} -(1 row) - --- check for min and max values -\set VERBOSITY terse -CREATE INDEX bloomidx2 ON tst USING bloom (i, t) WITH (length=0); -ERROR: value 0 out of bounds for option "length" -CREATE INDEX bloomidx2 ON tst USING bloom (i, t) WITH (col1=0); -ERROR: value 0 out of bounds for option "col1" +server closed the connection unexpectedly + This probably means the server terminated abnormally + before or while processing the request. +connection to server was lost === make failure: contrib/hstore/regression.diffs === diff -U3 /builddir/build/BUILD/postgresql-14.3/contrib/hstore/expected/hstore.out /builddir/build/BUILD/postgresql-14.3/contrib/hstore/results/hstore.out --- /builddir/build/BUILD/postgresql-14.3/contrib/hstore/expected/hstore.out 2022-05-09 17:14:45.000000000 -0400 +++ /builddir/build/BUILD/postgresql-14.3/contrib/hstore/results/hstore.out 2023-02-20 20:15:23.489319777 -0500 @@ -1429,173 +1429,7 @@ (1 row) select count(*) from (select (each(h)).key from testhstore) as wow ; - count -------- - 4781 -(1 row) - -select key, count(*) from (select (each(h)).key from testhstore) as wow group by key order by count desc, key; - key | count ------------+------- - line | 884 - query | 207 - pos | 203 - node | 202 - space | 197 - status | 195 - public | 194 - title | 190 - wait | 190 - org | 189 - user | 189 - coauthors | 188 - disabled | 185 - indexed | 184 - cleaned | 180 - bad | 179 - date | 179 - world | 176 - state | 172 - subtitle | 169 - auth | 168 - abstract | 161 -(22 rows) - --- sort/hash -select count(distinct h) from testhstore; - count -------- - 885 -(1 row) - -set enable_hashagg = false; -select count(*) from (select h from (select * from testhstore union all select * from testhstore) hs group by h) hs2; - count -------- - 885 -(1 row) - -set enable_hashagg = true; -set enable_sort = false; -select count(*) from (select h from (select * from testhstore union all select * from testhstore) hs group by h) hs2; - count -------- - 885 -(1 row) - -select distinct * from (values (hstore '' || ''),('')) v(h); - h ---- - -(1 row) - -set enable_sort = true; --- btree -drop index hidx; -create index hidx on testhstore using btree (h); -set enable_seqscan=off; -select count(*) from testhstore where h #># 'p=>1'; - count -------- - 125 -(1 row) - -select count(*) from testhstore where h = 'pos=>98, line=>371, node=>CBA, indexed=>t'; - count -------- - 1 -(1 row) - --- json and jsonb -select hstore_to_json('"a key" =>1, b => t, c => null, d=> 12345, e => 012345, f=> 1.234, g=> 2.345e+4'); - hstore_to_json -------------------------------------------------------------------------------------------------- - {"b": "t", "c": null, "d": "12345", "e": "012345", "f": "1.234", "g": "2.345e+4", "a key": "1"} -(1 row) - -select cast( hstore '"a key" =>1, b => t, c => null, d=> 12345, e => 012345, f=> 1.234, g=> 2.345e+4' as json); - json -------------------------------------------------------------------------------------------------- - {"b": "t", "c": null, "d": "12345", "e": "012345", "f": "1.234", "g": "2.345e+4", "a key": "1"} -(1 row) - -select hstore_to_json_loose('"a key" =>1, b => t, c => null, d=> 12345, e => 012345, f=> 1.234, g=> 2.345e+4, h=> "2016-01-01"'); - hstore_to_json_loose -------------------------------------------------------------------------------------------------------------- - {"b": true, "c": null, "d": 12345, "e": "012345", "f": 1.234, "g": 2.345e+4, "h": "2016-01-01", "a key": 1} -(1 row) - -select hstore_to_jsonb('"a key" =>1, b => t, c => null, d=> 12345, e => 012345, f=> 1.234, g=> 2.345e+4'); - hstore_to_jsonb -------------------------------------------------------------------------------------------------- - {"b": "t", "c": null, "d": "12345", "e": "012345", "f": "1.234", "g": "2.345e+4", "a key": "1"} -(1 row) - -select cast( hstore '"a key" =>1, b => t, c => null, d=> 12345, e => 012345, f=> 1.234, g=> 2.345e+4' as jsonb); - jsonb -------------------------------------------------------------------------------------------------- - {"b": "t", "c": null, "d": "12345", "e": "012345", "f": "1.234", "g": "2.345e+4", "a key": "1"} -(1 row) - -select hstore_to_jsonb_loose('"a key" =>1, b => t, c => null, d=> 12345, e => 012345, f=> 1.234, g=> 2.345e+4, h=> "2016-01-01"'); - hstore_to_jsonb_loose ----------------------------------------------------------------------------------------------------------- - {"b": true, "c": null, "d": 12345, "e": "012345", "f": 1.234, "g": 23450, "h": "2016-01-01", "a key": 1} -(1 row) - -create table test_json_agg (f1 text, f2 hstore); -insert into test_json_agg values ('rec1','"a key" =>1, b => t, c => null, d=> 12345, e => 012345, f=> 1.234, g=> 2.345e+4'), - ('rec2','"a key" =>2, b => f, c => "null", d=> -12345, e => 012345.6, f=> -1.234, g=> 0.345e-4'); -select json_agg(q) from test_json_agg q; - json_agg ----------------------------------------------------------------------------------------------------------------------------- - [{"f1":"rec1","f2":{"b": "t", "c": null, "d": "12345", "e": "012345", "f": "1.234", "g": "2.345e+4", "a key": "1"}}, + - {"f1":"rec2","f2":{"b": "f", "c": "null", "d": "-12345", "e": "012345.6", "f": "-1.234", "g": "0.345e-4", "a key": "2"}}] -(1 row) - -select json_agg(q) from (select f1, hstore_to_json_loose(f2) as f2 from test_json_agg) q; - json_agg ----------------------------------------------------------------------------------------------------------------------- - [{"f1":"rec1","f2":{"b": true, "c": null, "d": 12345, "e": "012345", "f": 1.234, "g": 2.345e+4, "a key": 1}}, + - {"f1":"rec2","f2":{"b": false, "c": "null", "d": -12345, "e": "012345.6", "f": -1.234, "g": 0.345e-4, "a key": 2}}] -(1 row) - --- Test subscripting -insert into test_json_agg default values; -select f2['d'], f2['x'] is null as x_isnull from test_json_agg; - f2 | x_isnull ---------+---------- - 12345 | t - -12345 | t - | t -(3 rows) - -select f2['d']['e'] from test_json_agg; -- error -ERROR: hstore allows only one subscript -select f2['d':'e'] from test_json_agg; -- error -ERROR: hstore allows only one subscript -update test_json_agg set f2['d'] = f2['e'], f2['x'] = 'xyzzy'; -select f2 from test_json_agg; - f2 ---------------------------------------------------------------------------------------------------------------------- - "b"=>"t", "c"=>NULL, "d"=>"012345", "e"=>"012345", "f"=>"1.234", "g"=>"2.345e+4", "x"=>"xyzzy", "a key"=>"1" - "b"=>"f", "c"=>"null", "d"=>"012345.6", "e"=>"012345.6", "f"=>"-1.234", "g"=>"0.345e-4", "x"=>"xyzzy", "a key"=>"2" - "d"=>NULL, "x"=>"xyzzy" -(3 rows) - --- Test subscripting in plpgsql -do $$ declare h hstore; -begin h['a'] := 'b'; raise notice 'h = %, h[a] = %', h, h['a']; end $$; -NOTICE: h = "a"=>"b", h[a] = b --- Check the hstore_hash() and hstore_hash_extended() function explicitly. -SELECT v as value, hstore_hash(v)::bit(32) as standard, - hstore_hash_extended(v, 0)::bit(32) as extended0, - hstore_hash_extended(v, 1)::bit(32) as extended1 -FROM (VALUES (NULL::hstore), (''), ('"a key" =>1'), ('c => null'), - ('e => 012345'), ('g => 2.345e+4')) x(v) -WHERE hstore_hash(v)::bit(32) != hstore_hash_extended(v, 0)::bit(32) - OR hstore_hash(v)::bit(32) = hstore_hash_extended(v, 1)::bit(32); - value | standard | extended0 | extended1 --------+----------+-----------+----------- -(0 rows) - +server closed the connection unexpectedly + This probably means the server terminated abnormally + before or while processing the request. +connection to server was lost RPM build errors: + test 1 -eq 0 error: Bad exit status from /var/tmp/rpm-tmp.KT8HeM (%build) Bad exit status from /var/tmp/rpm-tmp.KT8HeM (%build) Child return code was: 1 EXCEPTION: [Error()] Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/mockbuild/trace_decorator.py", line 93, in trace result = func(*args, **kw) File "/usr/lib/python3.10/site-packages/mockbuild/util.py", line 598, in do_with_status raise exception.Error("Command failed: \n # %s\n%s" % (command, output), child.returncode) mockbuild.exception.Error: Command failed: # bash --login -c /usr/bin/rpmbuild -bb --target riscv64 --nodeps /builddir/build/SPECS/postgresql.spec