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

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
Cc: 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-03-15 21:00:18
Message-ID: 20130315210018.GD3719@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dimitri Fontaine wrote:

> Please find attached v3 of the Extension Templates patch, with full
> pg_dump support thanks to having merged default_full_version, appended
> with some regression tests now that it's possible.

Here's a rebased version; there were some merge conflicts with master.
I also fixed some compiler warnings. I haven't reviewed the patch in
any detail yet. One thing that jump at me from the code style
perspective is the strange way it deals with "isnull" from heap_getattr.
(I think most of these should just elog(ERROR) if a null attr is found).

Another thing is that I don't find the name "uptmpl" very clear.

We might wish to see about AtlerExtensionTemplateRename -- not only the
typo in the name but also the fact that it opens/closes the catalog for
each tuple to rename -- seems suboptimal.

Keeping the "template.c" file name seems wrong -- exttemplate.c maybe?
(I renamed the parse nodes to ExtTemplate)

There was a strange bug in pg_dump; it used "qto" where I thought
qversion was appropriate. I changed it (I looked at this hunk more
closely than most others because there was a compiler warning here, but
I didn't verify that it works.)

You seem to love using Capitalized Letters for some things in error
messages; I don't find these very pretty, and anyway they violate our
style guidelines. (I think these are in elog() not ereport() calls, but
still)

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
templates.v4.patch text/x-diff 195.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2013-03-15 21:15:19 Re: pg_test_fsync crashes on systems with POSIX signal handling
Previous Message robins 2013-03-15 20:33:37 Re: Add some regression tests for SEQUENCE