pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-bugs@lists.postgresql.org
Subject: Bogus NULL object_name from pg_event_trigger_dropped_objects()
Date: Mon, 15 Nov 2021 10:29:45 -0500
Message-ID: <2123408.1636990185@sss.pgh.pa.us> (raw)

I chanced to experiment with the event trigger function shown in
9.29.2. Processing Objects Dropped by a DDL Command [1].
I got

et=# create table t1(f1 text primary key);
CREATE TABLE
et=# drop table t1;
NOTICE:  DROP TABLE dropped object: table public.t1 public.t1
NOTICE:  DROP TABLE dropped object: type public.t1 public.t1
NOTICE:  DROP TABLE dropped object: type public._t1 public.t1[]
NOTICE:  DROP TABLE dropped object: toast table pg_toast.pg_toast_38092 pg_toast.pg_toast_38092
NOTICE:  DROP TABLE dropped object: index pg_toast.pg_toast_38092_index pg_toast.pg_toast_38092_index
NOTICE:  DROP TABLE dropped object: table constraint public.<NULL> t1_pkey on public.t1
NOTICE:  DROP TABLE dropped object: index public.t1_pkey public.t1_pkey
DROP TABLE
et=# 

Note the faulty output for the pkey constraint.  I've not looked
for the cause.

			regards, tom lane

[1] https://www.postgresql.org/docs/current/functions-event-triggers.html#PG-EVENT-TRIGGER-SQL-DROP-FUNC...





view thread (3+ messages)  latest in thread

Message-ID: <2123408.1636990185@sss.pgh.pa.us>
Permalink:  ../2123408.1636990185@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2123408.1636990185@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgsql-bugs@lists.postgresql.org
  Subject: Re: Bogus NULL object_name from pg_event_trigger_dropped_objects()
  In-Reply-To: <2123408.1636990185@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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