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

From Alvaro Herrera
Subject Re: in-catalog Extension Scripts and Control parameters (templates?)
Date
Msg-id 20130315210018.GD3719@alvh.no-ip.org
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?)  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: in-catalog Extension Scripts and Control parameters (templates?)  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Re: in-catalog Extension Scripts and Control parameters (templates?)  (Heikki Linnakangas <hlinnakangas@vmware.com>)
List 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

pgsql-hackers by date:

Previous
From: robins
Date:
Subject: Re: Add some regression tests for SEQUENCE
Next
From: Bruce Momjian
Date:
Subject: Re: pg_test_fsync crashes on systems with POSIX signal handling