aboutsummaryrefslogtreecommitdiff
path: root/contrib/postgres_fdw/postgres_fdw.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2019-06-12 11:30:11 +0900
committerMichael Paquier <michael@paquier.xyz>2019-06-12 11:30:11 +0900
commitceac4505d3428a8414b4f3d6708ea81506811a5f (patch)
treec8dd0356de70c8f8bad5a84bfe5b40a9173bf641 /contrib/postgres_fdw/postgres_fdw.c
parente788e849addd56007a0e75f3b5514f294a0f3bca (diff)
downloadpostgresql-ceac4505d3428a8414b4f3d6708ea81506811a5f.tar.gz
postgresql-ceac4505d3428a8414b4f3d6708ea81506811a5f.zip
Fix handling of COMMENT for domain constraints
For a non-superuser, changing a comment on a domain constraint was leading to a cache lookup failure as the code tried to perform the ownership lookup on the constraint OID itself, thinking that it was a type, but this check needs to happen on the type the domain constraint relies on. As the type a domain constraint relies on can be guessed directly based on the constraint OID, first fetch its type OID and perform the ownership on it. This is broken since 7eca575, which has split the handling of comments for table constraints and domain constraints, so back-patch down to 9.5. Reported-by: Clemens Ladisch Author: Daniel Gustafsson, Michael Paquier Reviewed-by: Álvaro Herrera Discussion: https://postgr.es/m/15833-808e11904835d26f@postgresql.org Backpatch-through: 9.5
Diffstat (limited to 'contrib/postgres_fdw/postgres_fdw.c')
0 files changed, 0 insertions, 0 deletions