Re: creating extension including dependencies - Mailing list pgsql-hackers

From Andres Freund
Subject Re: creating extension including dependencies
Date
Msg-id 20150902152738.GC5286@alap3.anarazel.de
Whole thread Raw
In response to Re: creating extension including dependencies  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: creating extension including dependencies
List pgsql-hackers
Hi,

I'm looking at committing this patch. I found some nitpick-level things
that I can easily fixup. But I dislike two things:

1) Passing the list of parents through the cascade DefElem strikes me as
incredibly ugly.

For one the cascade option really should take a true/false type option
on the C level (so you can do defGetBoolean()), for another passing
through the list of parents via DefElem->arg seems wrong. You're
supposed to be able to copy parsenodes and at the very least that's
broken by the approach.

2) I don't like the control flow around the schema selection.

It seems to be getting a bit arcane. How about instead moving the
"extension \"%s\" must be installed in schema \"%s\" check into the if
(control->schema != NULL) block and check for d_schema after it? That
should look cleaner.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: WIP: About CMake v2
Next
From: "Joshua D. Drake"
Date:
Subject: PSA: Upcoming Linux scheduler changes