Re: Extensions support for pg_dump, patch v27

From: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>, Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>, "David E(dot) Wheeler" <david(at)kineticode(dot)com>, David Fetter <david(at)fetter(dot)org>, PostgreSQL-Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Extensions support for pg_dump, patch v27
Date: 2011-01-26 15:39:38
Message-ID: 871v3zfzd1.fsf@hi-media-techno.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr> writes:
>> The missing entry in pg_depend is the reason why the extension is not
>> part of the dump. We could fix that using a LEFT JOIN here and COALESCE
>> to force the namespace as pg_catalog. Is that not a kludge?
>
> Yes, it is. Why is the pg_depend entry missing?

See src/backend/catalog/pg_depend.c

/*
* If the referenced object is pinned by the system, there's no real
* need to record dependencies on it. This saves lots of space in
* pg_depend, so it's worth the time taken to check.
*/

Certainly, pg_catalog is pinned.

select *
from pg_depend
where refobjid = (select oid
from pg_namespace
where nspname = 'pg_catalog')
and refclassid = 'pg_namespace'::regclass;

classid | objid | objsubid | refclassid | refobjid | refobjsubid | deptype
---------+-------+----------+------------+----------+-------------+---------
0 | 0 | 0 | 2615 | 11 | 0 | p
(1 row)

Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-01-26 15:46:57 Re: [COMMITTERS] pgsql: Remove arbitrary ALTER TABLE .. ADD COLUMN restriction.
Previous Message David Fetter 2011-01-26 15:38:01 Re: [HACKERS] Seeking Mentors for Funded Reviewers