pgsql: Use libc's snprintf, not sprintf, for special cases in snprintf.

2022-10-16 Thread Tom Lane
Use libc's snprintf, not sprintf, for special cases in snprintf.c. snprintf.c has always fallen back on libc's *printf implementation when printing pointers (%p) and floats. When this code originated, we were still supporting some platforms that lacked native snprintf, so we used sprintf for that

pgsql: Use libc's snprintf, not sprintf, for special cases in snprintf.

2022-10-16 Thread Tom Lane
Use libc's snprintf, not sprintf, for special cases in snprintf.c. snprintf.c has always fallen back on libc's *printf implementation when printing pointers (%p) and floats. When this code originated, we were still supporting some platforms that lacked native snprintf, so we used sprintf for that

pgsql: Use libc's snprintf, not sprintf, for special cases in snprintf.

2022-10-16 Thread Tom Lane
Use libc's snprintf, not sprintf, for special cases in snprintf.c. snprintf.c has always fallen back on libc's *printf implementation when printing pointers (%p) and floats. When this code originated, we were still supporting some platforms that lacked native snprintf, so we used sprintf for that

pgsql: Use libc's snprintf, not sprintf, for special cases in snprintf.

2022-10-16 Thread Tom Lane
Use libc's snprintf, not sprintf, for special cases in snprintf.c. snprintf.c has always fallen back on libc's *printf implementation when printing pointers (%p) and floats. When this code originated, we were still supporting some platforms that lacked native snprintf, so we used sprintf for that

pgsql: Use libc's snprintf, not sprintf, for special cases in snprintf.

2022-10-16 Thread Tom Lane
Use libc's snprintf, not sprintf, for special cases in snprintf.c. snprintf.c has always fallen back on libc's *printf implementation when printing pointers (%p) and floats. When this code originated, we were still supporting some platforms that lacked native snprintf, so we used sprintf for that

pgsql: Rename parser token REF to REF_P to avoid a symbol conflict.

2022-10-16 Thread Tom Lane
Rename parser token REF to REF_P to avoid a symbol conflict. In the latest version of Apple's macOS SDK, fails to compile if "REF" is #define'd as something. Apple may or may not agree that this is a bug, and even if they do accept the bug report I filed, they probably won't fix it very quickly.

pgsql: Rename parser token REF to REF_P to avoid a symbol conflict.

2022-10-16 Thread Tom Lane
Rename parser token REF to REF_P to avoid a symbol conflict. In the latest version of Apple's macOS SDK, fails to compile if "REF" is #define'd as something. Apple may or may not agree that this is a bug, and even if they do accept the bug report I filed, they probably won't fix it very quickly.

pgsql: Rename parser token REF to REF_P to avoid a symbol conflict.

2022-10-16 Thread Tom Lane
Rename parser token REF to REF_P to avoid a symbol conflict. In the latest version of Apple's macOS SDK, fails to compile if "REF" is #define'd as something. Apple may or may not agree that this is a bug, and even if they do accept the bug report I filed, they probably won't fix it very quickly.

pgsql: Rename parser token REF to REF_P to avoid a symbol conflict.

2022-10-16 Thread Tom Lane
Rename parser token REF to REF_P to avoid a symbol conflict. In the latest version of Apple's macOS SDK, fails to compile if "REF" is #define'd as something. Apple may or may not agree that this is a bug, and even if they do accept the bug report I filed, they probably won't fix it very quickly.

pgsql: Rename parser token REF to REF_P to avoid a symbol conflict.

2022-10-16 Thread Tom Lane
Rename parser token REF to REF_P to avoid a symbol conflict. In the latest version of Apple's macOS SDK, fails to compile if "REF" is #define'd as something. Apple may or may not agree that this is a bug, and even if they do accept the bug report I filed, they probably won't fix it very quickly.

pgsql: Rename parser token REF to REF_P to avoid a symbol conflict.

2022-10-16 Thread Tom Lane
Rename parser token REF to REF_P to avoid a symbol conflict. In the latest version of Apple's macOS SDK, fails to compile if "REF" is #define'd as something. Apple may or may not agree that this is a bug, and even if they do accept the bug report I filed, they probably won't fix it very quickly.

pgsql: Rename parser token REF to REF_P to avoid a symbol conflict.

