pgsql: Support LIKE with nondeterministic collations

2024-11-26 Thread Peter Eisentraut
Support LIKE with nondeterministic collations This allows for example using LIKE with case-insensitive collations. There was previously no internal implementation of this, so it was met with a not-supported error. This adds the internal implementation and removes the error. The implementation fo

pgsql: Improve error message for replication of generated columns.

2024-11-26 Thread Amit Kapila
Improve error message for replication of generated columns. Currently, logical replication produces a generic error message when targeting a subscriber-side table column that is either missing or generated. The error message can be misleading for generated columns. This patch introduces a specifi

pgsql: If a C23 compiler is detected, try asking for C17.

2024-11-26 Thread Thomas Munro
If a C23 compiler is detected, try asking for C17. Branches before 16 can't be compiled with a C23 compiler (see deprecation warnings silenced by commit f9a56e72, and non-back-patchable changes made in 16 by commit 1c27d16e). Test __STDC_VERSION__, and if it's above C17 then try appending -std=gn

pgsql: If a C23 compiler is detected, try asking for C17.

2024-11-26 Thread Thomas Munro
If a C23 compiler is detected, try asking for C17. Branches before 16 can't be compiled with a C23 compiler (see deprecation warnings silenced by commit f9a56e72, and non-back-patchable changes made in 16 by commit 1c27d16e). Test __STDC_VERSION__, and if it's above C17 then try appending -std=gn

Re: pgsql: If a C23 compiler is detected, try asking for C17.

2024-11-26 Thread Tom Lane
Thomas Munro writes: > If a C23 compiler is detected, try asking for C17. Looks like you missed REL_10_STABLE? regards, tom lane

pgsql: If a C23 compiler is detected, try asking for C17.

2024-11-26 Thread Thomas Munro
If a C23 compiler is detected, try asking for C17. Branches before 16 can't be compiled with a C23 compiler (see deprecation warnings silenced by commit f9a56e72, and non-back-patchable changes made in 16 by commit 1c27d16e). Test __STDC_VERSION__, and if it's above C17 then try appending -std=gn

pgsql: If a C23 compiler is detected, try asking for C17.

2024-11-26 Thread Thomas Munro
If a C23 compiler is detected, try asking for C17. Branches before 16 can't be compiled with a C23 compiler (see deprecation warnings silenced by commit f9a56e72, and non-back-patchable changes made in 16 by commit 1c27d16e). Test __STDC_VERSION__, and if it's above C17 then try appending -std=gn

pgsql: If a C23 compiler is detected, try asking for C17.

2024-11-26 Thread Thomas Munro
If a C23 compiler is detected, try asking for C17. Branches before 16 can't be compiled with a C23 compiler (see deprecation warnings silenced by commit f9a56e72, and non-back-patchable changes made in 16 by commit 1c27d16e). Test __STDC_VERSION__, and if it's above C17 then try appending -std=gn

pgsql: If a C23 compiler is detected, try asking for C17.

2024-11-26 Thread Thomas Munro
If a C23 compiler is detected, try asking for C17. Branches before 16 can't be compiled with a C23 compiler (see deprecation warnings silenced by commit f9a56e72, and non-back-patchable changes made in 16 by commit 1c27d16e). Test __STDC_VERSION__, and if it's above C17 then try appending -std=gn

pgsql: If a C23 compiler is detected, try asking for C17.

2024-11-26 Thread Thomas Munro
If a C23 compiler is detected, try asking for C17. Branches before 16 can't be compiled with a C23 compiler (see deprecation warnings silenced by commit f9a56e72, and non-back-patchable changes made in 16 by commit 1c27d16e). Test __STDC_VERSION__, and if it's above C17 then try appending -std=gn

pgsql: If a C23 compiler is detected, try asking for C17.

2024-11-26 Thread Thomas Munro
If a C23 compiler is detected, try asking for C17. Branches before 16 can't be compiled with a C23 compiler (see deprecation warnings silenced by commit f9a56e72, and non-back-patchable changes made in 16 by commit 1c27d16e). Test __STDC_VERSION__, and if it's above C17 then try appending -std=gn

pgsql: If a C23 compiler is detected, try asking for C17.

2024-11-26 Thread Thomas Munro
If a C23 compiler is detected, try asking for C17. Branches before 16 can't be compiled with a C23 compiler (see deprecation warnings silenced by commit f9a56e72, and non-back-patchable changes made in 16 by commit 1c27d16e). Test __STDC_VERSION__, and if it's above C17 then try appending -std=gn

pgsql: If a C23 compiler is detected, try asking for C17.

2024-11-26 Thread Thomas Munro
If a C23 compiler is detected, try asking for C17. Branches before 16 can't be compiled with a C23 compiler (see deprecation warnings silenced by commit f9a56e72, and non-back-patchable changes made in 16 by commit 1c27d16e). Test __STDC_VERSION__, and if it's above C17 then try appending -std=gn

pgsql: If a C23 compiler is detected, try asking for C17.

2024-11-26 Thread Thomas Munro
If a C23 compiler is detected, try asking for C17. Branches before 16 can't be compiled with a C23 compiler (see deprecation warnings silenced by commit f9a56e72, and non-back-patchable changes made in 16 by commit 1c27d16e). Test __STDC_VERSION__, and if it's above C17 then try appending -std=gn

pgsql: Handle better implicit transaction state of pipeline mode

2024-11-26 Thread Michael Paquier
Handle better implicit transaction state of pipeline mode When using a pipeline, a transaction starts from the first command and is committed with a Sync message or when the pipeline ends. Functions like IsInTransactionBlock() or PreventInTransactionBlock() were already able to understand a pipel

pgsql: Handle better implicit transaction state of pipeline mode

2024-11-26 Thread Michael Paquier
Handle better implicit transaction state of pipeline mode When using a pipeline, a transaction starts from the first command and is committed with a Sync message or when the pipeline ends. Functions like IsInTransactionBlock() or PreventInTransactionBlock() were already able to understand a pipel

pgsql: Handle better implicit transaction state of pipeline mode

2024-11-26 Thread Michael Paquier
Handle better implicit transaction state of pipeline mode When using a pipeline, a transaction starts from the first command and is committed with a Sync message or when the pipeline ends. Functions like IsInTransactionBlock() or PreventInTransactionBlock() were already able to understand a pipel

pgsql: Handle better implicit transaction state of pipeline mode

2024-11-26 Thread Michael Paquier
Handle better implicit transaction state of pipeline mode When using a pipeline, a transaction starts from the first command and is committed with a Sync message or when the pipeline ends. Functions like IsInTransactionBlock() or PreventInTransactionBlock() were already able to understand a pipel

pgsql: Handle better implicit transaction state of pipeline mode

2024-11-26 Thread Michael Paquier
Handle better implicit transaction state of pipeline mode When using a pipeline, a transaction starts from the first command and is committed with a Sync message or when the pipeline ends. Functions like IsInTransactionBlock() or PreventInTransactionBlock() were already able to understand a pipel

pgsql: Handle better implicit transaction state of pipeline mode

2024-11-26 Thread Michael Paquier
Handle better implicit transaction state of pipeline mode When using a pipeline, a transaction starts from the first command and is committed with a Sync message or when the pipeline ends. Functions like IsInTransactionBlock() or PreventInTransactionBlock() were already able to understand a pipel

pgsql: Fix meson uuid header check so it works with MSVC

2024-11-26 Thread Andrew Dunstan
Fix meson uuid header check so it works with MSVC The OSSP uuid.h file includes unistd.h, so to use it with MSVC we need to include the postgres include directories so it picks up our version of that in src/include/port/win32_msvc. Adjust the meson test accordingly. Backported from commit 7c655a0

pgsql: Fix commit 641a5b7a144 for "nbsp" output in SVG files

2024-11-26 Thread Bruce Momjian
Fix commit 641a5b7a144 for "nbsp" output in SVG files In commit 641a5b7a144, I removed "nbsp" characters from SVG files, not realizing the SVG files were generated from GV files and that the "nbsp" characters were caused by trailing ASCII spaces in GV files. This commit restores the "nbsp" SVG ch

