From b5bc7f0a98bfa0d3db8f64e40b777ca0736163ad5813f6d0bcc3d89a90a7c7bc Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Thu, 26 Sep 2024 14:37:44 +0000 Subject: [PATCH 1/3] OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql12?expand=0&rev=106 --- .gitattributes | 23 + .gitignore | 1 + ...otential-datalayout-mismatch-on-s390.patch | 94 ++ baselibs.conf | 5 + postgresql-12.20.tar.bz2 | 3 + postgresql-12.20.tar.bz2.sha256 | 1 + postgresql-conf.patch | 28 + postgresql-llvm-optional.patch | 16 + postgresql-plperl-keep-rpath.patch | 34 + postgresql-rpmlintrc | 8 + postgresql-testsuite-keep-results-file.patch | 16 + postgresql-var-run-socket.patch | 69 ++ postgresql12.changes | 458 ++++++++ postgresql12.spec | 1000 +++++++++++++++++ 14 files changed, 1756 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 0001-jit-Workaround-potential-datalayout-mismatch-on-s390.patch create mode 100644 baselibs.conf create mode 100644 postgresql-12.20.tar.bz2 create mode 100644 postgresql-12.20.tar.bz2.sha256 create mode 100644 postgresql-conf.patch create mode 100644 postgresql-llvm-optional.patch create mode 100644 postgresql-plperl-keep-rpath.patch create mode 100644 postgresql-rpmlintrc create mode 100644 postgresql-testsuite-keep-results-file.patch create mode 100644 postgresql-var-run-socket.patch create mode 100644 postgresql12.changes create mode 100644 postgresql12.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/0001-jit-Workaround-potential-datalayout-mismatch-on-s390.patch b/0001-jit-Workaround-potential-datalayout-mismatch-on-s390.patch new file mode 100644 index 0000000..5e51268 --- /dev/null +++ b/0001-jit-Workaround-potential-datalayout-mismatch-on-s390.patch @@ -0,0 +1,94 @@ +From 0edaa982336823d4d7af8f10b91579fe0099ef3d Mon Sep 17 00:00:00 2001 +From: Tom Stellard +Date: Tue, 20 Apr 2021 20:14:21 -0700 +Subject: [PATCH] jit: Workaround potential datalayout mismatch on s390x + +LLVM's s390x target uses a different datalayout for z13 and newer processors. +If llvmjit_types.bc is compiled to target a processor older than z13, and +then the JIT runs on a z13 or newer processor, then there will be a mismatch +in datalayouts between llvmjit_types.bc and the JIT engine. This mismatch +causes the JIT to fail at runtime. +--- + src/backend/jit/llvm/llvmjit.c | 46 ++++++++++++++++++++++++++++++++-- + 1 file changed, 44 insertions(+), 2 deletions(-) + +--- src/backend/jit/llvm/llvmjit.c.orig ++++ src/backend/jit/llvm/llvmjit.c +@@ -736,6 +736,35 @@ llvm_compile_module(LLVMJitContext *cont + } + + /* ++ * For the systemz target, LLVM uses a different datalayout for z13 and newer ++ * CPUs than it does for older CPUs. This can cause a mismatch in datalayouts ++ * in the case where the llvm_types_module is compiled with a pre-z13 CPU ++ * and the JIT is running on z13 or newer. ++ * See computeDataLayout() function in ++ * llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp for information on the ++ * datalayout differences. ++ */ ++static bool ++needs_systemz_workaround(void) ++{ ++ bool ret = false; ++ LLVMContextRef llvm_context; ++ LLVMTypeRef vec_type; ++ LLVMTargetDataRef llvm_layoutref; ++ if (strncmp(LLVMGetTargetName(llvm_targetref), "systemz", strlen("systemz"))) ++ { ++ return false; ++ } ++ ++ llvm_context = LLVMGetModuleContext(llvm_types_module); ++ vec_type = LLVMVectorType(LLVMIntTypeInContext(llvm_context, 32), 4); ++ llvm_layoutref = LLVMCreateTargetData(llvm_layout); ++ ret = (LLVMABIAlignmentOfType(llvm_layoutref, vec_type) == 16); ++ LLVMDisposeTargetData(llvm_layoutref); ++ return ret; ++} ++ ++/* + * Per session initialization. + */ + static void +@@ -744,6 +773,7 @@ llvm_session_initialize(void) + MemoryContext oldcontext; + char *error = NULL; + char *cpu = NULL; ++ char *host_features = NULL; + char *features = NULL; + LLVMTargetMachineRef opt0_tm; + LLVMTargetMachineRef opt3_tm; +@@ -775,10 +805,17 @@ llvm_session_initialize(void) + * features not all CPUs have (weird, huh). + */ + cpu = LLVMGetHostCPUName(); +- features = LLVMGetHostCPUFeatures(); ++ features = host_features = LLVMGetHostCPUFeatures(); + elog(DEBUG2, "LLVMJIT detected CPU \"%s\", with features \"%s\"", + cpu, features); + ++ if (needs_systemz_workaround()) ++ { ++ const char *no_vector =",-vector"; ++ features = malloc(sizeof(char) * (strlen(host_features) + strlen(no_vector) + 1)); ++ sprintf(features, "%s%s", host_features, no_vector); ++ } ++ + opt0_tm = + LLVMCreateTargetMachine(llvm_targetref, llvm_triple, cpu, features, + LLVMCodeGenLevelNone, +@@ -792,8 +829,13 @@ llvm_session_initialize(void) + + LLVMDisposeMessage(cpu); + cpu = NULL; +- LLVMDisposeMessage(features); ++ if (features != host_features) ++ { ++ free(features); ++ } + features = NULL; ++ LLVMDisposeMessage(host_features); ++ host_features = NULL; + + /* force symbols in main binary to be loaded */ + LLVMLoadLibraryPermanently(NULL); diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..6dc994f --- /dev/null +++ b/baselibs.conf @@ -0,0 +1,5 @@ +libpq5 + provides "postgresql-libs- = " + obsoletes "postgresql-libs- < " + conflicts "postgresql-libs- < 9.1.6" +libecpg6 diff --git a/postgresql-12.20.tar.bz2 b/postgresql-12.20.tar.bz2 new file mode 100644 index 0000000..cab6a7b --- /dev/null +++ b/postgresql-12.20.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2d543af3009fec7fd5af35f7a70c95085d3eef6b508e517aa9493e99b15e9ea9 +size 21256573 diff --git a/postgresql-12.20.tar.bz2.sha256 b/postgresql-12.20.tar.bz2.sha256 new file mode 100644 index 0000000..cae3640 --- /dev/null +++ b/postgresql-12.20.tar.bz2.sha256 @@ -0,0 +1 @@ +2d543af3009fec7fd5af35f7a70c95085d3eef6b508e517aa9493e99b15e9ea9 postgresql-12.20.tar.bz2 diff --git a/postgresql-conf.patch b/postgresql-conf.patch new file mode 100644 index 0000000..bd0a31e --- /dev/null +++ b/postgresql-conf.patch @@ -0,0 +1,28 @@ +Index: src/backend/utils/misc/postgresql.conf.sample +=================================================================== +--- src/backend/utils/misc/postgresql.conf.sample.orig ++++ src/backend/utils/misc/postgresql.conf.sample +@@ -416,13 +416,13 @@ + + # - Where to Log - + +-#log_destination = 'stderr' # Valid values are combinations of ++log_destination = 'stderr' # Valid values are combinations of + # stderr, csvlog, syslog, and eventlog, + # depending on platform. csvlog + # requires logging_collector to be on. + + # This is used when logging to stderr: +-#logging_collector = off # Enable capturing of stderr and csvlog ++logging_collector = on # Enable capturing of stderr and csvlog + # into log files. Required to be on for + # csvlogs. + # (change requires restart) +@@ -514,6 +514,7 @@ + #log_error_verbosity = default # terse, default, or verbose messages + #log_hostname = off + #log_line_prefix = '%m [%p] ' # special values: ++log_line_prefix = '%m %d %u [%p]' + # %a = application name + # %u = user name + # %d = database name diff --git a/postgresql-llvm-optional.patch b/postgresql-llvm-optional.patch new file mode 100644 index 0000000..87a8d9f --- /dev/null +++ b/postgresql-llvm-optional.patch @@ -0,0 +1,16 @@ +--- src/Makefile.global.in.orig ++++ src/Makefile.global.in +@@ -192,7 +192,12 @@ with_krb_srvnam = @with_krb_srvnam@ + with_ldap = @with_ldap@ + with_libxml = @with_libxml@ + with_libxslt = @with_libxslt@ +-with_llvm = @with_llvm@ ++# Only build for LLVM, if the core supports it and the llvm and clang packages are installed. ++ifeq (@with_llvm@ $(wildcard /usr/bin/clang /usr/bin/llvm-lto),yes /usr/bin/clang /usr/bin/llvm-lto) ++with_llvm = yes ++else ++with_llvm = no ++endif + with_system_tzdata = @with_system_tzdata@ + with_uuid = @with_uuid@ + with_zlib = @with_zlib@ diff --git a/postgresql-plperl-keep-rpath.patch b/postgresql-plperl-keep-rpath.patch new file mode 100644 index 0000000..8fce391 --- /dev/null +++ b/postgresql-plperl-keep-rpath.patch @@ -0,0 +1,34 @@ +This patch keeps PosgreSQL's configure script from removing the rpath from +Perl's linker options, because otherwise the PL/Perl module can't find +libperl.so (bsc#578053). + +Index: config/perl.m4 +=================================================================== +--- config/perl.m4.orig ++++ config/perl.m4 +@@ -98,9 +98,7 @@ if test "$PORTNAME" = "win32" ; then + fi + fi + else +- pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts` +- pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'` +- perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e ["s/ -arch [-a-zA-Z0-9_]*//g"]` ++ perl_embed_ldflags=`$PERL -MExtUtils::Embed -e ldopts` + fi + AC_SUBST(perl_embed_ldflags)dnl + if test -z "$perl_embed_ldflags" ; then +Index: configure +=================================================================== +--- configure.orig ++++ configure +@@ -9696,9 +9696,7 @@ if test "$PORTNAME" = "win32" ; then + fi + fi + else +- pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts` +- pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'` +- perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"` ++ perl_embed_ldflags=`$PERL -MExtUtils::Embed -e ldopts` + fi + if test -z "$perl_embed_ldflags" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 diff --git a/postgresql-rpmlintrc b/postgresql-rpmlintrc new file mode 100644 index 0000000..0d1b8be --- /dev/null +++ b/postgresql-rpmlintrc @@ -0,0 +1,8 @@ +addFilter("useless-explicit-provides") +addFilter("unnecessary-buildrequires") +addFilter("patch-not-applied") +addFilter("non-standard-uid") +addFilter("file-not-in-%lang") +addFilter("no-dependency-on") +addFilter("no-soname") +addFilter("devel-file-in-non-devel-package") diff --git a/postgresql-testsuite-keep-results-file.patch b/postgresql-testsuite-keep-results-file.patch new file mode 100644 index 0000000..443fcef --- /dev/null +++ b/postgresql-testsuite-keep-results-file.patch @@ -0,0 +1,16 @@ +commit 463154c669010cffc0e96b683576f1e879b61d8b +Author: yac +Date: Mon Mar 11 18:42:39 2013 +0100 + + don't unlink the result file + +--- src/test/regress/pg_regress.c.orig ++++ src/test/regress/pg_regress.c +@@ -2645,7 +2645,6 @@ regression_main(int argc, char *argv[], + else + { + unlink(difffilename); +- unlink(logfilename); + } + + if (fail_count != 0) diff --git a/postgresql-var-run-socket.patch b/postgresql-var-run-socket.patch new file mode 100644 index 0000000..80696c2 --- /dev/null +++ b/postgresql-var-run-socket.patch @@ -0,0 +1,69 @@ +Change the built-in default socket directory to be /run/postgresql. +For backwards compatibility with (probably non-libpq-based) clients that +might still expect to find the socket in /tmp, also create a socket in +/tmp. This is to resolve communication problems with clients operating +under systemd's PrivateTmp environment, which won't be using the same +global /tmp directory as the server; see bug #825448. + +Note that we apply the socket directory change at the level of the +hard-wired defaults in the C code, not by just twiddling the setting in +postgresql.conf.sample; this is so that the change will take effect on +server package update, without requiring any existing postgresql.conf +to be updated. (Of course, a user who dislikes this behavior can still +override it via postgresql.conf.) + + +Index: src/bin/pg_upgrade/test.sh +=================================================================== +--- src/bin/pg_upgrade/test.sh.orig ++++ src/bin/pg_upgrade/test.sh +@@ -64,7 +64,9 @@ case $testhost in + ;; + esac + +-POSTMASTER_OPTS="-F -c listen_addresses=\"$LISTEN_ADDRESSES\" -k \"$PGHOST\"" ++# we want the Unix sockets in $temp_root ++PGHOST=$temp_root ++POSTMASTER_OPTS="-F -c listen_addresses=\"$LISTEN_ADDRESSES\" -k \"$PGHOST\" -c unix_socket_directories='$PGHOST'" + export PGHOST + + # don't rely on $PWD here, as old shells don't set it +Index: src/backend/utils/misc/guc.c +=================================================================== +--- src/backend/utils/misc/guc.c.orig ++++ src/backend/utils/misc/guc.c +@@ -3954,7 +3954,7 @@ static struct config_string ConfigureNam + }, + &Unix_socket_directories, + #ifdef HAVE_UNIX_SOCKETS +- DEFAULT_PGSOCKET_DIR, ++ DEFAULT_PGSOCKET_DIR ", /tmp", + #else + "", + #endif +Index: src/bin/initdb/initdb.c +=================================================================== +--- src/bin/initdb/initdb.c.orig ++++ src/bin/initdb/initdb.c +@@ -1103,7 +1103,7 @@ setup_config(void) + + #ifdef HAVE_UNIX_SOCKETS + snprintf(repltok, sizeof(repltok), "#unix_socket_directories = '%s'", +- DEFAULT_PGSOCKET_DIR); ++ DEFAULT_PGSOCKET_DIR ", /tmp"); + #else + snprintf(repltok, sizeof(repltok), "#unix_socket_directories = ''"); + #endif +Index: src/include/pg_config_manual.h +=================================================================== +--- src/include/pg_config_manual.h.orig ++++ src/include/pg_config_manual.h +@@ -179,7 +179,7 @@ + * here's where to twiddle it. You can also override this at runtime + * with the postmaster's -k switch. + */ +-#define DEFAULT_PGSOCKET_DIR "/tmp" ++#define DEFAULT_PGSOCKET_DIR "/run/postgresql" + + /* + * This is the default event source for Windows event log. diff --git a/postgresql12.changes b/postgresql12.changes new file mode 100644 index 0000000..4f754db --- /dev/null +++ b/postgresql12.changes @@ -0,0 +1,458 @@ +------------------------------------------------------------------- +Sat Aug 10 14:14:40 UTC 2024 - Marcus Rueckert + +- Upgrade to 12.20 (bsc#1229013): + * bsc#1229013, CVE-2024-7348 PostgreSQL relation replacement + during pg_dump executes arbitrary SQL + * https://www.postgresql.org/about/news/postgresql-164-158-1413-1316-1220-and-17-beta-3-released-2910/ + * https://www.postgresql.org/docs/release/12.20/ + +------------------------------------------------------------------- +Wed May 8 14:16:55 UTC 2024 - Reinhard Max + +- Upgrade to 12.19 (bsc#1224051): + * Fix incompatibility with LLVM 18. + * https://www.postgresql.org/docs/release/12.19/ +- Prepare for PostgreSQL 17. +- Make sure all compilation and doc generation happens in %build. + +------------------------------------------------------------------- +Wed May 1 15:24:39 UTC 2024 - Aaron Puchert + +- Require LLVM <= 17 for now, because LLVM 18 doesn't seem to work. + +------------------------------------------------------------------- +Thu Mar 7 15:04:40 UTC 2024 - Sarah Kriesch + +- Remove constraints file because improved memory usage for s390x + +------------------------------------------------------------------- +Thu Feb 29 14:38:15 UTC 2024 - Dominique Leuenberger + +- Use %patch -P N instead of deprecated %patchN. + +------------------------------------------------------------------- +Thu Feb 8 14:32:50 UTC 2024 - Reinhard Max + +- Upgrade to 12.18: + * bsc#1219679, CVE-2024-0985: Tighten security restrictions + within REFRESH MATERIALIZED VIEW CONCURRENTLY. + One step of a concurrent refresh command was run under weak + security restrictions. If a materialized view's owner could + persuade a superuser or other high-privileged user to perform a + concurrent refresh on that view, the view's owner could control + code executed with the privileges of the user running REFRESH. + Fix things so that all user-determined code is run as the + view's owner, as expected + * If you use GIN indexes, you may need to reindex after updating + to this release. + * LLVM 18 is now supported. + * https://www.postgresql.org/docs/release/12.18/ + +------------------------------------------------------------------- +Wed Nov 8 14:37:39 UTC 2023 - Reinhard Max + +- Update to 12.17: + * bsc#1216962, CVE-2023-5868: Fix handling of unknown-type + arguments in DISTINCT "any" aggregate functions. This error led + to a text-type value being interpreted as an unknown-type value + (that is, a zero-terminated string) at runtime. This could + result in disclosure of server memory following the text value. + * bsc#1216961, CVE-2023-5869: Detect integer overflow while + computing new array dimensions. When assigning new elements to + array subscripts that are outside the current array bounds, an + undetected integer overflow could occur in edge cases. Memory + stomps that are potentially exploitable for arbitrary code + execution are possible, and so is disclosure of server memory. + * bsc#1216960, CVE-2023-5870: Prevent the pg_signal_backend role + from signalling background workers and autovacuum processes. + The documentation says that pg_signal_backend cannot issue + signals to superuser-owned processes. It was able to signal + these background processes, though, because they advertise a + role OID of zero. Treat that as indicating superuser ownership. + The security implications of cancelling one of these process + types are fairly small so far as the core code goes (we'll just + start another one), but extensions might add background workers + that are more vulnerable. + Also ensure that the is_superuser parameter is set correctly in + such processes. No specific security consequences are known for + that oversight, but it might be significant for some extensions. + * Add support for LLVM 16 and 17 + * https://www.postgresql.org/docs/12/release-12-17.html + +------------------------------------------------------------------- +Tue Oct 31 10:57:13 UTC 2023 - Reinhard Max + +- boo#1216734: Revert the last change and make the devel package + independend of all other subpackages except for the libs. + +------------------------------------------------------------------- +Tue Oct 10 12:49:02 UTC 2023 - Reinhard Max + +- boo#1216022: Call install-alternatives from the devel subpackage + as well, otherwise the symlink for ecpg might be missing. + +------------------------------------------------------------------- +Mon Sep 18 15:24:14 UTC 2023 - Dominique Leuenberger + +- Also buildignore the postgresql*-implementation symbols: this is + needed in order to bootstrap when no postgresql version currently + has valid symbols provided. Once the packages are built, OBS + could translate this to the pgname-* packages and accept the + ignores; during bootstrap though, there is nothing providing the + symbol and the existing buildignores do not suffice. + +------------------------------------------------------------------- +Wed Aug 9 10:25:49 UTC 2023 - Reinhard Max + +- Update to 12.16: + * bsc#1214059, CVE-2023-39417: Disallow substituting a schema or + owner name into an extension script if the name contains a + quote, backslash, or dollar sign. + * https://www.postgresql.org/docs/12/release-12-16.html + +------------------------------------------------------------------- +Fri May 26 11:48:38 UTC 2023 - Reinhard Max + +- Restore the independence of mini builds from the main build after + the -mini name change from April 4, 2023. +- Adjust icu handling to prepare for PostgreSQL 16. + +------------------------------------------------------------------- +Mon May 15 14:22:59 UTC 2023 - Reinhard Max + +- Overhaul postgresql-README.SUSE and move it from the binary + package to the noarch wrapper package. +- Change the unix domain socket location from /var/run to /run. + +------------------------------------------------------------------- +Wed May 10 13:05:58 UTC 2023 - Reinhard Max + +- Update to 12.15: + * bsc#1211228, CVE-2023-2454: + Prevent CREATE SCHEMA from defeating changes in search_path + * bsc#1211229, CVE-2023-2455: Enforce row-level security + policies correctly after inlining a set-returning function + * https://www.postgresql.org/about/news/2637/ + * https://www.postgresql.org/docs/12/release-12-15.html + +------------------------------------------------------------------- +Tue Apr 18 09:05:09 UTC 2023 - Reinhard Max + +- bsc#1210303: Stop using the obsolete internal %_restart_on_update + macro and drop support for sysv init to simplify the scriptlets. + +------------------------------------------------------------------- +Tue Apr 4 10:57:41 UTC 2023 - Fabian Vogt + +- Include -mini in Name: to avoid conflicts in the source package + name and OBS internal dependency tracking. + +------------------------------------------------------------------- +Thu Feb 9 12:03:07 UTC 2023 - Reinhard Max + +- Update to 12.14: + * CVE-2022-41862, bsc#1208102: memory leak in libpq + * https://www.postgresql.org/about/news/2592/ + * https://www.postgresql.org/docs/12/release-12-14.html +- Bump latest_supported_llvm_ver to 15. + +------------------------------------------------------------------- +Thu Nov 10 16:29:10 UTC 2022 - Reinhard Max + +- bsc#1205300: Update to 12.13: + * https://www.postgresql.org/about/news/2543/ + * https://www.postgresql.org/docs/12/release-12-13.html +- Sync spec file with postgresql15. + +------------------------------------------------------------------- +Thu Sep 22 21:26:36 UTC 2022 - Aaron Puchert + +- Create mechanism to specify the latest supported LLVM version. + Automatically pin to that version if the distribution has a newer + unsupported default version. + +------------------------------------------------------------------- +Tue Sep 13 12:37:53 UTC 2022 - Reinhard Max + +- Sync spec file with postgresql15. + +------------------------------------------------------------------- +Mon Sep 12 07:52:42 UTC 2022 - Andreas Schwab + +- Disable LLVM JIT on riscv64 + +------------------------------------------------------------------- +Fri Aug 12 11:12:47 UTC 2022 - Reinhard Max + +- - Update to 12.12: + * bsc#1202368, CVE-2022-2625: Extension scripts replace objects + not belonging to the extension. + * https://www.postgresql.org/docs/release/12.12/ + +------------------------------------------------------------------- +Thu May 12 10:55:58 UTC 2022 - Reinhard Max + +- Update to 12.11: + * bsc#1199475, CVE-2022-1552: Confine additional operations + within "security restricted operation" sandboxes. + * https://www.postgresql.org/docs/12/release-12-11.html + +------------------------------------------------------------------- +Wed Apr 13 12:17:48 UTC 2022 - Reinhard Max + +- bsc#1198166: Pin to llvm13 until the next patchlevel update. + +------------------------------------------------------------------- +Tue Feb 8 15:18:19 UTC 2022 - Reinhard Max + +- bsc#1195680: Upgrade to 12.10: + * https://www.postgresql.org/docs/12/release-12-10.html + * Reindexing might be needed after applying this upgrade, so + please read the release notes carefully. +- boo#1190740: Add constraints file with 12GB of memory for s390x + as a workaround + +------------------------------------------------------------------- +Thu Nov 25 11:02:15 UTC 2021 - Reinhard Max + +- Add a llvmjit-devel subpackage to pull in the right versions + of clang and llvm for building extensions. +- Fix some mistakes in the interdependencies between the + implementation packages and their noarch counterpart. +- Update the BuildIgnore section. + +------------------------------------------------------------------- +Wed Nov 10 18:07:22 UTC 2021 - Reinhard Max + +- bsc#1192516: Upgrade to version 12.9: + * Make the server reject extraneous data after an SSL or GSS + encryption handshake (CVE-2021-23214). + * Make libpq reject extraneous data after an SSL or GSS + encryption handshake (CVE-2021-23222). + * https://www.postgresql.org/docs/12/release-12-9.html + +------------------------------------------------------------------- +Mon Sep 27 14:15:20 UTC 2021 - Reinhard Max + +- Let genlists skip non-existing binaries to avoid lots of version + conditionals in the file lists. +- Remove postgresql-testsuite-int8.sql.patch, because its purpose + is unclear. This affects only the test subpackage. + +------------------------------------------------------------------- +Tue Aug 31 11:14:53 UTC 2021 - Reinhard Max + +- bsc#1185952: fix build with llvm12 on s390x. + 0001-jit-Workaround-potential-datalayout-mismatch-on-s390.patch +- bsc#1179945: Re-enable icu for PostgreSQL 10. + +------------------------------------------------------------------- +Tue Aug 24 13:01:54 UTC 2021 - Marcus Rueckert + +- Upgrade to version 12.8: + * https://www.postgresql.org/docs/12/release-12-8.html + * CVE-2021-3677 (boo#1189748) + The planner could create an incorrect plan in cases where two + ProjectionPaths were stacked on top of each other. The only + known way to trigger that situation involves parallel sort + operations, but there may be other instances. The result would + be crashes or incorrect query results. Disclosure of server + memory contents is also possible. + +------------------------------------------------------------------- +Fri Jul 2 07:47:15 UTC 2021 - Reinhard Max + +- bsc#1187751: Make the dependency of postgresqlXX-server-devel on + llvm and clang optional (postgresql-llvm-optional.patch). + +------------------------------------------------------------------- +Wed May 19 15:24:24 UTC 2021 - Reinhard Max + +- bsc#1185952: llvm12 breaks PostgreSQL 11 and 12 on s390x. + Use llvm11 as a workaround. + +------------------------------------------------------------------- +Tue May 11 16:19:19 UTC 2021 - Reinhard Max + +- Upgrade to version 12.7: + * https://www.postgresql.org/docs/12/release-12-7.html + * CVE-2021-32027, bsc#1185924: + Prevent integer overflows in array subscripting calculations. + * CVE-2021-32028, bsc#1185925: Fix mishandling of “junk” + columns in INSERT ... ON CONFLICT ... UPDATE target lists. + * CVE-2021-32029, bsc#1185926: Fix possibly-incorrect + computation of UPDATE ... RETURNING + "pg_psql_temporary_savepoint" does not exist”. + +- Don't use %_stop_on_removal, because it was meant to be private + and got removed from openSUSE. %_restart_on_update is also + private, but still supported and needed for now (bsc#1183168). + +------------------------------------------------------------------- +Mon Mar 15 19:29:39 UTC 2021 - Reinhard Max + +- Re-enable build of the llvmjit subpackage on SLE, but it will + only be delivered on PackageHub for now (boo#1183118). + +------------------------------------------------------------------- +Tue Mar 9 13:52:19 UTC 2021 - Reinhard Max + +- Remove leftover PreReq on chkconfig, we stopped using it long + time ago. + +------------------------------------------------------------------- +Fri Feb 19 15:30:08 UTC 2021 - Reinhard Max + +- boo#1179945: Disable icu for PostgreSQL 10 (and older) on TW. + +------------------------------------------------------------------- +Wed Feb 10 13:32:07 UTC 2021 - Reinhard Max + +Upgrade to version 12.6: + * https://www.postgresql.org/docs/12/release-12-6.html + * Reindexing might be needed after applying this update. + * CVE-2021-3393, bsc#1182040: Fix information leakage in + constraint-violation error messages. + * Obsoletes postgresql-icu68.patch. + +------------------------------------------------------------------- +Mon Dec 14 16:19:33 UTC 2020 - Callum Farmer + +- Add postgresql-icu68.patch: fix build with ICU 68 + +------------------------------------------------------------------- +Fri Nov 20 11:51:37 UTC 2020 - Reinhard Max + +- bsc#1178961: %ghost the symlinks to pg_config and ecpg. +- boo#1179765: BuildRequire libpq5 and libecpg6 when not building + them to avoid dangling symlinks in the devel package. + +------------------------------------------------------------------- +Wed Nov 11 12:04:35 UTC 2020 - Reinhard Max + +- Upgrade to version 12.5: + * CVE-2020-25695, bsc#1178666: Block DECLARE CURSOR ... WITH HOLD + and firing of deferred triggers within index expressions and + materialized view queries. + * CVE-2020-25694, bsc#1178667: + a) Fix usage of complex connection-string parameters in pg_dump, + pg_restore, clusterdb, reindexdb, and vacuumdb. + b) When psql's \connect command re-uses connection parameters, + ensure that all non-overridden parameters from a previous + connection string are re-used. + * CVE-2020-25696, bsc#1178668: Prevent psql's \gset command from + modifying specially-treated variables. + * Fix recently-added timetz test case so it works when the USA + is not observing daylight savings time. + (obsoletes postgresql-timetz.patch) + * https://www.postgresql.org/about/news/2111/ + * https://www.postgresql.org/docs/12/release-12-5.html + +------------------------------------------------------------------- +Tue Nov 3 13:54:38 UTC 2020 - Reinhard Max + +- Fix a DST problem in the test suite: postgresql-timetz.patch + https://postgr.es/m/16689-57701daa23b377bf@postgresql.org + +------------------------------------------------------------------- +Fri Sep 25 07:34:28 UTC 2020 - Reinhard Max + +- Stop building the mini and lib packages as they are now coming + from postgresql13. + +------------------------------------------------------------------- +Thu Aug 13 12:01:34 UTC 2020 - Reinhard Max + +- update to 12.4: + * CVE-2020-14349, bsc#1175193: Set a secure search_path in + logical replication walsenders and apply workers + * CVE-2020-14350, bsc#1175194: Make contrib modules' installation + scripts more secure. + * https://www.postgresql.org/docs/12/release-12-4.html +- Remove postgresql-regress.patch, it does not apply anymore and + it does not seem to be needed anymore. +- Pack the /usr/lib/postgresql symlink only into the main package. + +------------------------------------------------------------------- +Tue Jun 16 12:21:43 UTC 2020 - Reinhard Max + +- Let postgresqlXX conflict with postgresql-noarch < 12.0.1 to get + a clean and complete cutover to the new packaging schema. + +------------------------------------------------------------------- +Wed Jun 3 17:36:27 UTC 2020 - Reinhard Max + +- update to 12.3 (bsc#1171924). + https://www.postgresql.org/about/news/2038/ + https://www.postgresql.org/docs/12/release-12-3.html +- Unify the spec file to work across all current PostgreSQL + versions to simplify future maintenance. +- Move from the "libs" build flavour to a "mini" package that will + only be used inside the build service and not get shipped, to + avoid confusion with the debuginfo packages (bsc#1148643). + +------------------------------------------------------------------- +Fri May 15 10:13:58 UTC 2020 - Namor Barcode + +- update to 12.3 + https://www.postgresql.org/about/news/2038/ + https://www.postgresql.org/docs/12/release-12-3.html + +------------------------------------------------------------------- +Tue Mar 31 14:23:52 UTC 2020 - Reinhard Max + +- Temporarily disable JIT support on SLE until support status of + clang has been clarified. +- We only need clang for LLVM, not clang-devel. + +------------------------------------------------------------------- +Thu Feb 27 08:58:37 UTC 2020 - Reinhard Max + +- Fix a few mistakes in the spec file. + +------------------------------------------------------------------- +Sat Feb 15 03:02:07 UTC 2020 - Marcus Rueckert + +- update to 12.2 (CVE-2020-1720) + https://www.postgresql.org/about/news/2011/ + https://www.postgresql.org/docs/12/release-12-2.html + +------------------------------------------------------------------- +Fri Feb 14 07:53:46 UTC 2020 - Guillaume GARDET + +- Disable explicitly armv8 CRC for %arm, as we use some armv8 + workers for armv6/7 builds which is confusing configure script + +------------------------------------------------------------------- +Tue Feb 11 04:15:40 UTC 2020 - Stefan Brüns + +- Avoid the dependency from the devel package to the main package. + devel packages are exclusive, thus ecpg does not require + update-alternatives. + +------------------------------------------------------------------- +Thu Feb 6 17:13:41 UTC 2020 - Reinhard Max + +- Remove unused build dependencies from the client libs package: + LVM, icu, selinux, systemd. +- Drop conditionals for suse_version 1110/1120. + +------------------------------------------------------------------- +Fri Dec 20 14:46:29 UTC 2019 - Marcus Rueckert + +- update to 12.1 + https://www.postgresql.org/docs/12/release-12-1.html + https://www.postgresql.org/about/news/1994/ + +------------------------------------------------------------------- +Tue Oct 22 16:50:55 UTC 2019 - Marcus Rueckert + +- add requires to the server-devel package for the libs that are + returned by pg_config --libs + +------------------------------------------------------------------- +Mon Oct 7 09:03:24 UTC 2019 - Marcus Rueckert + +- initial package for the postgresql 12 branch + https://www.postgresql.org/about/news/1976/ diff --git a/postgresql12.spec b/postgresql12.spec new file mode 100644 index 0000000..94edae6 --- /dev/null +++ b/postgresql12.spec @@ -0,0 +1,1000 @@ +# +# spec file for package postgresql12 +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define pgversion 12.20 +%define pgmajor 12 +%define buildlibs 0 +%define tarversion %{pgversion} +%define oldest_supported_llvm_ver 7 +%define latest_supported_llvm_ver 17 + +### CUT HERE ### +%define pgname postgresql%pgmajor +%define libpq libpq5 +%define libecpg libecpg6 +%define libpq_so libpq.so.5 +%define libecpg_so libecpg.so.6 +%define pgbasedir %_prefix/lib/%pgname +%define pgtestdir %pgbasedir/test +%define pgbindir %pgbasedir/bin +%define pglibdir %pgbasedir/%_lib +%define pgincludedir %_includedir/pgsql +%define pgdatadir %_datadir/%pgname +%define pgdocdir %_docdir/%pgname +%define pgextensiondir %pgdatadir/extension +%define pgcontribdir %pgdatadir/contrib +%define pgmandir %_mandir + +%define requires_file() %( readlink -f '%*' | LC_ALL=C xargs -r rpm -q --qf 'Requires: %%{name} >= %%{epoch}:%%{version}\\n' -f | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not") + +%if "@BUILD_FLAVOR@" == "mini" +%define devel devel-mini +%define mini 1 +Name: %pgname-mini +%else +%define devel devel +%define mini 0 +Name: %pgname +%endif + +# Use Python 2 for for PostgreSQL 10 on SLE12. +# Use Python 3 for everything else. +%if 0%{?is_opensuse} || 0%{?sle_version} >= 150000 || %pgmajor > 10 +%define python python3 +%else +%define python python +%endif + +%if %pgmajor >= 17 +%bcond_with derived +%else +%bcond_without derived +%endif + +%if 0%{?suse_version} >= 1500 +%bcond_without liblz4 +%endif + +%if 0%{?sle_version} >= 150100 || 0%{?suse_version} >= 1550 +%bcond_without libzstd +%endif + +%if %mini +%bcond_with selinux +%if %pgmajor >= 16 +%bcond_without icu +%else +%bcond_with icu +%endif +%else +BuildRequires: %{python}-devel +BuildRequires: docbook_4 +BuildRequires: gettext-devel +BuildRequires: libuuid-devel +BuildRequires: ncurses-devel +BuildRequires: pam-devel +BuildRequires: readline-devel +BuildRequires: tcl-devel +BuildRequires: timezone +BuildRequires: zlib-devel +%if %{with liblz4} +BuildRequires: pkgconfig(liblz4) +%endif +%if %{without derived} +BuildRequires: bison +BuildRequires: docbook-xsl-stylesheets +BuildRequires: flex +BuildRequires: perl +%endif + +%if %{with libzstd} +BuildRequires: pkgconfig(libzstd) +%endif + +%bcond_without selinux +%bcond_without icu +%if !%buildlibs +BuildRequires: %libecpg +BuildRequires: %libpq +%endif + +%if 0%{?suse_version} >= 1500 && %pgmajor >= 11 +%ifarch riscv64 +%bcond_with llvm +%else +%bcond_without llvm +%endif +%else +%bcond_with llvm +%endif +%endif + +%ifnarch %arm +%bcond_without check +%else +%bcond_with check +%endif + +%if %pgmajor >= 11 || %mini +%bcond_without server_devel +%else +%bcond_with server_devel +%endif + +BuildRequires: fdupes +%if %{with icu} +BuildRequires: libicu-devel +%endif +%if %{with selinux} +BuildRequires: libselinux-devel +%endif +%if %{with llvm} +BuildRequires: gcc-c++ +%if 0%{?product_libs_llvm_ver} > %{latest_supported_llvm_ver} +BuildRequires: clang%{latest_supported_llvm_ver} +BuildRequires: llvm%{latest_supported_llvm_ver}-devel +%else +BuildRequires: clang +BuildRequires: llvm-devel +%endif +%endif +BuildRequires: libxslt-devel +BuildRequires: openldap2-devel +BuildRequires: openssl-devel +BuildRequires: pkg-config +BuildRequires: pkgconfig(krb5) +BuildRequires: pkgconfig(libsystemd) +BuildRequires: pkgconfig(systemd) +#!BuildIgnore: %pgname +#!BuildIgnore: %pgname-server +#!BuildIgnore: %pgname-devel +#!BuildIgnore: %pgname-server-devel +#!BuildIgnore: %pgname-llvmjit +#!BuildIgnore: %pgname-llvmjit-devel +#!BuildIgnore: %pgname-contrib +#!BuildIgnore: %pgname-docs +#!BuildIgnore: %pgname-test +#!BuildIgnore: %pgname-pltcl +#!BuildIgnore: %pgname-plperl +#!BuildIgnore: %pgname-plpython +#!BuildIgnore: postgresql-implementation +#!BuildIgnore: postgresql-server-implementation +#!BuildIgnore: postgresql-server-devel-implementation +#!BuildIgnore: postgresql-llvmjit-devel-implementation +Summary: Basic Clients and Utilities for PostgreSQL +License: PostgreSQL +Group: Productivity/Databases/Tools +Version: %pgversion +Release: 0 +Source0: https://ftp.postgresql.org/pub/source/v%{tarversion}/postgresql-%{tarversion}.tar.bz2 +Source1: https://ftp.postgresql.org/pub/source/v%{tarversion}/postgresql-%{tarversion}.tar.bz2.sha256 +Source2: baselibs.conf +Source17: postgresql-rpmlintrc +Patch1: postgresql-conf.patch +# PL/Perl needs to be linked with rpath (bsc#578053) +Patch4: postgresql-plperl-keep-rpath.patch +Patch8: postgresql-testsuite-keep-results-file.patch +Patch9: postgresql-var-run-socket.patch +%if %{with llvm} +Patch10: postgresql-llvm-optional.patch +Patch11: 0001-jit-Workaround-potential-datalayout-mismatch-on-s390.patch +%endif +URL: https://www.postgresql.org/ +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Provides: postgresql = %version-%release +Provides: postgresql-implementation = %version-%release +Requires: %libpq >= %version +Requires(post): postgresql-noarch >= %pgmajor +Requires(postun): postgresql-noarch >= %pgmajor +# At this point we changed the package layout on SLE and conflict with +# older releases to get a clean cut. +Conflicts: postgresql-noarch < 12.0.1 + +%description +PostgreSQL is an advanced object-relational database management system +that supports an extended subset of the SQL standard, including +transactions, foreign keys, subqueries, triggers, and user-defined +types and functions. + +This package contains the basic utility and client programs necessary +to maintain and work with local or remote PostgreSQL databases as well +as manual pages for the SQL commands that PostgreSQL supports. Full +HTML documentation for PostgreSQL can be found in the postgresql-docs +package. + +%package -n %libpq +Summary: Shared Libraries Required for PostgreSQL Clients +Group: Productivity/Databases/Clients +Provides: postgresql-libs:%_libdir/libpq.so.5 +Obsoletes: postgresql-libs < %version +# bug437293 +%if "%_lib" == "lib64" +Conflicts: %libpq-32bit < %version +%endif +%ifarch ia64 +Conflicts: %libpq-x86 < %version +%endif +%ifarch ppc64 +Obsoletes: postgresql-libs-64bit +%endif + +%description -n %libpq + +PostgreSQL is an advanced object-relational database management system +that supports an extended subset of the SQL standard, including +transactions, foreign keys, subqueries, triggers, user-defined types +and functions. + +This package provides the client library that most PostgreSQL client +program or language bindings are using. + +%package -n %libecpg + +Summary: Shared Libraries Required for PostgreSQL Clients +Group: Productivity/Databases/Clients +Provides: postgresql-libs:%_libdir/libecpg.so.6 + +%description -n %libecpg +PostgreSQL is an advanced object-relational database management system +that supports an extended subset of the SQL standard, including +transactions, foreign keys, subqueries, triggers, user-defined types +and functions. + +This package provides the runtime library of the embedded SQL C +preprocessor for PostgreSQL. + +%package -n %pgname-%devel +Summary: PostgreSQL client development header files and libraries +Group: Development/Libraries/C and C++ +Provides: postgresql-devel = %version-%release +Provides: postgresql-devel-implementation = %version-%release +%if %mini +Requires: this-is-only-for-build-envs +Provides: %libecpg = %version-%release +Provides: %libpq = %version-%release +Provides: %pgname-devel = %version-%release +Conflicts: %libecpg +Conflicts: %libpq +Conflicts: %pgname-devel +%else +Requires: %libecpg >= %version +Requires: %libpq >= %version +Requires: postgresql-devel-noarch >= %pgmajor +%endif +# Installation of postgresql??-devel is exclusive +Provides: postgresql-devel-exclusive = %pgmajor +Conflicts: postgresql-devel-exclusive < %pgmajor + +%if %{with server_devel} +%package server-devel +Summary: PostgreSQL server development header files and utilities +Group: Development/Libraries/C and C++ +%else +Provides: %pgname-server-devel = %version-%release +%endif +Provides: postgresql-server-devel = %version-%release +Provides: postgresql-server-devel-implementation = %version-%release +Requires(post): postgresql-server-devel-noarch >= %pgmajor +Requires(postun): postgresql-server-devel-noarch >= %pgmajor +Requires: %pgname-devel = %version +Requires: %pgname-server = %version-%release +# Installation of postgresql??-devel is exclusive +Provides: postgresql-server-devel-exclusive = %pgmajor +Conflicts: postgresql-server-devel-exclusive < %pgmajor +Requires: libxslt-devel +Requires: openssl-devel +Requires: pam-devel +Requires: readline-devel +Requires: zlib-devel +Requires: pkgconfig(krb5) +%if %{with selinux} +Requires: libselinux-devel +%endif +%if %{with llvm} +Recommends: %pgname-llvmjit-devel = %version-%release +%endif + +%if %{with server_devel} +%description server-devel +PostgreSQL is an advanced object-relational database management system +that supports an extended subset of the SQL standard, including +transactions, foreign keys, subqueries, triggers, and user-defined +types and functions. + +This package contains the header files and libraries needed to compile +C extensions that link into the PostgreSQL server. For building client +applications, see the postgresql%pgmajor-devel package. +%endif + +%description -n %pgname-%devel +PostgreSQL is an advanced object-relational database management system +that supports an extended subset of the SQL standard, including +transactions, foreign keys, subqueries, triggers, and user-defined +types and functions. + +This package contains the header files and libraries needed to compile +C applications which will directly interact with a PostgreSQL database +management server and the ECPG Embedded C Postgres preprocessor. You +need to install this package if you want to develop applications in C +which will interact with a PostgreSQL server. + +For building PostgreSQL server extensions, see the +postgresql%pgmajor-server-devel package. + +%package server +Summary: The Programs Needed to Create and Run a PostgreSQL Server +Group: Productivity/Databases/Servers +PreReq: postgresql = %version +Requires: glibc-locale +Requires: timezone +%if %{with llvm} +Recommends: %{name}-llvmjit +%endif +Provides: postgresql-server-implementation = %version-%release +Requires: %libpq >= %version +Requires(pre): postgresql-server-noarch >= %pgmajor +Requires(preun): postgresql-server-noarch >= %pgmajor +Requires(postun): postgresql-server-noarch >= %pgmajor +Requires(post): postgresql-noarch >= %pgmajor +Requires(postun): postgresql-noarch >= %pgmajor + +%description server +PostgreSQL is an advanced object-relational database management system +that supports an extended subset of the SQL standard, including +transactions, foreign keys, sub-queries, triggers, and user-defined +types and functions. + +This package includes the programs needed to create and run a +PostgreSQL server, which will in turn allow you to create and maintain +PostgreSQL databases. + +%package llvmjit +Summary: Just-in-time compilation support for PostgreSQL +Group: Productivity/Databases/Servers +Provides: postgresql-llvmjit-implementation = %version-%release +Requires: %pgname-server = %version-%release +Requires: postgresql-llvmjit-noarch >= %pgmajor + +%description llvmjit +PostgreSQL is an advanced object-relational database management system +that supports an extended subset of the SQL standard, including +transactions, foreign keys, sub-queries, triggers, and user-defined +types and functions. + +This package contains support for just-in-time compiling parts of +PostgreSQL queries. Using LLVM it compiles e.g. expressions and tuple +deforming into native code, with the goal of accelerating analytics +queries. + +%package llvmjit-devel +Summary: PostgreSQL development files for extensions with LLVM support +Group: Development/Libraries/C and C++ +Provides: postgresql-llvmjit-devel = %version-%release +Provides: postgresql-llvmjit-devel-implementation = %version-%release +Requires: %pgname-server-devel = %version +%if %{with llvm} +Requires: %pgname-llvmjit = %version +Requires(post): postgresql-llvmjit-devel-noarch >= %pgmajor +Requires(postun): postgresql-llvmjit-devel-noarch >= %pgmajor +%requires_file %_bindir/llc +%requires_file %_bindir/clang +%endif + +%description llvmjit-devel +PostgreSQL is an advanced object-relational database management system +that supports an extended subset of the SQL standard, including +transactions, foreign keys, sub-queries, triggers, and user-defined +types and functions. + +This package pulls in the right versions of llvm and clang to compile +PostgreSQL extensions that support just-in-time compilation with LLVM, +if llvm is supported. Otherwise it will just pull the +%{pgname}-server-devel package. + +%package test +Summary: The test suite for PostgreSQL +Group: Productivity/Databases/Servers +Provides: postgresql-test-implementation = %version-%release +Requires: %pgname-server = %version +Requires: postgresql-test-noarch >= %pgmajor + +%description test +This package contains the sources and pre-built binaries of various +tests for the PostgreSQL database management system, including +regression tests and benchmarks. + +%package docs +Summary: HTML Documentation for PostgreSQL +Group: Productivity/Databases/Tools +Provides: postgresql-docs-implementation = %version-%release +Requires: postgresql-docs-noarch >= %pgmajor +BuildArch: noarch + +%description docs +PostgreSQL is an advanced object-relational database management system +that supports an extended subset of the SQL standard, including +transactions, foreign keys, subqueries, triggers, and user-defined +types and functions. + +This package contains the HTML documentation for PostgreSQL. The start +page is: file:///usr/share/doc/packages/%pgname/html/index.html . +Manual pages for the PostgreSQL SQL statements can be found in the +postgresql package. + +%package contrib +Summary: Contributed Extensions and Additions to PostgreSQL +Group: Productivity/Databases/Tools +Provides: postgresql-contrib-implementation = %version-%release +Requires: postgresql-contrib-noarch >= %pgmajor +Requires(post): %pgname >= %{version} +Requires: %pgname >= %{version} +PreReq: %pgname-server = %version-%release + +%description contrib +PostgreSQL is an advanced object-relational database management system +that supports an extended subset of the SQL standard, including +transactions, foreign keys, subqueries, triggers, and user-defined +types and functions. + +The postgresql-contrib package includes extensions and additions that +are distributed along with the PostgreSQL sources, but are not (yet) +officially part of the PostgreSQL core. + +Documentation for the modules contained in this package can be found in +/usr/share/doc/packages/postgresql/contrib. + +%package plperl +Summary: The PL/Tcl, PL/Perl, and PL/Python procedural languages for PostgreSQL +Group: Productivity/Databases/Servers +Provides: postgresql-plperl-implementation = %version-%release +Requires: %pgname-server = %version-%release +Requires: perl = %perl_version +Requires: postgresql-plperl-noarch >= %pgmajor + +%description plperl +This package contains the the PL/Tcl, PL/Perl, and PL/Python procedural +languages for the back-end. With these modules one can use Perl, +Python, and Tcl to write stored procedures, functions and triggers. + +PostgreSQL also offers the builtin procedural language PL/SQL. + +%package plpython +Summary: The PL/Python Procedural Languages for PostgreSQL +Group: Productivity/Databases/Servers +Provides: postgresql-plpython-implementation = %version-%release +Requires: %pgname-server = %version-%release +Requires: %python +Requires: postgresql-plpython-noarch >= %pgmajor + +%description plpython +PostgreSQL is an advanced object-relational database management system +that supports an extended subset of the SQL standard, including +transactions, foreign keys, subqueries, triggers, and user-defined +types and functions. + +This package contains the PL/Python procedural language for PostgreSQL. +With this module one can use Python to write stored procedures, +functions, and triggers. + +PostgreSQL also offers the built-in procedural language PL/SQL which is +included in the postgresql-server package. + +%package pltcl +Summary: PL/Tcl Procedural Language for PostgreSQL +Group: Productivity/Databases/Tools +Provides: postgresql-pltcl-implementation = %version-%release +Requires: %pgname-server = %version +Requires: postgresql-pltcl-noarch >= %pgmajor +Requires: tcl + +%description pltcl +PostgreSQL is an advanced object-relational database management system +that supports an extended subset of the SQL standard, including +transactions, foreign keys, subqueries, triggers, and user-defined +types and functions. + +This package contains the PL/Tcl procedural language for PostgreSQL. +With thie module one can use Tcl to write stored procedures, functions, +and triggers. + +PostgreSQL also offers the built-in procedural language PL/SQL which is +included in the postgresql-server package. + +%prep +%setup -q -n postgresql-%tarversion +# Keep the timestamp of configure, because patching it would otherwise +# confuse PostgreSQL's build system +touch -r configure tmp +%patch -P 1 +%patch -P 4 +%patch -P 8 +%patch -P 9 +%if %{with llvm} +%patch -P 10 +%patch -P 11 +%endif +touch -r tmp configure +rm tmp +find src/test/ -name '*.orig' -delete +find -name .gitignore -delete + +%build +%global _lto_cflags %{_lto_cflags} -ffat-lto-objects +export PYTHON=%python +%ifarch %arm +export USE_ARMV8_CRC32C=0 +%endif +PACKAGE_TARNAME=%pgname %configure \ + --bindir=%pgbindir \ + --libdir=%pglibdir \ + --includedir=%pgincludedir \ + --datadir=%pgdatadir \ + --docdir=%pgdocdir \ + --mandir=%pgmandir \ + --disable-rpath \ + --enable-nls \ + --enable-thread-safety \ + --enable-integer-datetimes \ +%if !%mini + --with-python \ + --with-perl \ + --with-tcl \ + --with-tclconfig=%_libdir \ + --with-pam \ + --with-uuid=e2fs \ + --with-libxml \ + --with-libxslt \ +%if %{with liblz4} + --with-lz4 \ +%endif +%if %{with libzstd} + --with-zstd \ +%endif + --with-systemd \ +%if %{with selinux} + --with-selinux \ +%endif +%if %{with icu} + --with-icu \ +%endif +%if %{with llvm} + --with-llvm \ +%endif +%else + --without-readline \ +%endif + --with-openssl \ + --with-ldap \ + --with-gssapi \ + --with-krb5 \ + --with-system-tzdata=/usr/share/zoneinfo +%if %mini +make -C src/interfaces %{?_smp_mflags} PACKAGE_TARNAME=%pgname +%else +make %{?_smp_mflags} PACKAGE_TARNAME=%pgname world + +%if %{with check} + +%check +# +# Run the regression tests. +# +make check || { + for f in src/test/regress/log/* {,src/test/regress/}regression.diffs; do + if test -f $f; then + cat $f + fi + done + exit 1 +} +%endif +%endif + +%install +VLANG=%pgmajor +%if %mini +make DESTDIR=%buildroot PACKAGE_TARNAME=%pgname -C src/include install +make DESTDIR=%buildroot PACKAGE_TARNAME=%pgname -C src/interfaces install +rm -rf %buildroot%pgincludedir/server +%else +make DESTDIR=%buildroot PACKAGE_TARNAME=%pgname install install-docs +%if 0 +mv %buildroot%pgincludedir/{server,..} +make DESTDIR=%buildroot PACKAGE_TARNAME=%pgname -C src/interfaces uninstall +rm -rf %buildroot%pgincludedir/* +mv %buildroot%pgincludedir{/../server,} +%endif + +# {{{ the test package +mkdir -p %buildroot%pgtestdir/regress +install -sm 0755 contrib/spi/{refint.so,autoinc.so} %buildroot%pgtestdir/regress +install -sm 0755 src/test/regress/{pg_regress,regress.so} %buildroot%pgtestdir/regress +for i in src/test/regress/{data,expected,input,output,sql}; do + test -d $i && cp -r $i %buildroot%pgtestdir/regress/ +done +install -m 0644 src/test/regress/*_schedule %buildroot%pgtestdir/regress +# }}} +%endif + +# The client libraries go to libdir +mkdir -p %buildroot/%_libdir +ls %buildroot%pglibdir/lib* | + grep -v walreceiver | + xargs mv -t %buildroot/%_libdir +mv %buildroot%pglibdir/pkgconfig %buildroot%_libdir +find %buildroot%_libdir/pkgconfig -type f -exec sed -i 's, -L%pglibdir,,' '{}' + + +# Don't ship static libraries, +# libpgport.a and libpgcommon.a are needed, though. +rm -f $(ls %buildroot/%_libdir/*.a %buildroot%pglibdir/*.a | grep -F -v -e libpgport.a -e libpgcommon.a) + +%if !%mini +# +# Install and collect the contrib stuff +# +touch flag; sleep 1 # otherwise we have installed files that are not newer than flag +make DESTDIR=%buildroot -C contrib install +find %buildroot -type f -cnewer flag -printf "/%%P\n" | + grep -v -e %_docdir -e %pgbindir -e %pgincludedir -e %pglibdir/bitcode \ + > contrib.files +rm flag +install -d -m 750 %buildroot/var/lib/pgsql +install -d -m 755 %buildroot%pgdocdir +cp doc/KNOWN_BUGS doc/MISSING_FEATURES COPYRIGHT \ + README* HISTORY %buildroot%pgdocdir +# Use versioned names for the man pages: +for f in %buildroot%pgmandir/man*/*; do + mv $f ${f}pg%pgmajor +done +%endif + +mkdir -p %buildroot{%_bindir,%_mandir/man1} +mkdir -p %buildroot/etc/alternatives +genlists () +{ + # usage: genlists packagename basenames + PKG=$1 + shift + for f in $@ + do + BIN=%_bindir/$f + ALTBIN=/etc/alternatives/$f + PGBIN=%pgbindir/$f + MAN=%pgmandir/man1/$f.1* + + # Package only binaries that exist in this version + test -e %buildroot$PGBIN || continue + + touch %buildroot$ALTBIN + ln -s $ALTBIN %buildroot$BIN + + echo "$PGBIN" >> $PKG.files + echo "$BIN" >> $PKG.files + echo "%ghost $ALTBIN" >> $PKG.files + test -e %buildroot$MAN && + echo "%doc $MAN" >> $PKG.files + %find_lang $f-$VLANG $PKG.files ||: + done +} +%if !%mini +genlists main \ + createdb \ + clusterdb \ + createuser \ + dropdb \ + dropuser \ + pg_dump \ + pg_dumpall \ + pg_restore \ + pg_rewind \ + psql \ + vacuumdb \ + reindexdb \ + pg_basebackup \ + pg_isready \ + pg_recvlogical \ + createlang \ + droplang \ + pg_receivexlog \ + pg_receivewal \ + pg_verify_checksums \ + pg_checksums \ + pg_combinebackup \ + pg_verifybackup + +%find_lang plpgsql-$VLANG main.files +%find_lang pgscripts-$VLANG main.files + +genlists server \ + initdb \ + pg_ctl \ + pg_controldata \ + pg_resetwal \ + pg_createsubscriber \ + pg_walsummary \ + pg_waldump \ + pg_resetxlog \ +%if %pgmajor >= 15 + pg_upgrade \ +%endif + postgres \ + postmaster + +genlists contrib \ + pg_xlogdump \ + oid2name \ + pg_archivecleanup \ + pg_amcheck \ + pg_standby \ + pg_test_fsync \ +%if %pgmajor < 15 + pg_upgrade \ +%endif + pgbench \ + vacuumlo \ + pg_test_timing +for pl in plperl plpython pltcl; do + %find_lang $pl-$VLANG $pl.lang +done +ln -s /etc/alternatives/postgresql %buildroot/usr/lib/postgresql +touch %buildroot/etc/alternatives/postgresql + +# Remove mostly unneeded buildtime requirements for server extensions +sed -i '/^LIBS = /s/= .*/=/' %buildroot/%pglibdir/pgxs/src/Makefile.global +%endif + +# Make sure we can also link agaist newer versions +pushd %buildroot%_libdir +for f in *.so; do + ln -sf $f.? $f +done +%if 0 +for long in *.so.*.*; do + short=${long%%.*} + so=${short%%.*} + ln -sf $long $short + ln -sf $short $so +done +%endif +popd + +mkdir -p %buildroot%pgmandir/man1 +cp -a doc/src/sgml/man1/ecpg.1 %buildroot%pgmandir/man1/ecpg.1pg%pgmajor +%find_lang ecpg-$VLANG devel.files +# The devel subpackage is exclusive across versions +# and not handled by update-alternatives. +mv %buildroot%pgbindir/ecpg %buildroot%_bindir/ecpg + +%if !%mini +%find_lang pg_config-$VLANG server-devel.files +ln -s %pgbindir/pg_config %buildroot%_bindir/pg_config +%endif + +%if %{without server_devel} +cat server-devel.files >> devel.files +%endif + +# Build up the file lists for the libpq and libecpg packages +cat > libpq.files <> libpq.files +%find_lang libpq5-$VLANG libpq.files + +cat > libecpg.files <> libecpg.files +%find_lang ecpglib6-$VLANG libecpg.files + +%if !%buildlibs +# Delete the contents of the library packages, if we don't want to build them +awk -v P=%buildroot '/^(%lang|[^%])/{print P $NF}' libpq.files libecpg.files | xargs rm +%endif + +%fdupes %buildroot + +%post -n %pgname-%devel +/sbin/ldconfig + +%postun -n %pgname-%devel +/sbin/ldconfig + +%if %{with server_devel} +%post server-devel +/usr/share/postgresql/install-alternatives %pgmajor + +%postun server-devel +/usr/share/postgresql/install-alternatives %pgmajor +%endif + +%if !%mini + +%postun +/usr/share/postgresql/install-alternatives %pgmajor + +%post +/usr/share/postgresql/install-alternatives %pgmajor + +%post server +/usr/share/postgresql/install-alternatives %pgmajor + +%preun server +# Stop only when we are uninstalling the currently running version +test -x /usr/bin/systemctl && + MAINPID=$(/usr/bin/systemctl show postgresql.service --property=MainPID --value) ||: +if test -n "$MAINPID" && test "$MAINPID" -ne 0; then + BIN=$(readlink -n /proc/$MAINPID/exe) + DIR=$(dirname ${BIN% *}) + if test "$DIR" = "%pgbindir" -o "$DIR" = "%_bindir"; then + %service_del_preun postgresql.service + fi +fi + +%postun server +/usr/share/postgresql/install-alternatives %pgmajor +# Restart only when we are updating the currently running version +test -x /usr/bin/systemctl && + MAINPID=$(/usr/bin/systemctl show postgresql.service --property=MainPID --value) ||: +if test -n "$MAINPID" && test "$MAINPID" -ne 0; then + BIN=$(readlink -n /proc/$MAINPID/exe) + DIR=$(dirname ${BIN% *}) + if test "$DIR" = "%pgbindir" -o "$DIR" = "%_bindir"; then + %service_del_postun postgresql.service + fi +fi + +%post contrib +/usr/share/postgresql/install-alternatives %pgmajor + +%postun contrib +/usr/share/postgresql/install-alternatives %pgmajor + +%if %buildlibs +%post -n %libpq -p /sbin/ldconfig + +%postun -n %libpq -p /sbin/ldconfig + +%post -n %libecpg -p /sbin/ldconfig + +%postun -n %libecpg -p /sbin/ldconfig +%endif + +%files -f main.files +%defattr(-,root,root) +%dir %pgbindir +%doc %pgmandir/man7/* +%docdir %pgdocdir +%dir %pgdocdir +%pgdocdir/[[:upper:]]* +%dir %pglibdir +/usr/lib/postgresql +%ghost /etc/alternatives/postgresql + +%files test +%defattr(-,root,root,-) +%pgtestdir + +%files docs +%defattr(-,root,root) +%doc %pgmandir/man3/* +%docdir %pgdocdir +%dir %pgdocdir +%pgdocdir/html + +%files contrib -f contrib.files +%defattr(-,root,root) +%docdir %pgdocdir +%dir %pgdocdir +%pgdocdir/extension +%dir %pgdatadir +%dir %pgcontribdir + +%files server -f server.files +%defattr(-,root,root) +%dir %pgbasedir +%dir %pgextensiondir +%dir %pglibdir +%pglibdir/pgoutput.so +%pglibdir/plpgsql.so +%pglibdir/dict_snowball.so +%pgdatadir/tsearch_data +%exclude %pgdatadir/tsearch_data/*.rules +%dir %pgdatadir +%pgdatadir/timezone* +%pgdatadir/*.* +%if %buildlibs +%exclude %pgdatadir/pg_service.conf.sample +%endif +%pglibdir/*_and_*.so +%pglibdir/euc2004_sjis2004.so +%pglibdir/libpqwalreceiver.so +%pgextensiondir/plpgsql* +%attr(750,postgres,postgres) %dir /var/lib/pgsql + +%if %{with llvm} +%dir %pglibdir/bitcode + +%files llvmjit +%defattr(-,root,root) +%pglibdir/llvm* +%pglibdir/bitcode/* +%endif + +%files llvmjit-devel +%defattr(-,root,root) + +%files pltcl -f pltcl.lang +%defattr(-,root,root) +%pgextensiondir/pltcl* +%pglibdir/pltcl.so + +%files plperl -f plperl.lang +%defattr(-,root,root) +%pgextensiondir/plperl* +%pglibdir/plperl.so + +%files plpython -f plpython.lang +%defattr(-,root,root) +%pgextensiondir/plpython* +%pglibdir/plpython*.so + +%endif + +%if %buildlibs && !%mini +%files -n %libpq -f libpq.files + +%files -n %libecpg -f libecpg.files +%endif + +%if %buildlibs && %mini +%files -n %pgname-%devel -f devel.files -f libpq.files -f libecpg.files +%defattr(-,root,root) +%else + +%files -n %pgname-%devel -f devel.files +%defattr(-,root,root) +%endif + +%dir %pgbasedir +%dir %pgbindir +%_bindir/ecpg +%_libdir/pkgconfig/* +%_libdir/lib*.so +%pgincludedir +%if %{with server_devel} +%exclude %pgincludedir/server +%endif +%doc %pgmandir/man1/ecpg.1* + +%if !%mini +%if %{with server_devel} +%files server-devel -f server-devel.files +%endif +%defattr(-,root,root) +%ghost %_bindir/pg_config +%pgbindir/pg_config +%pgincludedir/server +%pglibdir/pgxs +%_libdir/lib*.a +%doc %pgmandir/man1/pg_config.1* +%endif + +%changelog From dd867a285123cefd0d3ad6352a5d5593aefca2af93023fc0b71f517359be5d19 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Tue, 5 Nov 2024 14:03:35 +0000 Subject: [PATCH 2/3] - Sync spec file from postgresql17. - Pull upstream patch to fix tests with timezone 2024b * postgresql-testsuite-timezone-fix.patch OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql12?expand=0&rev=107 --- postgresql-testsuite-timezone-fix.patch | 594 ++++++++++++++++++++++++ postgresql12.changes | 7 + postgresql12.spec | 36 +- 3 files changed, 619 insertions(+), 18 deletions(-) create mode 100644 postgresql-testsuite-timezone-fix.patch diff --git a/postgresql-testsuite-timezone-fix.patch b/postgresql-testsuite-timezone-fix.patch new file mode 100644 index 0000000..5dfb928 --- /dev/null +++ b/postgresql-testsuite-timezone-fix.patch @@ -0,0 +1,594 @@ +From 205813da4c264d80db3c3215db199cc119e18369 Mon Sep 17 00:00:00 2001 +From: Tom Lane +Date: Sat, 14 Sep 2024 17:55:03 -0400 +Subject: [PATCH] Run regression tests with timezone America/Los_Angeles. + +Historically we've used timezone "PST8PDT", but the recent release +2024b of tzdb changes the definition of that zone in a way that +breaks many test cases concerned with dates before 1970. Although +we've not yet adopted 2024b into our own tree, this is already +problematic for people using --with-system-tzdata if their platform +has already adopted 2024b. To work with both older and newer +versions of tzdb, switch to using "America/Los_Angeles", accepting +the ensuing changes in regression test results. + +Back-patch to all supported branches. + +Per report and patch from Wolfgang Walther. + +Discussion: https://postgr.es/m/0a997455-5aba-4cf2-a354-d26d8bcbfae6@technowledgy.de +--- + doc/src/sgml/ref/set.sgml | 4 +- + doc/src/sgml/regress.sgml | 6 +- + src/test/regress/expected/date.out | 10 +- + src/test/regress/expected/horology.out | 53 +++-- + src/test/regress/expected/timestamptz.out | 249 +++++++++++----------- + src/test/regress/pg_regress.c | 2 +- + src/test/regress/sql/horology.sql | 4 +- + src/test/regress/sql/timestamptz.sql | 5 +- + 8 files changed, 178 insertions(+), 155 deletions(-) + +diff --git a/src/test/regress/expected/date.out b/src/test/regress/expected/date.out +index 4686d0d8cab46..7d753654f899d 100644 +--- a/src/test/regress/expected/date.out ++++ b/src/test/regress/expected/date.out +@@ -1148,7 +1148,7 @@ SELECT DATE_TRUNC('MILLENNIUM', TIMESTAMP '1970-03-20 04:30:00.00000'); -- 1001 + SELECT DATE_TRUNC('MILLENNIUM', DATE '1970-03-20'); -- 1001-01-01 + date_trunc + ------------------------------ +- Thu Jan 01 00:00:00 1001 PST ++ Thu Jan 01 00:00:00 1001 LMT + (1 row) + + SELECT DATE_TRUNC('CENTURY', TIMESTAMP '1970-03-20 04:30:00.00000'); -- 1901 +@@ -1172,13 +1172,13 @@ SELECT DATE_TRUNC('CENTURY', DATE '2004-08-10'); -- 2001-01-01 + SELECT DATE_TRUNC('CENTURY', DATE '0002-02-04'); -- 0001-01-01 + date_trunc + ------------------------------ +- Mon Jan 01 00:00:00 0001 PST ++ Mon Jan 01 00:00:00 0001 LMT + (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 ++ Tue Jan 01 00:00:00 0100 LMT BC + (1 row) + + SELECT DATE_TRUNC('DECADE', DATE '1993-12-25'); -- 1990-01-01 +@@ -1190,13 +1190,13 @@ SELECT DATE_TRUNC('DECADE', DATE '1993-12-25'); -- 1990-01-01 + SELECT DATE_TRUNC('DECADE', DATE '0004-12-25'); -- 0001-01-01 BC + date_trunc + --------------------------------- +- Sat Jan 01 00:00:00 0001 PST BC ++ Sat Jan 01 00:00:00 0001 LMT 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 ++ Mon Jan 01 00:00:00 0011 LMT BC + (1 row) + + -- +diff --git a/src/test/regress/expected/horology.out b/src/test/regress/expected/horology.out +index 058b009eeeba4..aae78fd7a867f 100644 +--- a/src/test/regress/expected/horology.out ++++ b/src/test/regress/expected/horology.out +@@ -1,7 +1,18 @@ + -- + -- HOROLOGY + -- +-SET DateStyle = 'Postgres, MDY'; ++SHOW TimeZone; -- Many of these tests depend on the prevailing settings ++ TimeZone ++--------------------- ++ America/Los_Angeles ++(1 row) ++ ++SHOW DateStyle; ++ DateStyle ++--------------- ++ Postgres, MDY ++(1 row) ++ + -- + -- Test various input formats + -- +@@ -759,12 +770,12 @@ SELECT '' AS "64", d1 + interval '1 year' AS one_year FROM TIMESTAMPTZ_TBL; + | 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 ++ | Thu Feb 16 17:32:01 0096 LMT BC ++ | Sun Feb 16 17:32:01 0098 LMT ++ | Fri Feb 16 17:32:01 0598 LMT ++ | Wed Feb 16 17:32:01 1098 LMT ++ | Sun Feb 16 17:32:01 1698 LMT ++ | Fri Feb 16 17:32:01 1798 LMT + | Wed Feb 16 17:32:01 1898 PST + | Mon Feb 16 17:32:01 1998 PST + | Sun Feb 16 17:32:01 2098 PST +@@ -830,12 +841,12 @@ SELECT '' AS "64", d1 - interval '1 year' AS one_year FROM TIMESTAMPTZ_TBL; + | 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 ++ | Mon Feb 16 17:32:01 0098 LMT BC ++ | Thu Feb 16 17:32:01 0096 LMT ++ | Tue Feb 16 17:32:01 0596 LMT ++ | Sun Feb 16 17:32:01 1096 LMT ++ | Thu Feb 16 17:32:01 1696 LMT ++ | Tue Feb 16 17:32:01 1796 LMT + | Sun Feb 16 17:32:01 1896 PST + | Fri Feb 16 17:32:01 1996 PST + | Thu Feb 16 17:32:01 2096 PST +@@ -2555,13 +2566,13 @@ RESET DateStyle; + SELECT to_timestamp('0097/Feb/16 --> 08:14:30', 'YYYY/Mon/DD --> HH:MI:SS'); + to_timestamp + ------------------------------ +- Sat Feb 16 08:14:30 0097 PST ++ Sat Feb 16 08:14:30 0097 LMT + (1 row) + + SELECT to_timestamp('97/2/16 8:14:30', 'FMYYYY/FMMM/FMDD FMHH:FMMI:FMSS'); + to_timestamp + ------------------------------ +- Sat Feb 16 08:14:30 0097 PST ++ Sat Feb 16 08:14:30 0097 LMT + (1 row) + + SELECT to_timestamp('2011$03!18 23_38_15', 'YYYY-MM-DD HH24:MI:SS'); +@@ -2598,7 +2609,7 @@ SELECT to_timestamp('My birthday-> Year: 1976, Month: May, Day: 16', + SELECT to_timestamp('1,582nd VIII 21', 'Y,YYYth FMRM DD'); + to_timestamp + ------------------------------ +- Sat Aug 21 00:00:00 1582 PST ++ Sat Aug 21 00:00:00 1582 LMT + (1 row) + + SELECT to_timestamp('15 "text between quote marks" 98 54 45', +@@ -2662,7 +2673,7 @@ SELECT to_timestamp('1997 AD 11 16', 'YYYY BC MM DD'); + SELECT to_timestamp('1997 BC 11 16', 'YYYY BC MM DD'); + to_timestamp + --------------------------------- +- Tue Nov 16 00:00:00 1997 PST BC ++ Tue Nov 16 00:00:00 1997 LMT BC + (1 row) + + SELECT to_timestamp('1997 A.D. 11 16', 'YYYY B.C. MM DD'); +@@ -2674,7 +2685,7 @@ SELECT to_timestamp('1997 A.D. 11 16', 'YYYY B.C. MM DD'); + SELECT to_timestamp('1997 B.C. 11 16', 'YYYY B.C. MM DD'); + to_timestamp + --------------------------------- +- Tue Nov 16 00:00:00 1997 PST BC ++ Tue Nov 16 00:00:00 1997 LMT BC + (1 row) + + SELECT to_timestamp('9-1116', 'Y-MMDD'); +@@ -2865,19 +2876,19 @@ SELECT to_date('-44-02-01 BC','YYYY-MM-DD BC'); + SELECT to_timestamp('44-02-01 11:12:13 BC','YYYY-MM-DD HH24:MI:SS BC'); + to_timestamp + --------------------------------- +- Fri Feb 01 11:12:13 0044 PST BC ++ Fri Feb 01 11:12:13 0044 LMT BC + (1 row) + + SELECT to_timestamp('-44-02-01 11:12:13','YYYY-MM-DD HH24:MI:SS'); + to_timestamp + --------------------------------- +- Fri Feb 01 11:12:13 0044 PST BC ++ Fri Feb 01 11:12:13 0044 LMT BC + (1 row) + + SELECT to_timestamp('-44-02-01 11:12:13 BC','YYYY-MM-DD HH24:MI:SS BC'); + to_timestamp + ------------------------------ +- Mon Feb 01 11:12:13 0044 PST ++ Mon Feb 01 11:12:13 0044 LMT + (1 row) + + -- +diff --git a/src/test/regress/expected/timestamptz.out b/src/test/regress/expected/timestamptz.out +index bc7879f288d1c..55efd18386881 100644 +--- a/src/test/regress/expected/timestamptz.out ++++ b/src/test/regress/expected/timestamptz.out +@@ -293,12 +293,12 @@ SELECT '' AS "64", d1 FROM TIMESTAMPTZ_TBL; + | 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 0097 LMT BC ++ | Sat Feb 16 17:32:01 0097 LMT ++ | Thu Feb 16 17:32:01 0597 LMT ++ | Tue Feb 16 17:32:01 1097 LMT ++ | Sat Feb 16 17:32:01 1697 LMT ++ | Thu Feb 16 17:32:01 1797 LMT + | Tue Feb 16 17:32:01 1897 PST + | Sun Feb 16 17:32:01 1997 PST + | Sat Feb 16 17:32:01 2097 PST +@@ -322,19 +322,19 @@ SELECT '' AS "64", d1 FROM TIMESTAMPTZ_TBL; + SELECT '4714-11-24 00:00:00+00 BC'::timestamptz; + timestamptz + --------------------------------- +- Sun Nov 23 16:00:00 4714 PST BC ++ Sun Nov 23 16:07:02 4714 LMT BC + (1 row) + + SELECT '4714-11-23 16:00:00-08 BC'::timestamptz; + timestamptz + --------------------------------- +- Sun Nov 23 16:00:00 4714 PST BC ++ Sun Nov 23 16:07:02 4714 LMT BC + (1 row) + + SELECT 'Sun Nov 23 16:00:00 4714 PST BC'::timestamptz; + timestamptz + --------------------------------- +- Sun Nov 23 16:00:00 4714 PST BC ++ Sun Nov 23 16:07:02 4714 LMT BC + (1 row) + + SELECT '4714-11-23 23:59:59+00 BC'::timestamptz; -- out of range +@@ -405,12 +405,12 @@ SELECT '' AS "15", d1 FROM TIMESTAMPTZ_TBL + ----+--------------------------------- + | -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 0097 LMT BC ++ | Sat Feb 16 17:32:01 0097 LMT ++ | Thu Feb 16 17:32:01 0597 LMT ++ | Tue Feb 16 17:32:01 1097 LMT ++ | Sat Feb 16 17:32:01 1697 LMT ++ | Thu Feb 16 17:32:01 1797 LMT + | Tue Feb 16 17:32:01 1897 PST + | Wed Feb 28 17:32:01 1996 PST + | Thu Feb 29 17:32:01 1996 PST +@@ -473,12 +473,12 @@ SELECT '' AS "63", d1 FROM TIMESTAMPTZ_TBL + | 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 0097 LMT BC ++ | Sat Feb 16 17:32:01 0097 LMT ++ | Thu Feb 16 17:32:01 0597 LMT ++ | Tue Feb 16 17:32:01 1097 LMT ++ | Sat Feb 16 17:32:01 1697 LMT ++ | Thu Feb 16 17:32:01 1797 LMT + | Tue Feb 16 17:32:01 1897 PST + | Sun Feb 16 17:32:01 1997 PST + | Sat Feb 16 17:32:01 2097 PST +@@ -505,12 +505,12 @@ SELECT '' AS "16", d1 FROM TIMESTAMPTZ_TBL + | -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 0097 LMT BC ++ | Sat Feb 16 17:32:01 0097 LMT ++ | Thu Feb 16 17:32:01 0597 LMT ++ | Tue Feb 16 17:32:01 1097 LMT ++ | Sat Feb 16 17:32:01 1697 LMT ++ | Thu Feb 16 17:32:01 1797 LMT + | Tue Feb 16 17:32:01 1897 PST + | Wed Feb 28 17:32:01 1996 PST + | Thu Feb 29 17:32:01 1996 PST +@@ -778,12 +778,12 @@ SELECT d1 as timestamptz, + 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 0097 LMT BC | -97 | 2 | 16 | 17 | 32 | 1 ++ Sat Feb 16 17:32:01 0097 LMT | 97 | 2 | 16 | 17 | 32 | 1 ++ Thu Feb 16 17:32:01 0597 LMT | 597 | 2 | 16 | 17 | 32 | 1 ++ Tue Feb 16 17:32:01 1097 LMT | 1097 | 2 | 16 | 17 | 32 | 1 ++ Sat Feb 16 17:32:01 1697 LMT | 1697 | 2 | 16 | 17 | 32 | 1 ++ Thu Feb 16 17:32:01 1797 LMT | 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 +@@ -852,12 +852,12 @@ SELECT d1 as timestamptz, + 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 0097 LMT BC | 1 | 1000 | 1000000 ++ Sat Feb 16 17:32:01 0097 LMT | 1 | 1000 | 1000000 ++ Thu Feb 16 17:32:01 0597 LMT | 1 | 1000 | 1000000 ++ Tue Feb 16 17:32:01 1097 LMT | 1 | 1000 | 1000000 ++ Sat Feb 16 17:32:01 1697 LMT | 1 | 1000 | 1000000 ++ Thu Feb 16 17:32:01 1797 LMT | 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 +@@ -927,12 +927,12 @@ SELECT d1 as timestamptz, + 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 0097 LMT BC | -97 | 7 | 2 | 2 | 47 ++ Sat Feb 16 17:32:01 0097 LMT | 97 | 7 | 6 | 6 | 47 ++ Thu Feb 16 17:32:01 0597 LMT | 597 | 7 | 4 | 4 | 47 ++ Tue Feb 16 17:32:01 1097 LMT | 1097 | 7 | 2 | 2 | 47 ++ Sat Feb 16 17:32:01 1697 LMT | 1697 | 7 | 6 | 6 | 47 ++ Thu Feb 16 17:32:01 1797 LMT | 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 +@@ -1003,12 +1003,12 @@ SELECT d1 as timestamptz, + Fri Feb 14 17:32:01 1997 PST | 199 | 20 | 2 | 2450495 + Sat Feb 15 17:32:01 1997 PST | 199 | 20 | 2 | 2450496 + Sun Feb 16 17:32:01 1997 PST | 199 | 20 | 2 | 2450497 +- Tue Feb 16 17:32:01 0097 PST BC | -10 | -1 | -1 | 1686043 +- Sat Feb 16 17:32:01 0097 PST | 9 | 1 | 1 | 1756537 +- Thu Feb 16 17:32:01 0597 PST | 59 | 6 | 1 | 1939158 +- Tue Feb 16 17:32:01 1097 PST | 109 | 11 | 2 | 2121779 +- Sat Feb 16 17:32:01 1697 PST | 169 | 17 | 2 | 2340925 +- Thu Feb 16 17:32:01 1797 PST | 179 | 18 | 2 | 2377449 ++ Tue Feb 16 17:32:01 0097 LMT BC | -10 | -1 | -1 | 1686043 ++ Sat Feb 16 17:32:01 0097 LMT | 9 | 1 | 1 | 1756537 ++ Thu Feb 16 17:32:01 0597 LMT | 59 | 6 | 1 | 1939158 ++ Tue Feb 16 17:32:01 1097 LMT | 109 | 11 | 2 | 2121779 ++ Sat Feb 16 17:32:01 1697 LMT | 169 | 17 | 2 | 2340925 ++ Thu Feb 16 17:32:01 1797 LMT | 179 | 18 | 2 | 2377449 + Tue Feb 16 17:32:01 1897 PST | 189 | 19 | 2 | 2413973 + Sun Feb 16 17:32:01 1997 PST | 199 | 20 | 2 | 2450497 + Sat Feb 16 17:32:01 2097 PST | 209 | 21 | 3 | 2487022 +@@ -1033,74 +1033,74 @@ SELECT d1 as timestamptz, + 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 ++ 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 LMT BC | -28378 | -7 | -52.96666666666664 ++ Sat Feb 16 17:32:01 0097 LMT | -28378 | -7 | -52.96666666666664 ++ Thu Feb 16 17:32:01 0597 LMT | -28378 | -7 | -52.96666666666664 ++ Tue Feb 16 17:32:01 1097 LMT | -28378 | -7 | -52.96666666666664 ++ Sat Feb 16 17:32:01 1697 LMT | -28378 | -7 | -52.96666666666664 ++ Thu Feb 16 17:32:01 1797 LMT | -28378 | -7 | -52.96666666666664 ++ 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) + + -- TO_CHAR() +@@ -1973,7 +1973,7 @@ INSERT INTO TIMESTAMPTZ_TST VALUES(4, '1000000312 23:58:48 IST'); + SELECT * FROM TIMESTAMPTZ_TST ORDER BY a; + a | b + ---+-------------------------------- +- 1 | Wed Mar 12 13:58:48 1000 PST ++ 1 | Wed Mar 12 14:05:50 1000 LMT + 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 +@@ -2084,7 +2084,14 @@ SELECT make_timestamptz(2008, 12, 10, 10, 10, 10, 'EDT'); + Wed Dec 10 09:10:10 2008 EST + (1 row) + +-SELECT make_timestamptz(2014, 12, 10, 10, 10, 10, 'PST8PDT'); ++SELECT make_timestamptz(2014, 12, 10, 10, 10, 10, 'FOO8BAR'); ++ make_timestamptz ++------------------------------ ++ Wed Dec 10 13:10:10 2014 EST ++(1 row) ++ ++-- POSIX ++SELECT make_timestamptz(2014, 12, 10, 10, 10, 10, 'PST8PDT,M3.2.0,M11.1.0'); + make_timestamptz + ------------------------------ + Wed Dec 10 13:10:10 2014 EST +diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c +index 91f0d08ea0a8b..5fa18e2a34b35 100644 +--- a/src/test/regress/pg_regress.c ++++ b/src/test/regress/pg_regress.c +@@ -778,7 +778,7 @@ initialize_environment(void) + /* + * Set timezone and datestyle for datetime-related tests + */ +- putenv("PGTZ=PST8PDT"); ++ putenv("PGTZ=America/Los_Angeles"); + putenv("PGDATESTYLE=Postgres, MDY"); + + /* +diff --git a/src/test/regress/sql/horology.sql b/src/test/regress/sql/horology.sql +index b647f63c2bae4..94b7f31583d7a 100644 +--- a/src/test/regress/sql/horology.sql ++++ b/src/test/regress/sql/horology.sql +@@ -1,7 +1,9 @@ + -- + -- HOROLOGY + -- +-SET DateStyle = 'Postgres, MDY'; ++ ++SHOW TimeZone; -- Many of these tests depend on the prevailing settings ++SHOW DateStyle; + + -- + -- Test various input formats +diff --git a/src/test/regress/sql/timestamptz.sql b/src/test/regress/sql/timestamptz.sql +index dd22c3296c854..b0536e79cd645 100644 +--- a/src/test/regress/sql/timestamptz.sql ++++ b/src/test/regress/sql/timestamptz.sql +@@ -330,7 +330,10 @@ SELECT make_timestamptz(1910, 12, 24, 0, 0, 0, 'Nehwon/Lankhmar'); + -- abbreviations + SELECT make_timestamptz(2008, 12, 10, 10, 10, 10, 'EST'); + SELECT make_timestamptz(2008, 12, 10, 10, 10, 10, 'EDT'); +-SELECT make_timestamptz(2014, 12, 10, 10, 10, 10, 'PST8PDT'); ++SELECT make_timestamptz(2014, 12, 10, 10, 10, 10, 'FOO8BAR'); ++ ++-- POSIX ++SELECT make_timestamptz(2014, 12, 10, 10, 10, 10, 'PST8PDT,M3.2.0,M11.1.0'); + + RESET TimeZone; + diff --git a/postgresql12.changes b/postgresql12.changes index 4f754db..5f28103 100644 --- a/postgresql12.changes +++ b/postgresql12.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Nov 5 14:02:55 UTC 2024 - Reinhard Max + +- Sync spec file from postgresql17. +- Pull upstream patch to fix tests with timezone 2024b + * postgresql-testsuite-timezone-fix.patch + ------------------------------------------------------------------- Sat Aug 10 14:14:40 UTC 2024 - Marcus Rueckert diff --git a/postgresql12.spec b/postgresql12.spec index 94edae6..bd7d681 100644 --- a/postgresql12.spec +++ b/postgresql12.spec @@ -20,8 +20,9 @@ %define pgmajor 12 %define buildlibs 0 %define tarversion %{pgversion} -%define oldest_supported_llvm_ver 7 -%define latest_supported_llvm_ver 17 +%define oldest_supported_llvm_ver 10 +# To be able to use cmake(LLVM) < ... +%define latest_supported_llvm_ver_plus_one 19 ### CUT HERE ### %define pgname postgresql%pgmajor @@ -74,6 +75,12 @@ Name: %pgname %bcond_without libzstd %endif +%if %{without derived} +BuildRequires: bison +BuildRequires: docbook-xsl-stylesheets +BuildRequires: flex +BuildRequires: perl +%endif %if %mini %bcond_with selinux %if %pgmajor >= 16 @@ -95,12 +102,6 @@ BuildRequires: zlib-devel %if %{with liblz4} BuildRequires: pkgconfig(liblz4) %endif -%if %{without derived} -BuildRequires: bison -BuildRequires: docbook-xsl-stylesheets -BuildRequires: flex -BuildRequires: perl -%endif %if %{with libzstd} BuildRequires: pkgconfig(libzstd) @@ -145,13 +146,8 @@ BuildRequires: libselinux-devel %endif %if %{with llvm} BuildRequires: gcc-c++ -%if 0%{?product_libs_llvm_ver} > %{latest_supported_llvm_ver} -BuildRequires: clang%{latest_supported_llvm_ver} -BuildRequires: llvm%{latest_supported_llvm_ver}-devel -%else -BuildRequires: clang -BuildRequires: llvm-devel -%endif +BuildRequires: (cmake(Clang) >= %{oldest_supported_llvm_ver} with cmake(Clang) < %{latest_supported_llvm_ver_plus_one}) +BuildRequires: (cmake(LLVM) >= %{oldest_supported_llvm_ver} with cmake(LLVM) < %{latest_supported_llvm_ver_plus_one}) %endif BuildRequires: libxslt-devel BuildRequires: openldap2-devel @@ -194,6 +190,7 @@ Patch9: postgresql-var-run-socket.patch Patch10: postgresql-llvm-optional.patch Patch11: 0001-jit-Workaround-potential-datalayout-mismatch-on-s390.patch %endif +Patch12: postgresql-testsuite-timezone-fix.patch URL: https://www.postgresql.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-build Provides: postgresql = %version-%release @@ -528,6 +525,7 @@ touch -r configure tmp %patch -P 10 %patch -P 11 %endif +%patch -P 12 -p 1 touch -r tmp configure rm tmp find src/test/ -name '*.orig' -delete @@ -611,6 +609,7 @@ VLANG=%pgmajor make DESTDIR=%buildroot PACKAGE_TARNAME=%pgname -C src/include install make DESTDIR=%buildroot PACKAGE_TARNAME=%pgname -C src/interfaces install rm -rf %buildroot%pgincludedir/server +rm -rf %buildroot%pgdatadir %else make DESTDIR=%buildroot PACKAGE_TARNAME=%pgname install install-docs %if 0 @@ -773,8 +772,6 @@ done %endif popd -mkdir -p %buildroot%pgmandir/man1 -cp -a doc/src/sgml/man1/ecpg.1 %buildroot%pgmandir/man1/ecpg.1pg%pgmajor %find_lang ecpg-$VLANG devel.files # The devel subpackage is exclusive across versions # and not handled by update-alternatives. @@ -792,8 +789,10 @@ cat server-devel.files >> devel.files # Build up the file lists for the libpq and libecpg packages cat > libpq.files <> libpq.files %find_lang libpq5-$VLANG libpq.files @@ -979,12 +978,13 @@ fi %_libdir/pkgconfig/* %_libdir/lib*.so %pgincludedir + %if %{with server_devel} %exclude %pgincludedir/server %endif -%doc %pgmandir/man1/ecpg.1* %if !%mini +%doc %pgmandir/man1/ecpg.1* %if %{with server_devel} %files server-devel -f server-devel.files %endif From ac6f35f50c06555de78f8d96b548abc7fccb8eeb620d360938c65031cbb83f51 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Thu, 14 Nov 2024 14:15:17 +0000 Subject: [PATCH 3/3] - Upgrade to 12.21: * CVE-2024-10976, bsc#1233323: Ensure cached plans are marked as dependent on the calling role when RLS applies to a non-top-level table reference. * CVE-2024-10977, bsc#1233325: Make libpq discard error messages received during SSL or GSS protocol negotiation. * CVE-2024-10978, bsc#1233326: Fix unintended interactions between SET SESSION AUTHORIZATION and SET ROLE * CVE-2024-10979, bsc#1233327: Prevent trusted PL/Perl code from changing environment variables. * https://www.postgresql.org/about/news/p-2955/ * https://www.postgresql.org/docs/release/12.21/ * https://www.postgresql.org/about/news/p-2910/ OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql12?expand=0&rev=108 --- postgresql-12.20.tar.bz2 | 3 - postgresql-12.20.tar.bz2.sha256 | 1 - postgresql-12.21.tar.bz2 | 3 + postgresql-12.21.tar.bz2.sha256 | 1 + postgresql-testsuite-timezone-fix.patch | 594 ------------------------ postgresql12.changes | 20 +- postgresql12.spec | 4 +- 7 files changed, 22 insertions(+), 604 deletions(-) delete mode 100644 postgresql-12.20.tar.bz2 delete mode 100644 postgresql-12.20.tar.bz2.sha256 create mode 100644 postgresql-12.21.tar.bz2 create mode 100644 postgresql-12.21.tar.bz2.sha256 delete mode 100644 postgresql-testsuite-timezone-fix.patch diff --git a/postgresql-12.20.tar.bz2 b/postgresql-12.20.tar.bz2 deleted file mode 100644 index cab6a7b..0000000 --- a/postgresql-12.20.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2d543af3009fec7fd5af35f7a70c95085d3eef6b508e517aa9493e99b15e9ea9 -size 21256573 diff --git a/postgresql-12.20.tar.bz2.sha256 b/postgresql-12.20.tar.bz2.sha256 deleted file mode 100644 index cae3640..0000000 --- a/postgresql-12.20.tar.bz2.sha256 +++ /dev/null @@ -1 +0,0 @@ -2d543af3009fec7fd5af35f7a70c95085d3eef6b508e517aa9493e99b15e9ea9 postgresql-12.20.tar.bz2 diff --git a/postgresql-12.21.tar.bz2 b/postgresql-12.21.tar.bz2 new file mode 100644 index 0000000..9f392cd --- /dev/null +++ b/postgresql-12.21.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6c711550ac1cc7828865e5823d9f457e3bdad6f4320177169f90e419be0c27f2 +size 21298608 diff --git a/postgresql-12.21.tar.bz2.sha256 b/postgresql-12.21.tar.bz2.sha256 new file mode 100644 index 0000000..4970918 --- /dev/null +++ b/postgresql-12.21.tar.bz2.sha256 @@ -0,0 +1 @@ +6c711550ac1cc7828865e5823d9f457e3bdad6f4320177169f90e419be0c27f2 postgresql-12.21.tar.bz2 diff --git a/postgresql-testsuite-timezone-fix.patch b/postgresql-testsuite-timezone-fix.patch deleted file mode 100644 index 5dfb928..0000000 --- a/postgresql-testsuite-timezone-fix.patch +++ /dev/null @@ -1,594 +0,0 @@ -From 205813da4c264d80db3c3215db199cc119e18369 Mon Sep 17 00:00:00 2001 -From: Tom Lane -Date: Sat, 14 Sep 2024 17:55:03 -0400 -Subject: [PATCH] Run regression tests with timezone America/Los_Angeles. - -Historically we've used timezone "PST8PDT", but the recent release -2024b of tzdb changes the definition of that zone in a way that -breaks many test cases concerned with dates before 1970. Although -we've not yet adopted 2024b into our own tree, this is already -problematic for people using --with-system-tzdata if their platform -has already adopted 2024b. To work with both older and newer -versions of tzdb, switch to using "America/Los_Angeles", accepting -the ensuing changes in regression test results. - -Back-patch to all supported branches. - -Per report and patch from Wolfgang Walther. - -Discussion: https://postgr.es/m/0a997455-5aba-4cf2-a354-d26d8bcbfae6@technowledgy.de ---- - doc/src/sgml/ref/set.sgml | 4 +- - doc/src/sgml/regress.sgml | 6 +- - src/test/regress/expected/date.out | 10 +- - src/test/regress/expected/horology.out | 53 +++-- - src/test/regress/expected/timestamptz.out | 249 +++++++++++----------- - src/test/regress/pg_regress.c | 2 +- - src/test/regress/sql/horology.sql | 4 +- - src/test/regress/sql/timestamptz.sql | 5 +- - 8 files changed, 178 insertions(+), 155 deletions(-) - -diff --git a/src/test/regress/expected/date.out b/src/test/regress/expected/date.out -index 4686d0d8cab46..7d753654f899d 100644 ---- a/src/test/regress/expected/date.out -+++ b/src/test/regress/expected/date.out -@@ -1148,7 +1148,7 @@ SELECT DATE_TRUNC('MILLENNIUM', TIMESTAMP '1970-03-20 04:30:00.00000'); -- 1001 - SELECT DATE_TRUNC('MILLENNIUM', DATE '1970-03-20'); -- 1001-01-01 - date_trunc - ------------------------------ -- Thu Jan 01 00:00:00 1001 PST -+ Thu Jan 01 00:00:00 1001 LMT - (1 row) - - SELECT DATE_TRUNC('CENTURY', TIMESTAMP '1970-03-20 04:30:00.00000'); -- 1901 -@@ -1172,13 +1172,13 @@ SELECT DATE_TRUNC('CENTURY', DATE '2004-08-10'); -- 2001-01-01 - SELECT DATE_TRUNC('CENTURY', DATE '0002-02-04'); -- 0001-01-01 - date_trunc - ------------------------------ -- Mon Jan 01 00:00:00 0001 PST -+ Mon Jan 01 00:00:00 0001 LMT - (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 -+ Tue Jan 01 00:00:00 0100 LMT BC - (1 row) - - SELECT DATE_TRUNC('DECADE', DATE '1993-12-25'); -- 1990-01-01 -@@ -1190,13 +1190,13 @@ SELECT DATE_TRUNC('DECADE', DATE '1993-12-25'); -- 1990-01-01 - SELECT DATE_TRUNC('DECADE', DATE '0004-12-25'); -- 0001-01-01 BC - date_trunc - --------------------------------- -- Sat Jan 01 00:00:00 0001 PST BC -+ Sat Jan 01 00:00:00 0001 LMT 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 -+ Mon Jan 01 00:00:00 0011 LMT BC - (1 row) - - -- -diff --git a/src/test/regress/expected/horology.out b/src/test/regress/expected/horology.out -index 058b009eeeba4..aae78fd7a867f 100644 ---- a/src/test/regress/expected/horology.out -+++ b/src/test/regress/expected/horology.out -@@ -1,7 +1,18 @@ - -- - -- HOROLOGY - -- --SET DateStyle = 'Postgres, MDY'; -+SHOW TimeZone; -- Many of these tests depend on the prevailing settings -+ TimeZone -+--------------------- -+ America/Los_Angeles -+(1 row) -+ -+SHOW DateStyle; -+ DateStyle -+--------------- -+ Postgres, MDY -+(1 row) -+ - -- - -- Test various input formats - -- -@@ -759,12 +770,12 @@ SELECT '' AS "64", d1 + interval '1 year' AS one_year FROM TIMESTAMPTZ_TBL; - | 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 -+ | Thu Feb 16 17:32:01 0096 LMT BC -+ | Sun Feb 16 17:32:01 0098 LMT -+ | Fri Feb 16 17:32:01 0598 LMT -+ | Wed Feb 16 17:32:01 1098 LMT -+ | Sun Feb 16 17:32:01 1698 LMT -+ | Fri Feb 16 17:32:01 1798 LMT - | Wed Feb 16 17:32:01 1898 PST - | Mon Feb 16 17:32:01 1998 PST - | Sun Feb 16 17:32:01 2098 PST -@@ -830,12 +841,12 @@ SELECT '' AS "64", d1 - interval '1 year' AS one_year FROM TIMESTAMPTZ_TBL; - | 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 -+ | Mon Feb 16 17:32:01 0098 LMT BC -+ | Thu Feb 16 17:32:01 0096 LMT -+ | Tue Feb 16 17:32:01 0596 LMT -+ | Sun Feb 16 17:32:01 1096 LMT -+ | Thu Feb 16 17:32:01 1696 LMT -+ | Tue Feb 16 17:32:01 1796 LMT - | Sun Feb 16 17:32:01 1896 PST - | Fri Feb 16 17:32:01 1996 PST - | Thu Feb 16 17:32:01 2096 PST -@@ -2555,13 +2566,13 @@ RESET DateStyle; - SELECT to_timestamp('0097/Feb/16 --> 08:14:30', 'YYYY/Mon/DD --> HH:MI:SS'); - to_timestamp - ------------------------------ -- Sat Feb 16 08:14:30 0097 PST -+ Sat Feb 16 08:14:30 0097 LMT - (1 row) - - SELECT to_timestamp('97/2/16 8:14:30', 'FMYYYY/FMMM/FMDD FMHH:FMMI:FMSS'); - to_timestamp - ------------------------------ -- Sat Feb 16 08:14:30 0097 PST -+ Sat Feb 16 08:14:30 0097 LMT - (1 row) - - SELECT to_timestamp('2011$03!18 23_38_15', 'YYYY-MM-DD HH24:MI:SS'); -@@ -2598,7 +2609,7 @@ SELECT to_timestamp('My birthday-> Year: 1976, Month: May, Day: 16', - SELECT to_timestamp('1,582nd VIII 21', 'Y,YYYth FMRM DD'); - to_timestamp - ------------------------------ -- Sat Aug 21 00:00:00 1582 PST -+ Sat Aug 21 00:00:00 1582 LMT - (1 row) - - SELECT to_timestamp('15 "text between quote marks" 98 54 45', -@@ -2662,7 +2673,7 @@ SELECT to_timestamp('1997 AD 11 16', 'YYYY BC MM DD'); - SELECT to_timestamp('1997 BC 11 16', 'YYYY BC MM DD'); - to_timestamp - --------------------------------- -- Tue Nov 16 00:00:00 1997 PST BC -+ Tue Nov 16 00:00:00 1997 LMT BC - (1 row) - - SELECT to_timestamp('1997 A.D. 11 16', 'YYYY B.C. MM DD'); -@@ -2674,7 +2685,7 @@ SELECT to_timestamp('1997 A.D. 11 16', 'YYYY B.C. MM DD'); - SELECT to_timestamp('1997 B.C. 11 16', 'YYYY B.C. MM DD'); - to_timestamp - --------------------------------- -- Tue Nov 16 00:00:00 1997 PST BC -+ Tue Nov 16 00:00:00 1997 LMT BC - (1 row) - - SELECT to_timestamp('9-1116', 'Y-MMDD'); -@@ -2865,19 +2876,19 @@ SELECT to_date('-44-02-01 BC','YYYY-MM-DD BC'); - SELECT to_timestamp('44-02-01 11:12:13 BC','YYYY-MM-DD HH24:MI:SS BC'); - to_timestamp - --------------------------------- -- Fri Feb 01 11:12:13 0044 PST BC -+ Fri Feb 01 11:12:13 0044 LMT BC - (1 row) - - SELECT to_timestamp('-44-02-01 11:12:13','YYYY-MM-DD HH24:MI:SS'); - to_timestamp - --------------------------------- -- Fri Feb 01 11:12:13 0044 PST BC -+ Fri Feb 01 11:12:13 0044 LMT BC - (1 row) - - SELECT to_timestamp('-44-02-01 11:12:13 BC','YYYY-MM-DD HH24:MI:SS BC'); - to_timestamp - ------------------------------ -- Mon Feb 01 11:12:13 0044 PST -+ Mon Feb 01 11:12:13 0044 LMT - (1 row) - - -- -diff --git a/src/test/regress/expected/timestamptz.out b/src/test/regress/expected/timestamptz.out -index bc7879f288d1c..55efd18386881 100644 ---- a/src/test/regress/expected/timestamptz.out -+++ b/src/test/regress/expected/timestamptz.out -@@ -293,12 +293,12 @@ SELECT '' AS "64", d1 FROM TIMESTAMPTZ_TBL; - | 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 0097 LMT BC -+ | Sat Feb 16 17:32:01 0097 LMT -+ | Thu Feb 16 17:32:01 0597 LMT -+ | Tue Feb 16 17:32:01 1097 LMT -+ | Sat Feb 16 17:32:01 1697 LMT -+ | Thu Feb 16 17:32:01 1797 LMT - | Tue Feb 16 17:32:01 1897 PST - | Sun Feb 16 17:32:01 1997 PST - | Sat Feb 16 17:32:01 2097 PST -@@ -322,19 +322,19 @@ SELECT '' AS "64", d1 FROM TIMESTAMPTZ_TBL; - SELECT '4714-11-24 00:00:00+00 BC'::timestamptz; - timestamptz - --------------------------------- -- Sun Nov 23 16:00:00 4714 PST BC -+ Sun Nov 23 16:07:02 4714 LMT BC - (1 row) - - SELECT '4714-11-23 16:00:00-08 BC'::timestamptz; - timestamptz - --------------------------------- -- Sun Nov 23 16:00:00 4714 PST BC -+ Sun Nov 23 16:07:02 4714 LMT BC - (1 row) - - SELECT 'Sun Nov 23 16:00:00 4714 PST BC'::timestamptz; - timestamptz - --------------------------------- -- Sun Nov 23 16:00:00 4714 PST BC -+ Sun Nov 23 16:07:02 4714 LMT BC - (1 row) - - SELECT '4714-11-23 23:59:59+00 BC'::timestamptz; -- out of range -@@ -405,12 +405,12 @@ SELECT '' AS "15", d1 FROM TIMESTAMPTZ_TBL - ----+--------------------------------- - | -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 0097 LMT BC -+ | Sat Feb 16 17:32:01 0097 LMT -+ | Thu Feb 16 17:32:01 0597 LMT -+ | Tue Feb 16 17:32:01 1097 LMT -+ | Sat Feb 16 17:32:01 1697 LMT -+ | Thu Feb 16 17:32:01 1797 LMT - | Tue Feb 16 17:32:01 1897 PST - | Wed Feb 28 17:32:01 1996 PST - | Thu Feb 29 17:32:01 1996 PST -@@ -473,12 +473,12 @@ SELECT '' AS "63", d1 FROM TIMESTAMPTZ_TBL - | 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 0097 LMT BC -+ | Sat Feb 16 17:32:01 0097 LMT -+ | Thu Feb 16 17:32:01 0597 LMT -+ | Tue Feb 16 17:32:01 1097 LMT -+ | Sat Feb 16 17:32:01 1697 LMT -+ | Thu Feb 16 17:32:01 1797 LMT - | Tue Feb 16 17:32:01 1897 PST - | Sun Feb 16 17:32:01 1997 PST - | Sat Feb 16 17:32:01 2097 PST -@@ -505,12 +505,12 @@ SELECT '' AS "16", d1 FROM TIMESTAMPTZ_TBL - | -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 0097 LMT BC -+ | Sat Feb 16 17:32:01 0097 LMT -+ | Thu Feb 16 17:32:01 0597 LMT -+ | Tue Feb 16 17:32:01 1097 LMT -+ | Sat Feb 16 17:32:01 1697 LMT -+ | Thu Feb 16 17:32:01 1797 LMT - | Tue Feb 16 17:32:01 1897 PST - | Wed Feb 28 17:32:01 1996 PST - | Thu Feb 29 17:32:01 1996 PST -@@ -778,12 +778,12 @@ SELECT d1 as timestamptz, - 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 0097 LMT BC | -97 | 2 | 16 | 17 | 32 | 1 -+ Sat Feb 16 17:32:01 0097 LMT | 97 | 2 | 16 | 17 | 32 | 1 -+ Thu Feb 16 17:32:01 0597 LMT | 597 | 2 | 16 | 17 | 32 | 1 -+ Tue Feb 16 17:32:01 1097 LMT | 1097 | 2 | 16 | 17 | 32 | 1 -+ Sat Feb 16 17:32:01 1697 LMT | 1697 | 2 | 16 | 17 | 32 | 1 -+ Thu Feb 16 17:32:01 1797 LMT | 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 -@@ -852,12 +852,12 @@ SELECT d1 as timestamptz, - 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 0097 LMT BC | 1 | 1000 | 1000000 -+ Sat Feb 16 17:32:01 0097 LMT | 1 | 1000 | 1000000 -+ Thu Feb 16 17:32:01 0597 LMT | 1 | 1000 | 1000000 -+ Tue Feb 16 17:32:01 1097 LMT | 1 | 1000 | 1000000 -+ Sat Feb 16 17:32:01 1697 LMT | 1 | 1000 | 1000000 -+ Thu Feb 16 17:32:01 1797 LMT | 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 -@@ -927,12 +927,12 @@ SELECT d1 as timestamptz, - 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 0097 LMT BC | -97 | 7 | 2 | 2 | 47 -+ Sat Feb 16 17:32:01 0097 LMT | 97 | 7 | 6 | 6 | 47 -+ Thu Feb 16 17:32:01 0597 LMT | 597 | 7 | 4 | 4 | 47 -+ Tue Feb 16 17:32:01 1097 LMT | 1097 | 7 | 2 | 2 | 47 -+ Sat Feb 16 17:32:01 1697 LMT | 1697 | 7 | 6 | 6 | 47 -+ Thu Feb 16 17:32:01 1797 LMT | 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 -@@ -1003,12 +1003,12 @@ SELECT d1 as timestamptz, - Fri Feb 14 17:32:01 1997 PST | 199 | 20 | 2 | 2450495 - Sat Feb 15 17:32:01 1997 PST | 199 | 20 | 2 | 2450496 - Sun Feb 16 17:32:01 1997 PST | 199 | 20 | 2 | 2450497 -- Tue Feb 16 17:32:01 0097 PST BC | -10 | -1 | -1 | 1686043 -- Sat Feb 16 17:32:01 0097 PST | 9 | 1 | 1 | 1756537 -- Thu Feb 16 17:32:01 0597 PST | 59 | 6 | 1 | 1939158 -- Tue Feb 16 17:32:01 1097 PST | 109 | 11 | 2 | 2121779 -- Sat Feb 16 17:32:01 1697 PST | 169 | 17 | 2 | 2340925 -- Thu Feb 16 17:32:01 1797 PST | 179 | 18 | 2 | 2377449 -+ Tue Feb 16 17:32:01 0097 LMT BC | -10 | -1 | -1 | 1686043 -+ Sat Feb 16 17:32:01 0097 LMT | 9 | 1 | 1 | 1756537 -+ Thu Feb 16 17:32:01 0597 LMT | 59 | 6 | 1 | 1939158 -+ Tue Feb 16 17:32:01 1097 LMT | 109 | 11 | 2 | 2121779 -+ Sat Feb 16 17:32:01 1697 LMT | 169 | 17 | 2 | 2340925 -+ Thu Feb 16 17:32:01 1797 LMT | 179 | 18 | 2 | 2377449 - Tue Feb 16 17:32:01 1897 PST | 189 | 19 | 2 | 2413973 - Sun Feb 16 17:32:01 1997 PST | 199 | 20 | 2 | 2450497 - Sat Feb 16 17:32:01 2097 PST | 209 | 21 | 3 | 2487022 -@@ -1033,74 +1033,74 @@ SELECT d1 as timestamptz, - 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 -+ 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 LMT BC | -28378 | -7 | -52.96666666666664 -+ Sat Feb 16 17:32:01 0097 LMT | -28378 | -7 | -52.96666666666664 -+ Thu Feb 16 17:32:01 0597 LMT | -28378 | -7 | -52.96666666666664 -+ Tue Feb 16 17:32:01 1097 LMT | -28378 | -7 | -52.96666666666664 -+ Sat Feb 16 17:32:01 1697 LMT | -28378 | -7 | -52.96666666666664 -+ Thu Feb 16 17:32:01 1797 LMT | -28378 | -7 | -52.96666666666664 -+ 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) - - -- TO_CHAR() -@@ -1973,7 +1973,7 @@ INSERT INTO TIMESTAMPTZ_TST VALUES(4, '1000000312 23:58:48 IST'); - SELECT * FROM TIMESTAMPTZ_TST ORDER BY a; - a | b - ---+-------------------------------- -- 1 | Wed Mar 12 13:58:48 1000 PST -+ 1 | Wed Mar 12 14:05:50 1000 LMT - 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 -@@ -2084,7 +2084,14 @@ SELECT make_timestamptz(2008, 12, 10, 10, 10, 10, 'EDT'); - Wed Dec 10 09:10:10 2008 EST - (1 row) - --SELECT make_timestamptz(2014, 12, 10, 10, 10, 10, 'PST8PDT'); -+SELECT make_timestamptz(2014, 12, 10, 10, 10, 10, 'FOO8BAR'); -+ make_timestamptz -+------------------------------ -+ Wed Dec 10 13:10:10 2014 EST -+(1 row) -+ -+-- POSIX -+SELECT make_timestamptz(2014, 12, 10, 10, 10, 10, 'PST8PDT,M3.2.0,M11.1.0'); - make_timestamptz - ------------------------------ - Wed Dec 10 13:10:10 2014 EST -diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c -index 91f0d08ea0a8b..5fa18e2a34b35 100644 ---- a/src/test/regress/pg_regress.c -+++ b/src/test/regress/pg_regress.c -@@ -778,7 +778,7 @@ initialize_environment(void) - /* - * Set timezone and datestyle for datetime-related tests - */ -- putenv("PGTZ=PST8PDT"); -+ putenv("PGTZ=America/Los_Angeles"); - putenv("PGDATESTYLE=Postgres, MDY"); - - /* -diff --git a/src/test/regress/sql/horology.sql b/src/test/regress/sql/horology.sql -index b647f63c2bae4..94b7f31583d7a 100644 ---- a/src/test/regress/sql/horology.sql -+++ b/src/test/regress/sql/horology.sql -@@ -1,7 +1,9 @@ - -- - -- HOROLOGY - -- --SET DateStyle = 'Postgres, MDY'; -+ -+SHOW TimeZone; -- Many of these tests depend on the prevailing settings -+SHOW DateStyle; - - -- - -- Test various input formats -diff --git a/src/test/regress/sql/timestamptz.sql b/src/test/regress/sql/timestamptz.sql -index dd22c3296c854..b0536e79cd645 100644 ---- a/src/test/regress/sql/timestamptz.sql -+++ b/src/test/regress/sql/timestamptz.sql -@@ -330,7 +330,10 @@ SELECT make_timestamptz(1910, 12, 24, 0, 0, 0, 'Nehwon/Lankhmar'); - -- abbreviations - SELECT make_timestamptz(2008, 12, 10, 10, 10, 10, 'EST'); - SELECT make_timestamptz(2008, 12, 10, 10, 10, 10, 'EDT'); --SELECT make_timestamptz(2014, 12, 10, 10, 10, 10, 'PST8PDT'); -+SELECT make_timestamptz(2014, 12, 10, 10, 10, 10, 'FOO8BAR'); -+ -+-- POSIX -+SELECT make_timestamptz(2014, 12, 10, 10, 10, 10, 'PST8PDT,M3.2.0,M11.1.0'); - - RESET TimeZone; - diff --git a/postgresql12.changes b/postgresql12.changes index 5f28103..ac6670e 100644 --- a/postgresql12.changes +++ b/postgresql12.changes @@ -1,9 +1,23 @@ +------------------------------------------------------------------- +Wed Nov 13 12:11:46 UTC 2024 - Reinhard Max + +- Upgrade to 12.21: + * CVE-2024-10976, bsc#1233323: Ensure cached plans are marked as + dependent on the calling role when RLS applies to a + non-top-level table reference. + * CVE-2024-10977, bsc#1233325: Make libpq discard error messages + received during SSL or GSS protocol negotiation. + * CVE-2024-10978, bsc#1233326: Fix unintended interactions + between SET SESSION AUTHORIZATION and SET ROLE + * CVE-2024-10979, bsc#1233327: Prevent trusted PL/Perl code from + changing environment variables. + * https://www.postgresql.org/about/news/p-2955/ + * https://www.postgresql.org/docs/release/12.21/ + ------------------------------------------------------------------- Tue Nov 5 14:02:55 UTC 2024 - Reinhard Max - Sync spec file from postgresql17. -- Pull upstream patch to fix tests with timezone 2024b - * postgresql-testsuite-timezone-fix.patch ------------------------------------------------------------------- Sat Aug 10 14:14:40 UTC 2024 - Marcus Rueckert @@ -11,7 +25,7 @@ Sat Aug 10 14:14:40 UTC 2024 - Marcus Rueckert - Upgrade to 12.20 (bsc#1229013): * bsc#1229013, CVE-2024-7348 PostgreSQL relation replacement during pg_dump executes arbitrary SQL - * https://www.postgresql.org/about/news/postgresql-164-158-1413-1316-1220-and-17-beta-3-released-2910/ + * https://www.postgresql.org/about/news/p-2910/ * https://www.postgresql.org/docs/release/12.20/ ------------------------------------------------------------------- diff --git a/postgresql12.spec b/postgresql12.spec index bd7d681..32e0b48 100644 --- a/postgresql12.spec +++ b/postgresql12.spec @@ -16,7 +16,7 @@ # -%define pgversion 12.20 +%define pgversion 12.21 %define pgmajor 12 %define buildlibs 0 %define tarversion %{pgversion} @@ -190,7 +190,6 @@ Patch9: postgresql-var-run-socket.patch Patch10: postgresql-llvm-optional.patch Patch11: 0001-jit-Workaround-potential-datalayout-mismatch-on-s390.patch %endif -Patch12: postgresql-testsuite-timezone-fix.patch URL: https://www.postgresql.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-build Provides: postgresql = %version-%release @@ -525,7 +524,6 @@ touch -r configure tmp %patch -P 10 %patch -P 11 %endif -%patch -P 12 -p 1 touch -r tmp configure rm tmp find src/test/ -name '*.orig' -delete