OSDN Git Service

Implement partial-key searching of syscaches, per recent suggestion
[pg-rex/syncrep.git] / src / include / catalog / namespace.h
1 /*-------------------------------------------------------------------------
2  *
3  * namespace.h
4  *        prototypes for functions in backend/catalog/namespace.c
5  *
6  *
7  * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * $Id: namespace.h,v 1.6 2002/04/06 06:59:24 tgl Exp $
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef NAMESPACE_H
15 #define NAMESPACE_H
16
17 #include "nodes/primnodes.h"
18
19
20 /*
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.
26  */
27 typedef struct _FuncCandidateList
28 {
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 */
34
35
36 extern Oid      RangeVarGetRelid(const RangeVar *relation, bool failOK);
37
38 extern Oid      RangeVarGetCreationNamespace(const RangeVar *newRelation);
39
40 extern Oid      RelnameGetRelid(const char *relname);
41
42 extern Oid      TypenameGetTypid(const char *typname);
43
44 extern FuncCandidateList FuncnameGetCandidates(List *names, int nargs);
45
46 extern Oid      QualifiedNameGetCreationNamespace(List *names, char **objname_p);
47
48 extern RangeVar *makeRangeVarFromNameList(List *names);
49
50 extern bool isTempNamespace(Oid namespaceId);
51
52 /* stuff for search_path GUC variable */
53 extern char *namespace_search_path;
54
55 extern bool check_search_path(const char *proposed);
56 extern void assign_search_path(const char *newval);
57 extern void InitializeSearchPath(void);
58
59 #endif   /* NAMESPACE_H */