Avoid retaining multiple relation locks in RangeVarGetRelid.
authorRobert Haas <rhaas@postgresql.org>
Sat, 12 Nov 2011 06:22:45 +0000 (01:22 -0500)
committerRobert Haas <rhaas@postgresql.org>
Sat, 12 Nov 2011 06:22:45 +0000 (01:22 -0500)
commitaa3299f25601c1a27e52c1c49e92b7f11441e76b
treeabf3f60c301f697c3082e6d862ae2e895450739c
parenta6ce8ba2f3b280bb06cbca84a5375d42a25bea5f
Avoid retaining multiple relation locks in RangeVarGetRelid.

If it turns out we've locked the wrong OID, release the old lock.  In
most cases, it's pretty harmless to retain the extra lock, but this
seems tidier and avoids using lock table slots unnecessarily.

Per discussion with Tom Lane.
src/backend/catalog/namespace.c