diff options
author | Bruce Momjian <bruce@momjian.us> | 1998-04-27 04:08:07 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 1998-04-27 04:08:07 +0000 |
commit | 09baa3cc81fc7c53872e10a4cc196bff61207b19 (patch) | |
tree | d6e4008c07352e9a5dabcf69de65882db05c84c9 /src/backend/parser/parse_func.c | |
parent | e8fd57d7633ab9ddcd64861e13a59aa8dfbc3b05 (diff) | |
download | postgresql-09baa3cc81fc7c53872e10a4cc196bff61207b19.tar.gz postgresql-09baa3cc81fc7c53872e10a4cc196bff61207b19.zip |
This patch...
1. Removes the unnecessary "#define AbcRegProcedure 123"'s from
pg_proc.h.
2. Changes those #defines to use the names already defined in
fmgr.h.
3. Forces the make of fmgr.h in backend/Makefile instead of having
it
made as a dependency in access/common/Makefile *hack*hack*hack*
4. Rearranged the #includes to a less helter-skelter arrangement,
also
changing <file.h> to "file.h" to signify a non-system header.
5. Removed "pg_proc.h" from files where its only purpose was for
the
#defines removed in item #1.
6. Added "fmgr.h" to each file changed for completeness sake.
Turns out that #6 was not necessary for some files because fmgr.h
was being included in a roundabout way SIX levels deep by the first
include.
"access/genam.h"
->"access/relscan.h"
->"utils/rel.h"
->"access/strat.h"
->"access/skey.h"
->"fmgr.h"
So adding fmgr.h really didn't add anything to the compile, hopefully
just made it clearer to the programmer.
S Darren.
Diffstat (limited to 'src/backend/parser/parse_func.c')
-rw-r--r-- | src/backend/parser/parse_func.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/backend/parser/parse_func.c b/src/backend/parser/parse_func.c index ba79cc42726..7809e534bc0 100644 --- a/src/backend/parser/parse_func.c +++ b/src/backend/parser/parse_func.c @@ -7,13 +7,14 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.15 1998/02/26 04:33:30 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.16 1998/04/27 04:06:05 momjian Exp $ * *------------------------------------------------------------------------- */ #include <string.h> #include "postgres.h" + #include "access/genam.h" #include "access/heapam.h" #include "access/itup.h" @@ -356,7 +357,7 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs, * This function is then called (instead of SetEval) and "name" is * projected from its result. */ - funcid = SetEvalRegProcedure; + funcid = F_SETEVAL; rettype = toid; retset = true; true_oid_array = oid_array; @@ -415,8 +416,8 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs, /* * Sequence handling. */ - if (funcid == SeqNextValueRegProcedure || - funcid == SeqCurrValueRegProcedure) + if (funcid == F_NEXTVAL || + funcid == F_CURRVAL) { Const *seq; char *seqrel; @@ -434,14 +435,14 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs, seqrel = textout(seqname); if ((aclcheck_result = pg_aclcheck(seqrel, GetPgUserName(), - ((funcid == SeqNextValueRegProcedure) ? ACL_WR : ACL_RD))) + ((funcid == F_NEXTVAL) ? ACL_WR : ACL_RD))) != ACLCHECK_OK) elog(ERROR, "%s.%s: %s", seqrel, funcname, aclcheck_error_strings[aclcheck_result]); pfree(seqrel); - if (funcid == SeqNextValueRegProcedure && pstate->p_in_where_clause) + if (funcid == F_NEXTVAL && pstate->p_in_where_clause) elog(ERROR, "nextval of a sequence in WHERE disallowed"); } @@ -513,7 +514,7 @@ func_get_candidates(char *funcname, int nargs) ScanKeyEntryInitialize(&skey, (bits16) 0x0, (AttrNumber) 1, - (RegProcedure) NameEqualRegProcedure, + (RegProcedure) F_NAMEEQ, (Datum) funcname); idesc = index_openr(ProcedureNameIndex); @@ -873,7 +874,7 @@ find_inheritors(Oid relid, Oid **supervec) do { ScanKeyEntryInitialize(&skey, 0x0, Anum_pg_inherits_inhrel, - ObjectIdEqualRegProcedure, + F_OIDEQ, ObjectIdGetDatum(relid)); inhscan = heap_beginscan(inhrel, 0, false, 1, &skey); |