Re: in-catalog Extension Scripts and Control parameters (templates?)
Alvaro Herrera <alvherre@2ndquadrant.com>
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Dimitri Fontaine <dimitri@2ndQuadrant.fr>
Cc: Stephen Frost <sfrost@snowman.net>, Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2013-03-15T21:00:18Z
Lists: pgsql-hackers
Attachments
- templates.v4.patch (text/x-diff) patch v4
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