pgsql: Remove arbitrary MAXPGPATH limit on command lengths in pg_ctl.

2021-09-03 Thread Tom Lane
Remove arbitrary MAXPGPATH limit on command lengths in pg_ctl. Replace fixed-length command buffers with psprintf() calls. We didn't have anything as convenient as psprintf() when this code was written, but now that we do, there's little reason for the limitation to stand. Removing it eliminates

pgsql: Remove arbitrary MAXPGPATH limit on command lengths in pg_ctl.

2021-09-03 Thread Tom Lane
Remove arbitrary MAXPGPATH limit on command lengths in pg_ctl. Replace fixed-length command buffers with psprintf() calls. We didn't have anything as convenient as psprintf() when this code was written, but now that we do, there's little reason for the limitation to stand. Removing it eliminates

pgsql: Remove arbitrary MAXPGPATH limit on command lengths in pg_ctl.

2021-09-03 Thread Tom Lane
Remove arbitrary MAXPGPATH limit on command lengths in pg_ctl. Replace fixed-length command buffers with psprintf() calls. We didn't have anything as convenient as psprintf() when this code was written, but now that we do, there's little reason for the limitation to stand. Removing it eliminates

pgsql: Remove arbitrary MAXPGPATH limit on command lengths in pg_ctl.

2021-09-03 Thread Tom Lane
Remove arbitrary MAXPGPATH limit on command lengths in pg_ctl. Replace fixed-length command buffers with psprintf() calls. We didn't have anything as convenient as psprintf() when this code was written, but now that we do, there's little reason for the limitation to stand. Removing it eliminates

pgsql: Remove arbitrary MAXPGPATH limit on command lengths in pg_ctl.

2021-09-03 Thread Tom Lane
Remove arbitrary MAXPGPATH limit on command lengths in pg_ctl. Replace fixed-length command buffers with psprintf() calls. We didn't have anything as convenient as psprintf() when this code was written, but now that we do, there's little reason for the limitation to stand. Removing it eliminates

pgsql: Remove arbitrary MAXPGPATH limit on command lengths in pg_ctl.

2021-09-03 Thread Tom Lane
Remove arbitrary MAXPGPATH limit on command lengths in pg_ctl. Replace fixed-length command buffers with psprintf() calls. We didn't have anything as convenient as psprintf() when this code was written, but now that we do, there's little reason for the limitation to stand. Removing it eliminates

pgsql: Remove arbitrary MAXPGPATH limit on command lengths in pg_ctl.

2021-09-03 Thread Tom Lane
Remove arbitrary MAXPGPATH limit on command lengths in pg_ctl. Replace fixed-length command buffers with psprintf() calls. We didn't have anything as convenient as psprintf() when this code was written, but now that we do, there's little reason for the limitation to stand. Removing it eliminates

Re: pgsql: Set the volatility of the timestamptz version of date_bin() back

2021-09-03 Thread Tom Lane
John Naylor writes: > Set the volatility of the timestamptz version of date_bin() back to immutable > 543f36b43d was too hasty in thinking that the volatility of date_bin() > had to match date_trunc(), since only the latter references > session_timezone. > Bump catversion What you should have do

pgsql: Disallow creating an ICU collation if the DB encoding won't supp

2021-09-03 Thread Tom Lane
Disallow creating an ICU collation if the DB encoding won't support it. Previously this was allowed, but the collation effectively vanished into the ether because of the way lookup_collation() works: you could not use the collation, nor even drop it. Seems better to give an error up front than to

pgsql: Disallow creating an ICU collation if the DB encoding won't supp

2021-09-03 Thread Tom Lane
Disallow creating an ICU collation if the DB encoding won't support it. Previously this was allowed, but the collation effectively vanished into the ether because of the way lookup_collation() works: you could not use the collation, nor even drop it. Seems better to give an error up front than to

pgsql: Disallow creating an ICU collation if the DB encoding won't supp

2021-09-03 Thread Tom Lane
Disallow creating an ICU collation if the DB encoding won't support it. Previously this was allowed, but the collation effectively vanished into the ether because of the way lookup_collation() works: you could not use the collation, nor even drop it. Seems better to give an error up front than to

pgsql: Disallow creating an ICU collation if the DB encoding won't supp

