During work on knn-btree patchset we've faced the need to move
functions/operators from contrib to core [1].  In the extension
upgrade script we need to use @extschema@ in order to distinguish
contrib and core objects.  However, it appears to be possible to use
@extschema@ only in non-relocatable extensions.  Comment in
extension.c says: "For a relocatable extension, we needn't do this.
There cannot be any need for @extschema@, else it wouldn't be
relocatable.".  I've explored that we've marked extension as
non-relocatable solely to use @extschema@ in script before [2].

So, it appears that comment in extension.c isn't true.  There is at
least two precedents when relocatable extension needs to use
@extschema@.  We've marked possibly relocatable extension as
non-relocatable once.  And we could do it at the second time.
Extension relocatability doesn't seem to me much value to sacrifice.
But nevertheless should we allow relocatable extension to use
@extschema@.  Any thoughts?


Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Reply via email to