1 /*-------------------------------------------------------------------------
4 * prototypes for functions in backend/catalog/namespace.c
7 * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * $Id: namespace.h,v 1.6 2002/04/06 06:59:24 tgl Exp $
12 *-------------------------------------------------------------------------
17 #include "nodes/primnodes.h"
21 * This structure holds a list of possible functions or operators
22 * found by namespace lookup. Each function/operator is identified
23 * by OID and by argument types; the list must be pruned by type
24 * resolution rules that are embodied in the parser, not here.
25 * The number of arguments is assumed to be known a priori.
27 typedef struct _FuncCandidateList
29 struct _FuncCandidateList *next;
30 int pathpos; /* for internal use of namespace lookup */
31 Oid oid; /* the function or operator's OID */
32 Oid args[1]; /* arg types --- VARIABLE LENGTH ARRAY */
33 } *FuncCandidateList; /* VARIABLE LENGTH STRUCT */
36 extern Oid RangeVarGetRelid(const RangeVar *relation, bool failOK);
38 extern Oid RangeVarGetCreationNamespace(const RangeVar *newRelation);
40 extern Oid RelnameGetRelid(const char *relname);
42 extern Oid TypenameGetTypid(const char *typname);
44 extern FuncCandidateList FuncnameGetCandidates(List *names, int nargs);
46 extern Oid QualifiedNameGetCreationNamespace(List *names, char **objname_p);
48 extern RangeVar *makeRangeVarFromNameList(List *names);
50 extern bool isTempNamespace(Oid namespaceId);
52 /* stuff for search_path GUC variable */
53 extern char *namespace_search_path;
55 extern bool check_search_path(const char *proposed);
56 extern void assign_search_path(const char *newval);
57 extern void InitializeSearchPath(void);
59 #endif /* NAMESPACE_H */