2021-09-03 Thread Tom Lane
Disallow creating an ICU collation if the DB encoding won't support it. Previously this was allowed, but the collation effectively vanished into the ether because of the way lookup_collation() works: you could not use the collation, nor even drop it. Seems better to give an error up front than to

pgsql: Disallow creating an ICU collation if the DB encoding won't supp

2021-09-03 Thread Tom Lane
Disallow creating an ICU collation if the DB encoding won't support it. Previously this was allowed, but the collation effectively vanished into the ether because of the way lookup_collation() works: you could not use the collation, nor even drop it. Seems better to give an error up front than to

pgsql: Disallow creating an ICU collation if the DB encoding won't supp

2021-09-03 Thread Tom Lane
Disallow creating an ICU collation if the DB encoding won't support it. Previously this was allowed, but the collation effectively vanished into the ether because of the way lookup_collation() works: you could not use the collation, nor even drop it. Seems better to give an error up front than to

pgsql: Set the volatility of the timestamptz version of date_bin() back

2021-09-03 Thread John Naylor
Set the volatility of the timestamptz version of date_bin() back to immutable 543f36b43d was too hasty in thinking that the volatility of date_bin() had to match date_trunc(), since only the latter references session_timezone. Bump catversion Per feedback from Aleksander Alekseev Backpatch to v1

pgsql: Set the volatility of the timestamptz version of date_bin() back

2021-09-03 Thread John Naylor
Set the volatility of the timestamptz version of date_bin() back to immutable 543f36b43d was too hasty in thinking that the volatility of date_bin() had to match date_trunc(), since only the latter references session_timezone. Bump catversion Per feedback from Aleksander Alekseev Backpatch to v1

pgsql: Fix portability issue in tests from commit ce773f230.

2021-09-03 Thread Tom Lane
Fix portability issue in tests from commit ce773f230. Modern POSIX seems to require strtod() to accept "-NaN", but there's nothing about NaN in SUSv2, and some of our oldest buildfarm members don't like it. Let's try writing it as -'NaN' instead; that seems to produce the same result, at least on

pgsql: Fix portability issue in tests from commit ce773f230.

2021-09-03 Thread Tom Lane
Fix portability issue in tests from commit ce773f230. Modern POSIX seems to require strtod() to accept "-NaN", but there's nothing about NaN in SUSv2, and some of our oldest buildfarm members don't like it. Let's try writing it as -'NaN' instead; that seems to produce the same result, at least on

pgsql: Fix portability issue in tests from commit ce773f230.

2021-09-03 Thread Tom Lane
Fix portability issue in tests from commit ce773f230. Modern POSIX seems to require strtod() to accept "-NaN", but there's nothing about NaN in SUSv2, and some of our oldest buildfarm members don't like it. Let's try writing it as -'NaN' instead; that seems to produce the same result, at least on

pgsql: Fix portability issue in tests from commit ce773f230.

2021-09-03 Thread Tom Lane
Fix portability issue in tests from commit ce773f230. Modern POSIX seems to require strtod() to accept "-NaN", but there's nothing about NaN in SUSv2, and some of our oldest buildfarm members don't like it. Let's try writing it as -'NaN' instead; that seems to produce the same result, at least on

pgsql: Fix portability issue in tests from commit ce773f230.

2021-09-03 Thread Tom Lane
Fix portability issue in tests from commit ce773f230. Modern POSIX seems to require strtod() to accept "-NaN", but there's nothing about NaN in SUSv2, and some of our oldest buildfarm members don't like it. Let's try writing it as -'NaN' instead; that seems to produce the same result, at least on

pgsql: Make pkg-config files cross-compile friendly

2021-09-03 Thread Peter Eisentraut
Make pkg-config files cross-compile friendly Currently the pc files use hard coded paths for "includedir" and "libdir." Example: Cflags: -I/usr/include Libs: -L/usr/lib -lpq This is not very fortunate when cross compiling inside a buildroot, where the includes and libs are inside a staging

pgsql: Fix pkg-config files for static linking

2021-09-03 Thread Peter Eisentraut
Fix pkg-config files for static linking Since ea53100d5 (PostgreSQL 12), the shipped pkg-config files have been broken for statically linking libpq because libpgcommon and libpgport are missing. This patch adds those two missing private dependencies (in a non-hardcoded way). Reported-by: Filip G