• Tom Lane's avatar
    Make CREATE EXTENSION check schema creation permissions. · d4aa4914
    Tom Lane authored
    When creating a new schema for a non-relocatable extension, we neglected
    to check whether the calling user has permission to create schemas.
    That didn't matter in the original coding, since we had already checked
    superuserness, but in the new dispensation where users need not be
    superusers, we should check it.  Use CreateSchemaCommand() rather than
    calling NamespaceCreate() directly, so that we also enforce the rules
    about reserved schema names.
    
    Per complaint from KaiGai Kohei, though this isn't the same as his patch.
    d4aa4914
extension.c 75.7 KB