2022-10-16 Thread Tom Lane
Rename parser token REF to REF_P to avoid a symbol conflict. In the latest version of Apple's macOS SDK, fails to compile if "REF" is #define'd as something. Apple may or may not agree that this is a bug, and even if they do accept the bug report I filed, they probably won't fix it very quickly.

pgsql: Rename parser token REF to REF_P to avoid a symbol conflict.

2022-10-16 Thread Tom Lane
Rename parser token REF to REF_P to avoid a symbol conflict. In the latest version of Apple's macOS SDK, fails to compile if "REF" is #define'd as something. Apple may or may not agree that this is a bug, and even if they do accept the bug report I filed, they probably won't fix it very quickly.

pgsql: Rename parser token REF to REF_P to avoid a symbol conflict.

2022-10-16 Thread Tom Lane
Rename parser token REF to REF_P to avoid a symbol conflict. In the latest version of Apple's macOS SDK, fails to compile if "REF" is #define'd as something. Apple may or may not agree that this is a bug, and even if they do accept the bug report I filed, they probably won't fix it very quickly.

pgsql: Rename parser token REF to REF_P to avoid a symbol conflict.

2022-10-16 Thread Tom Lane
Rename parser token REF to REF_P to avoid a symbol conflict. In the latest version of Apple's macOS SDK, fails to compile if "REF" is #define'd as something. Apple may or may not agree that this is a bug, and even if they do accept the bug report I filed, they probably won't fix it very quickly.

pgsql: Rename parser token REF to REF_P to avoid a symbol conflict.

2022-10-16 Thread Tom Lane
Rename parser token REF to REF_P to avoid a symbol conflict. In the latest version of Apple's macOS SDK, fails to compile if "REF" is #define'd as something. Apple may or may not agree that this is a bug, and even if they do accept the bug report I filed, they probably won't fix it very quickly.

pgsql: Rename parser token REF to REF_P to avoid a symbol conflict.

2022-10-16 Thread Tom Lane
Rename parser token REF to REF_P to avoid a symbol conflict. In the latest version of Apple's macOS SDK, fails to compile if "REF" is #define'd as something. Apple may or may not agree that this is a bug, and even if they do accept the bug report I filed, they probably won't fix it very quickly.

pgsql: Fix EXPLAIN of SEARCH BREADTH FIRST with a constant initial valu

2022-10-16 Thread Tom Lane
Fix EXPLAIN of SEARCH BREADTH FIRST with a constant initial value. If the non-recursive term of a SEARCH BREADTH FIRST recursive query has only constants in its target list, the planner will fold the starting RowExpr added by rewrite into a simple Const of type RECORD. The executor doesn't have a

pgsql: Fix EXPLAIN of SEARCH BREADTH FIRST with a constant initial valu

2022-10-16 Thread Tom Lane
Fix EXPLAIN of SEARCH BREADTH FIRST with a constant initial value. If the non-recursive term of a SEARCH BREADTH FIRST recursive query has only constants in its target list, the planner will fold the starting RowExpr added by rewrite into a simple Const of type RECORD. The executor doesn't have a

pgsql: Fix EXPLAIN of SEARCH BREADTH FIRST with a constant initial valu

2022-10-16 Thread Tom Lane
Fix EXPLAIN of SEARCH BREADTH FIRST with a constant initial value. If the non-recursive term of a SEARCH BREADTH FIRST recursive query has only constants in its target list, the planner will fold the starting RowExpr added by rewrite into a simple Const of type RECORD. The executor doesn't have a

pgsql: Add checks for regexes with user name map in test for peer authe

2022-10-16 Thread Michael Paquier
Add checks for regexes with user name map in test for peer authentication There is already some coverage for that in the kerberos test suite, though it requires PG_TEST_EXTRA to be set as per its insecure nature. This provides coverage in a default setup, as long as peer is supported on the platfo

pgsql: Fix calculation related to temporary WAL segment name in basic_a

2022-10-16 Thread Michael Paquier
Fix calculation related to temporary WAL segment name in basic_archive The file name used for its temporary destination, before renaming it to the real deal, has been using a microseconds in a timestamp aimed to be originally in milli-seconds. This is harmless as this is aimed at being a safeguar

pgsql: Fix calculation related to temporary WAL segment name in basic_a

2022-10-16 Thread Michael Paquier
Fix calculation related to temporary WAL segment name in basic_archive The file name used for its temporary destination, before renaming it to the real deal, has been using a microseconds in a timestamp aimed to be originally in milli-seconds. This is harmless as this is aimed at being a safeguar