Re: dump a comment of a TSDictionary

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Giuseppe Broccolo <giuseppe(dot)broccolo(at)2ndquadrant(dot)it>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: dump a comment of a TSDictionary
Date: 2017-03-06 21:14:42
Message-ID: 20170306211441.GZ9812@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
> Stephen Frost <sfrost(at)snowman(dot)net> writes:
> > * Giuseppe Broccolo (giuseppe(dot)broccolo(at)2ndquadrant(dot)it) wrote:
> >> I've seen that pg_dump execute the dump of an eventual comment of a
> >> TSDictionary without specifying the namespace where it is defined:
>
> > Great catch!
>
> One of my smarter CS professors taught me that whenever you find a bug,
> you should look around to see where else you made the same mistake.

Indeed, was planning to do so.

> Checking for other errors of the same ilk is depressingly fruitful :-(

Ah, ouch.

> It looks to me like operator classes, operator families, and all four
> types of text-search objects have this same error, and have for a long
> time. I'm also wondering if it wouldn't be wise for the dumpComment()
> call for procedural languages to use "lanschema", so that the comment
> TocEntry matches the parent object in both cases for PL objects.

That does sound like a good idea..

> I'm also kind of wondering why the ArchiveEntry() calls for casts and
> transforms specify "pg_catalog" as the schema but we don't do that in
> their dumpComment() calls. Maybe we don't need that hack and should
> specify NULL instead.

Hmmm, probably, though I've not looked specifically.

> > Right. I've got a few other patches queued up for pg_dump, so I'll
> > take care of this also.
>
> Do you want to deal with this whole mess, or shall I have a go at it?

I'm just about to push the pg_upgrade fixes for large object comments
and security labels, followed not too far behind by the fix for the
public ACL in pg_dump --clean mode. I have no objection to you handling
these and I can go look at some of the other items on my plate.

Thanks!

Stephen

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2017-03-06 21:24:43 Re: WARNING: relcache reference leak: relation "p1" not closed
Previous Message Peter Eisentraut 2017-03-06 21:13:36 Re: PATCH: pageinspect / add page_checksum and bt_page_items(bytea)