From 2a6ef3445c73473edb222abf108b323fb7f002dc Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Thu, 5 Aug 2010 14:45:09 +0000 Subject: 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. --- src/include/commands/tablespace.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/include/commands/tablespace.h') diff --git a/src/include/commands/tablespace.h b/src/include/commands/tablespace.h index 3d46eeb650e..44eed246a1f 100644 --- a/src/include/commands/tablespace.h +++ b/src/include/commands/tablespace.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/commands/tablespace.h,v 1.23 2010/01/07 03:53:08 rhaas Exp $ + * $PostgreSQL: pgsql/src/include/commands/tablespace.h,v 1.24 2010/08/05 14:45:08 rhaas Exp $ * *------------------------------------------------------------------------- */ @@ -51,7 +51,7 @@ extern Oid GetDefaultTablespace(bool forTemp); extern void PrepareTempTablespaces(void); -extern Oid get_tablespace_oid(const char *tablespacename); +extern Oid get_tablespace_oid(const char *tablespacename, bool missing_ok); extern char *get_tablespace_name(Oid spc_oid); extern bool directory_is_empty(const char *path); -- cgit v1.2.3