Re: in-catalog Extension Scripts and Control parameters (templates?)

From: Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com>
To: Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>
Cc: Jaime Casanova <jaime(at)2ndquadrant(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: in-catalog Extension Scripts and Control parameters (templates?)
Date: 2013-06-27 08:35:43
Message-ID: CAP7Qgmn6isKFCZWVagAWj7J=rP3btZYZortwmJ5QLgXeiAFEEw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jun 24, 2013 at 4:20 AM, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>wrote:

> Jaime Casanova <jaime(at)2ndquadrant(dot)com> writes:
> > just tried to build this one, but it doesn't apply cleanly anymore...
> > specially the ColId_or_Sconst contruct in gram.y
>
> Please find attached a new version of the patch, v7, rebased to current
> master tree and with some more cleanup. I've been using the new grammar
> entry NonReservedWord_or_Sconst, I'm not sure about that.
>
>
>
I played a bit with this patch.

- If I have control file that has the same name as template, create
extension picks up control file? Is this by design?
- Though control file is kind of global information among different
databases, pg_extension_template is not. Sounds a little weird to me.
- Why do we need with() clause even if I don't need it?
- I copied and paste from my plv8.control file to template script, and
MODULE_PATHNAME didn't work. By design?
-
foo=# create template for extension ex2 version '1.0' with (requires ex1)
as $$ $$;
ERROR: template option "requires" takes an argument
- create template ex2, create extension ex2, alter template ex2 rename to
ex3, create extension ex3, drop template ex3;
foo=# drop template for extension ex3 version '1.0';
ERROR: cannot drop unrecognized object 3179 16429 0 because other objects
depend on it
- a template that is created in another template script does not appear to
depend on the parent template.
- Without control file/template, attempt to create a new extension gives:
foo=# create extension plv8;
ERROR: extension "plv8" has no default control template
but can it be better, like "extension plv8 has no default control file or
template"?
- Do we really need separate tables, pg_extension_template and
pg_extension_control?
- Looks like both tables don't have toast tables. Some experiment gives:
ERROR: row is too big: size 8472, maximum size 8160

Thanks,

--
Hitoshi Harada

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Gierth 2013-06-27 08:41:59 Re: FILTER for aggregates [was Re: Department of Redundancy Department: makeNode(FuncCall) division]
Previous Message Dean Rasheed 2013-06-27 08:28:07 Re: MD5 aggregate