From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Julien Rouhaud <rjuju123(at)gmail(dot)com> |
Cc: | wolakk(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #17530: pg_dump comment on triggers is "off" by comparison to all of the other objects... |
Date: | 2022-06-23 04:29:18 |
Message-ID: | 3760003.1655958558@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Julien Rouhaud <rjuju123(at)gmail(dot)com> writes:
> On Wed, Jun 22, 2022 at 11:05:45PM +0000, PG Bug reporting form wrote:
>> It's "change_log"<space>"id_change_log"; but the actual trigger name is
>> "id_change_log" on the table "change_log"
> That's expected, the name in the comment has a qualifier when the object name
> itself isn't guaranteed to be unique, with the format
> "$table_name $trigger_name"
> This is done similarly for all object types that don't have a guarantee of
> unique name (policies, rules...).
Right. A couple further observations:
* The relevant object names here are those of the table and trigger.
The OP seems to be confusing this with the name of the function that
the trigger uses --- but that could be completely different.
* There's not been any attempt to make the comment labels be
guaranteed-unique or machine-parseable. If, say, you made a table
or trigger name that contains a space, it'd be hard to tell by
looking at the pg_dump comment which space separates the table
name from the trigger name, versus which one(s) are part of one
of those names. If we were doing this from scratch today we'd
probably be more rigorous ... but it's been like this for twenty-ish
years, and I doubt there's a lot of appetite for redefining it now.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2022-06-23 06:00:00 | Re: BUG #17522: While using --with-ssl=openssl and PG_TEST_EXTRA='ssl' options, SSL test fails on OpenBSD 7.1 |
Previous Message | David G. Johnston | 2022-06-23 04:27:25 | Re: BUG #17530: pg_dump comment on triggers is "off" by comparison to all of the other objects... |