aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/execMain.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2010-08-05 14:45:09 +0000
committerRobert Haas <rhaas@postgresql.org>2010-08-05 14:45:09 +0000
commit2a6ef3445c73473edb222abf108b323fb7f002dc (patch)
treeca6a6f51dcf5193303f466c4072b243e3f979227 /src/backend/executor/execMain.c
parent641459f26954b04f74d098a758b716297b6554ea (diff)
downloadpostgresql-2a6ef3445c73473edb222abf108b323fb7f002dc.tar.gz
postgresql-2a6ef3445c73473edb222abf108b323fb7f002dc.zip
Standardize get_whatever_oid functions for object types with
unqualified names. - Add a missing_ok parameter to get_tablespace_oid. - Avoid duplicating get_tablespace_od guts in objectNamesToOids. - Add a missing_ok parameter to get_database_oid. - Replace get_roleid and get_role_checked with get_role_oid. - Add get_namespace_oid, get_language_oid, get_am_oid. - Refactor existing code to use new interfaces. Thanks to KaiGai Kohei for the review.
Diffstat (limited to 'src/backend/executor/execMain.c')
-rw-r--r--src/backend/executor/execMain.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c
index b21dbf4762b..7dfb2ecbb6b 100644
--- a/src/backend/executor/execMain.c
+++ b/src/backend/executor/execMain.c
@@ -26,7 +26,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/executor/execMain.c,v 1.353 2010/07/25 23:21:21 rhaas Exp $
+ * $PostgreSQL: pgsql/src/backend/executor/execMain.c,v 1.354 2010/08/05 14:45:02 rhaas Exp $
*
*-------------------------------------------------------------------------
*/
@@ -2134,12 +2134,7 @@ OpenIntoRel(QueryDesc *queryDesc)
*/
if (into->tableSpaceName)
{
- tablespaceId = get_tablespace_oid(into->tableSpaceName);
- if (!OidIsValid(tablespaceId))
- ereport(ERROR,
- (errcode(ERRCODE_UNDEFINED_OBJECT),
- errmsg("tablespace \"%s\" does not exist",
- into->tableSpaceName)));
+ tablespaceId = get_tablespace_oid(into->tableSpaceName, false);
}
else
{