pgsql: Remove logging.c from the shared library of src/common/

2020-09-30 Thread Michael Paquier
Remove logging.c from the shared library of src/common/ As fe0a1dc has proved, it is not a good concept to add to libpq dependencies that would enforce the error output to a central logging facility because it breaks the promise of reporting the error back to an application in a consistent way, wi

pgsql: Fix and test snapshot behavior on standby.

2020-09-30 Thread Andres Freund
Fix and test snapshot behavior on standby. I (Andres) broke this in 623a9CA79bx, because I didn't think about the way snapshots are built on standbys sufficiently. Unfortunately our existing tests did not catch this, as they are all just querying with psql (therefore ending up with fresh snapshots

pgsql: Reword partitioning error message

2020-09-30 Thread Alvaro Herrera
Reword partitioning error message The error message about columns in the primary key not including all of the partition key was unclear; reword it. Backpatch all the way to pg11, where it appeared. Reported-by: Nagaraj Raj Discussion: https://postgr.es/m/[email protected].

pgsql: Reword partitioning error message

2020-09-30 Thread Alvaro Herrera
Reword partitioning error message The error message about columns in the primary key not including all of the partition key was unclear; reword it. Backpatch all the way to pg11, where it appeared. Reported-by: Nagaraj Raj Discussion: https://postgr.es/m/[email protected].

pgsql: Reword partitioning error message

2020-09-30 Thread Alvaro Herrera
Reword partitioning error message The error message about columns in the primary key not including all of the partition key was unclear; reword it. Backpatch all the way to pg11, where it appeared. Reported-by: Nagaraj Raj Discussion: https://postgr.es/m/[email protected].

pgsql: Reword partitioning error message

2020-09-30 Thread Alvaro Herrera
Reword partitioning error message The error message about columns in the primary key not including all of the partition key was unclear; reword it. Backpatch all the way to pg11, where it appeared. Reported-by: Nagaraj Raj Discussion: https://postgr.es/m/[email protected].

pgsql: Fix handling of BC years in to_date/to_timestamp.

2020-09-30 Thread Tom Lane
Fix handling of BC years in to_date/to_timestamp. Previously, a conversion such as to_date('-44-02-01','-MM-DD') would result in '0045-02-01 BC', as the code attempted to interpret the negative year as BC, but failed to apply the correction needed for our internal handling of BC years.

pgsql: Fix handling of BC years in to_date/to_timestamp.

2020-09-30 Thread Tom Lane
Fix handling of BC years in to_date/to_timestamp. Previously, a conversion such as to_date('-44-02-01','-MM-DD') would result in '0045-02-01 BC', as the code attempted to interpret the negative year as BC, but failed to apply the correction needed for our internal handling of BC years.

pgsql: Fix handling of BC years in to_date/to_timestamp.

2020-09-30 Thread Tom Lane
Fix handling of BC years in to_date/to_timestamp. Previously, a conversion such as to_date('-44-02-01','-MM-DD') would result in '0045-02-01 BC', as the code attempted to interpret the negative year as BC, but failed to apply the correction needed for our internal handling of BC years.

pgsql: Fix handling of BC years in to_date/to_timestamp.

2020-09-30 Thread Tom Lane
Fix handling of BC years in to_date/to_timestamp. Previously, a conversion such as to_date('-44-02-01','-MM-DD') would result in '0045-02-01 BC', as the code attempted to interpret the negative year as BC, but failed to apply the correction needed for our internal handling of BC years.

pgsql: Fix handling of BC years in to_date/to_timestamp.

2020-09-30 Thread Tom Lane
Fix handling of BC years in to_date/to_timestamp. Previously, a conversion such as to_date('-44-02-01','-MM-DD') would result in '0045-02-01 BC', as the code attempted to interpret the negative year as BC, but failed to apply the correction needed for our internal handling of BC years.

pgsql: Fix handling of BC years in to_date/to_timestamp.

2020-09-30 Thread Tom Lane
Fix handling of BC years in to_date/to_timestamp. Previously, a conversion such as to_date('-44-02-01','-MM-DD') would result in '0045-02-01 BC', as the code attempted to interpret the negative year as BC, but failed to apply the correction needed for our internal handling of BC years.

pgsql: Fix handling of BC years in to_date/to_timestamp.

2020-09-30 Thread Tom Lane
Fix handling of BC years in to_date/to_timestamp. Previously, a conversion such as to_date('-44-02-01','-MM-DD') would result in '0045-02-01 BC', as the code attempted to interpret the negative year as BC, but failed to apply the correction needed for our internal handling of BC years.

pgsql: pgbench: Use PQExpBuffer to simplify code that constructs SQL.

2020-09-30 Thread Heikki Linnakangas
pgbench: Use PQExpBuffer to simplify code that constructs SQL. Author: Fabien Coelho Reviewed-by: Jeevan Ladhe Discussion: https://www.postgresql.org/message-id/alpine.DEB.2.21.1910220826570.15559%40lancre Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/9796f455c38