Re: deparsing utility commands
От | Andres Freund |
---|---|
Тема | Re: deparsing utility commands |
Дата | |
Msg-id | 20150222152540.GE21496@awork2.anarazel.de обсуждение исходный текст |
Ответ на | Re: deparsing utility commands (Andres Freund <andres@2ndquadrant.com>) |
Список | pgsql-hackers |
On 2015-02-21 17:30:24 +0100, Andres Freund wrote: > > /* > > + * deparse_CreateFunctionStmt > > + * Deparse a CreateFunctionStmt (CREATE FUNCTION) > > + * > > + * Given a function OID and the parsetree that created it, return the JSON > > + * blob representing the creation command. > > + * > > + * XXX this is missing the per-function custom-GUC thing. > > + */ > > Subject: [PATCH 27/42] deparse: Support ALTER FUNCTION > > > + * deparse_AlterFunctionStmt > > + * Deparse a AlterFunctionStmt (ALTER FUNCTION) > > + * > > + * Given a function OID and the parsetree that created it, return the JSON > > + * blob representing the alter command. > > + * > > + * XXX this is missing the per-function custom-GUC thing. > > + */ > > Hm, so my earlier ptatch needs to partially be copied here. I'm running out of time now though... Updated 0003 attached that supports both SET for both CREATE and ALTER. In my previous patch I'd looked at proconfig for the values. A bit further thought revealed that that's not such a great idea: It works well enough for CREATE FUNCTION, but already breaks down at CREATE OR REPLACE FUNCTION unless we want to emit RESET ALL (SET ...)+ which seems mighty ugly. Also, the code is actually a good bit easier to understand this way. I. hate. arrays. ;) Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
Вложения
В списке pgsql-hackers по дате отправления: