Re: in-catalog Extension Scripts and Control parameters (templates?) - Mailing list pgsql-hackers

From Dimitri Fontaine
Subject Re: in-catalog Extension Scripts and Control parameters (templates?)
Date
Msg-id m2sj5ldxmh.fsf@2ndQuadrant.fr
Whole thread Raw
In response to Re: in-catalog Extension Scripts and Control parameters (templates?)  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Responses Re: in-catalog Extension Scripts and Control parameters (templates?)
Re: in-catalog Extension Scripts and Control parameters (templates?)
List pgsql-hackers
Dimitri Fontaine <dimitri@2ndQuadrant.fr> writes:
> Please find attached a new version of the patch, answering to most of
> your reviewing points. I'll post another version shortly with support
> for pg_dump and alter owner/rename.

So, as far as pg_dump is concerned, I have a trick question here.

We now have those new catalogs:
 - pg_extension_control - pg_extension_template - pg_extension_uptmpl

When doing CREATE EXTENSION, if we did use a template to find the
control information about it, we record a dependency. The template and
update_template (named uptmpl to make the name shorter) catalog entries
also have a pg_depend dependency towards the pg_extension_control.

Now, at pg_dump time, I want to be dumping the templates for the
extension and for updating the extension *before* the extension itself.
It seems to me that the dependency as setup will guarantee that.

The trick is that I don't have anything to dump for a given control
entry itself. So I could either add some more commands so that pg_dump
can setup the control then the template for creating or updating an
extension, or just have a dumpExtensionControl() that does nothing.

I'm not sure about which one to pick. Did I explain the problem properly
enough for someone to chime in?

Now that I've written this in that email, I think I'm going to go for
the new command. But maybe we have some precedent for objects that we
list in pg_dump only for solving several steps dependency lookups?

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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Number of buckets in a hash join
Next
From: Stephen Frost
Date:
Subject: Re: Re: proposal: a width specification for s specifier (format function), fix behave when positional and ordered placeholders are used