From: | Giuseppe Broccolo <giuseppe(dot)broccolo(at)2ndquadrant(dot)it> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | dump a comment of a TSDictionary |
Date: | 2017-03-06 12:49:24 |
Message-ID: | CAFzmHiWwwzLjzwM4x5ki5s_PDMR6NrkipZkjNnO3B0xEpBgJaA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi hackers,
I've seen that pg_dump execute the dump of an eventual comment of a
TSDictionary without
specifying the namespace where it is defined:
https://github.com/postgres/postgres/blob/master/src/bin/pg_dump/pg_dump.c#L13542
This is actually a problem if a new TSDictionary is created, in a different
schema specified by
the dumped search_path setting. I'd propose to change the current call in
src/bin/pg_dump/pg_dump.c:
dumpComment(fout, labelq->data,
NULL, dictinfo->rolname,
dictinfo->dobj.catId, 0,
dictinfo->dobj.dumpId);
with the following one:
dumpComment(fout, labelq->data,
dictinfo->dobj.namespace->dobj.
name, dictinfo->rolname,
dictinfo->dobj.catId, 0,
dictinfo->dobj.dumpId);
This is present in the master branch too, so potentially all the PostgreSQL
versions are affected.
Let me know what do you think about this change.
Regards,
Giuseppe.
--
Giuseppe Broccolo - 2ndQuadrant Italy
PostgreSQL & PostGIS Training, Services and Support
giuseppe(dot)broccolo(at)2ndQuadrant(dot)it | www.2ndQuadrant.it
From | Date | Subject | |
---|---|---|---|
Next Message | Dilip Kumar | 2017-03-06 13:15:48 | Re: Proposal : Parallel Merge Join |
Previous Message | Christoph Berg | 2017-03-06 12:42:33 | Re: One-shot expanded output in psql using \gx |