Skip to content

Commit

Permalink
Merge pull request #50 from dlr-eoc/feature/postgresql-security-definer
Browse files Browse the repository at this point in the history
Ownership mismatch on postgresql when multiple roles are writing to the same partitioned table
  • Loading branch information
maxtepkeev committed Jan 31, 2018
2 parents d4eb81f + 3103adf commit b87475a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion architect/databases/postgresql/partition.py
Expand Up @@ -57,7 +57,7 @@ def prepare(self):
EXECUTE 'INSERT INTO ' || tablename || ' VALUES (($1).*);' USING NEW;
RETURN NEW;
END;
$$ LANGUAGE plpgsql;
$$ LANGUAGE plpgsql SECURITY DEFINER;
-- Then we create a trigger which calls the before insert function
DO $$
Expand Down

0 comments on commit b87475a

Please sign in to comment.