pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Report the correct is_temporary flag for column defaults.
5+ messages / 1 participants
[nested] [flat]

* pgsql: Report the correct is_temporary flag for column defaults.
@ 2025-09-11 21:12 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2025-09-11 21:12 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Report the correct is_temporary flag for column defaults.

pg_event_trigger_dropped_objects() would report a column default
object with is_temporary = false, even if it belongs to a
temporary table.  This seems clearly wrong, so adjust it to
report the table's temp-ness.

While here, refactor EventTriggerSQLDropAddObject to make its
handling of namespace objects less messy and avoid duplication
of the schema-lookup code.  And add some explicit test coverage
of dropped-object reports for dependencies of temp tables.

Back-patch to v15.  The bug exists further back, but the
GetAttrDefaultColumnAddress function this patch depends on does not,
and it doesn't seem worth adjusting it to cope with the older code.

Author: Antoine Violin <violin.antuan@gmail.com>
Co-authored-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/CAFjUV9x3-hv0gihf+CtUc-1it0hh7Skp9iYFhMS7FJjtAeAptA@mail.gmail.com
Backpatch-through: 15

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a0b99fc12203fa179d5b4218a21de30e0e91a7b8

Modified Files
--------------
src/backend/commands/event_trigger.c        | 111 ++++++++++++++++++++--------
src/test/regress/expected/event_trigger.out |  37 ++++++++++
src/test/regress/sql/event_trigger.sql      |  20 +++++
3 files changed, 136 insertions(+), 32 deletions(-)



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

* pgsql: Report the correct is_temporary flag for column defaults.
@ 2025-09-11 21:12 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2025-09-11 21:12 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Report the correct is_temporary flag for column defaults.

pg_event_trigger_dropped_objects() would report a column default
object with is_temporary = false, even if it belongs to a
temporary table.  This seems clearly wrong, so adjust it to
report the table's temp-ness.

While here, refactor EventTriggerSQLDropAddObject to make its
handling of namespace objects less messy and avoid duplication
of the schema-lookup code.  And add some explicit test coverage
of dropped-object reports for dependencies of temp tables.

Back-patch to v15.  The bug exists further back, but the
GetAttrDefaultColumnAddress function this patch depends on does not,
and it doesn't seem worth adjusting it to cope with the older code.

Author: Antoine Violin <violin.antuan@gmail.com>
Co-authored-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/CAFjUV9x3-hv0gihf+CtUc-1it0hh7Skp9iYFhMS7FJjtAeAptA@mail.gmail.com
Backpatch-through: 15

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/3c02c46521b01f1e60caff2d056f3da5ee98ce58

Modified Files
--------------
src/backend/commands/event_trigger.c        | 111 ++++++++++++++++++++--------
src/test/regress/expected/event_trigger.out |  37 ++++++++++
src/test/regress/sql/event_trigger.sql      |  20 +++++
3 files changed, 136 insertions(+), 32 deletions(-)



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

* pgsql: Report the correct is_temporary flag for column defaults.
@ 2025-09-11 21:12 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2025-09-11 21:12 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Report the correct is_temporary flag for column defaults.

pg_event_trigger_dropped_objects() would report a column default
object with is_temporary = false, even if it belongs to a
temporary table.  This seems clearly wrong, so adjust it to
report the table's temp-ness.

While here, refactor EventTriggerSQLDropAddObject to make its
handling of namespace objects less messy and avoid duplication
of the schema-lookup code.  And add some explicit test coverage
of dropped-object reports for dependencies of temp tables.

Back-patch to v15.  The bug exists further back, but the
GetAttrDefaultColumnAddress function this patch depends on does not,
and it doesn't seem worth adjusting it to cope with the older code.

Author: Antoine Violin <violin.antuan@gmail.com>
Co-authored-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/CAFjUV9x3-hv0gihf+CtUc-1it0hh7Skp9iYFhMS7FJjtAeAptA@mail.gmail.com
Backpatch-through: 15

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/c0c8ee23c8967053d99d5799fe5812d259ebbea1

