On Tue, Jul 21, 2015 at 11:20 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Petr Jelinek <petr@2ndquadrant.com> writes:
>> ... My main question is if we are
>> ok with SCHEMA having different behavior with CASCADE vs without
>> CASCADE. I went originally with "no" and added the DEFAULT flag to
>> SCHEMA. If the answer is "yes" then we don't need the flag (in that case
>> CASCADE acts as the flag).
>
> Yeah, I was coming around to that position as well. Insisting that
> SCHEMA throw an error if the extension isn't relocatable makes sense
> as long as only one extension is being considered, but once you say
> CASCADE it seems like mostly a usability fail. I think it's probably
> OK if with CASCADE, SCHEMA is just "use if needed else ignore".
OK, I'm fine with that, aka with CASCADE and a SCHEMA specified we use
it if needed or ignore it otherwise (if I am following correctly).
"CREATE EXTENSION foo SCHEMA bar" will fail if the extension is not
relocatable *and* does not have a schema specified in its control
file. A non-relocatable extension can be initially created anywhere.
It just cannot be moved afterwards from its original schema.
> Obviously we've gotta document all this properly.
Sure. That's a sine-qua-non condition for this patch.
Regards,
--
Michael