pgsql: Put back regression test case in a more robust form.

2019-12-12 Thread Tom Lane
Put back regression test case in a more robust form. This undoes my hurried commit 776a2c887, restoring the removed test case in a form that passes with or without force_parallel_mode = regress. It turns out that force_parallel_mode = regress simply fails to mask the Worker lines that will be pro

Re: pgsql: Emit parameter values during query bind/execute errors

2019-12-12 Thread Tom Lane
Alvaro Herrera writes: > Hmm, the affected ones (jacana and fairywren only AFAICS) seem to be > gcc-based, which presumably work differently than the msvc-based in how > newlines are interpreted in the test script. I pushed an attempted > blind fix. > I *hope* that those two are not the only Win

pgsql: Fix EXTRACT(ISOYEAR FROM timestamp) for years BC.

2019-12-12 Thread Tom Lane
Fix EXTRACT(ISOYEAR FROM timestamp) for years BC. The test cases added by commit 26ae3aa80 exposed an old oversight in timestamp[tz]_part: they didn't correct the result of date2isoyear() for BC years, so that we produced an off-by-one answer for such years. Fix that, and back-patch to all support

pgsql: Fix EXTRACT(ISOYEAR FROM timestamp) for years BC.

2019-12-12 Thread Tom Lane
Fix EXTRACT(ISOYEAR FROM timestamp) for years BC. The test cases added by commit 26ae3aa80 exposed an old oversight in timestamp[tz]_part: they didn't correct the result of date2isoyear() for BC years, so that we produced an off-by-one answer for such years. Fix that, and back-patch to all support

pgsql: Fix EXTRACT(ISOYEAR FROM timestamp) for years BC.

2019-12-12 Thread Tom Lane
Fix EXTRACT(ISOYEAR FROM timestamp) for years BC. The test cases added by commit 26ae3aa80 exposed an old oversight in timestamp[tz]_part: they didn't correct the result of date2isoyear() for BC years, so that we produced an off-by-one answer for such years. Fix that, and back-patch to all support

pgsql: Fix EXTRACT(ISOYEAR FROM timestamp) for years BC.

2019-12-12 Thread Tom Lane
Fix EXTRACT(ISOYEAR FROM timestamp) for years BC. The test cases added by commit 26ae3aa80 exposed an old oversight in timestamp[tz]_part: they didn't correct the result of date2isoyear() for BC years, so that we produced an off-by-one answer for such years. Fix that, and back-patch to all support

pgsql: Fix EXTRACT(ISOYEAR FROM timestamp) for years BC.

2019-12-12 Thread Tom Lane
Fix EXTRACT(ISOYEAR FROM timestamp) for years BC. The test cases added by commit 26ae3aa80 exposed an old oversight in timestamp[tz]_part: they didn't correct the result of date2isoyear() for BC years, so that we produced an off-by-one answer for such years. Fix that, and back-patch to all support

pgsql: Fix EXTRACT(ISOYEAR FROM timestamp) for years BC.

2019-12-12 Thread Tom Lane
Fix EXTRACT(ISOYEAR FROM timestamp) for years BC. The test cases added by commit 26ae3aa80 exposed an old oversight in timestamp[tz]_part: they didn't correct the result of date2isoyear() for BC years, so that we produced an off-by-one answer for such years. Fix that, and back-patch to all support

pgsql: Fix EXTRACT(ISOYEAR FROM timestamp) for years BC.

2019-12-12 Thread Tom Lane
Fix EXTRACT(ISOYEAR FROM timestamp) for years BC. The test cases added by commit 26ae3aa80 exposed an old oversight in timestamp[tz]_part: they didn't correct the result of date2isoyear() for BC years, so that we produced an off-by-one answer for such years. Fix that, and back-patch to all support

pgsql: Remove redundant function calls in timestamp[tz]_part().

2019-12-12 Thread Tom Lane
Remove redundant function calls in timestamp[tz]_part(). The DTK_DOW/DTK_ISODOW and DTK_DOY switch cases in timestamp_part() and timestamptz_part() contained calls of timestamp2tm() that were fully redundant with the ones done just above the switch. This evidently crept in during commit 258ee1b63

pgsql: Remove redundant function calls in timestamp[tz]_part().

2019-12-12 Thread Tom Lane
Remove redundant function calls in timestamp[tz]_part(). The DTK_DOW/DTK_ISODOW and DTK_DOY switch cases in timestamp_part() and timestamptz_part() contained calls of timestamp2tm() that were fully redundant with the ones done just above the switch. This evidently crept in during commit 258ee1b63

pgsql: Remove redundant function calls in timestamp[tz]_part().

2019-12-12 Thread Tom Lane
Remove redundant function calls in timestamp[tz]_part(). The DTK_DOW/DTK_ISODOW and DTK_DOY switch cases in timestamp_part() and timestamptz_part() contained calls of timestamp2tm() that were fully redundant with the ones done just above the switch. This evidently crept in during commit 258ee1b63

pgsql: Remove redundant function calls in timestamp[tz]_part().

2019-12-12 Thread Tom Lane
Remove redundant function calls in timestamp[tz]_part(). The DTK_DOW/DTK_ISODOW and DTK_DOY switch cases in timestamp_part() and timestamptz_part() contained calls of timestamp2tm() that were fully redundant with the ones done just above the switch. This evidently crept in during commit 258ee1b63

pgsql: Remove redundant function calls in timestamp[tz]_part().

2019-12-12 Thread Tom Lane
Remove redundant function calls in timestamp[tz]_part(). The DTK_DOW/DTK_ISODOW and DTK_DOY switch cases in timestamp_part() and timestamptz_part() contained calls of timestamp2tm() that were fully redundant with the ones done just above the switch. This evidently crept in during commit 258ee1b63

pgsql: Remove redundant function calls in timestamp[tz]_part().

2019-12-12 Thread Tom Lane
Remove redundant function calls in timestamp[tz]_part(). The DTK_DOW/DTK_ISODOW and DTK_DOY switch cases in timestamp_part() and timestamptz_part() contained calls of timestamp2tm() that were fully redundant with the ones done just above the switch. This evidently crept in during commit 258ee1b63

pgsql: Remove redundant function calls in timestamp[tz]_part().

2019-12-12 Thread Tom Lane
Remove redundant function calls in timestamp[tz]_part(). The DTK_DOW/DTK_ISODOW and DTK_DOY switch cases in timestamp_part() and timestamptz_part() contained calls of timestamp2tm() that were fully redundant with the ones done just above the switch. This evidently crept in during commit 258ee1b63

Re: pgsql: Emit parameter values during query bind/execute errors

2019-12-12 Thread Alvaro Herrera
On 2019-Dec-12, Tom Lane wrote: > Alvaro Herrera writes: > > Emit parameter values during query bind/execute errors > > (Some of?) the Windows buildfarm critters don't like the test > case you added. I speculate that the test pattern is neglecting > to allow for Windows-style newlines. Hmm, th

pgsql: (Blindly) tweak new test regex

2019-12-12 Thread Alvaro Herrera
(Blindly) tweak new test regex gcc-based Windows buildfarm animals are not happy about a multiline regular expression I added recently. Try to accomodate; existing pg_basebackup tests suggest that \n should work instead of a bare newline, but throw in \r also. This being perl, TIMTOWTDI. Also re

Re: pgsql: Emit parameter values during query bind/execute errors

2019-12-12 Thread Tom Lane
Alvaro Herrera writes: > Emit parameter values during query bind/execute errors (Some of?) the Windows buildfarm critters don't like the test case you added. I speculate that the test pattern is neglecting to allow for Windows-style newlines. regards, tom lane