Assert(IsTransactionState()) in RelationIdGetRelation().

Commit 42c80c696e added an
Assert(IsTransactionState()) in SearchCatCache(), to catch
any code that thought it could do a catcache lookup outside
transactions.  Extend the same idea to relcache lookups.
This commit is contained in:
Tom Lane 2014-02-06 11:28:13 -05:00
parent f31005e340
commit ddfc9cb054

View File

@ -1578,6 +1578,9 @@ RelationIdGetRelation(Oid relationId)
{
Relation rd;
/* Make sure we're in an xact, even if this ends up being a cache hit */
Assert(IsTransactionState());
/*
* first try to find reldesc in the cache
*/