pgsql: Print out error position for some ALTER TABLE ALTER COLUMN type

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Print out error position for some ALTER TABLE ALTER COLUMN type
Date: 2025-01-27 04:52:34
Message-ID: E1tcH6w-003mvA-44@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Print out error position for some ALTER TABLE ALTER COLUMN type

A ParseState exists in ATPrepAlterColumnType() since its introduction
in 077db40fa1f3, and it has never relied on a query string that could be
used to point at a location in the origin string on error.

The output of some regression tests are updated, showing the error
location where applicable. Six error strings are upgraded with the
error location.

Author: Jian He
Discussion: https://postgr.es/m/CACJufxGfbPfWLjcEz33G9eW_epDW0UDi2H05i9eSTPKGJ4rxSA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/65281391a937293db7fa747be218def0e9794550

Modified Files
--------------
src/backend/commands/tablecmds.c | 26 ++++++++++++++++----------
src/test/regress/expected/alter_table.out | 14 ++++++++++++++
src/test/regress/expected/generated_stored.out | 2 ++
src/test/regress/expected/typed_table.out | 2 ++
4 files changed, 34 insertions(+), 10 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2025-01-27 11:09:55 pgsql: doc: Meson is not experimental on Windows
Previous Message Michael Paquier 2025-01-26 23:10:13 pgsql: pg_amcheck: Fix test failure on Windows with non-existing role