pgsql: Distinguish between AcquireExternalFD and epoll_create1 / kqueue

2024-11-26 Thread Andres Freund
Distinguish between AcquireExternalFD and epoll_create1 / kqueue failing The error messages in CreateWaitEventSet() made it hard to know whether the syscall or AcquireExternalFD() failed. This is particularly relevant because AcquireExternalFD() imposes a lower limit than what would cause syscalls

pgsql: meson: Build pgevent as shared_module rather than shared_library

2024-11-26 Thread Peter Eisentraut
meson: Build pgevent as shared_module rather than shared_library This matches the behavior of the makefiles and the old MSVC build system. The main effect is that the build result gets installed into pkglibdir rather than bindir. The documentation says to locate the library in pkglibdir, so this

pgsql: meson: Build pgevent as shared_module rather than shared_library

2024-11-26 Thread Peter Eisentraut
meson: Build pgevent as shared_module rather than shared_library This matches the behavior of the makefiles and the old MSVC build system. The main effect is that the build result gets installed into pkglibdir rather than bindir. The documentation says to locate the library in pkglibdir, so this

pgsql: meson: Build pgevent as shared_module rather than shared_library

2024-11-26 Thread Peter Eisentraut
meson: Build pgevent as shared_module rather than shared_library This matches the behavior of the makefiles and the old MSVC build system. The main effect is that the build result gets installed into pkglibdir rather than bindir. The documentation says to locate the library in pkglibdir, so this

pgsql: Clean up newlines following left parentheses

2024-11-26 Thread Álvaro Herrera
Clean up newlines following left parentheses Most came in during the 17 cycle, so backpatch there. Some (particularly reorderbuffer.h) are very old, but backpatching doesn't seem useful. Like commits c9d297751959, c4f113e8fef9. Branch -- REL_17_STABLE Details --- https://git.postgresql

pgsql: Clean up newlines following left parentheses

2024-11-26 Thread Álvaro Herrera
Clean up newlines following left parentheses Most came in during the 17 cycle, so backpatch there. Some (particularly reorderbuffer.h) are very old, but backpatching doesn't seem useful. Like commits c9d297751959, c4f113e8fef9. Branch -- master Details --- https://git.postgresql.org/pg

pgsql: Rename C23 keyword

2024-11-26 Thread Peter Eisentraut
Rename C23 keyword constexpr is a keyword in C23. Rename a conflicting identifier for future-proofing. Reviewed-by: Robert Haas Discussion: https://www.postgresql.org/message-id/flat/08abc832-1384-4aca-a535-1a79765b565e%40eisentraut.org Discussion: https://www.postgresql.org/message-id/flat/8

pgsql: Rename C23 keyword

2024-11-26 Thread Peter Eisentraut
Rename C23 keyword constexpr is a keyword in C23. Rename a conflicting identifier for future-proofing. Reviewed-by: Robert Haas Discussion: https://www.postgresql.org/message-id/flat/08abc832-1384-4aca-a535-1a79765b565e%40eisentraut.org Discussion: https://www.postgresql.org/message-id/flat/8

pgsql: Fix C23 compiler warning

2024-11-26 Thread Peter Eisentraut
Fix C23 compiler warning The approach of declaring a function pointer with an empty argument list and hoping that the compiler will not complain about casting it to another type no longer works with C23, because foo() is now equivalent to foo(void). We don't need to do this here. With a few stru

pgsql: Fix C23 compiler warning

2024-11-26 Thread Peter Eisentraut
Fix C23 compiler warning The approach of declaring a function pointer with an empty argument list and hoping that the compiler will not complain about casting it to another type no longer works with C23, because foo() is now equivalent to foo(void). We don't need to do this here. With a few stru

pgsql: Improve InitShmemAccess() prototype

2024-11-26 Thread Peter Eisentraut
Improve InitShmemAccess() prototype The code comment said, 'the argument should be declared "PGShmemHeader *seghdr", but we use void to avoid having to include ipc.h in shmem.h.' We can achieve the original goal with a struct forward declaration. (ipc.h was also not the correct header file.) Di