~vcs-imports/mammoth-replicator/trunk

« back to all changes in this revision

Viewing changes to src/include/catalog/namespace.h

  • Committer: alvherre
  • Date: 2005-12-16 21:24:52 UTC
  • Revision ID: svn-v4:db760fc0-0f08-0410-9d63-cc6633f64896:trunk:1
Initial import of the REL8_0_3 sources from the Pgsql CVS repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*-------------------------------------------------------------------------
 
2
 *
 
3
 * namespace.h
 
4
 *        prototypes for functions in backend/catalog/namespace.c
 
5
 *
 
6
 *
 
7
 * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
 
8
 * Portions Copyright (c) 1994, Regents of the University of California
 
9
 *
 
10
 * $PostgreSQL: pgsql/src/include/catalog/namespace.h,v 1.35 2004-12-31 22:03:24 pgsql 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
 */
 
26
typedef struct _FuncCandidateList
 
27
{
 
28
        struct _FuncCandidateList *next;
 
29
        int                     pathpos;                /* for internal use of namespace lookup */
 
30
        Oid                     oid;                    /* the function or operator's OID */
 
31
        int                     nargs;                  /* number of arg types returned */
 
32
        Oid                     args[1];                /* arg types --- VARIABLE LENGTH ARRAY */
 
33
}       *FuncCandidateList;     /* VARIABLE LENGTH STRUCT */
 
34
 
 
35
/*
 
36
 *      This structure holds a list of opclass candidates found by namespace
 
37
 *      lookup.
 
38
 */
 
39
typedef struct _OpclassCandidateList
 
40
{
 
41
        struct _OpclassCandidateList *next;
 
42
        char       *opcname_tmp;        /* for internal use of namespace lookup */
 
43
        int                     pathpos;                /* for internal use of namespace lookup */
 
44
        Oid                     oid;                    /* the opclass's OID */
 
45
        Oid                     opcintype;              /* type of data indexed by opclass */
 
46
        bool            opcdefault;             /* T if opclass is default for opcintype */
 
47
        Oid                     opckeytype;             /* type of data in index, or InvalidOid */
 
48
}       *OpclassCandidateList;
 
49
 
 
50
 
 
51
extern Oid      RangeVarGetRelid(const RangeVar *relation, bool failOK);
 
52
extern Oid      RangeVarGetCreationNamespace(const RangeVar *newRelation);
 
53
extern Oid      RelnameGetRelid(const char *relname);
 
54
extern bool RelationIsVisible(Oid relid);
 
55
 
 
56
extern Oid      TypenameGetTypid(const char *typname);
 
57
extern bool TypeIsVisible(Oid typid);
 
58
 
 
59
extern FuncCandidateList FuncnameGetCandidates(List *names, int nargs);
 
60
extern bool FunctionIsVisible(Oid funcid);
 
61
 
 
62
extern FuncCandidateList OpernameGetCandidates(List *names, char oprkind);
 
63
extern bool OperatorIsVisible(Oid oprid);
 
64
 
 
65
extern OpclassCandidateList OpclassGetCandidates(Oid amid);
 
66
extern Oid      OpclassnameGetOpcid(Oid amid, const char *opcname);
 
67
extern bool OpclassIsVisible(Oid opcid);
 
68
 
 
69
extern Oid      ConversionGetConid(const char *conname);
 
70
extern bool ConversionIsVisible(Oid conid);
 
71
 
 
72
extern void DeconstructQualifiedName(List *names,
 
73
                                                 char **nspname_p,
 
74
                                                 char **objname_p);
 
75
extern Oid      LookupExplicitNamespace(const char *nspname);
 
76
 
 
77
extern Oid      QualifiedNameGetCreationNamespace(List *names, char **objname_p);
 
78
extern RangeVar *makeRangeVarFromNameList(List *names);
 
79
extern char *NameListToString(List *names);
 
80
extern char *NameListToQuotedString(List *names);
 
81
 
 
82
extern bool isTempNamespace(Oid namespaceId);
 
83
extern bool isOtherTempNamespace(Oid namespaceId);
 
84
 
 
85
extern void PushSpecialNamespace(Oid namespaceId);
 
86
extern void PopSpecialNamespace(Oid namespaceId);
 
87
 
 
88
extern Oid      FindConversionByName(List *conname);
 
89
extern Oid      FindDefaultConversionProc(int4 for_encoding, int4 to_encoding);
 
90
 
 
91
/* initialization & transaction cleanup code */
 
92
extern void InitializeSearchPath(void);
 
93
extern void AtEOXact_Namespace(bool isCommit);
 
94
extern void AtEOSubXact_Namespace(bool isCommit, SubTransactionId mySubid,
 
95
                                                                  SubTransactionId parentSubid);
 
96
 
 
97
/* stuff for search_path GUC variable */
 
98
extern char *namespace_search_path;
 
99
 
 
100
extern List *fetch_search_path(bool includeImplicit);
 
101
 
 
102
#endif   /* NAMESPACE_H */