Modified Files
--------------
src/backend/commands/event_trigger.c        | 111 ++++++++++++++++++++--------
src/test/regress/expected/event_trigger.out |  35 +++++++++
src/test/regress/sql/event_trigger.sql      |  20 +++++
3 files changed, 134 insertions(+), 32 deletions(-)



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

* pgsql: Report the correct is_temporary flag for column defaults.
@ 2025-09-11 21:12 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2025-09-11 21:12 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Report the correct is_temporary flag for column defaults.

pg_event_trigger_dropped_objects() would report a column default
object with is_temporary = false, even if it belongs to a
temporary table.  This seems clearly wrong, so adjust it to
report the table's temp-ness.

While here, refactor EventTriggerSQLDropAddObject to make its
handling of namespace objects less messy and avoid duplication
of the schema-lookup code.  And add some explicit test coverage
of dropped-object reports for dependencies of temp tables.

Back-patch to v15.  The bug exists further back, but the
GetAttrDefaultColumnAddress function this patch depends on does not,
and it doesn't seem worth adjusting it to cope with the older code.

Author: Antoine Violin <violin.antuan@gmail.com>
Co-authored-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/CAFjUV9x3-hv0gihf+CtUc-1it0hh7Skp9iYFhMS7FJjtAeAptA@mail.gmail.com
Backpatch-through: 15

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/8856f1acc97be5cc1816d42389c4a6852bc2ec86

Modified Files
--------------
src/backend/commands/event_trigger.c        | 111 ++++++++++++++++++++--------
src/test/regress/expected/event_trigger.out |  35 +++++++++
src/test/regress/sql/event_trigger.sql      |  20 +++++
3 files changed, 134 insertions(+), 32 deletions(-)



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

* pgsql: Report the correct is_temporary flag for column defaults.
@ 2025-09-11 21:12 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2025-09-11 21:12 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Report the correct is_temporary flag for column defaults.

pg_event_trigger_dropped_objects() would report a column default
object with is_temporary = false, even if it belongs to a
temporary table.  This seems clearly wrong, so adjust it to
report the table's temp-ness.

While here, refactor EventTriggerSQLDropAddObject to make its
handling of namespace objects less messy and avoid duplication
of the schema-lookup code.  And add some explicit test coverage
of dropped-object reports for dependencies of temp tables.

Back-patch to v15.  The bug exists further back, but the
GetAttrDefaultColumnAddress function this patch depends on does not,
and it doesn't seem worth adjusting it to cope with the older code.

Author: Antoine Violin <violin.antuan@gmail.com>
Co-authored-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/CAFjUV9x3-hv0gihf+CtUc-1it0hh7Skp9iYFhMS7FJjtAeAptA@mail.gmail.com
Backpatch-through: 15

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/451373dc5c4177ad97f6378316911741cdc3011b

Modified Files
--------------
src/backend/commands/event_trigger.c        | 111 ++++++++++++++++++++--------
src/test/regress/expected/event_trigger.out |  35 +++++++++
src/test/regress/sql/event_trigger.sql      |  20 +++++
3 files changed, 134 insertions(+), 32 deletions(-)



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


end of thread, other threads:[~2025-09-11 21:12 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-09-11 21:12 pgsql: Report the correct is_temporary flag for column defaults. Tom Lane <tgl@sss.pgh.pa.us>
2025-09-11 21:12 pgsql: Report the correct is_temporary flag for column defaults. Tom Lane <tgl@sss.pgh.pa.us>
2025-09-11 21:12 pgsql: Report the correct is_temporary flag for column defaults. Tom Lane <tgl@sss.pgh.pa.us>
2025-09-11 21:12 pgsql: Report the correct is_temporary flag for column defaults. Tom Lane <tgl@sss.pgh.pa.us>
2025-09-11 21:12 pgsql: Report the correct is_temporary flag for column defaults. Tom Lane <tgl@sss.pgh.pa.us>

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