pgsql: Refactor timestamp2timestamptz_opt_error()
Refactor timestamp2timestamptz_opt_error() While casting from timestamp to timestamptz we do timestamp2tm() then tm2timestamp(). This commit eliminates call to tm2timestamp(). Instead, it directly applies timezone offset to the original timestamp value. That makes upcoming datetime overflow handling in jsonpath easier. That should also save us some CPU cycles. Discussion: https://postgr.es/m/CAPpHfdvRPRh_mTGar5WmDeRZ%3DU5dOXHdxspYYD%3D76m3knNGjXA%40mail.gmail.com Author: Alexander Korotkov Reviewed-by: Tom Lane Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/a6888fde7f0dbe865559b31ba2ce01ac1150debe Modified Files -- src/backend/utils/adt/timestamp.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-)
pgsql: Refactor jsonpath's compareDatetime()
Refactor jsonpath's compareDatetime() This commit refactors come ridiculous coding in compareDatetime(). Also, it provides correct cross-datatype comparison even when one of values overflows during cast. That eliminates dilemma on whether we should suppress overflow errors during cast. Reported-by: Tom Lane Discussion: https://postgr.es/m/32308.1569455803%40sss.pgh.pa.us Discussion: https://postgr.es/m/a5629d0c-8162-7559-16aa-0c8390d6ba5f%40postgrespro.ru Author: Nikita Glukhov, Alexander Korotkov Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/52ad1e659967896ed153185328ffe806d69abcb6 Modified Files -- src/backend/utils/adt/date.c | 40 ++-- src/backend/utils/adt/jsonpath_exec.c| 262 +-- src/backend/utils/adt/timestamp.c| 31 ++-- src/include/utils/date.h | 4 +- src/include/utils/timestamp.h| 4 +- src/test/regress/expected/jsonb_jsonpath.out | 37 ++-- src/test/regress/sql/jsonb_jsonpath.sql | 3 + 7 files changed, 237 insertions(+), 144 deletions(-)
pgsql: Deal with yet another issue related to "Norwegian (Bokmål)" loca
Deal with yet another issue related to "Norwegian (Bokmål)" locale. It emerges that recent versions of Windows (at least 2016 Standard) spell this locale name as "Norwegian Bokmål_Norway.1252", defeating our mapping code that translates "Norwegian (Bokmål)_Norway" to something that's all-ASCII (cf commits db29620d4 and aa1d2fc5e). Add another mapping entry to handle this spelling. Per bug #16068 from Robert Ford. Like the previous patches, back-patch to all supported branches. Discussion: https://postgr.es/m/16068-4cb6eeaa7eb46...@postgresql.org Branch -- REL9_6_STABLE Details --- https://git.postgresql.org/pg/commitdiff/185253ab847b95c793e3bae861611ae07a06d7c4 Modified Files -- src/port/win32setlocale.c | 4 1 file changed, 4 insertions(+)
pgsql: Deal with yet another issue related to "Norwegian (Bokmål)" loca
Deal with yet another issue related to "Norwegian (Bokmål)" locale. It emerges that recent versions of Windows (at least 2016 Standard) spell this locale name as "Norwegian Bokmål_Norway.1252", defeating our mapping code that translates "Norwegian (Bokmål)_Norway" to something that's all-ASCII (cf commits db29620d4 and aa1d2fc5e). Add another mapping entry to handle this spelling. Per bug #16068 from Robert Ford. Like the previous patches, back-patch to all supported branches. Discussion: https://postgr.es/m/16068-4cb6eeaa7eb46...@postgresql.org Branch -- REL9_4_STABLE Details --- https://git.postgresql.org/pg/commitdiff/fedcab352355e57eafcec9b99a048b86a865a528 Modified Files -- src/port/win32setlocale.c | 4 1 file changed, 4 insertions(+)
pgsql: Deal with yet another issue related to "Norwegian (Bokmål)" loca
Deal with yet another issue related to "Norwegian (Bokmål)" locale. It emerges that recent versions of Windows (at least 2016 Standard) spell this locale name as "Norwegian Bokmål_Norway.1252", defeating our mapping code that translates "Norwegian (Bokmål)_Norway" to something that's all-ASCII (cf commits db29620d4 and aa1d2fc5e). Add another mapping entry to handle this spelling. Per bug #16068 from Robert Ford. Like the previous patches, back-patch to all supported branches. Discussion: https://postgr.es/m/16068-4cb6eeaa7eb46...@postgresql.org Branch -- REL9_5_STABLE Details --- https://git.postgresql.org/pg/commitdiff/e3267407e2f9c30b6c94da25da8ba078dc144702 Modified Files -- src/port/win32setlocale.c | 4 1 file changed, 4 insertions(+)
pgsql: Deal with yet another issue related to "Norwegian (Bokmål)" loca
Deal with yet another issue related to "Norwegian (Bokmål)" locale. It emerges that recent versions of Windows (at least 2016 Standard) spell this locale name as "Norwegian Bokmål_Norway.1252", defeating our mapping code that translates "Norwegian (Bokmål)_Norway" to something that's all-ASCII (cf commits db29620d4 and aa1d2fc5e). Add another mapping entry to handle this spelling. Per bug #16068 from Robert Ford. Like the previous patches, back-patch to all supported branches. Discussion: https://postgr.es/m/16068-4cb6eeaa7eb46...@postgresql.org Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/a05a04d0edb45f5c9b014eada9619141314c815f Modified Files -- src/port/win32setlocale.c | 4 1 file changed, 4 insertions(+)
pgsql: Deal with yet another issue related to "Norwegian (Bokmål)" loca
Deal with yet another issue related to "Norwegian (Bokmål)" locale. It emerges that recent versions of Windows (at least 2016 Standard) spell this locale name as "Norwegian Bokmål_Norway.1252", defeating our mapping code that translates "Norwegian (Bokmål)_Norway" to something that's all-ASCII (cf commits db29620d4 and aa1d2fc5e). Add another mapping entry to handle this spelling. Per bug #16068 from Robert Ford. Like the previous patches, back-patch to all supported branches. Discussion: https://postgr.es/m/16068-4cb6eeaa7eb46...@postgresql.org Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff/4f2ad52269750c9f04121251a23e7f6ed1fb911c Modified Files -- src/port/win32setlocale.c | 4 1 file changed, 4 insertions(+)
pgsql: Deal with yet another issue related to "Norwegian (Bokmål)" loca
Deal with yet another issue related to "Norwegian (Bokmål)" locale. It emerges that recent versions of Windows (at least 2016 Standard) spell this locale name as "Norwegian Bokmål_Norway.1252", defeating our mapping code that translates "Norwegian (Bokmål)_Norway" to something that's all-ASCII (cf commits db29620d4 and aa1d2fc5e). Add another mapping entry to handle this spelling. Per bug #16068 from Robert Ford. Like the previous patches, back-patch to all supported branches. Discussion: https://postgr.es/m/16068-4cb6eeaa7eb46...@postgresql.org Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/aebe3ef0e4b32ba2ee0af062d20eedb914d5e2bc Modified Files -- src/port/win32setlocale.c | 4 1 file changed, 4 insertions(+)
pgsql: Deal with yet another issue related to "Norwegian (Bokmål)" loca
Deal with yet another issue related to "Norwegian (Bokmål)" locale. It emerges that recent versions of Windows (at least 2016 Standard) spell this locale name as "Norwegian Bokmål_Norway.1252", defeating our mapping code that translates "Norwegian (Bokmål)_Norway" to something that's all-ASCII (cf commits db29620d4 and aa1d2fc5e). Add another mapping entry to handle this spelling. Per bug #16068 from Robert Ford. Like the previous patches, back-patch to all supported branches. Discussion: https://postgr.es/m/16068-4cb6eeaa7eb46...@postgresql.org Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/db477b691dc4e80bc8379d976ef53a0aa0afe4c0 Modified Files -- src/port/win32setlocale.c | 4 1 file changed, 4 insertions(+)
pgsql: Select CFLAGS_SL at configure time, not in platform-specific Mak
Select CFLAGS_SL at configure time, not in platform-specific Makefiles. Move the platform-dependent logic that sets CFLAGS_SL from src/makefiles/Makefile.foo to src/template/foo, so that the value is determined at configure time and thus is available while running configure's tests. On a couple of platforms this might save a few microseconds of build time by eliminating a test that make otherwise has to do over and over. Otherwise it's pretty much a wash for build purposes; in particular, this makes no difference to anyone who might be overriding CFLAGS_SL via a make option. This patch in itself does nothing with the value and thus should not change any behavior, though you'll probably have to re-run configure to get a correctly updated Makefile.global. We'll use the new configure variable in a follow-on patch. Per gripe from Kyotaro Horiguchi. Back-patch to all supported branches, because the follow-on patch is a portability bug fix. Discussion: https://postgr.es/m/20191010.144533.263180400.horikyota@gmail.com Branch -- REL9_5_STABLE Details --- https://git.postgresql.org/pg/commitdiff/11330c311a1770447b76d42f20ede68d28e0ee87 Modified Files -- configure | 5 - configure.in| 5 - src/Makefile.global.in | 1 + src/makefiles/Makefile.cygwin | 1 - src/makefiles/Makefile.freebsd | 2 -- src/makefiles/Makefile.hpux | 5 - src/makefiles/Makefile.linux| 2 -- src/makefiles/Makefile.netbsd | 2 -- src/makefiles/Makefile.openbsd | 2 -- src/makefiles/Makefile.sco | 6 +- src/makefiles/Makefile.solaris | 6 +- src/makefiles/Makefile.unixware | 6 +- src/makefiles/Makefile.win32| 1 - src/template/aix| 5 + src/template/cygwin | 3 +++ src/template/darwin | 3 +++ src/template/freebsd| 3 +++ src/template/hpux | 7 +++ src/template/linux | 3 +++ src/template/netbsd | 3 +++ src/template/openbsd| 4 src/template/sco| 9 + src/template/solaris| 9 + src/template/unixware | 9 + src/template/win32 | 3 +++ 25 files changed, 73 insertions(+), 32 deletions(-)
pgsql: Use CFLAGS_SL while probing linkability of libperl.
Use CFLAGS_SL while probing linkability of libperl. On recent Red Hat platforms (at least RHEL 8 and Fedora 30, maybe older), configure's probe for libperl failed if the user forces CFLAGS to be -O0. This is because some code in perl's inline.h fails to be optimized away at -O0, and said code doesn't work if compiled without -fPIC. To fix, add CFLAGS_SL to the compile flags used during the libperl probe. This is a better simulation of the way that plperl is built, anyway, so it might forestall other issues in future. Per gripe from Kyotaro Horiguchi. Back-patch to all supported branches, since people might want to build older branches on these platforms. Discussion: https://postgr.es/m/20191010.144533.263180400.horikyota@gmail.com Branch -- REL9_6_STABLE Details --- https://git.postgresql.org/pg/commitdiff/34621cb12098d28010d8360b7e342739ef6de625 Modified Files -- configure| 5 + configure.in | 5 + 2 files changed, 10 insertions(+)
pgsql: Select CFLAGS_SL at configure time, not in platform-specific Mak
Select CFLAGS_SL at configure time, not in platform-specific Makefiles. Move the platform-dependent logic that sets CFLAGS_SL from src/makefiles/Makefile.foo to src/template/foo, so that the value is determined at configure time and thus is available while running configure's tests. On a couple of platforms this might save a few microseconds of build time by eliminating a test that make otherwise has to do over and over. Otherwise it's pretty much a wash for build purposes; in particular, this makes no difference to anyone who might be overriding CFLAGS_SL via a make option. This patch in itself does nothing with the value and thus should not change any behavior, though you'll probably have to re-run configure to get a correctly updated Makefile.global. We'll use the new configure variable in a follow-on patch. Per gripe from Kyotaro Horiguchi. Back-patch to all supported branches, because the follow-on patch is a portability bug fix. Discussion: https://postgr.es/m/20191010.144533.263180400.horikyota@gmail.com Branch -- REL9_4_STABLE Details --- https://git.postgresql.org/pg/commitdiff/727c2ccfefb5d8b77316902bce2427b7864be997 Modified Files -- configure | 5 - configure.in| 5 - src/Makefile.global.in | 1 + src/makefiles/Makefile.cygwin | 1 - src/makefiles/Makefile.freebsd | 2 -- src/makefiles/Makefile.hpux | 5 - src/makefiles/Makefile.linux| 2 -- src/makefiles/Makefile.netbsd | 2 -- src/makefiles/Makefile.openbsd | 2 -- src/makefiles/Makefile.osf | 2 +- src/makefiles/Makefile.sco | 6 +- src/makefiles/Makefile.solaris | 6 +- src/makefiles/Makefile.unixware | 6 +- src/makefiles/Makefile.win32| 1 - src/template/aix| 5 + src/template/cygwin | 3 +++ src/template/darwin | 3 +++ src/template/freebsd| 3 +++ src/template/hpux | 7 +++ src/template/linux | 3 +++ src/template/netbsd | 3 +++ src/template/openbsd| 4 src/template/osf| 3 +++ src/template/sco| 9 + src/template/solaris| 9 + src/template/unixware | 9 + src/template/win32 | 3 +++ 27 files changed, 77 insertions(+), 33 deletions(-)
pgsql: Use CFLAGS_SL while probing linkability of libperl.
Use CFLAGS_SL while probing linkability of libperl. On recent Red Hat platforms (at least RHEL 8 and Fedora 30, maybe older), configure's probe for libperl failed if the user forces CFLAGS to be -O0. This is because some code in perl's inline.h fails to be optimized away at -O0, and said code doesn't work if compiled without -fPIC. To fix, add CFLAGS_SL to the compile flags used during the libperl probe. This is a better simulation of the way that plperl is built, anyway, so it might forestall other issues in future. Per gripe from Kyotaro Horiguchi. Back-patch to all supported branches, since people might want to build older branches on these platforms. Discussion: https://postgr.es/m/20191010.144533.263180400.horikyota@gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/d995fd667f6d22307864afe18ae91950b23b5b53 Modified Files -- configure| 5 + configure.in | 5 + 2 files changed, 10 insertions(+)
pgsql: Select CFLAGS_SL at configure time, not in platform-specific Mak
Select CFLAGS_SL at configure time, not in platform-specific Makefiles. Move the platform-dependent logic that sets CFLAGS_SL from src/makefiles/Makefile.foo to src/template/foo, so that the value is determined at configure time and thus is available while running configure's tests. On a couple of platforms this might save a few microseconds of build time by eliminating a test that make otherwise has to do over and over. Otherwise it's pretty much a wash for build purposes; in particular, this makes no difference to anyone who might be overriding CFLAGS_SL via a make option. This patch in itself does nothing with the value and thus should not change any behavior, though you'll probably have to re-run configure to get a correctly updated Makefile.global. We'll use the new configure variable in a follow-on patch. Per gripe from Kyotaro Horiguchi. Back-patch to all supported branches, because the follow-on patch is a portability bug fix. Discussion: https://postgr.es/m/20191010.144533.263180400.horikyota@gmail.com Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/e167b1ae37ad0dad985b843c6ba654c3619ced26 Modified Files -- configure | 5 - configure.in | 5 - src/Makefile.global.in | 1 + src/makefiles/Makefile.cygwin | 1 - src/makefiles/Makefile.freebsd | 2 -- src/makefiles/Makefile.hpux| 5 - src/makefiles/Makefile.linux | 2 -- src/makefiles/Makefile.netbsd | 2 -- src/makefiles/Makefile.openbsd | 2 -- src/makefiles/Makefile.solaris | 6 +- src/makefiles/Makefile.win32 | 1 - src/template/aix | 5 + src/template/cygwin| 3 +++ src/template/darwin| 3 +++ src/template/freebsd | 3 +++ src/template/hpux | 7 +++ src/template/linux | 3 +++ src/template/netbsd| 3 +++ src/template/openbsd | 4 src/template/solaris | 9 + src/template/win32 | 3 +++ 21 files changed, 53 insertions(+), 22 deletions(-)
pgsql: Use CFLAGS_SL while probing linkability of libperl.
Use CFLAGS_SL while probing linkability of libperl. On recent Red Hat platforms (at least RHEL 8 and Fedora 30, maybe older), configure's probe for libperl failed if the user forces CFLAGS to be -O0. This is because some code in perl's inline.h fails to be optimized away at -O0, and said code doesn't work if compiled without -fPIC. To fix, add CFLAGS_SL to the compile flags used during the libperl probe. This is a better simulation of the way that plperl is built, anyway, so it might forestall other issues in future. Per gripe from Kyotaro Horiguchi. Back-patch to all supported branches, since people might want to build older branches on these platforms. Discussion: https://postgr.es/m/20191010.144533.263180400.horikyota@gmail.com Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff/ca658c91ae724c0a093a039813666705ef0bcfa4 Modified Files -- configure| 5 + configure.in | 5 + 2 files changed, 10 insertions(+)
pgsql: Use CFLAGS_SL while probing linkability of libperl.
Use CFLAGS_SL while probing linkability of libperl. On recent Red Hat platforms (at least RHEL 8 and Fedora 30, maybe older), configure's probe for libperl failed if the user forces CFLAGS to be -O0. This is because some code in perl's inline.h fails to be optimized away at -O0, and said code doesn't work if compiled without -fPIC. To fix, add CFLAGS_SL to the compile flags used during the libperl probe. This is a better simulation of the way that plperl is built, anyway, so it might forestall other issues in future. Per gripe from Kyotaro Horiguchi. Back-patch to all supported branches, since people might want to build older branches on these platforms. Discussion: https://postgr.es/m/20191010.144533.263180400.horikyota@gmail.com Branch -- REL9_5_STABLE Details --- https://git.postgresql.org/pg/commitdiff/8835e0bd4e2d08f4930122cfc4268c8f6ea443b6 Modified Files -- configure| 5 + configure.in | 5 + 2 files changed, 10 insertions(+)
pgsql: Use CFLAGS_SL while probing linkability of libperl.
Use CFLAGS_SL while probing linkability of libperl. On recent Red Hat platforms (at least RHEL 8 and Fedora 30, maybe older), configure's probe for libperl failed if the user forces CFLAGS to be -O0. This is because some code in perl's inline.h fails to be optimized away at -O0, and said code doesn't work if compiled without -fPIC. To fix, add CFLAGS_SL to the compile flags used during the libperl probe. This is a better simulation of the way that plperl is built, anyway, so it might forestall other issues in future. Per gripe from Kyotaro Horiguchi. Back-patch to all supported branches, since people might want to build older branches on these platforms. Discussion: https://postgr.es/m/20191010.144533.263180400.horikyota@gmail.com Branch -- REL9_4_STABLE Details --- https://git.postgresql.org/pg/commitdiff/6d2b18d0701ba5637a149467478a4c68af0a0a43 Modified Files -- configure| 5 + configure.in | 5 + 2 files changed, 10 insertions(+)
pgsql: Use CFLAGS_SL while probing linkability of libperl.
Use CFLAGS_SL while probing linkability of libperl. On recent Red Hat platforms (at least RHEL 8 and Fedora 30, maybe older), configure's probe for libperl failed if the user forces CFLAGS to be -O0. This is because some code in perl's inline.h fails to be optimized away at -O0, and said code doesn't work if compiled without -fPIC. To fix, add CFLAGS_SL to the compile flags used during the libperl probe. This is a better simulation of the way that plperl is built, anyway, so it might forestall other issues in future. Per gripe from Kyotaro Horiguchi. Back-patch to all supported branches, since people might want to build older branches on these platforms. Discussion: https://postgr.es/m/20191010.144533.263180400.horikyota@gmail.com Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/4e19bd41d965b3b3fc9b2fc0022a968a71fbceff Modified Files -- configure| 5 + configure.in | 5 + 2 files changed, 10 insertions(+)
pgsql: Select CFLAGS_SL at configure time, not in platform-specific Mak
Select CFLAGS_SL at configure time, not in platform-specific Makefiles. Move the platform-dependent logic that sets CFLAGS_SL from src/makefiles/Makefile.foo to src/template/foo, so that the value is determined at configure time and thus is available while running configure's tests. On a couple of platforms this might save a few microseconds of build time by eliminating a test that make otherwise has to do over and over. Otherwise it's pretty much a wash for build purposes; in particular, this makes no difference to anyone who might be overriding CFLAGS_SL via a make option. This patch in itself does nothing with the value and thus should not change any behavior, though you'll probably have to re-run configure to get a correctly updated Makefile.global. We'll use the new configure variable in a follow-on patch. Per gripe from Kyotaro Horiguchi. Back-patch to all supported branches, because the follow-on patch is a portability bug fix. Discussion: https://postgr.es/m/20191010.144533.263180400.horikyota@gmail.com Branch -- REL9_6_STABLE Details --- https://git.postgresql.org/pg/commitdiff/62ca50ad7ad05fbbc053a4e3687a6e4edb711049 Modified Files -- configure | 5 - configure.in| 5 - src/Makefile.global.in | 1 + src/makefiles/Makefile.cygwin | 1 - src/makefiles/Makefile.freebsd | 2 -- src/makefiles/Makefile.hpux | 5 - src/makefiles/Makefile.linux| 2 -- src/makefiles/Makefile.netbsd | 2 -- src/makefiles/Makefile.openbsd | 2 -- src/makefiles/Makefile.sco | 6 +- src/makefiles/Makefile.solaris | 6 +- src/makefiles/Makefile.unixware | 6 +- src/makefiles/Makefile.win32| 1 - src/template/aix| 5 + src/template/cygwin | 3 +++ src/template/darwin | 3 +++ src/template/freebsd| 3 +++ src/template/hpux | 7 +++ src/template/linux | 3 +++ src/template/netbsd | 3 +++ src/template/openbsd| 4 src/template/sco| 9 + src/template/solaris| 9 + src/template/unixware | 9 + src/template/win32 | 3 +++ 25 files changed, 73 insertions(+), 32 deletions(-)
pgsql: Select CFLAGS_SL at configure time, not in platform-specific Mak
Select CFLAGS_SL at configure time, not in platform-specific Makefiles. Move the platform-dependent logic that sets CFLAGS_SL from src/makefiles/Makefile.foo to src/template/foo, so that the value is determined at configure time and thus is available while running configure's tests. On a couple of platforms this might save a few microseconds of build time by eliminating a test that make otherwise has to do over and over. Otherwise it's pretty much a wash for build purposes; in particular, this makes no difference to anyone who might be overriding CFLAGS_SL via a make option. This patch in itself does nothing with the value and thus should not change any behavior, though you'll probably have to re-run configure to get a correctly updated Makefile.global. We'll use the new configure variable in a follow-on patch. Per gripe from Kyotaro Horiguchi. Back-patch to all supported branches, because the follow-on patch is a portability bug fix. Discussion: https://postgr.es/m/20191010.144533.263180400.horikyota@gmail.com Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff/aa5bb828af5387e154a122b1b43ee873d92497a0 Modified Files -- configure | 7 --- configure.in | 9 ++--- src/Makefile.global.in | 1 + src/makefiles/Makefile.cygwin | 1 - src/makefiles/Makefile.freebsd | 2 -- src/makefiles/Makefile.hpux| 5 - src/makefiles/Makefile.linux | 2 -- src/makefiles/Makefile.netbsd | 2 -- src/makefiles/Makefile.openbsd | 2 -- src/makefiles/Makefile.solaris | 6 +- src/makefiles/Makefile.win32 | 1 - src/template/aix | 5 + src/template/cygwin| 3 +++ src/template/darwin| 3 +++ src/template/freebsd | 3 +++ src/template/hpux | 7 +++ src/template/linux | 3 +++ src/template/netbsd| 3 +++ src/template/openbsd | 4 src/template/solaris | 9 + src/template/win32 | 3 +++ 21 files changed, 55 insertions(+), 26 deletions(-)
pgsql: Use CFLAGS_SL while probing linkability of libperl.
Use CFLAGS_SL while probing linkability of libperl. On recent Red Hat platforms (at least RHEL 8 and Fedora 30, maybe older), configure's probe for libperl failed if the user forces CFLAGS to be -O0. This is because some code in perl's inline.h fails to be optimized away at -O0, and said code doesn't work if compiled without -fPIC. To fix, add CFLAGS_SL to the compile flags used during the libperl probe. This is a better simulation of the way that plperl is built, anyway, so it might forestall other issues in future. Per gripe from Kyotaro Horiguchi. Back-patch to all supported branches, since people might want to build older branches on these platforms. Discussion: https://postgr.es/m/20191010.144533.263180400.horikyota@gmail.com Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/328b81348cc87e2fbcbe5980619a565604343949 Modified Files -- configure| 5 + configure.in | 5 + 2 files changed, 10 insertions(+)
pgsql: Select CFLAGS_SL at configure time, not in platform-specific Mak
Select CFLAGS_SL at configure time, not in platform-specific Makefiles. Move the platform-dependent logic that sets CFLAGS_SL from src/makefiles/Makefile.foo to src/template/foo, so that the value is determined at configure time and thus is available while running configure's tests. On a couple of platforms this might save a few microseconds of build time by eliminating a test that make otherwise has to do over and over. Otherwise it's pretty much a wash for build purposes; in particular, this makes no difference to anyone who might be overriding CFLAGS_SL via a make option. This patch in itself does nothing with the value and thus should not change any behavior, though you'll probably have to re-run configure to get a correctly updated Makefile.global. We'll use the new configure variable in a follow-on patch. Per gripe from Kyotaro Horiguchi. Back-patch to all supported branches, because the follow-on patch is a portability bug fix. Discussion: https://postgr.es/m/20191010.144533.263180400.horikyota@gmail.com Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/99c51d5ed88c92db7d9b61b3c53c3d1eea32f9ec Modified Files -- configure | 7 --- configure.in | 9 ++--- src/Makefile.global.in | 1 + src/makefiles/Makefile.cygwin | 1 - src/makefiles/Makefile.freebsd | 2 -- src/makefiles/Makefile.hpux| 5 - src/makefiles/Makefile.linux | 2 -- src/makefiles/Makefile.netbsd | 2 -- src/makefiles/Makefile.openbsd | 2 -- src/makefiles/Makefile.solaris | 6 +- src/makefiles/Makefile.win32 | 1 - src/template/aix | 5 + src/template/cygwin| 3 +++ src/template/darwin| 3 +++ src/template/freebsd | 3 +++ src/template/hpux | 7 +++ src/template/linux | 3 +++ src/template/netbsd| 3 +++ src/template/openbsd | 4 src/template/solaris | 9 + src/template/win32 | 3 +++ 21 files changed, 55 insertions(+), 26 deletions(-)
pgsql: Select CFLAGS_SL at configure time, not in platform-specific Mak
Select CFLAGS_SL at configure time, not in platform-specific Makefiles. Move the platform-dependent logic that sets CFLAGS_SL from src/makefiles/Makefile.foo to src/template/foo, so that the value is determined at configure time and thus is available while running configure's tests. On a couple of platforms this might save a few microseconds of build time by eliminating a test that make otherwise has to do over and over. Otherwise it's pretty much a wash for build purposes; in particular, this makes no difference to anyone who might be overriding CFLAGS_SL via a make option. This patch in itself does nothing with the value and thus should not change any behavior, though you'll probably have to re-run configure to get a correctly updated Makefile.global. We'll use the new configure variable in a follow-on patch. Per gripe from Kyotaro Horiguchi. Back-patch to all supported branches, because the follow-on patch is a portability bug fix. Discussion: https://postgr.es/m/20191010.144533.263180400.horikyota@gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/44273ce4f664a1bb34ef8ea9359237344cd6aaec Modified Files -- configure | 7 --- configure.in | 9 ++--- src/Makefile.global.in | 1 + src/makefiles/Makefile.cygwin | 1 - src/makefiles/Makefile.freebsd | 2 -- src/makefiles/Makefile.hpux| 5 - src/makefiles/Makefile.linux | 2 -- src/makefiles/Makefile.netbsd | 2 -- src/makefiles/Makefile.openbsd | 2 -- src/makefiles/Makefile.solaris | 6 +- src/makefiles/Makefile.win32 | 1 - src/template/aix | 5 + src/template/cygwin| 3 +++ src/template/darwin| 3 +++ src/template/freebsd | 3 +++ src/template/hpux | 7 +++ src/template/linux | 3 +++ src/template/netbsd| 3 +++ src/template/openbsd | 4 src/template/solaris | 9 + src/template/win32 | 3 +++ 21 files changed, 55 insertions(+), 26 deletions(-)
pgsql: Update obsolete comment.
Update obsolete comment. Commit b52b7dc25, which moved code creating PartitionBoundInfo in RelationBuildPartitionDesc() in partcache.c (relocated to partdesc.c afterwards) to partbounds.c, should have updated this, but didn't. Author: Etsuro Fujita Reviewed-by: Alvaro Herrera Backpatch-through: 12 Discussion: https://postgr.es/m/CAPmGK16Uxr%3DPatiGyaRwiQVLB7Y-GqbkK3AxRLVYzU0Czv%3DsEw%40mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/80831bcdbe80a6ca7f22105e32c2cbb54e125c4c Modified Files -- src/backend/partitioning/partbounds.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
pgsql: Update obsolete comment.
Update obsolete comment. Commit b52b7dc25, which moved code creating PartitionBoundInfo in RelationBuildPartitionDesc() in partcache.c (relocated to partdesc.c afterwards) to partbounds.c, should have updated this, but didn't. Author: Etsuro Fujita Reviewed-by: Alvaro Herrera Backpatch-through: 12 Discussion: https://postgr.es/m/CAPmGK16Uxr%3DPatiGyaRwiQVLB7Y-GqbkK3AxRLVYzU0Czv%3DsEw%40mail.gmail.com Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff/48de3bb1a50d3c53f50d827a05deee5adcbb936e Modified Files -- src/backend/partitioning/partbounds.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)