pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Print out error position for some more DDLs
2+ messages / 1 participants
[nested] [flat]

* pgsql: Print out error position for some more DDLs
@ 2024-12-17 00:44 Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 2+ messages in thread

From: Michael Paquier @ 2024-12-17 00:44 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Print out error position for some more DDLs

The following commands gain some information about the error position in
the query, should they fail when looking at the type used:
- CREATE TYPE (LIKE)
- CREATE TABLE OF

Both are related to typenameType() where the type name lookup is done.
These calls gain the ParseState that already exists in these paths.

Author: Kirill Reshke, Jian He
Reviewed-by: Álvaro Herrera, Michael Paquier
Discussion: https://postgr.es/m/CALdSSPhqfvKbDwqJaY=yEePi_aq61GmMpW88i6ZH7CMG_2Z4Cg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/0f23dedc91760271aefe9e3c52d677c079bb7bce

Modified Files
--------------
src/backend/commands/typecmds.c           | 2 +-
src/backend/parser/parse_utilcmd.c        | 2 +-
src/test/regress/expected/float8.out      | 2 ++
src/test/regress/expected/typed_table.out | 2 ++
4 files changed, 6 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Print out error position for some ALTER TABLE ALTER COLUMN type
@ 2025-01-27 04:52 Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 2+ messages in thread

From: Michael Paquier @ 2025-01-27 04:52 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2025-01-27 04:52 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-12-17 00:44 pgsql: Print out error position for some more DDLs Michael Paquier <michael@paquier.xyz>
2025-01-27 04:52 pgsql: Print out error position for some ALTER TABLE ALTER COLUMN type Michael Paquier <michael@paquier.xyz>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox