Avoid retaining multiple relation locks in RangeVarGetRelid.

Robert Haas <rhaas@postgresql.org>

Commit: aa3299f25601c1a27e52c1c49e92b7f11441e76b
Author: Robert Haas <rhaas@postgresql.org>
Date: 2011-11-12T06:22:45Z
Releases: 9.2.0
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.

Files

PathChange+/−
src/backend/catalog/namespace.c modified +11 −2