pgsql: Convert xml_in to report errors softly.

2022-12-16 Thread Tom Lane
Convert xml_in to report errors softly. The key idea here is that xml_parse must distinguish hard errors from soft errors. We want to throw a hard error for libxml initialization failures: those might be out-of-memory, or something else, but in any case they are not the fault of the input string.

pgsql: Clean up dubious error handling in wellformed_xml().

2022-12-16 Thread Tom Lane
Clean up dubious error handling in wellformed_xml(). This ancient bit of code was summarily trapping any ereport longjmp whatsoever and assuming that it must represent an invalid-XML report. It's not really appropriate to handle OOM-like situations that way: maybe the input is valid or maybe not,

pgsql: C comment: fix wording

2022-12-16 Thread Bruce Momjian
C comment: fix wording Backpatch-through: master Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/59346209a839dfc627dd7986af3a6a8349c7ea0f Modified Files -- contrib/postgres_fdw/postgres_fdw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: pg_upgrade: Make testing different transfer modes easier

2022-12-16 Thread Peter Eisentraut
pg_upgrade: Make testing different transfer modes easier The environment variable PG_TEST_PG_UPGRADE_MODE can be set to override the default transfer mode for the pg_upgrade tests. (Automatically running the pg_upgrade tests for all supported modes would be too slow.) Reviewed-by: Daniel Gustafss

pgsql: pg_upgrade: Add --copy option

2022-12-16 Thread Peter Eisentraut
pg_upgrade: Add --copy option This option selects the default transfer mode. Having an explicit option is handy to make scripts and tests more explicit. It also makes it easier to talk about a "copy" mode rather than "the default mode" or something like that, since until now the default mode did

pgsql: Fix inability to reference CYCLE column from inside its CTE.

2022-12-16 Thread Tom Lane
Fix inability to reference CYCLE column from inside its CTE. Such references failed with "cache lookup failed for type 0" because we didn't resolve the type of the CYCLE column until after analyzing the CTE's query. We can just move that processing to before the recursive parse_sub_analyze call,

pgsql: Fix inability to reference CYCLE column from inside its CTE.

2022-12-16 Thread Tom Lane
Fix inability to reference CYCLE column from inside its CTE. Such references failed with "cache lookup failed for type 0" because we didn't resolve the type of the CYCLE column until after analyzing the CTE's query. We can just move that processing to before the recursive parse_sub_analyze call,

pgsql: Fix inability to reference CYCLE column from inside its CTE.

2022-12-16 Thread Tom Lane
Fix inability to reference CYCLE column from inside its CTE. Such references failed with "cache lookup failed for type 0" because we didn't resolve the type of the CYCLE column until after analyzing the CTE's query. We can just move that processing to before the recursive parse_sub_analyze call,