1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-16 06:01:02 +03:00

Allow callers to pass a missing_ok flag when opening a relation.

Since the names try_relation_openrv() and try_heap_openrv() don't seem
quite appropriate, rename the functions to relation_openrv_extended()
and heap_openrv_extended().  This is also more general, if we have a
future need for additional parameters that are of interest to only a
few callers.

This is infrastructure for a forthcoming patch to allow
get_object_address() to take a missing_ok argument as well.

Patch by me, review by Noah Misch.
This commit is contained in:
Robert Haas
2011-06-27 15:06:32 -04:00
parent e16954f3d2
commit 9abbed0629
4 changed files with 21 additions and 15 deletions

View File

@ -826,7 +826,7 @@ parserOpenTable(ParseState *pstate, const RangeVar *relation, int lockmode)
ParseCallbackState pcbstate;
setup_parser_errposition_callback(&pcbstate, pstate, relation->location);
rel = try_heap_openrv(relation, lockmode);
rel = heap_openrv_extended(relation, lockmode, true);
if (rel == NULL)
{
if (relation->schemaname)