From 0a7fb4e9184539afcb6fed0f1d2bc0abddc2b0a6 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 28 May 2000 17:56:29 +0000 Subject: [PATCH] First round of changes for new fmgr interface. fmgr itself and the key call sites are changed, but most called functions are still oldstyle. An exception is that the PL managers are updated (so, for example, NULL handling now behaves as expected in plperl and plpgsql functions). NOTE initdb is forced due to added column in pg_proc. --- src/backend/Makefile | 19 +- src/backend/access/common/Makefile | 9 +- src/backend/access/index/indexam.c | 47 +- src/backend/access/index/istrat.c | 3 +- src/backend/bootstrap/bootstrap.c | 3 +- src/backend/catalog/heap.c | 5 +- src/backend/catalog/index.c | 13 +- src/backend/catalog/indexing.c | 3 +- src/backend/catalog/pg_operator.c | 3 +- src/backend/catalog/pg_proc.c | 90 +- src/backend/catalog/pg_type.c | 12 +- src/backend/commands/async.c | 3 +- src/backend/commands/command.c | 20 +- src/backend/commands/comment.c | 5 +- src/backend/commands/copy.c | 4 +- src/backend/commands/dbcommands.c | 3 +- src/backend/commands/define.c | 83 +- src/backend/commands/indexcmds.c | 5 +- src/backend/commands/proclang.c | 3 +- src/backend/commands/trigger.c | 10 +- src/backend/commands/user.c | 3 +- src/backend/commands/vacuum.c | 3 +- src/backend/executor/execQual.c | 168 +- src/backend/executor/execUtils.c | 6 +- src/backend/executor/functions.c | 81 +- src/backend/executor/nodeAgg.c | 95 +- src/backend/libpq/Makefile | 7 +- src/backend/libpq/be-pqexec.c | 41 +- src/backend/nodes/freefuncs.c | 6 +- src/backend/optimizer/path/clausesel.c | 3 +- src/backend/optimizer/path/indxpath.c | 3 +- src/backend/optimizer/util/plancat.c | 6 +- src/backend/parser/analyze.c | 3 +- src/backend/parser/parse_func.c | 3 +- src/backend/parser/parse_node.c | 11 +- src/backend/parser/parse_oper.c | 3 +- src/backend/port/dynloader/alpha.h | 4 +- src/backend/port/dynloader/bsdi.h | 2 +- src/backend/port/dynloader/hpux.c | 8 +- src/backend/port/dynloader/hpux.h | 6 +- src/backend/port/dynloader/linux.h | 4 +- src/backend/port/dynloader/qnx4.c | 4 +- src/backend/port/dynloader/qnx4.h | 4 +- src/backend/rewrite/rewriteRemove.c | 3 +- src/backend/storage/large_object/inv_api.c | 3 +- src/backend/tcop/Makefile | 12 +- src/backend/tcop/fastpath.c | 165 +- src/backend/utils/Gen_fmgrtab.sh.in | 196 +- src/backend/utils/Makefile | 17 +- src/backend/utils/adt/int8.c | 11 + src/backend/utils/adt/regproc.c | 3 +- src/backend/utils/adt/selfuncs.c | 10 +- src/backend/utils/adt/sets.c | 5 +- src/backend/utils/cache/catcache.c | 3 +- src/backend/utils/cache/fcache.c | 56 +- src/backend/utils/cache/relcache.c | 3 +- src/backend/utils/fmgr/dfmgr.c | 310 +-- src/backend/utils/fmgr/fmgr.c | 1787 ++++++++++------ src/backend/utils/init/postinit.c | 3 +- src/bin/scripts/createlang.sh | 4 +- src/include/access/valid.h | 4 +- src/include/c.h | 146 +- src/include/catalog/catversion.h | 4 +- src/include/catalog/pg_attribute.h | 44 +- src/include/catalog/pg_class.h | 4 +- src/include/catalog/pg_language.h | 20 +- src/include/catalog/pg_proc.h | 2198 ++++++++++---------- src/include/executor/functions.h | 10 +- src/include/fmgr.h | 301 +++ src/include/postgres.h | 27 +- src/include/utils/dynamic_loader.h | 22 +- src/include/utils/fcache.h | 33 +- src/include/utils/fmgrtab.h | 31 +- src/include/utils/int8.h | 24 +- src/interfaces/libpq/Makefile.in | 11 +- src/pl/plperl/plperl.c | 98 +- src/pl/plpgsql/src/pl_exec.c | 24 +- src/pl/plpgsql/src/pl_handler.c | 174 +- src/pl/plpgsql/src/plpgsql.h | 14 +- src/pl/tcl/pltcl.c | 90 +- 80 files changed, 3779 insertions(+), 2908 deletions(-) create mode 100644 src/include/fmgr.h diff --git a/src/backend/Makefile b/src/backend/Makefile index ae90a17b04..6af51106bd 100644 --- a/src/backend/Makefile +++ b/src/backend/Makefile @@ -34,7 +34,7 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.47 2000/05/11 17:46:28 momjian Exp $ +# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.48 2000/05/28 17:55:51 tgl Exp $ # #------------------------------------------------------------------------- @@ -79,7 +79,7 @@ all: postgres $(POSTGRES_IMP) global1.bki.source local1_template1.bki.source \ global1.description local1_template1.description ifneq ($(PORTNAME), win) -postgres: fmgr.h $(OBJS) $(VERSIONOBJ) +postgres: utils/fmgroids.h $(OBJS) $(VERSIONOBJ) $(CC) $(CFLAGS) -o postgres $(OBJS) $(OBJS1) $(VERSIONOBJ) $(LDFLAGS) else postgres: $(DLLOBJS) $(SRCDIR)/utils/dllinit.o postgres.def libpostgres.a @@ -126,15 +126,12 @@ parse.h: parser/parse.h parser/parse.h: $(MAKE) -C parser parse.h -fmgr.h: utils/fmgr.h - cp utils/fmgr.h . - -utils/fmgr.h: - $(MAKE) -C utils fmgr.h +utils/fmgroids.h: + $(MAKE) -C utils fmgroids.h ############################################################################# clean: - rm -f postgres$(X) $(POSTGRES_IMP) fmgr.h parse.h \ + rm -f postgres$(X) $(POSTGRES_IMP) parse.h \ global1.bki.source local1_template1.bki.source \ global1.description local1_template1.description ifeq ($(PORTNAME), win) @@ -205,7 +202,7 @@ install-templates: $(TEMPLATEDIR) \ $(INSTALL) $(INSTLOPTS) pg_options.sample \ $(TEMPLATEDIR)/pg_options.sample -install-headers: fmgr.h $(SRCDIR)/include/config.h +install-headers: utils/fmgroids.h $(SRCDIR)/include/config.h -@if [ ! -d $(HEADERDIR) ]; then mkdir $(HEADERDIR); fi -@if [ ! -d $(HEADERDIR)/port ]; then mkdir $(HEADERDIR)/port; fi -@if [ ! -d $(HEADERDIR)/port/$(PORTNAME) ]; \ @@ -222,8 +219,6 @@ install-headers: fmgr.h $(SRCDIR)/include/config.h then mkdir $(HEADERDIR)/executor; fi -@if [ ! -d $(HEADERDIR)/commands ]; \ then mkdir $(HEADERDIR)/commands; fi - $(INSTALL) $(INSTLOPTS) fmgr.h \ - $(HEADERDIR)/fmgr.h $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/os.h \ $(HEADERDIR)/os.h $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/config.h \ @@ -244,6 +239,8 @@ install-headers: fmgr.h $(SRCDIR)/include/config.h $(HEADERDIR)/utils/geo_decls.h $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/utils/elog.h \ $(HEADERDIR)/utils/elog.h + $(INSTALL) $(INSTLOPTS) utils/fmgroids.h \ + $(HEADERDIR)/utils/fmgroids.h $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/utils/palloc.h \ $(HEADERDIR)/utils/palloc.h $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/utils/mcxt.h \ diff --git a/src/backend/access/common/Makefile b/src/backend/access/common/Makefile index 594ed50a59..847b06b1d2 100644 --- a/src/backend/access/common/Makefile +++ b/src/backend/access/common/Makefile @@ -4,7 +4,7 @@ # Makefile for access/common # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/backend/access/common/Makefile,v 1.16 2000/01/19 02:58:50 petere Exp $ +# $Header: /cvsroot/pgsql/src/backend/access/common/Makefile,v 1.17 2000/05/28 17:55:52 tgl Exp $ # #------------------------------------------------------------------------- @@ -21,12 +21,7 @@ all: SUBSYS.o SUBSYS.o: $(OBJS) $(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS) -heaptuple.o heapvalid.o tupdesc.o: ../../fmgr.h - -../../fmgr.h: - $(MAKE) -C ../.. fmgr.h - -dep depend: ../../fmgr.h +dep depend: $(CC) -MM $(CFLAGS) *.c >depend clean: diff --git a/src/backend/access/index/indexam.c b/src/backend/access/index/indexam.c index e0672667c7..43d8a3850f 100644 --- a/src/backend/access/index/indexam.c +++ b/src/backend/access/index/indexam.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.42 2000/04/12 17:14:47 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.43 2000/05/28 17:55:52 tgl Exp $ * * INTERFACE ROUTINES * index_open - open an index relation by relationId @@ -418,28 +418,43 @@ GetIndexValue(HeapTuple tuple, bool *attNull) { Datum returnVal; - bool isNull = FALSE; if (PointerIsValid(fInfo) && FIgetProcOid(fInfo) != InvalidOid) { - int i; - Datum *attData = (Datum *) palloc(FIgetnArgs(fInfo) * sizeof(Datum)); + FmgrInfo flinfo; + FunctionCallInfoData fcinfo; + int i; + bool anynull = false; + + /* + * XXX ought to store lookup info in FuncIndexInfo so it need not + * be repeated on each call? + */ + fmgr_info(FIgetProcOid(fInfo), &flinfo); + + MemSet(&fcinfo, 0, sizeof(fcinfo)); + fcinfo.flinfo = &flinfo; + fcinfo.nargs = FIgetnArgs(fInfo); for (i = 0; i < FIgetnArgs(fInfo); i++) { - attData[i] = heap_getattr(tuple, - attrNums[i], - hTupDesc, - attNull); - if (*attNull) - isNull = TRUE; + fcinfo.arg[i] = heap_getattr(tuple, + attrNums[i], + hTupDesc, + &fcinfo.argnull[i]); + anynull |= fcinfo.argnull[i]; + } + if (flinfo.fn_strict && anynull) + { + /* force a null result for strict function */ + returnVal = (Datum) 0; + *attNull = true; + } + else + { + returnVal = FunctionCallInvoke(&fcinfo); + *attNull = fcinfo.isnull; } - returnVal = (Datum) fmgr_array_args(FIgetProcOid(fInfo), - FIgetnArgs(fInfo), - (char **) attData, - &isNull); - pfree(attData); - *attNull = isNull; } else returnVal = heap_getattr(tuple, attrNums[attOff], hTupDesc, attNull); diff --git a/src/backend/access/index/istrat.c b/src/backend/access/index/istrat.c index b0864e505f..5116b622dd 100644 --- a/src/backend/access/index/istrat.c +++ b/src/backend/access/index/istrat.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.42 2000/04/12 17:14:47 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.43 2000/05/28 17:55:52 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -24,6 +24,7 @@ #include "catalog/pg_index.h" #include "catalog/pg_operator.h" #include "miscadmin.h" +#include "utils/fmgroids.h" #include "utils/syscache.h" #ifdef USE_ASSERT_CHECKING diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c index a12bca9493..beb4b07904 100644 --- a/src/backend/bootstrap/bootstrap.c +++ b/src/backend/bootstrap/bootstrap.c @@ -8,7 +8,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.81 2000/04/12 17:14:54 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.82 2000/05/28 17:55:53 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -34,6 +34,7 @@ #include "miscadmin.h" #include "tcop/tcopprot.h" #include "utils/builtins.h" +#include "utils/fmgroids.h" #include "utils/lsyscache.h" #include "utils/portal.h" diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c index 762bff810d..5c0eff6e7c 100644 --- a/src/backend/catalog/heap.c +++ b/src/backend/catalog/heap.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.128 2000/05/25 21:25:32 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.129 2000/05/28 17:55:54 tgl Exp $ * * * INTERFACE ROUTINES @@ -63,6 +63,7 @@ #include "tcop/tcopprot.h" #include "utils/builtins.h" #include "utils/catcache.h" +#include "utils/fmgroids.h" #include "utils/portal.h" #include "utils/relcache.h" #include "utils/syscache.h" @@ -1148,7 +1149,7 @@ RelationTruncateIndexes(Relation heapRelation) /* If a valid where predicate, compute predicate Node */ if (VARSIZE(&index->indpred) != 0) { - predString = fmgr(F_TEXTOUT, &index->indpred); + predString = textout(&index->indpred); oldPred = stringToNode(predString); pfree(predString); } diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c index cfc5805b7c..3ef1931e59 100644 --- a/src/backend/catalog/index.c +++ b/src/backend/catalog/index.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.110 2000/05/20 23:11:28 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.111 2000/05/28 17:55:54 tgl Exp $ * * * INTERFACE ROUTINES @@ -42,6 +42,7 @@ #include "storage/smgr.h" #include "utils/builtins.h" #include "utils/catcache.h" +#include "utils/fmgroids.h" #include "utils/relcache.h" #include "utils/syscache.h" #include "utils/temprel.h" @@ -688,11 +689,11 @@ UpdateIndexRelation(Oid indexoid, if (predicate != NULL) { predString = nodeToString(predicate); - predText = (text *) fmgr(F_TEXTIN, predString); + predText = textin(predString); pfree(predString); } else - predText = (text *) fmgr(F_TEXTIN, ""); + predText = textin(""); predLen = VARSIZE(predText); itupLen = predLen + sizeof(FormData_pg_index); @@ -832,11 +833,11 @@ UpdateIndexPredicate(Oid indexoid, Node *oldPred, Node *predicate) if (newPred != NULL) { predString = nodeToString(newPred); - predText = (text *) fmgr(F_TEXTIN, predString); + predText = textin(predString); pfree(predString); } else - predText = (text *) fmgr(F_TEXTIN, ""); + predText = textin(""); /* open the index system catalog relation */ pg_index = heap_openr(IndexRelationName, RowExclusiveLock); @@ -2109,7 +2110,7 @@ reindex_index(Oid indexId, bool force) /* If a valid where predicate, compute predicate Node */ if (VARSIZE(&index->indpred) != 0) { - predString = fmgr(F_TEXTOUT, &index->indpred); + predString = textout(&index->indpred); oldPred = stringToNode(predString); pfree(predString); } diff --git a/src/backend/catalog/indexing.c b/src/backend/catalog/indexing.c index eb3d6debcc..79a987ba59 100644 --- a/src/backend/catalog/indexing.c +++ b/src/backend/catalog/indexing.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.60 2000/04/12 17:14:56 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.61 2000/05/28 17:55:54 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -24,6 +24,7 @@ #include "catalog/indexing.h" #include "catalog/pg_index.h" #include "miscadmin.h" +#include "utils/fmgroids.h" #include "utils/syscache.h" /* diff --git a/src/backend/catalog/pg_operator.c b/src/backend/catalog/pg_operator.c index b0508d259a..5796b11b98 100644 --- a/src/backend/catalog/pg_operator.c +++ b/src/backend/catalog/pg_operator.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.49 2000/01/26 05:56:10 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.50 2000/05/28 17:55:54 tgl Exp $ * * NOTES * these routines moved here from commands/define.c and somewhat cleaned up. @@ -26,6 +26,7 @@ #include "miscadmin.h" #include "parser/parse_func.h" #include "utils/builtins.h" +#include "utils/fmgroids.h" #include "utils/syscache.h" diff --git a/src/backend/catalog/pg_proc.c b/src/backend/catalog/pg_proc.c index aa23a3be8c..6ddc343aaa 100644 --- a/src/backend/catalog/pg_proc.c +++ b/src/backend/catalog/pg_proc.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.42 2000/04/12 17:14:56 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.43 2000/05/28 17:55:54 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -17,6 +17,7 @@ #include "access/heapam.h" #include "catalog/catname.h" #include "catalog/indexing.h" +#include "catalog/pg_language.h" #include "catalog/pg_proc.h" #include "catalog/pg_type.h" #include "miscadmin.h" @@ -24,7 +25,6 @@ #include "parser/parse_type.h" #include "tcop/tcopprot.h" #include "utils/builtins.h" -#include "utils/fmgrtab.h" #include "utils/lsyscache.h" #include "utils/sets.h" #include "utils/syscache.h" @@ -41,8 +41,9 @@ ProcedureCreate(char *procedureName, char *languageName, char *prosrc, char *probin, - bool canCache, bool trusted, + bool canCache, + bool isStrict, int32 byte_pct, int32 perbyte_cpu, int32 percall_cpu, @@ -74,6 +75,15 @@ ProcedureCreate(char *procedureName, Assert(PointerIsValid(prosrc)); Assert(PointerIsValid(probin)); + tup = SearchSysCacheTuple(LANGNAME, + PointerGetDatum(languageName), + 0, 0, 0); + + if (!HeapTupleIsValid(tup)) + elog(ERROR, "ProcedureCreate: no such language '%s'", languageName); + + languageObjectId = tup->t_data->t_oid; + parameterCount = 0; MemSet(typev, 0, FUNC_MAX_ARGS * sizeof(Oid)); foreach(x, argList) @@ -86,7 +96,7 @@ ProcedureCreate(char *procedureName, if (strcmp(strVal(t), "opaque") == 0) { - if (strcmp(languageName, "sql") == 0) + if (languageObjectId == SQLlanguageId) elog(ERROR, "ProcedureCreate: sql functions cannot take type \"opaque\""); toid = 0; } @@ -120,7 +130,7 @@ ProcedureCreate(char *procedureName, elog(ERROR, "ProcedureCreate: procedure %s already exists with same arguments", procedureName); - if (!strcmp(languageName, "sql")) + if (languageObjectId == SQLlanguageId) { /* @@ -129,7 +139,7 @@ ProcedureCreate(char *procedureName, * matches a function already in pg_proc. If so just return the * OID of the existing set. */ - if (!strcmp(procedureName, GENERICSETNAME)) + if (strcmp(procedureName, GENERICSETNAME) == 0) { #ifdef SETS_FIXED /* ---------- @@ -138,7 +148,7 @@ ProcedureCreate(char *procedureName, * have been removed. Instead a sequential heap scan * or something better must get implemented. The reason * for removing is that nbtree index crashes if sources - * exceed 2K what's likely for procedural languages. + * exceed 2K --- what's likely for procedural languages. * * 1999/09/30 Jan * ---------- @@ -158,18 +168,9 @@ ProcedureCreate(char *procedureName, } } - tup = SearchSysCacheTuple(LANGNAME, - PointerGetDatum(languageName), - 0, 0, 0); - - if (!HeapTupleIsValid(tup)) - elog(ERROR, "ProcedureCreate: no such language %s", languageName); - - languageObjectId = tup->t_data->t_oid; - if (strcmp(returnTypeName, "opaque") == 0) { - if (strcmp(languageName, "sql") == 0) + if (languageObjectId == SQLlanguageId) elog(ERROR, "ProcedureCreate: sql functions cannot return type \"opaque\""); typeObjectId = 0; } @@ -181,16 +182,10 @@ ProcedureCreate(char *procedureName, { elog(NOTICE, "ProcedureCreate: type '%s' is not yet defined", returnTypeName); -#ifdef NOT_USED - elog(NOTICE, "ProcedureCreate: creating a shell for type '%s'", - returnTypeName); -#endif typeObjectId = TypeShellMake(returnTypeName); if (!OidIsValid(typeObjectId)) - { elog(ERROR, "ProcedureCreate: could not create type '%s'", returnTypeName); - } } else if (!defined) { @@ -219,7 +214,7 @@ ProcedureCreate(char *procedureName, * procedure's text in the prosrc attribute. */ - if (strcmp(languageName, "sql") == 0) + if (languageObjectId == SQLlanguageId) { querytree_list = pg_parse_and_rewrite(prosrc, typev, parameterCount, FALSE); @@ -237,16 +232,50 @@ ProcedureCreate(char *procedureName, * FUNCTION xyz AS '' LANGUAGE 'internal'. To preserve some modicum * of backwards compatibility, accept an empty 'prosrc' value as * meaning the supplied SQL function name. + * + * XXX: we could treat "internal" and "newinternal" language specs + * as equivalent, and take the actual language ID from the table of + * known builtin functions. Is that a better idea than making the + * user specify the right thing? Not sure. */ - if (strcmp(languageName, "internal") == 0) + if (languageObjectId == INTERNALlanguageId || + languageObjectId == NEWINTERNALlanguageId) { + Oid actualLangID; + if (strlen(prosrc) == 0) prosrc = procedureName; - if (fmgr_lookupByName(prosrc) == (func_ptr) NULL) + actualLangID = fmgr_internal_language(prosrc); + if (actualLangID == InvalidOid) elog(ERROR, - "ProcedureCreate: there is no builtin function named \"%s\"", + "ProcedureCreate: there is no builtin function named \"%s\"", prosrc); + if (actualLangID != languageObjectId) + elog(ERROR, + "ProcedureCreate: \"%s\" is not %s internal function", + prosrc, + ((languageObjectId == INTERNALlanguageId) ? + "an old-style" : "a new-style")); + } + + /* + * If this is a dynamically loadable procedure, make sure that the + * library file exists, is loadable, and contains the specified link + * symbol. + * + * We used to perform these checks only when the function was first + * called, but it seems friendlier to verify the library's validity + * at CREATE FUNCTION time. + */ + + if (languageObjectId == ClanguageId || + languageObjectId == NEWClanguageId) + { + /* If link symbol is specified as "-", substitute procedure name */ + if (strcmp(prosrc, "-") == 0) + prosrc = procedureName; + (void) load_external_function(probin, prosrc); } /* @@ -265,9 +294,10 @@ ProcedureCreate(char *procedureName, values[i++] = Int32GetDatum(GetUserId()); values[i++] = ObjectIdGetDatum(languageObjectId); /* XXX isinherited is always false for now */ - values[i++] = Int8GetDatum((bool) 0); + values[i++] = Int8GetDatum((bool) false); values[i++] = Int8GetDatum(trusted); values[i++] = Int8GetDatum(canCache); + values[i++] = Int8GetDatum(isStrict); values[i++] = UInt16GetDatum(parameterCount); values[i++] = Int8GetDatum(returnsSet); values[i++] = ObjectIdGetDatum(typeObjectId); @@ -276,8 +306,8 @@ ProcedureCreate(char *procedureName, values[i++] = Int32GetDatum(perbyte_cpu); /* properbyte_cpu */ values[i++] = Int32GetDatum(percall_cpu); /* propercall_cpu */ values[i++] = Int32GetDatum(outin_ratio); /* prooutin_ratio */ - values[i++] = (Datum) fmgr(F_TEXTIN, prosrc); /* prosrc */ - values[i++] = (Datum) fmgr(F_TEXTIN, probin); /* probin */ + values[i++] = (Datum) textin(prosrc); /* prosrc */ + values[i++] = (Datum) textin(probin); /* probin */ rel = heap_openr(ProcedureRelationName, RowExclusiveLock); diff --git a/src/backend/catalog/pg_type.c b/src/backend/catalog/pg_type.c index 4c3120c40f..9386079997 100644 --- a/src/backend/catalog/pg_type.c +++ b/src/backend/catalog/pg_type.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.50 2000/04/12 17:14:56 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.51 2000/05/28 17:55:54 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -21,6 +21,7 @@ #include "miscadmin.h" #include "parser/parse_func.h" #include "utils/builtins.h" +#include "utils/fmgroids.h" #include "utils/syscache.h" @@ -190,7 +191,7 @@ TypeShellMakeWithOpenRelation(Relation pg_type_desc, char *typeName) /* * ... and fill typdefault with a bogus value */ - values[i++] = (Datum) fmgr(F_TEXTIN, typeName); /* 15 */ + values[i++] = (Datum) textin(typeName); /* 15 */ /* ---------------- * create a new type tuple with FormHeapTuple @@ -449,10 +450,9 @@ TypeCreate(char *typeName, * initialize the default value for this type. * ---------------- */ - values[i] = (Datum) fmgr(F_TEXTIN, /* 16 */ - PointerIsValid(defaultTypeValue) - ? defaultTypeValue : "-"); /* XXX default - * typdefault */ + values[i] = (Datum) textin(PointerIsValid(defaultTypeValue) /* 16 */ + ? defaultTypeValue : "-"); /* XXX default + * typdefault */ /* ---------------- * open pg_type and begin a scan for the type name. diff --git a/src/backend/commands/async.c b/src/backend/commands/async.c index c045f09b83..8225f3a7ca 100644 --- a/src/backend/commands/async.c +++ b/src/backend/commands/async.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.60 2000/05/14 03:18:35 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.61 2000/05/28 17:55:54 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -87,6 +87,7 @@ #include "libpq/libpq.h" #include "libpq/pqformat.h" #include "miscadmin.h" +#include "utils/fmgroids.h" #include "utils/ps_status.h" #include "utils/syscache.h" #include "utils/trace.h" diff --git a/src/backend/commands/command.c b/src/backend/commands/command.c index 2b9f6a257b..4fb184b7f6 100644 --- a/src/backend/commands/command.c +++ b/src/backend/commands/command.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.71 2000/04/12 17:14:57 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.72 2000/05/28 17:55:54 tgl Exp $ * * NOTES * The PortalExecutorHeapMemory crap needs to be eliminated @@ -40,6 +40,7 @@ #include "optimizer/prep.h" #include "utils/acl.h" #include "utils/builtins.h" +#include "utils/fmgroids.h" #include "utils/syscache.h" #include "utils/temprel.h" #include "commands/trigger.h" @@ -614,12 +615,15 @@ AlterTableAlterColumn(const char *relationName, HeapTuple tuple; attr_rel = heap_openr(AttributeRelationName, AccessExclusiveLock); - ScanKeyEntryInitialize(&scankeys[0], 0x0, Anum_pg_attribute_attrelid, F_OIDEQ, + ScanKeyEntryInitialize(&scankeys[0], 0x0, + Anum_pg_attribute_attrelid, F_OIDEQ, ObjectIdGetDatum(myrelid)); - ScanKeyEntryInitialize(&scankeys[1], 0x0, Anum_pg_attribute_attnum, F_INT2EQ, + ScanKeyEntryInitialize(&scankeys[1], 0x0, + Anum_pg_attribute_attnum, F_INT2EQ, Int16GetDatum(attnum)); - ScanKeyEntryInitialize(&scankeys[2], 0x0, Anum_pg_attribute_atthasdef, F_BOOLEQ, - TRUE); + ScanKeyEntryInitialize(&scankeys[2], 0x0, + Anum_pg_attribute_atthasdef, F_BOOLEQ, + Int32GetDatum(TRUE)); scan = heap_beginscan(attr_rel, false, SnapshotNow, 3, scankeys); AssertState(scan != NULL); @@ -661,9 +665,11 @@ drop_default(Oid relid, int16 attnum) HeapTuple tuple; attrdef_rel = heap_openr(AttrDefaultRelationName, AccessExclusiveLock); - ScanKeyEntryInitialize(&scankeys[0], 0x0, Anum_pg_attrdef_adrelid, F_OIDEQ, + ScanKeyEntryInitialize(&scankeys[0], 0x0, + Anum_pg_attrdef_adrelid, F_OIDEQ, ObjectIdGetDatum(relid)); - ScanKeyEntryInitialize(&scankeys[1], 0x0, Anum_pg_attrdef_adnum, F_INT2EQ, + ScanKeyEntryInitialize(&scankeys[1], 0x0, + Anum_pg_attrdef_adnum, F_INT2EQ, Int16GetDatum(attnum)); scan = heap_beginscan(attrdef_rel, false, SnapshotNow, 2, scankeys); diff --git a/src/backend/commands/comment.c b/src/backend/commands/comment.c index 3fe7b6f634..f33189d3ee 100644 --- a/src/backend/commands/comment.c +++ b/src/backend/commands/comment.c @@ -27,11 +27,12 @@ #include "catalog/pg_type.h" #include "commands/comment.h" #include "miscadmin.h" +#include "parser/parse.h" #include "rewrite/rewriteRemove.h" #include "utils/acl.h" +#include "utils/fmgroids.h" #include "utils/syscache.h" -#include "../backend/parser/parse.h" /*------------------------------------------------------------------ * Static Function Prototypes -- @@ -153,7 +154,7 @@ CreateComments(Oid oid, char *comment) } i = 0; values[i++] = ObjectIdGetDatum(oid); - values[i++] = (Datum) fmgr(F_TEXTIN, comment); + values[i++] = (Datum) textin(comment); } /*** Now, open pg_description and attempt to find the old tuple ***/ diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c index 65dff8ed44..4285663a16 100644 --- a/src/backend/commands/copy.c +++ b/src/backend/commands/copy.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.106 2000/05/18 01:52:45 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.107 2000/05/28 17:55:54 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -680,7 +680,7 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim, char *null indexNatts[i] = natts; if (VARSIZE(&pgIndexP[i]->indpred) != 0) { - predString = fmgr(F_TEXTOUT, &pgIndexP[i]->indpred); + predString = textout(&pgIndexP[i]->indpred); indexPred[i] = stringToNode(predString); pfree(predString); /* make dummy ExprContext for use by ExecQual */ diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c index 4458edafaf..b08f654504 100644 --- a/src/backend/commands/dbcommands.c +++ b/src/backend/commands/dbcommands.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.54 2000/05/25 06:53:43 ishii Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.55 2000/05/28 17:55:55 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -37,6 +37,7 @@ #include "storage/fd.h" /* for closeAllVfds */ #include "storage/sinval.h" /* for DatabaseHasActiveBackends */ #include "utils/builtins.h" +#include "utils/fmgroids.h" #include "utils/elog.h" #include "utils/palloc.h" #include "utils/rel.h" diff --git a/src/backend/commands/define.c b/src/backend/commands/define.c index 5bc75faaec..da87287217 100644 --- a/src/backend/commands/define.c +++ b/src/backend/commands/define.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.42 2000/05/12 18:51:59 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.43 2000/05/28 17:55:55 tgl Exp $ * * DESCRIPTION * The "DefineFoo" routines take the parse tree and pick out the @@ -35,8 +35,6 @@ */ #include #include -#include - #include "postgres.h" @@ -66,18 +64,20 @@ static void case_translate_language_name(const char *input, char *output) { /*------------------------------------------------------------------------- - Translate the input language name to lower case, except if it's C, - translate to upper case. + Translate the input language name to lower case, except if it's "C", + translate to upper case, or "newC", translate to that spelling. --------------------------------------------------------------------------*/ int i; - for (i = 0; i < NAMEDATALEN && input[i]; ++i) + for (i = 0; i < NAMEDATALEN-1 && input[i]; ++i) output[i] = tolower(input[i]); output[i] = '\0'; if (strcmp(output, "c") == 0) output[0] = 'C'; + else if (strcmp(output, "newc") == 0) + output[3] = 'C'; } @@ -108,9 +108,10 @@ compute_return_type(const Node *returnType, static void -compute_full_attributes(List *parameters, int32 *byte_pct_p, - int32 *perbyte_cpu_p, int32 *percall_cpu_p, - int32 *outin_ratio_p, bool *canCache_p) +compute_full_attributes(List *parameters, + int32 *byte_pct_p, int32 *perbyte_cpu_p, + int32 *percall_cpu_p, int32 *outin_ratio_p, + bool *canCache_p, bool *isStrict_p) { /*-------------------------------------------------------------------------- Interpret the parameters *parameters and return their contents as @@ -119,14 +120,20 @@ compute_full_attributes(List *parameters, int32 *byte_pct_p, These parameters supply optional information about a function. All have defaults if not specified. - Note: as of version 6.6, canCache is used (if set, the optimizer's - constant-folder is allowed to pre-evaluate the function if all its - inputs are constant). The other four are not used. They used to be + Note: currently, only two of these parameters actually do anything: + + * canCache means the optimizer's constant-folder is allowed to + pre-evaluate the function when all its inputs are constants. + + * isStrict means the function should not be called when any NULL + inputs are present; instead a NULL result value should be assumed. + + The other four parameters are not used anywhere. They used to be used in the "expensive functions" optimizer, but that's been dead code for a long time. - Since canCache is useful for any function, we now allow attributes to be - supplied for all functions regardless of language. + Since canCache and isStrict are useful for any function, we now allow + attributes to be supplied for all functions regardless of language. ---------------------------------------------------------------------------*/ List *pl; @@ -136,6 +143,7 @@ compute_full_attributes(List *parameters, int32 *byte_pct_p, *percall_cpu_p = PERCALL_CPU; *outin_ratio_p = OUTIN_RATIO; *canCache_p = false; + *isStrict_p = false; foreach(pl, parameters) { @@ -143,6 +151,8 @@ compute_full_attributes(List *parameters, int32 *byte_pct_p, if (strcasecmp(param->defname, "iscachable") == 0) *canCache_p = true; + else if (strcasecmp(param->defname, "isstrict") == 0) + *isStrict_p = true; else if (strcasecmp(param->defname, "trusted") == 0) { @@ -182,24 +192,17 @@ static void interpret_AS_clause(const char *languageName, const List *as, char **prosrc_str_p, char **probin_str_p) { - struct stat stat_buf; - Assert(as != NIL); - if (strcmp(languageName, "C") == 0) + if (strcmp(languageName, "C") == 0 || + strcmp(languageName, "newC") == 0) { /* * For "C" language, store the file name in probin and, when - * given, the link symbol name in prosrc. But first, stat the - * file to make sure it's there! + * given, the link symbol name in prosrc. */ - - if (stat(strVal(lfirst(as)), &stat_buf) == -1) - elog(ERROR, "stat failed on file '%s': %m", strVal(lfirst(as))); - *probin_str_p = strVal(lfirst(as)); - if (lnext(as) == NULL) *prosrc_str_p = "-"; else @@ -239,8 +242,8 @@ CreateFunction(ProcedureStmt *stmt, CommandDest dest) char languageName[NAMEDATALEN]; /* - * name of language of function, with case adjusted: "C", "internal", - * or "SQL" + * name of language of function, with case adjusted: "C", "newC", + * "internal", "newinternal", "sql", etc. */ bool returnsSet; @@ -257,19 +260,21 @@ CreateFunction(ProcedureStmt *stmt, CommandDest dest) perbyte_cpu, percall_cpu, outin_ratio; - bool canCache; - + bool canCache, + isStrict; case_translate_language_name(stmt->language, languageName); if (strcmp(languageName, "C") == 0 || - strcmp(languageName, "internal") == 0) + strcmp(languageName, "newC") == 0 || + strcmp(languageName, "internal") == 0 || + strcmp(languageName, "newinternal") == 0) { if (!superuser()) elog(ERROR, "Only users with Postgres superuser privilege are " - "permitted to create a function " - "in the '%s' language. Others may use the 'sql' language " + "permitted to create a function in the '%s' language.\n\t" + "Others may use the 'sql' language " "or the created procedural languages.", languageName); } @@ -288,28 +293,23 @@ CreateFunction(ProcedureStmt *stmt, CommandDest dest) 0, 0, 0); if (!HeapTupleIsValid(languageTuple)) - { - elog(ERROR, "Unrecognized language specified in a CREATE FUNCTION: " - "'%s'. Recognized languages are sql, C, internal " - "and the created procedural languages.", + "'%s'.\n\tRecognized languages are sql, C, newC, " + "internal, newinternal, and created procedural languages.", languageName); - } /* Check that this language is a PL */ languageStruct = (Form_pg_language) GETSTRUCT(languageTuple); if (!(languageStruct->lanispl)) - { elog(ERROR, "Language '%s' isn't defined as PL", languageName); - } /* * Functions in untrusted procedural languages are restricted to * be defined by postgres superusers only */ - if (languageStruct->lanpltrusted == false && !superuser()) + if (!languageStruct->lanpltrusted && !superuser()) { elog(ERROR, "Only users with Postgres superuser privilege " "are permitted to create a function in the '%s' " @@ -324,7 +324,7 @@ CreateFunction(ProcedureStmt *stmt, CommandDest dest) compute_full_attributes(stmt->withClause, &byte_pct, &perbyte_cpu, &percall_cpu, - &outin_ratio, &canCache); + &outin_ratio, &canCache, &isStrict); interpret_AS_clause(languageName, stmt->as, &prosrc_str, &probin_str); @@ -338,8 +338,9 @@ CreateFunction(ProcedureStmt *stmt, CommandDest dest) languageName, prosrc_str, /* converted to text later */ probin_str, /* converted to text later */ - canCache, true, /* (obsolete "trusted") */ + canCache, + isStrict, byte_pct, perbyte_cpu, percall_cpu, diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c index 16ad849d8f..826efa40bb 100644 --- a/src/backend/commands/indexcmds.c +++ b/src/backend/commands/indexcmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.26 2000/04/25 10:38:38 inoue Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.27 2000/05/28 17:55:55 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -37,6 +37,7 @@ #include "parser/parse_func.h" #include "parser/parse_type.h" #include "utils/builtins.h" +#include "utils/fmgroids.h" #include "utils/syscache.h" #include "miscadmin.h" /* ReindexDatabase() */ #include "utils/portal.h" /* ReindexDatabase() */ @@ -298,7 +299,7 @@ ExtendIndex(char *indexRelationName, Expr *predicate, List *rangetable) { char *predString; - predString = fmgr(F_TEXTOUT, &index->indpred); + predString = textout(&index->indpred); oldPred = stringToNode(predString); pfree(predString); } diff --git a/src/backend/commands/proclang.c b/src/backend/commands/proclang.c index 47d2201c82..9b5f7c1ddf 100644 --- a/src/backend/commands/proclang.c +++ b/src/backend/commands/proclang.c @@ -17,6 +17,7 @@ #include "catalog/pg_shadow.h" #include "commands/proclang.h" #include "fmgr.h" +#include "utils/builtins.h" #include "utils/syscache.h" @@ -119,7 +120,7 @@ CreateProceduralLanguage(CreatePLangStmt *stmt) values[i++] = Int8GetDatum((bool) 1); values[i++] = Int8GetDatum(stmt->pltrusted); values[i++] = ObjectIdGetDatum(procTup->t_data->t_oid); - values[i++] = (Datum) fmgr(F_TEXTIN, stmt->plcompiler); + values[i++] = (Datum) textin(stmt->plcompiler); rel = heap_openr(LanguageRelationName, RowExclusiveLock); diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c index c79ce0cea5..49f5570e8f 100644 --- a/src/backend/commands/trigger.c +++ b/src/backend/commands/trigger.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.64 2000/04/16 04:25:42 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.65 2000/05/28 17:55:55 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -27,6 +27,7 @@ #include "miscadmin.h" #include "utils/acl.h" #include "utils/builtins.h" +#include "utils/fmgroids.h" #include "utils/inval.h" #include "utils/syscache.h" #include "utils/tqual.h" @@ -757,16 +758,9 @@ equalTriggerDescs(TriggerDesc *trigdesc1, TriggerDesc *trigdesc2) static HeapTuple ExecCallTriggerFunc(Trigger *trigger) { - if (trigger->tgfunc.fn_addr == NULL) fmgr_info(trigger->tgfoid, &trigger->tgfunc); - if (trigger->tgfunc.fn_plhandler != NULL) - { - return (HeapTuple) (*(trigger->tgfunc.fn_plhandler)) - (&trigger->tgfunc); - } - return (HeapTuple) ((*fmgr_faddr(&trigger->tgfunc)) ()); } diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c index 2e01e6e202..ea5f457448 100644 --- a/src/backend/commands/user.c +++ b/src/backend/commands/user.c @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: user.c,v 1.53 2000/05/04 20:06:07 tgl Exp $ + * $Id: user.c,v 1.54 2000/05/28 17:55:55 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -33,6 +33,7 @@ #include "utils/acl.h" #include "utils/array.h" #include "utils/builtins.h" +#include "utils/fmgroids.h" #include "utils/syscache.h" static void CheckPgUserAclNotNull(void); diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c index 0c0c5f4785..3a9b972b9e 100644 --- a/src/backend/commands/vacuum.c +++ b/src/backend/commands/vacuum.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.148 2000/05/19 03:22:29 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.149 2000/05/28 17:55:55 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -38,6 +38,7 @@ #include "tcop/tcopprot.h" #include "utils/acl.h" #include "utils/builtins.h" +#include "utils/fmgroids.h" #include "utils/inval.h" #include "utils/portal.h" #include "utils/relcache.h" diff --git a/src/backend/executor/execQual.c b/src/backend/executor/execQual.c index 58307e6a69..a53957c4f4 100644 --- a/src/backend/executor/execQual.c +++ b/src/backend/executor/execQual.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.69 2000/04/12 17:15:08 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.70 2000/05/28 17:55:55 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -41,6 +41,7 @@ #include "executor/functions.h" #include "executor/nodeSubplan.h" #include "utils/builtins.h" +#include "utils/fmgroids.h" #include "utils/fcache2.h" @@ -64,7 +65,8 @@ static Datum ExecEvalAnd(Expr *andExpr, ExprContext *econtext, bool *isNull); static Datum ExecEvalFunc(Expr *funcClause, ExprContext *econtext, bool *isNull, bool *isDone); static void ExecEvalFuncArgs(FunctionCachePtr fcache, ExprContext *econtext, - List *argList, Datum argV[], bool *argIsDone); + List *argList, FunctionCallInfo fcinfo, + bool *argIsDone); static Datum ExecEvalNot(Expr *notclause, ExprContext *econtext, bool *isNull); static Datum ExecEvalOper(Expr *opClause, ExprContext *econtext, bool *isNull); @@ -614,15 +616,12 @@ static void ExecEvalFuncArgs(FunctionCachePtr fcache, ExprContext *econtext, List *argList, - Datum argV[], + FunctionCallInfo fcinfo, bool *argIsDone) { int i; - bool *nullVect; List *arg; - nullVect = fcache->nullVect; - i = 0; foreach(arg, argList) { @@ -632,16 +631,16 @@ ExecEvalFuncArgs(FunctionCachePtr fcache, * as arguments but we make an exception in the case of nested dot * expressions. We have to watch out for this case here. */ - argV[i] = ExecEvalExpr((Node *) lfirst(arg), - econtext, - &nullVect[i], - argIsDone); + fcinfo->arg[i] = ExecEvalExpr((Node *) lfirst(arg), + econtext, + &fcinfo->argnull[i], + argIsDone); if (!(*argIsDone)) { if (i != 0) elog(ERROR, "functions can only take sets in their first argument"); - fcache->setArg = (char *) argV[0]; + fcache->setArg = fcinfo->arg[0]; fcache->hasSetArg = true; } i++; @@ -658,40 +657,45 @@ ExecMakeFunctionResult(Node *node, bool *isNull, bool *isDone) { - Datum argV[FUNC_MAX_ARGS]; - FunctionCachePtr fcache; - Func *funcNode = NULL; - Oper *operNode = NULL; - bool funcisset = false; + FunctionCallInfoData fcinfo; + FunctionCachePtr fcache; + List *ftlist; + bool funcisset; + Datum result; + bool argDone; + + MemSet(&fcinfo, 0, sizeof(fcinfo)); /* * This is kind of ugly, Func nodes now have targetlists so that we * know when and what to project out from postquel function results. - * This means we have to pass the func node all the way down instead - * of using only the fcache struct as before. ExecMakeFunctionResult - * becomes a little bit more of a dual personality as a result. + * ExecMakeFunctionResult becomes a little bit more of a dual personality + * as a result. */ if (IsA(node, Func)) { - funcNode = (Func *) node; - fcache = funcNode->func_fcache; + fcache = ((Func *) node)->func_fcache; + ftlist = ((Func *) node)->func_tlist; + funcisset = (((Func *) node)->funcid == F_SETEVAL); } else { - operNode = (Oper *) node; - fcache = operNode->op_fcache; + fcache = ((Oper *) node)->op_fcache; + ftlist = NIL; + funcisset = false; } + fcinfo.flinfo = &fcache->func; + fcinfo.nargs = fcache->nargs; + /* * arguments is a list of expressions to evaluate before passing to - * the function manager. We collect the results of evaluating the - * expressions into a datum array (argV) and pass this array to - * arrayFmgr() + * the function manager. We collect the results of evaluating the + * expressions into the FunctionCallInfo struct. Note we assume that + * fcache->nargs is the correct length of the arguments list! */ - if (fcache->nargs != 0) + if (fcache->nargs > 0) { - bool argDone; - if (fcache->nargs > FUNC_MAX_ARGS) elog(ERROR, "ExecMakeFunctionResult: too many arguments"); @@ -700,21 +704,23 @@ ExecMakeFunctionResult(Node *node, * returning a set of tuples (i.e. a nested dot expression). We * don't want to evaluate the arguments again until the function * is done. hasSetArg will always be false until we eval the args - * for the first time. We should set this in the parser. + * for the first time. */ - if ((fcache->hasSetArg) && fcache->setArg != NULL) + if (fcache->hasSetArg && fcache->setArg != (Datum) 0) { - argV[0] = (Datum) fcache->setArg; + fcinfo.arg[0] = fcache->setArg; argDone = false; } else - ExecEvalFuncArgs(fcache, econtext, arguments, argV, &argDone); + ExecEvalFuncArgs(fcache, econtext, arguments, &fcinfo, &argDone); - if ((fcache->hasSetArg) && (argDone)) + if (fcache->hasSetArg && argDone) { + /* can only get here if input is an empty set. */ if (isDone) *isDone = true; - return (Datum) NULL; + *isNull = true; + return (Datum) 0; } } @@ -731,27 +737,23 @@ ExecMakeFunctionResult(Node *node, * which defines this set. So replace the existing funcid in the * funcnode with the set's OID. Also, we want a new fcache which * points to the right function, so get that, now that we have the - * right OID. Also zero out the argV, since the real set doesn't take + * right OID. Also zero out fcinfo.arg, since the real set doesn't take * any arguments. */ - if (((Func *) node)->funcid == F_SETEVAL) + if (funcisset) { - funcisset = true; if (fcache->setArg) { - argV[0] = 0; - - ((Func *) node)->funcid = (Oid) PointerGetDatum(fcache->setArg); - + ((Func *) node)->funcid = DatumGetObjectId(fcache->setArg); } else { - ((Func *) node)->funcid = (Oid) argV[0]; - setFcache(node, argV[0], NIL, econtext); + ((Func *) node)->funcid = DatumGetObjectId(fcinfo.arg[0]); + setFcache(node, DatumGetObjectId(fcinfo.arg[0]), NIL, econtext); fcache = ((Func *) node)->func_fcache; - fcache->setArg = (char *) argV[0]; - argV[0] = (Datum) 0; + fcache->setArg = fcinfo.arg[0]; } + fcinfo.arg[0] = (Datum) 0; } /* @@ -760,11 +762,6 @@ ExecMakeFunctionResult(Node *node, */ if (fcache->language == SQLlanguageId) { - Datum result; - bool argDone; - - Assert(funcNode); - /*-------------------- * This loop handles the situation where we are iterating through * all results in a nested dot function (whose argument function @@ -777,8 +774,37 @@ ExecMakeFunctionResult(Node *node, */ for (;;) { - result = postquel_function(funcNode, (char **) argV, - isNull, isDone); + /* + * If function is strict, and there are any NULL arguments, + * skip calling the function (at least for this set of args). + */ + bool callit = true; + + if (fcinfo.flinfo->fn_strict) + { + int i; + + for (i = 0; i < fcinfo.nargs; i++) + { + if (fcinfo.argnull[i]) + { + callit = false; + break; + } + } + } + + if (callit) + { + result = postquel_function(&fcinfo, fcache, ftlist, isDone); + *isNull = fcinfo.isnull; + } + else + { + result = (Datum) 0; + *isDone = true; + *isNull = true; + } if (!*isDone) break; /* got a result from current argument */ @@ -786,7 +812,7 @@ ExecMakeFunctionResult(Node *node, break; /* input not a set, so done */ /* OK, get the next argument... */ - ExecEvalFuncArgs(fcache, econtext, arguments, argV, &argDone); + ExecEvalFuncArgs(fcache, econtext, arguments, &fcinfo, &argDone); if (argDone) { @@ -795,10 +821,11 @@ ExecMakeFunctionResult(Node *node, * End of arguments, so reset the setArg flag and say * "Done" */ - fcache->setArg = (char *) NULL; + fcache->setArg = (Datum) 0; fcache->hasSetArg = false; *isDone = true; - result = (Datum) NULL; + *isNull = true; + result = (Datum) 0; break; } @@ -826,21 +853,34 @@ ExecMakeFunctionResult(Node *node, if (*isDone) ((Func *) node)->func_fcache = NULL; } - - return result; } else { - int i; - + /* A non-SQL function cannot return a set, at present. */ if (isDone) *isDone = true; - for (i = 0; i < fcache->nargs; i++) - if (fcache->nullVect[i] == true) - *isNull = true; + /* + * If function is strict, and there are any NULL arguments, + * skip calling the function and return NULL. + */ + if (fcinfo.flinfo->fn_strict) + { + int i; - return (Datum) fmgr_c(&fcache->func, (FmgrValues *) argV, isNull); + for (i = 0; i < fcinfo.nargs; i++) + { + if (fcinfo.argnull[i]) + { + *isNull = true; + return (Datum) 0; + } + } + } + result = FunctionCallInvoke(&fcinfo); + *isNull = fcinfo.isnull; } + + return result; } diff --git a/src/backend/executor/execUtils.c b/src/backend/executor/execUtils.c index e3783473f9..39b29138e1 100644 --- a/src/backend/executor/execUtils.c +++ b/src/backend/executor/execUtils.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.55 2000/04/12 17:15:08 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.56 2000/05/28 17:55:55 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -52,6 +52,8 @@ #include "executor/execdebug.h" #include "executor/executor.h" #include "miscadmin.h" +#include "utils/builtins.h" +#include "utils/fmgroids.h" static void ExecGetIndexKeyInfo(Form_pg_index indexTuple, int *numAttsOutP, AttrNumber **attsOutP, FuncIndexInfoPtr fInfoP); @@ -843,7 +845,7 @@ ExecOpenIndices(Oid resultRelationOid, */ if (VARSIZE(&indexStruct->indpred) != 0) { - predString = fmgr(F_TEXTOUT, &indexStruct->indpred); + predString = textout(&indexStruct->indpred); predicate = (PredInfo *) stringToNode(predString); pfree(predString); } diff --git a/src/backend/executor/functions.c b/src/backend/executor/functions.c index c8d119df48..ee5fabf170 100644 --- a/src/backend/executor/functions.c +++ b/src/backend/executor/functions.c @@ -2,14 +2,13 @@ * * functions.c * Routines to handle functions called from the executor - * Putting this stuff in fmgr makes the postmaster a mess.... * * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/functions.c,v 1.33 2000/04/12 17:15:09 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/functions.c,v 1.34 2000/05/28 17:55:55 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -24,7 +23,6 @@ #include "tcop/utility.h" #include "utils/datum.h" -#undef new typedef enum { @@ -39,18 +37,18 @@ typedef struct local_es ExecStatus status; } execution_state; -#define LAST_POSTQUEL_COMMAND(es) ((es)->next == (execution_state *)NULL) +#define LAST_POSTQUEL_COMMAND(es) ((es)->next == (execution_state *) NULL) /* non-export function prototypes */ static TupleDesc postquel_start(execution_state *es); -static execution_state *init_execution_state(FunctionCachePtr fcache, - char *args[]); +static execution_state *init_execution_state(FunctionCachePtr fcache); static TupleTableSlot *postquel_getnext(execution_state *es); static void postquel_end(execution_state *es); -static void postquel_sub_params(execution_state *es, int nargs, - char *args[], bool *nullV); -static Datum postquel_execute(execution_state *es, FunctionCachePtr fcache, - List *fTlist, char **args, bool *isNull); +static void postquel_sub_params(execution_state *es, FunctionCallInfo fcinfo); +static Datum postquel_execute(execution_state *es, + FunctionCallInfo fcinfo, + FunctionCachePtr fcache, + List *func_tlist); Datum @@ -64,7 +62,6 @@ ProjectAttribute(TupleDesc TD, Var *attrVar = (Var *) tlist->expr; AttrNumber attrno = attrVar->varattno; - val = heap_getattr(tup, attrno, TD, isnullP); if (*isnullP) return (Datum) NULL; @@ -77,8 +74,7 @@ ProjectAttribute(TupleDesc TD, } static execution_state * -init_execution_state(FunctionCachePtr fcache, - char *args[]) +init_execution_state(FunctionCachePtr fcache) { execution_state *newes; execution_state *nextes; @@ -196,13 +192,10 @@ postquel_end(execution_state *es) } static void -postquel_sub_params(execution_state *es, - int nargs, - char *args[], - bool *nullV) +postquel_sub_params(execution_state *es, FunctionCallInfo fcinfo) { - ParamListInfo paramLI; EState *estate; + ParamListInfo paramLI; estate = es->estate; paramLI = estate->es_param_list_info; @@ -211,9 +204,9 @@ postquel_sub_params(execution_state *es, { if (paramLI->kind == PARAM_NUM) { - Assert(paramLI->id <= nargs); - paramLI->value = (Datum) args[(paramLI->id - 1)]; - paramLI->isnull = nullV[(paramLI->id - 1)]; + Assert(paramLI->id <= fcinfo->nargs); + paramLI->value = fcinfo->arg[paramLI->id - 1]; + paramLI->isnull = fcinfo->argnull[paramLI->id - 1]; } paramLI++; } @@ -264,10 +257,9 @@ copy_function_result(FunctionCachePtr fcache, static Datum postquel_execute(execution_state *es, + FunctionCallInfo fcinfo, FunctionCachePtr fcache, - List *fTlist, - char **args, - bool *isNull) + List *func_tlist) { TupleTableSlot *slot; Datum value; @@ -278,8 +270,8 @@ postquel_execute(execution_state *es, * ExecutorStart->ExecInitIndexScan->ExecEvalParam works ok. (But * note: I HOPE we can do it here). - vadim 01/22/97 */ - if (fcache->nargs > 0) - postquel_sub_params(es, fcache->nargs, args, fcache->nullVect); + if (fcinfo->nargs > 0) + postquel_sub_params(es, fcinfo); if (es->status == F_EXEC_START) { @@ -293,7 +285,7 @@ postquel_execute(execution_state *es, { postquel_end(es); es->status = F_EXEC_DONE; - *isNull = true; + fcinfo->isnull = true; /* * If this isn't the last command for the function we have to @@ -315,19 +307,20 @@ postquel_execute(execution_state *es, * logic and code redundancy here. */ resSlot = copy_function_result(fcache, slot); - if (fTlist != NIL) + if (func_tlist != NIL) { - TargetEntry *tle = lfirst(fTlist); + TargetEntry *tle = lfirst(func_tlist); value = ProjectAttribute(resSlot->ttc_tupleDescriptor, tle, resSlot->val, - isNull); + &fcinfo->isnull); } else { - value = (Datum) resSlot; - *isNull = false; + /* XXX is this right? Return whole tuple slot?? */ + value = PointerGetDatum(resSlot); + fcinfo->isnull = false; } /* @@ -353,11 +346,13 @@ postquel_execute(execution_state *es, } Datum -postquel_function(Func *funcNode, char **args, bool *isNull, bool *isDone) +postquel_function(FunctionCallInfo fcinfo, + FunctionCachePtr fcache, + List *func_tlist, + bool *isDone) { execution_state *es; Datum result = 0; - FunctionCachePtr fcache = funcNode->func_fcache; CommandId savedId; /* @@ -371,7 +366,7 @@ postquel_function(Func *funcNode, char **args, bool *isNull, bool *isDone) es = (execution_state *) fcache->func_state; if (es == NULL) { - es = init_execution_state(fcache, args); + es = init_execution_state(fcache); fcache->func_state = (char *) es; } @@ -388,15 +383,19 @@ postquel_function(Func *funcNode, char **args, bool *isNull, bool *isDone) while (es != (execution_state *) NULL) { result = postquel_execute(es, + fcinfo, fcache, - funcNode->func_tlist, - args, - isNull); + func_tlist); if (es->status != F_EXEC_DONE) break; es = es->next; } + /* + * Restore outer command ID. + */ + SetScanCommandId(savedId); + /* * If we've gone through every command in this function, we are done. */ @@ -417,17 +416,15 @@ postquel_function(Func *funcNode, char **args, bool *isNull, bool *isDone) * Let caller know we're finished. */ *isDone = true; - SetScanCommandId(savedId); return (fcache->oneResult) ? result : (Datum) NULL; } /* * If we got a result from a command within the function it has to be - * the final command. All others shouldn't be returing anything. + * the final command. All others shouldn't be returning anything. */ Assert(LAST_POSTQUEL_COMMAND(es)); - *isDone = false; - SetScanCommandId(savedId); + *isDone = false; return result; } diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c index e2db06f84d..853fa96e2c 100644 --- a/src/backend/executor/nodeAgg.c +++ b/src/backend/executor/nodeAgg.c @@ -32,7 +32,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/nodeAgg.c,v 1.63 2000/04/12 17:15:09 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/nodeAgg.c,v 1.64 2000/05/28 17:55:55 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -218,8 +218,13 @@ static void advance_transition_functions(AggStatePerAgg peraggstate, Datum newVal, bool isNull) { - Datum args[2]; + FunctionCallInfoData fcinfo; + MemSet(&fcinfo, 0, sizeof(fcinfo)); + + /* + * XXX reconsider isNULL handling here + */ if (OidIsValid(peraggstate->xfn1_oid) && !isNull) { if (peraggstate->noInitValue) @@ -244,28 +249,48 @@ advance_transition_functions(AggStatePerAgg peraggstate, else { /* apply transition function 1 */ - args[0] = peraggstate->value1; - args[1] = newVal; - newVal = (Datum) fmgr_c(&peraggstate->xfn1, - (FmgrValues *) args, - &isNull); - if (!peraggstate->transtype1ByVal) + fcinfo.flinfo = &peraggstate->xfn1; + fcinfo.nargs = 2; + fcinfo.arg[0] = peraggstate->value1; + fcinfo.argnull[0] = peraggstate->value1IsNull; + fcinfo.arg[1] = newVal; + fcinfo.argnull[1] = isNull; + if (fcinfo.flinfo->fn_strict && + (peraggstate->value1IsNull || isNull)) + { + /* don't call a strict function with NULL inputs */ + newVal = (Datum) 0; + fcinfo.isnull = true; + } + else + newVal = FunctionCallInvoke(&fcinfo); + if (!peraggstate->transtype1ByVal && !peraggstate->value1IsNull) pfree(peraggstate->value1); peraggstate->value1 = newVal; + peraggstate->value1IsNull = fcinfo.isnull; } } if (OidIsValid(peraggstate->xfn2_oid)) { /* apply transition function 2 */ - args[0] = peraggstate->value2; - isNull = false; /* value2 cannot be null, currently */ - newVal = (Datum) fmgr_c(&peraggstate->xfn2, - (FmgrValues *) args, - &isNull); - if (!peraggstate->transtype2ByVal) + fcinfo.flinfo = &peraggstate->xfn2; + fcinfo.nargs = 1; + fcinfo.arg[0] = peraggstate->value2; + fcinfo.argnull[0] = peraggstate->value2IsNull; + fcinfo.isnull = false; /* must reset after use by xfn1 */ + if (fcinfo.flinfo->fn_strict && peraggstate->value2IsNull) + { + /* don't call a strict function with NULL inputs */ + newVal = (Datum) 0; + fcinfo.isnull = true; + } + else + newVal = FunctionCallInvoke(&fcinfo); + if (!peraggstate->transtype2ByVal && !peraggstate->value2IsNull) pfree(peraggstate->value2); peraggstate->value2 = newVal; + peraggstate->value2IsNull = fcinfo.isnull; } } @@ -276,8 +301,10 @@ static void finalize_aggregate(AggStatePerAgg peraggstate, Datum *resultVal, bool *resultIsNull) { - Aggref *aggref = peraggstate->aggref; - char *args[2]; + Aggref *aggref = peraggstate->aggref; + FunctionCallInfoData fcinfo; + + MemSet(&fcinfo, 0, sizeof(fcinfo)); /* * If it's a DISTINCT aggregate, all we've done so far is to stuff the @@ -337,21 +364,41 @@ finalize_aggregate(AggStatePerAgg peraggstate, if (OidIsValid(peraggstate->finalfn_oid) && !peraggstate->noInitValue) { + fcinfo.flinfo = &peraggstate->finalfn; if (peraggstate->finalfn.fn_nargs > 1) { - args[0] = (char *) peraggstate->value1; - args[1] = (char *) peraggstate->value2; + fcinfo.nargs = 2; + fcinfo.arg[0] = peraggstate->value1; + fcinfo.argnull[0] = peraggstate->value1IsNull; + fcinfo.arg[1] = peraggstate->value2; + fcinfo.argnull[1] = peraggstate->value2IsNull; } else if (OidIsValid(peraggstate->xfn1_oid)) - args[0] = (char *) peraggstate->value1; + { + fcinfo.nargs = 1; + fcinfo.arg[0] = peraggstate->value1; + fcinfo.argnull[0] = peraggstate->value1IsNull; + } else if (OidIsValid(peraggstate->xfn2_oid)) - args[0] = (char *) peraggstate->value2; + { + fcinfo.nargs = 1; + fcinfo.arg[0] = peraggstate->value2; + fcinfo.argnull[0] = peraggstate->value2IsNull; + } else elog(ERROR, "ExecAgg: no valid transition functions??"); - *resultIsNull = false; - *resultVal = (Datum) fmgr_c(&peraggstate->finalfn, - (FmgrValues *) args, - resultIsNull); + if (fcinfo.flinfo->fn_strict && + (fcinfo.argnull[0] || fcinfo.argnull[1])) + { + /* don't call a strict function with NULL inputs */ + *resultVal = (Datum) 0; + *resultIsNull = true; + } + else + { + *resultVal = FunctionCallInvoke(&fcinfo); + *resultIsNull = fcinfo.isnull; + } } else if (OidIsValid(peraggstate->xfn1_oid)) { diff --git a/src/backend/libpq/Makefile b/src/backend/libpq/Makefile index 656fbdb480..50f5f1b720 100644 --- a/src/backend/libpq/Makefile +++ b/src/backend/libpq/Makefile @@ -4,7 +4,7 @@ # Makefile for libpq subsystem (backend half of libpq interface) # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/backend/libpq/Makefile,v 1.17 2000/01/19 02:58:52 petere Exp $ +# $Header: /cvsroot/pgsql/src/backend/libpq/Makefile,v 1.18 2000/05/28 17:55:56 tgl Exp $ # #------------------------------------------------------------------------- @@ -29,11 +29,6 @@ all: SUBSYS.o SUBSYS.o: $(OBJS) $(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS) -be-dumpdata.o be-pqexec.o: ../fmgr.h - -../fmgr.h: - $(MAKE) -C .. fmgr.h - depend dep: $(CC) -MM $(CFLAGS) *.c >depend diff --git a/src/backend/libpq/be-pqexec.c b/src/backend/libpq/be-pqexec.c index 0c29ea2518..42d48281e0 100644 --- a/src/backend/libpq/be-pqexec.c +++ b/src/backend/libpq/be-pqexec.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-pqexec.c,v 1.31 2000/03/17 02:36:08 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-pqexec.c,v 1.32 2000/05/28 17:55:56 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -42,11 +42,11 @@ static char *strmake(char *str, int len); * result_buf : pointer to result buffer (&int if integer) * result_len : length of return value. * result_is_int : If the result is an integer, this must be non-zero - * args : pointer to a NULL terminated arg array. + * args : pointer to an array of PQArgBlock items. * (length, if integer, and result-pointer) * nargs : # of arguments in args array. * - * This code scavanged from HandleFunctionRequest() in tcop/fastpath.h + * This code scavenged from HandleFunctionRequest() in tcop/fastpath.h * ---------------- */ char * @@ -57,46 +57,53 @@ PQfn(int fnid, PQArgBlock *args, int nargs) { - char *retval; /* XXX - should be datum, maybe ? */ - char *arg[FUNC_MAX_ARGS]; - bool isNull; - int i; + FmgrInfo flinfo; + FunctionCallInfoData fcinfo; + Datum retval; + int i; - /* ---------------- - * fill args[] array - * ---------------- - */ if (nargs > FUNC_MAX_ARGS) elog(ERROR, "functions cannot have more than %d arguments", FUNC_MAX_ARGS); + + /* ---------------- + * set up the argument block for the function manager + * ---------------- + */ + fmgr_info((Oid) fnid, &flinfo); + + MemSet(&fcinfo, 0, sizeof(fcinfo)); + fcinfo.flinfo = &flinfo; + fcinfo.nargs = nargs; + for (i = 0; i < nargs; i++) { if (args[i].len == VAR_LENGTH_ARG) - arg[i] = (char *) args[i].u.ptr; + fcinfo.arg[i] = (Datum) args[i].u.ptr; else if ((Size) args[i].len > sizeof(int4)) elog(ERROR, "arg_length of argument %d too long", i); else - arg[i] = (char *) args[i].u.integer; + fcinfo.arg[i] = (Datum) args[i].u.integer; } /* ---------------- * call the postgres function manager * ---------------- */ - retval = fmgr_array_args(fnid, nargs, arg, &isNull); + retval = FunctionCallInvoke(&fcinfo); /* ---------------- * put the result in the buffer the user specified and * return the proper code. * ---------------- */ - if (isNull) /* void retval */ + if (fcinfo.isnull) /* void retval */ return "0"; if (result_is_int) - *result_buf = (int) retval; + *result_buf = DatumGetInt32(retval); else - memmove(result_buf, retval, result_len); + memmove(result_buf, DatumGetPointer(retval), result_len); return "G"; } diff --git a/src/backend/nodes/freefuncs.c b/src/backend/nodes/freefuncs.c index c0d07a05db..59e2ac1154 100644 --- a/src/backend/nodes/freefuncs.c +++ b/src/backend/nodes/freefuncs.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/nodes/Attic/freefuncs.c,v 1.40 2000/04/12 17:15:16 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/nodes/Attic/freefuncs.c,v 1.41 2000/05/28 17:55:57 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -530,16 +530,12 @@ _freeFcache(FunctionCachePtr ptr) { if (ptr->argOidVect) pfree(ptr->argOidVect); - if (ptr->nullVect) - pfree(ptr->nullVect); if (ptr->src) pfree(ptr->src); if (ptr->bin) pfree(ptr->bin); if (ptr->func_state) pfree(ptr->func_state); - if (ptr->setArg) - pfree(ptr->setArg); pfree(ptr); } diff --git a/src/backend/optimizer/path/clausesel.c b/src/backend/optimizer/path/clausesel.c index d430059a1e..460417f241 100644 --- a/src/backend/optimizer/path/clausesel.c +++ b/src/backend/optimizer/path/clausesel.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.34 2000/04/12 17:15:19 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.35 2000/05/28 17:55:58 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -21,6 +21,7 @@ #include "optimizer/plancat.h" #include "optimizer/restrictinfo.h" #include "parser/parsetree.h" +#include "utils/fmgroids.h" #include "utils/lsyscache.h" diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c index 06f9cd0247..b862cf7f12 100644 --- a/src/backend/optimizer/path/indxpath.c +++ b/src/backend/optimizer/path/indxpath.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.83 2000/04/16 04:41:01 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.84 2000/05/28 17:55:58 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -37,6 +37,7 @@ #include "parser/parse_oper.h" #include "parser/parsetree.h" #include "utils/builtins.h" +#include "utils/fmgroids.h" #include "utils/lsyscache.h" #include "utils/syscache.h" diff --git a/src/backend/optimizer/util/plancat.c b/src/backend/optimizer/util/plancat.c index e9d7690e00..fca1bd0ab1 100644 --- a/src/backend/optimizer/util/plancat.c +++ b/src/backend/optimizer/util/plancat.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.50 2000/04/12 17:15:24 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.51 2000/05/28 17:55:59 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -28,6 +28,8 @@ #include "optimizer/paths.h" #include "optimizer/plancat.h" #include "parser/parsetree.h" +#include "utils/builtins.h" +#include "utils/fmgroids.h" #include "utils/syscache.h" #include "catalog/catalog.h" #include "miscadmin.h" @@ -117,7 +119,7 @@ find_secondary_indexes(Query *root, Index relid) info->indproc = index->indproc; /* functional index ?? */ if (VARSIZE(&index->indpred) != 0) /* partial index ?? */ { - char *predString = fmgr(F_TEXTOUT, &index->indpred); + char *predString = textout(&index->indpred); info->indpred = (List *) stringToNode(predString); pfree(predString); diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c index 7658443a37..6f45406362 100644 --- a/src/backend/parser/analyze.c +++ b/src/backend/parser/analyze.c @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: analyze.c,v 1.142 2000/04/12 17:15:26 momjian Exp $ + * $Id: analyze.c,v 1.143 2000/05/28 17:56:00 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -26,6 +26,7 @@ #include "parser/parse_target.h" #include "parser/parse_type.h" #include "utils/builtins.h" +#include "utils/fmgroids.h" #include "utils/numeric.h" void CheckSelectForUpdate(Query *qry); /* no points for style... */ diff --git a/src/backend/parser/parse_func.c b/src/backend/parser/parse_func.c index ed6a910f27..1866cd37b2 100644 --- a/src/backend/parser/parse_func.c +++ b/src/backend/parser/parse_func.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.79 2000/05/26 03:56:40 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.80 2000/05/28 17:56:00 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -34,6 +34,7 @@ #include "parser/parse_target.h" #include "utils/acl.h" #include "utils/builtins.h" +#include "utils/fmgroids.h" #include "utils/lsyscache.h" #include "utils/syscache.h" diff --git a/src/backend/parser/parse_node.c b/src/backend/parser/parse_node.c index 0f386b84c7..dcec30b158 100644 --- a/src/backend/parser/parse_node.c +++ b/src/backend/parser/parse_node.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_node.c,v 1.39 2000/04/12 17:15:27 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_node.c,v 1.40 2000/05/28 17:56:00 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -442,14 +442,11 @@ make_const(Value *value) case T_Float: if (fitsInFloat(value)) { - float64 fltval = (float64) palloc(sizeof(float64data)); - - *fltval = floatVal(value); - val = Float64GetDatum(fltval); + val = Float8GetDatum(floatVal(value)); typeid = FLOAT8OID; - typelen = sizeof(float64data); - typebyval = false; + typelen = sizeof(float8); + typebyval = false; /* XXX might change someday */ } else { diff --git a/src/backend/parser/parse_oper.c b/src/backend/parser/parse_oper.c index 2a9de556b2..73be990c01 100644 --- a/src/backend/parser/parse_oper.c +++ b/src/backend/parser/parse_oper.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.40 2000/04/12 17:15:27 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.41 2000/05/28 17:56:00 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -22,6 +22,7 @@ #include "parser/parse_func.h" #include "parser/parse_oper.h" #include "parser/parse_type.h" +#include "utils/fmgroids.h" #include "utils/syscache.h" static Oid *oper_select_candidate(int nargs, Oid *input_typeids, diff --git a/src/backend/port/dynloader/alpha.h b/src/backend/port/dynloader/alpha.h index bc1046a24e..9fee046340 100644 --- a/src/backend/port/dynloader/alpha.h +++ b/src/backend/port/dynloader/alpha.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: alpha.h,v 1.4 2000/01/26 05:56:44 momjian Exp $ + * $Id: alpha.h,v 1.5 2000/05/28 17:56:02 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -29,7 +29,7 @@ * */ #define pg_dlopen(f) dlopen(f, RTLD_LAZY) -#define pg_dlsym(h, f) ((func_ptr)dlsym(h, f)) +#define pg_dlsym(h, f) ((PGFunction) dlsym(h, f)) #define pg_dlclose(h) dlclose(h) #define pg_dlerror() dlerror() diff --git a/src/backend/port/dynloader/bsdi.h b/src/backend/port/dynloader/bsdi.h index 5c8b3058aa..b85bf1b6f3 100644 --- a/src/backend/port/dynloader/bsdi.h +++ b/src/backend/port/dynloader/bsdi.h @@ -26,7 +26,7 @@ #define pg_dlclose dlclose #define pg_dlerror dlerror #else -#define pg_dlsym(handle, funcname) ((func_ptr) dld_get_func((funcname))) +#define pg_dlsym(handle, funcname) ((PGFunction) dld_get_func((funcname))) #define pg_dlclose(handle) ({ dld_unlink_by_file(handle, 1); free(handle); }) #endif diff --git a/src/backend/port/dynloader/hpux.c b/src/backend/port/dynloader/hpux.c index 562b59ee77..ba904fd2bc 100644 --- a/src/backend/port/dynloader/hpux.c +++ b/src/backend/port/dynloader/hpux.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/port/dynloader/hpux.c,v 1.13 2000/04/26 23:35:34 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/port/dynloader/hpux.c,v 1.14 2000/05/28 17:56:02 tgl Exp $ * * NOTES * all functions are defined here -- it's impossible to trace the @@ -39,13 +39,13 @@ pg_dlopen(char *filename) return (void *) handle; } -func_ptr +PGFunction pg_dlsym(void *handle, char *funcname) { - func_ptr f; + PGFunction f; if (shl_findsym((shl_t *) & handle, funcname, TYPE_PROCEDURE, &f) == -1) - f = (func_ptr) NULL; + f = (PGFunction) NULL; return f; } diff --git a/src/backend/port/dynloader/hpux.h b/src/backend/port/dynloader/hpux.h index 470e43f951..e5f39baee8 100644 --- a/src/backend/port/dynloader/hpux.h +++ b/src/backend/port/dynloader/hpux.h @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/port/dynloader/hpux.h,v 1.3 2000/01/26 05:56:44 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/port/dynloader/hpux.h,v 1.4 2000/05/28 17:56:02 tgl Exp $ * * NOTES * all functions are defined here -- it's impossible to trace the @@ -17,7 +17,9 @@ *------------------------------------------------------------------------- */ /* System includes */ +#include "fmgr.h" + void *pg_dlopen(char *filename); -func_ptr pg_dlsym(void *handle, char *funcname); +PGFunction pg_dlsym(void *handle, char *funcname); void pg_dlclose(void *handle); char *pg_dlerror(); diff --git a/src/backend/port/dynloader/linux.h b/src/backend/port/dynloader/linux.h index 029143aa1f..ad50aa821d 100644 --- a/src/backend/port/dynloader/linux.h +++ b/src/backend/port/dynloader/linux.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: linux.h,v 1.8 2000/01/26 05:56:44 momjian Exp $ + * $Id: linux.h,v 1.9 2000/05/28 17:56:02 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -27,7 +27,7 @@ #define pg_dlsym(handle, funcname) (NULL) #define pg_dlclose(handle) ({}) #else -#define pg_dlsym(handle, funcname) ((func_ptr) dld_get_func((funcname))) +#define pg_dlsym(handle, funcname) ((PGFunction) dld_get_func((funcname))) #define pg_dlclose(handle) ({ dld_unlink_by_file(handle, 1); free(handle); }) #endif #else diff --git a/src/backend/port/dynloader/qnx4.c b/src/backend/port/dynloader/qnx4.c index eae3e2393d..60bed57c63 100644 --- a/src/backend/port/dynloader/qnx4.c +++ b/src/backend/port/dynloader/qnx4.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/port/dynloader/Attic/qnx4.c,v 1.1 1999/12/16 01:25:04 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/port/dynloader/Attic/qnx4.c,v 1.2 2000/05/28 17:56:02 tgl Exp $ * * NOTES * @@ -30,7 +30,7 @@ pg_dlopen(char *filename) return (void *) NULL; } -func_ptr +PGFunction pg_dlsym(void *handle, char *funcname) { return NULL; diff --git a/src/backend/port/dynloader/qnx4.h b/src/backend/port/dynloader/qnx4.h index 6197d09a6f..6ac94a8206 100644 --- a/src/backend/port/dynloader/qnx4.h +++ b/src/backend/port/dynloader/qnx4.h @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/port/dynloader/Attic/qnx4.h,v 1.1 1999/12/16 01:25:04 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/port/dynloader/Attic/qnx4.h,v 1.2 2000/05/28 17:56:02 tgl Exp $ * * NOTES * @@ -15,6 +15,6 @@ */ /* System includes */ void *pg_dlopen(char *filename); -func_ptr pg_dlsym(void *handle, char *funcname); +PGFunction pg_dlsym(void *handle, char *funcname); void pg_dlclose(void *handle); char *pg_dlerror(); diff --git a/src/backend/rewrite/rewriteRemove.c b/src/backend/rewrite/rewriteRemove.c index 821f93440e..13a07adbd8 100644 --- a/src/backend/rewrite/rewriteRemove.c +++ b/src/backend/rewrite/rewriteRemove.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteRemove.c,v 1.36 2000/04/12 17:15:32 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteRemove.c,v 1.37 2000/05/28 17:56:02 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -23,6 +23,7 @@ #include "commands/comment.h" #include "rewrite/rewriteRemove.h" #include "rewrite/rewriteSupport.h" +#include "utils/fmgroids.h" #include "utils/syscache.h" /*----------------------------------------------------------------------- diff --git a/src/backend/storage/large_object/inv_api.c b/src/backend/storage/large_object/inv_api.c index 38961ff34c..6f60e902ca 100644 --- a/src/backend/storage/large_object/inv_api.c +++ b/src/backend/storage/large_object/inv_api.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.67 2000/04/12 17:15:37 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.68 2000/05/28 17:56:03 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -31,6 +31,7 @@ #include "miscadmin.h" #include "storage/large_object.h" #include "storage/smgr.h" +#include "utils/fmgroids.h" #include "utils/relcache.h" /* diff --git a/src/backend/tcop/Makefile b/src/backend/tcop/Makefile index 2ee1faefcd..aaeda91f44 100644 --- a/src/backend/tcop/Makefile +++ b/src/backend/tcop/Makefile @@ -4,7 +4,7 @@ # Makefile for tcop # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/backend/tcop/Makefile,v 1.21 2000/01/19 02:58:56 petere Exp $ +# $Header: /cvsroot/pgsql/src/backend/tcop/Makefile,v 1.22 2000/05/28 17:56:04 tgl Exp $ # #------------------------------------------------------------------------- @@ -29,18 +29,12 @@ SUBSYS.o: $(OBJS) # dependencies (because they don't even exist until you make them), # they are hardcoded here. -utility.o: ../parse.h ../fmgr.h -aclchk.o: ../fmgr.h -fastpath.o: ../fmgr.h -postgres.o: ../fmgr.h +utility.o: ../parse.h ../parse.h: $(MAKE) -C .. parse.h -../fmgr.h: - $(MAKE) -C .. fmgr.h - -dep depend: ../parse.h ../fmgr.h +dep depend: ../parse.h $(CC) -MM $(CFLAGS) *.c >depend clean: diff --git a/src/backend/tcop/fastpath.c b/src/backend/tcop/fastpath.c index 1b38fe7ed0..60e1c7c445 100644 --- a/src/backend/tcop/fastpath.c +++ b/src/backend/tcop/fastpath.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.38 2000/04/12 17:15:43 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.39 2000/05/28 17:56:04 tgl Exp $ * * NOTES * This cruft is the server side of PQfn. @@ -76,11 +76,9 @@ * ---------------- */ static void -SendFunctionResult(Oid fid, /* function id */ - char *retval,/* actual return value */ +SendFunctionResult(Datum retval, /* actual return value */ bool retbyval, - int retlen /* the length according to the catalogs */ -) + int retlen) /* the length according to the catalogs */ { StringInfoData buf; @@ -93,19 +91,21 @@ SendFunctionResult(Oid fid, /* function id */ if (retbyval) { /* by-value */ pq_sendint(&buf, retlen, 4); - pq_sendint(&buf, (int) (Datum) retval, retlen); + pq_sendint(&buf, DatumGetInt32(retval), retlen); } else { /* by-reference ... */ if (retlen < 0) { /* ... varlena */ - pq_sendint(&buf, VARSIZE(retval) - VARHDRSZ, VARHDRSZ); - pq_sendbytes(&buf, VARDATA(retval), VARSIZE(retval) - VARHDRSZ); + struct varlena *v = (struct varlena *) DatumGetPointer(retval); + + pq_sendint(&buf, VARSIZE(v) - VARHDRSZ, VARHDRSZ); + pq_sendbytes(&buf, VARDATA(v), VARSIZE(v) - VARHDRSZ); } else { /* ... fixed */ pq_sendint(&buf, retlen, 4); - pq_sendbytes(&buf, retval, retlen); + pq_sendbytes(&buf, DatumGetPointer(retval), retlen); } } } @@ -127,12 +127,12 @@ SendFunctionResult(Oid fid, /* function id */ struct fp_info { Oid funcid; - int nargs; + FmgrInfo flinfo; /* function lookup info for funcid */ bool argbyval[FUNC_MAX_ARGS]; int32 arglen[FUNC_MAX_ARGS]; /* signed (for varlena) */ bool retbyval; int32 retlen; /* signed (for varlena) */ - TransactionId xid; + TransactionId xid; /* when the lookup was done */ CommandId cid; }; @@ -147,17 +147,17 @@ static struct fp_info last_fp = {InvalidOid}; * valid_fp_info * * RETURNS: - * 1 if the state in 'fip' is valid - * 0 otherwise + * T if the state in 'fip' is valid for the given func OID + * F otherwise * - * "valid" means: + * "invalid" means: * The saved state was either uninitialized, for another function, * or from a previous command. (Commands can do updates, which * may invalidate catalog entries for subsequent commands. This * is overly pessimistic but since there is no smarter invalidation * scheme...). */ -static int +static bool valid_fp_info(Oid func_id, struct fp_info * fip) { Assert(OidIsValid(func_id)); @@ -212,11 +212,10 @@ update_fp_info(Oid func_id, struct fp_info * fip) func_id); } pp = (Form_pg_proc) GETSTRUCT(func_htp); - fip->nargs = pp->pronargs; rettype = pp->prorettype; argtypes = pp->proargtypes; - for (i = 0; i < fip->nargs; ++i) + for (i = 0; i < fip->flinfo.fn_nargs; ++i) { if (OidIsValid(argtypes[i])) { @@ -252,6 +251,8 @@ update_fp_info(Oid func_id, struct fp_info * fip) fip->xid = GetCurrentTransactionId(); fip->cid = GetCurrentCommandId(); + fmgr_info(func_id, &fip->flinfo); + /* * This must be last! */ @@ -279,11 +280,9 @@ HandleFunctionRequest() int argsize; int nargs; int tmp; - char *arg[FUNC_MAX_ARGS]; - char *retval; - bool isNull; + FunctionCallInfoData fcinfo; + Datum retval; int i; - uint32 palloced; char *p; struct fp_info *fip; @@ -305,89 +304,81 @@ HandleFunctionRequest() * XXX FIXME: elog() here means we lose sync with the frontend, since * we have not swallowed all of its input message. What should happen * is we absorb all of the input message per protocol syntax, and - * *then* do error checking and elog if appropriate. + * *then* do error checking (including lookup of the given function ID) + * and elog if appropriate. Unfortunately, because we cannot even read + * the message properly without knowing whether the data types are + * pass-by-ref or pass-by-value, it's not all that easy to fix :-(. + * This protocol is misdesigned. */ - if (fip->nargs != nargs) + if (fip->flinfo.fn_nargs != nargs || nargs > FUNC_MAX_ARGS) { elog(ERROR, "HandleFunctionRequest: actual arguments (%d) != registered arguments (%d)", - nargs, fip->nargs); + nargs, fip->flinfo.fn_nargs); } - /* - * Copy arguments into arg vector. If we palloc() an argument, we - * need to remember, so that we pfree() it after the call. - */ - palloced = 0x0; - for (i = 0; i < FUNC_MAX_ARGS; ++i) - { - if (i >= nargs) - arg[i] = (char *) NULL; - else - { - if (pq_getint(&argsize, 4)) - return EOF; + MemSet(&fcinfo, 0, sizeof(fcinfo)); + fcinfo.flinfo = &fip->flinfo; + fcinfo.nargs = nargs; - Assert(argsize > 0); - if (fip->argbyval[i]) - { /* by-value */ - Assert(argsize <= 4); - if (pq_getint(&tmp, argsize)) + /* + * Copy supplied arguments into arg vector. Note there is no way for + * frontend to specify a NULL argument --- more misdesign. + */ + for (i = 0; i < nargs; ++i) + { + if (pq_getint(&argsize, 4)) + return EOF; + if (fip->argbyval[i]) + { /* by-value */ + if (argsize < 1 || argsize > 4) + elog(ERROR, "HandleFunctionRequest: bogus argsize %d", + argsize); + /* XXX should we demand argsize == fip->arglen[i] ? */ + if (pq_getint(&tmp, argsize)) + return EOF; + fcinfo.arg[i] = (Datum) tmp; + } + else + { /* by-reference ... */ + if (fip->arglen[i] < 0) + { /* ... varlena */ + if (argsize < 0) + elog(ERROR, "HandleFunctionRequest: bogus argsize %d", + argsize); + /* I suspect this +1 isn't really needed - tgl 5/2000 */ + p = palloc(argsize + VARHDRSZ + 1); /* Added +1 to solve + * memory leak - Peter + * 98 Jan 6 */ + VARSIZE(p) = argsize + VARHDRSZ; + if (pq_getbytes(VARDATA(p), argsize)) return EOF; - arg[i] = (char *) tmp; } else - { /* by-reference ... */ - if (fip->arglen[i] < 0) - { /* ... varlena */ - if (!(p = palloc(argsize + VARHDRSZ + 1))) /* Added +1 to solve - * memory leak - Peter - * 98 Jan 6 */ - elog(ERROR, "HandleFunctionRequest: palloc failed"); - VARSIZE(p) = argsize + VARHDRSZ; - if (pq_getbytes(VARDATA(p), argsize)) - return EOF; - } - else - { /* ... fixed */ - /* XXX cross our fingers and trust "argsize" */ - if (!(p = palloc(argsize + 1))) - elog(ERROR, "HandleFunctionRequest: palloc failed"); - if (pq_getbytes(p, argsize)) - return EOF; - } - palloced |= (1 << i); - arg[i] = p; + { /* ... fixed */ + if (argsize != fip->arglen[i]) + elog(ERROR, "HandleFunctionRequest: bogus argsize %d, should be %d", + argsize, fip->arglen[i]); + p = palloc(argsize + 1); /* +1 in case argsize is 0 */ + if (pq_getbytes(p, argsize)) + return EOF; } + fcinfo.arg[i] = PointerGetDatum(p); } } -#ifndef NO_FASTPATH - retval = fmgr_array_args(fid, nargs, arg, &isNull); +#ifdef NO_FASTPATH + /* force a NULL return */ + retval = (Datum) 0; + fcinfo.isnull = true; #else - retval = NULL; + retval = FunctionCallInvoke(&fcinfo); #endif /* NO_FASTPATH */ - /* free palloc'ed arguments */ - for (i = 0; i < nargs; ++i) - { - if (palloced & (1 << i)) - pfree(arg[i]); - } - - /* - * If this is an ordinary query (not a retrieve portal p ...), then we - * return the data to the user. If the return value was palloc'ed, - * then it must also be freed. - */ -#ifndef NO_FASTPATH - SendFunctionResult(fid, retval, fip->retbyval, fip->retlen); -#else - SendFunctionResult(fid, retval, fip->retbyval, 0); -#endif /* NO_FASTPATH */ - - if (!fip->retbyval) - pfree(retval); + if (fcinfo.isnull) + SendFunctionResult(retval, fip->retbyval, 0); + else + SendFunctionResult(retval, fip->retbyval, fip->retlen); return 0; } diff --git a/src/backend/utils/Gen_fmgrtab.sh.in b/src/backend/utils/Gen_fmgrtab.sh.in index 975e2a0f9a..f075ac2837 100644 --- a/src/backend/utils/Gen_fmgrtab.sh.in +++ b/src/backend/utils/Gen_fmgrtab.sh.in @@ -1,14 +1,15 @@ #!/bin/sh #------------------------------------------------------------------------- # -# Gen_fmgrtab.sh-- -# shell script to generate fmgr.h and fmgrtab.c from pg_proc.h +# Gen_fmgrtab.sh +# shell script to generate fmgroids.h and fmgrtab.c from pg_proc.h # -# Copyright (c) 1994, Regents of the University of California +# Portions Copyright (c) 1996-2000, PostgreSQL, Inc +# Portions Copyright (c) 1994, Regents of the University of California # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/backend/utils/Attic/Gen_fmgrtab.sh.in,v 1.21 2000/05/22 02:34:21 momjian Exp $ +# $Header: /cvsroot/pgsql/src/backend/utils/Attic/Gen_fmgrtab.sh.in,v 1.22 2000/05/28 17:56:05 tgl Exp $ # # NOTES # Passes any -D options on to cpp prior to generating the list @@ -16,12 +17,6 @@ # #------------------------------------------------------------------------- -if [ $? != 0 ] -then - echo `basename $0`: Bad option - exit 1 -fi - BKIOPTS='' # @@ -32,7 +27,7 @@ for opt in $* do case $opt in -D) BKIOPTS="$BKIOPTS -D$2"; shift; shift;; - -D*) BKIOPTS="$BKIOPTS $1";shift;; + -D*) BKIOPTS="$BKIOPTS $1"; shift;; --) shift; break;; -*) shift;; esac @@ -41,8 +36,8 @@ done INFILE=$1 RAWFILE=fmgr.raw CPPTMPFILE=fmgrtmp.c -HFILE=fmgr.h -TABCFILE=fmgrtab.c +OIDSFILE=fmgroids.h +TABLEFILE=fmgrtab.c # # Generate the file containing raw pg_proc tuple data @@ -63,7 +58,8 @@ sed -e 's/^.*OID[^=]*=[^0-9]*//' \ -e 's/[ ]*).*$//' | \ awk ' /^#/ { print; next; } -$4 == "11" { print; next; }' > $CPPTMPFILE +$4 == "11" { print; next; } +$4 == "12" { print; next; }' > $CPPTMPFILE @CPP@ $BKIOPTS $CPPTMPFILE | \ egrep '^[0-9]' | \ @@ -72,18 +68,21 @@ sort -n > $RAWFILE rm -f $CPPTMPFILE # -# Generate fmgr.h +# Generate fmgroids.h # -cat > $HFILE < $OIDSFILE < $HFILE <fn_addr \ -) - -#ifdef TRACE_FMGR_PTR -#define FMGR_PTR2(FINFO, ARG1, ARG2) \ - fmgr_ptr(FINFO, 2, ARG1, ARG2) -#else -#define FMGR_PTR2(FINFO, ARG1, ARG2) \ -( \ - ((FINFO)->fn_addr) ? \ - (*(fmgr_faddr(FINFO)))(ARG1, ARG2) \ - : \ - fmgr((FINFO)->fn_oid, ARG1, ARG2) \ -) -#endif - -/* - * Flags for the builtin oprrest selectivity routines. - */ -#define SEL_CONSTANT 1 /* constant does not vary (not a parameter) */ -#define SEL_RIGHT 2 /* constant appears to right of operator */ +#ifndef FMGROIDS_H +#define FMGROIDS_H /* * Constant macros for the OIDs of entries in pg_proc. @@ -174,30 +108,33 @@ FuNkYfMgRsTuFf tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < $RAWFILE | \ awk ' BEGIN { OFS = ""; } - { if (seenit[$2]++ == 0) print "#define F_", $2, " ", $1; }' >> $HFILE + { if (seenit[$2]++ == 0) print "#define F_", $2, " ", $1; }' >> $OIDSFILE -cat >> $HFILE <> $OIDSFILE < $TABCFILE < $TABLEFILE < $TABCFILE < #include "postgres.h" + #include "utils/fmgrtab.h" FuNkYfMgRtAbStUfF -awk '{ print "extern char *", $(NF-1), "();"; }' $RAWFILE >> $TABCFILE +awk '{ print "extern Datum", $(NF-1), "(PG_FUNCTION_ARGS);"; }' $RAWFILE >> $TABLEFILE -cat >> $TABCFILE <> $TABLEFILE <> $TABCFILE +awk '{ printf (" { %d, \"%s\", %d, %s, %s, %s },\n"), \ + $1, $(NF-1), $9, \ + ($8 == "t") ? "true" : "false", \ + ($4 == "11") ? "true" : "false", \ + $(NF-1) }' $RAWFILE >> $TABLEFILE -cat >> $TABCFILE <> $TABLEFILE <proid) - return ptr; - else if (id > ptr->proid) - low = i + 1; - else - high = i - 1; - } - return (FmgrCall *) NULL; -} - -func_ptr fmgr_lookupByName(char *name) -{ - /* Lookup a builtin by name. Note there can be more than one entry in - * the array matching this name, but they should all point to the same - * routine. - */ - int i; - for (i=0; i @@ -18,6 +24,11 @@ #include "utils/int8.h" +/* this should be set in config.h, but just in case it wasn't: */ +#ifndef INT64_FORMAT +#define INT64_FORMAT "%ld" +#endif + #define MAXINT8LEN 25 #ifndef INT_MAX diff --git a/src/backend/utils/adt/regproc.c b/src/backend/utils/adt/regproc.c index 4060a84665..6db76ac8c5 100644 --- a/src/backend/utils/adt/regproc.c +++ b/src/backend/utils/adt/regproc.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.54 2000/04/12 17:15:51 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.55 2000/05/28 17:56:05 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -22,6 +22,7 @@ #include "catalog/pg_type.h" #include "miscadmin.h" #include "utils/builtins.h" +#include "utils/fmgroids.h" #include "utils/syscache.h" /***************************************************************************** diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c index 4718dc668a..c93ef767d8 100644 --- a/src/backend/utils/adt/selfuncs.c +++ b/src/backend/utils/adt/selfuncs.c @@ -15,7 +15,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.66 2000/05/26 17:19:15 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.67 2000/05/28 17:56:06 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -889,17 +889,17 @@ convert_numeric_to_scalar(Datum value, Oid typid) switch (typid) { case BOOLOID: - return (double) DatumGetUInt8(value); + return (double) DatumGetBool(value); case INT2OID: return (double) DatumGetInt16(value); case INT4OID: return (double) DatumGetInt32(value); case INT8OID: - return (double) (*i8tod((int64 *) DatumGetPointer(value))); + return (double) DatumGetInt64(value); case FLOAT4OID: - return (double) (*DatumGetFloat32(value)); + return (double) DatumGetFloat4(value); case FLOAT8OID: - return (double) (*DatumGetFloat64(value)); + return (double) DatumGetFloat8(value); case NUMERICOID: return (double) (*numeric_float8((Numeric) DatumGetPointer(value))); case OIDOID: diff --git a/src/backend/utils/adt/sets.c b/src/backend/utils/adt/sets.c index dbc5ea4b8f..cc629c3ad8 100644 --- a/src/backend/utils/adt/sets.c +++ b/src/backend/utils/adt/sets.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.30 2000/01/26 05:57:14 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.31 2000/05/28 17:56:06 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -56,8 +56,9 @@ SetDefine(char *querystr, char *typename) "sql", /* languageName */ querystr, /* sourceCode */ fileName, /* fileName */ - false, /* canCache */ true, /* trusted */ + false, /* canCache XXX appropriate? */ + false, /* isStrict XXX appropriate? */ 100, /* byte_pct */ 0, /* perbyte_cpu */ 0, /* percall_cpu */ diff --git a/src/backend/utils/cache/catcache.c b/src/backend/utils/cache/catcache.c index b593920b1a..e5fb546ca7 100644 --- a/src/backend/utils/cache/catcache.c +++ b/src/backend/utils/cache/catcache.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.63 2000/04/12 17:15:52 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.64 2000/05/28 17:56:06 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -24,6 +24,7 @@ #include "catalog/indexing.h" #include "miscadmin.h" #include "utils/builtins.h" +#include "utils/fmgroids.h" #include "utils/catcache.h" #include "utils/syscache.h" diff --git a/src/backend/utils/cache/fcache.c b/src/backend/utils/cache/fcache.c index 26f4cbd8d0..33528d7bb2 100644 --- a/src/backend/utils/cache/fcache.c +++ b/src/backend/utils/cache/fcache.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/fcache.c,v 1.30 2000/04/12 17:15:53 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/fcache.c,v 1.31 2000/05/28 17:56:06 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -24,20 +24,9 @@ static Oid GetDynamicFuncArgType(Var *arg, ExprContext *econtext); static FunctionCachePtr init_fcache(Oid foid, - bool use_syscache, - List *argList, - ExprContext *econtext); + List *argList, + ExprContext *econtext); -/*----------------------------------------------------------------- - * - * Initialize the 'FunctionCache' given the PG_PROC oid. - * - * - * NOTE: This function can be called when the system cache is being - * initialized. Therefore, use_syscache should ONLY be true - * when the function return type is interesting (ie: set_fcache). - *----------------------------------------------------------------- - */ #define FuncArgTypeIsDynamic(arg) \ (IsA(arg,Var) && ((Var*)arg)->varattno == InvalidAttrNumber) @@ -53,7 +42,6 @@ GetDynamicFuncArgType(Var *arg, ExprContext *econtext) rtid = ((Var *) arg)->varno; relname = (char *) getrelname(rtid, econtext->ecxt_range_table); - tup = SearchSysCacheTuple(TYPENAME, PointerGetDatum(relname), 0, 0, 0); @@ -64,9 +52,14 @@ GetDynamicFuncArgType(Var *arg, ExprContext *econtext) return tup->t_data->t_oid; } +/*----------------------------------------------------------------- + * + * Initialize a 'FunctionCache' struct given the PG_PROC oid. + * + *----------------------------------------------------------------- + */ static FunctionCachePtr init_fcache(Oid foid, - bool use_syscache, List *argList, ExprContext *econtext) { @@ -79,16 +72,13 @@ init_fcache(Oid foid, text *tmp; bool isNull; + retval = (FunctionCachePtr) palloc(sizeof(FunctionCache)); + MemSet(retval, 0, sizeof(FunctionCache)); + /* ---------------- * get the procedure tuple corresponding to the given functionOid * ---------------- */ - retval = (FunctionCachePtr) palloc(sizeof(FunctionCache)); - memset(retval, 0, sizeof(FunctionCache)); - - if (!use_syscache) - elog(ERROR, "what the ????, init the fcache without the catalogs?"); - procedureTuple = SearchSysCacheTuple(PROCOID, ObjectIdGetDatum(foid), 0, 0, 0); @@ -114,8 +104,7 @@ init_fcache(Oid foid, typeStruct = (Form_pg_type) GETSTRUCT(typeTuple); /* ---------------- - * get the type length and by-value from the type tuple and - * save the information in our one element cache. + * get the type length and by-value flag from the type tuple * ---------------- */ retval->typlen = typeStruct->typlen; @@ -136,10 +125,9 @@ init_fcache(Oid foid, retval->foid = foid; retval->language = procedureStruct->prolang; retval->func_state = (char *) NULL; - retval->setArg = NULL; + retval->setArg = (Datum) 0; retval->hasSetArg = false; retval->oneResult = !procedureStruct->proretset; - retval->istrusted = procedureStruct->proistrusted; /* * If we are returning exactly one result then we have to copy tuples @@ -162,9 +150,8 @@ init_fcache(Oid foid, slot->ttc_tupleDescriptor = (TupleDesc) NULL; slot->ttc_buffer = InvalidBuffer; slot->ttc_whichplan = -1; - retval->funcSlot = (Pointer) slot; - relationTuple = (HeapTuple) + relationTuple = SearchSysCacheTuple(RELNAME, PointerGetDatum(&typeStruct->typname), 0, 0, 0); @@ -177,10 +164,12 @@ init_fcache(Oid foid, else td = CreateTemplateTupleDesc(1); - ((TupleTableSlot *) retval->funcSlot)->ttc_tupleDescriptor = td; + slot->ttc_tupleDescriptor = td; + + retval->funcSlot = (Pointer) slot; } else - retval->funcSlot = (char *) NULL; + retval->funcSlot = (Pointer) NULL; nargs = procedureStruct->pronargs; retval->nargs = nargs; @@ -189,8 +178,6 @@ init_fcache(Oid foid, { Oid *argTypes; - retval->nullVect = (bool *) palloc(retval->nargs * sizeof(bool)); - if (retval->language == SQLlanguageId) { int i; @@ -218,7 +205,6 @@ init_fcache(Oid foid, else { retval->argOidVect = (Oid *) NULL; - retval->nullVect = (BoolPtr) NULL; } if (procedureStruct->prolang == SQLlanguageId) @@ -257,7 +243,7 @@ init_fcache(Oid foid, retval->nargs = retval->func.fn_nargs; } else - retval->func.fn_addr = (func_ptr) NULL; + retval->func.fn_addr = (PGFunction) NULL; return retval; } @@ -269,7 +255,7 @@ setFcache(Node *node, Oid foid, List *argList, ExprContext *econtext) Oper *onode; FunctionCachePtr fcache; - fcache = init_fcache(foid, true, argList, econtext); + fcache = init_fcache(foid, argList, econtext); if (IsA(node, Oper)) { diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index b9e86d905e..30f422de7f 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.96 2000/05/21 02:28:55 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.97 2000/05/28 17:56:06 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -58,6 +58,7 @@ #include "storage/bufmgr.h" #include "storage/smgr.h" #include "utils/catcache.h" +#include "utils/fmgroids.h" #include "utils/relcache.h" #include "utils/temprel.h" diff --git a/src/backend/utils/fmgr/dfmgr.c b/src/backend/utils/fmgr/dfmgr.c index a460fab05c..2dfb54391c 100644 --- a/src/backend/utils/fmgr/dfmgr.c +++ b/src/backend/utils/fmgr/dfmgr.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.39 2000/04/12 17:15:57 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.40 2000/05/28 17:56:07 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -17,190 +17,127 @@ #include "postgres.h" -#include "utils/dynamic_loader.h" - #include "access/heapam.h" -#include "catalog/catname.h" #include "catalog/pg_proc.h" #include "dynloader.h" #include "utils/builtins.h" +#include "utils/dynamic_loader.h" #include "utils/syscache.h" + +/* + * List of dynamically loaded files. + */ + +typedef struct df_files +{ + struct df_files *next; /* List link */ + dev_t device; /* Device file is on */ + ino_t inode; /* Inode number of file */ + void *handle; /* a handle for pg_dl* functions */ + char filename[1]; /* Full pathname of file */ + /* we allocate the block big enough for actual length of pathname. + * filename[] must be last item in struct! + */ +} DynamicFileList; + static DynamicFileList *file_list = (DynamicFileList *) NULL; static DynamicFileList *file_tail = (DynamicFileList *) NULL; -#define NOT_EQUAL(A, B) (((A).st_ino != (B).inode) \ - || ((A).st_dev != (B).device)) +#define SAME_INODE(A,B) ((A).st_ino == (B).inode && (A).st_dev == (B).device) -static Oid procedureId_save = -1; -static int pronargs_save; -static func_ptr user_fn_save = (func_ptr) NULL; -static func_ptr handle_load(char *filename, char *funcname); -func_ptr -fmgr_dynamic(Oid procedureId, int *pronargs) +PGFunction +fmgr_dynamic(Oid functionId) { HeapTuple procedureTuple; Form_pg_proc procedureStruct; char *proname, - *linksymbol, + *prosrcstring, *probinstring; - char *prosrcstring = NULL; - Datum probinattr; - Datum prosrcattr; - func_ptr user_fn; - Relation rel; + Datum prosrcattr, + probinattr; + PGFunction user_fn; bool isnull; - /* Implement simple one-element cache for function lookups */ - if (procedureId == procedureId_save) - { - *pronargs = pronargs_save; - return user_fn_save; - } - - /* - * The procedure isn't a builtin, so we'll have to do a catalog lookup - * to find its pg_proc entry. Moreover, since probin is varlena, - * we're going to have to use heap_getattr, which means we need the - * reldesc, which means we need to open the relation. So we might as - * well do that first and get the benefit of SI inval if needed. - */ - rel = heap_openr(ProcedureRelationName, AccessShareLock); - procedureTuple = SearchSysCacheTuple(PROCOID, - ObjectIdGetDatum(procedureId), + ObjectIdGetDatum(functionId), 0, 0, 0); if (!HeapTupleIsValid(procedureTuple)) - { - elog(ERROR, "fmgr: Cache lookup failed for procedure %u\n", - procedureId); - return (func_ptr) NULL; - } - + elog(ERROR, "fmgr_dynamic: function %u: cache lookup failed", + functionId); procedureStruct = (Form_pg_proc) GETSTRUCT(procedureTuple); + proname = NameStr(procedureStruct->proname); - pronargs_save = *pronargs = procedureStruct->pronargs; - probinattr = heap_getattr(procedureTuple, - Anum_pg_proc_probin, - RelationGetDescr(rel), &isnull); - if (!PointerIsValid(probinattr) /* || isnull */ ) + + prosrcattr = SysCacheGetAttr(PROCOID, procedureTuple, + Anum_pg_proc_prosrc, &isnull); + if (isnull || !PointerIsValid(prosrcattr)) { - heap_close(rel, AccessShareLock); - elog(ERROR, "fmgr: Could not extract probin for %u from %s", - procedureId, ProcedureRelationName); - return (func_ptr) NULL; + elog(ERROR, "fmgr: Could not extract prosrc for %u from pg_proc", + functionId); } - probinstring = textout((struct varlena *) probinattr); + prosrcstring = textout((text *) DatumGetPointer(prosrcattr)); - prosrcattr = heap_getattr(procedureTuple, - Anum_pg_proc_prosrc, - RelationGetDescr(rel), &isnull); - - if (isnull) - { /* Use the proname for the link symbol */ - linksymbol = proname; - } - else if (!PointerIsValid(prosrcattr)) - { /* pg_proc must be messed up! */ - heap_close(rel, AccessShareLock); - elog(ERROR, "fmgr: Could not extract prosrc for %u from %s", - procedureId, ProcedureRelationName); - return (func_ptr) NULL; - } - else - { /* The text in prosrcattr is either "-" or - * a link symbol */ - prosrcstring = textout((struct varlena *) prosrcattr); - if (strcmp(prosrcstring, "-") == 0) - linksymbol = proname; - else - linksymbol = prosrcstring; + probinattr = SysCacheGetAttr(PROCOID, procedureTuple, + Anum_pg_proc_probin, &isnull); + if (isnull || !PointerIsValid(probinattr)) + { + elog(ERROR, "fmgr: Could not extract probin for %u from pg_proc", + functionId); } + probinstring = textout((text *) DatumGetPointer(probinattr)); - heap_close(rel, AccessShareLock); - - user_fn = handle_load(probinstring, linksymbol); + user_fn = load_external_function(probinstring, prosrcstring); + pfree(prosrcstring); pfree(probinstring); - if (prosrcstring) - pfree(prosrcstring); - - procedureId_save = procedureId; - user_fn_save = user_fn; return user_fn; } -static func_ptr -handle_load(char *filename, char *funcname) +PGFunction +load_external_function(char *filename, char *funcname) { - DynamicFileList *file_scanner = (DynamicFileList *) NULL; - func_ptr retval = (func_ptr) NULL; + DynamicFileList *file_scanner; + PGFunction retval; char *load_error; struct stat stat_buf; /* - * Do this because loading files may screw up the dynamic function - * manager otherwise. + * Scan the list of loaded FILES to see if the file has been loaded. */ - procedureId_save = -1; - - /* - * Scan the list of loaded FILES to see if the function has been - * loaded. - */ - - if (filename != (char *) NULL) + for (file_scanner = file_list; + file_scanner != (DynamicFileList *) NULL && + strcmp(filename, file_scanner->filename) != 0; + file_scanner = file_scanner->next) + ; + if (file_scanner == (DynamicFileList *) NULL) { + /* + * Check for same files - different paths (ie, symlink or link) + */ + if (stat(filename, &stat_buf) == -1) + elog(ERROR, "stat failed on file '%s': %m", filename); + for (file_scanner = file_list; - file_scanner != (DynamicFileList *) NULL - && file_scanner->filename != (char *) NULL - && strcmp(filename, file_scanner->filename) != 0; + file_scanner != (DynamicFileList *) NULL && + !SAME_INODE(stat_buf, *file_scanner); file_scanner = file_scanner->next) ; - if (file_scanner == (DynamicFileList *) NULL) - { - if (stat(filename, &stat_buf) == -1) - elog(ERROR, "stat failed on file '%s': %m", filename); - - for (file_scanner = file_list; - file_scanner != (DynamicFileList *) NULL - && (NOT_EQUAL(stat_buf, *file_scanner)); - file_scanner = file_scanner->next) - ; - - /* - * Same files - different paths (ie, symlink or link) - */ - if (file_scanner != (DynamicFileList *) NULL) - strcpy(file_scanner->filename, filename); - - } } - else - file_scanner = (DynamicFileList *) NULL; - - /* - * File not loaded yet. - */ if (file_scanner == (DynamicFileList *) NULL) { - if (file_list == (DynamicFileList *) NULL) - { - file_list = (DynamicFileList *) - malloc(sizeof(DynamicFileList)); - file_scanner = file_list; - } - else - { - file_tail->next = (DynamicFileList *) - malloc(sizeof(DynamicFileList)); - file_scanner = file_tail->next; - } - MemSet((char *) file_scanner, 0, sizeof(DynamicFileList)); + /* + * File not loaded yet. + */ + file_scanner = (DynamicFileList *) + malloc(sizeof(DynamicFileList) + strlen(filename)); + if (file_scanner == NULL) + elog(FATAL, "Out of memory in load_external_function"); + MemSet((char *) file_scanner, 0, sizeof(DynamicFileList)); strcpy(file_scanner->filename, filename); file_scanner->device = stat_buf.st_dev; file_scanner->inode = stat_buf.st_ino; @@ -210,42 +147,36 @@ handle_load(char *filename, char *funcname) if (file_scanner->handle == (void *) NULL) { load_error = (char *) pg_dlerror(); - if (file_scanner == file_list) - file_list = (DynamicFileList *) NULL; - else - file_tail->next = (DynamicFileList *) NULL; - free((char *) file_scanner); elog(ERROR, "Load of file %s failed: %s", filename, load_error); } - /* - * Just load the file - we are done with that so return. - */ + /* OK to link it into list */ + if (file_list == (DynamicFileList *) NULL) + file_list = file_scanner; + else + file_tail->next = file_scanner; file_tail = file_scanner; - - if (funcname == (char *) NULL) - return (func_ptr) NULL; } - retval = (func_ptr) pg_dlsym(file_scanner->handle, funcname); + /* + * If funcname is NULL, we only wanted to load the file. + */ + if (funcname == (char *) NULL) + return (PGFunction) NULL; - if (retval == (func_ptr) NULL) + retval = pg_dlsym(file_scanner->handle, funcname); + + if (retval == (PGFunction) NULL) elog(ERROR, "Can't find function %s in file %s", funcname, filename); return retval; } /* - * This function loads files by the following: - * - * If the file is already loaded: - * o Zero out that file's loaded space (so it doesn't screw up linking) - * o Free all space associated with that file - * o Free that file's descriptor. - * - * Now load the file by calling handle_load with a NULL argument as the - * function. + * This function loads a shlib file without looking up any particular + * function in it. If the same shlib has previously been loaded, + * unload and reload it. */ void load_file(char *filename) @@ -253,7 +184,6 @@ load_file(char *filename) DynamicFileList *file_scanner, *p; struct stat stat_buf; - int done = 0; /* * We need to do stat() in order to determine whether this is the same @@ -263,48 +193,32 @@ load_file(char *filename) if (stat(filename, &stat_buf) == -1) elog(ERROR, "LOAD: could not open file '%s': %m", filename); - if (file_list != (DynamicFileList *) NULL - && !NOT_EQUAL(stat_buf, *file_list)) + if (file_list != (DynamicFileList *) NULL) { - file_scanner = file_list; - file_list = file_list->next; - pg_dlclose(file_scanner->handle); - free((char *) file_scanner); - } - else if (file_list != (DynamicFileList *) NULL) - { - file_scanner = file_list; - while (!done) + if (SAME_INODE(stat_buf, *file_list)) { - if (file_scanner->next == (DynamicFileList *) NULL) - done = 1; - else if (!NOT_EQUAL(stat_buf, *(file_scanner->next))) - done = 1; - else - file_scanner = file_scanner->next; - } - - if (file_scanner->next != (DynamicFileList *) NULL) - { - p = file_scanner->next; - file_scanner->next = file_scanner->next->next; - pg_dlclose(file_scanner->handle); + p = file_list; + file_list = p->next; + pg_dlclose(p->handle); free((char *) p); } + else + { + for (file_scanner = file_list; + file_scanner->next != (DynamicFileList *) NULL; + file_scanner = file_scanner->next) + { + if (SAME_INODE(stat_buf, *(file_scanner->next))) + { + p = file_scanner->next; + file_scanner->next = p->next; + pg_dlclose(p->handle); + free((char *) p); + break; + } + } + } } - handle_load(filename, (char *) NULL); + + load_external_function(filename, (char *) NULL); } - -/* Is this used? bjm 1998/10/08 No. tgl 1999/02/07 */ -#ifdef NOT_USED -func_ptr -trigger_dynamic(char *filename, char *funcname) -{ - func_ptr trigger_fn; - - trigger_fn = handle_load(filename, funcname); - - return trigger_fn; -} - -#endif diff --git a/src/backend/utils/fmgr/fmgr.c b/src/backend/utils/fmgr/fmgr.c index bdac32a255..793497834f 100644 --- a/src/backend/utils/fmgr/fmgr.c +++ b/src/backend/utils/fmgr/fmgr.c @@ -1,14 +1,14 @@ /*------------------------------------------------------------------------- * * fmgr.c - * Interface routines for the table-driven function manager. + * The Postgres function manager. * * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.39 2000/05/22 02:34:22 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.40 2000/05/28 17:56:07 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -17,112 +17,249 @@ #include "catalog/pg_language.h" #include "catalog/pg_proc.h" -#include "commands/trigger.h" +#include "commands/trigger.h" /* TEMPORARY: for CurrentTriggerData */ #include "utils/builtins.h" #include "utils/fmgrtab.h" #include "utils/syscache.h" +static Datum fmgr_oldstyle(PG_FUNCTION_ARGS); +static Datum fmgr_untrusted(PG_FUNCTION_ARGS); +static Datum fmgr_sql(PG_FUNCTION_ARGS); + /* - * Interface for PL functions - * - * XXX: use of global fmgr_pl_finfo variable is really ugly. FIXME + * Lookup routines for builtin-function table. We can search by either Oid + * or name, but search by Oid is much faster. */ -FmgrInfo *fmgr_pl_finfo; -static char * -fmgr_pl(char *arg0,...) +static const FmgrBuiltin * +fmgr_isbuiltin(Oid id) { - va_list pvar; - FmgrValues values; - int n_arguments = fmgr_pl_finfo->fn_nargs; - bool isNull = false; - int i; + int low = 0; + int high = fmgr_nbuiltins - 1; - memset(&values, 0, sizeof(values)); - - if (n_arguments > 0) + /* Loop invariant: low is the first index that could contain target + * entry, and high is the last index that could contain it. + */ + while (low <= high) { - values.data[0] = arg0; - if (n_arguments > 1) + int i = (high + low) / 2; + const FmgrBuiltin *ptr = &fmgr_builtins[i]; + + if (id == ptr->foid) + return ptr; + else if (id > ptr->foid) + low = i + 1; + else + high = i - 1; + } + return (const FmgrBuiltin *) NULL; +} + +/* + * Lookup a builtin by name. Note there can be more than one entry in + * the array with the same name, but they should all point to the same + * routine. + */ +static const FmgrBuiltin * +fmgr_lookupByName(const char *name) +{ + int i; + + for (i = 0; i < fmgr_nbuiltins; i++) + { + if (strcmp(name, fmgr_builtins[i].funcName) == 0) + return fmgr_builtins + i; + } + return (const FmgrBuiltin *) NULL; +} + +/* + * This routine fills a FmgrInfo struct, given the OID + * of the function to be called. + */ +void +fmgr_info(Oid functionId, FmgrInfo *finfo) +{ + const FmgrBuiltin *fbp; + HeapTuple procedureTuple; + Form_pg_proc procedureStruct; + HeapTuple languageTuple; + Form_pg_language languageStruct; + Oid language; + char *prosrc; + + finfo->fn_oid = functionId; + finfo->fn_extra = NULL; + + if ((fbp = fmgr_isbuiltin(functionId)) != NULL) + { + /* + * Fast path for builtin functions: don't bother consulting pg_proc + */ + finfo->fn_nargs = fbp->nargs; + finfo->fn_strict = fbp->strict; + if (fbp->oldstyle) { - if (n_arguments > FUNC_MAX_ARGS) - elog(ERROR, "fmgr_pl: function %u: too many arguments (%d > %d)", - fmgr_pl_finfo->fn_oid, n_arguments, FUNC_MAX_ARGS); - va_start(pvar, arg0); - for (i = 1; i < n_arguments; i++) - values.data[i] = va_arg(pvar, char *); - va_end(pvar); + finfo->fn_addr = fmgr_oldstyle; + finfo->fn_extra = (void *) fbp->func; } + else + { + finfo->fn_addr = fbp->func; + } + return; } - /* Call the PL handler */ - CurrentTriggerData = NULL; - return (*(fmgr_pl_finfo->fn_plhandler)) (fmgr_pl_finfo, - &values, - &isNull); + /* Otherwise we need the pg_proc entry */ + procedureTuple = SearchSysCacheTuple(PROCOID, + ObjectIdGetDatum(functionId), + 0, 0, 0); + if (!HeapTupleIsValid(procedureTuple)) + elog(ERROR, "fmgr_info: function %u: cache lookup failed", + functionId); + procedureStruct = (Form_pg_proc) GETSTRUCT(procedureTuple); + + finfo->fn_nargs = procedureStruct->pronargs; + finfo->fn_strict = procedureStruct->proisstrict; + + if (!procedureStruct->proistrusted) + { + finfo->fn_addr = fmgr_untrusted; + return; + } + + language = procedureStruct->prolang; + switch (language) + { + case INTERNALlanguageId: + case NEWINTERNALlanguageId: + /* + * For an ordinary builtin function, we should never get + * here because the isbuiltin() search above will have + * succeeded. However, if the user has done a CREATE + * FUNCTION to create an alias for a builtin function, we + * can end up here. In that case we have to look up the + * function by name. The name of the internal function is + * stored in prosrc (it doesn't have to be the same as the + * name of the alias!) + */ + prosrc = textout(&(procedureStruct->prosrc)); + fbp = fmgr_lookupByName(prosrc); + if (fbp == NULL) + elog(ERROR, "fmgr_info: function %s not in internal table", + prosrc); + pfree(prosrc); + if (fbp->oldstyle) + { + finfo->fn_addr = fmgr_oldstyle; + finfo->fn_extra = (void *) fbp->func; + } + else + { + finfo->fn_addr = fbp->func; + } + break; + + case ClanguageId: + finfo->fn_addr = fmgr_oldstyle; + finfo->fn_extra = (void *) fmgr_dynamic(functionId); + break; + + case NEWClanguageId: + finfo->fn_addr = fmgr_dynamic(functionId); + break; + + case SQLlanguageId: + finfo->fn_addr = fmgr_sql; + break; + + default: + /* + * Might be a created procedural language; try to look it up. + */ + languageTuple = SearchSysCacheTuple(LANGOID, + ObjectIdGetDatum(language), + 0, 0, 0); + if (!HeapTupleIsValid(languageTuple)) + { + elog(ERROR, "fmgr_info: cache lookup for language %u failed", + language); + } + languageStruct = (Form_pg_language) GETSTRUCT(languageTuple); + if (languageStruct->lanispl) + { + FmgrInfo plfinfo; + + fmgr_info(languageStruct->lanplcallfoid, &plfinfo); + finfo->fn_addr = plfinfo.fn_addr; + /* + * If lookup of the PL handler function produced nonnull + * fn_extra, complain --- it must be an oldstyle function! + * We no longer support oldstyle PL handlers. + */ + if (plfinfo.fn_extra != NULL) + elog(ERROR, "fmgr_info: language %u has old-style handler", + language); + } + else + { + elog(ERROR, "fmgr_info: function %u: unsupported language %u", + functionId, language); + } + break; + } } /* - * Interface for untrusted functions + * Specialized lookup routine for pg_proc.c: given the alleged name of + * an internal function, return the OID of the function's language. + * If the name is not known, return InvalidOid. */ - -static char * -fmgr_untrusted(char *arg0,...) +Oid +fmgr_internal_language(const char *proname) { + const FmgrBuiltin *fbp = fmgr_lookupByName(proname); - /* - * Currently these are unsupported. Someday we might do something - * like forking a subprocess to execute 'em. - */ - elog(ERROR, "Untrusted functions not supported."); - return NULL; /* keep compiler happy */ + if (fbp == NULL) + return InvalidOid; + return fbp->oldstyle ? INTERNALlanguageId : NEWINTERNALlanguageId; } /* - * Interface for SQL-language functions + * Handler for old-style internal and "C" language functions + * + * We expect fmgr_info to have placed the old-style function's address + * in fn_extra of *flinfo. This is a bit of a hack since fn_extra is really + * void * which might be a different size than a pointer to function, but + * it will work on any machine that our old-style call interface works on... */ - -static char * -fmgr_sql(char *arg0,...) +static Datum +fmgr_oldstyle(PG_FUNCTION_ARGS) { + char *returnValue = NULL; + int n_arguments = fcinfo->nargs; + int i; + bool isnull; + func_ptr user_fn; + + if (fcinfo->flinfo == NULL || fcinfo->flinfo->fn_extra == NULL) + elog(ERROR, "Internal error: fmgr_oldstyle received NULL function pointer"); /* - * XXX It'd be really nice to support SQL functions anywhere that - * builtins are supported. What would we have to do? What pitfalls - * are there? + * Result is NULL if any argument is NULL, but we still call the function + * (peculiar, but that's the way it worked before, and after all this is + * a backwards-compatibility wrapper). Note, however, that we'll never + * get here with NULL arguments if the function is marked strict. */ - elog(ERROR, "SQL-language function not supported in this context."); - return NULL; /* keep compiler happy */ -} + isnull = false; + for (i = 0; i < n_arguments; i++) + isnull |= PG_ARGISNULL(i); + fcinfo->isnull = isnull; - -/* - * fmgr_c is not really for C functions only; it can be called for functions - * in any language. Many parts of the system use this entry point if they - * want to pass the arguments in an array rather than as explicit arguments. - */ - -char * -fmgr_c(FmgrInfo *finfo, - FmgrValues *values, - bool *isNull) -{ - char *returnValue = (char *) NULL; - int n_arguments = finfo->fn_nargs; - func_ptr user_fn = fmgr_faddr(finfo); - - /* - * If finfo contains a PL handler for this function, call that - * instead. - */ - if (finfo->fn_plhandler != NULL) - return (*(finfo->fn_plhandler)) (finfo, values, isNull); - - if (user_fn == (func_ptr) NULL) - elog(ERROR, "Internal error: fmgr_c received NULL function pointer."); + user_fn = (func_ptr) fcinfo->flinfo->fn_extra; switch (n_arguments) { @@ -130,604 +267,1038 @@ fmgr_c(FmgrInfo *finfo, returnValue = (*user_fn) (); break; case 1: - /* NullValue() uses isNull to check if args[0] is NULL */ - returnValue = (*user_fn) (values->data[0], isNull); + /* + * nullvalue() used to use isNull to check if arg is NULL; + * perhaps there are other functions still out there that + * also rely on this undocumented hack? + */ + returnValue = (*user_fn) (fcinfo->arg[0], & fcinfo->isnull); break; case 2: - returnValue = (*user_fn) (values->data[0], values->data[1]); + returnValue = (*user_fn) (fcinfo->arg[0], fcinfo->arg[1]); break; case 3: - returnValue = (*user_fn) (values->data[0], values->data[1], - values->data[2]); + returnValue = (*user_fn) (fcinfo->arg[0], fcinfo->arg[1], + fcinfo->arg[2]); break; case 4: - returnValue = (*user_fn) (values->data[0], values->data[1], - values->data[2], values->data[3]); + returnValue = (*user_fn) (fcinfo->arg[0], fcinfo->arg[1], + fcinfo->arg[2], fcinfo->arg[3]); break; case 5: - returnValue = (*user_fn) (values->data[0], values->data[1], - values->data[2], values->data[3], - values->data[4]); + returnValue = (*user_fn) (fcinfo->arg[0], fcinfo->arg[1], + fcinfo->arg[2], fcinfo->arg[3], + fcinfo->arg[4]); break; case 6: - returnValue = (*user_fn) (values->data[0], values->data[1], - values->data[2], values->data[3], - values->data[4], values->data[5]); + returnValue = (*user_fn) (fcinfo->arg[0], fcinfo->arg[1], + fcinfo->arg[2], fcinfo->arg[3], + fcinfo->arg[4], fcinfo->arg[5]); break; case 7: - returnValue = (*user_fn) (values->data[0], values->data[1], - values->data[2], values->data[3], - values->data[4], values->data[5], - values->data[6]); + returnValue = (*user_fn) (fcinfo->arg[0], fcinfo->arg[1], + fcinfo->arg[2], fcinfo->arg[3], + fcinfo->arg[4], fcinfo->arg[5], + fcinfo->arg[6]); break; case 8: - returnValue = (*user_fn) (values->data[0], values->data[1], - values->data[2], values->data[3], - values->data[4], values->data[5], - values->data[6], values->data[7]); + returnValue = (*user_fn) (fcinfo->arg[0], fcinfo->arg[1], + fcinfo->arg[2], fcinfo->arg[3], + fcinfo->arg[4], fcinfo->arg[5], + fcinfo->arg[6], fcinfo->arg[7]); break; case 9: - returnValue = (*user_fn) (values->data[0], values->data[1], - values->data[2], values->data[3], - values->data[4], values->data[5], - values->data[6], values->data[7], - values->data[8]); + returnValue = (*user_fn) (fcinfo->arg[0], fcinfo->arg[1], + fcinfo->arg[2], fcinfo->arg[3], + fcinfo->arg[4], fcinfo->arg[5], + fcinfo->arg[6], fcinfo->arg[7], + fcinfo->arg[8]); break; -#if FUNC_MAX_ARGS >= 10 case 10: - returnValue = (*user_fn) (values->data[0], values->data[1], - values->data[2], values->data[3], - values->data[4], values->data[5], - values->data[6], values->data[7], - values->data[8], values->data[9]); + returnValue = (*user_fn) (fcinfo->arg[0], fcinfo->arg[1], + fcinfo->arg[2], fcinfo->arg[3], + fcinfo->arg[4], fcinfo->arg[5], + fcinfo->arg[6], fcinfo->arg[7], + fcinfo->arg[8], fcinfo->arg[9]); break; -#endif -#if FUNC_MAX_ARGS >= 11 case 11: - returnValue = (*user_fn) (values->data[0], values->data[1], - values->data[2], values->data[3], - values->data[4], values->data[5], - values->data[6], values->data[7], - values->data[8], values->data[9], - values->data[10]); + returnValue = (*user_fn) (fcinfo->arg[0], fcinfo->arg[1], + fcinfo->arg[2], fcinfo->arg[3], + fcinfo->arg[4], fcinfo->arg[5], + fcinfo->arg[6], fcinfo->arg[7], + fcinfo->arg[8], fcinfo->arg[9], + fcinfo->arg[10]); break; -#endif -#if FUNC_MAX_ARGS >= 12 case 12: - returnValue = (*user_fn) (values->data[0], values->data[1], - values->data[2], values->data[3], - values->data[4], values->data[5], - values->data[6], values->data[7], - values->data[8], values->data[9], - values->data[10], values->data[11]); + returnValue = (*user_fn) (fcinfo->arg[0], fcinfo->arg[1], + fcinfo->arg[2], fcinfo->arg[3], + fcinfo->arg[4], fcinfo->arg[5], + fcinfo->arg[6], fcinfo->arg[7], + fcinfo->arg[8], fcinfo->arg[9], + fcinfo->arg[10], fcinfo->arg[11]); break; -#endif -#if FUNC_MAX_ARGS >= 13 case 13: - returnValue = (*user_fn) (values->data[0], values->data[1], - values->data[2], values->data[3], - values->data[4], values->data[5], - values->data[6], values->data[7], - values->data[8], values->data[9], - values->data[10], values->data[11], - values->data[12]); + returnValue = (*user_fn) (fcinfo->arg[0], fcinfo->arg[1], + fcinfo->arg[2], fcinfo->arg[3], + fcinfo->arg[4], fcinfo->arg[5], + fcinfo->arg[6], fcinfo->arg[7], + fcinfo->arg[8], fcinfo->arg[9], + fcinfo->arg[10], fcinfo->arg[11], + fcinfo->arg[12]); break; -#endif -#if FUNC_MAX_ARGS >= 14 case 14: - returnValue = (*user_fn) (values->data[0], values->data[1], - values->data[2], values->data[3], - values->data[4], values->data[5], - values->data[6], values->data[7], - values->data[8], values->data[9], - values->data[10], values->data[11], - values->data[12], values->data[13]); + returnValue = (*user_fn) (fcinfo->arg[0], fcinfo->arg[1], + fcinfo->arg[2], fcinfo->arg[3], + fcinfo->arg[4], fcinfo->arg[5], + fcinfo->arg[6], fcinfo->arg[7], + fcinfo->arg[8], fcinfo->arg[9], + fcinfo->arg[10], fcinfo->arg[11], + fcinfo->arg[12], fcinfo->arg[13]); break; -#endif -#if FUNC_MAX_ARGS >= 15 case 15: - returnValue = (*user_fn) (values->data[0], values->data[1], - values->data[2], values->data[3], - values->data[4], values->data[5], - values->data[6], values->data[7], - values->data[8], values->data[9], - values->data[10], values->data[11], - values->data[12], values->data[13], - values->data[14]); + returnValue = (*user_fn) (fcinfo->arg[0], fcinfo->arg[1], + fcinfo->arg[2], fcinfo->arg[3], + fcinfo->arg[4], fcinfo->arg[5], + fcinfo->arg[6], fcinfo->arg[7], + fcinfo->arg[8], fcinfo->arg[9], + fcinfo->arg[10], fcinfo->arg[11], + fcinfo->arg[12], fcinfo->arg[13], + fcinfo->arg[14]); break; -#endif -#if FUNC_MAX_ARGS >= 16 case 16: - returnValue = (*user_fn) (values->data[0], values->data[1], - values->data[2], values->data[3], - values->data[4], values->data[5], - values->data[6], values->data[7], - values->data[8], values->data[9], - values->data[10], values->data[11], - values->data[12], values->data[13], - values->data[14], values->data[15]); + returnValue = (*user_fn) (fcinfo->arg[0], fcinfo->arg[1], + fcinfo->arg[2], fcinfo->arg[3], + fcinfo->arg[4], fcinfo->arg[5], + fcinfo->arg[6], fcinfo->arg[7], + fcinfo->arg[8], fcinfo->arg[9], + fcinfo->arg[10], fcinfo->arg[11], + fcinfo->arg[12], fcinfo->arg[13], + fcinfo->arg[14], fcinfo->arg[15]); break; -#endif -#if FUNC_MAX_ARGS >= 17 - case 17: - returnValue = (*user_fn) (values->data[0], values->data[1], - values->data[2], values->data[3], - values->data[4], values->data[5], - values->data[6], values->data[7], - values->data[8], values->data[9], - values->data[10], values->data[11], - values->data[12], values->data[13], - values->data[14], values->data[15], - values->data[16]); - break; -#endif -#if FUNC_MAX_ARGS >= 18 - case 18: - returnValue = (*user_fn) (values->data[0], values->data[1], - values->data[2], values->data[3], - values->data[4], values->data[5], - values->data[6], values->data[7], - values->data[8], values->data[9], - values->data[10], values->data[11], - values->data[12], values->data[13], - values->data[14], values->data[15], - values->data[16], values->data[17]); - break; -#endif -#if FUNC_MAX_ARGS >= 19 - case 19: - returnValue = (*user_fn) (values->data[0], values->data[1], - values->data[2], values->data[3], - values->data[4], values->data[5], - values->data[6], values->data[7], - values->data[8], values->data[9], - values->data[10], values->data[11], - values->data[12], values->data[13], - values->data[14], values->data[15], - values->data[16], values->data[17], - values->data[18]); - break; -#endif -#if FUNC_MAX_ARGS >= 20 - case 20: - returnValue = (*user_fn) (values->data[0], values->data[1], - values->data[2], values->data[3], - values->data[4], values->data[5], - values->data[6], values->data[7], - values->data[8], values->data[9], - values->data[10], values->data[11], - values->data[12], values->data[13], - values->data[14], values->data[15], - values->data[16], values->data[17], - values->data[18], values->data[19]); - break; -#endif -#if FUNC_MAX_ARGS >= 21 - case 21: - returnValue = (*user_fn) (values->data[0], values->data[1], - values->data[2], values->data[3], - values->data[4], values->data[5], - values->data[6], values->data[7], - values->data[8], values->data[9], - values->data[10], values->data[11], - values->data[12], values->data[13], - values->data[14], values->data[15], - values->data[16], values->data[17], - values->data[18], values->data[19], - values->data[20]); - break; -#endif -#if FUNC_MAX_ARGS >= 22 - case 22: - returnValue = (*user_fn) (values->data[0], values->data[1], - values->data[2], values->data[3], - values->data[4], values->data[5], - values->data[6], values->data[7], - values->data[8], values->data[9], - values->data[10], values->data[11], - values->data[12], values->data[13], - values->data[14], values->data[15], - values->data[16], values->data[17], - values->data[18], values->data[19], - values->data[20], values->data[21]); - break; -#endif -#if FUNC_MAX_ARGS >= 23 - case 23: - returnValue = (*user_fn) (values->data[0], values->data[1], - values->data[2], values->data[3], - values->data[4], values->data[5], - values->data[6], values->data[7], - values->data[8], values->data[9], - values->data[10], values->data[11], - values->data[12], values->data[13], - values->data[14], values->data[15], - values->data[16], values->data[17], - values->data[18], values->data[19], - values->data[20], values->data[21], - values->data[22]); - break; -#endif -#if FUNC_MAX_ARGS >= 24 - case 24: - returnValue = (*user_fn) (values->data[0], values->data[1], - values->data[2], values->data[3], - values->data[4], values->data[5], - values->data[6], values->data[7], - values->data[8], values->data[9], - values->data[10], values->data[11], - values->data[12], values->data[13], - values->data[14], values->data[15], - values->data[16], values->data[17], - values->data[18], values->data[19], - values->data[20], values->data[21], - values->data[22], values->data[23]); - break; -#endif -#if FUNC_MAX_ARGS >= 25 - case 25: - returnValue = (*user_fn) (values->data[0], values->data[1], - values->data[2], values->data[3], - values->data[4], values->data[5], - values->data[6], values->data[7], - values->data[8], values->data[9], - values->data[10], values->data[11], - values->data[12], values->data[13], - values->data[14], values->data[15], - values->data[16], values->data[17], - values->data[18], values->data[19], - values->data[20], values->data[21], - values->data[22], values->data[23], - values->data[24]); - break; -#endif -#if FUNC_MAX_ARGS >= 26 - case 26: - returnValue = (*user_fn) (values->data[0], values->data[1], - values->data[2], values->data[3], - values->data[4], values->data[5], - values->data[6], values->data[7], - values->data[8], values->data[9], - values->data[10], values->data[11], - values->data[12], values->data[13], - values->data[14], values->data[15], - values->data[16], values->data[17], - values->data[18], values->data[19], - values->data[20], values->data[21], - values->data[22], values->data[23], - values->data[24], values->data[25]); - break; -#endif -#if FUNC_MAX_ARGS >= 27 - case 27: - returnValue = (*user_fn) (values->data[0], values->data[1], - values->data[2], values->data[3], - values->data[4], values->data[5], - values->data[6], values->data[7], - values->data[8], values->data[9], - values->data[10], values->data[11], - values->data[12], values->data[13], - values->data[14], values->data[15], - values->data[16], values->data[17], - values->data[18], values->data[19], - values->data[20], values->data[21], - values->data[22], values->data[23], - values->data[24], values->data[25], - values->data[26]); - break; -#endif -#if FUNC_MAX_ARGS >= 28 - case 28: - returnValue = (*user_fn) (values->data[0], values->data[1], - values->data[2], values->data[3], - values->data[4], values->data[5], - values->data[6], values->data[7], - values->data[8], values->data[9], - values->data[10], values->data[11], - values->data[12], values->data[13], - values->data[14], values->data[15], - values->data[16], values->data[17], - values->data[18], values->data[19], - values->data[20], values->data[21], - values->data[22], values->data[23], - values->data[24], values->data[25], - values->data[26], values->data[27]); - break; -#endif -#if FUNC_MAX_ARGS >= 29 - case 29: - returnValue = (*user_fn) (values->data[0], values->data[1], - values->data[2], values->data[3], - values->data[4], values->data[5], - values->data[6], values->data[7], - values->data[8], values->data[9], - values->data[10], values->data[11], - values->data[12], values->data[13], - values->data[14], values->data[15], - values->data[16], values->data[17], - values->data[18], values->data[19], - values->data[20], values->data[21], - values->data[22], values->data[23], - values->data[24], values->data[25], - values->data[26], values->data[27], - values->data[28]); - break; -#endif -#if FUNC_MAX_ARGS >= 30 - case 30: - returnValue = (*user_fn) (values->data[0], values->data[1], - values->data[2], values->data[3], - values->data[4], values->data[5], - values->data[6], values->data[7], - values->data[8], values->data[9], - values->data[10], values->data[11], - values->data[12], values->data[13], - values->data[14], values->data[15], - values->data[16], values->data[17], - values->data[18], values->data[19], - values->data[20], values->data[21], - values->data[22], values->data[23], - values->data[24], values->data[25], - values->data[26], values->data[27], - values->data[28], values->data[29]); - break; -#endif -#if FUNC_MAX_ARGS >= 31 - case 31: - returnValue = (*user_fn) (values->data[0], values->data[1], - values->data[2], values->data[3], - values->data[4], values->data[5], - values->data[6], values->data[7], - values->data[8], values->data[9], - values->data[10], values->data[11], - values->data[12], values->data[13], - values->data[14], values->data[15], - values->data[16], values->data[17], - values->data[18], values->data[19], - values->data[20], values->data[21], - values->data[22], values->data[23], - values->data[24], values->data[25], - values->data[26], values->data[27], - values->data[28], values->data[29], - values->data[30]); - break; -#endif -#if FUNC_MAX_ARGS >= 32 - case 32: - returnValue = (*user_fn) (values->data[0], values->data[1], - values->data[2], values->data[3], - values->data[4], values->data[5], - values->data[6], values->data[7], - values->data[8], values->data[9], - values->data[10], values->data[11], - values->data[12], values->data[13], - values->data[14], values->data[15], - values->data[16], values->data[17], - values->data[18], values->data[19], - values->data[20], values->data[21], - values->data[22], values->data[23], - values->data[24], values->data[25], - values->data[26], values->data[27], - values->data[28], values->data[29], - values->data[30], values->data[31]); - break; -#endif default: - elog(ERROR, "fmgr_c: function %u: too many arguments (%d > %d)", - finfo->fn_oid, n_arguments, FUNC_MAX_ARGS); + /* + * Increasing FUNC_MAX_ARGS doesn't automatically add cases + * to the above code, so give the actual value in this error + * not FUNC_MAX_ARGS. You could add cases to the above if you + * needed to support old-style functions with many arguments, + * but making 'em be new-style is probably a better idea. + */ + elog(ERROR, "fmgr_oldstyle: function %u: too many arguments (%d > %d)", + fcinfo->flinfo->fn_oid, n_arguments, 16); break; } - return returnValue; + + return (Datum) returnValue; +} + + +/* + * Handler for all functions marked "untrusted" + */ +static Datum +fmgr_untrusted(PG_FUNCTION_ARGS) +{ + /* + * Currently these are unsupported. Someday we might do something + * like forking a subprocess to execute 'em. + */ + elog(ERROR, "Untrusted functions not supported"); + return 0; /* keep compiler happy */ } /* - * Expand a regproc OID into an FmgrInfo cache struct. + * Handler for SQL-language functions */ - -void -fmgr_info(Oid procedureId, FmgrInfo *finfo) +static Datum +fmgr_sql(PG_FUNCTION_ARGS) { - FmgrCall *fcp; - HeapTuple procedureTuple; - FormData_pg_proc *procedureStruct; - HeapTuple languageTuple; - Form_pg_language languageStruct; - Oid language; - char *prosrc; + /* + * XXX It'd be really nice to support SQL functions anywhere that + * builtins are supported. What would we have to do? What pitfalls + * are there? + */ + elog(ERROR, "SQL-language function not supported in this context"); + return 0; /* keep compiler happy */ +} - finfo->fn_addr = NULL; - finfo->fn_plhandler = NULL; - finfo->fn_oid = procedureId; +/* + * Interface routine for functions using fmgr_faddr + */ +FmgrInfo *fmgr_pl_finfo; /* should GO AWAY */ - if ((fcp = fmgr_isbuiltin(procedureId)) != NULL) +char * +fmgr_faddr_link(char *arg0, ...) +{ + FunctionCallInfoData fcinfo; + int n_arguments; + Datum result; + + MemSet(&fcinfo, 0, sizeof(fcinfo)); + /* We rely on fmgr_faddr macro to have set back-link to FmgrInfo (ugh) */ + fcinfo.flinfo = fmgr_pl_finfo; + fcinfo.nargs = fcinfo.flinfo->fn_nargs; + n_arguments = fcinfo.nargs; + + if (n_arguments > 0) { - - /* - * Fast path for builtin functions: don't bother consulting - * pg_proc - */ - finfo->fn_addr = fcp->func; - finfo->fn_nargs = fcp->nargs; - } - else - { - procedureTuple = SearchSysCacheTuple(PROCOID, - ObjectIdGetDatum(procedureId), - 0, 0, 0); - if (!HeapTupleIsValid(procedureTuple)) + fcinfo.arg[0] = (Datum) arg0; + if (n_arguments > 1) { - elog(ERROR, "fmgr_info: function %u: cache lookup failed", - procedureId); - } - procedureStruct = (FormData_pg_proc *) GETSTRUCT(procedureTuple); - if (!procedureStruct->proistrusted) - { - finfo->fn_addr = (func_ptr) fmgr_untrusted; - finfo->fn_nargs = procedureStruct->pronargs; - return; - } - language = procedureStruct->prolang; - switch (language) - { - case INTERNALlanguageId: + va_list pvar; + int i; - /* - * For an ordinary builtin function, we should never get - * here because the isbuiltin() search above will have - * succeeded. However, if the user has done a CREATE - * FUNCTION to create an alias for a builtin function, we - * end up here. In that case we have to look up the - * function by name. The name of the internal function is - * stored in prosrc (it doesn't have to be the same as the - * name of the alias!) - */ - prosrc = textout(&(procedureStruct->prosrc)); - finfo->fn_addr = fmgr_lookupByName(prosrc); - if (!finfo->fn_addr) - elog(ERROR, "fmgr_info: function %s not in internal table", - prosrc); - finfo->fn_nargs = procedureStruct->pronargs; - pfree(prosrc); - break; - case ClanguageId: - finfo->fn_addr = fmgr_dynamic(procedureId, &(finfo->fn_nargs)); - break; - case SQLlanguageId: - finfo->fn_addr = (func_ptr) fmgr_sql; - finfo->fn_nargs = procedureStruct->pronargs; - break; - default: - - /* - * Might be a created procedural language Lookup the - * syscache for the language and check the lanispl flag If - * this is the case, we return a NULL function pointer and - * the number of arguments from the procedure. - */ - languageTuple = SearchSysCacheTuple(LANGOID, - ObjectIdGetDatum(procedureStruct->prolang), - 0, 0, 0); - if (!HeapTupleIsValid(languageTuple)) - { - elog(ERROR, "fmgr_info: %s %u", - "Cache lookup for language failed", - DatumGetObjectId(procedureStruct->prolang)); - } - languageStruct = (Form_pg_language) GETSTRUCT(languageTuple); - if (languageStruct->lanispl) - { - FmgrInfo plfinfo; - - fmgr_info(languageStruct->lanplcallfoid, &plfinfo); - finfo->fn_addr = (func_ptr) fmgr_pl; - finfo->fn_plhandler = plfinfo.fn_addr; - finfo->fn_nargs = procedureStruct->pronargs; - } - else - { - elog(ERROR, "fmgr_info: function %u: unknown language %d", - procedureId, language); - } - break; + if (n_arguments > FUNC_MAX_ARGS) + elog(ERROR, "fmgr_faddr_link: function %u: too many arguments (%d > %d)", + fcinfo.flinfo->fn_oid, n_arguments, FUNC_MAX_ARGS); + va_start(pvar, arg0); + for (i = 1; i < n_arguments; i++) + fcinfo.arg[i] = (Datum) va_arg(pvar, char *); + va_end(pvar); } } + + result = FunctionCallInvoke(&fcinfo); + + /* Check for null result, since caller is clearly not expecting one */ + if (fcinfo.isnull) + elog(ERROR, "fmgr_faddr_link: function %u returned NULL", + fcinfo.flinfo->fn_oid); + + return (char *) result; } /* * fmgr - return the value of a function call * - * If the function is a system routine, it's compiled in, so call - * it directly. - * - * Otherwise pass it to the the appropriate 'language' function caller. - * - * Returns the return value of the invoked function if succesful, - * 0 if unsuccessful. + * This is essentially fmgr_info plus call the function. */ char * fmgr(Oid procedureId,...) { - va_list pvar; - int i; - int pronargs; - FmgrValues values; - FmgrInfo finfo; - bool isNull = false; + FmgrInfo flinfo; + FunctionCallInfoData fcinfo; + int n_arguments; + Datum result; - fmgr_info(procedureId, &finfo); - pronargs = finfo.fn_nargs; + fmgr_info(procedureId, &flinfo); - if (pronargs > FUNC_MAX_ARGS) - elog(ERROR, "fmgr: function %u: too many arguments (%d > %d)", - procedureId, pronargs, FUNC_MAX_ARGS); + MemSet(&fcinfo, 0, sizeof(fcinfo)); + fcinfo.flinfo = &flinfo; + fcinfo.nargs = flinfo.fn_nargs; + n_arguments = fcinfo.nargs; - va_start(pvar, procedureId); - for (i = 0; i < pronargs; ++i) - values.data[i] = va_arg(pvar, char *); - va_end(pvar); - - /* XXX see WAY_COOL_ORTHOGONAL_FUNCTIONS */ - return fmgr_c(&finfo, &values, &isNull); -} - -/* - * This is just a version of fmgr() in which the hacker can prepend a C - * function pointer. This routine is not normally called; generally, - * if you have all of this information you're likely to just jump through - * the pointer, but it's available for use with macros in fmgr.h if you - * want this routine to do sanity-checking for you. - * - * funcinfo, n_arguments, args... - */ -#ifdef TRACE_FMGR_PTR - -char * -fmgr_ptr(FmgrInfo *finfo,...) -{ - va_list pvar; - int i; - int n_arguments; - FmgrInfo local_finfo; - FmgrValues values; - bool isNull = false; - - local_finfo->fn_addr = finfo->fn_addr; - local_finfo->fn_plhandler = finfo->fn_plhandler; - local_finfo->fn_oid = finfo->fn_oid; - - va_start(pvar, finfo); - n_arguments = va_arg(pvar, int); - local_finfo->fn_nargs = n_arguments; - if (n_arguments > FUNC_MAX_ARGS) + if (n_arguments > 0) { - elog(ERROR, "fmgr_ptr: function %u: too many arguments (%d > %d)", - func_id, n_arguments, FUNC_MAX_ARGS); + va_list pvar; + int i; + + if (n_arguments > FUNC_MAX_ARGS) + elog(ERROR, "fmgr: function %u: too many arguments (%d > %d)", + flinfo.fn_oid, n_arguments, FUNC_MAX_ARGS); + va_start(pvar, procedureId); + for (i = 0; i < n_arguments; i++) + fcinfo.arg[i] = (Datum) va_arg(pvar, char *); + va_end(pvar); } - for (i = 0; i < n_arguments; ++i) - values.data[i] = va_arg(pvar, char *); - va_end(pvar); - /* XXX see WAY_COOL_ORTHOGONAL_FUNCTIONS */ - return fmgr_c(&local_finfo, &values, &isNull); + result = FunctionCallInvoke(&fcinfo); + + /* Check for null result, since caller is clearly not expecting one */ + if (fcinfo.isnull) + elog(ERROR, "fmgr: function %u returned NULL", + flinfo.fn_oid); + + return (char *) result; } -#endif -/* - * This routine is not well thought out. When I get around to adding a - * function pointer field to FuncIndexInfo, it will be replace by calls - * to fmgr_c(). +/*------------------------------------------------------------------------- + * Support routines for callers of fmgr-compatible functions + *------------------------------------------------------------------------- */ -char * -fmgr_array_args(Oid procedureId, int nargs, char *args[], bool *isNull) + +/* These are for invocation of a specifically named function with a + * directly-computed parameter list. Note that neither arguments nor result + * are allowed to be NULL. Also, the function cannot be one that needs to + * look at FmgrInfo, since there won't be any. + */ +Datum +DirectFunctionCall1(PGFunction func, Datum arg1) { - FmgrInfo finfo; + FunctionCallInfoData fcinfo; + Datum result; - fmgr_info(procedureId, &finfo); - finfo.fn_nargs = nargs; + MemSet(&fcinfo, 0, sizeof(fcinfo)); + fcinfo.nargs = 1; + fcinfo.arg[0] = arg1; - /* XXX see WAY_COOL_ORTHOGONAL_FUNCTIONS */ - return fmgr_c(&finfo, - (FmgrValues *) args, - isNull); + result = (* func) (&fcinfo); + + /* Check for null result, since caller is clearly not expecting one */ + if (fcinfo.isnull) + elog(ERROR, "DirectFunctionCall1: function %p returned NULL", + (void *) func); + + return result; +} + +Datum +DirectFunctionCall2(PGFunction func, Datum arg1, Datum arg2) +{ + FunctionCallInfoData fcinfo; + Datum result; + + MemSet(&fcinfo, 0, sizeof(fcinfo)); + fcinfo.nargs = 2; + fcinfo.arg[0] = arg1; + fcinfo.arg[1] = arg2; + + result = (* func) (&fcinfo); + + /* Check for null result, since caller is clearly not expecting one */ + if (fcinfo.isnull) + elog(ERROR, "DirectFunctionCall2: function %p returned NULL", + (void *) func); + + return result; +} + +Datum +DirectFunctionCall3(PGFunction func, Datum arg1, Datum arg2, + Datum arg3) +{ + FunctionCallInfoData fcinfo; + Datum result; + + MemSet(&fcinfo, 0, sizeof(fcinfo)); + fcinfo.nargs = 3; + fcinfo.arg[0] = arg1; + fcinfo.arg[1] = arg2; + fcinfo.arg[2] = arg3; + + result = (* func) (&fcinfo); + + /* Check for null result, since caller is clearly not expecting one */ + if (fcinfo.isnull) + elog(ERROR, "DirectFunctionCall3: function %p returned NULL", + (void *) func); + + return result; +} + +Datum +DirectFunctionCall4(PGFunction func, Datum arg1, Datum arg2, + Datum arg3, Datum arg4) +{ + FunctionCallInfoData fcinfo; + Datum result; + + MemSet(&fcinfo, 0, sizeof(fcinfo)); + fcinfo.nargs = 4; + fcinfo.arg[0] = arg1; + fcinfo.arg[1] = arg2; + fcinfo.arg[2] = arg3; + fcinfo.arg[3] = arg4; + + result = (* func) (&fcinfo); + + /* Check for null result, since caller is clearly not expecting one */ + if (fcinfo.isnull) + elog(ERROR, "DirectFunctionCall4: function %p returned NULL", + (void *) func); + + return result; +} + +Datum +DirectFunctionCall5(PGFunction func, Datum arg1, Datum arg2, + Datum arg3, Datum arg4, Datum arg5) +{ + FunctionCallInfoData fcinfo; + Datum result; + + MemSet(&fcinfo, 0, sizeof(fcinfo)); + fcinfo.nargs = 5; + fcinfo.arg[0] = arg1; + fcinfo.arg[1] = arg2; + fcinfo.arg[2] = arg3; + fcinfo.arg[3] = arg4; + fcinfo.arg[4] = arg5; + + result = (* func) (&fcinfo); + + /* Check for null result, since caller is clearly not expecting one */ + if (fcinfo.isnull) + elog(ERROR, "DirectFunctionCall5: function %p returned NULL", + (void *) func); + + return result; +} + +Datum +DirectFunctionCall6(PGFunction func, Datum arg1, Datum arg2, + Datum arg3, Datum arg4, Datum arg5, + Datum arg6) +{ + FunctionCallInfoData fcinfo; + Datum result; + + MemSet(&fcinfo, 0, sizeof(fcinfo)); + fcinfo.nargs = 6; + fcinfo.arg[0] = arg1; + fcinfo.arg[1] = arg2; + fcinfo.arg[2] = arg3; + fcinfo.arg[3] = arg4; + fcinfo.arg[4] = arg5; + fcinfo.arg[5] = arg6; + + result = (* func) (&fcinfo); + + /* Check for null result, since caller is clearly not expecting one */ + if (fcinfo.isnull) + elog(ERROR, "DirectFunctionCall6: function %p returned NULL", + (void *) func); + + return result; +} + +Datum +DirectFunctionCall7(PGFunction func, Datum arg1, Datum arg2, + Datum arg3, Datum arg4, Datum arg5, + Datum arg6, Datum arg7) +{ + FunctionCallInfoData fcinfo; + Datum result; + + MemSet(&fcinfo, 0, sizeof(fcinfo)); + fcinfo.nargs = 7; + fcinfo.arg[0] = arg1; + fcinfo.arg[1] = arg2; + fcinfo.arg[2] = arg3; + fcinfo.arg[3] = arg4; + fcinfo.arg[4] = arg5; + fcinfo.arg[5] = arg6; + fcinfo.arg[6] = arg7; + + result = (* func) (&fcinfo); + + /* Check for null result, since caller is clearly not expecting one */ + if (fcinfo.isnull) + elog(ERROR, "DirectFunctionCall7: function %p returned NULL", + (void *) func); + + return result; +} + +Datum +DirectFunctionCall8(PGFunction func, Datum arg1, Datum arg2, + Datum arg3, Datum arg4, Datum arg5, + Datum arg6, Datum arg7, Datum arg8) +{ + FunctionCallInfoData fcinfo; + Datum result; + + MemSet(&fcinfo, 0, sizeof(fcinfo)); + fcinfo.nargs = 8; + fcinfo.arg[0] = arg1; + fcinfo.arg[1] = arg2; + fcinfo.arg[2] = arg3; + fcinfo.arg[3] = arg4; + fcinfo.arg[4] = arg5; + fcinfo.arg[5] = arg6; + fcinfo.arg[6] = arg7; + fcinfo.arg[7] = arg8; + + result = (* func) (&fcinfo); + + /* Check for null result, since caller is clearly not expecting one */ + if (fcinfo.isnull) + elog(ERROR, "DirectFunctionCall8: function %p returned NULL", + (void *) func); + + return result; +} + +Datum +DirectFunctionCall9(PGFunction func, Datum arg1, Datum arg2, + Datum arg3, Datum arg4, Datum arg5, + Datum arg6, Datum arg7, Datum arg8, + Datum arg9) +{ + FunctionCallInfoData fcinfo; + Datum result; + + MemSet(&fcinfo, 0, sizeof(fcinfo)); + fcinfo.nargs = 9; + fcinfo.arg[0] = arg1; + fcinfo.arg[1] = arg2; + fcinfo.arg[2] = arg3; + fcinfo.arg[3] = arg4; + fcinfo.arg[4] = arg5; + fcinfo.arg[5] = arg6; + fcinfo.arg[6] = arg7; + fcinfo.arg[7] = arg8; + fcinfo.arg[8] = arg9; + + result = (* func) (&fcinfo); + + /* Check for null result, since caller is clearly not expecting one */ + if (fcinfo.isnull) + elog(ERROR, "DirectFunctionCall9: function %p returned NULL", + (void *) func); + + return result; +} + + +/* These are for invocation of a previously-looked-up function with a + * directly-computed parameter list. Note that neither arguments nor result + * are allowed to be NULL. + */ +Datum +FunctionCall1(FmgrInfo *flinfo, Datum arg1) +{ + FunctionCallInfoData fcinfo; + Datum result; + + MemSet(&fcinfo, 0, sizeof(fcinfo)); + fcinfo.flinfo = flinfo; + fcinfo.nargs = 1; + fcinfo.arg[0] = arg1; + + result = FunctionCallInvoke(&fcinfo); + + /* Check for null result, since caller is clearly not expecting one */ + if (fcinfo.isnull) + elog(ERROR, "FunctionCall1: function %u returned NULL", + fcinfo.flinfo->fn_oid); + + return result; +} + +Datum +FunctionCall2(FmgrInfo *flinfo, Datum arg1, Datum arg2) +{ + FunctionCallInfoData fcinfo; + Datum result; + + MemSet(&fcinfo, 0, sizeof(fcinfo)); + fcinfo.flinfo = flinfo; + fcinfo.nargs = 2; + fcinfo.arg[0] = arg1; + fcinfo.arg[1] = arg2; + + result = FunctionCallInvoke(&fcinfo); + + /* Check for null result, since caller is clearly not expecting one */ + if (fcinfo.isnull) + elog(ERROR, "FunctionCall2: function %u returned NULL", + fcinfo.flinfo->fn_oid); + + return result; +} + +Datum +FunctionCall3(FmgrInfo *flinfo, Datum arg1, Datum arg2, + Datum arg3) +{ + FunctionCallInfoData fcinfo; + Datum result; + + MemSet(&fcinfo, 0, sizeof(fcinfo)); + fcinfo.flinfo = flinfo; + fcinfo.nargs = 3; + fcinfo.arg[0] = arg1; + fcinfo.arg[1] = arg2; + fcinfo.arg[2] = arg3; + + result = FunctionCallInvoke(&fcinfo); + + /* Check for null result, since caller is clearly not expecting one */ + if (fcinfo.isnull) + elog(ERROR, "FunctionCall3: function %u returned NULL", + fcinfo.flinfo->fn_oid); + + return result; +} + +Datum +FunctionCall4(FmgrInfo *flinfo, Datum arg1, Datum arg2, + Datum arg3, Datum arg4) +{ + FunctionCallInfoData fcinfo; + Datum result; + + MemSet(&fcinfo, 0, sizeof(fcinfo)); + fcinfo.flinfo = flinfo; + fcinfo.nargs = 4; + fcinfo.arg[0] = arg1; + fcinfo.arg[1] = arg2; + fcinfo.arg[2] = arg3; + fcinfo.arg[3] = arg4; + + result = FunctionCallInvoke(&fcinfo); + + /* Check for null result, since caller is clearly not expecting one */ + if (fcinfo.isnull) + elog(ERROR, "FunctionCall4: function %u returned NULL", + fcinfo.flinfo->fn_oid); + + return result; +} + +Datum +FunctionCall5(FmgrInfo *flinfo, Datum arg1, Datum arg2, + Datum arg3, Datum arg4, Datum arg5) +{ + FunctionCallInfoData fcinfo; + Datum result; + + MemSet(&fcinfo, 0, sizeof(fcinfo)); + fcinfo.flinfo = flinfo; + fcinfo.nargs = 5; + fcinfo.arg[0] = arg1; + fcinfo.arg[1] = arg2; + fcinfo.arg[2] = arg3; + fcinfo.arg[3] = arg4; + fcinfo.arg[4] = arg5; + + result = FunctionCallInvoke(&fcinfo); + + /* Check for null result, since caller is clearly not expecting one */ + if (fcinfo.isnull) + elog(ERROR, "FunctionCall5: function %u returned NULL", + fcinfo.flinfo->fn_oid); + + return result; +} + +Datum +FunctionCall6(FmgrInfo *flinfo, Datum arg1, Datum arg2, + Datum arg3, Datum arg4, Datum arg5, + Datum arg6) +{ + FunctionCallInfoData fcinfo; + Datum result; + + MemSet(&fcinfo, 0, sizeof(fcinfo)); + fcinfo.flinfo = flinfo; + fcinfo.nargs = 6; + fcinfo.arg[0] = arg1; + fcinfo.arg[1] = arg2; + fcinfo.arg[2] = arg3; + fcinfo.arg[3] = arg4; + fcinfo.arg[4] = arg5; + fcinfo.arg[5] = arg6; + + result = FunctionCallInvoke(&fcinfo); + + /* Check for null result, since caller is clearly not expecting one */ + if (fcinfo.isnull) + elog(ERROR, "FunctionCall6: function %u returned NULL", + fcinfo.flinfo->fn_oid); + + return result; +} + +Datum +FunctionCall7(FmgrInfo *flinfo, Datum arg1, Datum arg2, + Datum arg3, Datum arg4, Datum arg5, + Datum arg6, Datum arg7) +{ + FunctionCallInfoData fcinfo; + Datum result; + + MemSet(&fcinfo, 0, sizeof(fcinfo)); + fcinfo.flinfo = flinfo; + fcinfo.nargs = 7; + fcinfo.arg[0] = arg1; + fcinfo.arg[1] = arg2; + fcinfo.arg[2] = arg3; + fcinfo.arg[3] = arg4; + fcinfo.arg[4] = arg5; + fcinfo.arg[5] = arg6; + fcinfo.arg[6] = arg7; + + result = FunctionCallInvoke(&fcinfo); + + /* Check for null result, since caller is clearly not expecting one */ + if (fcinfo.isnull) + elog(ERROR, "FunctionCall7: function %u returned NULL", + fcinfo.flinfo->fn_oid); + + return result; +} + +Datum +FunctionCall8(FmgrInfo *flinfo, Datum arg1, Datum arg2, + Datum arg3, Datum arg4, Datum arg5, + Datum arg6, Datum arg7, Datum arg8) +{ + FunctionCallInfoData fcinfo; + Datum result; + + MemSet(&fcinfo, 0, sizeof(fcinfo)); + fcinfo.flinfo = flinfo; + fcinfo.nargs = 8; + fcinfo.arg[0] = arg1; + fcinfo.arg[1] = arg2; + fcinfo.arg[2] = arg3; + fcinfo.arg[3] = arg4; + fcinfo.arg[4] = arg5; + fcinfo.arg[5] = arg6; + fcinfo.arg[6] = arg7; + fcinfo.arg[7] = arg8; + + result = FunctionCallInvoke(&fcinfo); + + /* Check for null result, since caller is clearly not expecting one */ + if (fcinfo.isnull) + elog(ERROR, "FunctionCall8: function %u returned NULL", + fcinfo.flinfo->fn_oid); + + return result; +} + +Datum +FunctionCall9(FmgrInfo *flinfo, Datum arg1, Datum arg2, + Datum arg3, Datum arg4, Datum arg5, + Datum arg6, Datum arg7, Datum arg8, + Datum arg9) +{ + FunctionCallInfoData fcinfo; + Datum result; + + MemSet(&fcinfo, 0, sizeof(fcinfo)); + fcinfo.flinfo = flinfo; + fcinfo.nargs = 9; + fcinfo.arg[0] = arg1; + fcinfo.arg[1] = arg2; + fcinfo.arg[2] = arg3; + fcinfo.arg[3] = arg4; + fcinfo.arg[4] = arg5; + fcinfo.arg[5] = arg6; + fcinfo.arg[6] = arg7; + fcinfo.arg[7] = arg8; + fcinfo.arg[8] = arg9; + + result = FunctionCallInvoke(&fcinfo); + + /* Check for null result, since caller is clearly not expecting one */ + if (fcinfo.isnull) + elog(ERROR, "FunctionCall9: function %u returned NULL", + fcinfo.flinfo->fn_oid); + + return result; +} + + +/* These are for invocation of a function identified by OID with a + * directly-computed parameter list. Note that neither arguments nor result + * are allowed to be NULL. These are essentially fmgr_info() followed + * by FunctionCallN(). If the same function is to be invoked repeatedly, + * do the fmgr_info() once and then use FunctionCallN(). + */ +Datum +OidFunctionCall1(Oid functionId, Datum arg1) +{ + FmgrInfo flinfo; + FunctionCallInfoData fcinfo; + Datum result; + + fmgr_info(functionId, &flinfo); + + MemSet(&fcinfo, 0, sizeof(fcinfo)); + fcinfo.flinfo = &flinfo; + fcinfo.nargs = 1; + fcinfo.arg[0] = arg1; + + result = FunctionCallInvoke(&fcinfo); + + /* Check for null result, since caller is clearly not expecting one */ + if (fcinfo.isnull) + elog(ERROR, "OidFunctionCall1: function %u returned NULL", + flinfo.fn_oid); + + return result; +} + +Datum +OidFunctionCall2(Oid functionId, Datum arg1, Datum arg2) +{ + FmgrInfo flinfo; + FunctionCallInfoData fcinfo; + Datum result; + + fmgr_info(functionId, &flinfo); + + MemSet(&fcinfo, 0, sizeof(fcinfo)); + fcinfo.flinfo = &flinfo; + fcinfo.nargs = 2; + fcinfo.arg[0] = arg1; + fcinfo.arg[1] = arg2; + + result = FunctionCallInvoke(&fcinfo); + + /* Check for null result, since caller is clearly not expecting one */ + if (fcinfo.isnull) + elog(ERROR, "OidFunctionCall2: function %u returned NULL", + flinfo.fn_oid); + + return result; +} + +Datum +OidFunctionCall3(Oid functionId, Datum arg1, Datum arg2, + Datum arg3) +{ + FmgrInfo flinfo; + FunctionCallInfoData fcinfo; + Datum result; + + fmgr_info(functionId, &flinfo); + + MemSet(&fcinfo, 0, sizeof(fcinfo)); + fcinfo.flinfo = &flinfo; + fcinfo.nargs = 3; + fcinfo.arg[0] = arg1; + fcinfo.arg[1] = arg2; + fcinfo.arg[2] = arg3; + + result = FunctionCallInvoke(&fcinfo); + + /* Check for null result, since caller is clearly not expecting one */ + if (fcinfo.isnull) + elog(ERROR, "OidFunctionCall3: function %u returned NULL", + flinfo.fn_oid); + + return result; +} + +Datum +OidFunctionCall4(Oid functionId, Datum arg1, Datum arg2, + Datum arg3, Datum arg4) +{ + FmgrInfo flinfo; + FunctionCallInfoData fcinfo; + Datum result; + + fmgr_info(functionId, &flinfo); + + MemSet(&fcinfo, 0, sizeof(fcinfo)); + fcinfo.flinfo = &flinfo; + fcinfo.nargs = 4; + fcinfo.arg[0] = arg1; + fcinfo.arg[1] = arg2; + fcinfo.arg[2] = arg3; + fcinfo.arg[3] = arg4; + + result = FunctionCallInvoke(&fcinfo); + + /* Check for null result, since caller is clearly not expecting one */ + if (fcinfo.isnull) + elog(ERROR, "OidFunctionCall4: function %u returned NULL", + flinfo.fn_oid); + + return result; +} + +Datum +OidFunctionCall5(Oid functionId, Datum arg1, Datum arg2, + Datum arg3, Datum arg4, Datum arg5) +{ + FmgrInfo flinfo; + FunctionCallInfoData fcinfo; + Datum result; + + fmgr_info(functionId, &flinfo); + + MemSet(&fcinfo, 0, sizeof(fcinfo)); + fcinfo.flinfo = &flinfo; + fcinfo.nargs = 5; + fcinfo.arg[0] = arg1; + fcinfo.arg[1] = arg2; + fcinfo.arg[2] = arg3; + fcinfo.arg[3] = arg4; + fcinfo.arg[4] = arg5; + + result = FunctionCallInvoke(&fcinfo); + + /* Check for null result, since caller is clearly not expecting one */ + if (fcinfo.isnull) + elog(ERROR, "OidFunctionCall5: function %u returned NULL", + flinfo.fn_oid); + + return result; +} + +Datum +OidFunctionCall6(Oid functionId, Datum arg1, Datum arg2, + Datum arg3, Datum arg4, Datum arg5, + Datum arg6) +{ + FmgrInfo flinfo; + FunctionCallInfoData fcinfo; + Datum result; + + fmgr_info(functionId, &flinfo); + + MemSet(&fcinfo, 0, sizeof(fcinfo)); + fcinfo.flinfo = &flinfo; + fcinfo.nargs = 6; + fcinfo.arg[0] = arg1; + fcinfo.arg[1] = arg2; + fcinfo.arg[2] = arg3; + fcinfo.arg[3] = arg4; + fcinfo.arg[4] = arg5; + fcinfo.arg[5] = arg6; + + result = FunctionCallInvoke(&fcinfo); + + /* Check for null result, since caller is clearly not expecting one */ + if (fcinfo.isnull) + elog(ERROR, "OidFunctionCall6: function %u returned NULL", + flinfo.fn_oid); + + return result; +} + +Datum +OidFunctionCall7(Oid functionId, Datum arg1, Datum arg2, + Datum arg3, Datum arg4, Datum arg5, + Datum arg6, Datum arg7) +{ + FmgrInfo flinfo; + FunctionCallInfoData fcinfo; + Datum result; + + fmgr_info(functionId, &flinfo); + + MemSet(&fcinfo, 0, sizeof(fcinfo)); + fcinfo.flinfo = &flinfo; + fcinfo.nargs = 7; + fcinfo.arg[0] = arg1; + fcinfo.arg[1] = arg2; + fcinfo.arg[2] = arg3; + fcinfo.arg[3] = arg4; + fcinfo.arg[4] = arg5; + fcinfo.arg[5] = arg6; + fcinfo.arg[6] = arg7; + + result = FunctionCallInvoke(&fcinfo); + + /* Check for null result, since caller is clearly not expecting one */ + if (fcinfo.isnull) + elog(ERROR, "OidFunctionCall7: function %u returned NULL", + flinfo.fn_oid); + + return result; +} + +Datum +OidFunctionCall8(Oid functionId, Datum arg1, Datum arg2, + Datum arg3, Datum arg4, Datum arg5, + Datum arg6, Datum arg7, Datum arg8) +{ + FmgrInfo flinfo; + FunctionCallInfoData fcinfo; + Datum result; + + fmgr_info(functionId, &flinfo); + + MemSet(&fcinfo, 0, sizeof(fcinfo)); + fcinfo.flinfo = &flinfo; + fcinfo.nargs = 8; + fcinfo.arg[0] = arg1; + fcinfo.arg[1] = arg2; + fcinfo.arg[2] = arg3; + fcinfo.arg[3] = arg4; + fcinfo.arg[4] = arg5; + fcinfo.arg[5] = arg6; + fcinfo.arg[6] = arg7; + fcinfo.arg[7] = arg8; + + result = FunctionCallInvoke(&fcinfo); + + /* Check for null result, since caller is clearly not expecting one */ + if (fcinfo.isnull) + elog(ERROR, "OidFunctionCall8: function %u returned NULL", + flinfo.fn_oid); + + return result; +} + +Datum +OidFunctionCall9(Oid functionId, Datum arg1, Datum arg2, + Datum arg3, Datum arg4, Datum arg5, + Datum arg6, Datum arg7, Datum arg8, + Datum arg9) +{ + FmgrInfo flinfo; + FunctionCallInfoData fcinfo; + Datum result; + + fmgr_info(functionId, &flinfo); + + MemSet(&fcinfo, 0, sizeof(fcinfo)); + fcinfo.flinfo = &flinfo; + fcinfo.nargs = 9; + fcinfo.arg[0] = arg1; + fcinfo.arg[1] = arg2; + fcinfo.arg[2] = arg3; + fcinfo.arg[3] = arg4; + fcinfo.arg[4] = arg5; + fcinfo.arg[5] = arg6; + fcinfo.arg[6] = arg7; + fcinfo.arg[7] = arg8; + fcinfo.arg[8] = arg9; + + result = FunctionCallInvoke(&fcinfo); + + /* Check for null result, since caller is clearly not expecting one */ + if (fcinfo.isnull) + elog(ERROR, "OidFunctionCall9: function %u returned NULL", + flinfo.fn_oid); + + return result; +} + + +/*------------------------------------------------------------------------- + * Support routines for standard pass-by-reference datatypes + * + * Note: at some point, at least on some platforms, these might become + * pass-by-value types. Obviously Datum must be >= 8 bytes to allow + * int64 or float8 to be pass-by-value. I think that Float4GetDatum + * and Float8GetDatum will need to be out-of-line routines anyway, + * since just casting from float to Datum will not do the right thing; + * some kind of trick with pointer-casting or a union will be needed. + *------------------------------------------------------------------------- + */ + +Datum +Int64GetDatum(int64 X) +{ + int64 *retval = (int64 *) palloc(sizeof(int64)); + + *retval = X; + return PointerGetDatum(retval); +} + +Datum +Float4GetDatum(float4 X) +{ + float4 *retval = (float4 *) palloc(sizeof(float4)); + + *retval = X; + return PointerGetDatum(retval); +} + +Datum +Float8GetDatum(float8 X) +{ + float8 *retval = (float8 *) palloc(sizeof(float8)); + + *retval = X; + return PointerGetDatum(retval); } diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c index c4675a6b57..68e293ef1d 100644 --- a/src/backend/utils/init/postinit.c +++ b/src/backend/utils/init/postinit.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.57 2000/04/12 17:16:02 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.58 2000/05/28 17:56:08 tgl Exp $ * * *------------------------------------------------------------------------- @@ -30,6 +30,7 @@ #include "storage/proc.h" #include "storage/sinval.h" #include "storage/smgr.h" +#include "utils/fmgroids.h" #include "utils/inval.h" #include "utils/portal.h" #include "utils/relcache.h" diff --git a/src/bin/scripts/createlang.sh b/src/bin/scripts/createlang.sh index 11d439f435..f2e7f60e12 100644 --- a/src/bin/scripts/createlang.sh +++ b/src/bin/scripts/createlang.sh @@ -8,7 +8,7 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createlang.sh,v 1.11 2000/05/15 16:20:45 momjian Exp $ +# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createlang.sh,v 1.12 2000/05/28 17:56:08 tgl Exp $ # #------------------------------------------------------------------------- @@ -244,7 +244,7 @@ fi # ---------- # Create the call handler and the language # ---------- -$PSQL "CREATE FUNCTION $handler () RETURNS OPAQUE AS '$PGLIB/${langname}__DLSUFFIX__' LANGUAGE 'C'" +$PSQL "CREATE FUNCTION $handler () RETURNS OPAQUE AS '$PGLIB/${langname}__DLSUFFIX__' LANGUAGE 'newC'" if [ $? -ne 0 ]; then echo "$CMDNAME: language installation failed" exit 1 diff --git a/src/include/access/valid.h b/src/include/access/valid.h index 0fa7b0840b..e710ff415a 100644 --- a/src/include/access/valid.h +++ b/src/include/access/valid.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: valid.h,v 1.20 2000/01/26 05:57:51 momjian Exp $ + * $Id: valid.h,v 1.21 2000/05/28 17:56:14 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -58,7 +58,7 @@ do \ break; \ } \ \ - if (__cur_keys->sk_func.fn_addr == (func_ptr) oideq) /* optimization */ \ + if (__cur_keys->sk_func.fn_addr == (PGFunction) oideq) /* optimization */ \ __test = (__cur_keys->sk_argument == __atp); \ else if (__cur_keys->sk_flags & SK_COMMUTE) \ __test = (long) FMGR_PTR2(&__cur_keys->sk_func, \ diff --git a/src/include/c.h b/src/include/c.h index 43c9643fd9..13ac2cfcd1 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: c.h,v 1.69 2000/04/12 17:16:24 momjian Exp $ + * $Id: c.h,v 1.70 2000/05/28 17:56:09 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -250,6 +250,28 @@ typedef struct */ typedef signed int Offset; +/* + * Common Postgres datatypes. + */ +typedef int16 int2; +typedef int32 int4; +typedef float float4; +typedef double float8; + +#ifdef HAVE_LONG_INT_64 +/* Plain "long int" fits, use it */ +typedef long int int64; +#else +#ifdef HAVE_LONG_LONG_INT_64 +/* We have working support for "long long int", use that */ +typedef long long int int64; +#else +/* Won't actually work, but fall back to long int so that code compiles */ +typedef long int int64; +#define INT64_IS_BUSTED +#endif +#endif + /* ---------------------------------------------------------------- * Section 4: datum type + support macros * ---------------------------------------------------------------- @@ -287,6 +309,24 @@ typedef Datum *DatumPtr; #define SET_2_BYTES(value) (((Datum) (value)) & 0x0000ffff) #define SET_4_BYTES(value) (((Datum) (value)) & 0xffffffff) +/* + * DatumGetBool + * Returns boolean value of a datum. + * + * Note: any nonzero value will be considered TRUE. + */ + +#define DatumGetBool(X) ((bool) (((Datum) (X)) != 0)) + +/* + * BoolGetDatum + * Returns datum representation for a boolean. + * + * Note: any nonzero value will be considered TRUE. + */ + +#define BoolGetDatum(X) ((Datum) ((X) ? 1 : 0)) + /* * DatumGetChar * Returns character value of a datum. @@ -406,25 +446,112 @@ typedef Datum *DatumPtr; #define PointerGetDatum(X) ((Datum) (X)) +/* + * DatumGetCString + * Returns C string (null-terminated string) value of a datum. + * + * Note: C string is not a full-fledged Postgres type at present, + * but type input functions use this conversion for their inputs. + */ + +#define DatumGetCString(X) ((char *) DatumGetPointer(X)) + +/* + * CStringGetDatum + * Returns datum representation for a C string (null-terminated string). + * + * Note: C string is not a full-fledged Postgres type at present, + * but type output functions use this conversion for their outputs. + * Note: CString is pass-by-reference; caller must ensure the pointed-to + * value has adequate lifetime. + */ + +#define CStringGetDatum(X) PointerGetDatum(X) + /* * DatumGetName * Returns name value of a datum. */ -#define DatumGetName(X) ((Name) DatumGetPointer((Datum) (X))) +#define DatumGetName(X) ((Name) DatumGetPointer(X)) /* * NameGetDatum * Returns datum representation for a name. + * + * Note: Name is pass-by-reference; caller must ensure the pointed-to + * value has adequate lifetime. */ -#define NameGetDatum(X) PointerGetDatum((Pointer) (X)) +#define NameGetDatum(X) PointerGetDatum(X) + +/* + * DatumGetInt64 + * Returns 64-bit integer value of a datum. + * + * Note: this macro hides the fact that int64 is currently a + * pass-by-reference type. Someday it may be pass-by-value, + * at least on some platforms. + */ + +#define DatumGetInt64(X) (* ((int64 *) DatumGetPointer(X))) + +/* + * Int64GetDatum + * Returns datum representation for a 64-bit integer. + * + * Note: this routine returns a reference to palloc'd space. + */ + +extern Datum Int64GetDatum(int64 X); + +/* + * DatumGetFloat4 + * Returns 4-byte floating point value of a datum. + * + * Note: this macro hides the fact that float4 is currently a + * pass-by-reference type. Someday it may be pass-by-value. + */ + +#define DatumGetFloat4(X) (* ((float4 *) DatumGetPointer(X))) + +/* + * Float4GetDatum + * Returns datum representation for a 4-byte floating point number. + * + * Note: this routine returns a reference to palloc'd space. + */ + +extern Datum Float4GetDatum(float4 X); + +/* + * DatumGetFloat8 + * Returns 8-byte floating point value of a datum. + * + * Note: this macro hides the fact that float8 is currently a + * pass-by-reference type. Someday it may be pass-by-value, + * at least on some platforms. + */ + +#define DatumGetFloat8(X) (* ((float8 *) DatumGetPointer(X))) + +/* + * Float8GetDatum + * Returns datum representation for an 8-byte floating point number. + * + * Note: this routine returns a reference to palloc'd space. + */ + +extern Datum Float8GetDatum(float8 X); /* * DatumGetFloat32 * Returns 32-bit floating point value of a datum. * This is really a pointer, of course. + * + * XXX: this macro is now deprecated in favor of DatumGetFloat4. + * It will eventually go away. */ #define DatumGetFloat32(X) ((float32) DatumGetPointer(X)) @@ -433,14 +560,20 @@ typedef Datum *DatumPtr; * Float32GetDatum * Returns datum representation for a 32-bit floating point number. * This is really a pointer, of course. + * + * XXX: this macro is now deprecated in favor of Float4GetDatum. + * It will eventually go away. */ -#define Float32GetDatum(X) PointerGetDatum((Pointer) (X)) +#define Float32GetDatum(X) PointerGetDatum(X) /* * DatumGetFloat64 * Returns 64-bit floating point value of a datum. * This is really a pointer, of course. + * + * XXX: this macro is now deprecated in favor of DatumGetFloat8. + * It will eventually go away. */ #define DatumGetFloat64(X) ((float64) DatumGetPointer(X)) @@ -449,9 +582,12 @@ typedef Datum *DatumPtr; * Float64GetDatum * Returns datum representation for a 64-bit floating point number. * This is really a pointer, of course. + * + * XXX: this macro is now deprecated in favor of Float8GetDatum. + * It will eventually go away. */ -#define Float64GetDatum(X) PointerGetDatum((Pointer) (X)) +#define Float64GetDatum(X) PointerGetDatum(X) /* ---------------------------------------------------------------- * Section 5: IsValid macros for system types diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h index 662770ace9..e8717ddb05 100644 --- a/src/include/catalog/catversion.h +++ b/src/include/catalog/catversion.h @@ -37,7 +37,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: catversion.h,v 1.21 2000/05/05 03:10:24 tgl Exp $ + * $Id: catversion.h,v 1.22 2000/05/28 17:56:16 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -53,6 +53,6 @@ */ /* yyyymmddN */ -#define CATALOG_VERSION_NO 200005041 +#define CATALOG_VERSION_NO 200005281 #endif diff --git a/src/include/catalog/pg_attribute.h b/src/include/catalog/pg_attribute.h index 6edd86b1f2..d3d870a411 100644 --- a/src/include/catalog/pg_attribute.h +++ b/src/include/catalog/pg_attribute.h @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: pg_attribute.h,v 1.55 2000/04/12 17:16:28 momjian Exp $ + * $Id: pg_attribute.h,v 1.56 2000/05/28 17:56:16 tgl Exp $ * * NOTES * the genbki.sh script reads this file and generates .bki @@ -294,16 +294,17 @@ DATA(insert OID = 0 ( 1262 cmax 29 0 4 -6 0 -1 -1 t p f i f f)); { 1255, {"proisinh"}, 16, 0, 1, 4, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \ { 1255, {"proistrusted"}, 16, 0, 1, 5, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \ { 1255, {"proiscachable"}, 16, 0, 1, 6, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \ -{ 1255, {"pronargs"}, 21, 0, 2, 7, 0, -1, -1, '\001', 'p', '\0', 's', '\0', '\0' }, \ -{ 1255, {"proretset"}, 16, 0, 1, 8, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \ -{ 1255, {"prorettype"}, 26, 0, 4, 9, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \ -{ 1255, {"proargtypes"}, 30, 0, INDEX_MAX_KEYS*4, 10, 0, -1, -1, '\0', 'p', '\0', 'i', '\0', '\0' }, \ -{ 1255, {"probyte_pct"}, 23, 0, 4, 11, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \ -{ 1255, {"properbyte_cpu"}, 23, 0, 4, 12, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \ -{ 1255, {"propercall_cpu"}, 23, 0, 4, 13, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \ -{ 1255, {"prooutin_ratio"}, 23, 0, 4, 14, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \ -{ 1255, {"prosrc"}, 25, 0, -1, 15, 0, -1, -1, '\0', 'p', '\0', 'i', '\0', '\0' }, \ -{ 1255, {"probin"}, 17, 0, -1, 16, 0, -1, -1, '\0', 'p', '\0', 'i', '\0', '\0' } +{ 1255, {"proisstrict"}, 16, 0, 1, 7, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \ +{ 1255, {"pronargs"}, 21, 0, 2, 8, 0, -1, -1, '\001', 'p', '\0', 's', '\0', '\0' }, \ +{ 1255, {"proretset"}, 16, 0, 1, 9, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \ +{ 1255, {"prorettype"}, 26, 0, 4, 10, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \ +{ 1255, {"proargtypes"}, 30, 0, INDEX_MAX_KEYS*4, 11, 0, -1, -1, '\0', 'p', '\0', 'i', '\0', '\0' }, \ +{ 1255, {"probyte_pct"}, 23, 0, 4, 12, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \ +{ 1255, {"properbyte_cpu"}, 23, 0, 4, 13, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \ +{ 1255, {"propercall_cpu"}, 23, 0, 4, 14, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \ +{ 1255, {"prooutin_ratio"}, 23, 0, 4, 15, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \ +{ 1255, {"prosrc"}, 25, 0, -1, 16, 0, -1, -1, '\0', 'p', '\0', 'i', '\0', '\0' }, \ +{ 1255, {"probin"}, 17, 0, -1, 17, 0, -1, -1, '\0', 'p', '\0', 'i', '\0', '\0' } DATA(insert OID = 0 ( 1255 proname 19 0 NAMEDATALEN 1 0 -1 -1 f p f i f f)); DATA(insert OID = 0 ( 1255 proowner 23 0 4 2 0 -1 -1 t p f i f f)); @@ -311,16 +312,17 @@ DATA(insert OID = 0 ( 1255 prolang 26 0 4 3 0 -1 -1 t p f i f f)); DATA(insert OID = 0 ( 1255 proisinh 16 0 1 4 0 -1 -1 t p f c f f)); DATA(insert OID = 0 ( 1255 proistrusted 16 0 1 5 0 -1 -1 t p f c f f)); DATA(insert OID = 0 ( 1255 proiscachable 16 0 1 6 0 -1 -1 t p f c f f)); -DATA(insert OID = 0 ( 1255 pronargs 21 0 2 7 0 -1 -1 t p f s f f)); -DATA(insert OID = 0 ( 1255 proretset 16 0 1 8 0 -1 -1 t p f c f f)); -DATA(insert OID = 0 ( 1255 prorettype 26 0 4 9 0 -1 -1 t p f i f f)); -DATA(insert OID = 0 ( 1255 proargtypes 30 0 INDEX_MAX_KEYS*4 10 0 -1 -1 f p f i f f)); -DATA(insert OID = 0 ( 1255 probyte_pct 23 0 4 11 0 -1 -1 t p f i f f)); -DATA(insert OID = 0 ( 1255 properbyte_cpu 23 0 4 12 0 -1 -1 t p f i f f)); -DATA(insert OID = 0 ( 1255 propercall_cpu 23 0 4 13 0 -1 -1 t p f i f f)); -DATA(insert OID = 0 ( 1255 prooutin_ratio 23 0 4 14 0 -1 -1 t p f i f f)); -DATA(insert OID = 0 ( 1255 prosrc 25 0 -1 15 0 -1 -1 f p f i f f)); -DATA(insert OID = 0 ( 1255 probin 17 0 -1 16 0 -1 -1 f p f i f f)); +DATA(insert OID = 0 ( 1255 proisstrict 16 0 1 7 0 -1 -1 t p f c f f)); +DATA(insert OID = 0 ( 1255 pronargs 21 0 2 8 0 -1 -1 t p f s f f)); +DATA(insert OID = 0 ( 1255 proretset 16 0 1 9 0 -1 -1 t p f c f f)); +DATA(insert OID = 0 ( 1255 prorettype 26 0 4 10 0 -1 -1 t p f i f f)); +DATA(insert OID = 0 ( 1255 proargtypes 30 0 INDEX_MAX_KEYS*4 11 0 -1 -1 f p f i f f)); +DATA(insert OID = 0 ( 1255 probyte_pct 23 0 4 12 0 -1 -1 t p f i f f)); +DATA(insert OID = 0 ( 1255 properbyte_cpu 23 0 4 13 0 -1 -1 t p f i f f)); +DATA(insert OID = 0 ( 1255 propercall_cpu 23 0 4 14 0 -1 -1 t p f i f f)); +DATA(insert OID = 0 ( 1255 prooutin_ratio 23 0 4 15 0 -1 -1 t p f i f f)); +DATA(insert OID = 0 ( 1255 prosrc 25 0 -1 16 0 -1 -1 f p f i f f)); +DATA(insert OID = 0 ( 1255 probin 17 0 -1 17 0 -1 -1 f p f i f f)); DATA(insert OID = 0 ( 1255 ctid 27 0 6 -1 0 -1 -1 f p f i f f)); DATA(insert OID = 0 ( 1255 oid 26 0 4 -2 0 -1 -1 t p f i f f)); DATA(insert OID = 0 ( 1255 xmin 28 0 4 -3 0 -1 -1 t p f i f f)); diff --git a/src/include/catalog/pg_class.h b/src/include/catalog/pg_class.h index 7aed094e11..15c9e9fcd9 100644 --- a/src/include/catalog/pg_class.h +++ b/src/include/catalog/pg_class.h @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: pg_class.h,v 1.33 2000/01/26 05:57:57 momjian Exp $ + * $Id: pg_class.h,v 1.34 2000/05/28 17:56:16 tgl Exp $ * * NOTES * ``pg_relation'' is being replaced by ``pg_class''. currently @@ -133,7 +133,7 @@ DATA(insert OID = 1247 ( pg_type 71 PGUID 0 0 0 0 f f r 16 0 0 0 0 0 f f _nu DESCR(""); DATA(insert OID = 1249 ( pg_attribute 75 PGUID 0 0 0 0 f f r 15 0 0 0 0 0 f f _null_ )); DESCR(""); -DATA(insert OID = 1255 ( pg_proc 81 PGUID 0 0 0 0 f f r 16 0 0 0 0 0 f f _null_ )); +DATA(insert OID = 1255 ( pg_proc 81 PGUID 0 0 0 0 f f r 17 0 0 0 0 0 f f _null_ )); DESCR(""); DATA(insert OID = 1259 ( pg_class 83 PGUID 0 0 0 0 f f r 19 0 0 0 0 0 f f _null_ )); DESCR(""); diff --git a/src/include/catalog/pg_language.h b/src/include/catalog/pg_language.h index 75186cd450..0d597d8c4d 100644 --- a/src/include/catalog/pg_language.h +++ b/src/include/catalog/pg_language.h @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: pg_language.h,v 1.10 2000/01/26 05:57:57 momjian Exp $ + * $Id: pg_language.h,v 1.11 2000/05/28 17:56:16 tgl Exp $ * * NOTES * the genbki.sh script reads this file and generates .bki @@ -63,14 +63,20 @@ typedef FormData_pg_language *Form_pg_language; * ---------------- */ -DATA(insert OID = 11 ( internal f 0 0 "n/a" )); -DESCR(""); +DATA(insert OID = 11 ( internal f f 0 "n/a" )); +DESCR("old-style built-in functions"); #define INTERNALlanguageId 11 -DATA(insert OID = 13 ( "C" f 0 0 "/bin/cc" )); -DESCR(""); +DATA(insert OID = 12 ( newinternal f f 0 "n/a" )); +DESCR("new-style built-in functions"); +#define NEWINTERNALlanguageId 12 +DATA(insert OID = 13 ( "C" f f 0 "/bin/cc" )); +DESCR("Dynamically-loaded old-style C functions"); #define ClanguageId 13 -DATA(insert OID = 14 ( "sql" f 0 0 "postgres")); -DESCR(""); +DATA(insert OID = 10 ( "newC" f f 0 "/bin/cc" )); +DESCR("Dynamically-loaded new-style C functions"); +#define NEWClanguageId 10 +DATA(insert OID = 14 ( "sql" f f 0 "postgres")); +DESCR("SQL-language functions"); #define SQLlanguageId 14 diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h index 6995587c0c..2a787f1f37 100644 --- a/src/include/catalog/pg_proc.h +++ b/src/include/catalog/pg_proc.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: pg_proc.h,v 1.133 2000/04/16 04:41:03 tgl Exp $ + * $Id: pg_proc.h,v 1.134 2000/05/28 17:56:16 tgl Exp $ * * NOTES * The script catalog/genbki.sh reads this file and generates .bki @@ -45,6 +45,7 @@ CATALOG(pg_proc) BOOTSTRAP bool proisinh; bool proistrusted; bool proiscachable; + bool proisstrict; int2 pronargs; bool proretset; Oid prorettype; @@ -68,23 +69,24 @@ typedef FormData_pg_proc *Form_pg_proc; * compiler constants for pg_proc * ---------------- */ -#define Natts_pg_proc 16 +#define Natts_pg_proc 17 #define Anum_pg_proc_proname 1 #define Anum_pg_proc_proowner 2 #define Anum_pg_proc_prolang 3 #define Anum_pg_proc_proisinh 4 #define Anum_pg_proc_proistrusted 5 #define Anum_pg_proc_proiscachable 6 -#define Anum_pg_proc_pronargs 7 -#define Anum_pg_proc_proretset 8 -#define Anum_pg_proc_prorettype 9 -#define Anum_pg_proc_proargtypes 10 -#define Anum_pg_proc_probyte_pct 11 -#define Anum_pg_proc_properbyte_cpu 12 -#define Anum_pg_proc_propercall_cpu 13 -#define Anum_pg_proc_prooutin_ratio 14 -#define Anum_pg_proc_prosrc 15 -#define Anum_pg_proc_probin 16 +#define Anum_pg_proc_proisstrict 7 +#define Anum_pg_proc_pronargs 8 +#define Anum_pg_proc_proretset 9 +#define Anum_pg_proc_prorettype 10 +#define Anum_pg_proc_proargtypes 11 +#define Anum_pg_proc_probyte_pct 12 +#define Anum_pg_proc_properbyte_cpu 13 +#define Anum_pg_proc_propercall_cpu 14 +#define Anum_pg_proc_prooutin_ratio 15 +#define Anum_pg_proc_prosrc 16 +#define Anum_pg_proc_probin 17 /* ---------------- * initial contents of pg_proc @@ -94,2372 +96,2373 @@ typedef FormData_pg_proc *Form_pg_proc; /* keep the following ordered by OID so that later changes can be made easier */ /* OIDS 1 - 99 */ -DATA(insert OID = 12 ( update_pg_pwd PGUID 11 f t f 0 f 0 "" 100 0 0 100 update_pg_pwd - )); -DESCR("update pg_pwd file"); -DATA(insert OID = 1242 ( boolin PGUID 11 f t t 1 f 16 "0" 100 0 0 100 boolin - )); +DATA(insert OID = 1242 ( boolin PGUID 11 f t t t 1 f 16 "0" 100 0 0 100 boolin - )); DESCR("(internal)"); -DATA(insert OID = 1243 ( boolout PGUID 11 f t t 1 f 23 "0" 100 0 0 100 boolout - )); +DATA(insert OID = 1243 ( boolout PGUID 11 f t t t 1 f 23 "0" 100 0 0 100 boolout - )); DESCR("(internal)"); -DATA(insert OID = 1244 ( byteain PGUID 11 f t t 1 f 17 "0" 100 0 0 100 byteain - )); +DATA(insert OID = 1244 ( byteain PGUID 11 f t t t 1 f 17 "0" 100 0 0 100 byteain - )); DESCR("(internal)"); -DATA(insert OID = 31 ( byteaout PGUID 11 f t t 1 f 23 "0" 100 0 0 100 byteaout - )); +DATA(insert OID = 31 ( byteaout PGUID 11 f t t t 1 f 23 "0" 100 0 0 100 byteaout - )); DESCR("(internal)"); -DATA(insert OID = 1245 ( charin PGUID 11 f t t 1 f 18 "0" 100 0 0 100 charin - )); +DATA(insert OID = 1245 ( charin PGUID 11 f t t t 1 f 18 "0" 100 0 0 100 charin - )); DESCR("(internal)"); -DATA(insert OID = 33 ( charout PGUID 11 f t t 1 f 23 "0" 100 0 0 100 charout - )); +DATA(insert OID = 33 ( charout PGUID 11 f t t t 1 f 23 "0" 100 0 0 100 charout - )); DESCR("(internal)"); -DATA(insert OID = 34 ( namein PGUID 11 f t t 1 f 19 "0" 100 0 0 100 namein - )); +DATA(insert OID = 34 ( namein PGUID 11 f t t t 1 f 19 "0" 100 0 0 100 namein - )); DESCR("(internal)"); -DATA(insert OID = 35 ( nameout PGUID 11 f t t 1 f 23 "0" 100 0 0 100 nameout - )); +DATA(insert OID = 35 ( nameout PGUID 11 f t t t 1 f 23 "0" 100 0 0 100 nameout - )); DESCR("(internal)"); -DATA(insert OID = 38 ( int2in PGUID 11 f t t 1 f 21 "0" 100 0 0 100 int2in - )); +DATA(insert OID = 38 ( int2in PGUID 11 f t t t 1 f 21 "0" 100 0 0 100 int2in - )); DESCR("(internal)"); -DATA(insert OID = 39 ( int2out PGUID 11 f t t 1 f 23 "0" 100 0 0 100 int2out - )); +DATA(insert OID = 39 ( int2out PGUID 11 f t t t 1 f 23 "0" 100 0 0 100 int2out - )); DESCR("(internal)"); -DATA(insert OID = 40 ( int2vectorin PGUID 11 f t t 1 f 22 "0" 100 0 0 100 int2vectorin - )); +DATA(insert OID = 40 ( int2vectorin PGUID 11 f t t t 1 f 22 "0" 100 0 0 100 int2vectorin - )); DESCR("(internal)"); -DATA(insert OID = 41 ( int2vectorout PGUID 11 f t t 1 f 23 "0" 100 0 0 100 int2vectorout - )); +DATA(insert OID = 41 ( int2vectorout PGUID 11 f t t t 1 f 23 "0" 100 0 0 100 int2vectorout - )); DESCR("(internal)"); -DATA(insert OID = 42 ( int4in PGUID 11 f t t 1 f 23 "0" 100 0 0 100 int4in - )); +DATA(insert OID = 42 ( int4in PGUID 11 f t t t 1 f 23 "0" 100 0 0 100 int4in - )); DESCR("(internal)"); -DATA(insert OID = 43 ( int4out PGUID 11 f t t 1 f 19 "0" 100 0 0 100 int4out - )); +DATA(insert OID = 43 ( int4out PGUID 11 f t t t 1 f 19 "0" 100 0 0 100 int4out - )); DESCR("(internal)"); -DATA(insert OID = 44 ( regprocin PGUID 11 f t f 1 f 24 "0" 100 0 0 100 regprocin - )); +DATA(insert OID = 44 ( regprocin PGUID 11 f t f t 1 f 24 "0" 100 0 0 100 regprocin - )); DESCR("(internal)"); -DATA(insert OID = 45 ( regprocout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 regprocout - )); +DATA(insert OID = 45 ( regprocout PGUID 11 f t f t 1 f 23 "0" 100 0 0 100 regprocout - )); DESCR("(internal)"); -DATA(insert OID = 46 ( textin PGUID 11 f t t 1 f 25 "0" 100 0 0 100 textin - )); +DATA(insert OID = 46 ( textin PGUID 11 f t t t 1 f 25 "0" 100 0 0 100 textin - )); DESCR("(internal)"); -DATA(insert OID = 47 ( textout PGUID 11 f t t 1 f 23 "0" 100 0 0 100 textout - )); +DATA(insert OID = 47 ( textout PGUID 11 f t t t 1 f 23 "0" 100 0 0 100 textout - )); DESCR("(internal)"); -DATA(insert OID = 48 ( tidin PGUID 11 f t t 1 f 27 "0" 100 0 0 100 tidin - )); +DATA(insert OID = 48 ( tidin PGUID 11 f t t t 1 f 27 "0" 100 0 0 100 tidin - )); DESCR("(internal)"); -DATA(insert OID = 49 ( tidout PGUID 11 f t t 1 f 23 "0" 100 0 0 100 tidout - )); +DATA(insert OID = 49 ( tidout PGUID 11 f t t t 1 f 23 "0" 100 0 0 100 tidout - )); DESCR("(internal)"); -DATA(insert OID = 50 ( xidin PGUID 11 f t t 1 f 28 "0" 100 0 0 100 xidin - )); +DATA(insert OID = 50 ( xidin PGUID 11 f t t t 1 f 28 "0" 100 0 0 100 xidin - )); DESCR("(internal)"); -DATA(insert OID = 51 ( xidout PGUID 11 f t t 1 f 23 "0" 100 0 0 100 xidout - )); +DATA(insert OID = 51 ( xidout PGUID 11 f t t t 1 f 23 "0" 100 0 0 100 xidout - )); DESCR("(internal)"); -DATA(insert OID = 52 ( cidin PGUID 11 f t t 1 f 29 "0" 100 0 0 100 cidin - )); +DATA(insert OID = 52 ( cidin PGUID 11 f t t t 1 f 29 "0" 100 0 0 100 cidin - )); DESCR("(internal)"); -DATA(insert OID = 53 ( cidout PGUID 11 f t t 1 f 23 "0" 100 0 0 100 cidout - )); +DATA(insert OID = 53 ( cidout PGUID 11 f t t t 1 f 23 "0" 100 0 0 100 cidout - )); DESCR("(internal)"); -DATA(insert OID = 54 ( oidvectorin PGUID 11 f t t 1 f 30 "0" 100 0 0 100 oidvectorin - )); +DATA(insert OID = 54 ( oidvectorin PGUID 11 f t t t 1 f 30 "0" 100 0 0 100 oidvectorin - )); DESCR("(internal)"); -DATA(insert OID = 55 ( oidvectorout PGUID 11 f t t 1 f 23 "0" 100 0 0 100 oidvectorout - )); +DATA(insert OID = 55 ( oidvectorout PGUID 11 f t t t 1 f 23 "0" 100 0 0 100 oidvectorout - )); DESCR("(internal)"); -DATA(insert OID = 56 ( boollt PGUID 11 f t t 2 f 16 "16 16" 100 0 0 100 boollt - )); +DATA(insert OID = 56 ( boollt PGUID 11 f t t t 2 f 16 "16 16" 100 0 0 100 boollt - )); DESCR("less-than"); -DATA(insert OID = 57 ( boolgt PGUID 11 f t t 2 f 16 "16 16" 100 0 0 100 boolgt - )); +DATA(insert OID = 57 ( boolgt PGUID 11 f t t t 2 f 16 "16 16" 100 0 0 100 boolgt - )); DESCR("greater-than"); -DATA(insert OID = 60 ( booleq PGUID 11 f t t 2 f 16 "16 16" 100 0 0 100 booleq - )); +DATA(insert OID = 60 ( booleq PGUID 11 f t t t 2 f 16 "16 16" 100 0 0 100 booleq - )); DESCR("equal"); -DATA(insert OID = 61 ( chareq PGUID 11 f t t 2 f 16 "18 18" 100 0 0 100 chareq - )); +DATA(insert OID = 61 ( chareq PGUID 11 f t t t 2 f 16 "18 18" 100 0 0 100 chareq - )); DESCR("equal"); -DATA(insert OID = 62 ( nameeq PGUID 11 f t t 2 f 16 "19 19" 100 0 0 100 nameeq - )); +DATA(insert OID = 62 ( nameeq PGUID 11 f t t t 2 f 16 "19 19" 100 0 0 100 nameeq - )); DESCR("equal"); -DATA(insert OID = 63 ( int2eq PGUID 11 f t t 2 f 16 "21 21" 100 0 0 100 int2eq - )); +DATA(insert OID = 63 ( int2eq PGUID 11 f t t t 2 f 16 "21 21" 100 0 0 100 int2eq - )); DESCR("equal"); -DATA(insert OID = 64 ( int2lt PGUID 11 f t t 2 f 16 "21 21" 100 0 0 100 int2lt - )); +DATA(insert OID = 64 ( int2lt PGUID 11 f t t t 2 f 16 "21 21" 100 0 0 100 int2lt - )); DESCR("less-than"); -DATA(insert OID = 65 ( int4eq PGUID 11 f t t 2 f 16 "23 23" 100 0 0 100 int4eq - )); +DATA(insert OID = 65 ( int4eq PGUID 11 f t t t 2 f 16 "23 23" 100 0 0 100 int4eq - )); DESCR("equal"); -DATA(insert OID = 66 ( int4lt PGUID 11 f t t 2 f 16 "23 23" 100 0 0 100 int4lt - )); +DATA(insert OID = 66 ( int4lt PGUID 11 f t t t 2 f 16 "23 23" 100 0 0 100 int4lt - )); DESCR("less-than"); -DATA(insert OID = 67 ( texteq PGUID 11 f t t 2 f 16 "25 25" 100 0 0 0 texteq - )); +DATA(insert OID = 67 ( texteq PGUID 11 f t t t 2 f 16 "25 25" 100 0 0 0 texteq - )); DESCR("equal"); -DATA(insert OID = 68 ( xideq PGUID 11 f t t 2 f 16 "28 28" 100 0 0 100 xideq - )); +DATA(insert OID = 68 ( xideq PGUID 11 f t t t 2 f 16 "28 28" 100 0 0 100 xideq - )); DESCR("equal"); -DATA(insert OID = 69 ( cideq PGUID 11 f t t 2 f 16 "29 29" 100 0 0 100 cideq - )); +DATA(insert OID = 69 ( cideq PGUID 11 f t t t 2 f 16 "29 29" 100 0 0 100 cideq - )); DESCR("equal"); -DATA(insert OID = 70 ( charne PGUID 11 f t t 2 f 16 "18 18" 100 0 0 100 charne - )); +DATA(insert OID = 70 ( charne PGUID 11 f t t t 2 f 16 "18 18" 100 0 0 100 charne - )); DESCR("not equal"); -DATA(insert OID = 1246 ( charlt PGUID 11 f t t 2 f 16 "18 18" 100 0 0 100 charlt - )); +DATA(insert OID = 1246 ( charlt PGUID 11 f t t t 2 f 16 "18 18" 100 0 0 100 charlt - )); DESCR("less-than"); -DATA(insert OID = 72 ( charle PGUID 11 f t t 2 f 16 "18 18" 100 0 0 100 charle - )); +DATA(insert OID = 72 ( charle PGUID 11 f t t t 2 f 16 "18 18" 100 0 0 100 charle - )); DESCR("less-than-or-equal"); -DATA(insert OID = 73 ( chargt PGUID 11 f t t 2 f 16 "18 18" 100 0 0 100 chargt - )); +DATA(insert OID = 73 ( chargt PGUID 11 f t t t 2 f 16 "18 18" 100 0 0 100 chargt - )); DESCR("greater-than"); -DATA(insert OID = 74 ( charge PGUID 11 f t t 2 f 16 "18 18" 100 0 0 100 charge - )); +DATA(insert OID = 74 ( charge PGUID 11 f t t t 2 f 16 "18 18" 100 0 0 100 charge - )); DESCR("greater-than-or-equal"); -DATA(insert OID = 1248 ( charpl PGUID 11 f t t 2 f 18 "18 18" 100 0 0 100 charpl - )); +DATA(insert OID = 1248 ( charpl PGUID 11 f t t t 2 f 18 "18 18" 100 0 0 100 charpl - )); DESCR("addition"); -DATA(insert OID = 1250 ( charmi PGUID 11 f t t 2 f 18 "18 18" 100 0 0 100 charmi - )); +DATA(insert OID = 1250 ( charmi PGUID 11 f t t t 2 f 18 "18 18" 100 0 0 100 charmi - )); DESCR("subtract"); -DATA(insert OID = 77 ( charmul PGUID 11 f t t 2 f 18 "18 18" 100 0 0 100 charmul - )); +DATA(insert OID = 77 ( charmul PGUID 11 f t t t 2 f 18 "18 18" 100 0 0 100 charmul - )); DESCR("multiply"); -DATA(insert OID = 78 ( chardiv PGUID 11 f t t 2 f 18 "18 18" 100 0 0 100 chardiv - )); +DATA(insert OID = 78 ( chardiv PGUID 11 f t t t 2 f 18 "18 18" 100 0 0 100 chardiv - )); DESCR("divide"); -DATA(insert OID = 79 ( nameregexeq PGUID 11 f t t 2 f 16 "19 25" 100 0 0 100 nameregexeq - )); +DATA(insert OID = 79 ( nameregexeq PGUID 11 f t t t 2 f 16 "19 25" 100 0 0 100 nameregexeq - )); DESCR("matches regex., case-sensitive"); -DATA(insert OID = 1252 ( nameregexne PGUID 11 f t t 2 f 16 "19 25" 100 0 0 100 nameregexne - )); +DATA(insert OID = 1252 ( nameregexne PGUID 11 f t t t 2 f 16 "19 25" 100 0 0 100 nameregexne - )); DESCR("does not match regex., case-sensitive"); -DATA(insert OID = 1254 ( textregexeq PGUID 11 f t t 2 f 16 "25 25" 100 0 1 0 textregexeq - )); +DATA(insert OID = 1254 ( textregexeq PGUID 11 f t t t 2 f 16 "25 25" 100 0 1 0 textregexeq - )); DESCR("matches regex., case-sensitive"); -DATA(insert OID = 1256 ( textregexne PGUID 11 f t t 2 f 16 "25 25" 100 0 1 0 textregexne - )); +DATA(insert OID = 1256 ( textregexne PGUID 11 f t t t 2 f 16 "25 25" 100 0 1 0 textregexne - )); DESCR("does not match regex., case-sensitive"); -DATA(insert OID = 1257 ( textlen PGUID 11 f t t 1 f 23 "25" 100 0 1 0 textlen - )); +DATA(insert OID = 1257 ( textlen PGUID 11 f t t t 1 f 23 "25" 100 0 1 0 textlen - )); DESCR("length"); -DATA(insert OID = 1258 ( textcat PGUID 11 f t t 2 f 25 "25 25" 100 0 1 0 textcat - )); +DATA(insert OID = 1258 ( textcat PGUID 11 f t t t 2 f 25 "25 25" 100 0 1 0 textcat - )); DESCR("concatenate"); -DATA(insert OID = 84 ( boolne PGUID 11 f t t 2 f 16 "16 16" 100 0 0 100 boolne - )); +DATA(insert OID = 84 ( boolne PGUID 11 f t t t 2 f 16 "16 16" 100 0 0 100 boolne - )); DESCR("not equal"); -DATA(insert OID = 89 ( version PGUID 11 f t f 0 f 25 "" 100 0 0 100 version - )); +DATA(insert OID = 89 ( version PGUID 11 f t f t 0 f 25 "" 100 0 0 100 version - )); DESCR("PostgreSQL version string"); -DATA(insert OID = 1265 ( rtcostestimate PGUID 11 f t f 7 f 0 "0 0 0 0 0 0 0" 100 0 0 100 rtcostestimate - )); +DATA(insert OID = 1265 ( rtcostestimate PGUID 11 f t f t 7 f 0 "0 0 0 0 0 0 0" 100 0 0 100 rtcostestimate - )); DESCR("r-tree cost estimator"); -DATA(insert OID = 1268 ( btcostestimate PGUID 11 f t f 7 f 0 "0 0 0 0 0 0 0" 100 0 0 100 btcostestimate - )); +DATA(insert OID = 1268 ( btcostestimate PGUID 11 f t f t 7 f 0 "0 0 0 0 0 0 0" 100 0 0 100 btcostestimate - )); DESCR("btree cost estimator"); /* OIDS 100 - 199 */ -DATA(insert OID = 100 ( int8fac PGUID 11 f t t 1 f 20 "20" 100 0 0 100 int8fac - )); +DATA(insert OID = 100 ( int8fac PGUID 11 f t t t 1 f 20 "20" 100 0 0 100 int8fac - )); DESCR("factorial"); -DATA(insert OID = 101 ( eqsel PGUID 11 f t f 5 f 701 "26 26 21 0 23" 100 0 0 100 eqsel - )); +DATA(insert OID = 101 ( eqsel PGUID 11 f t f t 5 f 701 "26 26 21 0 23" 100 0 0 100 eqsel - )); DESCR("restriction selectivity of = and related operators"); -DATA(insert OID = 102 ( neqsel PGUID 11 f t f 5 f 701 "26 26 21 0 23" 100 0 0 100 neqsel - )); +DATA(insert OID = 102 ( neqsel PGUID 11 f t f t 5 f 701 "26 26 21 0 23" 100 0 0 100 neqsel - )); DESCR("restriction selectivity of <> and related operators"); -DATA(insert OID = 103 ( scalarltsel PGUID 11 f t f 5 f 701 "26 26 21 0 23" 100 0 0 100 scalarltsel - )); +DATA(insert OID = 103 ( scalarltsel PGUID 11 f t f t 5 f 701 "26 26 21 0 23" 100 0 0 100 scalarltsel - )); DESCR("restriction selectivity of < and related operators on scalar datatypes"); -DATA(insert OID = 104 ( scalargtsel PGUID 11 f t f 5 f 701 "26 26 21 0 23" 100 0 0 100 scalargtsel - )); +DATA(insert OID = 104 ( scalargtsel PGUID 11 f t f t 5 f 701 "26 26 21 0 23" 100 0 0 100 scalargtsel - )); DESCR("restriction selectivity of > and related operators on scalar datatypes"); -DATA(insert OID = 105 ( eqjoinsel PGUID 11 f t f 5 f 701 "26 26 21 26 21" 100 0 0 100 eqjoinsel - )); +DATA(insert OID = 105 ( eqjoinsel PGUID 11 f t f t 5 f 701 "26 26 21 26 21" 100 0 0 100 eqjoinsel - )); DESCR("join selectivity of = and related operators"); -DATA(insert OID = 106 ( neqjoinsel PGUID 11 f t f 5 f 701 "26 26 21 26 21" 100 0 0 100 neqjoinsel - )); +DATA(insert OID = 106 ( neqjoinsel PGUID 11 f t f t 5 f 701 "26 26 21 26 21" 100 0 0 100 neqjoinsel - )); DESCR("join selectivity of <> and related operators"); -DATA(insert OID = 107 ( scalarltjoinsel PGUID 11 f t f 5 f 701 "26 26 21 26 21" 100 0 0 100 scalarltjoinsel - )); +DATA(insert OID = 107 ( scalarltjoinsel PGUID 11 f t f t 5 f 701 "26 26 21 26 21" 100 0 0 100 scalarltjoinsel - )); DESCR("join selectivity of < and related operators on scalar datatypes"); -DATA(insert OID = 108 ( scalargtjoinsel PGUID 11 f t f 5 f 701 "26 26 21 26 21" 100 0 0 100 scalargtjoinsel - )); +DATA(insert OID = 108 ( scalargtjoinsel PGUID 11 f t f t 5 f 701 "26 26 21 26 21" 100 0 0 100 scalargtjoinsel - )); DESCR("join selectivity of > and related operators on scalar datatypes"); -DATA(insert OID = 112 ( text PGUID 11 f t t 1 f 25 "23" 100 0 0 100 int4_text - )); +DATA(insert OID = 112 ( text PGUID 11 f t t t 1 f 25 "23" 100 0 0 100 int4_text - )); DESCR("convert int4 to text"); -DATA(insert OID = 113 ( text PGUID 11 f t t 1 f 25 "21" 100 0 0 100 int2_text - )); +DATA(insert OID = 113 ( text PGUID 11 f t t t 1 f 25 "21" 100 0 0 100 int2_text - )); DESCR("convert int2 to text"); -DATA(insert OID = 114 ( text PGUID 11 f t t 1 f 25 "26" 100 0 0 100 oid_text - )); +DATA(insert OID = 114 ( text PGUID 11 f t t t 1 f 25 "26" 100 0 0 100 oid_text - )); DESCR("convert oid to text"); -DATA(insert OID = 115 ( box_above PGUID 11 f t t 2 f 16 "603 603" 100 1 0 100 box_above - )); +DATA(insert OID = 115 ( box_above PGUID 11 f t t t 2 f 16 "603 603" 100 1 0 100 box_above - )); DESCR("is above"); -DATA(insert OID = 116 ( box_below PGUID 11 f t t 2 f 16 "603 603" 100 1 0 100 box_below - )); +DATA(insert OID = 116 ( box_below PGUID 11 f t t t 2 f 16 "603 603" 100 1 0 100 box_below - )); DESCR("is below"); -DATA(insert OID = 117 ( point_in PGUID 11 f t t 1 f 600 "0" 100 0 0 100 point_in - )); +DATA(insert OID = 117 ( point_in PGUID 11 f t t t 1 f 600 "0" 100 0 0 100 point_in - )); DESCR("(internal)"); -DATA(insert OID = 118 ( point_out PGUID 11 f t t 1 f 23 "0" 100 0 0 100 point_out - )); +DATA(insert OID = 118 ( point_out PGUID 11 f t t t 1 f 23 "0" 100 0 0 100 point_out - )); DESCR("(internal)"); -DATA(insert OID = 119 ( lseg_in PGUID 11 f t t 1 f 601 "0" 100 0 0 100 lseg_in - )); +DATA(insert OID = 119 ( lseg_in PGUID 11 f t t t 1 f 601 "0" 100 0 0 100 lseg_in - )); DESCR("(internal)"); -DATA(insert OID = 120 ( lseg_out PGUID 11 f t t 1 f 23 "0" 100 0 0 100 lseg_out - )); +DATA(insert OID = 120 ( lseg_out PGUID 11 f t t t 1 f 23 "0" 100 0 0 100 lseg_out - )); DESCR("(internal)"); -DATA(insert OID = 121 ( path_in PGUID 11 f t t 1 f 602 "0" 100 0 0 100 path_in - )); +DATA(insert OID = 121 ( path_in PGUID 11 f t t t 1 f 602 "0" 100 0 0 100 path_in - )); DESCR("(internal)"); -DATA(insert OID = 122 ( path_out PGUID 11 f t t 1 f 23 "0" 100 0 0 100 path_out - )); +DATA(insert OID = 122 ( path_out PGUID 11 f t t t 1 f 23 "0" 100 0 0 100 path_out - )); DESCR("(internal)"); -DATA(insert OID = 123 ( box_in PGUID 11 f t t 1 f 603 "0" 100 0 0 100 box_in - )); +DATA(insert OID = 123 ( box_in PGUID 11 f t t t 1 f 603 "0" 100 0 0 100 box_in - )); DESCR("(internal)"); -DATA(insert OID = 124 ( box_out PGUID 11 f t t 1 f 23 "0" 100 0 0 100 box_out - )); +DATA(insert OID = 124 ( box_out PGUID 11 f t t t 1 f 23 "0" 100 0 0 100 box_out - )); DESCR("(internal)"); -DATA(insert OID = 125 ( box_overlap PGUID 11 f t t 2 f 16 "603 603" 100 1 0 100 box_overlap - )); +DATA(insert OID = 125 ( box_overlap PGUID 11 f t t t 2 f 16 "603 603" 100 1 0 100 box_overlap - )); DESCR("overlaps"); -DATA(insert OID = 126 ( box_ge PGUID 11 f t t 2 f 16 "603 603" 100 1 0 100 box_ge - )); +DATA(insert OID = 126 ( box_ge PGUID 11 f t t t 2 f 16 "603 603" 100 1 0 100 box_ge - )); DESCR("greater-than-or-equal"); -DATA(insert OID = 127 ( box_gt PGUID 11 f t t 2 f 16 "603 603" 100 1 0 100 box_gt - )); +DATA(insert OID = 127 ( box_gt PGUID 11 f t t t 2 f 16 "603 603" 100 1 0 100 box_gt - )); DESCR("greater-than"); -DATA(insert OID = 128 ( box_eq PGUID 11 f t t 2 f 16 "603 603" 100 1 0 100 box_eq - )); +DATA(insert OID = 128 ( box_eq PGUID 11 f t t t 2 f 16 "603 603" 100 1 0 100 box_eq - )); DESCR("equal"); -DATA(insert OID = 129 ( box_lt PGUID 11 f t t 2 f 16 "603 603" 100 1 0 100 box_lt - )); +DATA(insert OID = 129 ( box_lt PGUID 11 f t t t 2 f 16 "603 603" 100 1 0 100 box_lt - )); DESCR("less-than"); -DATA(insert OID = 130 ( box_le PGUID 11 f t t 2 f 16 "603 603" 100 1 0 100 box_le - )); +DATA(insert OID = 130 ( box_le PGUID 11 f t t t 2 f 16 "603 603" 100 1 0 100 box_le - )); DESCR("less-than-or-equal"); -DATA(insert OID = 131 ( point_above PGUID 11 f t t 2 f 16 "600 600" 100 0 0 100 point_above - )); +DATA(insert OID = 131 ( point_above PGUID 11 f t t t 2 f 16 "600 600" 100 0 0 100 point_above - )); DESCR("is above"); -DATA(insert OID = 132 ( point_left PGUID 11 f t t 2 f 16 "600 600" 100 0 0 100 point_left - )); +DATA(insert OID = 132 ( point_left PGUID 11 f t t t 2 f 16 "600 600" 100 0 0 100 point_left - )); DESCR("is left of"); -DATA(insert OID = 133 ( point_right PGUID 11 f t t 2 f 16 "600 600" 100 0 0 100 point_right - )); +DATA(insert OID = 133 ( point_right PGUID 11 f t t t 2 f 16 "600 600" 100 0 0 100 point_right - )); DESCR("is left of"); -DATA(insert OID = 134 ( point_below PGUID 11 f t t 2 f 16 "600 600" 100 0 0 100 point_below - )); +DATA(insert OID = 134 ( point_below PGUID 11 f t t t 2 f 16 "600 600" 100 0 0 100 point_below - )); DESCR("is below"); -DATA(insert OID = 135 ( point_eq PGUID 11 f t t 2 f 16 "600 600" 100 0 0 100 point_eq - )); +DATA(insert OID = 135 ( point_eq PGUID 11 f t t t 2 f 16 "600 600" 100 0 0 100 point_eq - )); DESCR("same as"); -DATA(insert OID = 136 ( on_pb PGUID 11 f t t 2 f 16 "600 603" 100 0 0 100 on_pb - )); +DATA(insert OID = 136 ( on_pb PGUID 11 f t t t 2 f 16 "600 603" 100 0 0 100 on_pb - )); DESCR("point is inside"); -DATA(insert OID = 137 ( on_ppath PGUID 11 f t t 2 f 16 "600 602" 100 0 1 0 on_ppath - )); +DATA(insert OID = 137 ( on_ppath PGUID 11 f t t t 2 f 16 "600 602" 100 0 1 0 on_ppath - )); DESCR("contained in"); -DATA(insert OID = 138 ( box_center PGUID 11 f t t 1 f 600 "603" 100 1 0 100 box_center - )); +DATA(insert OID = 138 ( box_center PGUID 11 f t t t 1 f 600 "603" 100 1 0 100 box_center - )); DESCR("center of"); -DATA(insert OID = 139 ( areasel PGUID 11 f t f 5 f 701 "26 26 21 0 23" 100 0 0 100 areasel - )); +DATA(insert OID = 139 ( areasel PGUID 11 f t f t 5 f 701 "26 26 21 0 23" 100 0 0 100 areasel - )); DESCR("restriction selectivity for area-comparison operators"); -DATA(insert OID = 140 ( areajoinsel PGUID 11 f t f 5 f 701 "26 26 21 26 21" 100 0 0 100 areajoinsel - )); +DATA(insert OID = 140 ( areajoinsel PGUID 11 f t f t 5 f 701 "26 26 21 26 21" 100 0 0 100 areajoinsel - )); DESCR("join selectivity for area-comparison operators"); -DATA(insert OID = 141 ( int4mul PGUID 11 f t t 2 f 23 "23 23" 100 0 0 100 int4mul - )); +DATA(insert OID = 141 ( int4mul PGUID 11 f t t t 2 f 23 "23 23" 100 0 0 100 int4mul - )); DESCR("multiply"); -DATA(insert OID = 142 ( int4fac PGUID 11 f t t 1 f 23 "23" 100 0 0 100 int4fac - )); +DATA(insert OID = 142 ( int4fac PGUID 11 f t t t 1 f 23 "23" 100 0 0 100 int4fac - )); DESCR("factorial"); -DATA(insert OID = 143 ( pointdist PGUID 11 f t t 2 f 23 "600 600" 100 0 0 100 pointdist - )); +DATA(insert OID = 143 ( pointdist PGUID 11 f t t t 2 f 23 "600 600" 100 0 0 100 pointdist - )); DESCR(""); -DATA(insert OID = 144 ( int4ne PGUID 11 f t t 2 f 16 "23 23" 100 0 0 100 int4ne - )); +DATA(insert OID = 144 ( int4ne PGUID 11 f t t t 2 f 16 "23 23" 100 0 0 100 int4ne - )); DESCR("not equal"); -DATA(insert OID = 145 ( int2ne PGUID 11 f t t 2 f 16 "21 21" 100 0 0 100 int2ne - )); +DATA(insert OID = 145 ( int2ne PGUID 11 f t t t 2 f 16 "21 21" 100 0 0 100 int2ne - )); DESCR("not equal"); -DATA(insert OID = 146 ( int2gt PGUID 11 f t t 2 f 16 "21 21" 100 0 0 100 int2gt - )); +DATA(insert OID = 146 ( int2gt PGUID 11 f t t t 2 f 16 "21 21" 100 0 0 100 int2gt - )); DESCR("greater-than"); -DATA(insert OID = 147 ( int4gt PGUID 11 f t t 2 f 16 "23 23" 100 0 0 100 int4gt - )); +DATA(insert OID = 147 ( int4gt PGUID 11 f t t t 2 f 16 "23 23" 100 0 0 100 int4gt - )); DESCR("greater-than"); -DATA(insert OID = 148 ( int2le PGUID 11 f t t 2 f 16 "21 21" 100 0 0 100 int2le - )); +DATA(insert OID = 148 ( int2le PGUID 11 f t t t 2 f 16 "21 21" 100 0 0 100 int2le - )); DESCR("less-than-or-equal"); -DATA(insert OID = 149 ( int4le PGUID 11 f t t 2 f 16 "23 23" 100 0 0 100 int4le - )); +DATA(insert OID = 149 ( int4le PGUID 11 f t t t 2 f 16 "23 23" 100 0 0 100 int4le - )); DESCR("less-than-or-equal"); -DATA(insert OID = 150 ( int4ge PGUID 11 f t t 2 f 16 "23 23" 100 0 0 100 int4ge - )); +DATA(insert OID = 150 ( int4ge PGUID 11 f t t t 2 f 16 "23 23" 100 0 0 100 int4ge - )); DESCR("greater-than-or-equal"); -DATA(insert OID = 151 ( int2ge PGUID 11 f t t 2 f 16 "21 21" 100 0 0 100 int2ge - )); +DATA(insert OID = 151 ( int2ge PGUID 11 f t t t 2 f 16 "21 21" 100 0 0 100 int2ge - )); DESCR("greater-than-or-equal"); -DATA(insert OID = 152 ( int2mul PGUID 11 f t t 2 f 21 "21 21" 100 0 0 100 int2mul - )); +DATA(insert OID = 152 ( int2mul PGUID 11 f t t t 2 f 21 "21 21" 100 0 0 100 int2mul - )); DESCR("multiply"); -DATA(insert OID = 153 ( int2div PGUID 11 f t t 2 f 21 "21 21" 100 0 0 100 int2div - )); +DATA(insert OID = 153 ( int2div PGUID 11 f t t t 2 f 21 "21 21" 100 0 0 100 int2div - )); DESCR("divide"); -DATA(insert OID = 154 ( int4div PGUID 11 f t t 2 f 23 "23 23" 100 0 0 100 int4div - )); +DATA(insert OID = 154 ( int4div PGUID 11 f t t t 2 f 23 "23 23" 100 0 0 100 int4div - )); DESCR("divide"); -DATA(insert OID = 155 ( int2mod PGUID 11 f t t 2 f 21 "21 21" 100 0 0 100 int2mod - )); +DATA(insert OID = 155 ( int2mod PGUID 11 f t t t 2 f 21 "21 21" 100 0 0 100 int2mod - )); DESCR("modulus"); -DATA(insert OID = 156 ( int4mod PGUID 11 f t t 2 f 23 "23 23" 100 0 0 100 int4mod - )); +DATA(insert OID = 156 ( int4mod PGUID 11 f t t t 2 f 23 "23 23" 100 0 0 100 int4mod - )); DESCR("modulus"); -DATA(insert OID = 157 ( textne PGUID 11 f t t 2 f 16 "25 25" 100 0 0 0 textne - )); +DATA(insert OID = 157 ( textne PGUID 11 f t t t 2 f 16 "25 25" 100 0 0 0 textne - )); DESCR("not equal"); -DATA(insert OID = 158 ( int24eq PGUID 11 f t t 2 f 16 "21 23" 100 0 0 100 int24eq - )); +DATA(insert OID = 158 ( int24eq PGUID 11 f t t t 2 f 16 "21 23" 100 0 0 100 int24eq - )); DESCR("equal"); -DATA(insert OID = 159 ( int42eq PGUID 11 f t t 2 f 16 "23 21" 100 0 0 100 int42eq - )); +DATA(insert OID = 159 ( int42eq PGUID 11 f t t t 2 f 16 "23 21" 100 0 0 100 int42eq - )); DESCR("equal"); -DATA(insert OID = 160 ( int24lt PGUID 11 f t t 2 f 16 "21 23" 100 0 0 100 int24lt - )); +DATA(insert OID = 160 ( int24lt PGUID 11 f t t t 2 f 16 "21 23" 100 0 0 100 int24lt - )); DESCR("less-than"); -DATA(insert OID = 161 ( int42lt PGUID 11 f t t 2 f 16 "23 21" 100 0 0 100 int42lt - )); +DATA(insert OID = 161 ( int42lt PGUID 11 f t t t 2 f 16 "23 21" 100 0 0 100 int42lt - )); DESCR("less-than"); -DATA(insert OID = 162 ( int24gt PGUID 11 f t t 2 f 16 "21 23" 100 0 0 100 int24gt - )); +DATA(insert OID = 162 ( int24gt PGUID 11 f t t t 2 f 16 "21 23" 100 0 0 100 int24gt - )); DESCR("greater-than"); -DATA(insert OID = 163 ( int42gt PGUID 11 f t t 2 f 16 "23 21" 100 0 0 100 int42gt - )); +DATA(insert OID = 163 ( int42gt PGUID 11 f t t t 2 f 16 "23 21" 100 0 0 100 int42gt - )); DESCR("greater-than"); -DATA(insert OID = 164 ( int24ne PGUID 11 f t t 2 f 16 "21 23" 100 0 0 100 int24ne - )); +DATA(insert OID = 164 ( int24ne PGUID 11 f t t t 2 f 16 "21 23" 100 0 0 100 int24ne - )); DESCR("not equal"); -DATA(insert OID = 165 ( int42ne PGUID 11 f t t 2 f 16 "23 21" 100 0 0 100 int42ne - )); +DATA(insert OID = 165 ( int42ne PGUID 11 f t t t 2 f 16 "23 21" 100 0 0 100 int42ne - )); DESCR("not equal"); -DATA(insert OID = 166 ( int24le PGUID 11 f t t 2 f 16 "21 23" 100 0 0 100 int24le - )); +DATA(insert OID = 166 ( int24le PGUID 11 f t t t 2 f 16 "21 23" 100 0 0 100 int24le - )); DESCR("less-than-or-equal"); -DATA(insert OID = 167 ( int42le PGUID 11 f t t 2 f 16 "23 21" 100 0 0 100 int42le - )); +DATA(insert OID = 167 ( int42le PGUID 11 f t t t 2 f 16 "23 21" 100 0 0 100 int42le - )); DESCR("less-than-or-equal"); -DATA(insert OID = 168 ( int24ge PGUID 11 f t t 2 f 16 "21 23" 100 0 0 100 int24ge - )); +DATA(insert OID = 168 ( int24ge PGUID 11 f t t t 2 f 16 "21 23" 100 0 0 100 int24ge - )); DESCR("greater-than-or-equal"); -DATA(insert OID = 169 ( int42ge PGUID 11 f t t 2 f 16 "23 21" 100 0 0 100 int42ge - )); +DATA(insert OID = 169 ( int42ge PGUID 11 f t t t 2 f 16 "23 21" 100 0 0 100 int42ge - )); DESCR("greater-than-or-equal"); -DATA(insert OID = 170 ( int24mul PGUID 11 f t t 2 f 23 "21 23" 100 0 0 100 int24mul - )); +DATA(insert OID = 170 ( int24mul PGUID 11 f t t t 2 f 23 "21 23" 100 0 0 100 int24mul - )); DESCR("multiply"); -DATA(insert OID = 171 ( int42mul PGUID 11 f t t 2 f 23 "23 21" 100 0 0 100 int42mul - )); +DATA(insert OID = 171 ( int42mul PGUID 11 f t t t 2 f 23 "23 21" 100 0 0 100 int42mul - )); DESCR("multiply"); -DATA(insert OID = 172 ( int24div PGUID 11 f t t 2 f 23 "21 23" 100 0 0 100 int24div - )); +DATA(insert OID = 172 ( int24div PGUID 11 f t t t 2 f 23 "21 23" 100 0 0 100 int24div - )); DESCR("divide"); -DATA(insert OID = 173 ( int42div PGUID 11 f t t 2 f 23 "23 21" 100 0 0 100 int42div - )); +DATA(insert OID = 173 ( int42div PGUID 11 f t t t 2 f 23 "23 21" 100 0 0 100 int42div - )); DESCR("divide"); -DATA(insert OID = 174 ( int24mod PGUID 11 f t t 2 f 23 "21 23" 100 0 0 100 int24mod - )); +DATA(insert OID = 174 ( int24mod PGUID 11 f t t t 2 f 23 "21 23" 100 0 0 100 int24mod - )); DESCR("modulus"); -DATA(insert OID = 175 ( int42mod PGUID 11 f t t 2 f 23 "23 21" 100 0 0 100 int42mod - )); +DATA(insert OID = 175 ( int42mod PGUID 11 f t t t 2 f 23 "23 21" 100 0 0 100 int42mod - )); DESCR("modulus"); -DATA(insert OID = 176 ( int2pl PGUID 11 f t t 2 f 21 "21 21" 100 0 0 100 int2pl - )); +DATA(insert OID = 176 ( int2pl PGUID 11 f t t t 2 f 21 "21 21" 100 0 0 100 int2pl - )); DESCR("addition"); -DATA(insert OID = 177 ( int4pl PGUID 11 f t t 2 f 23 "23 23" 100 0 0 100 int4pl - )); +DATA(insert OID = 177 ( int4pl PGUID 11 f t t t 2 f 23 "23 23" 100 0 0 100 int4pl - )); DESCR("addition"); -DATA(insert OID = 178 ( int24pl PGUID 11 f t t 2 f 23 "21 23" 100 0 0 100 int24pl - )); +DATA(insert OID = 178 ( int24pl PGUID 11 f t t t 2 f 23 "21 23" 100 0 0 100 int24pl - )); DESCR("addition"); -DATA(insert OID = 179 ( int42pl PGUID 11 f t t 2 f 23 "23 21" 100 0 0 100 int42pl - )); +DATA(insert OID = 179 ( int42pl PGUID 11 f t t t 2 f 23 "23 21" 100 0 0 100 int42pl - )); DESCR("addition"); -DATA(insert OID = 180 ( int2mi PGUID 11 f t t 2 f 21 "21 21" 100 0 0 100 int2mi - )); +DATA(insert OID = 180 ( int2mi PGUID 11 f t t t 2 f 21 "21 21" 100 0 0 100 int2mi - )); DESCR("subtract"); -DATA(insert OID = 181 ( int4mi PGUID 11 f t t 2 f 23 "23 23" 100 0 0 100 int4mi - )); +DATA(insert OID = 181 ( int4mi PGUID 11 f t t t 2 f 23 "23 23" 100 0 0 100 int4mi - )); DESCR("subtract"); -DATA(insert OID = 182 ( int24mi PGUID 11 f t t 2 f 23 "21 23" 100 0 0 100 int24mi - )); +DATA(insert OID = 182 ( int24mi PGUID 11 f t t t 2 f 23 "21 23" 100 0 0 100 int24mi - )); DESCR("subtract"); -DATA(insert OID = 183 ( int42mi PGUID 11 f t t 2 f 23 "23 21" 100 0 0 100 int42mi - )); +DATA(insert OID = 183 ( int42mi PGUID 11 f t t t 2 f 23 "23 21" 100 0 0 100 int42mi - )); DESCR("subtract"); -DATA(insert OID = 184 ( oideq PGUID 11 f t t 2 f 16 "26 26" 100 0 0 100 oideq - )); +DATA(insert OID = 184 ( oideq PGUID 11 f t t t 2 f 16 "26 26" 100 0 0 100 oideq - )); DESCR("equal"); -DATA(insert OID = 185 ( oidne PGUID 11 f t t 2 f 16 "26 26" 100 0 0 100 oidne - )); +DATA(insert OID = 185 ( oidne PGUID 11 f t t t 2 f 16 "26 26" 100 0 0 100 oidne - )); DESCR("not equal"); -DATA(insert OID = 186 ( box_same PGUID 11 f t t 2 f 16 "603 603" 100 0 0 100 box_same - )); +DATA(insert OID = 186 ( box_same PGUID 11 f t t t 2 f 16 "603 603" 100 0 0 100 box_same - )); DESCR("same as"); -DATA(insert OID = 187 ( box_contain PGUID 11 f t t 2 f 16 "603 603" 100 0 0 100 box_contain - )); +DATA(insert OID = 187 ( box_contain PGUID 11 f t t t 2 f 16 "603 603" 100 0 0 100 box_contain - )); DESCR("contains"); -DATA(insert OID = 188 ( box_left PGUID 11 f t t 2 f 16 "603 603" 100 0 0 100 box_left - )); +DATA(insert OID = 188 ( box_left PGUID 11 f t t t 2 f 16 "603 603" 100 0 0 100 box_left - )); DESCR("is left of"); -DATA(insert OID = 189 ( box_overleft PGUID 11 f t t 2 f 16 "603 603" 100 0 0 100 box_overleft - )); +DATA(insert OID = 189 ( box_overleft PGUID 11 f t t t 2 f 16 "603 603" 100 0 0 100 box_overleft - )); DESCR("overlaps, but does not extend to right of"); -DATA(insert OID = 190 ( box_overright PGUID 11 f t t 2 f 16 "603 603" 100 0 0 100 box_overright - )); +DATA(insert OID = 190 ( box_overright PGUID 11 f t t t 2 f 16 "603 603" 100 0 0 100 box_overright - )); DESCR("overlaps, but does not extend to left of"); -DATA(insert OID = 191 ( box_right PGUID 11 f t t 2 f 16 "603 603" 100 0 0 100 box_right - )); +DATA(insert OID = 191 ( box_right PGUID 11 f t t t 2 f 16 "603 603" 100 0 0 100 box_right - )); DESCR("is left of"); -DATA(insert OID = 192 ( box_contained PGUID 11 f t t 2 f 16 "603 603" 100 0 0 100 box_contained - )); +DATA(insert OID = 192 ( box_contained PGUID 11 f t t t 2 f 16 "603 603" 100 0 0 100 box_contained - )); DESCR("contained in"); -DATA(insert OID = 193 ( rt_box_union PGUID 11 f t t 2 f 603 "603 603" 100 0 0 100 rt_box_union - )); +DATA(insert OID = 193 ( rt_box_union PGUID 11 f t t t 2 f 603 "603 603" 100 0 0 100 rt_box_union - )); DESCR("r-tree"); -DATA(insert OID = 194 ( rt_box_inter PGUID 11 f t t 2 f 603 "603 603" 100 0 0 100 rt_box_inter - )); +DATA(insert OID = 194 ( rt_box_inter PGUID 11 f t t t 2 f 603 "603 603" 100 0 0 100 rt_box_inter - )); DESCR("r-tree"); -DATA(insert OID = 195 ( rt_box_size PGUID 11 f t t 2 f 700 "603 700" 100 0 0 100 rt_box_size - )); +DATA(insert OID = 195 ( rt_box_size PGUID 11 f t t t 2 f 700 "603 700" 100 0 0 100 rt_box_size - )); DESCR("r-tree"); -DATA(insert OID = 196 ( rt_bigbox_size PGUID 11 f t t 2 f 700 "603 700" 100 0 0 100 rt_bigbox_size - )); +DATA(insert OID = 196 ( rt_bigbox_size PGUID 11 f t t t 2 f 700 "603 700" 100 0 0 100 rt_bigbox_size - )); DESCR("r-tree"); -DATA(insert OID = 197 ( rt_poly_union PGUID 11 f t t 2 f 604 "604 604" 100 0 0 100 rt_poly_union - )); +DATA(insert OID = 197 ( rt_poly_union PGUID 11 f t t t 2 f 604 "604 604" 100 0 0 100 rt_poly_union - )); DESCR("r-tree"); -DATA(insert OID = 198 ( rt_poly_inter PGUID 11 f t t 2 f 604 "604 604" 100 0 0 100 rt_poly_inter - )); +DATA(insert OID = 198 ( rt_poly_inter PGUID 11 f t t t 2 f 604 "604 604" 100 0 0 100 rt_poly_inter - )); DESCR("r-tree"); -DATA(insert OID = 199 ( rt_poly_size PGUID 11 f t t 2 f 23 "604 23" 100 0 0 100 rt_poly_size - )); +DATA(insert OID = 199 ( rt_poly_size PGUID 11 f t t t 2 f 23 "604 23" 100 0 0 100 rt_poly_size - )); DESCR("r-tree"); /* OIDS 200 - 299 */ -DATA(insert OID = 200 ( float4in PGUID 11 f t t 1 f 700 "0" 100 0 0 100 float4in - )); +DATA(insert OID = 200 ( float4in PGUID 11 f t t t 1 f 700 "0" 100 0 0 100 float4in - )); DESCR("(internal)"); -DATA(insert OID = 201 ( float4out PGUID 11 f t t 1 f 23 "0" 100 0 0 100 float4out - )); +DATA(insert OID = 201 ( float4out PGUID 11 f t t t 1 f 23 "0" 100 0 0 100 float4out - )); DESCR("(internal)"); -DATA(insert OID = 202 ( float4mul PGUID 11 f t t 2 f 700 "700 700" 100 0 0 100 float4mul - )); +DATA(insert OID = 202 ( float4mul PGUID 11 f t t t 2 f 700 "700 700" 100 0 0 100 float4mul - )); DESCR("multiply"); -DATA(insert OID = 203 ( float4div PGUID 11 f t t 2 f 700 "700 700" 100 0 0 100 float4div - )); +DATA(insert OID = 203 ( float4div PGUID 11 f t t t 2 f 700 "700 700" 100 0 0 100 float4div - )); DESCR("divide"); -DATA(insert OID = 204 ( float4pl PGUID 11 f t t 2 f 700 "700 700" 100 0 0 100 float4pl - )); +DATA(insert OID = 204 ( float4pl PGUID 11 f t t t 2 f 700 "700 700" 100 0 0 100 float4pl - )); DESCR("addition"); -DATA(insert OID = 205 ( float4mi PGUID 11 f t t 2 f 700 "700 700" 100 0 0 100 float4mi - )); +DATA(insert OID = 205 ( float4mi PGUID 11 f t t t 2 f 700 "700 700" 100 0 0 100 float4mi - )); DESCR("subtract"); -DATA(insert OID = 206 ( float4um PGUID 11 f t t 1 f 700 "700" 100 0 0 100 float4um - )); +DATA(insert OID = 206 ( float4um PGUID 11 f t t t 1 f 700 "700" 100 0 0 100 float4um - )); DESCR("negate"); -DATA(insert OID = 207 ( float4abs PGUID 11 f t t 1 f 700 "700" 100 0 0 100 float4abs - )); +DATA(insert OID = 207 ( float4abs PGUID 11 f t t t 1 f 700 "700" 100 0 0 100 float4abs - )); DESCR("absolute value"); -DATA(insert OID = 208 ( float4inc PGUID 11 f t t 1 f 700 "700" 100 0 0 100 float4inc - )); +DATA(insert OID = 208 ( float4inc PGUID 11 f t t t 1 f 700 "700" 100 0 0 100 float4inc - )); DESCR("increment"); -DATA(insert OID = 209 ( float4larger PGUID 11 f t t 2 f 700 "700 700" 100 0 0 100 float4larger - )); +DATA(insert OID = 209 ( float4larger PGUID 11 f t t t 2 f 700 "700 700" 100 0 0 100 float4larger - )); DESCR("larger of two"); -DATA(insert OID = 211 ( float4smaller PGUID 11 f t t 2 f 700 "700 700" 100 0 0 100 float4smaller - )); +DATA(insert OID = 211 ( float4smaller PGUID 11 f t t t 2 f 700 "700 700" 100 0 0 100 float4smaller - )); DESCR("smaller of two"); -DATA(insert OID = 212 ( int4um PGUID 11 f t t 1 f 23 "23" 100 0 0 100 int4um - )); +DATA(insert OID = 212 ( int4um PGUID 11 f t t t 1 f 23 "23" 100 0 0 100 int4um - )); DESCR("negate"); -DATA(insert OID = 213 ( int2um PGUID 11 f t t 1 f 21 "21" 100 0 0 100 int2um - )); +DATA(insert OID = 213 ( int2um PGUID 11 f t t t 1 f 21 "21" 100 0 0 100 int2um - )); DESCR("negate"); -DATA(insert OID = 214 ( float8in PGUID 11 f t t 1 f 701 "0" 100 0 0 100 float8in - )); +DATA(insert OID = 214 ( float8in PGUID 11 f t t t 1 f 701 "0" 100 0 0 100 float8in - )); DESCR("(internal)"); -DATA(insert OID = 215 ( float8out PGUID 11 f t t 1 f 23 "0" 100 0 0 100 float8out - )); +DATA(insert OID = 215 ( float8out PGUID 11 f t t t 1 f 23 "0" 100 0 0 100 float8out - )); DESCR("(internal)"); -DATA(insert OID = 216 ( float8mul PGUID 11 f t t 2 f 701 "701 701" 100 0 0 100 float8mul - )); +DATA(insert OID = 216 ( float8mul PGUID 11 f t t t 2 f 701 "701 701" 100 0 0 100 float8mul - )); DESCR("multiply"); -DATA(insert OID = 217 ( float8div PGUID 11 f t t 2 f 701 "701 701" 100 0 0 100 float8div - )); +DATA(insert OID = 217 ( float8div PGUID 11 f t t t 2 f 701 "701 701" 100 0 0 100 float8div - )); DESCR("divide"); -DATA(insert OID = 218 ( float8pl PGUID 11 f t t 2 f 701 "701 701" 100 0 0 100 float8pl - )); +DATA(insert OID = 218 ( float8pl PGUID 11 f t t t 2 f 701 "701 701" 100 0 0 100 float8pl - )); DESCR("addition"); -DATA(insert OID = 219 ( float8mi PGUID 11 f t t 2 f 701 "701 701" 100 0 0 100 float8mi - )); +DATA(insert OID = 219 ( float8mi PGUID 11 f t t t 2 f 701 "701 701" 100 0 0 100 float8mi - )); DESCR("subtract"); -DATA(insert OID = 220 ( float8um PGUID 11 f t t 1 f 701 "701" 100 0 0 100 float8um - )); +DATA(insert OID = 220 ( float8um PGUID 11 f t t t 1 f 701 "701" 100 0 0 100 float8um - )); DESCR("negate"); -DATA(insert OID = 221 ( float8abs PGUID 11 f t t 1 f 701 "701" 100 0 0 100 float8abs - )); +DATA(insert OID = 221 ( float8abs PGUID 11 f t t t 1 f 701 "701" 100 0 0 100 float8abs - )); DESCR("absolute value"); -DATA(insert OID = 222 ( float8inc PGUID 11 f t t 1 f 701 "701" 100 0 0 100 float8inc - )); +DATA(insert OID = 222 ( float8inc PGUID 11 f t t t 1 f 701 "701" 100 0 0 100 float8inc - )); DESCR("increment"); -DATA(insert OID = 223 ( float8larger PGUID 11 f t t 2 f 701 "701 701" 100 0 0 100 float8larger - )); +DATA(insert OID = 223 ( float8larger PGUID 11 f t t t 2 f 701 "701 701" 100 0 0 100 float8larger - )); DESCR("larger of two"); -DATA(insert OID = 224 ( float8smaller PGUID 11 f t t 2 f 701 "701 701" 100 0 0 100 float8smaller - )); +DATA(insert OID = 224 ( float8smaller PGUID 11 f t t t 2 f 701 "701 701" 100 0 0 100 float8smaller - )); DESCR("smaller of two"); -DATA(insert OID = 225 ( lseg_center PGUID 11 f t t 1 f 600 "601" 100 0 0 100 lseg_center - )); +DATA(insert OID = 225 ( lseg_center PGUID 11 f t t t 1 f 600 "601" 100 0 0 100 lseg_center - )); DESCR("center of"); -DATA(insert OID = 226 ( path_center PGUID 11 f t t 1 f 600 "602" 100 0 0 100 path_center - )); +DATA(insert OID = 226 ( path_center PGUID 11 f t t t 1 f 600 "602" 100 0 0 100 path_center - )); DESCR("center of"); -DATA(insert OID = 227 ( poly_center PGUID 11 f t t 1 f 600 "604" 100 0 0 100 poly_center - )); +DATA(insert OID = 227 ( poly_center PGUID 11 f t t t 1 f 600 "604" 100 0 0 100 poly_center - )); DESCR("center of"); -DATA(insert OID = 228 ( dround PGUID 11 f t t 1 f 701 "701" 100 0 0 100 dround - )); +DATA(insert OID = 228 ( dround PGUID 11 f t t t 1 f 701 "701" 100 0 0 100 dround - )); DESCR("round to integer"); -DATA(insert OID = 229 ( dtrunc PGUID 11 f t t 1 f 701 "701" 100 0 0 100 dtrunc - )); +DATA(insert OID = 229 ( dtrunc PGUID 11 f t t t 1 f 701 "701" 100 0 0 100 dtrunc - )); DESCR("truncate to integer"); -DATA(insert OID = 230 ( dsqrt PGUID 11 f t t 1 f 701 "701" 100 0 0 100 dsqrt - )); +DATA(insert OID = 230 ( dsqrt PGUID 11 f t t t 1 f 701 "701" 100 0 0 100 dsqrt - )); DESCR("square root"); -DATA(insert OID = 231 ( dcbrt PGUID 11 f t t 1 f 701 "701" 100 0 0 100 dcbrt - )); +DATA(insert OID = 231 ( dcbrt PGUID 11 f t t t 1 f 701 "701" 100 0 0 100 dcbrt - )); DESCR("cube root"); -DATA(insert OID = 232 ( dpow PGUID 11 f t t 2 f 701 "701 701" 100 0 0 100 dpow - )); +DATA(insert OID = 232 ( dpow PGUID 11 f t t t 2 f 701 "701 701" 100 0 0 100 dpow - )); DESCR("exponentiation (x^y)"); -DATA(insert OID = 233 ( dexp PGUID 11 f t t 1 f 701 "701" 100 0 0 100 dexp - )); +DATA(insert OID = 233 ( dexp PGUID 11 f t t t 1 f 701 "701" 100 0 0 100 dexp - )); DESCR("natural exponential (e^x)"); -DATA(insert OID = 234 ( dlog1 PGUID 11 f t t 1 f 701 "701" 100 0 0 100 dlog1 - )); +DATA(insert OID = 234 ( dlog1 PGUID 11 f t t t 1 f 701 "701" 100 0 0 100 dlog1 - )); DESCR("natural logarithm"); -DATA(insert OID = 235 ( float8 PGUID 11 f t t 1 f 701 "21" 100 0 0 100 i2tod - )); +DATA(insert OID = 235 ( float8 PGUID 11 f t t t 1 f 701 "21" 100 0 0 100 i2tod - )); DESCR("convert int2 to float8"); -DATA(insert OID = 236 ( float4 PGUID 11 f t t 1 f 700 "21" 100 0 0 100 i2tof - )); +DATA(insert OID = 236 ( float4 PGUID 11 f t t t 1 f 700 "21" 100 0 0 100 i2tof - )); DESCR("convert int2 to float4"); -DATA(insert OID = 237 ( int2 PGUID 11 f t t 1 f 21 "701" 100 0 0 100 dtoi2 - )); +DATA(insert OID = 237 ( int2 PGUID 11 f t t t 1 f 21 "701" 100 0 0 100 dtoi2 - )); DESCR("convert float8 to int2"); -DATA(insert OID = 238 ( int2 PGUID 11 f t t 1 f 21 "700" 100 0 0 100 ftoi2 - )); +DATA(insert OID = 238 ( int2 PGUID 11 f t t t 1 f 21 "700" 100 0 0 100 ftoi2 - )); DESCR("convert float4 to int2"); -DATA(insert OID = 239 ( line_distance PGUID 11 f t t 2 f 701 "628 628" 100 0 0 100 line_distance - )); +DATA(insert OID = 239 ( line_distance PGUID 11 f t t t 2 f 701 "628 628" 100 0 0 100 line_distance - )); DESCR("distance between"); -DATA(insert OID = 240 ( nabstimein PGUID 11 f t f 1 f 702 "0" 100 0 0 100 nabstimein - )); +DATA(insert OID = 240 ( nabstimein PGUID 11 f t f t 1 f 702 "0" 100 0 0 100 nabstimein - )); DESCR("(internal)"); -DATA(insert OID = 241 ( nabstimeout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 nabstimeout - )); +DATA(insert OID = 241 ( nabstimeout PGUID 11 f t f t 1 f 23 "0" 100 0 0 100 nabstimeout - )); DESCR("(internal)"); -DATA(insert OID = 242 ( reltimein PGUID 11 f t f 1 f 703 "0" 100 0 0 100 reltimein - )); +DATA(insert OID = 242 ( reltimein PGUID 11 f t f t 1 f 703 "0" 100 0 0 100 reltimein - )); DESCR("(internal)"); -DATA(insert OID = 243 ( reltimeout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 reltimeout - )); +DATA(insert OID = 243 ( reltimeout PGUID 11 f t f t 1 f 23 "0" 100 0 0 100 reltimeout - )); DESCR("(internal)"); -DATA(insert OID = 244 ( timepl PGUID 11 f t f 2 f 702 "702 703" 100 0 0 100 timepl - )); +DATA(insert OID = 244 ( timepl PGUID 11 f t f t 2 f 702 "702 703" 100 0 0 100 timepl - )); DESCR("addition"); -DATA(insert OID = 245 ( timemi PGUID 11 f t f 2 f 702 "702 703" 100 0 0 100 timemi - )); +DATA(insert OID = 245 ( timemi PGUID 11 f t f t 2 f 702 "702 703" 100 0 0 100 timemi - )); DESCR("subtract"); -DATA(insert OID = 246 ( tintervalin PGUID 11 f t f 1 f 704 "0" 100 0 0 100 tintervalin - )); +DATA(insert OID = 246 ( tintervalin PGUID 11 f t f t 1 f 704 "0" 100 0 0 100 tintervalin - )); DESCR("(internal)"); -DATA(insert OID = 247 ( tintervalout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 tintervalout - )); +DATA(insert OID = 247 ( tintervalout PGUID 11 f t f t 1 f 23 "0" 100 0 0 100 tintervalout - )); DESCR("(internal)"); -DATA(insert OID = 248 ( intinterval PGUID 11 f t f 2 f 16 "702 704" 100 0 0 100 intinterval - )); +DATA(insert OID = 248 ( intinterval PGUID 11 f t f t 2 f 16 "702 704" 100 0 0 100 intinterval - )); DESCR("abstime in tinterval"); -DATA(insert OID = 249 ( tintervalrel PGUID 11 f t f 1 f 703 "704" 100 0 0 100 tintervalrel - )); +DATA(insert OID = 249 ( tintervalrel PGUID 11 f t f t 1 f 703 "704" 100 0 0 100 tintervalrel - )); DESCR(""); -DATA(insert OID = 250 ( timenow PGUID 11 f t f 0 f 702 "0" 100 0 0 100 timenow - )); +DATA(insert OID = 250 ( timenow PGUID 11 f t f t 0 f 702 "0" 100 0 0 100 timenow - )); DESCR("Current date and time (abstime)"); -DATA(insert OID = 251 ( abstimeeq PGUID 11 f t f 2 f 16 "702 702" 100 0 0 100 abstimeeq - )); +DATA(insert OID = 251 ( abstimeeq PGUID 11 f t f t 2 f 16 "702 702" 100 0 0 100 abstimeeq - )); DESCR("equal"); -DATA(insert OID = 252 ( abstimene PGUID 11 f t f 2 f 16 "702 702" 100 0 0 100 abstimene - )); +DATA(insert OID = 252 ( abstimene PGUID 11 f t f t 2 f 16 "702 702" 100 0 0 100 abstimene - )); DESCR("not equal"); -DATA(insert OID = 253 ( abstimelt PGUID 11 f t f 2 f 16 "702 702" 100 0 0 100 abstimelt - )); +DATA(insert OID = 253 ( abstimelt PGUID 11 f t f t 2 f 16 "702 702" 100 0 0 100 abstimelt - )); DESCR("less-than"); -DATA(insert OID = 254 ( abstimegt PGUID 11 f t f 2 f 16 "702 702" 100 0 0 100 abstimegt - )); +DATA(insert OID = 254 ( abstimegt PGUID 11 f t f t 2 f 16 "702 702" 100 0 0 100 abstimegt - )); DESCR("greater-than"); -DATA(insert OID = 255 ( abstimele PGUID 11 f t f 2 f 16 "702 702" 100 0 0 100 abstimele - )); +DATA(insert OID = 255 ( abstimele PGUID 11 f t f t 2 f 16 "702 702" 100 0 0 100 abstimele - )); DESCR("less-than-or-equal"); -DATA(insert OID = 256 ( abstimege PGUID 11 f t f 2 f 16 "702 702" 100 0 0 100 abstimege - )); +DATA(insert OID = 256 ( abstimege PGUID 11 f t f t 2 f 16 "702 702" 100 0 0 100 abstimege - )); DESCR("greater-than-or-equal"); -DATA(insert OID = 257 ( reltimeeq PGUID 11 f t t 2 f 16 "703 703" 100 0 0 100 reltimeeq - )); +DATA(insert OID = 257 ( reltimeeq PGUID 11 f t t t 2 f 16 "703 703" 100 0 0 100 reltimeeq - )); DESCR("equal"); -DATA(insert OID = 258 ( reltimene PGUID 11 f t t 2 f 16 "703 703" 100 0 0 100 reltimene - )); +DATA(insert OID = 258 ( reltimene PGUID 11 f t t t 2 f 16 "703 703" 100 0 0 100 reltimene - )); DESCR("not equal"); -DATA(insert OID = 259 ( reltimelt PGUID 11 f t t 2 f 16 "703 703" 100 0 0 100 reltimelt - )); +DATA(insert OID = 259 ( reltimelt PGUID 11 f t t t 2 f 16 "703 703" 100 0 0 100 reltimelt - )); DESCR("less-than"); -DATA(insert OID = 260 ( reltimegt PGUID 11 f t t 2 f 16 "703 703" 100 0 0 100 reltimegt - )); +DATA(insert OID = 260 ( reltimegt PGUID 11 f t t t 2 f 16 "703 703" 100 0 0 100 reltimegt - )); DESCR("greater-than"); -DATA(insert OID = 261 ( reltimele PGUID 11 f t t 2 f 16 "703 703" 100 0 0 100 reltimele - )); +DATA(insert OID = 261 ( reltimele PGUID 11 f t t t 2 f 16 "703 703" 100 0 0 100 reltimele - )); DESCR("less-than-or-equal"); -DATA(insert OID = 262 ( reltimege PGUID 11 f t t 2 f 16 "703 703" 100 0 0 100 reltimege - )); +DATA(insert OID = 262 ( reltimege PGUID 11 f t t t 2 f 16 "703 703" 100 0 0 100 reltimege - )); DESCR("greater-than-or-equal"); -DATA(insert OID = 263 ( tintervalsame PGUID 11 f t f 2 f 16 "704 704" 100 0 0 100 tintervalsame - )); +DATA(insert OID = 263 ( tintervalsame PGUID 11 f t f t 2 f 16 "704 704" 100 0 0 100 tintervalsame - )); DESCR("same as"); -DATA(insert OID = 264 ( tintervalct PGUID 11 f t f 2 f 16 "704 704" 100 0 0 100 tintervalct - )); +DATA(insert OID = 264 ( tintervalct PGUID 11 f t f t 2 f 16 "704 704" 100 0 0 100 tintervalct - )); DESCR("less-than"); -DATA(insert OID = 265 ( tintervalov PGUID 11 f t f 2 f 16 "704 704" 100 0 0 100 tintervalov - )); +DATA(insert OID = 265 ( tintervalov PGUID 11 f t f t 2 f 16 "704 704" 100 0 0 100 tintervalov - )); DESCR("overlaps"); -DATA(insert OID = 266 ( tintervalleneq PGUID 11 f t f 2 f 16 "704 703" 100 0 0 100 tintervalleneq - )); +DATA(insert OID = 266 ( tintervalleneq PGUID 11 f t f t 2 f 16 "704 703" 100 0 0 100 tintervalleneq - )); DESCR("length equal"); -DATA(insert OID = 267 ( tintervallenne PGUID 11 f t f 2 f 16 "704 703" 100 0 0 100 tintervallenne - )); +DATA(insert OID = 267 ( tintervallenne PGUID 11 f t f t 2 f 16 "704 703" 100 0 0 100 tintervallenne - )); DESCR("length not equal to"); -DATA(insert OID = 268 ( tintervallenlt PGUID 11 f t f 2 f 16 "704 703" 100 0 0 100 tintervallenlt - )); +DATA(insert OID = 268 ( tintervallenlt PGUID 11 f t f t 2 f 16 "704 703" 100 0 0 100 tintervallenlt - )); DESCR("length less-than"); -DATA(insert OID = 269 ( tintervallengt PGUID 11 f t f 2 f 16 "704 703" 100 0 0 100 tintervallengt - )); +DATA(insert OID = 269 ( tintervallengt PGUID 11 f t f t 2 f 16 "704 703" 100 0 0 100 tintervallengt - )); DESCR("length greater-than"); -DATA(insert OID = 270 ( tintervallenle PGUID 11 f t f 2 f 16 "704 703" 100 0 0 100 tintervallenle - )); +DATA(insert OID = 270 ( tintervallenle PGUID 11 f t f t 2 f 16 "704 703" 100 0 0 100 tintervallenle - )); DESCR("length less-than-or-equal"); -DATA(insert OID = 271 ( tintervallenge PGUID 11 f t f 2 f 16 "704 703" 100 0 0 100 tintervallenge - )); +DATA(insert OID = 271 ( tintervallenge PGUID 11 f t f t 2 f 16 "704 703" 100 0 0 100 tintervallenge - )); DESCR("length greater-than-or-equal"); -DATA(insert OID = 272 ( tintervalstart PGUID 11 f t f 1 f 702 "704" 100 0 0 100 tintervalstart - )); +DATA(insert OID = 272 ( tintervalstart PGUID 11 f t f t 1 f 702 "704" 100 0 0 100 tintervalstart - )); DESCR("start of interval"); -DATA(insert OID = 273 ( tintervalend PGUID 11 f t f 1 f 702 "704" 100 0 0 100 tintervalend - )); +DATA(insert OID = 273 ( tintervalend PGUID 11 f t f t 1 f 702 "704" 100 0 0 100 tintervalend - )); DESCR(""); -DATA(insert OID = 274 ( timeofday PGUID 11 f t f 0 f 25 "0" 100 0 0 100 timeofday - )); +DATA(insert OID = 274 ( timeofday PGUID 11 f t f t 0 f 25 "0" 100 0 0 100 timeofday - )); DESCR("Current date and time with microseconds"); -DATA(insert OID = 275 ( isfinite PGUID 11 f t f 1 f 16 "702" 100 0 0 100 abstime_finite - )); +DATA(insert OID = 275 ( isfinite PGUID 11 f t f t 1 f 16 "702" 100 0 0 100 abstime_finite - )); DESCR(""); -DATA(insert OID = 276 ( int2fac PGUID 11 f t t 1 f 23 "21" 100 0 0 100 int2fac - )); +DATA(insert OID = 276 ( int2fac PGUID 11 f t t t 1 f 23 "21" 100 0 0 100 int2fac - )); DESCR(""); -DATA(insert OID = 277 ( inter_sl PGUID 11 f t t 2 f 16 "601 628" 100 0 0 100 inter_sl - )); +DATA(insert OID = 277 ( inter_sl PGUID 11 f t t t 2 f 16 "601 628" 100 0 0 100 inter_sl - )); DESCR(""); -DATA(insert OID = 278 ( inter_lb PGUID 11 f t t 2 f 16 "628 603" 100 0 0 100 inter_lb - )); +DATA(insert OID = 278 ( inter_lb PGUID 11 f t t t 2 f 16 "628 603" 100 0 0 100 inter_lb - )); DESCR(""); -DATA(insert OID = 279 ( float48mul PGUID 11 f t t 2 f 701 "700 701" 100 0 0 100 float48mul - )); +DATA(insert OID = 279 ( float48mul PGUID 11 f t t t 2 f 701 "700 701" 100 0 0 100 float48mul - )); DESCR("multiply"); -DATA(insert OID = 280 ( float48div PGUID 11 f t t 2 f 701 "700 701" 100 0 0 100 float48div - )); +DATA(insert OID = 280 ( float48div PGUID 11 f t t t 2 f 701 "700 701" 100 0 0 100 float48div - )); DESCR("divide"); -DATA(insert OID = 281 ( float48pl PGUID 11 f t t 2 f 701 "700 701" 100 0 0 100 float48pl - )); +DATA(insert OID = 281 ( float48pl PGUID 11 f t t t 2 f 701 "700 701" 100 0 0 100 float48pl - )); DESCR("addition"); -DATA(insert OID = 282 ( float48mi PGUID 11 f t t 2 f 701 "700 701" 100 0 0 100 float48mi - )); +DATA(insert OID = 282 ( float48mi PGUID 11 f t t t 2 f 701 "700 701" 100 0 0 100 float48mi - )); DESCR("subtract"); -DATA(insert OID = 283 ( float84mul PGUID 11 f t t 2 f 701 "701 700" 100 0 0 100 float84mul - )); +DATA(insert OID = 283 ( float84mul PGUID 11 f t t t 2 f 701 "701 700" 100 0 0 100 float84mul - )); DESCR("multiply"); -DATA(insert OID = 284 ( float84div PGUID 11 f t t 2 f 701 "701 700" 100 0 0 100 float84div - )); +DATA(insert OID = 284 ( float84div PGUID 11 f t t t 2 f 701 "701 700" 100 0 0 100 float84div - )); DESCR("divide"); -DATA(insert OID = 285 ( float84pl PGUID 11 f t t 2 f 701 "701 700" 100 0 0 100 float84pl - )); +DATA(insert OID = 285 ( float84pl PGUID 11 f t t t 2 f 701 "701 700" 100 0 0 100 float84pl - )); DESCR("addition"); -DATA(insert OID = 286 ( float84mi PGUID 11 f t t 2 f 701 "701 700" 100 0 0 100 float84mi - )); +DATA(insert OID = 286 ( float84mi PGUID 11 f t t t 2 f 701 "701 700" 100 0 0 100 float84mi - )); DESCR("subtract"); -DATA(insert OID = 287 ( float4eq PGUID 11 f t t 2 f 16 "700 700" 100 0 0 100 float4eq - )); +DATA(insert OID = 287 ( float4eq PGUID 11 f t t t 2 f 16 "700 700" 100 0 0 100 float4eq - )); DESCR("equal"); -DATA(insert OID = 288 ( float4ne PGUID 11 f t t 2 f 16 "700 700" 100 0 0 100 float4ne - )); +DATA(insert OID = 288 ( float4ne PGUID 11 f t t t 2 f 16 "700 700" 100 0 0 100 float4ne - )); DESCR("not equal"); -DATA(insert OID = 289 ( float4lt PGUID 11 f t t 2 f 16 "700 700" 100 0 0 100 float4lt - )); +DATA(insert OID = 289 ( float4lt PGUID 11 f t t t 2 f 16 "700 700" 100 0 0 100 float4lt - )); DESCR("less-than"); -DATA(insert OID = 290 ( float4le PGUID 11 f t t 2 f 16 "700 700" 100 0 0 100 float4le - )); +DATA(insert OID = 290 ( float4le PGUID 11 f t t t 2 f 16 "700 700" 100 0 0 100 float4le - )); DESCR("less-than-or-equal"); -DATA(insert OID = 291 ( float4gt PGUID 11 f t t 2 f 16 "700 700" 100 0 0 100 float4gt - )); +DATA(insert OID = 291 ( float4gt PGUID 11 f t t t 2 f 16 "700 700" 100 0 0 100 float4gt - )); DESCR("greater-than"); -DATA(insert OID = 292 ( float4ge PGUID 11 f t t 2 f 16 "700 700" 100 0 0 100 float4ge - )); +DATA(insert OID = 292 ( float4ge PGUID 11 f t t t 2 f 16 "700 700" 100 0 0 100 float4ge - )); DESCR("greater-than-or-equal"); -DATA(insert OID = 293 ( float8eq PGUID 11 f t t 2 f 16 "701 701" 100 0 0 100 float8eq - )); +DATA(insert OID = 293 ( float8eq PGUID 11 f t t t 2 f 16 "701 701" 100 0 0 100 float8eq - )); DESCR("equal"); -DATA(insert OID = 294 ( float8ne PGUID 11 f t t 2 f 16 "701 701" 100 0 0 100 float8ne - )); +DATA(insert OID = 294 ( float8ne PGUID 11 f t t t 2 f 16 "701 701" 100 0 0 100 float8ne - )); DESCR("not equal"); -DATA(insert OID = 295 ( float8lt PGUID 11 f t t 2 f 16 "701 701" 100 0 0 100 float8lt - )); +DATA(insert OID = 295 ( float8lt PGUID 11 f t t t 2 f 16 "701 701" 100 0 0 100 float8lt - )); DESCR("less-than"); -DATA(insert OID = 296 ( float8le PGUID 11 f t t 2 f 16 "701 701" 100 0 0 100 float8le - )); +DATA(insert OID = 296 ( float8le PGUID 11 f t t t 2 f 16 "701 701" 100 0 0 100 float8le - )); DESCR("less-than-or-equal"); -DATA(insert OID = 297 ( float8gt PGUID 11 f t t 2 f 16 "701 701" 100 0 0 100 float8gt - )); +DATA(insert OID = 297 ( float8gt PGUID 11 f t t t 2 f 16 "701 701" 100 0 0 100 float8gt - )); DESCR("greater-than"); -DATA(insert OID = 298 ( float8ge PGUID 11 f t t 2 f 16 "701 701" 100 0 0 100 float8ge - )); +DATA(insert OID = 298 ( float8ge PGUID 11 f t t t 2 f 16 "701 701" 100 0 0 100 float8ge - )); DESCR("greater-than-or-equal"); -DATA(insert OID = 299 ( float48eq PGUID 11 f t t 2 f 16 "700 701" 100 0 0 100 float48eq - )); +DATA(insert OID = 299 ( float48eq PGUID 11 f t t t 2 f 16 "700 701" 100 0 0 100 float48eq - )); DESCR("equal"); /* OIDS 300 - 399 */ -DATA(insert OID = 300 ( float48ne PGUID 11 f t t 2 f 16 "700 701" 100 0 0 100 float48ne - )); +DATA(insert OID = 300 ( float48ne PGUID 11 f t t t 2 f 16 "700 701" 100 0 0 100 float48ne - )); DESCR("not equal"); -DATA(insert OID = 301 ( float48lt PGUID 11 f t t 2 f 16 "700 701" 100 0 0 100 float48lt - )); +DATA(insert OID = 301 ( float48lt PGUID 11 f t t t 2 f 16 "700 701" 100 0 0 100 float48lt - )); DESCR("less-than"); -DATA(insert OID = 302 ( float48le PGUID 11 f t t 2 f 16 "700 701" 100 0 0 100 float48le - )); +DATA(insert OID = 302 ( float48le PGUID 11 f t t t 2 f 16 "700 701" 100 0 0 100 float48le - )); DESCR("less-than-or-equal"); -DATA(insert OID = 303 ( float48gt PGUID 11 f t t 2 f 16 "700 701" 100 0 0 100 float48gt - )); +DATA(insert OID = 303 ( float48gt PGUID 11 f t t t 2 f 16 "700 701" 100 0 0 100 float48gt - )); DESCR("greater-than"); -DATA(insert OID = 304 ( float48ge PGUID 11 f t t 2 f 16 "700 701" 100 0 0 100 float48ge - )); +DATA(insert OID = 304 ( float48ge PGUID 11 f t t t 2 f 16 "700 701" 100 0 0 100 float48ge - )); DESCR("greater-than-or-equal"); -DATA(insert OID = 305 ( float84eq PGUID 11 f t t 2 f 16 "701 700" 100 0 0 100 float84eq - )); +DATA(insert OID = 305 ( float84eq PGUID 11 f t t t 2 f 16 "701 700" 100 0 0 100 float84eq - )); DESCR("equal"); -DATA(insert OID = 306 ( float84ne PGUID 11 f t t 2 f 16 "701 700" 100 0 0 100 float84ne - )); +DATA(insert OID = 306 ( float84ne PGUID 11 f t t t 2 f 16 "701 700" 100 0 0 100 float84ne - )); DESCR("not equal"); -DATA(insert OID = 307 ( float84lt PGUID 11 f t t 2 f 16 "701 700" 100 0 0 100 float84lt - )); +DATA(insert OID = 307 ( float84lt PGUID 11 f t t t 2 f 16 "701 700" 100 0 0 100 float84lt - )); DESCR("less-than"); -DATA(insert OID = 308 ( float84le PGUID 11 f t t 2 f 16 "701 700" 100 0 0 100 float84le - )); +DATA(insert OID = 308 ( float84le PGUID 11 f t t t 2 f 16 "701 700" 100 0 0 100 float84le - )); DESCR("less-than-or-equal"); -DATA(insert OID = 309 ( float84gt PGUID 11 f t t 2 f 16 "701 700" 100 0 0 100 float84gt - )); +DATA(insert OID = 309 ( float84gt PGUID 11 f t t t 2 f 16 "701 700" 100 0 0 100 float84gt - )); DESCR("greater-than"); -DATA(insert OID = 310 ( float84ge PGUID 11 f t t 2 f 16 "701 700" 100 0 0 100 float84ge - )); +DATA(insert OID = 310 ( float84ge PGUID 11 f t t t 2 f 16 "701 700" 100 0 0 100 float84ge - )); DESCR("greater-than-or-equal"); -DATA(insert OID = 311 ( float8 PGUID 11 f t t 1 f 701 "700" 100 0 0 100 ftod - )); +DATA(insert OID = 311 ( float8 PGUID 11 f t t t 1 f 701 "700" 100 0 0 100 ftod - )); DESCR("convert float4 to float8"); -DATA(insert OID = 312 ( float4 PGUID 11 f t t 1 f 700 "701" 100 0 0 100 dtof - )); +DATA(insert OID = 312 ( float4 PGUID 11 f t t t 1 f 700 "701" 100 0 0 100 dtof - )); DESCR("convert float8 to float4"); -DATA(insert OID = 313 ( int4 PGUID 11 f t t 1 f 23 "21" 100 0 0 100 i2toi4 - )); +DATA(insert OID = 313 ( int4 PGUID 11 f t t t 1 f 23 "21" 100 0 0 100 i2toi4 - )); DESCR("convert int2 to int4"); -DATA(insert OID = 314 ( int2 PGUID 11 f t t 1 f 21 "23" 100 0 0 100 i4toi2 - )); +DATA(insert OID = 314 ( int2 PGUID 11 f t t t 1 f 21 "23" 100 0 0 100 i4toi2 - )); DESCR("convert int4 to int2"); -DATA(insert OID = 315 ( int2vectoreq PGUID 11 f t t 2 f 16 "22 22" 100 0 0 100 int2vectoreq - )); +DATA(insert OID = 315 ( int2vectoreq PGUID 11 f t t t 2 f 16 "22 22" 100 0 0 100 int2vectoreq - )); DESCR("equal"); -DATA(insert OID = 316 ( float8 PGUID 11 f t t 1 f 701 "23" 100 0 0 100 i4tod - )); +DATA(insert OID = 316 ( float8 PGUID 11 f t t t 1 f 701 "23" 100 0 0 100 i4tod - )); DESCR("convert int4 to float8"); -DATA(insert OID = 317 ( int4 PGUID 11 f t t 1 f 23 "701" 100 0 0 100 dtoi4 - )); +DATA(insert OID = 317 ( int4 PGUID 11 f t t t 1 f 23 "701" 100 0 0 100 dtoi4 - )); DESCR("convert float8 to int4"); -DATA(insert OID = 318 ( float4 PGUID 11 f t t 1 f 700 "23" 100 0 0 100 i4tof - )); +DATA(insert OID = 318 ( float4 PGUID 11 f t t t 1 f 700 "23" 100 0 0 100 i4tof - )); DESCR("convert int4 to float4"); -DATA(insert OID = 319 ( int4 PGUID 11 f t t 1 f 23 "700" 100 0 0 100 ftoi4 - )); +DATA(insert OID = 319 ( int4 PGUID 11 f t t t 1 f 23 "700" 100 0 0 100 ftoi4 - )); DESCR("convert float4 to int4"); -DATA(insert OID = 320 ( rtinsert PGUID 11 f t f 5 f 23 "0" 100 0 0 100 rtinsert - )); +DATA(insert OID = 320 ( rtinsert PGUID 11 f t f t 5 f 23 "0" 100 0 0 100 rtinsert - )); DESCR("r-tree(internal)"); -DATA(insert OID = 321 ( rtdelete PGUID 11 f t f 2 f 23 "0" 100 0 0 100 rtdelete - )); +DATA(insert OID = 321 ( rtdelete PGUID 11 f t f t 2 f 23 "0" 100 0 0 100 rtdelete - )); DESCR("r-tree(internal)"); -DATA(insert OID = 322 ( rtgettuple PGUID 11 f t f 2 f 23 "0" 100 0 0 100 rtgettuple - )); +DATA(insert OID = 322 ( rtgettuple PGUID 11 f t f t 2 f 23 "0" 100 0 0 100 rtgettuple - )); DESCR("r-tree(internal)"); -DATA(insert OID = 323 ( rtbuild PGUID 11 f t f 9 f 23 "0" 100 0 0 100 rtbuild - )); +DATA(insert OID = 323 ( rtbuild PGUID 11 f t f t 9 f 23 "0" 100 0 0 100 rtbuild - )); DESCR("r-tree(internal)"); -DATA(insert OID = 324 ( rtbeginscan PGUID 11 f t f 4 f 23 "0" 100 0 0 100 rtbeginscan - )); +DATA(insert OID = 324 ( rtbeginscan PGUID 11 f t f t 4 f 23 "0" 100 0 0 100 rtbeginscan - )); DESCR("r-tree(internal)"); -DATA(insert OID = 325 ( rtendscan PGUID 11 f t f 1 f 23 "0" 100 0 0 100 rtendscan - )); +DATA(insert OID = 325 ( rtendscan PGUID 11 f t f t 1 f 23 "0" 100 0 0 100 rtendscan - )); DESCR("r-tree(internal)"); -DATA(insert OID = 326 ( rtmarkpos PGUID 11 f t f 1 f 23 "0" 100 0 0 100 rtmarkpos - )); +DATA(insert OID = 326 ( rtmarkpos PGUID 11 f t f t 1 f 23 "0" 100 0 0 100 rtmarkpos - )); DESCR("r-tree(internal)"); -DATA(insert OID = 327 ( rtrestrpos PGUID 11 f t f 1 f 23 "0" 100 0 0 100 rtrestrpos - )); +DATA(insert OID = 327 ( rtrestrpos PGUID 11 f t f t 1 f 23 "0" 100 0 0 100 rtrestrpos - )); DESCR("r-tree(internal)"); -DATA(insert OID = 328 ( rtrescan PGUID 11 f t f 3 f 23 "0" 100 0 0 100 rtrescan - )); +DATA(insert OID = 328 ( rtrescan PGUID 11 f t f t 3 f 23 "0" 100 0 0 100 rtrescan - )); DESCR("r-tree(internal)"); -DATA(insert OID = 330 ( btgettuple PGUID 11 f t f 2 f 23 "0" 100 0 0 100 btgettuple - )); +DATA(insert OID = 330 ( btgettuple PGUID 11 f t f t 2 f 23 "0" 100 0 0 100 btgettuple - )); DESCR("btree(internal)"); -DATA(insert OID = 331 ( btinsert PGUID 11 f t f 5 f 23 "0" 100 0 0 100 btinsert - )); +DATA(insert OID = 331 ( btinsert PGUID 11 f t f t 5 f 23 "0" 100 0 0 100 btinsert - )); DESCR("btree(internal)"); -DATA(insert OID = 332 ( btdelete PGUID 11 f t f 2 f 23 "0" 100 0 0 100 btdelete - )); +DATA(insert OID = 332 ( btdelete PGUID 11 f t f t 2 f 23 "0" 100 0 0 100 btdelete - )); DESCR("btree(internal)"); -DATA(insert OID = 333 ( btbeginscan PGUID 11 f t f 4 f 23 "0" 100 0 0 100 btbeginscan - )); +DATA(insert OID = 333 ( btbeginscan PGUID 11 f t f t 4 f 23 "0" 100 0 0 100 btbeginscan - )); DESCR("btree(internal)"); -DATA(insert OID = 334 ( btrescan PGUID 11 f t f 3 f 23 "0" 100 0 0 100 btrescan - )); +DATA(insert OID = 334 ( btrescan PGUID 11 f t f t 3 f 23 "0" 100 0 0 100 btrescan - )); DESCR("btree(internal)"); -DATA(insert OID = 335 ( btendscan PGUID 11 f t f 1 f 23 "0" 100 0 0 100 btendscan - )); +DATA(insert OID = 335 ( btendscan PGUID 11 f t f t 1 f 23 "0" 100 0 0 100 btendscan - )); DESCR("btree(internal)"); -DATA(insert OID = 336 ( btmarkpos PGUID 11 f t f 1 f 23 "0" 100 0 0 100 btmarkpos - )); +DATA(insert OID = 336 ( btmarkpos PGUID 11 f t f t 1 f 23 "0" 100 0 0 100 btmarkpos - )); DESCR("btree(internal)"); -DATA(insert OID = 337 ( btrestrpos PGUID 11 f t f 1 f 23 "0" 100 0 0 100 btrestrpos - )); +DATA(insert OID = 337 ( btrestrpos PGUID 11 f t f t 1 f 23 "0" 100 0 0 100 btrestrpos - )); DESCR("btree(internal)"); -DATA(insert OID = 338 ( btbuild PGUID 11 f t f 9 f 23 "0" 100 0 0 100 btbuild - )); +DATA(insert OID = 338 ( btbuild PGUID 11 f t f t 9 f 23 "0" 100 0 0 100 btbuild - )); DESCR("btree(internal)"); -DATA(insert OID = 339 ( poly_same PGUID 11 f t t 2 f 16 "604 604" 100 0 1 0 poly_same - )); +DATA(insert OID = 339 ( poly_same PGUID 11 f t t t 2 f 16 "604 604" 100 0 1 0 poly_same - )); DESCR("same as"); -DATA(insert OID = 340 ( poly_contain PGUID 11 f t t 2 f 16 "604 604" 100 0 1 0 poly_contain - )); +DATA(insert OID = 340 ( poly_contain PGUID 11 f t t t 2 f 16 "604 604" 100 0 1 0 poly_contain - )); DESCR("contains"); -DATA(insert OID = 341 ( poly_left PGUID 11 f t t 2 f 16 "604 604" 100 0 1 0 poly_left - )); +DATA(insert OID = 341 ( poly_left PGUID 11 f t t t 2 f 16 "604 604" 100 0 1 0 poly_left - )); DESCR("is left of"); -DATA(insert OID = 342 ( poly_overleft PGUID 11 f t t 2 f 16 "604 604" 100 0 1 0 poly_overleft - )); +DATA(insert OID = 342 ( poly_overleft PGUID 11 f t t t 2 f 16 "604 604" 100 0 1 0 poly_overleft - )); DESCR("overlaps, but does not extend to right of"); -DATA(insert OID = 343 ( poly_overright PGUID 11 f t t 2 f 16 "604 604" 100 0 1 0 poly_overright - )); +DATA(insert OID = 343 ( poly_overright PGUID 11 f t t t 2 f 16 "604 604" 100 0 1 0 poly_overright - )); DESCR("overlaps, but does not extend to left of"); -DATA(insert OID = 344 ( poly_right PGUID 11 f t t 2 f 16 "604 604" 100 0 1 0 poly_right - )); +DATA(insert OID = 344 ( poly_right PGUID 11 f t t t 2 f 16 "604 604" 100 0 1 0 poly_right - )); DESCR("is left of"); -DATA(insert OID = 345 ( poly_contained PGUID 11 f t t 2 f 16 "604 604" 100 0 1 0 poly_contained - )); +DATA(insert OID = 345 ( poly_contained PGUID 11 f t t t 2 f 16 "604 604" 100 0 1 0 poly_contained - )); DESCR("contained in"); -DATA(insert OID = 346 ( poly_overlap PGUID 11 f t t 2 f 16 "604 604" 100 0 1 0 poly_overlap - )); +DATA(insert OID = 346 ( poly_overlap PGUID 11 f t t t 2 f 16 "604 604" 100 0 1 0 poly_overlap - )); DESCR("overlaps"); -DATA(insert OID = 347 ( poly_in PGUID 11 f t t 1 f 604 "0" 100 0 1 0 poly_in - )); +DATA(insert OID = 347 ( poly_in PGUID 11 f t t t 1 f 604 "0" 100 0 1 0 poly_in - )); DESCR("(internal)"); -DATA(insert OID = 348 ( poly_out PGUID 11 f t t 1 f 23 "0" 100 0 1 0 poly_out - )); +DATA(insert OID = 348 ( poly_out PGUID 11 f t t t 1 f 23 "0" 100 0 1 0 poly_out - )); DESCR("(internal)"); -DATA(insert OID = 350 ( btint2cmp PGUID 11 f t t 2 f 23 "21 21" 100 0 0 100 btint2cmp - )); +DATA(insert OID = 350 ( btint2cmp PGUID 11 f t t t 2 f 23 "21 21" 100 0 0 100 btint2cmp - )); DESCR("btree less-equal-greater"); -DATA(insert OID = 351 ( btint4cmp PGUID 11 f t t 2 f 23 "23 23" 100 0 0 100 btint4cmp - )); +DATA(insert OID = 351 ( btint4cmp PGUID 11 f t t t 2 f 23 "23 23" 100 0 0 100 btint4cmp - )); DESCR("btree less-equal-greater"); -DATA(insert OID = 842 ( btint8cmp PGUID 11 f t t 2 f 23 "20 20" 100 0 0 100 btint8cmp - )); +DATA(insert OID = 842 ( btint8cmp PGUID 11 f t t t 2 f 23 "20 20" 100 0 0 100 btint8cmp - )); DESCR("btree less-equal-greater"); -DATA(insert OID = 352 ( btint42cmp PGUID 11 f t t 2 f 23 "23 21" 100 0 0 100 btint42cmp - )); +DATA(insert OID = 352 ( btint42cmp PGUID 11 f t t t 2 f 23 "23 21" 100 0 0 100 btint42cmp - )); DESCR("btree less-equal-greater"); -DATA(insert OID = 353 ( btint24cmp PGUID 11 f t t 2 f 23 "21 23" 100 0 0 100 btint24cmp - )); +DATA(insert OID = 353 ( btint24cmp PGUID 11 f t t t 2 f 23 "21 23" 100 0 0 100 btint24cmp - )); DESCR("btree less-equal-greater"); -DATA(insert OID = 354 ( btfloat4cmp PGUID 11 f t t 2 f 23 "700 700" 100 0 0 100 btfloat4cmp - )); +DATA(insert OID = 354 ( btfloat4cmp PGUID 11 f t t t 2 f 23 "700 700" 100 0 0 100 btfloat4cmp - )); DESCR("btree less-equal-greater"); -DATA(insert OID = 355 ( btfloat8cmp PGUID 11 f t t 2 f 23 "701 701" 100 0 0 100 btfloat8cmp - )); +DATA(insert OID = 355 ( btfloat8cmp PGUID 11 f t t t 2 f 23 "701 701" 100 0 0 100 btfloat8cmp - )); DESCR("btree less-equal-greater"); -DATA(insert OID = 356 ( btoidcmp PGUID 11 f t t 2 f 23 "26 26" 100 0 0 100 btoidcmp - )); +DATA(insert OID = 356 ( btoidcmp PGUID 11 f t t t 2 f 23 "26 26" 100 0 0 100 btoidcmp - )); DESCR("btree less-equal-greater"); -DATA(insert OID = 404 ( btoidvectorcmp PGUID 11 f t t 2 f 23 "30 30" 100 0 0 100 btoidvectorcmp - )); +DATA(insert OID = 404 ( btoidvectorcmp PGUID 11 f t t t 2 f 23 "30 30" 100 0 0 100 btoidvectorcmp - )); DESCR("btree less-equal-greater"); -DATA(insert OID = 357 ( btabstimecmp PGUID 11 f t f 2 f 23 "702 702" 100 0 0 100 btabstimecmp - )); +DATA(insert OID = 357 ( btabstimecmp PGUID 11 f t f t 2 f 23 "702 702" 100 0 0 100 btabstimecmp - )); DESCR("btree less-equal-greater"); -DATA(insert OID = 358 ( btcharcmp PGUID 11 f t t 2 f 23 "18 18" 100 0 0 100 btcharcmp - )); +DATA(insert OID = 358 ( btcharcmp PGUID 11 f t t t 2 f 23 "18 18" 100 0 0 100 btcharcmp - )); DESCR("btree less-equal-greater"); -DATA(insert OID = 359 ( btnamecmp PGUID 11 f t t 2 f 23 "19 19" 100 0 0 100 btnamecmp - )); +DATA(insert OID = 359 ( btnamecmp PGUID 11 f t t t 2 f 23 "19 19" 100 0 0 100 btnamecmp - )); DESCR("btree less-equal-greater"); -DATA(insert OID = 360 ( bttextcmp PGUID 11 f t t 2 f 23 "25 25" 100 0 0 100 bttextcmp - )); +DATA(insert OID = 360 ( bttextcmp PGUID 11 f t t t 2 f 23 "25 25" 100 0 0 100 bttextcmp - )); DESCR("btree less-equal-greater"); -DATA(insert OID = 361 ( lseg_distance PGUID 11 f t t 2 f 701 "601 601" 100 0 0 100 lseg_distance - )); +DATA(insert OID = 361 ( lseg_distance PGUID 11 f t t t 2 f 701 "601 601" 100 0 0 100 lseg_distance - )); DESCR("distance between"); -DATA(insert OID = 362 ( lseg_interpt PGUID 11 f t t 2 f 600 "601 601" 100 0 0 100 lseg_interpt - )); +DATA(insert OID = 362 ( lseg_interpt PGUID 11 f t t t 2 f 600 "601 601" 100 0 0 100 lseg_interpt - )); DESCR(""); -DATA(insert OID = 363 ( dist_ps PGUID 11 f t t 2 f 701 "600 601" 100 0 0 100 dist_ps - )); +DATA(insert OID = 363 ( dist_ps PGUID 11 f t t t 2 f 701 "600 601" 100 0 0 100 dist_ps - )); DESCR("distance between"); -DATA(insert OID = 364 ( dist_pb PGUID 11 f t t 2 f 701 "600 603" 100 0 0 100 dist_pb - )); +DATA(insert OID = 364 ( dist_pb PGUID 11 f t t t 2 f 701 "600 603" 100 0 0 100 dist_pb - )); DESCR("distance between point and box"); -DATA(insert OID = 365 ( dist_sb PGUID 11 f t t 2 f 701 "601 603" 100 0 0 100 dist_sb - )); +DATA(insert OID = 365 ( dist_sb PGUID 11 f t t t 2 f 701 "601 603" 100 0 0 100 dist_sb - )); DESCR("distance between segment and box"); -DATA(insert OID = 366 ( close_ps PGUID 11 f t t 2 f 600 "600 601" 100 0 0 100 close_ps - )); +DATA(insert OID = 366 ( close_ps PGUID 11 f t t t 2 f 600 "600 601" 100 0 0 100 close_ps - )); DESCR("closest point on line segment"); -DATA(insert OID = 367 ( close_pb PGUID 11 f t t 2 f 600 "600 603" 100 0 0 100 close_pb - )); +DATA(insert OID = 367 ( close_pb PGUID 11 f t t t 2 f 600 "600 603" 100 0 0 100 close_pb - )); DESCR("closest point on box"); -DATA(insert OID = 368 ( close_sb PGUID 11 f t t 2 f 600 "601 603" 100 0 0 100 close_sb - )); +DATA(insert OID = 368 ( close_sb PGUID 11 f t t t 2 f 600 "601 603" 100 0 0 100 close_sb - )); DESCR("closest point to line segment on box"); -DATA(insert OID = 369 ( on_ps PGUID 11 f t t 2 f 16 "600 601" 100 0 0 100 on_ps - )); +DATA(insert OID = 369 ( on_ps PGUID 11 f t t t 2 f 16 "600 601" 100 0 0 100 on_ps - )); DESCR("point contained in segment"); -DATA(insert OID = 370 ( path_distance PGUID 11 f t t 2 f 701 "602 602" 100 0 1 0 path_distance - )); +DATA(insert OID = 370 ( path_distance PGUID 11 f t t t 2 f 701 "602 602" 100 0 1 0 path_distance - )); DESCR("distance between paths"); -DATA(insert OID = 371 ( dist_ppath PGUID 11 f t t 2 f 701 "600 602" 100 0 1 0 dist_ppath - )); +DATA(insert OID = 371 ( dist_ppath PGUID 11 f t t t 2 f 701 "600 602" 100 0 1 0 dist_ppath - )); DESCR("distance between point and patch"); -DATA(insert OID = 372 ( on_sb PGUID 11 f t t 2 f 16 "601 603" 100 0 0 100 on_sb - )); +DATA(insert OID = 372 ( on_sb PGUID 11 f t t t 2 f 16 "601 603" 100 0 0 100 on_sb - )); DESCR("contained in"); -DATA(insert OID = 373 ( inter_sb PGUID 11 f t t 2 f 16 "601 603" 100 0 0 100 inter_sb - )); +DATA(insert OID = 373 ( inter_sb PGUID 11 f t t t 2 f 16 "601 603" 100 0 0 100 inter_sb - )); DESCR("intersects?"); /* OIDS 400 - 499 */ -DATA(insert OID = 406 ( text PGUID 11 f t t 1 f 25 "19" 100 0 0 100 name_text - )); +DATA(insert OID = 406 ( text PGUID 11 f t t t 1 f 25 "19" 100 0 0 100 name_text - )); DESCR("convert name to text"); -DATA(insert OID = 407 ( name PGUID 11 f t t 1 f 19 "25" 100 0 0 100 text_name - )); +DATA(insert OID = 407 ( name PGUID 11 f t t t 1 f 19 "25" 100 0 0 100 text_name - )); DESCR("convert text to name"); -DATA(insert OID = 408 ( bpchar PGUID 11 f t t 1 f 1042 "19" 100 0 0 100 name_bpchar - )); +DATA(insert OID = 408 ( bpchar PGUID 11 f t t t 1 f 1042 "19" 100 0 0 100 name_bpchar - )); DESCR("convert name to char()"); -DATA(insert OID = 409 ( name PGUID 11 f t t 1 f 19 "1042" 100 0 0 100 bpchar_name - )); +DATA(insert OID = 409 ( name PGUID 11 f t t t 1 f 19 "1042" 100 0 0 100 bpchar_name - )); DESCR("convert char() to name"); -DATA(insert OID = 438 ( hashcostestimate PGUID 11 f t f 7 f 0 "0 0 0 0 0 0 0" 100 0 0 100 hashcostestimate - )); +DATA(insert OID = 438 ( hashcostestimate PGUID 11 f t f t 7 f 0 "0 0 0 0 0 0 0" 100 0 0 100 hashcostestimate - )); DESCR("hash index cost estimator"); -DATA(insert OID = 440 ( hashgettuple PGUID 11 f t f 2 f 23 "0" 100 0 0 100 hashgettuple - )); +DATA(insert OID = 440 ( hashgettuple PGUID 11 f t f t 2 f 23 "0" 100 0 0 100 hashgettuple - )); DESCR("hash(internal)"); -DATA(insert OID = 441 ( hashinsert PGUID 11 f t f 5 f 23 "0" 100 0 0 100 hashinsert - )); +DATA(insert OID = 441 ( hashinsert PGUID 11 f t f t 5 f 23 "0" 100 0 0 100 hashinsert - )); DESCR("hash(internal)"); -DATA(insert OID = 442 ( hashdelete PGUID 11 f t f 2 f 23 "0" 100 0 0 100 hashdelete - )); +DATA(insert OID = 442 ( hashdelete PGUID 11 f t f t 2 f 23 "0" 100 0 0 100 hashdelete - )); DESCR("hash(internal)"); -DATA(insert OID = 443 ( hashbeginscan PGUID 11 f t f 4 f 23 "0" 100 0 0 100 hashbeginscan - )); +DATA(insert OID = 443 ( hashbeginscan PGUID 11 f t f t 4 f 23 "0" 100 0 0 100 hashbeginscan - )); DESCR("hash(internal)"); -DATA(insert OID = 444 ( hashrescan PGUID 11 f t f 3 f 23 "0" 100 0 0 100 hashrescan - )); +DATA(insert OID = 444 ( hashrescan PGUID 11 f t f t 3 f 23 "0" 100 0 0 100 hashrescan - )); DESCR("hash(internal)"); -DATA(insert OID = 445 ( hashendscan PGUID 11 f t f 1 f 23 "0" 100 0 0 100 hashendscan - )); +DATA(insert OID = 445 ( hashendscan PGUID 11 f t f t 1 f 23 "0" 100 0 0 100 hashendscan - )); DESCR("hash(internal)"); -DATA(insert OID = 446 ( hashmarkpos PGUID 11 f t f 1 f 23 "0" 100 0 0 100 hashmarkpos - )); +DATA(insert OID = 446 ( hashmarkpos PGUID 11 f t f t 1 f 23 "0" 100 0 0 100 hashmarkpos - )); DESCR("hash(internal)"); -DATA(insert OID = 447 ( hashrestrpos PGUID 11 f t f 1 f 23 "0" 100 0 0 100 hashrestrpos - )); +DATA(insert OID = 447 ( hashrestrpos PGUID 11 f t f t 1 f 23 "0" 100 0 0 100 hashrestrpos - )); DESCR("hash(internal)"); -DATA(insert OID = 448 ( hashbuild PGUID 11 f t f 9 f 23 "0" 100 0 0 100 hashbuild - )); +DATA(insert OID = 448 ( hashbuild PGUID 11 f t f t 9 f 23 "0" 100 0 0 100 hashbuild - )); DESCR("hash(internal)"); -DATA(insert OID = 449 ( hashint2 PGUID 11 f t t 1 f 23 "21" 100 0 0 100 hashint2 - )); +DATA(insert OID = 449 ( hashint2 PGUID 11 f t t t 1 f 23 "21" 100 0 0 100 hashint2 - )); DESCR("hash"); -DATA(insert OID = 450 ( hashint4 PGUID 11 f t t 1 f 23 "23" 100 0 0 100 hashint4 - )); +DATA(insert OID = 450 ( hashint4 PGUID 11 f t t t 1 f 23 "23" 100 0 0 100 hashint4 - )); DESCR("hash"); -DATA(insert OID = 949 ( hashint8 PGUID 11 f t t 1 f 23 "20" 100 0 0 100 hashint8 - )); +DATA(insert OID = 949 ( hashint8 PGUID 11 f t t t 1 f 23 "20" 100 0 0 100 hashint8 - )); DESCR("hash"); -DATA(insert OID = 451 ( hashfloat4 PGUID 11 f t t 1 f 23 "700" 100 0 0 100 hashfloat4 - )); +DATA(insert OID = 451 ( hashfloat4 PGUID 11 f t t t 1 f 23 "700" 100 0 0 100 hashfloat4 - )); DESCR("hash"); -DATA(insert OID = 452 ( hashfloat8 PGUID 11 f t t 1 f 23 "701" 100 0 0 100 hashfloat8 - )); +DATA(insert OID = 452 ( hashfloat8 PGUID 11 f t t t 1 f 23 "701" 100 0 0 100 hashfloat8 - )); DESCR("hash"); -DATA(insert OID = 453 ( hashoid PGUID 11 f t t 1 f 23 "26" 100 0 0 100 hashoid - )); +DATA(insert OID = 453 ( hashoid PGUID 11 f t t t 1 f 23 "26" 100 0 0 100 hashoid - )); DESCR("hash"); -DATA(insert OID = 454 ( hashchar PGUID 11 f t t 1 f 23 "18" 100 0 0 100 hashchar - )); +DATA(insert OID = 454 ( hashchar PGUID 11 f t t t 1 f 23 "18" 100 0 0 100 hashchar - )); DESCR("hash"); -DATA(insert OID = 455 ( hashname PGUID 11 f t t 1 f 23 "19" 100 0 0 100 hashname - )); +DATA(insert OID = 455 ( hashname PGUID 11 f t t t 1 f 23 "19" 100 0 0 100 hashname - )); DESCR("hash"); -DATA(insert OID = 456 ( hashtext PGUID 11 f t t 1 f 23 "25" 100 0 0 100 hashtext - )); +DATA(insert OID = 456 ( hashtext PGUID 11 f t t t 1 f 23 "25" 100 0 0 100 hashtext - )); DESCR("hash"); -DATA(insert OID = 457 ( hashoidvector PGUID 11 f t t 1 f 23 "30" 100 0 0 100 hashoidvector - )); +DATA(insert OID = 457 ( hashoidvector PGUID 11 f t t t 1 f 23 "30" 100 0 0 100 hashoidvector - )); DESCR("hash"); -DATA(insert OID = 458 ( text_larger PGUID 11 f t t 2 f 25 "25 25" 100 0 0 100 text_larger - )); +DATA(insert OID = 458 ( text_larger PGUID 11 f t t t 2 f 25 "25 25" 100 0 0 100 text_larger - )); DESCR("larger of two"); -DATA(insert OID = 459 ( text_smaller PGUID 11 f t t 2 f 25 "25 25" 100 0 0 100 text_smaller - )); +DATA(insert OID = 459 ( text_smaller PGUID 11 f t t t 2 f 25 "25 25" 100 0 0 100 text_smaller - )); DESCR("smaller of two"); -DATA(insert OID = 460 ( int8in PGUID 11 f t t 1 f 20 "0" 100 0 0 100 int8in - )); +DATA(insert OID = 460 ( int8in PGUID 11 f t t t 1 f 20 "0" 100 0 0 100 int8in - )); DESCR("(internal)"); -DATA(insert OID = 461 ( int8out PGUID 11 f t t 1 f 23 "0" 100 0 0 100 int8out - )); +DATA(insert OID = 461 ( int8out PGUID 11 f t t t 1 f 23 "0" 100 0 0 100 int8out - )); DESCR("(internal)"); -DATA(insert OID = 462 ( int8um PGUID 11 f t t 1 f 20 "20" 100 0 0 100 int8um - )); +DATA(insert OID = 462 ( int8um PGUID 11 f t t t 1 f 20 "20" 100 0 0 100 int8um - )); DESCR("negate"); -DATA(insert OID = 463 ( int8pl PGUID 11 f t t 2 f 20 "20 20" 100 0 0 100 int8pl - )); +DATA(insert OID = 463 ( int8pl PGUID 11 f t t t 2 f 20 "20 20" 100 0 0 100 int8pl - )); DESCR("addition"); -DATA(insert OID = 464 ( int8mi PGUID 11 f t t 2 f 20 "20 20" 100 0 0 100 int8mi - )); +DATA(insert OID = 464 ( int8mi PGUID 11 f t t t 2 f 20 "20 20" 100 0 0 100 int8mi - )); DESCR("subtraction"); -DATA(insert OID = 465 ( int8mul PGUID 11 f t t 2 f 20 "20 20" 100 0 0 100 int8mul - )); +DATA(insert OID = 465 ( int8mul PGUID 11 f t t t 2 f 20 "20 20" 100 0 0 100 int8mul - )); DESCR("multiply"); -DATA(insert OID = 466 ( int8div PGUID 11 f t t 2 f 20 "20 20" 100 0 0 100 int8div - )); +DATA(insert OID = 466 ( int8div PGUID 11 f t t t 2 f 20 "20 20" 100 0 0 100 int8div - )); DESCR("divide"); -DATA(insert OID = 467 ( int8eq PGUID 11 f t t 2 f 16 "20 20" 100 0 0 100 int8eq - )); +DATA(insert OID = 467 ( int8eq PGUID 11 f t t t 2 f 16 "20 20" 100 0 0 100 int8eq - )); DESCR("equal"); -DATA(insert OID = 468 ( int8ne PGUID 11 f t t 2 f 16 "20 20" 100 0 0 100 int8ne - )); +DATA(insert OID = 468 ( int8ne PGUID 11 f t t t 2 f 16 "20 20" 100 0 0 100 int8ne - )); DESCR("not equal"); -DATA(insert OID = 469 ( int8lt PGUID 11 f t t 2 f 16 "20 20" 100 0 0 100 int8lt - )); +DATA(insert OID = 469 ( int8lt PGUID 11 f t t t 2 f 16 "20 20" 100 0 0 100 int8lt - )); DESCR("less-than"); -DATA(insert OID = 470 ( int8gt PGUID 11 f t t 2 f 16 "20 20" 100 0 0 100 int8gt - )); +DATA(insert OID = 470 ( int8gt PGUID 11 f t t t 2 f 16 "20 20" 100 0 0 100 int8gt - )); DESCR("greater-than"); -DATA(insert OID = 471 ( int8le PGUID 11 f t t 2 f 16 "20 20" 100 0 0 100 int8le - )); +DATA(insert OID = 471 ( int8le PGUID 11 f t t t 2 f 16 "20 20" 100 0 0 100 int8le - )); DESCR("less-than-or-equal"); -DATA(insert OID = 472 ( int8ge PGUID 11 f t t 2 f 16 "20 20" 100 0 0 100 int8ge - )); +DATA(insert OID = 472 ( int8ge PGUID 11 f t t t 2 f 16 "20 20" 100 0 0 100 int8ge - )); DESCR("greater-than-or-equal"); -DATA(insert OID = 474 ( int84eq PGUID 11 f t t 2 f 16 "20 23" 100 0 0 100 int84eq - )); +DATA(insert OID = 474 ( int84eq PGUID 11 f t t t 2 f 16 "20 23" 100 0 0 100 int84eq - )); DESCR("equal"); -DATA(insert OID = 475 ( int84ne PGUID 11 f t t 2 f 16 "20 23" 100 0 0 100 int84ne - )); +DATA(insert OID = 475 ( int84ne PGUID 11 f t t t 2 f 16 "20 23" 100 0 0 100 int84ne - )); DESCR("not equal"); -DATA(insert OID = 476 ( int84lt PGUID 11 f t t 2 f 16 "20 23" 100 0 0 100 int84lt - )); +DATA(insert OID = 476 ( int84lt PGUID 11 f t t t 2 f 16 "20 23" 100 0 0 100 int84lt - )); DESCR("less-than"); -DATA(insert OID = 477 ( int84gt PGUID 11 f t t 2 f 16 "20 23" 100 0 0 100 int84gt - )); +DATA(insert OID = 477 ( int84gt PGUID 11 f t t t 2 f 16 "20 23" 100 0 0 100 int84gt - )); DESCR("greater-than"); -DATA(insert OID = 478 ( int84le PGUID 11 f t t 2 f 16 "20 23" 100 0 0 100 int84le - )); +DATA(insert OID = 478 ( int84le PGUID 11 f t t t 2 f 16 "20 23" 100 0 0 100 int84le - )); DESCR("less-than-or-equal"); -DATA(insert OID = 479 ( int84ge PGUID 11 f t t 2 f 16 "20 23" 100 0 0 100 int84ge - )); +DATA(insert OID = 479 ( int84ge PGUID 11 f t t t 2 f 16 "20 23" 100 0 0 100 int84ge - )); DESCR("greater-than-or-equal"); -DATA(insert OID = 480 ( int4 PGUID 11 f t t 1 f 23 "20" 100 0 0 100 int84 - )); +DATA(insert OID = 480 ( int4 PGUID 11 f t t t 1 f 23 "20" 100 0 0 100 int84 - )); DESCR("convert int8 to int4"); -DATA(insert OID = 481 ( int8 PGUID 11 f t t 1 f 20 "23" 100 0 0 100 int48 - )); +DATA(insert OID = 481 ( int8 PGUID 11 f t t t 1 f 20 "23" 100 0 0 100 int48 - )); DESCR("convert int4 to int8"); -DATA(insert OID = 482 ( float8 PGUID 11 f t t 1 f 701 "20" 100 0 0 100 i8tod - )); +DATA(insert OID = 482 ( float8 PGUID 11 f t t t 1 f 701 "20" 100 0 0 100 i8tod - )); DESCR("convert int8 to float8"); -DATA(insert OID = 483 ( int8 PGUID 11 f t t 1 f 20 "701" 100 0 0 100 dtoi8 - )); +DATA(insert OID = 483 ( int8 PGUID 11 f t t t 1 f 20 "701" 100 0 0 100 dtoi8 - )); DESCR("convert float8 to int8"); /* OIDS 500 - 599 */ /* OIDS 600 - 699 */ -DATA(insert OID = 1285 ( int4notin PGUID 11 f t f 2 f 16 "23 0" 100 0 0 100 int4notin - )); +DATA(insert OID = 1285 ( int4notin PGUID 11 f t f t 2 f 16 "23 0" 100 0 0 100 int4notin - )); DESCR("not in"); -DATA(insert OID = 1286 ( oidnotin PGUID 11 f t f 2 f 16 "26 0" 100 0 0 100 oidnotin - )); +DATA(insert OID = 1286 ( oidnotin PGUID 11 f t f t 2 f 16 "26 0" 100 0 0 100 oidnotin - )); DESCR("not in"); -DATA(insert OID = 1287 ( int44in PGUID 11 f t t 1 f 22 "0" 100 0 0 100 int44in - )); +DATA(insert OID = 1287 ( int44in PGUID 11 f t t t 1 f 22 "0" 100 0 0 100 int44in - )); DESCR("(internal)"); -DATA(insert OID = 653 ( int44out PGUID 11 f t t 1 f 23 "0" 100 0 0 100 int44out - )); +DATA(insert OID = 653 ( int44out PGUID 11 f t t t 1 f 23 "0" 100 0 0 100 int44out - )); DESCR("(internal)"); -DATA(insert OID = 655 ( namelt PGUID 11 f t t 2 f 16 "19 19" 100 0 0 100 namelt - )); +DATA(insert OID = 655 ( namelt PGUID 11 f t t t 2 f 16 "19 19" 100 0 0 100 namelt - )); DESCR("less-than"); -DATA(insert OID = 656 ( namele PGUID 11 f t t 2 f 16 "19 19" 100 0 0 100 namele - )); +DATA(insert OID = 656 ( namele PGUID 11 f t t t 2 f 16 "19 19" 100 0 0 100 namele - )); DESCR("less-than-or-equal"); -DATA(insert OID = 657 ( namegt PGUID 11 f t t 2 f 16 "19 19" 100 0 0 100 namegt - )); +DATA(insert OID = 657 ( namegt PGUID 11 f t t t 2 f 16 "19 19" 100 0 0 100 namegt - )); DESCR("greater-than"); -DATA(insert OID = 658 ( namege PGUID 11 f t t 2 f 16 "19 19" 100 0 0 100 namege - )); +DATA(insert OID = 658 ( namege PGUID 11 f t t t 2 f 16 "19 19" 100 0 0 100 namege - )); DESCR("greater-than-or-equal"); -DATA(insert OID = 659 ( namene PGUID 11 f t t 2 f 16 "19 19" 100 0 0 100 namene - )); +DATA(insert OID = 659 ( namene PGUID 11 f t t t 2 f 16 "19 19" 100 0 0 100 namene - )); DESCR("not equal"); -DATA(insert OID = 668 ( bpchar PGUID 11 f t t 2 f 1042 "1042 23" 100 0 0 100 bpchar - )); +DATA(insert OID = 668 ( bpchar PGUID 11 f t t t 2 f 1042 "1042 23" 100 0 0 100 bpchar - )); DESCR("truncate char()"); -DATA(insert OID = 669 ( varchar PGUID 11 f t t 2 f 1043 "1043 23" 100 0 0 100 varchar - )); +DATA(insert OID = 669 ( varchar PGUID 11 f t t t 2 f 1043 "1043 23" 100 0 0 100 varchar - )); DESCR("truncate varchar()"); -DATA(insert OID = 676 ( mktinterval PGUID 11 f t f 2 f 704 "702 702" 100 0 0 100 mktinterval - )); +DATA(insert OID = 676 ( mktinterval PGUID 11 f t f t 2 f 704 "702 702" 100 0 0 100 mktinterval - )); DESCR("convert to tinterval"); -DATA(insert OID = 619 ( oidvectorne PGUID 11 f t t 2 f 16 "30 30" 100 0 0 100 oidvectorne - )); +DATA(insert OID = 619 ( oidvectorne PGUID 11 f t t t 2 f 16 "30 30" 100 0 0 100 oidvectorne - )); DESCR("less-than"); -DATA(insert OID = 677 ( oidvectorlt PGUID 11 f t t 2 f 16 "30 30" 100 0 0 100 oidvectorlt - )); +DATA(insert OID = 677 ( oidvectorlt PGUID 11 f t t t 2 f 16 "30 30" 100 0 0 100 oidvectorlt - )); DESCR("less-than"); -DATA(insert OID = 678 ( oidvectorle PGUID 11 f t t 2 f 16 "30 30" 100 0 0 100 oidvectorle - )); +DATA(insert OID = 678 ( oidvectorle PGUID 11 f t t t 2 f 16 "30 30" 100 0 0 100 oidvectorle - )); DESCR("less-than-or-equal"); -DATA(insert OID = 679 ( oidvectoreq PGUID 11 f t t 2 f 16 "30 30" 100 0 0 100 oidvectoreq - )); +DATA(insert OID = 679 ( oidvectoreq PGUID 11 f t t t 2 f 16 "30 30" 100 0 0 100 oidvectoreq - )); DESCR("equal"); -DATA(insert OID = 680 ( oidvectorge PGUID 11 f t t 2 f 16 "30 30" 100 0 0 100 oidvectorge - )); +DATA(insert OID = 680 ( oidvectorge PGUID 11 f t t t 2 f 16 "30 30" 100 0 0 100 oidvectorge - )); DESCR("greater-than-or-equal"); -DATA(insert OID = 681 ( oidvectorgt PGUID 11 f t t 2 f 16 "30 30" 100 0 0 100 oidvectorgt - )); +DATA(insert OID = 681 ( oidvectorgt PGUID 11 f t t t 2 f 16 "30 30" 100 0 0 100 oidvectorgt - )); DESCR("greater-than"); /* OIDS 700 - 799 */ -DATA(insert OID = 710 ( getpgusername PGUID 11 f t f 0 f 19 "0" 100 0 0 100 getpgusername - )); +DATA(insert OID = 710 ( getpgusername PGUID 11 f t f t 0 f 19 "0" 100 0 0 100 getpgusername - )); DESCR("Return username"); -DATA(insert OID = 711 ( userfntest PGUID 11 f t t 1 f 23 "23" 100 0 0 100 userfntest - )); +DATA(insert OID = 711 ( userfntest PGUID 11 f t t t 1 f 23 "23" 100 0 0 100 userfntest - )); DESCR(""); -DATA(insert OID = 713 ( oidrand PGUID 11 f t f 2 f 16 "26 23" 100 0 0 100 oidrand - )); +DATA(insert OID = 713 ( oidrand PGUID 11 f t f t 2 f 16 "26 23" 100 0 0 100 oidrand - )); DESCR("random"); -DATA(insert OID = 715 ( oidsrand PGUID 11 f t f 1 f 16 "23" 100 0 0 100 oidsrand - )); +DATA(insert OID = 715 ( oidsrand PGUID 11 f t f t 1 f 16 "23" 100 0 0 100 oidsrand - )); DESCR("seed random number generator"); -DATA(insert OID = 716 ( oideqint4 PGUID 11 f t t 2 f 16 "26 23" 100 0 0 100 oideqint4 - )); +DATA(insert OID = 716 ( oideqint4 PGUID 11 f t t t 2 f 16 "26 23" 100 0 0 100 oideqint4 - )); DESCR("equal"); -DATA(insert OID = 717 ( int4eqoid PGUID 11 f t t 2 f 16 "23 26" 100 0 0 100 int4eqoid - )); +DATA(insert OID = 717 ( int4eqoid PGUID 11 f t t t 2 f 16 "23 26" 100 0 0 100 int4eqoid - )); DESCR("equal"); -DATA(insert OID = 720 ( octet_length PGUID 11 f t t 1 f 23 "17" 100 0 0 100 byteaoctetlen - )); +DATA(insert OID = 720 ( octet_length PGUID 11 f t t t 1 f 23 "17" 100 0 0 100 byteaoctetlen - )); DESCR(""); -DATA(insert OID = 721 ( get_byte PGUID 11 f t t 2 f 23 "17 23" 100 0 0 100 byteaGetByte - )); +DATA(insert OID = 721 ( get_byte PGUID 11 f t t t 2 f 23 "17 23" 100 0 0 100 byteaGetByte - )); DESCR(""); -DATA(insert OID = 722 ( set_byte PGUID 11 f t t 3 f 17 "17 23 23" 100 0 0 100 byteaSetByte - )); +DATA(insert OID = 722 ( set_byte PGUID 11 f t t t 3 f 17 "17 23 23" 100 0 0 100 byteaSetByte - )); DESCR(""); -DATA(insert OID = 723 ( get_bit PGUID 11 f t t 2 f 23 "17 23" 100 0 0 100 byteaGetBit - )); +DATA(insert OID = 723 ( get_bit PGUID 11 f t t t 2 f 23 "17 23" 100 0 0 100 byteaGetBit - )); DESCR(""); -DATA(insert OID = 724 ( set_bit PGUID 11 f t t 3 f 17 "17 23 23" 100 0 0 100 byteaSetBit - )); +DATA(insert OID = 724 ( set_bit PGUID 11 f t t t 3 f 17 "17 23 23" 100 0 0 100 byteaSetBit - )); DESCR(""); -DATA(insert OID = 725 ( dist_pl PGUID 11 f t t 2 f 701 "600 628" 100 0 0 100 dist_pl - )); +DATA(insert OID = 725 ( dist_pl PGUID 11 f t t t 2 f 701 "600 628" 100 0 0 100 dist_pl - )); DESCR("distance between point and line"); -DATA(insert OID = 726 ( dist_lb PGUID 11 f t t 2 f 701 "628 603" 100 0 0 100 dist_lb - )); +DATA(insert OID = 726 ( dist_lb PGUID 11 f t t t 2 f 701 "628 603" 100 0 0 100 dist_lb - )); DESCR("distance between line and box"); -DATA(insert OID = 727 ( dist_sl PGUID 11 f t t 2 f 701 "601 628" 100 0 0 100 dist_sl - )); +DATA(insert OID = 727 ( dist_sl PGUID 11 f t t t 2 f 701 "601 628" 100 0 0 100 dist_sl - )); DESCR("distance between lseg and line"); -DATA(insert OID = 728 ( dist_cpoly PGUID 11 f t t 2 f 701 "718 604" 100 0 0 100 dist_cpoly - )); +DATA(insert OID = 728 ( dist_cpoly PGUID 11 f t t t 2 f 701 "718 604" 100 0 0 100 dist_cpoly - )); DESCR("distance between"); -DATA(insert OID = 729 ( poly_distance PGUID 11 f t t 2 f 701 "604 604" 100 0 0 100 poly_distance - )); +DATA(insert OID = 729 ( poly_distance PGUID 11 f t t t 2 f 701 "604 604" 100 0 0 100 poly_distance - )); DESCR("distance between"); -DATA(insert OID = 730 ( pqtest PGUID 11 f t f 1 f 23 "25" 100 0 0 100 pqtest - )); +DATA(insert OID = 730 ( pqtest PGUID 11 f t f t 1 f 23 "25" 100 0 0 100 pqtest - )); DESCR(""); -DATA(insert OID = 740 ( text_lt PGUID 11 f t t 2 f 16 "25 25" 100 0 0 0 text_lt - )); +DATA(insert OID = 740 ( text_lt PGUID 11 f t t t 2 f 16 "25 25" 100 0 0 0 text_lt - )); DESCR("less-than"); -DATA(insert OID = 741 ( text_le PGUID 11 f t t 2 f 16 "25 25" 100 0 0 0 text_le - )); +DATA(insert OID = 741 ( text_le PGUID 11 f t t t 2 f 16 "25 25" 100 0 0 0 text_le - )); DESCR("less-than-or-equal"); -DATA(insert OID = 742 ( text_gt PGUID 11 f t t 2 f 16 "25 25" 100 0 0 0 text_gt - )); +DATA(insert OID = 742 ( text_gt PGUID 11 f t t t 2 f 16 "25 25" 100 0 0 0 text_gt - )); DESCR("greater-than"); -DATA(insert OID = 743 ( text_ge PGUID 11 f t t 2 f 16 "25 25" 100 0 0 0 text_ge - )); +DATA(insert OID = 743 ( text_ge PGUID 11 f t t t 2 f 16 "25 25" 100 0 0 0 text_ge - )); DESCR("greater-than-or-equal"); -DATA(insert OID = 744 ( array_eq PGUID 11 f t t 2 f 16 "0 0" 100 0 0 100 array_eq -)); +DATA(insert OID = 744 ( array_eq PGUID 11 f t t t 2 f 16 "0 0" 100 0 0 100 array_eq -)); DESCR("equal"); -DATA(insert OID = 745 ( array_assgn PGUID 11 f t t 8 f 23 "0 23 0 0 0 23 23 0" 100 0 0 100 array_assgn -)); +DATA(insert OID = 745 ( array_assgn PGUID 11 f t t t 8 f 23 "0 23 0 0 0 23 23 0" 100 0 0 100 array_assgn -)); DESCR("array"); -DATA(insert OID = 746 ( array_clip PGUID 11 f t t 7 f 23 "0 23 0 0 23 23 0" 100 0 0 100 array_clip -)); +DATA(insert OID = 746 ( array_clip PGUID 11 f t t t 7 f 23 "0 23 0 0 23 23 0" 100 0 0 100 array_clip -)); DESCR("array"); -DATA(insert OID = 747 ( array_dims PGUID 11 f t t 1 f 25 "0" 100 0 0 100 array_dims -)); +DATA(insert OID = 747 ( array_dims PGUID 11 f t t t 1 f 25 "0" 100 0 0 100 array_dims -)); DESCR("array(internal)"); -DATA(insert OID = 748 ( array_set PGUID 11 f t t 8 f 23 "0 23 0 0 23 23 23 0" 100 0 0 100 array_set -)); +DATA(insert OID = 748 ( array_set PGUID 11 f t t t 8 f 23 "0 23 0 0 23 23 23 0" 100 0 0 100 array_set -)); DESCR("array"); -DATA(insert OID = 749 ( array_ref PGUID 11 f t t 7 f 23 "0 23 0 23 23 23 0" 100 0 0 100 array_ref -)); +DATA(insert OID = 749 ( array_ref PGUID 11 f t t t 7 f 23 "0 23 0 23 23 23 0" 100 0 0 100 array_ref -)); DESCR("array"); -DATA(insert OID = 750 ( array_in PGUID 11 f t t 3 f 23 "0 0 23" 100 0 0 100 array_in - )); +DATA(insert OID = 750 ( array_in PGUID 11 f t t t 3 f 23 "0 0 23" 100 0 0 100 array_in - )); DESCR("array"); -DATA(insert OID = 751 ( array_out PGUID 11 f t t 2 f 23 "0 0" 100 0 0 100 array_out - )); +DATA(insert OID = 751 ( array_out PGUID 11 f t t t 2 f 23 "0 0" 100 0 0 100 array_out - )); DESCR("array"); -DATA(insert OID = 752 ( filename_in PGUID 11 f t t 1 f 605 "0" 100 0 0 100 filename_in - )); +DATA(insert OID = 752 ( filename_in PGUID 11 f t t t 1 f 605 "0" 100 0 0 100 filename_in - )); DESCR("(internal)"); -DATA(insert OID = 753 ( filename_out PGUID 11 f t t 2 f 19 "0 0" 100 0 0 100 filename_out - )); +DATA(insert OID = 753 ( filename_out PGUID 11 f t t t 2 f 19 "0 0" 100 0 0 100 filename_out - )); DESCR("(internal)"); -DATA(insert OID = 760 ( smgrin PGUID 11 f t f 1 f 210 "0" 100 0 0 100 smgrin - )); +DATA(insert OID = 760 ( smgrin PGUID 11 f t f t 1 f 210 "0" 100 0 0 100 smgrin - )); DESCR("storage manager(internal)"); -DATA(insert OID = 761 ( smgrout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 smgrout - )); +DATA(insert OID = 761 ( smgrout PGUID 11 f t f t 1 f 23 "0" 100 0 0 100 smgrout - )); DESCR("storage manager(internal)"); -DATA(insert OID = 762 ( smgreq PGUID 11 f t f 2 f 16 "210 210" 100 0 0 100 smgreq - )); +DATA(insert OID = 762 ( smgreq PGUID 11 f t f t 2 f 16 "210 210" 100 0 0 100 smgreq - )); DESCR("storage manager"); -DATA(insert OID = 763 ( smgrne PGUID 11 f t f 2 f 16 "210 210" 100 0 0 100 smgrne - )); +DATA(insert OID = 763 ( smgrne PGUID 11 f t f t 2 f 16 "210 210" 100 0 0 100 smgrne - )); DESCR("storage manager"); -DATA(insert OID = 764 ( lo_import PGUID 11 f t f 1 f 26 "25" 100 0 0 100 lo_import - )); +DATA(insert OID = 764 ( lo_import PGUID 11 f t f t 1 f 26 "25" 100 0 0 100 lo_import - )); DESCR("large object import"); -DATA(insert OID = 765 ( lo_export PGUID 11 f t f 2 f 23 "26 25" 100 0 0 100 lo_export - )); +DATA(insert OID = 765 ( lo_export PGUID 11 f t f t 2 f 23 "26 25" 100 0 0 100 lo_export - )); DESCR("large object export"); -DATA(insert OID = 766 ( int4inc PGUID 11 f t t 1 f 23 "23" 100 0 0 100 int4inc - )); +DATA(insert OID = 766 ( int4inc PGUID 11 f t t t 1 f 23 "23" 100 0 0 100 int4inc - )); DESCR("increment"); -DATA(insert OID = 767 ( int2inc PGUID 11 f t t 1 f 21 "21" 100 0 0 100 int2inc - )); +DATA(insert OID = 767 ( int2inc PGUID 11 f t t t 1 f 21 "21" 100 0 0 100 int2inc - )); DESCR("increment"); -DATA(insert OID = 768 ( int4larger PGUID 11 f t t 2 f 23 "23 23" 100 0 0 100 int4larger - )); +DATA(insert OID = 768 ( int4larger PGUID 11 f t t t 2 f 23 "23 23" 100 0 0 100 int4larger - )); DESCR("larger of two"); -DATA(insert OID = 769 ( int4smaller PGUID 11 f t t 2 f 23 "23 23" 100 0 0 100 int4smaller - )); +DATA(insert OID = 769 ( int4smaller PGUID 11 f t t t 2 f 23 "23 23" 100 0 0 100 int4smaller - )); DESCR("smaller of two"); -DATA(insert OID = 770 ( int2larger PGUID 11 f t t 2 f 21 "21 21" 100 0 0 100 int2larger - )); +DATA(insert OID = 770 ( int2larger PGUID 11 f t t t 2 f 21 "21 21" 100 0 0 100 int2larger - )); DESCR("larger of two"); -DATA(insert OID = 771 ( int2smaller PGUID 11 f t t 2 f 21 "21 21" 100 0 0 100 int2smaller - )); +DATA(insert OID = 771 ( int2smaller PGUID 11 f t t t 2 f 21 "21 21" 100 0 0 100 int2smaller - )); DESCR("smaller of two"); -DATA(insert OID = 772 ( gistcostestimate PGUID 11 f t f 7 f 0 "0 0 0 0 0 0 0" 100 0 0 100 gistcostestimate - )); +DATA(insert OID = 772 ( gistcostestimate PGUID 11 f t f t 7 f 0 "0 0 0 0 0 0 0" 100 0 0 100 gistcostestimate - )); DESCR("gist cost estimator"); -DATA(insert OID = 774 ( gistgettuple PGUID 11 f t f 2 f 23 "0" 100 0 0 100 gistgettuple - )); +DATA(insert OID = 774 ( gistgettuple PGUID 11 f t f t 2 f 23 "0" 100 0 0 100 gistgettuple - )); DESCR("gist(internal)"); -DATA(insert OID = 775 ( gistinsert PGUID 11 f t f 5 f 23 "0" 100 0 0 100 gistinsert - )); +DATA(insert OID = 775 ( gistinsert PGUID 11 f t f t 5 f 23 "0" 100 0 0 100 gistinsert - )); DESCR("gist(internal)"); -DATA(insert OID = 776 ( gistdelete PGUID 11 f t f 2 f 23 "0" 100 0 0 100 gistdelete - )); +DATA(insert OID = 776 ( gistdelete PGUID 11 f t f t 2 f 23 "0" 100 0 0 100 gistdelete - )); DESCR("gist(internal)"); -DATA(insert OID = 777 ( gistbeginscan PGUID 11 f t f 4 f 23 "0" 100 0 0 100 gistbeginscan - )); +DATA(insert OID = 777 ( gistbeginscan PGUID 11 f t f t 4 f 23 "0" 100 0 0 100 gistbeginscan - )); DESCR("gist(internal)"); -DATA(insert OID = 778 ( gistrescan PGUID 11 f t f 3 f 23 "0" 100 0 0 100 gistrescan - )); +DATA(insert OID = 778 ( gistrescan PGUID 11 f t f t 3 f 23 "0" 100 0 0 100 gistrescan - )); DESCR("gist(internal)"); -DATA(insert OID = 779 ( gistendscan PGUID 11 f t f 1 f 23 "0" 100 0 0 100 gistendscan - )); +DATA(insert OID = 779 ( gistendscan PGUID 11 f t f t 1 f 23 "0" 100 0 0 100 gistendscan - )); DESCR("gist(internal)"); -DATA(insert OID = 780 ( gistmarkpos PGUID 11 f t f 1 f 23 "0" 100 0 0 100 gistmarkpos - )); +DATA(insert OID = 780 ( gistmarkpos PGUID 11 f t f t 1 f 23 "0" 100 0 0 100 gistmarkpos - )); DESCR("gist(internal)"); -DATA(insert OID = 781 ( gistrestrpos PGUID 11 f t f 1 f 23 "0" 100 0 0 100 gistrestrpos - )); +DATA(insert OID = 781 ( gistrestrpos PGUID 11 f t f t 1 f 23 "0" 100 0 0 100 gistrestrpos - )); DESCR("gist(internal)"); -DATA(insert OID = 782 ( gistbuild PGUID 11 f t f 9 f 23 "0" 100 0 0 100 gistbuild - )); +DATA(insert OID = 782 ( gistbuild PGUID 11 f t f t 9 f 23 "0" 100 0 0 100 gistbuild - )); DESCR("gist(internal)"); -DATA(insert OID = 784 ( tintervaleq PGUID 11 f t f 2 f 16 "704 704" 100 0 0 100 tintervaleq - )); +DATA(insert OID = 784 ( tintervaleq PGUID 11 f t f t 2 f 16 "704 704" 100 0 0 100 tintervaleq - )); DESCR("equal"); -DATA(insert OID = 785 ( tintervalne PGUID 11 f t f 2 f 16 "704 704" 100 0 0 100 tintervalne - )); +DATA(insert OID = 785 ( tintervalne PGUID 11 f t f t 2 f 16 "704 704" 100 0 0 100 tintervalne - )); DESCR("not equal"); -DATA(insert OID = 786 ( tintervallt PGUID 11 f t f 2 f 16 "704 704" 100 0 0 100 tintervallt - )); +DATA(insert OID = 786 ( tintervallt PGUID 11 f t f t 2 f 16 "704 704" 100 0 0 100 tintervallt - )); DESCR("less-than"); -DATA(insert OID = 787 ( tintervalgt PGUID 11 f t f 2 f 16 "704 704" 100 0 0 100 tintervalgt - )); +DATA(insert OID = 787 ( tintervalgt PGUID 11 f t f t 2 f 16 "704 704" 100 0 0 100 tintervalgt - )); DESCR("greater-than"); -DATA(insert OID = 788 ( tintervalle PGUID 11 f t f 2 f 16 "704 704" 100 0 0 100 tintervalle - )); +DATA(insert OID = 788 ( tintervalle PGUID 11 f t f t 2 f 16 "704 704" 100 0 0 100 tintervalle - )); DESCR("less-than-or-equal"); -DATA(insert OID = 789 ( tintervalge PGUID 11 f t f 2 f 16 "704 704" 100 0 0 100 tintervalge - )); +DATA(insert OID = 789 ( tintervalge PGUID 11 f t f t 2 f 16 "704 704" 100 0 0 100 tintervalge - )); DESCR("greater-than-or-equal"); /* OIDS 800 - 899 */ -DATA(insert OID = 817 ( oid PGUID 11 f t t 1 f 26 "25" 100 0 0 100 text_oid -)); +DATA(insert OID = 817 ( oid PGUID 11 f t t t 1 f 26 "25" 100 0 0 100 text_oid -)); DESCR("convert text to oid"); -DATA(insert OID = 818 ( int2 PGUID 11 f t t 1 f 21 "25" 100 0 0 100 text_int2 -)); +DATA(insert OID = 818 ( int2 PGUID 11 f t t t 1 f 21 "25" 100 0 0 100 text_int2 -)); DESCR("convert text to int2"); -DATA(insert OID = 819 ( int4 PGUID 11 f t t 1 f 23 "25" 100 0 0 100 text_int4 -)); +DATA(insert OID = 819 ( int4 PGUID 11 f t t t 1 f 23 "25" 100 0 0 100 text_int4 -)); DESCR("convert text to int4"); -DATA(insert OID = 838 ( float8 PGUID 11 f t t 1 f 701 "25" 100 0 0 100 text_float8 -)); +DATA(insert OID = 838 ( float8 PGUID 11 f t t t 1 f 701 "25" 100 0 0 100 text_float8 -)); DESCR("convert text to float8"); -DATA(insert OID = 839 ( float4 PGUID 11 f t t 1 f 700 "25" 100 0 0 100 text_float4 -)); +DATA(insert OID = 839 ( float4 PGUID 11 f t t t 1 f 700 "25" 100 0 0 100 text_float4 -)); DESCR("convert text to float4"); -DATA(insert OID = 840 ( text PGUID 11 f t t 1 f 25 "701" 100 0 0 100 float8_text -)); +DATA(insert OID = 840 ( text PGUID 11 f t t t 1 f 25 "701" 100 0 0 100 float8_text -)); DESCR("convert float8 to text"); -DATA(insert OID = 841 ( text PGUID 11 f t t 1 f 25 "700" 100 0 0 100 float4_text -)); +DATA(insert OID = 841 ( text PGUID 11 f t t t 1 f 25 "700" 100 0 0 100 float4_text -)); DESCR("convert float4 to text"); -DATA(insert OID = 846 ( cash_mul_flt4 PGUID 11 f t t 2 f 790 "790 700" 100 0 0 100 cash_mul_flt4 - )); +DATA(insert OID = 846 ( cash_mul_flt4 PGUID 11 f t t t 2 f 790 "790 700" 100 0 0 100 cash_mul_flt4 - )); DESCR("multiply"); -DATA(insert OID = 847 ( cash_div_flt4 PGUID 11 f t t 2 f 790 "790 700" 100 0 0 100 cash_div_flt4 - )); +DATA(insert OID = 847 ( cash_div_flt4 PGUID 11 f t t t 2 f 790 "790 700" 100 0 0 100 cash_div_flt4 - )); DESCR("divide"); -DATA(insert OID = 848 ( flt4_mul_cash PGUID 11 f t t 2 f 790 "700 790" 100 0 0 100 flt4_mul_cash - )); +DATA(insert OID = 848 ( flt4_mul_cash PGUID 11 f t t t 2 f 790 "700 790" 100 0 0 100 flt4_mul_cash - )); DESCR("multiply"); -DATA(insert OID = 849 ( position PGUID 11 f t t 2 f 23 "25 25" 100 0 1 0 textpos - )); +DATA(insert OID = 849 ( position PGUID 11 f t t t 2 f 23 "25 25" 100 0 1 0 textpos - )); DESCR("return position of substring"); -DATA(insert OID = 850 ( textlike PGUID 11 f t t 2 f 16 "25 25" 100 0 1 0 textlike - )); +DATA(insert OID = 850 ( textlike PGUID 11 f t t t 2 f 16 "25 25" 100 0 1 0 textlike - )); DESCR("matches LIKE expression"); -DATA(insert OID = 851 ( textnlike PGUID 11 f t t 2 f 16 "25 25" 100 0 1 0 textnlike - )); +DATA(insert OID = 851 ( textnlike PGUID 11 f t t t 2 f 16 "25 25" 100 0 1 0 textnlike - )); DESCR("does not match LIKE expression"); -DATA(insert OID = 852 ( int48eq PGUID 11 f t t 2 f 16 "23 20" 100 0 0 100 int48eq - )); +DATA(insert OID = 852 ( int48eq PGUID 11 f t t t 2 f 16 "23 20" 100 0 0 100 int48eq - )); DESCR("equal"); -DATA(insert OID = 853 ( int48ne PGUID 11 f t t 2 f 16 "23 20" 100 0 0 100 int48ne - )); +DATA(insert OID = 853 ( int48ne PGUID 11 f t t t 2 f 16 "23 20" 100 0 0 100 int48ne - )); DESCR("not equal"); -DATA(insert OID = 854 ( int48lt PGUID 11 f t t 2 f 16 "23 20" 100 0 0 100 int48lt - )); +DATA(insert OID = 854 ( int48lt PGUID 11 f t t t 2 f 16 "23 20" 100 0 0 100 int48lt - )); DESCR("less-than"); -DATA(insert OID = 855 ( int48gt PGUID 11 f t t 2 f 16 "23 20" 100 0 0 100 int48gt - )); +DATA(insert OID = 855 ( int48gt PGUID 11 f t t t 2 f 16 "23 20" 100 0 0 100 int48gt - )); DESCR("greater-than"); -DATA(insert OID = 856 ( int48le PGUID 11 f t t 2 f 16 "23 20" 100 0 0 100 int48le - )); +DATA(insert OID = 856 ( int48le PGUID 11 f t t t 2 f 16 "23 20" 100 0 0 100 int48le - )); DESCR("less-than-or-equal"); -DATA(insert OID = 857 ( int48ge PGUID 11 f t t 2 f 16 "23 20" 100 0 0 100 int48ge - )); +DATA(insert OID = 857 ( int48ge PGUID 11 f t t t 2 f 16 "23 20" 100 0 0 100 int48ge - )); DESCR("greater-than-or-equal"); -DATA(insert OID = 858 ( namelike PGUID 11 f t t 2 f 16 "19 25" 100 0 0 100 namelike - )); +DATA(insert OID = 858 ( namelike PGUID 11 f t t t 2 f 16 "19 25" 100 0 0 100 namelike - )); DESCR("matches LIKE expression"); -DATA(insert OID = 859 ( namenlike PGUID 11 f t t 2 f 16 "19 25" 100 0 0 100 namenlike - )); +DATA(insert OID = 859 ( namenlike PGUID 11 f t t t 2 f 16 "19 25" 100 0 0 100 namenlike - )); DESCR("does not match LIKE expression"); -DATA(insert OID = 860 ( bpchar PGUID 11 f t t 1 f 1042 "18" 100 0 0 100 char_bpchar - )); +DATA(insert OID = 860 ( bpchar PGUID 11 f t t t 1 f 1042 "18" 100 0 0 100 char_bpchar - )); DESCR("convert char to char()"); -DATA(insert OID = 861 ( char PGUID 11 f t t 1 f 18 "1042" 100 0 0 100 bpchar_char - )); +DATA(insert OID = 861 ( char PGUID 11 f t t t 1 f 18 "1042" 100 0 0 100 bpchar_char - )); DESCR("convert char() to char"); -DATA(insert OID = 862 ( int4_mul_cash PGUID 11 f t t 2 f 790 "23 790" 100 0 0 100 int4_mul_cash - )); +DATA(insert OID = 862 ( int4_mul_cash PGUID 11 f t t t 2 f 790 "23 790" 100 0 0 100 int4_mul_cash - )); DESCR("multiply"); -DATA(insert OID = 863 ( int2_mul_cash PGUID 11 f t t 2 f 790 "21 790" 100 0 0 100 int2_mul_cash - )); +DATA(insert OID = 863 ( int2_mul_cash PGUID 11 f t t t 2 f 790 "21 790" 100 0 0 100 int2_mul_cash - )); DESCR("multiply"); -DATA(insert OID = 864 ( cash_mul_int4 PGUID 11 f t t 2 f 790 "790 23" 100 0 0 100 cash_mul_int4 - )); +DATA(insert OID = 864 ( cash_mul_int4 PGUID 11 f t t t 2 f 790 "790 23" 100 0 0 100 cash_mul_int4 - )); DESCR("multiply"); -DATA(insert OID = 865 ( cash_div_int4 PGUID 11 f t t 2 f 790 "790 23" 100 0 0 100 cash_div_int4 - )); +DATA(insert OID = 865 ( cash_div_int4 PGUID 11 f t t t 2 f 790 "790 23" 100 0 0 100 cash_div_int4 - )); DESCR("divide"); -DATA(insert OID = 866 ( cash_mul_int2 PGUID 11 f t t 2 f 790 "790 21" 100 0 0 100 cash_mul_int2 - )); +DATA(insert OID = 866 ( cash_mul_int2 PGUID 11 f t t t 2 f 790 "790 21" 100 0 0 100 cash_mul_int2 - )); DESCR("multiply"); -DATA(insert OID = 867 ( cash_div_int2 PGUID 11 f t t 2 f 790 "790 21" 100 0 0 100 cash_div_int2 - )); +DATA(insert OID = 867 ( cash_div_int2 PGUID 11 f t t t 2 f 790 "790 21" 100 0 0 100 cash_div_int2 - )); DESCR("divide"); -DATA(insert OID = 886 ( cash_in PGUID 11 f t t 1 f 790 "0" 100 0 0 100 cash_in - )); +DATA(insert OID = 886 ( cash_in PGUID 11 f t t t 1 f 790 "0" 100 0 0 100 cash_in - )); DESCR("(internal)"); -DATA(insert OID = 887 ( cash_out PGUID 11 f t t 1 f 23 "0" 100 0 0 100 cash_out - )); +DATA(insert OID = 887 ( cash_out PGUID 11 f t t t 1 f 23 "0" 100 0 0 100 cash_out - )); DESCR("(internal)"); -DATA(insert OID = 1273 ( cash_words_out PGUID 11 f t t 1 f 25 "790" 100 0 0 100 cash_words_out - )); +DATA(insert OID = 1273 ( cash_words_out PGUID 11 f t t t 1 f 25 "790" 100 0 0 100 cash_words_out - )); DESCR("output amount as words"); -DATA(insert OID = 888 ( cash_eq PGUID 11 f t t 2 f 16 "790 790" 100 0 0 100 cash_eq - )); +DATA(insert OID = 888 ( cash_eq PGUID 11 f t t t 2 f 16 "790 790" 100 0 0 100 cash_eq - )); DESCR("equal"); -DATA(insert OID = 889 ( cash_ne PGUID 11 f t t 2 f 16 "790 790" 100 0 0 100 cash_ne - )); +DATA(insert OID = 889 ( cash_ne PGUID 11 f t t t 2 f 16 "790 790" 100 0 0 100 cash_ne - )); DESCR("not equal"); -DATA(insert OID = 890 ( cash_lt PGUID 11 f t t 2 f 16 "790 790" 100 0 0 100 cash_lt - )); +DATA(insert OID = 890 ( cash_lt PGUID 11 f t t t 2 f 16 "790 790" 100 0 0 100 cash_lt - )); DESCR("less-than"); -DATA(insert OID = 891 ( cash_le PGUID 11 f t t 2 f 16 "790 790" 100 0 0 100 cash_le - )); +DATA(insert OID = 891 ( cash_le PGUID 11 f t t t 2 f 16 "790 790" 100 0 0 100 cash_le - )); DESCR("less-than-or-equal"); -DATA(insert OID = 892 ( cash_gt PGUID 11 f t t 2 f 16 "790 790" 100 0 0 100 cash_gt - )); +DATA(insert OID = 892 ( cash_gt PGUID 11 f t t t 2 f 16 "790 790" 100 0 0 100 cash_gt - )); DESCR("greater-than"); -DATA(insert OID = 893 ( cash_ge PGUID 11 f t t 2 f 16 "790 790" 100 0 0 100 cash_ge - )); +DATA(insert OID = 893 ( cash_ge PGUID 11 f t t t 2 f 16 "790 790" 100 0 0 100 cash_ge - )); DESCR("greater-than-or-equal"); -DATA(insert OID = 894 ( cash_pl PGUID 11 f t t 2 f 790 "790 790" 100 0 0 100 cash_pl - )); +DATA(insert OID = 894 ( cash_pl PGUID 11 f t t t 2 f 790 "790 790" 100 0 0 100 cash_pl - )); DESCR("addition"); -DATA(insert OID = 895 ( cash_mi PGUID 11 f t t 2 f 790 "790 790" 100 0 0 100 cash_mi - )); +DATA(insert OID = 895 ( cash_mi PGUID 11 f t t t 2 f 790 "790 790" 100 0 0 100 cash_mi - )); DESCR("subtract"); -DATA(insert OID = 896 ( cash_mul_flt8 PGUID 11 f t t 2 f 790 "790 701" 100 0 0 100 cash_mul_flt8 - )); +DATA(insert OID = 896 ( cash_mul_flt8 PGUID 11 f t t t 2 f 790 "790 701" 100 0 0 100 cash_mul_flt8 - )); DESCR("multiply"); -DATA(insert OID = 897 ( cash_div_flt8 PGUID 11 f t t 2 f 790 "790 701" 100 0 0 100 cash_div_flt8 - )); +DATA(insert OID = 897 ( cash_div_flt8 PGUID 11 f t t t 2 f 790 "790 701" 100 0 0 100 cash_div_flt8 - )); DESCR("divide"); -DATA(insert OID = 898 ( cashlarger PGUID 11 f t t 2 f 790 "790 790" 100 0 0 100 cashlarger - )); +DATA(insert OID = 898 ( cashlarger PGUID 11 f t t t 2 f 790 "790 790" 100 0 0 100 cashlarger - )); DESCR("larger of two"); -DATA(insert OID = 899 ( cashsmaller PGUID 11 f t t 2 f 790 "790 790" 100 0 0 100 cashsmaller - )); +DATA(insert OID = 899 ( cashsmaller PGUID 11 f t t t 2 f 790 "790 790" 100 0 0 100 cashsmaller - )); DESCR("smaller of two"); -DATA(insert OID = 919 ( flt8_mul_cash PGUID 11 f t t 2 f 790 "701 790" 100 0 0 100 flt8_mul_cash - )); +DATA(insert OID = 919 ( flt8_mul_cash PGUID 11 f t t t 2 f 790 "701 790" 100 0 0 100 flt8_mul_cash - )); DESCR("multiply"); /* OIDS 900 - 999 */ /* isoldpath, upgradepath, upgradepoly, revertpoly are used to update pre-v6.1 to v6.1 - tgl 97/06/03 */ -DATA(insert OID = 936 ( isoldpath PGUID 11 f t f 1 f 16 "602" 100 0 0 100 isoldpath - )); +DATA(insert OID = 936 ( isoldpath PGUID 11 f t f t 1 f 16 "602" 100 0 0 100 isoldpath - )); DESCR(""); -DATA(insert OID = 937 ( upgradepath PGUID 11 f t f 1 f 602 "602" 100 0 0 100 upgradepath - )); +DATA(insert OID = 937 ( upgradepath PGUID 11 f t f t 1 f 602 "602" 100 0 0 100 upgradepath - )); DESCR(""); -DATA(insert OID = 938 ( upgradepoly PGUID 11 f t f 1 f 604 "604" 100 0 0 100 upgradepoly - )); +DATA(insert OID = 938 ( upgradepoly PGUID 11 f t f t 1 f 604 "604" 100 0 0 100 upgradepoly - )); DESCR(""); -DATA(insert OID = 939 ( revertpoly PGUID 11 f t f 1 f 604 "604" 100 0 0 100 revertpoly - )); +DATA(insert OID = 939 ( revertpoly PGUID 11 f t f t 1 f 604 "604" 100 0 0 100 revertpoly - )); DESCR(""); -DATA(insert OID = 940 ( mod PGUID 11 f t t 2 f 21 "21 21" 100 0 0 100 int2mod - )); +DATA(insert OID = 940 ( mod PGUID 11 f t t t 2 f 21 "21 21" 100 0 0 100 int2mod - )); DESCR("modulus"); -DATA(insert OID = 941 ( mod PGUID 11 f t t 2 f 23 "23 23" 100 0 0 100 int4mod - )); +DATA(insert OID = 941 ( mod PGUID 11 f t t t 2 f 23 "23 23" 100 0 0 100 int4mod - )); DESCR("modulus"); -DATA(insert OID = 942 ( mod PGUID 11 f t t 2 f 23 "21 23" 100 0 0 100 int24mod - )); +DATA(insert OID = 942 ( mod PGUID 11 f t t t 2 f 23 "21 23" 100 0 0 100 int24mod - )); DESCR("modulus"); -DATA(insert OID = 943 ( mod PGUID 11 f t t 2 f 23 "23 21" 100 0 0 100 int42mod - )); +DATA(insert OID = 943 ( mod PGUID 11 f t t t 2 f 23 "23 21" 100 0 0 100 int42mod - )); DESCR("modulus"); -DATA(insert OID = 945 ( int8mod PGUID 11 f t t 2 f 20 "20 20" 100 0 0 100 int8mod - )); +DATA(insert OID = 945 ( int8mod PGUID 11 f t t t 2 f 20 "20 20" 100 0 0 100 int8mod - )); DESCR("modulus"); -DATA(insert OID = 947 ( mod PGUID 11 f t t 2 f 20 "20 20" 100 0 0 100 int8mod - )); +DATA(insert OID = 947 ( mod PGUID 11 f t t t 2 f 20 "20 20" 100 0 0 100 int8mod - )); DESCR("modulus"); -DATA(insert OID = 944 ( char PGUID 11 f t t 1 f 18 "25" 100 0 0 100 text_char - )); +DATA(insert OID = 944 ( char PGUID 11 f t t t 1 f 18 "25" 100 0 0 100 text_char - )); DESCR("convert text to char"); -DATA(insert OID = 946 ( text PGUID 11 f t t 1 f 25 "18" 100 0 0 100 char_text - )); +DATA(insert OID = 946 ( text PGUID 11 f t t t 1 f 25 "18" 100 0 0 100 char_text - )); DESCR("convert char to text"); -DATA(insert OID = 948 ( varchar PGUID 11 f t t 1 f 25 "1043" 100 0 0 100 bpchar_char - )); +DATA(insert OID = 948 ( varchar PGUID 11 f t t t 1 f 25 "1043" 100 0 0 100 bpchar_char - )); DESCR("convert varchar() to text"); -DATA(insert OID = 950 ( istrue PGUID 11 f t t 1 f 16 "16" 100 0 0 100 istrue - )); +DATA(insert OID = 950 ( istrue PGUID 11 f t t t 1 f 16 "16" 100 0 0 100 istrue - )); DESCR(""); -DATA(insert OID = 951 ( isfalse PGUID 11 f t t 1 f 16 "16" 100 0 0 100 isfalse - )); +DATA(insert OID = 951 ( isfalse PGUID 11 f t t t 1 f 16 "16" 100 0 0 100 isfalse - )); DESCR(""); -DATA(insert OID = 952 ( lo_open PGUID 11 f t f 2 f 23 "26 23" 100 0 0 100 lo_open - )); +DATA(insert OID = 952 ( lo_open PGUID 11 f t f t 2 f 23 "26 23" 100 0 0 100 lo_open - )); DESCR("large object open"); -DATA(insert OID = 953 ( lo_close PGUID 11 f t f 1 f 23 "23" 100 0 0 100 lo_close - )); +DATA(insert OID = 953 ( lo_close PGUID 11 f t f t 1 f 23 "23" 100 0 0 100 lo_close - )); DESCR("large object close"); -DATA(insert OID = 954 ( loread PGUID 11 f t f 2 f 17 "23 23" 100 0 0 100 loread - )); +DATA(insert OID = 954 ( loread PGUID 11 f t f t 2 f 17 "23 23" 100 0 0 100 loread - )); DESCR("large object read"); -DATA(insert OID = 955 ( lowrite PGUID 11 f t f 2 f 23 "23 17" 100 0 0 100 lowrite - )); +DATA(insert OID = 955 ( lowrite PGUID 11 f t f t 2 f 23 "23 17" 100 0 0 100 lowrite - )); DESCR("large object write"); -DATA(insert OID = 956 ( lo_lseek PGUID 11 f t f 3 f 23 "23 23 23" 100 0 0 100 lo_lseek - )); +DATA(insert OID = 956 ( lo_lseek PGUID 11 f t f t 3 f 23 "23 23 23" 100 0 0 100 lo_lseek - )); DESCR("large object seek"); -DATA(insert OID = 957 ( lo_creat PGUID 11 f t f 1 f 26 "23" 100 0 0 100 lo_creat - )); +DATA(insert OID = 957 ( lo_creat PGUID 11 f t f t 1 f 26 "23" 100 0 0 100 lo_creat - )); DESCR("large object create"); -DATA(insert OID = 958 ( lo_tell PGUID 11 f t f 1 f 23 "23" 100 0 0 100 lo_tell - )); +DATA(insert OID = 958 ( lo_tell PGUID 11 f t f t 1 f 23 "23" 100 0 0 100 lo_tell - )); DESCR("large object position"); -DATA(insert OID = 959 ( on_pl PGUID 11 f t t 2 f 16 "600 628" 100 0 10 100 on_pl - )); +DATA(insert OID = 959 ( on_pl PGUID 11 f t t t 2 f 16 "600 628" 100 0 10 100 on_pl - )); DESCR("point on line?"); -DATA(insert OID = 960 ( on_sl PGUID 11 f t t 2 f 16 "601 628" 100 0 10 100 on_sl - )); +DATA(insert OID = 960 ( on_sl PGUID 11 f t t t 2 f 16 "601 628" 100 0 10 100 on_sl - )); DESCR("lseg on line?"); -DATA(insert OID = 961 ( close_pl PGUID 11 f t t 2 f 600 "600 628" 100 0 10 100 close_pl - )); +DATA(insert OID = 961 ( close_pl PGUID 11 f t t t 2 f 600 "600 628" 100 0 10 100 close_pl - )); DESCR("closest point on line"); -DATA(insert OID = 962 ( close_sl PGUID 11 f t t 2 f 600 "601 628" 100 0 10 100 close_sl - )); +DATA(insert OID = 962 ( close_sl PGUID 11 f t t t 2 f 600 "601 628" 100 0 10 100 close_sl - )); DESCR("closest point to line segment on line"); -DATA(insert OID = 963 ( close_lb PGUID 11 f t t 2 f 600 "628 603" 100 0 10 100 close_lb - )); +DATA(insert OID = 963 ( close_lb PGUID 11 f t t t 2 f 600 "628 603" 100 0 10 100 close_lb - )); DESCR("closest point to line on box"); -DATA(insert OID = 964 ( lo_unlink PGUID 11 f t f 1 f 23 "26" 100 0 0 100 lo_unlink - )); +DATA(insert OID = 964 ( lo_unlink PGUID 11 f t f t 1 f 23 "26" 100 0 0 100 lo_unlink - )); DESCR("large object unlink(delete)"); -DATA(insert OID = 972 ( regproctooid PGUID 11 f t t 1 f 26 "24" 100 0 0 100 regproctooid - )); +DATA(insert OID = 972 ( regproctooid PGUID 11 f t t t 1 f 26 "24" 100 0 0 100 regproctooid - )); DESCR("get oid for regproc"); -DATA(insert OID = 973 ( path_inter PGUID 11 f t t 2 f 16 "602 602" 100 0 10 100 path_inter - )); +DATA(insert OID = 973 ( path_inter PGUID 11 f t t t 2 f 16 "602 602" 100 0 10 100 path_inter - )); DESCR("paths intersect?"); -DATA(insert OID = 975 ( area PGUID 11 f t t 1 f 701 "603" 100 0 0 100 box_area - )); +DATA(insert OID = 975 ( area PGUID 11 f t t t 1 f 701 "603" 100 0 0 100 box_area - )); DESCR("box area"); -DATA(insert OID = 976 ( width PGUID 11 f t t 1 f 701 "603" 100 0 0 100 box_width - )); +DATA(insert OID = 976 ( width PGUID 11 f t t t 1 f 701 "603" 100 0 0 100 box_width - )); DESCR("box width"); -DATA(insert OID = 977 ( height PGUID 11 f t t 1 f 701 "603" 100 0 0 100 box_height - )); +DATA(insert OID = 977 ( height PGUID 11 f t t t 1 f 701 "603" 100 0 0 100 box_height - )); DESCR("box height"); -DATA(insert OID = 978 ( box_distance PGUID 11 f t t 2 f 701 "603 603" 100 0 0 100 box_distance - )); +DATA(insert OID = 978 ( box_distance PGUID 11 f t t t 2 f 701 "603 603" 100 0 0 100 box_distance - )); DESCR("distance between boxes"); -DATA(insert OID = 980 ( box_intersect PGUID 11 f t t 2 f 603 "603 603" 100 0 0 100 box_intersect - )); +DATA(insert OID = 980 ( box_intersect PGUID 11 f t t t 2 f 603 "603 603" 100 0 0 100 box_intersect - )); DESCR("box intersection (another box)"); -DATA(insert OID = 981 ( diagonal PGUID 11 f t t 1 f 601 "603" 100 0 0 100 box_diagonal - )); +DATA(insert OID = 981 ( diagonal PGUID 11 f t t t 1 f 601 "603" 100 0 0 100 box_diagonal - )); DESCR("box diagonal"); -DATA(insert OID = 982 ( path_n_lt PGUID 11 f t t 2 f 16 "602 602" 100 0 0 100 path_n_lt - )); +DATA(insert OID = 982 ( path_n_lt PGUID 11 f t t t 2 f 16 "602 602" 100 0 0 100 path_n_lt - )); DESCR("less-than"); -DATA(insert OID = 983 ( path_n_gt PGUID 11 f t t 2 f 16 "602 602" 100 0 0 100 path_n_gt - )); +DATA(insert OID = 983 ( path_n_gt PGUID 11 f t t t 2 f 16 "602 602" 100 0 0 100 path_n_gt - )); DESCR("greater-than"); -DATA(insert OID = 984 ( path_n_eq PGUID 11 f t t 2 f 16 "602 602" 100 0 0 100 path_n_eq - )); +DATA(insert OID = 984 ( path_n_eq PGUID 11 f t t t 2 f 16 "602 602" 100 0 0 100 path_n_eq - )); DESCR("equal"); -DATA(insert OID = 985 ( path_n_le PGUID 11 f t t 2 f 16 "602 602" 100 0 0 100 path_n_le - )); +DATA(insert OID = 985 ( path_n_le PGUID 11 f t t t 2 f 16 "602 602" 100 0 0 100 path_n_le - )); DESCR("less-than-or-equal"); -DATA(insert OID = 986 ( path_n_ge PGUID 11 f t t 2 f 16 "602 602" 100 0 0 100 path_n_ge - )); +DATA(insert OID = 986 ( path_n_ge PGUID 11 f t t t 2 f 16 "602 602" 100 0 0 100 path_n_ge - )); DESCR("greater-than-or-equal"); -DATA(insert OID = 987 ( path_length PGUID 11 f t t 1 f 701 "602" 100 0 1 0 path_length - )); +DATA(insert OID = 987 ( path_length PGUID 11 f t t t 1 f 701 "602" 100 0 1 0 path_length - )); DESCR("sum of path segments"); -DATA(insert OID = 988 ( point_ne PGUID 11 f t t 2 f 16 "600 600" 100 0 0 100 point_ne - )); +DATA(insert OID = 988 ( point_ne PGUID 11 f t t t 2 f 16 "600 600" 100 0 0 100 point_ne - )); DESCR("not equal"); -DATA(insert OID = 989 ( point_vert PGUID 11 f t t 2 f 16 "600 600" 100 0 0 100 point_vert - )); +DATA(insert OID = 989 ( point_vert PGUID 11 f t t t 2 f 16 "600 600" 100 0 0 100 point_vert - )); DESCR("vertical?"); -DATA(insert OID = 990 ( point_horiz PGUID 11 f t t 2 f 16 "600 600" 100 0 0 100 point_horiz - )); +DATA(insert OID = 990 ( point_horiz PGUID 11 f t t t 2 f 16 "600 600" 100 0 0 100 point_horiz - )); DESCR("horizontal?"); -DATA(insert OID = 991 ( point_distance PGUID 11 f t t 2 f 701 "600 600" 100 0 0 100 point_distance - )); +DATA(insert OID = 991 ( point_distance PGUID 11 f t t t 2 f 701 "600 600" 100 0 0 100 point_distance - )); DESCR("distance between"); -DATA(insert OID = 992 ( slope PGUID 11 f t t 2 f 701 "600 600" 100 0 0 100 point_slope - )); +DATA(insert OID = 992 ( slope PGUID 11 f t t t 2 f 701 "600 600" 100 0 0 100 point_slope - )); DESCR("slope between points"); -DATA(insert OID = 993 ( lseg PGUID 11 f t t 2 f 601 "600 600" 100 0 0 100 lseg_construct - )); +DATA(insert OID = 993 ( lseg PGUID 11 f t t t 2 f 601 "600 600" 100 0 0 100 lseg_construct - )); DESCR("convert points to line segment"); -DATA(insert OID = 994 ( lseg_intersect PGUID 11 f t t 2 f 16 "601 601" 100 0 0 100 lseg_intersect - )); +DATA(insert OID = 994 ( lseg_intersect PGUID 11 f t t t 2 f 16 "601 601" 100 0 0 100 lseg_intersect - )); DESCR("intersects?"); -DATA(insert OID = 995 ( lseg_parallel PGUID 11 f t t 2 f 16 "601 601" 100 0 0 100 lseg_parallel - )); +DATA(insert OID = 995 ( lseg_parallel PGUID 11 f t t t 2 f 16 "601 601" 100 0 0 100 lseg_parallel - )); DESCR("parallel?"); -DATA(insert OID = 996 ( lseg_perp PGUID 11 f t t 2 f 16 "601 601" 100 0 0 100 lseg_perp - )); +DATA(insert OID = 996 ( lseg_perp PGUID 11 f t t t 2 f 16 "601 601" 100 0 0 100 lseg_perp - )); DESCR("perpendicular?"); -DATA(insert OID = 997 ( lseg_vertical PGUID 11 f t t 1 f 16 "601" 100 0 0 100 lseg_vertical - )); +DATA(insert OID = 997 ( lseg_vertical PGUID 11 f t t t 1 f 16 "601" 100 0 0 100 lseg_vertical - )); DESCR("vertical?"); -DATA(insert OID = 998 ( lseg_horizontal PGUID 11 f t t 1 f 16 "601" 100 0 0 100 lseg_horizontal - )); +DATA(insert OID = 998 ( lseg_horizontal PGUID 11 f t t t 1 f 16 "601" 100 0 0 100 lseg_horizontal - )); DESCR("horizontal?"); -DATA(insert OID = 999 ( lseg_eq PGUID 11 f t t 2 f 16 "601 601" 100 0 0 100 lseg_eq - )); +DATA(insert OID = 999 ( lseg_eq PGUID 11 f t t t 2 f 16 "601 601" 100 0 0 100 lseg_eq - )); DESCR("equal"); /* OIDS 1000 - 1999 */ -DATA(insert OID = 1029 ( nullvalue PGUID 11 f t t 1 f 16 "0" 100 0 0 100 nullvalue - )); +DATA(insert OID = 1029 ( nullvalue PGUID 11 f t t f 1 f 16 "0" 100 0 0 100 nullvalue - )); DESCR("(internal)"); -DATA(insert OID = 1030 ( nonnullvalue PGUID 11 f t t 1 f 16 "0" 100 0 0 100 nonnullvalue - )); +DATA(insert OID = 1030 ( nonnullvalue PGUID 11 f t t f 1 f 16 "0" 100 0 0 100 nonnullvalue - )); DESCR("(internal)"); -DATA(insert OID = 1031 ( aclitemin PGUID 11 f t f 1 f 1033 "0" 100 0 0 100 aclitemin - )); +DATA(insert OID = 1031 ( aclitemin PGUID 11 f t f t 1 f 1033 "0" 100 0 0 100 aclitemin - )); DESCR("(internal)"); -DATA(insert OID = 1032 ( aclitemout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 aclitemout - )); +DATA(insert OID = 1032 ( aclitemout PGUID 11 f t f t 1 f 23 "0" 100 0 0 100 aclitemout - )); DESCR("(internal)"); -DATA(insert OID = 1035 ( aclinsert PGUID 11 f t f 2 f 1034 "1034 1033" 100 0 0 100 aclinsert - )); +DATA(insert OID = 1035 ( aclinsert PGUID 11 f t f t 2 f 1034 "1034 1033" 100 0 0 100 aclinsert - )); DESCR("addition"); -DATA(insert OID = 1036 ( aclremove PGUID 11 f t f 2 f 1034 "1034 1033" 100 0 0 100 aclremove - )); +DATA(insert OID = 1036 ( aclremove PGUID 11 f t f t 2 f 1034 "1034 1033" 100 0 0 100 aclremove - )); DESCR("subtract"); -DATA(insert OID = 1037 ( aclcontains PGUID 11 f t f 2 f 16 "1034 1033" 100 0 0 100 aclcontains - )); +DATA(insert OID = 1037 ( aclcontains PGUID 11 f t f t 2 f 16 "1034 1033" 100 0 0 100 aclcontains - )); DESCR("matches regex., case-sensitive"); -DATA(insert OID = 1038 ( seteval PGUID 11 f t f 1 f 23 "26" 100 0 0 100 seteval - )); +DATA(insert OID = 1038 ( seteval PGUID 11 f t f t 1 f 23 "26" 100 0 0 100 seteval - )); DESCR(""); -DATA(insert OID = 1044 ( bpcharin PGUID 11 f t t 3 f 1042 "0 0 23" 100 0 0 100 bpcharin - )); +DATA(insert OID = 1044 ( bpcharin PGUID 11 f t t t 3 f 1042 "0 0 23" 100 0 0 100 bpcharin - )); DESCR("(internal)"); -DATA(insert OID = 1045 ( bpcharout PGUID 11 f t t 1 f 23 "0" 100 0 0 100 bpcharout - )); +DATA(insert OID = 1045 ( bpcharout PGUID 11 f t t t 1 f 23 "0" 100 0 0 100 bpcharout - )); DESCR("(internal)"); -DATA(insert OID = 1046 ( varcharin PGUID 11 f t t 3 f 1043 "0 0 23" 100 0 0 100 varcharin - )); +DATA(insert OID = 1046 ( varcharin PGUID 11 f t t t 3 f 1043 "0 0 23" 100 0 0 100 varcharin - )); DESCR("(internal)"); -DATA(insert OID = 1047 ( varcharout PGUID 11 f t t 1 f 23 "0" 100 0 0 100 varcharout - )); +DATA(insert OID = 1047 ( varcharout PGUID 11 f t t t 1 f 23 "0" 100 0 0 100 varcharout - )); DESCR("(internal)"); -DATA(insert OID = 1048 ( bpchareq PGUID 11 f t t 2 f 16 "1042 1042" 100 0 0 100 bpchareq - )); +DATA(insert OID = 1048 ( bpchareq PGUID 11 f t t t 2 f 16 "1042 1042" 100 0 0 100 bpchareq - )); DESCR("equal"); -DATA(insert OID = 1049 ( bpcharlt PGUID 11 f t t 2 f 16 "1042 1042" 100 0 0 100 bpcharlt - )); +DATA(insert OID = 1049 ( bpcharlt PGUID 11 f t t t 2 f 16 "1042 1042" 100 0 0 100 bpcharlt - )); DESCR("less-than"); -DATA(insert OID = 1050 ( bpcharle PGUID 11 f t t 2 f 16 "1042 1042" 100 0 0 100 bpcharle - )); +DATA(insert OID = 1050 ( bpcharle PGUID 11 f t t t 2 f 16 "1042 1042" 100 0 0 100 bpcharle - )); DESCR("less-than-or-equal"); -DATA(insert OID = 1051 ( bpchargt PGUID 11 f t t 2 f 16 "1042 1042" 100 0 0 100 bpchargt - )); +DATA(insert OID = 1051 ( bpchargt PGUID 11 f t t t 2 f 16 "1042 1042" 100 0 0 100 bpchargt - )); DESCR("greater-than"); -DATA(insert OID = 1052 ( bpcharge PGUID 11 f t t 2 f 16 "1042 1042" 100 0 0 100 bpcharge - )); +DATA(insert OID = 1052 ( bpcharge PGUID 11 f t t t 2 f 16 "1042 1042" 100 0 0 100 bpcharge - )); DESCR("greater-than-or-equal"); -DATA(insert OID = 1053 ( bpcharne PGUID 11 f t t 2 f 16 "1042 1042" 100 0 0 100 bpcharne - )); +DATA(insert OID = 1053 ( bpcharne PGUID 11 f t t t 2 f 16 "1042 1042" 100 0 0 100 bpcharne - )); DESCR("not equal"); -DATA(insert OID = 1070 ( varchareq PGUID 11 f t t 2 f 16 "1043 1043" 100 0 0 100 varchareq - )); +DATA(insert OID = 1070 ( varchareq PGUID 11 f t t t 2 f 16 "1043 1043" 100 0 0 100 varchareq - )); DESCR("equal"); -DATA(insert OID = 1071 ( varcharlt PGUID 11 f t t 2 f 16 "1043 1043" 100 0 0 100 varcharlt - )); +DATA(insert OID = 1071 ( varcharlt PGUID 11 f t t t 2 f 16 "1043 1043" 100 0 0 100 varcharlt - )); DESCR("less-than"); -DATA(insert OID = 1072 ( varcharle PGUID 11 f t t 2 f 16 "1043 1043" 100 0 0 100 varcharle - )); +DATA(insert OID = 1072 ( varcharle PGUID 11 f t t t 2 f 16 "1043 1043" 100 0 0 100 varcharle - )); DESCR("less-than-or-equal"); -DATA(insert OID = 1073 ( varchargt PGUID 11 f t t 2 f 16 "1043 1043" 100 0 0 100 varchargt - )); +DATA(insert OID = 1073 ( varchargt PGUID 11 f t t t 2 f 16 "1043 1043" 100 0 0 100 varchargt - )); DESCR("greater-than"); -DATA(insert OID = 1074 ( varcharge PGUID 11 f t t 2 f 16 "1043 1043" 100 0 0 100 varcharge - )); +DATA(insert OID = 1074 ( varcharge PGUID 11 f t t t 2 f 16 "1043 1043" 100 0 0 100 varcharge - )); DESCR("greater-than-or-equal"); -DATA(insert OID = 1075 ( varcharne PGUID 11 f t t 2 f 16 "1043 1043" 100 0 0 100 varcharne - )); +DATA(insert OID = 1075 ( varcharne PGUID 11 f t t t 2 f 16 "1043 1043" 100 0 0 100 varcharne - )); DESCR("not equal"); -DATA(insert OID = 1078 ( bpcharcmp PGUID 11 f t t 2 f 23 "1042 1042" 100 0 0 100 bpcharcmp - )); +DATA(insert OID = 1078 ( bpcharcmp PGUID 11 f t t t 2 f 23 "1042 1042" 100 0 0 100 bpcharcmp - )); DESCR("less-equal-greater"); -DATA(insert OID = 1079 ( varcharcmp PGUID 11 f t t 2 f 23 "1043 1043" 100 0 0 100 varcharcmp - )); +DATA(insert OID = 1079 ( varcharcmp PGUID 11 f t t t 2 f 23 "1043 1043" 100 0 0 100 varcharcmp - )); DESCR("less-equal-greater"); -DATA(insert OID = 1080 ( hashbpchar PGUID 11 f t t 1 f 23 "1042" 100 0 0 100 hashbpchar - )); +DATA(insert OID = 1080 ( hashbpchar PGUID 11 f t t t 1 f 23 "1042" 100 0 0 100 hashbpchar - )); DESCR("hash"); -DATA(insert OID = 1081 ( hashvarchar PGUID 11 f t t 1 f 23 "1043" 100 0 0 100 hashvarchar - )); +DATA(insert OID = 1081 ( hashvarchar PGUID 11 f t t t 1 f 23 "1043" 100 0 0 100 hashvarchar - )); DESCR("hash"); -DATA(insert OID = 1084 ( date_in PGUID 11 f t f 1 f 1082 "0" 100 0 0 100 date_in - )); +DATA(insert OID = 1084 ( date_in PGUID 11 f t f t 1 f 1082 "0" 100 0 0 100 date_in - )); DESCR("(internal)"); -DATA(insert OID = 1085 ( date_out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 date_out - )); +DATA(insert OID = 1085 ( date_out PGUID 11 f t f t 1 f 23 "0" 100 0 0 100 date_out - )); DESCR("(internal)"); -DATA(insert OID = 1086 ( date_eq PGUID 11 f t t 2 f 16 "1082 1082" 100 0 0 100 date_eq - )); +DATA(insert OID = 1086 ( date_eq PGUID 11 f t t t 2 f 16 "1082 1082" 100 0 0 100 date_eq - )); DESCR("equal"); -DATA(insert OID = 1087 ( date_lt PGUID 11 f t t 2 f 16 "1082 1082" 100 0 0 100 date_lt - )); +DATA(insert OID = 1087 ( date_lt PGUID 11 f t t t 2 f 16 "1082 1082" 100 0 0 100 date_lt - )); DESCR("less-than"); -DATA(insert OID = 1088 ( date_le PGUID 11 f t t 2 f 16 "1082 1082" 100 0 0 100 date_le - )); +DATA(insert OID = 1088 ( date_le PGUID 11 f t t t 2 f 16 "1082 1082" 100 0 0 100 date_le - )); DESCR("less-than-or-equal"); -DATA(insert OID = 1089 ( date_gt PGUID 11 f t t 2 f 16 "1082 1082" 100 0 0 100 date_gt - )); +DATA(insert OID = 1089 ( date_gt PGUID 11 f t t t 2 f 16 "1082 1082" 100 0 0 100 date_gt - )); DESCR("greater-than"); -DATA(insert OID = 1090 ( date_ge PGUID 11 f t t 2 f 16 "1082 1082" 100 0 0 100 date_ge - )); +DATA(insert OID = 1090 ( date_ge PGUID 11 f t t t 2 f 16 "1082 1082" 100 0 0 100 date_ge - )); DESCR("greater-than-or-equal"); -DATA(insert OID = 1091 ( date_ne PGUID 11 f t t 2 f 16 "1082 1082" 100 0 0 100 date_ne - )); +DATA(insert OID = 1091 ( date_ne PGUID 11 f t t t 2 f 16 "1082 1082" 100 0 0 100 date_ne - )); DESCR("not equal"); -DATA(insert OID = 1092 ( date_cmp PGUID 11 f t t 2 f 23 "1082 1082" 100 0 0 100 date_cmp - )); +DATA(insert OID = 1092 ( date_cmp PGUID 11 f t t t 2 f 23 "1082 1082" 100 0 0 100 date_cmp - )); DESCR("less-equal-greater"); /* OIDS 1100 - 1199 */ -DATA(insert OID = 1102 ( time_lt PGUID 11 f t t 2 f 16 "1083 1083" 100 0 0 100 time_lt - )); +DATA(insert OID = 1102 ( time_lt PGUID 11 f t t t 2 f 16 "1083 1083" 100 0 0 100 time_lt - )); DESCR("less-than"); -DATA(insert OID = 1103 ( time_le PGUID 11 f t t 2 f 16 "1083 1083" 100 0 0 100 time_le - )); +DATA(insert OID = 1103 ( time_le PGUID 11 f t t t 2 f 16 "1083 1083" 100 0 0 100 time_le - )); DESCR("less-than-or-equal"); -DATA(insert OID = 1104 ( time_gt PGUID 11 f t t 2 f 16 "1083 1083" 100 0 0 100 time_gt - )); +DATA(insert OID = 1104 ( time_gt PGUID 11 f t t t 2 f 16 "1083 1083" 100 0 0 100 time_gt - )); DESCR("greater-than"); -DATA(insert OID = 1105 ( time_ge PGUID 11 f t t 2 f 16 "1083 1083" 100 0 0 100 time_ge - )); +DATA(insert OID = 1105 ( time_ge PGUID 11 f t t t 2 f 16 "1083 1083" 100 0 0 100 time_ge - )); DESCR("greater-than-or-equal"); -DATA(insert OID = 1106 ( time_ne PGUID 11 f t t 2 f 16 "1083 1083" 100 0 0 100 time_ne - )); +DATA(insert OID = 1106 ( time_ne PGUID 11 f t t t 2 f 16 "1083 1083" 100 0 0 100 time_ne - )); DESCR("not equal"); -DATA(insert OID = 1107 ( time_cmp PGUID 11 f t t 2 f 23 "1083 1083" 100 0 0 100 time_cmp - )); +DATA(insert OID = 1107 ( time_cmp PGUID 11 f t t t 2 f 23 "1083 1083" 100 0 0 100 time_cmp - )); DESCR("less-equal-greater"); -DATA(insert OID = 1138 ( date_larger PGUID 11 f t t 2 f 1082 "1082 1082" 100 0 0 100 date_larger - )); +DATA(insert OID = 1138 ( date_larger PGUID 11 f t t t 2 f 1082 "1082 1082" 100 0 0 100 date_larger - )); DESCR("larger of two"); -DATA(insert OID = 1139 ( date_smaller PGUID 11 f t t 2 f 1082 "1082 1082" 100 0 0 100 date_smaller - )); +DATA(insert OID = 1139 ( date_smaller PGUID 11 f t t t 2 f 1082 "1082 1082" 100 0 0 100 date_smaller - )); DESCR("smaller of two"); -DATA(insert OID = 1140 ( date_mi PGUID 11 f t t 2 f 23 "1082 1082" 100 0 0 100 date_mi - )); +DATA(insert OID = 1140 ( date_mi PGUID 11 f t t t 2 f 23 "1082 1082" 100 0 0 100 date_mi - )); DESCR("subtract"); -DATA(insert OID = 1141 ( date_pli PGUID 11 f t t 2 f 1082 "1082 23" 100 0 0 100 date_pli - )); +DATA(insert OID = 1141 ( date_pli PGUID 11 f t t t 2 f 1082 "1082 23" 100 0 0 100 date_pli - )); DESCR("addition"); -DATA(insert OID = 1142 ( date_mii PGUID 11 f t t 2 f 1082 "1082 23" 100 0 0 100 date_mii - )); +DATA(insert OID = 1142 ( date_mii PGUID 11 f t t t 2 f 1082 "1082 23" 100 0 0 100 date_mii - )); DESCR("subtract"); -DATA(insert OID = 1143 ( time_in PGUID 11 f t f 1 f 1083 "0" 100 0 0 100 time_in - )); +DATA(insert OID = 1143 ( time_in PGUID 11 f t f t 1 f 1083 "0" 100 0 0 100 time_in - )); DESCR("(internal)"); -DATA(insert OID = 1144 ( time_out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 time_out - )); +DATA(insert OID = 1144 ( time_out PGUID 11 f t f t 1 f 23 "0" 100 0 0 100 time_out - )); DESCR("(internal)"); -DATA(insert OID = 1145 ( time_eq PGUID 11 f t t 2 f 16 "1083 1083" 100 0 0 100 time_eq - )); +DATA(insert OID = 1145 ( time_eq PGUID 11 f t t t 2 f 16 "1083 1083" 100 0 0 100 time_eq - )); DESCR("equal"); -DATA(insert OID = 1146 ( circle_add_pt PGUID 11 f t t 2 f 718 "718 600" 100 0 0 100 circle_add_pt - )); +DATA(insert OID = 1146 ( circle_add_pt PGUID 11 f t t t 2 f 718 "718 600" 100 0 0 100 circle_add_pt - )); DESCR("addition"); -DATA(insert OID = 1147 ( circle_sub_pt PGUID 11 f t t 2 f 718 "718 600" 100 0 0 100 circle_sub_pt - )); +DATA(insert OID = 1147 ( circle_sub_pt PGUID 11 f t t t 2 f 718 "718 600" 100 0 0 100 circle_sub_pt - )); DESCR("subtract"); -DATA(insert OID = 1148 ( circle_mul_pt PGUID 11 f t t 2 f 718 "718 600" 100 0 0 100 circle_mul_pt - )); +DATA(insert OID = 1148 ( circle_mul_pt PGUID 11 f t t t 2 f 718 "718 600" 100 0 0 100 circle_mul_pt - )); DESCR("multiply"); -DATA(insert OID = 1149 ( circle_div_pt PGUID 11 f t t 2 f 718 "718 600" 100 0 0 100 circle_div_pt - )); +DATA(insert OID = 1149 ( circle_div_pt PGUID 11 f t t t 2 f 718 "718 600" 100 0 0 100 circle_div_pt - )); DESCR("divide"); -DATA(insert OID = 1150 ( timestamp_in PGUID 11 f t f 1 f 1184 "0" 100 0 0 100 timestamp_in - )); +DATA(insert OID = 1150 ( timestamp_in PGUID 11 f t f t 1 f 1184 "0" 100 0 0 100 timestamp_in - )); DESCR("(internal)"); -DATA(insert OID = 1151 ( timestamp_out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 timestamp_out - )); +DATA(insert OID = 1151 ( timestamp_out PGUID 11 f t f t 1 f 23 "0" 100 0 0 100 timestamp_out - )); DESCR("(internal)"); -DATA(insert OID = 1152 ( timestamp_eq PGUID 11 f t f 2 f 16 "1184 1184" 100 0 0 100 timestamp_eq - )); +DATA(insert OID = 1152 ( timestamp_eq PGUID 11 f t f t 2 f 16 "1184 1184" 100 0 0 100 timestamp_eq - )); DESCR("equal"); -DATA(insert OID = 1153 ( timestamp_ne PGUID 11 f t f 2 f 16 "1184 1184" 100 0 0 100 timestamp_ne - )); +DATA(insert OID = 1153 ( timestamp_ne PGUID 11 f t f t 2 f 16 "1184 1184" 100 0 0 100 timestamp_ne - )); DESCR("not equal"); -DATA(insert OID = 1154 ( timestamp_lt PGUID 11 f t f 2 f 16 "1184 1184" 100 0 0 100 timestamp_lt - )); +DATA(insert OID = 1154 ( timestamp_lt PGUID 11 f t f t 2 f 16 "1184 1184" 100 0 0 100 timestamp_lt - )); DESCR("less-than"); -DATA(insert OID = 1155 ( timestamp_le PGUID 11 f t f 2 f 16 "1184 1184" 100 0 0 100 timestamp_le - )); +DATA(insert OID = 1155 ( timestamp_le PGUID 11 f t f t 2 f 16 "1184 1184" 100 0 0 100 timestamp_le - )); DESCR("less-than-or-equal"); -DATA(insert OID = 1156 ( timestamp_ge PGUID 11 f t f 2 f 16 "1184 1184" 100 0 0 100 timestamp_ge - )); +DATA(insert OID = 1156 ( timestamp_ge PGUID 11 f t f t 2 f 16 "1184 1184" 100 0 0 100 timestamp_ge - )); DESCR("greater-than-or-equal"); -DATA(insert OID = 1157 ( timestamp_gt PGUID 11 f t f 2 f 16 "1184 1184" 100 0 0 100 timestamp_gt - )); +DATA(insert OID = 1157 ( timestamp_gt PGUID 11 f t f t 2 f 16 "1184 1184" 100 0 0 100 timestamp_gt - )); DESCR("greater-than"); -DATA(insert OID = 1159 ( timezone PGUID 11 f t f 2 f 25 "25 1184" 100 0 0 100 timestamp_zone - )); +DATA(insert OID = 1159 ( timezone PGUID 11 f t f t 2 f 25 "25 1184" 100 0 0 100 timestamp_zone - )); DESCR("time zone"); -DATA(insert OID = 1160 ( interval_in PGUID 11 f t f 1 f 1186 "0" 100 0 0 100 interval_in - )); +DATA(insert OID = 1160 ( interval_in PGUID 11 f t f t 1 f 1186 "0" 100 0 0 100 interval_in - )); DESCR("(internal)"); -DATA(insert OID = 1161 ( interval_out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 interval_out - )); +DATA(insert OID = 1161 ( interval_out PGUID 11 f t f t 1 f 23 "0" 100 0 0 100 interval_out - )); DESCR("(internal)"); -DATA(insert OID = 1162 ( interval_eq PGUID 11 f t f 2 f 16 "1186 1186" 100 0 0 100 interval_eq - )); +DATA(insert OID = 1162 ( interval_eq PGUID 11 f t f t 2 f 16 "1186 1186" 100 0 0 100 interval_eq - )); DESCR("equal"); -DATA(insert OID = 1163 ( interval_ne PGUID 11 f t f 2 f 16 "1186 1186" 100 0 0 100 interval_ne - )); +DATA(insert OID = 1163 ( interval_ne PGUID 11 f t f t 2 f 16 "1186 1186" 100 0 0 100 interval_ne - )); DESCR("not equal"); -DATA(insert OID = 1164 ( interval_lt PGUID 11 f t f 2 f 16 "1186 1186" 100 0 0 100 interval_lt - )); +DATA(insert OID = 1164 ( interval_lt PGUID 11 f t f t 2 f 16 "1186 1186" 100 0 0 100 interval_lt - )); DESCR("less-than"); -DATA(insert OID = 1165 ( interval_le PGUID 11 f t f 2 f 16 "1186 1186" 100 0 0 100 interval_le - )); +DATA(insert OID = 1165 ( interval_le PGUID 11 f t f t 2 f 16 "1186 1186" 100 0 0 100 interval_le - )); DESCR("less-than-or-equal"); -DATA(insert OID = 1166 ( interval_ge PGUID 11 f t f 2 f 16 "1186 1186" 100 0 0 100 interval_ge - )); +DATA(insert OID = 1166 ( interval_ge PGUID 11 f t f t 2 f 16 "1186 1186" 100 0 0 100 interval_ge - )); DESCR("greater-than-or-equal"); -DATA(insert OID = 1167 ( interval_gt PGUID 11 f t f 2 f 16 "1186 1186" 100 0 0 100 interval_gt - )); +DATA(insert OID = 1167 ( interval_gt PGUID 11 f t f t 2 f 16 "1186 1186" 100 0 0 100 interval_gt - )); DESCR("greater-than"); -DATA(insert OID = 1168 ( interval_um PGUID 11 f t f 1 f 1186 "1186" 100 0 0 100 interval_um - )); +DATA(insert OID = 1168 ( interval_um PGUID 11 f t f t 1 f 1186 "1186" 100 0 0 100 interval_um - )); DESCR("subtract"); -DATA(insert OID = 1169 ( interval_pl PGUID 11 f t f 2 f 1186 "1186 1186" 100 0 0 100 interval_pl - )); +DATA(insert OID = 1169 ( interval_pl PGUID 11 f t f t 2 f 1186 "1186 1186" 100 0 0 100 interval_pl - )); DESCR("addition"); -DATA(insert OID = 1170 ( interval_mi PGUID 11 f t f 2 f 1186 "1186 1186" 100 0 0 100 interval_mi - )); +DATA(insert OID = 1170 ( interval_mi PGUID 11 f t f t 2 f 1186 "1186 1186" 100 0 0 100 interval_mi - )); DESCR("subtract"); -DATA(insert OID = 1171 ( date_part PGUID 11 f t f 2 f 701 "25 1184" 100 0 0 100 timestamp_part - )); +DATA(insert OID = 1171 ( date_part PGUID 11 f t f t 2 f 701 "25 1184" 100 0 0 100 timestamp_part - )); DESCR("extract field from timestamp"); -DATA(insert OID = 1172 ( date_part PGUID 11 f t f 2 f 701 "25 1186" 100 0 0 100 interval_part - )); +DATA(insert OID = 1172 ( date_part PGUID 11 f t f t 2 f 701 "25 1186" 100 0 0 100 interval_part - )); DESCR("extract field from interval"); -DATA(insert OID = 1173 ( timestamp PGUID 11 f t f 1 f 1184 "702" 100 0 0 100 abstime_timestamp - )); +DATA(insert OID = 1173 ( timestamp PGUID 11 f t f t 1 f 1184 "702" 100 0 0 100 abstime_timestamp - )); DESCR("convert abstime to timestamp"); -DATA(insert OID = 1174 ( timestamp PGUID 11 f t f 1 f 1184 "1082" 100 0 0 100 date_timestamp - )); +DATA(insert OID = 1174 ( timestamp PGUID 11 f t f t 1 f 1184 "1082" 100 0 0 100 date_timestamp - )); DESCR("convert date to timestamp"); -DATA(insert OID = 1176 ( timestamp PGUID 11 f t f 2 f 1184 "1082 1083" 100 0 0 100 datetime_timestamp - )); +DATA(insert OID = 1176 ( timestamp PGUID 11 f t f t 2 f 1184 "1082 1083" 100 0 0 100 datetime_timestamp - )); DESCR("convert date and time to timestamp"); -DATA(insert OID = 1177 ( interval PGUID 11 f t f 1 f 1186 "703" 100 0 0 100 reltime_interval - )); +DATA(insert OID = 1177 ( interval PGUID 11 f t f t 1 f 1186 "703" 100 0 0 100 reltime_interval - )); DESCR("convert reltime to interval"); -DATA(insert OID = 1178 ( date PGUID 11 f t f 1 f 1082 "1184" 100 0 0 100 timestamp_date - )); +DATA(insert OID = 1178 ( date PGUID 11 f t f t 1 f 1082 "1184" 100 0 0 100 timestamp_date - )); DESCR("convert timestamp to date"); -DATA(insert OID = 1179 ( date PGUID 11 f t f 1 f 1082 "702" 100 0 0 100 abstime_date - )); +DATA(insert OID = 1179 ( date PGUID 11 f t f t 1 f 1082 "702" 100 0 0 100 abstime_date - )); DESCR("convert abstime to date"); -DATA(insert OID = 1180 ( abstime PGUID 11 f t f 1 f 702 "1184" 100 0 0 100 timestamp_abstime - )); +DATA(insert OID = 1180 ( abstime PGUID 11 f t f t 1 f 702 "1184" 100 0 0 100 timestamp_abstime - )); DESCR("convert timestamp to abstime"); -DATA(insert OID = 1188 ( timestamp_mi PGUID 11 f t f 2 f 1186 "1184 1184" 100 0 0 100 timestamp_mi - )); +DATA(insert OID = 1188 ( timestamp_mi PGUID 11 f t f t 2 f 1186 "1184 1184" 100 0 0 100 timestamp_mi - )); DESCR("subtract"); -DATA(insert OID = 1189 ( timestamp_pl_span PGUID 11 f t f 2 f 1184 "1184 1186" 100 0 0 100 timestamp_pl_span - )); +DATA(insert OID = 1189 ( timestamp_pl_span PGUID 11 f t f t 2 f 1184 "1184 1186" 100 0 0 100 timestamp_pl_span - )); DESCR("plus"); -DATA(insert OID = 1190 ( timestamp_mi_span PGUID 11 f t f 2 f 1184 "1184 1186" 100 0 0 100 timestamp_mi_span - )); +DATA(insert OID = 1190 ( timestamp_mi_span PGUID 11 f t f t 2 f 1184 "1184 1186" 100 0 0 100 timestamp_mi_span - )); DESCR("minus"); -DATA(insert OID = 1191 ( timestamp PGUID 11 f t f 1 f 1184 "25" 100 0 0 100 text_timestamp - )); +DATA(insert OID = 1191 ( timestamp PGUID 11 f t f t 1 f 1184 "25" 100 0 0 100 text_timestamp - )); DESCR("convert text to timestamp"); -DATA(insert OID = 1192 ( text PGUID 11 f t f 1 f 25 "1184" 100 0 0 100 timestamp_text - )); +DATA(insert OID = 1192 ( text PGUID 11 f t f t 1 f 25 "1184" 100 0 0 100 timestamp_text - )); DESCR("convert timestamp to text"); -DATA(insert OID = 1193 ( text PGUID 11 f t f 1 f 25 "1186" 100 0 0 100 interval_text - )); +DATA(insert OID = 1193 ( text PGUID 11 f t f t 1 f 25 "1186" 100 0 0 100 interval_text - )); DESCR("convert interval to text"); -DATA(insert OID = 1194 ( reltime PGUID 11 f t f 1 f 703 "1186" 100 0 0 100 interval_reltime - )); +DATA(insert OID = 1194 ( reltime PGUID 11 f t f t 1 f 703 "1186" 100 0 0 100 interval_reltime - )); DESCR("convert interval to reltime"); -DATA(insert OID = 1195 ( timestamp_smaller PGUID 11 f t f 2 f 1184 "1184 1184" 100 0 0 100 timestamp_smaller - )); +DATA(insert OID = 1195 ( timestamp_smaller PGUID 11 f t f t 2 f 1184 "1184 1184" 100 0 0 100 timestamp_smaller - )); DESCR("smaller of two"); -DATA(insert OID = 1196 ( timestamp_larger PGUID 11 f t f 2 f 1184 "1184 1184" 100 0 0 100 timestamp_larger - )); +DATA(insert OID = 1196 ( timestamp_larger PGUID 11 f t f t 2 f 1184 "1184 1184" 100 0 0 100 timestamp_larger - )); DESCR("larger of two"); -DATA(insert OID = 1197 ( interval_smaller PGUID 11 f t f 2 f 1186 "1186 1186" 100 0 0 100 interval_smaller - )); +DATA(insert OID = 1197 ( interval_smaller PGUID 11 f t f t 2 f 1186 "1186 1186" 100 0 0 100 interval_smaller - )); DESCR("smaller of two"); -DATA(insert OID = 1198 ( interval_larger PGUID 11 f t f 2 f 1186 "1186 1186" 100 0 0 100 interval_larger - )); +DATA(insert OID = 1198 ( interval_larger PGUID 11 f t f t 2 f 1186 "1186 1186" 100 0 0 100 interval_larger - )); DESCR("larger of two"); -DATA(insert OID = 1199 ( age PGUID 11 f t f 2 f 1186 "1184 1184" 100 0 0 100 timestamp_age - )); +DATA(insert OID = 1199 ( age PGUID 11 f t f t 2 f 1186 "1184 1184" 100 0 0 100 timestamp_age - )); DESCR("date difference preserving months and years"); /* OIDS 1200 - 1299 */ -DATA(insert OID = 1200 ( reltime PGUID 11 f t t 1 f 703 "23" 100 0 0 100 int4reltime - )); +DATA(insert OID = 1200 ( reltime PGUID 11 f t t t 1 f 703 "23" 100 0 0 100 int4reltime - )); DESCR("convert int4 to reltime"); -DATA(insert OID = 1217 ( date_trunc PGUID 11 f t f 2 f 1184 "25 1184" 100 0 0 100 timestamp_trunc - )); +DATA(insert OID = 1217 ( date_trunc PGUID 11 f t f t 2 f 1184 "25 1184" 100 0 0 100 timestamp_trunc - )); DESCR("truncate timestamp to specified units"); -DATA(insert OID = 1218 ( date_trunc PGUID 11 f t f 2 f 1186 "25 1186" 100 0 0 100 interval_trunc - )); +DATA(insert OID = 1218 ( date_trunc PGUID 11 f t f t 2 f 1186 "25 1186" 100 0 0 100 interval_trunc - )); DESCR("truncate interval to specified units"); -DATA(insert OID = 1230 ( int8abs PGUID 11 f t t 1 f 20 "20" 100 0 0 100 int8abs - )); +DATA(insert OID = 1230 ( int8abs PGUID 11 f t t t 1 f 20 "20" 100 0 0 100 int8abs - )); DESCR("absolute value"); -DATA(insert OID = 1236 ( int8larger PGUID 11 f t t 2 f 20 "20 20" 100 0 0 100 int8larger - )); +DATA(insert OID = 1236 ( int8larger PGUID 11 f t t t 2 f 20 "20 20" 100 0 0 100 int8larger - )); DESCR("larger of two"); -DATA(insert OID = 1237 ( int8smaller PGUID 11 f t t 2 f 20 "20 20" 100 0 0 100 int8smaller - )); +DATA(insert OID = 1237 ( int8smaller PGUID 11 f t t t 2 f 20 "20 20" 100 0 0 100 int8smaller - )); DESCR("smaller of two"); -DATA(insert OID = 1238 ( texticregexeq PGUID 11 f t t 2 f 16 "25 25" 100 0 1 0 texticregexeq - )); +DATA(insert OID = 1238 ( texticregexeq PGUID 11 f t t t 2 f 16 "25 25" 100 0 1 0 texticregexeq - )); DESCR("matches regex., case-insensitive"); -DATA(insert OID = 1239 ( texticregexne PGUID 11 f t t 2 f 16 "25 25" 100 0 1 0 texticregexne - )); +DATA(insert OID = 1239 ( texticregexne PGUID 11 f t t t 2 f 16 "25 25" 100 0 1 0 texticregexne - )); DESCR("does not match regex., case-insensitive"); -DATA(insert OID = 1240 ( nameicregexeq PGUID 11 f t t 2 f 16 "19 25" 100 0 0 100 nameicregexeq - )); +DATA(insert OID = 1240 ( nameicregexeq PGUID 11 f t t t 2 f 16 "19 25" 100 0 0 100 nameicregexeq - )); DESCR("matches regex., case-insensitive"); -DATA(insert OID = 1241 ( nameicregexne PGUID 11 f t t 2 f 16 "19 25" 100 0 0 100 nameicregexne - )); +DATA(insert OID = 1241 ( nameicregexne PGUID 11 f t t t 2 f 16 "19 25" 100 0 0 100 nameicregexne - )); DESCR("does not match regex., case-insensitive"); -DATA(insert OID = 1251 ( int4abs PGUID 11 f t t 1 f 23 "23" 100 0 0 100 int4abs - )); +DATA(insert OID = 1251 ( int4abs PGUID 11 f t t t 1 f 23 "23" 100 0 0 100 int4abs - )); DESCR("absolute value"); -DATA(insert OID = 1253 ( int2abs PGUID 11 f t t 1 f 21 "21" 100 0 0 100 int2abs - )); +DATA(insert OID = 1253 ( int2abs PGUID 11 f t t t 1 f 21 "21" 100 0 0 100 int2abs - )); DESCR("absolute value"); -DATA(insert OID = 1263 ( interval PGUID 11 f t f 1 f 1186 "25" 100 0 0 100 text_interval - )); +DATA(insert OID = 1263 ( interval PGUID 11 f t f t 1 f 1186 "25" 100 0 0 100 text_interval - )); DESCR("convert text to interval"); -DATA(insert OID = 1271 ( overlaps PGUID 11 f t t 4 f 16 "1266 1266 1266 1266" 100 0 1 0 overlaps_timetz - )); +DATA(insert OID = 1271 ( overlaps PGUID 11 f t t t 4 f 16 "1266 1266 1266 1266" 100 0 1 0 overlaps_timetz - )); DESCR("SQL92 interval comparison"); -DATA(insert OID = 1272 ( datetime_pl PGUID 11 f t f 2 f 1184 "1082 1083" 100 0 0 100 datetime_timestamp - )); +DATA(insert OID = 1272 ( datetime_pl PGUID 11 f t f t 2 f 1184 "1082 1083" 100 0 0 100 datetime_timestamp - )); DESCR("convert date and time to timestamp"); -DATA(insert OID = 1274 ( int84pl PGUID 11 f t t 2 f 20 "20 23" 100 0 0 100 int84pl - )); +DATA(insert OID = 1274 ( int84pl PGUID 11 f t t t 2 f 20 "20 23" 100 0 0 100 int84pl - )); DESCR("addition"); -DATA(insert OID = 1275 ( int84mi PGUID 11 f t t 2 f 20 "20 23" 100 0 0 100 int84mi - )); +DATA(insert OID = 1275 ( int84mi PGUID 11 f t t t 2 f 20 "20 23" 100 0 0 100 int84mi - )); DESCR("subtraction"); -DATA(insert OID = 1276 ( int84mul PGUID 11 f t t 2 f 20 "20 23" 100 0 0 100 int84mul - )); +DATA(insert OID = 1276 ( int84mul PGUID 11 f t t t 2 f 20 "20 23" 100 0 0 100 int84mul - )); DESCR("multiply"); -DATA(insert OID = 1277 ( int84div PGUID 11 f t t 2 f 20 "20 23" 100 0 0 100 int84div - )); +DATA(insert OID = 1277 ( int84div PGUID 11 f t t t 2 f 20 "20 23" 100 0 0 100 int84div - )); DESCR("divide"); -DATA(insert OID = 1278 ( int48pl PGUID 11 f t t 2 f 20 "23 20" 100 0 0 100 int48pl - )); +DATA(insert OID = 1278 ( int48pl PGUID 11 f t t t 2 f 20 "23 20" 100 0 0 100 int48pl - )); DESCR("addition"); -DATA(insert OID = 1279 ( int48mi PGUID 11 f t t 2 f 20 "23 20" 100 0 0 100 int48mi - )); +DATA(insert OID = 1279 ( int48mi PGUID 11 f t t t 2 f 20 "23 20" 100 0 0 100 int48mi - )); DESCR("subtraction"); -DATA(insert OID = 1280 ( int48mul PGUID 11 f t t 2 f 20 "23 20" 100 0 0 100 int48mul - )); +DATA(insert OID = 1280 ( int48mul PGUID 11 f t t t 2 f 20 "23 20" 100 0 0 100 int48mul - )); DESCR("multiply"); -DATA(insert OID = 1281 ( int48div PGUID 11 f t t 2 f 20 "23 20" 100 0 0 100 int48div - )); +DATA(insert OID = 1281 ( int48div PGUID 11 f t t t 2 f 20 "23 20" 100 0 0 100 int48div - )); DESCR("divide"); -DATA(insert OID = 1288 ( text PGUID 11 f t t 1 f 25 "20" 100 0 0 100 int8_text - )); +DATA(insert OID = 1288 ( text PGUID 11 f t t t 1 f 25 "20" 100 0 0 100 int8_text - )); DESCR("convert int8 to text"); -DATA(insert OID = 1289 ( int8 PGUID 11 f t t 1 f 20 "25" 100 0 0 100 text_int8 - )); +DATA(insert OID = 1289 ( int8 PGUID 11 f t t t 1 f 20 "25" 100 0 0 100 text_int8 - )); DESCR("convert text to int8"); -DATA(insert OID = 1290 ( _bpchar PGUID 11 f t t 2 f 1014 "1014 23" 100 0 0 100 _bpchar - )); +DATA(insert OID = 1290 ( _bpchar PGUID 11 f t t t 2 f 1014 "1014 23" 100 0 0 100 _bpchar - )); DESCR("truncate _char()"); -DATA(insert OID = 1291 ( _varchar PGUID 11 f t t 2 f 1015 "1015 23" 100 0 0 100 _varchar - )); +DATA(insert OID = 1291 ( _varchar PGUID 11 f t t t 2 f 1015 "1015 23" 100 0 0 100 _varchar - )); DESCR("truncate _varchar()"); -DATA(insert OID = 1292 ( tideq PGUID 11 f t f 2 f 16 "27 27" 100 0 0 100 tideq - )); +DATA(insert OID = 1292 ( tideq PGUID 11 f t f t 2 f 16 "27 27" 100 0 0 100 tideq - )); DESCR("equal"); -DATA(insert OID = 1293 ( currtid PGUID 11 f t f 2 f 27 "26 27" 100 0 0 100 currtid_byreloid - )); +DATA(insert OID = 1293 ( currtid PGUID 11 f t f t 2 f 27 "26 27" 100 0 0 100 currtid_byreloid - )); DESCR("latest tid of a tuple"); -DATA(insert OID = 1294 ( currtid2 PGUID 11 f t f 2 f 27 "25 27" 100 0 0 100 currtid_byrelname - )); +DATA(insert OID = 1294 ( currtid2 PGUID 11 f t f t 2 f 27 "25 27" 100 0 0 100 currtid_byrelname - )); DESCR("latest tid of a tuple"); -DATA(insert OID = 1296 ( timedate_pl PGUID 14 f t f 2 f 1184 "1083 1082" 100 0 0 100 "select datetime_pl($2, $1)" - )); +DATA(insert OID = 1296 ( timedate_pl PGUID 14 f t f t 2 f 1184 "1083 1082" 100 0 0 100 "select datetime_pl($2, $1)" - )); DESCR("convert time and date to timestamp"); -DATA(insert OID = 1297 ( datetimetz_pl PGUID 11 f t f 2 f 1184 "1082 1266" 100 0 0 100 datetimetz_timestamp - )); +DATA(insert OID = 1297 ( datetimetz_pl PGUID 11 f t f t 2 f 1184 "1082 1266" 100 0 0 100 datetimetz_timestamp - )); DESCR("convert date and time with time zone to timestamp"); -DATA(insert OID = 1298 ( timetzdate_pl PGUID 14 f t f 2 f 1184 "1266 1082" 100 0 0 100 "select datetimetz_pl($2, $1)" - )); +DATA(insert OID = 1298 ( timetzdate_pl PGUID 14 f t f t 2 f 1184 "1266 1082" 100 0 0 100 "select datetimetz_pl($2, $1)" - )); DESCR("convert time with time zone and date to timestamp"); -DATA(insert OID = 1299 ( now PGUID 11 f t f 0 f 1184 "0" 100 0 0 100 now - )); +DATA(insert OID = 1299 ( now PGUID 11 f t f t 0 f 1184 "0" 100 0 0 100 now - )); DESCR("current transaction time"); /* OIDS 1300 - 1399 */ -DATA(insert OID = 1300 ( positionsel PGUID 11 f t f 5 f 701 "26 26 21 0 23" 100 0 0 100 positionsel - )); +DATA(insert OID = 1300 ( positionsel PGUID 11 f t f t 5 f 701 "26 26 21 0 23" 100 0 0 100 positionsel - )); DESCR("restriction selectivity for position-comparison operators"); -DATA(insert OID = 1301 ( positionjoinsel PGUID 11 f t f 5 f 701 "26 26 21 26 21" 100 0 0 100 positionjoinsel - )); +DATA(insert OID = 1301 ( positionjoinsel PGUID 11 f t f t 5 f 701 "26 26 21 26 21" 100 0 0 100 positionjoinsel - )); DESCR("join selectivity for position-comparison operators"); -DATA(insert OID = 1302 ( contsel PGUID 11 f t f 5 f 701 "26 26 21 0 23" 100 0 0 100 contsel - )); +DATA(insert OID = 1302 ( contsel PGUID 11 f t f t 5 f 701 "26 26 21 0 23" 100 0 0 100 contsel - )); DESCR("restriction selectivity for containment comparison operators"); -DATA(insert OID = 1303 ( contjoinsel PGUID 11 f t f 5 f 701 "26 26 21 26 21" 100 0 0 100 contjoinsel - )); +DATA(insert OID = 1303 ( contjoinsel PGUID 11 f t f t 5 f 701 "26 26 21 26 21" 100 0 0 100 contjoinsel - )); DESCR("join selectivity for containment comparison operators"); -DATA(insert OID = 1304 ( overlaps PGUID 11 f t t 4 f 16 "1184 1184 1184 1184" 100 0 1 0 overlaps_timestamp - )); +DATA(insert OID = 1304 ( overlaps PGUID 11 f t t t 4 f 16 "1184 1184 1184 1184" 100 0 1 0 overlaps_timestamp - )); DESCR("SQL92 interval comparison"); -DATA(insert OID = 1305 ( overlaps PGUID 14 f t t 4 f 16 "1184 1186 1184 1186" 100 0 1 0 "select overlaps($1, ($1 + $2), $3, ($3 + $4))" - )); +DATA(insert OID = 1305 ( overlaps PGUID 14 f t t t 4 f 16 "1184 1186 1184 1186" 100 0 1 0 "select overlaps($1, ($1 + $2), $3, ($3 + $4))" - )); DESCR("SQL92 interval comparison"); -DATA(insert OID = 1306 ( overlaps PGUID 14 f t t 4 f 16 "1184 1184 1184 1186" 100 0 1 0 "select overlaps($1, $2, $3, ($3 + $4))" - )); +DATA(insert OID = 1306 ( overlaps PGUID 14 f t t t 4 f 16 "1184 1184 1184 1186" 100 0 1 0 "select overlaps($1, $2, $3, ($3 + $4))" - )); DESCR("SQL92 interval comparison"); -DATA(insert OID = 1307 ( overlaps PGUID 14 f t t 4 f 16 "1184 1186 1184 1184" 100 0 1 0 "select overlaps($1, ($1 + $2), $3, $4)" - )); +DATA(insert OID = 1307 ( overlaps PGUID 14 f t t t 4 f 16 "1184 1186 1184 1184" 100 0 1 0 "select overlaps($1, ($1 + $2), $3, $4)" - )); DESCR("SQL92 interval comparison"); -DATA(insert OID = 1308 ( overlaps PGUID 11 f t t 4 f 16 "1083 1083 1083 1083" 100 0 1 0 overlaps_time - )); +DATA(insert OID = 1308 ( overlaps PGUID 11 f t t t 4 f 16 "1083 1083 1083 1083" 100 0 1 0 overlaps_time - )); DESCR("SQL92 interval comparison"); -DATA(insert OID = 1309 ( overlaps PGUID 14 f t t 4 f 16 "1083 1186 1083 1186" 100 0 1 0 "select overlaps($1, ($1 + $2), $3, ($3 + $4))" - )); +DATA(insert OID = 1309 ( overlaps PGUID 14 f t t t 4 f 16 "1083 1186 1083 1186" 100 0 1 0 "select overlaps($1, ($1 + $2), $3, ($3 + $4))" - )); DESCR("SQL92 interval comparison"); -DATA(insert OID = 1310 ( overlaps PGUID 14 f t t 4 f 16 "1083 1083 1083 1186" 100 0 1 0 "select overlaps($1, $2, $3, ($3 + $4))" - )); +DATA(insert OID = 1310 ( overlaps PGUID 14 f t t t 4 f 16 "1083 1083 1083 1186" 100 0 1 0 "select overlaps($1, $2, $3, ($3 + $4))" - )); DESCR("SQL92 interval comparison"); -DATA(insert OID = 1311 ( overlaps PGUID 14 f t t 4 f 16 "1083 1186 1083 1083" 100 0 1 0 "select overlaps($1, ($1 + $2), $3, $4)" - )); +DATA(insert OID = 1311 ( overlaps PGUID 14 f t t t 4 f 16 "1083 1186 1083 1083" 100 0 1 0 "select overlaps($1, ($1 + $2), $3, $4)" - )); DESCR("SQL92 interval comparison"); -DATA(insert OID = 1314 ( timestamp_cmp PGUID 11 f t f 2 f 23 "1184 1184" 100 0 0 100 timestamp_cmp - )); +DATA(insert OID = 1314 ( timestamp_cmp PGUID 11 f t f t 2 f 23 "1184 1184" 100 0 0 100 timestamp_cmp - )); DESCR("less-equal-greater"); -DATA(insert OID = 1315 ( interval_cmp PGUID 11 f t f 2 f 23 "1186 1186" 100 0 0 100 interval_cmp - )); +DATA(insert OID = 1315 ( interval_cmp PGUID 11 f t f t 2 f 23 "1186 1186" 100 0 0 100 interval_cmp - )); DESCR("less-equal-greater"); -DATA(insert OID = 1316 ( time PGUID 11 f t f 1 f 1083 "1184" 100 0 0 100 timestamp_time - )); +DATA(insert OID = 1316 ( time PGUID 11 f t f t 1 f 1083 "1184" 100 0 0 100 timestamp_time - )); DESCR("convert timestamp to time"); -DATA(insert OID = 1317 ( length PGUID 11 f t t 1 f 23 "25" 100 0 1 0 textlen - )); +DATA(insert OID = 1317 ( length PGUID 11 f t t t 1 f 23 "25" 100 0 1 0 textlen - )); DESCR("length"); -DATA(insert OID = 1318 ( length PGUID 11 f t t 1 f 23 "1042" 100 0 0 100 bpcharlen - )); +DATA(insert OID = 1318 ( length PGUID 11 f t t t 1 f 23 "1042" 100 0 0 100 bpcharlen - )); DESCR("character length"); -DATA(insert OID = 1319 ( length PGUID 11 f t t 1 f 23 "1043" 100 0 0 100 varcharlen - )); +DATA(insert OID = 1319 ( length PGUID 11 f t t t 1 f 23 "1043" 100 0 0 100 varcharlen - )); DESCR("character length"); -DATA(insert OID = 1326 ( interval_div PGUID 11 f t f 2 f 1186 "1186 701" 100 0 0 100 interval_div - )); +DATA(insert OID = 1326 ( interval_div PGUID 11 f t f t 2 f 1186 "1186 701" 100 0 0 100 interval_div - )); DESCR("divide"); -DATA(insert OID = 1339 ( dlog10 PGUID 11 f t t 1 f 701 "701" 100 0 0 100 dlog10 - )); +DATA(insert OID = 1339 ( dlog10 PGUID 11 f t t t 1 f 701 "701" 100 0 0 100 dlog10 - )); DESCR("base 10 logarithm"); -DATA(insert OID = 1340 ( log PGUID 11 f t t 1 f 701 "701" 100 0 0 100 dlog10 - )); +DATA(insert OID = 1340 ( log PGUID 11 f t t t 1 f 701 "701" 100 0 0 100 dlog10 - )); DESCR("base 10 logarithm"); -DATA(insert OID = 1341 ( ln PGUID 11 f t t 1 f 701 "701" 100 0 0 100 dlog1 - )); +DATA(insert OID = 1341 ( ln PGUID 11 f t t t 1 f 701 "701" 100 0 0 100 dlog1 - )); DESCR("natural logarithm"); -DATA(insert OID = 1342 ( round PGUID 11 f t t 1 f 701 "701" 100 0 0 100 dround - )); +DATA(insert OID = 1342 ( round PGUID 11 f t t t 1 f 701 "701" 100 0 0 100 dround - )); DESCR("round to integral part"); -DATA(insert OID = 1343 ( trunc PGUID 11 f t t 1 f 701 "701" 100 0 0 100 dtrunc - )); +DATA(insert OID = 1343 ( trunc PGUID 11 f t t t 1 f 701 "701" 100 0 0 100 dtrunc - )); DESCR("truncate to integral part"); -DATA(insert OID = 1344 ( sqrt PGUID 11 f t t 1 f 701 "701" 100 0 0 100 dsqrt - )); +DATA(insert OID = 1344 ( sqrt PGUID 11 f t t t 1 f 701 "701" 100 0 0 100 dsqrt - )); DESCR("square root"); -DATA(insert OID = 1345 ( cbrt PGUID 11 f t t 1 f 701 "701" 100 0 0 100 dcbrt - )); +DATA(insert OID = 1345 ( cbrt PGUID 11 f t t t 1 f 701 "701" 100 0 0 100 dcbrt - )); DESCR("cube root"); -DATA(insert OID = 1346 ( pow PGUID 11 f t t 2 f 701 "701 701" 100 0 0 100 dpow - )); +DATA(insert OID = 1346 ( pow PGUID 11 f t t t 2 f 701 "701 701" 100 0 0 100 dpow - )); DESCR("exponentiation"); -DATA(insert OID = 1347 ( exp PGUID 11 f t t 1 f 701 "701" 100 0 0 100 dexp - )); +DATA(insert OID = 1347 ( exp PGUID 11 f t t t 1 f 701 "701" 100 0 0 100 dexp - )); DESCR("exponential"); -DATA(insert OID = 1348 ( obj_description PGUID 14 f t f 1 f 25 "26" 100 0 0 100 "select description from pg_description where objoid = $1" - )); +DATA(insert OID = 1348 ( obj_description PGUID 14 f t f t 1 f 25 "26" 100 0 0 100 "select description from pg_description where objoid = $1" - )); DESCR("get description for object id"); -DATA(insert OID = 1349 ( oidvectortypes PGUID 11 f t f 1 f 25 "30" 100 0 0 100 oidvectortypes - )); +DATA(insert OID = 1349 ( oidvectortypes PGUID 11 f t f t 1 f 25 "30" 100 0 0 100 oidvectortypes - )); DESCR("print type names of oidvector field"); -DATA(insert OID = 1350 ( timetz_in PGUID 11 f t f 1 f 1266 "0" 100 0 0 100 timetz_in - )); +DATA(insert OID = 1350 ( timetz_in PGUID 11 f t f t 1 f 1266 "0" 100 0 0 100 timetz_in - )); DESCR("(internal)"); -DATA(insert OID = 1351 ( timetz_out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 timetz_out - )); +DATA(insert OID = 1351 ( timetz_out PGUID 11 f t f t 1 f 23 "0" 100 0 0 100 timetz_out - )); DESCR("(internal)"); -DATA(insert OID = 1352 ( timetz_eq PGUID 11 f t t 2 f 16 "1266 1266" 100 0 0 100 timetz_eq - )); +DATA(insert OID = 1352 ( timetz_eq PGUID 11 f t t t 2 f 16 "1266 1266" 100 0 0 100 timetz_eq - )); DESCR("equal"); -DATA(insert OID = 1353 ( timetz_ne PGUID 11 f t t 2 f 16 "1266 1266" 100 0 0 100 timetz_ne - )); +DATA(insert OID = 1353 ( timetz_ne PGUID 11 f t t t 2 f 16 "1266 1266" 100 0 0 100 timetz_ne - )); DESCR("not equal"); -DATA(insert OID = 1354 ( timetz_lt PGUID 11 f t t 2 f 16 "1266 1266" 100 0 0 100 timetz_lt - )); +DATA(insert OID = 1354 ( timetz_lt PGUID 11 f t t t 2 f 16 "1266 1266" 100 0 0 100 timetz_lt - )); DESCR("less-than"); -DATA(insert OID = 1355 ( timetz_le PGUID 11 f t t 2 f 16 "1266 1266" 100 0 0 100 timetz_le - )); +DATA(insert OID = 1355 ( timetz_le PGUID 11 f t t t 2 f 16 "1266 1266" 100 0 0 100 timetz_le - )); DESCR("less-than-or-equal"); -DATA(insert OID = 1356 ( timetz_ge PGUID 11 f t t 2 f 16 "1266 1266" 100 0 0 100 timetz_ge - )); +DATA(insert OID = 1356 ( timetz_ge PGUID 11 f t t t 2 f 16 "1266 1266" 100 0 0 100 timetz_ge - )); DESCR("greater-than-or-equal"); -DATA(insert OID = 1357 ( timetz_gt PGUID 11 f t t 2 f 16 "1266 1266" 100 0 0 100 timetz_gt - )); +DATA(insert OID = 1357 ( timetz_gt PGUID 11 f t t t 2 f 16 "1266 1266" 100 0 0 100 timetz_gt - )); DESCR("greater-than"); -DATA(insert OID = 1358 ( timetz_cmp PGUID 11 f t t 2 f 23 "1266 1266" 100 0 0 100 timetz_cmp - )); +DATA(insert OID = 1358 ( timetz_cmp PGUID 11 f t t t 2 f 23 "1266 1266" 100 0 0 100 timetz_cmp - )); DESCR("less-equal-greater"); -DATA(insert OID = 1359 ( timestamp PGUID 11 f t f 2 f 1184 "1082 1266" 100 0 0 100 datetimetz_timestamp - )); +DATA(insert OID = 1359 ( timestamp PGUID 11 f t f t 2 f 1184 "1082 1266" 100 0 0 100 datetimetz_timestamp - )); DESCR("convert date and time with time zone to timestamp"); -DATA(insert OID = 1362 ( time PGUID 14 f t t 1 f 1083 "1083" 100 0 0 100 "select $1" - )); +DATA(insert OID = 1362 ( time PGUID 14 f t t t 1 f 1083 "1083" 100 0 0 100 "select $1" - )); DESCR("convert (noop)"); -DATA(insert OID = 1364 ( time PGUID 14 f t f 1 f 1083 "702" 100 0 0 100 "select time(timestamp($1))" - )); +DATA(insert OID = 1364 ( time PGUID 14 f t f t 1 f 1083 "702" 100 0 0 100 "select time(timestamp($1))" - )); DESCR("convert abstime to time"); -DATA(insert OID = 1365 ( abstime PGUID 14 f t f 1 f 702 "702" 100 0 0 100 "select $1" - )); +DATA(insert OID = 1365 ( abstime PGUID 14 f t f t 1 f 702 "702" 100 0 0 100 "select $1" - )); DESCR("convert (noop)"); -DATA(insert OID = 1367 ( reltime PGUID 14 f t t 1 f 703 "703" 100 0 0 100 "select $1" - )); +DATA(insert OID = 1367 ( reltime PGUID 14 f t t t 1 f 703 "703" 100 0 0 100 "select $1" - )); DESCR("convert (noop)"); -DATA(insert OID = 1368 ( timestamp PGUID 14 f t f 1 f 1184 "1184" 100 0 0 100 "select $1" - )); +DATA(insert OID = 1368 ( timestamp PGUID 14 f t f t 1 f 1184 "1184" 100 0 0 100 "select $1" - )); DESCR("convert (noop)"); -DATA(insert OID = 1369 ( interval PGUID 14 f t t 1 f 1186 "1186" 100 0 0 100 "select $1" - )); +DATA(insert OID = 1369 ( interval PGUID 14 f t t t 1 f 1186 "1186" 100 0 0 100 "select $1" - )); DESCR("convert (noop)"); -DATA(insert OID = 1370 ( interval PGUID 11 f t f 1 f 1186 "1083" 100 0 0 100 time_interval - )); +DATA(insert OID = 1370 ( interval PGUID 11 f t f t 1 f 1186 "1083" 100 0 0 100 time_interval - )); DESCR("convert time to interval"); -DATA(insert OID = 1371 ( date PGUID 14 f t t 1 f 1082 "1082" 100 0 0 100 "select $1" - )); +DATA(insert OID = 1371 ( date PGUID 14 f t t t 1 f 1082 "1082" 100 0 0 100 "select $1" - )); DESCR("convert (noop)"); -DATA(insert OID = 1372 ( char_length PGUID 11 f t t 1 f 23 "1042" 100 0 0 100 bpcharlen - )); +DATA(insert OID = 1372 ( char_length PGUID 11 f t t t 1 f 23 "1042" 100 0 0 100 bpcharlen - )); DESCR("character length"); -DATA(insert OID = 1373 ( char_length PGUID 11 f t t 1 f 23 "1043" 100 0 0 100 varcharlen - )); +DATA(insert OID = 1373 ( char_length PGUID 11 f t t t 1 f 23 "1043" 100 0 0 100 varcharlen - )); DESCR("character length"); -DATA(insert OID = 1374 ( octet_length PGUID 11 f t t 1 f 23 "25" 100 0 0 100 textoctetlen - )); +DATA(insert OID = 1374 ( octet_length PGUID 11 f t t t 1 f 23 "25" 100 0 0 100 textoctetlen - )); DESCR("octet length"); -DATA(insert OID = 1375 ( octet_length PGUID 11 f t t 1 f 23 "1042" 100 0 0 100 bpcharoctetlen - )); +DATA(insert OID = 1375 ( octet_length PGUID 11 f t t t 1 f 23 "1042" 100 0 0 100 bpcharoctetlen - )); DESCR("octet length"); -DATA(insert OID = 1376 ( octet_length PGUID 11 f t t 1 f 23 "1043" 100 0 0 100 varcharoctetlen - )); +DATA(insert OID = 1376 ( octet_length PGUID 11 f t t t 1 f 23 "1043" 100 0 0 100 varcharoctetlen - )); DESCR("octet length"); -DATA(insert OID = 1377 ( time_larger PGUID 11 f t t 2 f 1083 "1083 1083" 100 0 0 100 time_larger - )); +DATA(insert OID = 1377 ( time_larger PGUID 11 f t t t 2 f 1083 "1083 1083" 100 0 0 100 time_larger - )); DESCR("larger of two"); -DATA(insert OID = 1378 ( time_smaller PGUID 11 f t t 2 f 1083 "1083 1083" 100 0 0 100 time_smaller - )); +DATA(insert OID = 1378 ( time_smaller PGUID 11 f t t t 2 f 1083 "1083 1083" 100 0 0 100 time_smaller - )); DESCR("smaller of two"); -DATA(insert OID = 1379 ( timetz_larger PGUID 11 f t t 2 f 1083 "1266 1266" 100 0 0 100 timetz_larger - )); +DATA(insert OID = 1379 ( timetz_larger PGUID 11 f t t t 2 f 1083 "1266 1266" 100 0 0 100 timetz_larger - )); DESCR("larger of two"); -DATA(insert OID = 1380 ( timetz_smaller PGUID 11 f t t 2 f 1083 "1266 1266" 100 0 0 100 timetz_smaller - )); +DATA(insert OID = 1380 ( timetz_smaller PGUID 11 f t t t 2 f 1083 "1266 1266" 100 0 0 100 timetz_smaller - )); DESCR("smaller of two"); -DATA(insert OID = 1381 ( char_length PGUID 11 f t t 1 f 23 "25" 100 0 1 0 textlen - )); +DATA(insert OID = 1381 ( char_length PGUID 11 f t t t 1 f 23 "25" 100 0 1 0 textlen - )); DESCR("length"); -DATA(insert OID = 1382 ( date_part PGUID 14 f t f 2 f 701 "25 702" 100 0 0 100 "select date_part($1, timestamp($2))" - )); +DATA(insert OID = 1382 ( date_part PGUID 14 f t f t 2 f 701 "25 702" 100 0 0 100 "select date_part($1, timestamp($2))" - )); DESCR("extract field from abstime"); -DATA(insert OID = 1383 ( date_part PGUID 14 f t f 2 f 701 "25 703" 100 0 0 100 "select date_part($1, interval($2))" - )); +DATA(insert OID = 1383 ( date_part PGUID 14 f t f t 2 f 701 "25 703" 100 0 0 100 "select date_part($1, interval($2))" - )); DESCR("extract field from reltime"); -DATA(insert OID = 1384 ( date_part PGUID 14 f t f 2 f 701 "25 1082" 100 0 0 100 "select date_part($1, timestamp($2))" - )); +DATA(insert OID = 1384 ( date_part PGUID 14 f t f t 2 f 701 "25 1082" 100 0 0 100 "select date_part($1, timestamp($2))" - )); DESCR("extract field from date"); -DATA(insert OID = 1385 ( date_part PGUID 14 f t f 2 f 701 "25 1083" 100 0 0 100 "select date_part($1, interval($2))" - )); +DATA(insert OID = 1385 ( date_part PGUID 14 f t f t 2 f 701 "25 1083" 100 0 0 100 "select date_part($1, interval($2))" - )); DESCR("extract field from time"); -DATA(insert OID = 1386 ( age PGUID 14 f t f 1 f 1186 "1184" 100 0 0 100 "select age(\'today\', $1)" - )); +DATA(insert OID = 1386 ( age PGUID 14 f t f t 1 f 1186 "1184" 100 0 0 100 "select age(\'today\', $1)" - )); DESCR("date difference from today preserving months and years"); -DATA(insert OID = 1387 ( timetz PGUID 14 f t f 1 f 1266 "1266" 100 0 0 100 "select $1" - )); +DATA(insert OID = 1387 ( timetz PGUID 14 f t f t 1 f 1266 "1266" 100 0 0 100 "select $1" - )); DESCR("noop conversion"); -DATA(insert OID = 1388 ( timetz PGUID 11 f t f 1 f 1266 "1184" 100 0 0 100 timestamp_timetz - )); +DATA(insert OID = 1388 ( timetz PGUID 11 f t f t 1 f 1266 "1184" 100 0 0 100 timestamp_timetz - )); DESCR("convert timestamp to time"); -DATA(insert OID = 1389 ( isfinite PGUID 11 f t f 1 f 16 "1184" 100 0 0 100 timestamp_finite - )); +DATA(insert OID = 1389 ( isfinite PGUID 11 f t f t 1 f 16 "1184" 100 0 0 100 timestamp_finite - )); DESCR("boolean test"); -DATA(insert OID = 1390 ( isfinite PGUID 11 f t f 1 f 16 "1186" 100 0 0 100 interval_finite - )); +DATA(insert OID = 1390 ( isfinite PGUID 11 f t f t 1 f 16 "1186" 100 0 0 100 interval_finite - )); DESCR("boolean test"); -DATA(insert OID = 1391 ( factorial PGUID 11 f t t 1 f 23 "21" 100 0 0 100 int2fac - )); +DATA(insert OID = 1391 ( factorial PGUID 11 f t t t 1 f 23 "21" 100 0 0 100 int2fac - )); DESCR("factorial"); -DATA(insert OID = 1392 ( factorial PGUID 11 f t t 1 f 23 "23" 100 0 0 100 int4fac - )); +DATA(insert OID = 1392 ( factorial PGUID 11 f t t t 1 f 23 "23" 100 0 0 100 int4fac - )); DESCR("factorial"); -DATA(insert OID = 1393 ( factorial PGUID 11 f t t 1 f 20 "20" 100 0 0 100 int8fac - )); +DATA(insert OID = 1393 ( factorial PGUID 11 f t t t 1 f 20 "20" 100 0 0 100 int8fac - )); DESCR("factorial"); -DATA(insert OID = 1394 ( abs PGUID 11 f t t 1 f 700 "700" 100 0 0 100 float4abs - )); +DATA(insert OID = 1394 ( abs PGUID 11 f t t t 1 f 700 "700" 100 0 0 100 float4abs - )); DESCR("absolute value"); -DATA(insert OID = 1395 ( abs PGUID 11 f t t 1 f 701 "701" 100 0 0 100 float8abs - )); +DATA(insert OID = 1395 ( abs PGUID 11 f t t t 1 f 701 "701" 100 0 0 100 float8abs - )); DESCR("absolute value"); -DATA(insert OID = 1396 ( abs PGUID 11 f t t 1 f 20 "20" 100 0 0 100 int8abs - )); +DATA(insert OID = 1396 ( abs PGUID 11 f t t t 1 f 20 "20" 100 0 0 100 int8abs - )); DESCR("absolute value"); -DATA(insert OID = 1397 ( abs PGUID 11 f t t 1 f 23 "23" 100 0 0 100 int4abs - )); +DATA(insert OID = 1397 ( abs PGUID 11 f t t t 1 f 23 "23" 100 0 0 100 int4abs - )); DESCR("absolute value"); -DATA(insert OID = 1398 ( abs PGUID 11 f t t 1 f 21 "21" 100 0 0 100 int2abs - )); +DATA(insert OID = 1398 ( abs PGUID 11 f t t t 1 f 21 "21" 100 0 0 100 int2abs - )); DESCR("absolute value"); /* OIDS 1400 - 1499 */ -DATA(insert OID = 1400 ( name PGUID 11 f t t 1 f 19 "1043" 100 0 0 100 text_name - )); +DATA(insert OID = 1400 ( name PGUID 11 f t t t 1 f 19 "1043" 100 0 0 100 text_name - )); DESCR("convert varchar to name"); -DATA(insert OID = 1401 ( varchar PGUID 11 f t t 1 f 1043 "19" 100 0 0 100 name_text - )); +DATA(insert OID = 1401 ( varchar PGUID 11 f t t t 1 f 1043 "19" 100 0 0 100 name_text - )); DESCR("convert convert name to varchar"); -DATA(insert OID = 1402 ( float4 PGUID 14 f t t 1 f 700 "700" 100 0 0 100 "select $1" - )); +DATA(insert OID = 1402 ( float4 PGUID 14 f t t t 1 f 700 "700" 100 0 0 100 "select $1" - )); DESCR("convert float4 to float4 (no-op)"); -DATA(insert OID = 1403 ( int2 PGUID 14 f t t 1 f 21 "21" 100 0 0 100 "select $1" - )); +DATA(insert OID = 1403 ( int2 PGUID 14 f t t t 1 f 21 "21" 100 0 0 100 "select $1" - )); DESCR("convert (no-op)"); -DATA(insert OID = 1404 ( float8 PGUID 14 f t t 1 f 701 "701" 100 0 0 100 "select $1" - )); +DATA(insert OID = 1404 ( float8 PGUID 14 f t t t 1 f 701 "701" 100 0 0 100 "select $1" - )); DESCR("convert (no-op)"); -DATA(insert OID = 1405 ( int4 PGUID 14 f t t 1 f 23 "23" 100 0 0 100 "select $1" - )); +DATA(insert OID = 1405 ( int4 PGUID 14 f t t t 1 f 23 "23" 100 0 0 100 "select $1" - )); DESCR("convert (no-op)"); -DATA(insert OID = 1406 ( isvertical PGUID 11 f t t 2 f 16 "600 600" 100 0 0 100 point_vert - )); +DATA(insert OID = 1406 ( isvertical PGUID 11 f t t t 2 f 16 "600 600" 100 0 0 100 point_vert - )); DESCR("vertical?"); -DATA(insert OID = 1407 ( ishorizontal PGUID 11 f t t 2 f 16 "600 600" 100 0 0 100 point_horiz - )); +DATA(insert OID = 1407 ( ishorizontal PGUID 11 f t t t 2 f 16 "600 600" 100 0 0 100 point_horiz - )); DESCR("horizontal?"); -DATA(insert OID = 1408 ( isparallel PGUID 11 f t t 2 f 16 "601 601" 100 0 0 100 lseg_parallel - )); +DATA(insert OID = 1408 ( isparallel PGUID 11 f t t t 2 f 16 "601 601" 100 0 0 100 lseg_parallel - )); DESCR("parallel?"); -DATA(insert OID = 1409 ( isperp PGUID 11 f t t 2 f 16 "601 601" 100 0 0 100 lseg_perp - )); +DATA(insert OID = 1409 ( isperp PGUID 11 f t t t 2 f 16 "601 601" 100 0 0 100 lseg_perp - )); DESCR("perpendicular?"); -DATA(insert OID = 1410 ( isvertical PGUID 11 f t t 1 f 16 "601" 100 0 0 100 lseg_vertical - )); +DATA(insert OID = 1410 ( isvertical PGUID 11 f t t t 1 f 16 "601" 100 0 0 100 lseg_vertical - )); DESCR("vertical?"); -DATA(insert OID = 1411 ( ishorizontal PGUID 11 f t t 1 f 16 "601" 100 0 0 100 lseg_horizontal - )); +DATA(insert OID = 1411 ( ishorizontal PGUID 11 f t t t 1 f 16 "601" 100 0 0 100 lseg_horizontal - )); DESCR("horizontal?"); -DATA(insert OID = 1412 ( isparallel PGUID 11 f t t 2 f 16 "628 628" 100 0 0 100 line_parallel - )); +DATA(insert OID = 1412 ( isparallel PGUID 11 f t t t 2 f 16 "628 628" 100 0 0 100 line_parallel - )); DESCR("lines parallel?"); -DATA(insert OID = 1413 ( isperp PGUID 11 f t t 2 f 16 "628 628" 100 0 0 100 line_perp - )); +DATA(insert OID = 1413 ( isperp PGUID 11 f t t t 2 f 16 "628 628" 100 0 0 100 line_perp - )); DESCR("lines perpendicular?"); -DATA(insert OID = 1414 ( isvertical PGUID 11 f t t 1 f 16 "628" 100 0 0 100 line_vertical - )); +DATA(insert OID = 1414 ( isvertical PGUID 11 f t t t 1 f 16 "628" 100 0 0 100 line_vertical - )); DESCR("lines vertical?"); -DATA(insert OID = 1415 ( ishorizontal PGUID 11 f t t 1 f 16 "628" 100 0 0 100 line_horizontal - )); +DATA(insert OID = 1415 ( ishorizontal PGUID 11 f t t t 1 f 16 "628" 100 0 0 100 line_horizontal - )); DESCR("lines horizontal?"); -DATA(insert OID = 1416 ( point PGUID 11 f t t 1 f 600 "718" 100 0 1 0 circle_center - )); +DATA(insert OID = 1416 ( point PGUID 11 f t t t 1 f 600 "718" 100 0 1 0 circle_center - )); DESCR("center of"); -DATA(insert OID = 1421 ( box PGUID 11 f t t 2 f 603 "600 600" 100 0 0 100 box - )); +DATA(insert OID = 1421 ( box PGUID 11 f t t t 2 f 603 "600 600" 100 0 0 100 box - )); DESCR("convert points to box"); -DATA(insert OID = 1422 ( box_add PGUID 11 f t t 2 f 603 "603 600" 100 0 0 100 box_add - )); +DATA(insert OID = 1422 ( box_add PGUID 11 f t t t 2 f 603 "603 600" 100 0 0 100 box_add - )); DESCR("add point to box (translate)"); -DATA(insert OID = 1423 ( box_sub PGUID 11 f t t 2 f 603 "603 600" 100 0 0 100 box_sub - )); +DATA(insert OID = 1423 ( box_sub PGUID 11 f t t t 2 f 603 "603 600" 100 0 0 100 box_sub - )); DESCR("subtract point from box (translate)"); -DATA(insert OID = 1424 ( box_mul PGUID 11 f t t 2 f 603 "603 600" 100 0 0 100 box_mul - )); +DATA(insert OID = 1424 ( box_mul PGUID 11 f t t t 2 f 603 "603 600" 100 0 0 100 box_mul - )); DESCR("multiply box by point (scale)"); -DATA(insert OID = 1425 ( box_div PGUID 11 f t t 2 f 603 "603 600" 100 0 0 100 box_div - )); +DATA(insert OID = 1425 ( box_div PGUID 11 f t t t 2 f 603 "603 600" 100 0 0 100 box_div - )); DESCR("divide box by point (scale)"); -DATA(insert OID = 1426 ( path_contain_pt PGUID 14 f t t 2 f 16 "602 600" 100 0 0 100 "select on_ppath($2, $1)" - )); +DATA(insert OID = 1426 ( path_contain_pt PGUID 14 f t t t 2 f 16 "602 600" 100 0 0 100 "select on_ppath($2, $1)" - )); DESCR("path contains point?"); -DATA(insert OID = 1428 ( poly_contain_pt PGUID 11 f t t 2 f 16 "604 600" 100 0 0 100 poly_contain_pt - )); +DATA(insert OID = 1428 ( poly_contain_pt PGUID 11 f t t t 2 f 16 "604 600" 100 0 0 100 poly_contain_pt - )); DESCR("polygon contains point?"); -DATA(insert OID = 1429 ( pt_contained_poly PGUID 11 f t t 2 f 16 "600 604" 100 0 0 100 pt_contained_poly - )); +DATA(insert OID = 1429 ( pt_contained_poly PGUID 11 f t t t 2 f 16 "600 604" 100 0 0 100 pt_contained_poly - )); DESCR("point contained by polygon?"); -DATA(insert OID = 1430 ( isclosed PGUID 11 f t t 1 f 16 "602" 100 0 0 100 path_isclosed - )); +DATA(insert OID = 1430 ( isclosed PGUID 11 f t t t 1 f 16 "602" 100 0 0 100 path_isclosed - )); DESCR("path closed?"); -DATA(insert OID = 1431 ( isopen PGUID 11 f t t 1 f 16 "602" 100 0 0 100 path_isopen - )); +DATA(insert OID = 1431 ( isopen PGUID 11 f t t t 1 f 16 "602" 100 0 0 100 path_isopen - )); DESCR("path open?"); -DATA(insert OID = 1432 ( path_npoints PGUID 11 f t t 1 f 23 "602" 100 0 0 100 path_npoints - )); +DATA(insert OID = 1432 ( path_npoints PGUID 11 f t t t 1 f 23 "602" 100 0 0 100 path_npoints - )); DESCR("# points in path"); /* pclose and popen might better be named close and open, but that crashes initdb. * - thomas 97/04/20 */ -DATA(insert OID = 1433 ( pclose PGUID 11 f t t 1 f 602 "602" 100 0 0 100 path_close - )); +DATA(insert OID = 1433 ( pclose PGUID 11 f t t t 1 f 602 "602" 100 0 0 100 path_close - )); DESCR("close path"); -DATA(insert OID = 1434 ( popen PGUID 11 f t t 1 f 602 "602" 100 0 0 100 path_open - )); +DATA(insert OID = 1434 ( popen PGUID 11 f t t t 1 f 602 "602" 100 0 0 100 path_open - )); DESCR("open path"); -DATA(insert OID = 1435 ( path_add PGUID 11 f t t 2 f 602 "602 602" 100 0 0 100 path_add - )); +DATA(insert OID = 1435 ( path_add PGUID 11 f t t t 2 f 602 "602 602" 100 0 0 100 path_add - )); DESCR("addition"); -DATA(insert OID = 1436 ( path_add_pt PGUID 11 f t t 2 f 602 "602 600" 100 0 0 100 path_add_pt - )); +DATA(insert OID = 1436 ( path_add_pt PGUID 11 f t t t 2 f 602 "602 600" 100 0 0 100 path_add_pt - )); DESCR("addition"); -DATA(insert OID = 1437 ( path_sub_pt PGUID 11 f t t 2 f 602 "602 600" 100 0 0 100 path_sub_pt - )); +DATA(insert OID = 1437 ( path_sub_pt PGUID 11 f t t t 2 f 602 "602 600" 100 0 0 100 path_sub_pt - )); DESCR("subtract"); -DATA(insert OID = 1438 ( path_mul_pt PGUID 11 f t t 2 f 602 "602 600" 100 0 0 100 path_mul_pt - )); +DATA(insert OID = 1438 ( path_mul_pt PGUID 11 f t t t 2 f 602 "602 600" 100 0 0 100 path_mul_pt - )); DESCR("multiply"); -DATA(insert OID = 1439 ( path_div_pt PGUID 11 f t t 2 f 602 "602 600" 100 0 0 100 path_div_pt - )); +DATA(insert OID = 1439 ( path_div_pt PGUID 11 f t t t 2 f 602 "602 600" 100 0 0 100 path_div_pt - )); DESCR("divide"); -DATA(insert OID = 1440 ( point PGUID 11 f t t 2 f 600 "701 701" 100 0 0 100 point - )); +DATA(insert OID = 1440 ( point PGUID 11 f t t t 2 f 600 "701 701" 100 0 0 100 point - )); DESCR("convert x, y to point"); -DATA(insert OID = 1441 ( point_add PGUID 11 f t t 2 f 600 "600 600" 100 0 0 100 point_add - )); +DATA(insert OID = 1441 ( point_add PGUID 11 f t t t 2 f 600 "600 600" 100 0 0 100 point_add - )); DESCR("add points (translate)"); -DATA(insert OID = 1442 ( point_sub PGUID 11 f t t 2 f 600 "600 600" 100 0 0 100 point_sub - )); +DATA(insert OID = 1442 ( point_sub PGUID 11 f t t t 2 f 600 "600 600" 100 0 0 100 point_sub - )); DESCR("subtract points (translate)"); -DATA(insert OID = 1443 ( point_mul PGUID 11 f t t 2 f 600 "600 600" 100 0 0 100 point_mul - )); +DATA(insert OID = 1443 ( point_mul PGUID 11 f t t t 2 f 600 "600 600" 100 0 0 100 point_mul - )); DESCR("multiply points (scale/rotate)"); -DATA(insert OID = 1444 ( point_div PGUID 11 f t t 2 f 600 "600 600" 100 0 0 100 point_div - )); +DATA(insert OID = 1444 ( point_div PGUID 11 f t t t 2 f 600 "600 600" 100 0 0 100 point_div - )); DESCR("divide points (scale/rotate)"); -DATA(insert OID = 1445 ( poly_npoints PGUID 11 f t t 1 f 23 "604" 100 0 0 100 poly_npoints - )); +DATA(insert OID = 1445 ( poly_npoints PGUID 11 f t t t 1 f 23 "604" 100 0 0 100 poly_npoints - )); DESCR("number of points in polygon"); -DATA(insert OID = 1446 ( box PGUID 11 f t t 1 f 603 "604" 100 0 0 100 poly_box - )); +DATA(insert OID = 1446 ( box PGUID 11 f t t t 1 f 603 "604" 100 0 0 100 poly_box - )); DESCR("convert polygon to bounding box"); -DATA(insert OID = 1447 ( path PGUID 11 f t t 1 f 602 "604" 100 0 0 100 poly_path - )); +DATA(insert OID = 1447 ( path PGUID 11 f t t t 1 f 602 "604" 100 0 0 100 poly_path - )); DESCR("convert polygon to path"); -DATA(insert OID = 1448 ( polygon PGUID 11 f t t 1 f 604 "603" 100 0 0 100 box_poly - )); +DATA(insert OID = 1448 ( polygon PGUID 11 f t t t 1 f 604 "603" 100 0 0 100 box_poly - )); DESCR("convert box to polygon"); -DATA(insert OID = 1449 ( polygon PGUID 11 f t t 1 f 604 "602" 100 0 0 100 path_poly - )); +DATA(insert OID = 1449 ( polygon PGUID 11 f t t t 1 f 604 "602" 100 0 0 100 path_poly - )); DESCR("convert path to polygon"); -DATA(insert OID = 1450 ( circle_in PGUID 11 f t t 1 f 718 "0" 100 0 1 0 circle_in - )); +DATA(insert OID = 1450 ( circle_in PGUID 11 f t t t 1 f 718 "0" 100 0 1 0 circle_in - )); DESCR("(internal)"); -DATA(insert OID = 1451 ( circle_out PGUID 11 f t t 1 f 23 "0" 100 0 1 0 circle_out - )); +DATA(insert OID = 1451 ( circle_out PGUID 11 f t t t 1 f 23 "0" 100 0 1 0 circle_out - )); DESCR("(internal)"); -DATA(insert OID = 1452 ( circle_same PGUID 11 f t t 2 f 16 "718 718" 100 0 1 0 circle_same - )); +DATA(insert OID = 1452 ( circle_same PGUID 11 f t t t 2 f 16 "718 718" 100 0 1 0 circle_same - )); DESCR("same as"); -DATA(insert OID = 1453 ( circle_contain PGUID 11 f t t 2 f 16 "718 718" 100 0 1 0 circle_contain - )); +DATA(insert OID = 1453 ( circle_contain PGUID 11 f t t t 2 f 16 "718 718" 100 0 1 0 circle_contain - )); DESCR("contains"); -DATA(insert OID = 1454 ( circle_left PGUID 11 f t t 2 f 16 "718 718" 100 0 1 0 circle_left - )); +DATA(insert OID = 1454 ( circle_left PGUID 11 f t t t 2 f 16 "718 718" 100 0 1 0 circle_left - )); DESCR("is left of"); -DATA(insert OID = 1455 ( circle_overleft PGUID 11 f t t 2 f 16 "718 718" 100 0 1 0 circle_overleft - )); +DATA(insert OID = 1455 ( circle_overleft PGUID 11 f t t t 2 f 16 "718 718" 100 0 1 0 circle_overleft - )); DESCR("overlaps, but does not extend to right of"); -DATA(insert OID = 1456 ( circle_overright PGUID 11 f t t 2 f 16 "718 718" 100 0 1 0 circle_overright - )); +DATA(insert OID = 1456 ( circle_overright PGUID 11 f t t t 2 f 16 "718 718" 100 0 1 0 circle_overright - )); DESCR(""); -DATA(insert OID = 1457 ( circle_right PGUID 11 f t t 2 f 16 "718 718" 100 0 1 0 circle_right - )); +DATA(insert OID = 1457 ( circle_right PGUID 11 f t t t 2 f 16 "718 718" 100 0 1 0 circle_right - )); DESCR("is left of"); -DATA(insert OID = 1458 ( circle_contained PGUID 11 f t t 2 f 16 "718 718" 100 0 1 0 circle_contained - )); +DATA(insert OID = 1458 ( circle_contained PGUID 11 f t t t 2 f 16 "718 718" 100 0 1 0 circle_contained - )); DESCR(""); -DATA(insert OID = 1459 ( circle_overlap PGUID 11 f t t 2 f 16 "718 718" 100 0 1 0 circle_overlap - )); +DATA(insert OID = 1459 ( circle_overlap PGUID 11 f t t t 2 f 16 "718 718" 100 0 1 0 circle_overlap - )); DESCR("overlaps"); -DATA(insert OID = 1460 ( circle_below PGUID 11 f t t 2 f 16 "718 718" 100 0 1 0 circle_below - )); +DATA(insert OID = 1460 ( circle_below PGUID 11 f t t t 2 f 16 "718 718" 100 0 1 0 circle_below - )); DESCR("is below"); -DATA(insert OID = 1461 ( circle_above PGUID 11 f t t 2 f 16 "718 718" 100 0 1 0 circle_above - )); +DATA(insert OID = 1461 ( circle_above PGUID 11 f t t t 2 f 16 "718 718" 100 0 1 0 circle_above - )); DESCR("is above"); -DATA(insert OID = 1462 ( circle_eq PGUID 11 f t t 2 f 16 "718 718" 100 0 1 0 circle_eq - )); +DATA(insert OID = 1462 ( circle_eq PGUID 11 f t t t 2 f 16 "718 718" 100 0 1 0 circle_eq - )); DESCR("equal"); -DATA(insert OID = 1463 ( circle_ne PGUID 11 f t t 2 f 16 "718 718" 100 0 1 0 circle_ne - )); +DATA(insert OID = 1463 ( circle_ne PGUID 11 f t t t 2 f 16 "718 718" 100 0 1 0 circle_ne - )); DESCR("not equal"); -DATA(insert OID = 1464 ( circle_lt PGUID 11 f t t 2 f 16 "718 718" 100 0 1 0 circle_lt - )); +DATA(insert OID = 1464 ( circle_lt PGUID 11 f t t t 2 f 16 "718 718" 100 0 1 0 circle_lt - )); DESCR("less-than"); -DATA(insert OID = 1465 ( circle_gt PGUID 11 f t t 2 f 16 "718 718" 100 0 1 0 circle_gt - )); +DATA(insert OID = 1465 ( circle_gt PGUID 11 f t t t 2 f 16 "718 718" 100 0 1 0 circle_gt - )); DESCR("greater-than"); -DATA(insert OID = 1466 ( circle_le PGUID 11 f t t 2 f 16 "718 718" 100 0 1 0 circle_le - )); +DATA(insert OID = 1466 ( circle_le PGUID 11 f t t t 2 f 16 "718 718" 100 0 1 0 circle_le - )); DESCR("less-than-or-equal"); -DATA(insert OID = 1467 ( circle_ge PGUID 11 f t t 2 f 16 "718 718" 100 0 1 0 circle_ge - )); +DATA(insert OID = 1467 ( circle_ge PGUID 11 f t t t 2 f 16 "718 718" 100 0 1 0 circle_ge - )); DESCR("greater-than-or-equal"); -DATA(insert OID = 1468 ( area PGUID 11 f t t 1 f 701 "718" 100 0 1 0 circle_area - )); +DATA(insert OID = 1468 ( area PGUID 11 f t t t 1 f 701 "718" 100 0 1 0 circle_area - )); DESCR("area of circle"); -DATA(insert OID = 1469 ( diameter PGUID 11 f t t 1 f 701 "718" 100 0 1 0 circle_diameter - )); +DATA(insert OID = 1469 ( diameter PGUID 11 f t t t 1 f 701 "718" 100 0 1 0 circle_diameter - )); DESCR("diameter of circle"); -DATA(insert OID = 1470 ( radius PGUID 11 f t t 1 f 701 "718" 100 0 1 0 circle_radius - )); +DATA(insert OID = 1470 ( radius PGUID 11 f t t t 1 f 701 "718" 100 0 1 0 circle_radius - )); DESCR("radius of circle"); -DATA(insert OID = 1471 ( circle_distance PGUID 11 f t t 2 f 701 "718 718" 100 0 1 0 circle_distance - )); +DATA(insert OID = 1471 ( circle_distance PGUID 11 f t t t 2 f 701 "718 718" 100 0 1 0 circle_distance - )); DESCR("distance between"); -DATA(insert OID = 1472 ( circle_center PGUID 11 f t t 1 f 600 "718" 100 0 1 0 circle_center - )); +DATA(insert OID = 1472 ( circle_center PGUID 11 f t t t 1 f 600 "718" 100 0 1 0 circle_center - )); DESCR("center of"); -DATA(insert OID = 1473 ( circle PGUID 11 f t t 2 f 718 "600 701" 100 0 1 0 circle - )); +DATA(insert OID = 1473 ( circle PGUID 11 f t t t 2 f 718 "600 701" 100 0 1 0 circle - )); DESCR("convert point and radius to circle"); -DATA(insert OID = 1474 ( circle PGUID 11 f t t 1 f 718 "604" 100 0 1 0 poly_circle - )); +DATA(insert OID = 1474 ( circle PGUID 11 f t t t 1 f 718 "604" 100 0 1 0 poly_circle - )); DESCR("convert polygon to circle"); -DATA(insert OID = 1475 ( polygon PGUID 11 f t t 2 f 604 "23 718" 100 0 1 0 circle_poly - )); +DATA(insert OID = 1475 ( polygon PGUID 11 f t t t 2 f 604 "23 718" 100 0 1 0 circle_poly - )); DESCR("convert vertex count and circle to polygon"); -DATA(insert OID = 1476 ( dist_pc PGUID 11 f t t 2 f 701 "600 718" 100 0 1 0 dist_pc - )); +DATA(insert OID = 1476 ( dist_pc PGUID 11 f t t t 2 f 701 "600 718" 100 0 1 0 dist_pc - )); DESCR("distance between point and circle"); -DATA(insert OID = 1477 ( circle_contain_pt PGUID 11 f t t 2 f 16 "718 600" 100 0 0 100 circle_contain_pt - )); +DATA(insert OID = 1477 ( circle_contain_pt PGUID 11 f t t t 2 f 16 "718 600" 100 0 0 100 circle_contain_pt - )); DESCR("circle contains point?"); -DATA(insert OID = 1478 ( pt_contained_circle PGUID 11 f t t 2 f 16 "600 718" 100 0 0 100 pt_contained_circle - )); +DATA(insert OID = 1478 ( pt_contained_circle PGUID 11 f t t t 2 f 16 "600 718" 100 0 0 100 pt_contained_circle - )); DESCR("point inside circle?"); -DATA(insert OID = 1479 ( circle PGUID 11 f t t 1 f 718 "603" 100 0 1 0 box_circle - )); +DATA(insert OID = 1479 ( circle PGUID 11 f t t t 1 f 718 "603" 100 0 1 0 box_circle - )); DESCR("convert box to circle"); -DATA(insert OID = 1480 ( box PGUID 11 f t t 1 f 603 "718" 100 0 1 0 circle_box - )); +DATA(insert OID = 1480 ( box PGUID 11 f t t t 1 f 603 "718" 100 0 1 0 circle_box - )); DESCR("convert circle to box"); -DATA(insert OID = 1481 ( tinterval PGUID 11 f t f 2 f 704 "702 702" 100 0 0 100 mktinterval - )); +DATA(insert OID = 1481 ( tinterval PGUID 11 f t f t 2 f 704 "702 702" 100 0 0 100 mktinterval - )); DESCR("convert to tinterval"); -DATA(insert OID = 1482 ( lseg_ne PGUID 11 f t t 2 f 16 "601 601" 100 0 0 100 lseg_ne - )); +DATA(insert OID = 1482 ( lseg_ne PGUID 11 f t t t 2 f 16 "601 601" 100 0 0 100 lseg_ne - )); DESCR("not equal"); -DATA(insert OID = 1483 ( lseg_lt PGUID 11 f t t 2 f 16 "601 601" 100 0 0 100 lseg_lt - )); +DATA(insert OID = 1483 ( lseg_lt PGUID 11 f t t t 2 f 16 "601 601" 100 0 0 100 lseg_lt - )); DESCR("less-than"); -DATA(insert OID = 1484 ( lseg_le PGUID 11 f t t 2 f 16 "601 601" 100 0 0 100 lseg_le - )); +DATA(insert OID = 1484 ( lseg_le PGUID 11 f t t t 2 f 16 "601 601" 100 0 0 100 lseg_le - )); DESCR("less-than-or-equal"); -DATA(insert OID = 1485 ( lseg_gt PGUID 11 f t t 2 f 16 "601 601" 100 0 0 100 lseg_gt - )); +DATA(insert OID = 1485 ( lseg_gt PGUID 11 f t t t 2 f 16 "601 601" 100 0 0 100 lseg_gt - )); DESCR("greater-than"); -DATA(insert OID = 1486 ( lseg_ge PGUID 11 f t t 2 f 16 "601 601" 100 0 0 100 lseg_ge - )); +DATA(insert OID = 1486 ( lseg_ge PGUID 11 f t t t 2 f 16 "601 601" 100 0 0 100 lseg_ge - )); DESCR("greater-than-or-equal"); -DATA(insert OID = 1487 ( lseg_length PGUID 11 f t t 1 f 701 "601" 100 0 1 0 lseg_length - )); +DATA(insert OID = 1487 ( lseg_length PGUID 11 f t t t 1 f 701 "601" 100 0 1 0 lseg_length - )); DESCR("distance between endpoints"); -DATA(insert OID = 1488 ( close_ls PGUID 11 f t t 2 f 600 "628 601" 100 0 10 100 close_ls - )); +DATA(insert OID = 1488 ( close_ls PGUID 11 f t t t 2 f 600 "628 601" 100 0 10 100 close_ls - )); DESCR("closest point to line on line segment"); -DATA(insert OID = 1489 ( close_lseg PGUID 11 f t t 2 f 600 "601 601" 100 0 10 100 close_lseg - )); +DATA(insert OID = 1489 ( close_lseg PGUID 11 f t t t 2 f 600 "601 601" 100 0 10 100 close_lseg - )); DESCR("closest point to line segment on line segment"); -DATA(insert OID = 1490 ( line_in PGUID 11 f t t 1 f 628 "0" 100 0 0 100 line_in - )); +DATA(insert OID = 1490 ( line_in PGUID 11 f t t t 1 f 628 "0" 100 0 0 100 line_in - )); DESCR("(internal)"); -DATA(insert OID = 1491 ( line_out PGUID 11 f t t 1 f 23 "0" 100 0 0 100 line_out - )); +DATA(insert OID = 1491 ( line_out PGUID 11 f t t t 1 f 23 "0" 100 0 0 100 line_out - )); DESCR("(internal)"); -DATA(insert OID = 1492 ( line_eq PGUID 11 f t t 2 f 16 "628 628" 100 0 0 100 line_eq - )); +DATA(insert OID = 1492 ( line_eq PGUID 11 f t t t 2 f 16 "628 628" 100 0 0 100 line_eq - )); DESCR("lines equal?"); -DATA(insert OID = 1493 ( line PGUID 11 f t t 2 f 628 "600 600" 100 0 0 100 line_construct_pp - )); +DATA(insert OID = 1493 ( line PGUID 11 f t t t 2 f 628 "600 600" 100 0 0 100 line_construct_pp - )); DESCR("line from points"); -DATA(insert OID = 1494 ( line_interpt PGUID 11 f t t 2 f 600 "628 628" 100 0 0 100 line_interpt - )); +DATA(insert OID = 1494 ( line_interpt PGUID 11 f t t t 2 f 600 "628 628" 100 0 0 100 line_interpt - )); DESCR("intersection point"); -DATA(insert OID = 1495 ( line_intersect PGUID 11 f t t 2 f 16 "628 628" 100 0 0 100 line_intersect - )); +DATA(insert OID = 1495 ( line_intersect PGUID 11 f t t t 2 f 16 "628 628" 100 0 0 100 line_intersect - )); DESCR("lines intersect?"); -DATA(insert OID = 1496 ( line_parallel PGUID 11 f t t 2 f 16 "628 628" 100 0 0 100 line_parallel - )); +DATA(insert OID = 1496 ( line_parallel PGUID 11 f t t t 2 f 16 "628 628" 100 0 0 100 line_parallel - )); DESCR("lines parallel?"); -DATA(insert OID = 1497 ( line_perp PGUID 11 f t t 2 f 16 "628 628" 100 0 0 100 line_perp - )); +DATA(insert OID = 1497 ( line_perp PGUID 11 f t t t 2 f 16 "628 628" 100 0 0 100 line_perp - )); DESCR("lines perpendicular?"); -DATA(insert OID = 1498 ( line_vertical PGUID 11 f t t 1 f 16 "628" 100 0 0 100 line_vertical - )); +DATA(insert OID = 1498 ( line_vertical PGUID 11 f t t t 1 f 16 "628" 100 0 0 100 line_vertical - )); DESCR("lines vertical?"); -DATA(insert OID = 1499 ( line_horizontal PGUID 11 f t t 1 f 16 "628" 100 0 0 100 line_horizontal - )); +DATA(insert OID = 1499 ( line_horizontal PGUID 11 f t t t 1 f 16 "628" 100 0 0 100 line_horizontal - )); DESCR("lines horizontal?"); /* OIDS 1500 - 1599 */ -DATA(insert OID = 1530 ( length PGUID 11 f t t 1 f 701 "601" 100 0 1 0 lseg_length - )); +DATA(insert OID = 1530 ( length PGUID 11 f t t t 1 f 701 "601" 100 0 1 0 lseg_length - )); DESCR("distance between endpoints"); -DATA(insert OID = 1531 ( length PGUID 11 f t t 1 f 701 "602" 100 0 1 0 path_length - )); +DATA(insert OID = 1531 ( length PGUID 11 f t t t 1 f 701 "602" 100 0 1 0 path_length - )); DESCR("sum of path segments"); -DATA(insert OID = 1532 ( point PGUID 11 f t t 1 f 600 "601" 100 0 0 100 lseg_center - )); +DATA(insert OID = 1532 ( point PGUID 11 f t t t 1 f 600 "601" 100 0 0 100 lseg_center - )); DESCR("center of"); -DATA(insert OID = 1533 ( point PGUID 11 f t t 1 f 600 "602" 100 0 0 100 path_center - )); +DATA(insert OID = 1533 ( point PGUID 11 f t t t 1 f 600 "602" 100 0 0 100 path_center - )); DESCR("center of"); -DATA(insert OID = 1534 ( point PGUID 11 f t t 1 f 600 "603" 100 1 0 100 box_center - )); +DATA(insert OID = 1534 ( point PGUID 11 f t t t 1 f 600 "603" 100 1 0 100 box_center - )); DESCR("center of"); -DATA(insert OID = 1540 ( point PGUID 11 f t t 1 f 600 "604" 100 0 0 100 poly_center - )); +DATA(insert OID = 1540 ( point PGUID 11 f t t t 1 f 600 "604" 100 0 0 100 poly_center - )); DESCR("center of"); -DATA(insert OID = 1541 ( lseg PGUID 11 f t t 1 f 601 "603" 100 0 0 100 box_diagonal - )); +DATA(insert OID = 1541 ( lseg PGUID 11 f t t t 1 f 601 "603" 100 0 0 100 box_diagonal - )); DESCR(""); -DATA(insert OID = 1542 ( center PGUID 11 f t t 1 f 600 "603" 100 1 0 100 box_center - )); +DATA(insert OID = 1542 ( center PGUID 11 f t t t 1 f 600 "603" 100 1 0 100 box_center - )); DESCR("center of"); -DATA(insert OID = 1543 ( center PGUID 11 f t t 1 f 600 "718" 100 0 1 0 circle_center - )); +DATA(insert OID = 1543 ( center PGUID 11 f t t t 1 f 600 "718" 100 0 1 0 circle_center - )); DESCR("center of"); -DATA(insert OID = 1544 ( polygon PGUID 14 f t t 1 f 604 "718" 100 0 0 100 "select polygon(12, $1)" - )); +DATA(insert OID = 1544 ( polygon PGUID 14 f t t t 1 f 604 "718" 100 0 0 100 "select polygon(12, $1)" - )); DESCR("convert circle to 12-vertex polygon"); -DATA(insert OID = 1545 ( npoints PGUID 11 f t t 1 f 23 "602" 100 0 0 100 path_npoints - )); +DATA(insert OID = 1545 ( npoints PGUID 11 f t t t 1 f 23 "602" 100 0 0 100 path_npoints - )); DESCR("# points in path"); -DATA(insert OID = 1556 ( npoints PGUID 11 f t t 1 f 23 "604" 100 0 0 100 poly_npoints - )); +DATA(insert OID = 1556 ( npoints PGUID 11 f t t t 1 f 23 "604" 100 0 0 100 poly_npoints - )); DESCR("number of points in polygon"); -DATA(insert OID = 1564 ( zpbit_in PGUID 11 f t t 1 f 1560 "0" 100 0 0 100 zpbit_in - )); +DATA(insert OID = 1564 ( zpbit_in PGUID 11 f t t t 1 f 1560 "0" 100 0 0 100 zpbit_in - )); DESCR("(internal)"); -DATA(insert OID = 1565 ( zpbit_out PGUID 11 f t t 1 f 23 "0" 100 0 0 100 zpbit_out - )); +DATA(insert OID = 1565 ( zpbit_out PGUID 11 f t t t 1 f 23 "0" 100 0 0 100 zpbit_out - )); DESCR("(internal)"); -DATA(insert OID = 1569 ( like PGUID 11 f t t 2 f 16 "25 25" 100 0 1 0 textlike - )); +DATA(insert OID = 1569 ( like PGUID 11 f t t t 2 f 16 "25 25" 100 0 1 0 textlike - )); DESCR("matches LIKE expression"); -DATA(insert OID = 1570 ( notlike PGUID 11 f t t 2 f 16 "25 25" 100 0 1 0 textnlike - )); +DATA(insert OID = 1570 ( notlike PGUID 11 f t t t 2 f 16 "25 25" 100 0 1 0 textnlike - )); DESCR("does not match LIKE expression"); -DATA(insert OID = 1571 ( like PGUID 11 f t t 2 f 16 "19 25" 100 0 0 100 namelike - )); +DATA(insert OID = 1571 ( like PGUID 11 f t t t 2 f 16 "19 25" 100 0 0 100 namelike - )); DESCR("matches LIKE expression"); -DATA(insert OID = 1572 ( notlike PGUID 11 f t t 2 f 16 "19 25" 100 0 0 100 namenlike - )); +DATA(insert OID = 1572 ( notlike PGUID 11 f t t t 2 f 16 "19 25" 100 0 0 100 namenlike - )); DESCR("does not match LIKE expression"); -DATA(insert OID = 1573 ( int8 PGUID 14 f t t 1 f 20 "20" 100 0 0 100 "select $1" - )); +DATA(insert OID = 1573 ( int8 PGUID 14 f t t t 1 f 20 "20" 100 0 0 100 "select $1" - )); DESCR("convert int8 to int8 (no-op)"); /* SEQUENCEs nextval & currval functions */ -DATA(insert OID = 1574 ( nextval PGUID 11 f t f 1 f 23 "25" 100 0 0 100 nextval - )); +DATA(insert OID = 1574 ( nextval PGUID 11 f t f t 1 f 23 "25" 100 0 0 100 nextval - )); DESCR("sequence next value"); -DATA(insert OID = 1575 ( currval PGUID 11 f t f 1 f 23 "25" 100 0 0 100 currval - )); +DATA(insert OID = 1575 ( currval PGUID 11 f t f t 1 f 23 "25" 100 0 0 100 currval - )); DESCR("sequence current value"); -DATA(insert OID = 1576 ( setval PGUID 11 f t f 2 f 23 "25 23" 100 0 0 100 setval - )); +DATA(insert OID = 1576 ( setval PGUID 11 f t f t 2 f 23 "25 23" 100 0 0 100 setval - )); DESCR("sequence set value"); -DATA(insert OID = 1579 ( varbit_in PGUID 11 f t t 1 f 1562 "0" 100 0 0 100 varbit_in - )); +DATA(insert OID = 1579 ( varbit_in PGUID 11 f t t t 1 f 1562 "0" 100 0 0 100 varbit_in - )); DESCR("(internal)"); -DATA(insert OID = 1580 ( varbit_out PGUID 11 f t t 1 f 23 "0" 100 0 0 100 varbit_out - )); +DATA(insert OID = 1580 ( varbit_out PGUID 11 f t t t 1 f 23 "0" 100 0 0 100 varbit_out - )); DESCR("(internal)"); -DATA(insert OID = 1581 ( biteq PGUID 11 f t t 2 f 16 "1560 1560" 100 0 1 0 biteq - )); +DATA(insert OID = 1581 ( biteq PGUID 11 f t t t 2 f 16 "1560 1560" 100 0 1 0 biteq - )); DESCR("equal"); -DATA(insert OID = 1582 ( bitne PGUID 11 f t t 2 f 16 "1560 1560" 100 0 1 0 bitne - )); +DATA(insert OID = 1582 ( bitne PGUID 11 f t t t 2 f 16 "1560 1560" 100 0 1 0 bitne - )); DESCR("not equal"); -DATA(insert OID = 1592 ( bitge PGUID 11 f t t 2 f 16 "1560 1560" 100 0 1 0 bitge - )); +DATA(insert OID = 1592 ( bitge PGUID 11 f t t t 2 f 16 "1560 1560" 100 0 1 0 bitge - )); DESCR("greater than or equal"); -DATA(insert OID = 1593 ( bitgt PGUID 11 f t t 2 f 16 "1560 1560" 100 0 1 0 bitgt - )); +DATA(insert OID = 1593 ( bitgt PGUID 11 f t t t 2 f 16 "1560 1560" 100 0 1 0 bitgt - )); DESCR("greater than"); -DATA(insert OID = 1594 ( bitle PGUID 11 f t t 2 f 16 "1560 1560" 100 0 1 0 bitle - )); +DATA(insert OID = 1594 ( bitle PGUID 11 f t t t 2 f 16 "1560 1560" 100 0 1 0 bitle - )); DESCR("less than or equal"); -DATA(insert OID = 1595 ( bitlt PGUID 11 f t t 2 f 16 "1560 1560" 100 0 1 0 bitlt - )); +DATA(insert OID = 1595 ( bitlt PGUID 11 f t t t 2 f 16 "1560 1560" 100 0 1 0 bitlt - )); DESCR("less than"); -DATA(insert OID = 1596 ( bitcmp PGUID 11 f t t 2 f 23 "1560 1560" 100 0 1 0 bitcmp - )); +DATA(insert OID = 1596 ( bitcmp PGUID 11 f t t t 2 f 23 "1560 1560" 100 0 1 0 bitcmp - )); DESCR("compare"); -DATA(insert OID = 1598 ( random PGUID 11 f t f 0 f 701 "0" 100 0 0 100 drandom - )); +DATA(insert OID = 1598 ( random PGUID 11 f t f t 0 f 701 "0" 100 0 0 100 drandom - )); DESCR("radians to degrees"); -DATA(insert OID = 1599 ( setseed PGUID 11 f t t 1 f 23 "701" 100 0 0 100 setseed - )); +DATA(insert OID = 1599 ( setseed PGUID 11 f t t t 1 f 23 "701" 100 0 0 100 setseed - )); DESCR("radians to degrees"); /* OIDS 1600 - 1699 */ -DATA(insert OID = 1600 ( asin PGUID 11 f t t 1 f 701 "701" 100 0 0 100 dasin - )); +DATA(insert OID = 1600 ( asin PGUID 11 f t t t 1 f 701 "701" 100 0 0 100 dasin - )); DESCR("arcsine"); -DATA(insert OID = 1601 ( acos PGUID 11 f t t 1 f 701 "701" 100 0 0 100 dacos - )); +DATA(insert OID = 1601 ( acos PGUID 11 f t t t 1 f 701 "701" 100 0 0 100 dacos - )); DESCR("arcsine"); -DATA(insert OID = 1602 ( atan PGUID 11 f t t 1 f 701 "701" 100 0 0 100 datan - )); +DATA(insert OID = 1602 ( atan PGUID 11 f t t t 1 f 701 "701" 100 0 0 100 datan - )); DESCR("arctangent"); -DATA(insert OID = 1603 ( atan2 PGUID 11 f t t 2 f 701 "701 701" 100 0 0 100 datan2 - )); +DATA(insert OID = 1603 ( atan2 PGUID 11 f t t t 2 f 701 "701 701" 100 0 0 100 datan2 - )); DESCR("arctangent, two arguments"); -DATA(insert OID = 1604 ( sin PGUID 11 f t t 1 f 701 "701" 100 0 0 100 dsin - )); +DATA(insert OID = 1604 ( sin PGUID 11 f t t t 1 f 701 "701" 100 0 0 100 dsin - )); DESCR("sine"); -DATA(insert OID = 1605 ( cos PGUID 11 f t t 1 f 701 "701" 100 0 0 100 dcos - )); +DATA(insert OID = 1605 ( cos PGUID 11 f t t t 1 f 701 "701" 100 0 0 100 dcos - )); DESCR("cosine"); -DATA(insert OID = 1606 ( tan PGUID 11 f t t 1 f 701 "701" 100 0 0 100 dtan - )); +DATA(insert OID = 1606 ( tan PGUID 11 f t t t 1 f 701 "701" 100 0 0 100 dtan - )); DESCR("tangent"); -DATA(insert OID = 1607 ( cot PGUID 11 f t t 1 f 701 "701" 100 0 0 100 dcot - )); +DATA(insert OID = 1607 ( cot PGUID 11 f t t t 1 f 701 "701" 100 0 0 100 dcot - )); DESCR("cotangent"); -DATA(insert OID = 1608 ( degrees PGUID 11 f t t 1 f 701 "701" 100 0 0 100 degrees - )); +DATA(insert OID = 1608 ( degrees PGUID 11 f t t t 1 f 701 "701" 100 0 0 100 degrees - )); DESCR("radians to degrees"); -DATA(insert OID = 1609 ( radians PGUID 11 f t t 1 f 701 "701" 100 0 0 100 radians - )); +DATA(insert OID = 1609 ( radians PGUID 11 f t t t 1 f 701 "701" 100 0 0 100 radians - )); DESCR("radians to degrees"); -DATA(insert OID = 1610 ( pi PGUID 11 f t t 0 f 701 "0" 100 0 0 100 dpi - )); +DATA(insert OID = 1610 ( pi PGUID 11 f t t t 0 f 701 "0" 100 0 0 100 dpi - )); DESCR("PI"); -DATA(insert OID = 1618 ( interval_mul PGUID 11 f t t 2 f 1186 "1186 701" 100 0 0 100 interval_mul - )); +DATA(insert OID = 1618 ( interval_mul PGUID 11 f t t t 2 f 1186 "1186 701" 100 0 0 100 interval_mul - )); DESCR("multiply interval"); -DATA(insert OID = 1619 ( varchar PGUID 11 f t t 1 f 1043 "23" 100 0 0 100 int4_text - )); +DATA(insert OID = 1619 ( varchar PGUID 11 f t t t 1 f 1043 "23" 100 0 0 100 int4_text - )); DESCR("convert int4 to varchar"); -DATA(insert OID = 1620 ( ascii PGUID 11 f t t 1 f 23 "25" 100 0 0 100 ascii - )); +DATA(insert OID = 1620 ( ascii PGUID 11 f t t t 1 f 23 "25" 100 0 0 100 ascii - )); DESCR("convert first char to int4"); -DATA(insert OID = 1621 ( ichar PGUID 11 f t t 1 f 25 "23" 100 0 0 100 ichar - )); +DATA(insert OID = 1621 ( ichar PGUID 11 f t t t 1 f 25 "23" 100 0 0 100 ichar - )); DESCR("convert int4 to char"); -DATA(insert OID = 1622 ( repeat PGUID 11 f t t 2 f 25 "25 23" 100 0 0 100 repeat - )); +DATA(insert OID = 1622 ( repeat PGUID 11 f t t t 2 f 25 "25 23" 100 0 0 100 repeat - )); DESCR("replicate string int4 times"); -DATA(insert OID = 1623 ( varchar PGUID 11 f t t 1 f 1043 "20" 100 0 0 100 int8_text - )); +DATA(insert OID = 1623 ( varchar PGUID 11 f t t t 1 f 1043 "20" 100 0 0 100 int8_text - )); DESCR("convert int8 to varchar"); -DATA(insert OID = 1624 ( mul_d_interval PGUID 11 f t t 2 f 1186 "701 1186" 100 0 0 100 mul_d_interval - )); +DATA(insert OID = 1624 ( mul_d_interval PGUID 11 f t t t 2 f 1186 "701 1186" 100 0 0 100 mul_d_interval - )); /* OID's 1625 - 1639 LZTEXT data type */ -DATA(insert OID = 1626 ( lztextin PGUID 11 f t t 1 f 1625 "0" 100 0 0 100 lztextin - )); +DATA(insert OID = 1626 ( lztextin PGUID 11 f t t t 1 f 1625 "0" 100 0 0 100 lztextin - )); DESCR("(internal)"); -DATA(insert OID = 1627 ( lztextout PGUID 11 f t t 1 f 23 "0" 100 0 0 100 lztextout - )); +DATA(insert OID = 1627 ( lztextout PGUID 11 f t t t 1 f 23 "0" 100 0 0 100 lztextout - )); DESCR("(internal)"); -DATA(insert OID = 1629 ( text PGUID 11 f t t 1 f 25 "1625" 100 0 0 100 lztext_text -)); +DATA(insert OID = 1629 ( text PGUID 11 f t t t 1 f 25 "1625" 100 0 0 100 lztext_text -)); DESCR("convert lztext to text"); -DATA(insert OID = 1631 ( lztext PGUID 11 f t t 1 f 1625 "25" 100 0 0 100 text_lztext -)); +DATA(insert OID = 1631 ( lztext PGUID 11 f t t t 1 f 1625 "25" 100 0 0 100 text_lztext -)); DESCR("convert text to lztext"); -DATA(insert OID = 1632 ( lztext PGUID 14 f t t 1 f 1625 "1625" 100 0 0 100 "select $1" -)); +DATA(insert OID = 1632 ( lztext PGUID 14 f t t t 1 f 1625 "1625" 100 0 0 100 "select $1" -)); DESCR("convert text to lztext"); -DATA(insert OID = 1633 ( char_length PGUID 11 f t t 1 f 23 "1625" 100 0 1 0 lztextlen - )); +DATA(insert OID = 1633 ( char_length PGUID 11 f t t t 1 f 23 "1625" 100 0 1 0 lztextlen - )); DESCR("length"); -DATA(insert OID = 1634 ( length PGUID 11 f t t 1 f 23 "1625" 100 0 1 0 lztextlen - )); +DATA(insert OID = 1634 ( length PGUID 11 f t t t 1 f 23 "1625" 100 0 1 0 lztextlen - )); DESCR("length"); -DATA(insert OID = 1635 ( octet_length PGUID 11 f t t 1 f 23 "1625" 100 0 1 0 lztextoctetlen - )); +DATA(insert OID = 1635 ( octet_length PGUID 11 f t t t 1 f 23 "1625" 100 0 1 0 lztextoctetlen - )); DESCR("octet length"); -DATA(insert OID = 1636 ( lztext_cmp PGUID 11 f t t 2 f 23 "1625 1625" 100 0 1 0 lztext_cmp - )); +DATA(insert OID = 1636 ( lztext_cmp PGUID 11 f t t t 2 f 23 "1625 1625" 100 0 1 0 lztext_cmp - )); DESCR("compare lztext"); -DATA(insert OID = 1637 ( lztext_eq PGUID 11 f t t 2 f 16 "1625 1625" 100 0 1 0 lztext_eq - )); +DATA(insert OID = 1637 ( lztext_eq PGUID 11 f t t t 2 f 16 "1625 1625" 100 0 1 0 lztext_eq - )); DESCR("equal"); -DATA(insert OID = 1638 ( lztext_ne PGUID 11 f t t 2 f 16 "1625 1625" 100 0 1 0 lztext_ne - )); +DATA(insert OID = 1638 ( lztext_ne PGUID 11 f t t t 2 f 16 "1625 1625" 100 0 1 0 lztext_ne - )); DESCR("not equal"); -DATA(insert OID = 1639 ( lztext_gt PGUID 11 f t t 2 f 16 "1625 1625" 100 0 1 0 lztext_gt - )); +DATA(insert OID = 1639 ( lztext_gt PGUID 11 f t t t 2 f 16 "1625 1625" 100 0 1 0 lztext_gt - )); DESCR("greater-than"); -DATA(insert OID = 1664 ( lztext_ge PGUID 11 f t t 2 f 16 "1625 1625" 100 0 1 0 lztext_ge - )); +DATA(insert OID = 1664 ( lztext_ge PGUID 11 f t t t 2 f 16 "1625 1625" 100 0 1 0 lztext_ge - )); DESCR("greater-than-or-equal"); -DATA(insert OID = 1665 ( lztext_lt PGUID 11 f t t 2 f 16 "1625 1625" 100 0 1 0 lztext_lt - )); +DATA(insert OID = 1665 ( lztext_lt PGUID 11 f t t t 2 f 16 "1625 1625" 100 0 1 0 lztext_lt - )); DESCR("less-than"); -DATA(insert OID = 1656 ( lztext_le PGUID 11 f t t 2 f 16 "1625 1625" 100 0 1 0 lztext_le - )); +DATA(insert OID = 1656 ( lztext_le PGUID 11 f t t t 2 f 16 "1625 1625" 100 0 1 0 lztext_le - )); DESCR("less-than-or-equal"); +DATA(insert OID = 1689 ( update_pg_pwd PGUID 11 f t f t 0 f 0 "" 100 0 0 100 update_pg_pwd - )); +DESCR("update pg_pwd file"); + /* Oracle Compatibility Related Functions - By Edmund Mergl */ -DATA(insert OID = 868 ( strpos PGUID 11 f t t 2 f 23 "25 25" 100 0 0 100 textpos - )); +DATA(insert OID = 868 ( strpos PGUID 11 f t t t 2 f 23 "25 25" 100 0 0 100 textpos - )); DESCR("find position of substring"); -DATA(insert OID = 870 ( lower PGUID 11 f t t 1 f 25 "25" 100 0 0 100 lower - )); +DATA(insert OID = 870 ( lower PGUID 11 f t t t 1 f 25 "25" 100 0 0 100 lower - )); DESCR("lowercase"); -DATA(insert OID = 871 ( upper PGUID 11 f t t 1 f 25 "25" 100 0 0 100 upper - )); +DATA(insert OID = 871 ( upper PGUID 11 f t t t 1 f 25 "25" 100 0 0 100 upper - )); DESCR("uppercase"); -DATA(insert OID = 872 ( initcap PGUID 11 f t t 1 f 25 "25" 100 0 0 100 initcap - )); +DATA(insert OID = 872 ( initcap PGUID 11 f t t t 1 f 25 "25" 100 0 0 100 initcap - )); DESCR("capitalize each word"); -DATA(insert OID = 873 ( lpad PGUID 11 f t t 3 f 25 "25 23 25" 100 0 0 100 lpad - )); +DATA(insert OID = 873 ( lpad PGUID 11 f t t t 3 f 25 "25 23 25" 100 0 0 100 lpad - )); DESCR("left-pad string to length"); -DATA(insert OID = 874 ( rpad PGUID 11 f t t 3 f 25 "25 23 25" 100 0 0 100 rpad - )); +DATA(insert OID = 874 ( rpad PGUID 11 f t t t 3 f 25 "25 23 25" 100 0 0 100 rpad - )); DESCR("right-pad string to length"); -DATA(insert OID = 875 ( ltrim PGUID 11 f t t 2 f 25 "25 25" 100 0 0 100 ltrim - )); +DATA(insert OID = 875 ( ltrim PGUID 11 f t t t 2 f 25 "25 25" 100 0 0 100 ltrim - )); DESCR("left-pad string to length"); -DATA(insert OID = 876 ( rtrim PGUID 11 f t t 2 f 25 "25 25" 100 0 0 100 rtrim - )); +DATA(insert OID = 876 ( rtrim PGUID 11 f t t t 2 f 25 "25 25" 100 0 0 100 rtrim - )); DESCR("right-pad string to length"); -DATA(insert OID = 877 ( substr PGUID 11 f t t 3 f 25 "25 23 23" 100 0 0 100 text_substr - )); +DATA(insert OID = 877 ( substr PGUID 11 f t t t 3 f 25 "25 23 23" 100 0 0 100 text_substr - )); DESCR("return portion of string"); -DATA(insert OID = 878 ( translate PGUID 11 f t t 3 f 25 "25 25 25" 100 0 0 100 translate - )); +DATA(insert OID = 878 ( translate PGUID 11 f t t t 3 f 25 "25 25 25" 100 0 0 100 translate - )); DESCR("modify string by substring replacement"); -DATA(insert OID = 879 ( lpad PGUID 14 f t t 2 f 25 "25 23" 100 0 0 100 "select lpad($1, $2, \' \')" - )); +DATA(insert OID = 879 ( lpad PGUID 14 f t t t 2 f 25 "25 23" 100 0 0 100 "select lpad($1, $2, \' \')" - )); DESCR("left-pad string to length"); -DATA(insert OID = 880 ( rpad PGUID 14 f t t 2 f 25 "25 23" 100 0 0 100 "select rpad($1, $2, \' \')" - )); +DATA(insert OID = 880 ( rpad PGUID 14 f t t t 2 f 25 "25 23" 100 0 0 100 "select rpad($1, $2, \' \')" - )); DESCR("right-pad string to length"); -DATA(insert OID = 881 ( ltrim PGUID 14 f t t 1 f 25 "25" 100 0 0 100 "select ltrim($1, \' \')" - )); +DATA(insert OID = 881 ( ltrim PGUID 14 f t t t 1 f 25 "25" 100 0 0 100 "select ltrim($1, \' \')" - )); DESCR("remove initial characters from string"); -DATA(insert OID = 882 ( rtrim PGUID 14 f t t 1 f 25 "25" 100 0 0 100 "select rtrim($1, \' \')" - )); +DATA(insert OID = 882 ( rtrim PGUID 14 f t t t 1 f 25 "25" 100 0 0 100 "select rtrim($1, \' \')" - )); DESCR("remove trailing characters from string"); -DATA(insert OID = 883 ( substr PGUID 14 f t t 2 f 25 "25 23" 100 0 0 100 "select substr($1, $2, -1)" - )); +DATA(insert OID = 883 ( substr PGUID 14 f t t t 2 f 25 "25 23" 100 0 0 100 "select substr($1, $2, -1)" - )); DESCR("return portion of string"); -DATA(insert OID = 884 ( btrim PGUID 11 f t t 2 f 25 "25 25" 100 0 0 100 btrim - )); +DATA(insert OID = 884 ( btrim PGUID 11 f t t t 2 f 25 "25 25" 100 0 0 100 btrim - )); DESCR("trim both ends of string"); -DATA(insert OID = 885 ( btrim PGUID 14 f t t 1 f 25 "25" 100 0 0 100 "select btrim($1, \' \')" - )); +DATA(insert OID = 885 ( btrim PGUID 14 f t t t 1 f 25 "25" 100 0 0 100 "select btrim($1, \' \')" - )); DESCR("trim both ends of string"); /* for multi-byte support */ -DATA(insert OID = 1039 ( getdatabaseencoding PGUID 11 f t f 0 f 19 "0" 100 0 0 100 getdatabaseencoding - )); +DATA(insert OID = 1039 ( getdatabaseencoding PGUID 11 f t f t 0 f 19 "0" 100 0 0 100 getdatabaseencoding - )); DESCR("encoding name of current database"); -DATA(insert OID = 1295 ( pg_char_to_encoding PGUID 11 f t f 1 f 23 "19" 100 0 0 100 pg_char_to_encoding - )); +DATA(insert OID = 1295 ( pg_char_to_encoding PGUID 11 f t f t 1 f 23 "19" 100 0 0 100 pg_char_to_encoding - )); DESCR("convert encoding name to encoding id"); -DATA(insert OID = 1597 ( pg_encoding_to_char PGUID 11 f t f 1 f 19 "23" 100 0 0 100 pg_encoding_to_char - )); +DATA(insert OID = 1597 ( pg_encoding_to_char PGUID 11 f t f t 1 f 19 "23" 100 0 0 100 pg_encoding_to_char - )); DESCR("convert encoding id to encoding name"); /* System-view support functions */ -DATA(insert OID = 1640 ( pg_get_ruledef PGUID 11 f t f 1 f 25 "19" 100 0 0 100 pg_get_ruledef - )); +DATA(insert OID = 1640 ( pg_get_ruledef PGUID 11 f t f t 1 f 25 "19" 100 0 0 100 pg_get_ruledef - )); DESCR("source text of a rule"); -DATA(insert OID = 1641 ( pg_get_viewdef PGUID 11 f t f 1 f 25 "19" 100 0 0 100 pg_get_viewdef - )); +DATA(insert OID = 1641 ( pg_get_viewdef PGUID 11 f t f t 1 f 25 "19" 100 0 0 100 pg_get_viewdef - )); DESCR("select statement of a view"); -DATA(insert OID = 1642 ( pg_get_userbyid PGUID 11 f t f 1 f 19 "23" 100 0 0 100 pg_get_userbyid - )); +DATA(insert OID = 1642 ( pg_get_userbyid PGUID 11 f t f t 1 f 19 "23" 100 0 0 100 pg_get_userbyid - )); DESCR("user name by UID (with fallback)"); -DATA(insert OID = 1643 ( pg_get_indexdef PGUID 11 f t f 1 f 25 "26" 100 0 0 100 pg_get_indexdef - )); +DATA(insert OID = 1643 ( pg_get_indexdef PGUID 11 f t f t 1 f 25 "26" 100 0 0 100 pg_get_indexdef - )); DESCR("index description"); /* Generic referential integrity constraint triggers */ -DATA(insert OID = 1644 ( RI_FKey_check_ins PGUID 11 f t f 0 f 0 "" 100 0 0 100 RI_FKey_check_ins - )); +DATA(insert OID = 1644 ( RI_FKey_check_ins PGUID 11 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_check_ins - )); DESCR("referential integrity FOREIGN KEY ... REFERENCES"); -DATA(insert OID = 1645 ( RI_FKey_check_upd PGUID 11 f t f 0 f 0 "" 100 0 0 100 RI_FKey_check_upd - )); +DATA(insert OID = 1645 ( RI_FKey_check_upd PGUID 11 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_check_upd - )); DESCR("referential integrity FOREIGN KEY ... REFERENCES"); -DATA(insert OID = 1646 ( RI_FKey_cascade_del PGUID 11 f t f 0 f 0 "" 100 0 0 100 RI_FKey_cascade_del - )); +DATA(insert OID = 1646 ( RI_FKey_cascade_del PGUID 11 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_cascade_del - )); DESCR("referential integrity ON DELETE CASCADE"); -DATA(insert OID = 1647 ( RI_FKey_cascade_upd PGUID 11 f t f 0 f 0 "" 100 0 0 100 RI_FKey_cascade_upd - )); +DATA(insert OID = 1647 ( RI_FKey_cascade_upd PGUID 11 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_cascade_upd - )); DESCR("referential integrity ON UPDATE CASCADE"); -DATA(insert OID = 1648 ( RI_FKey_restrict_del PGUID 11 f t f 0 f 0 "" 100 0 0 100 RI_FKey_restrict_del - )); +DATA(insert OID = 1648 ( RI_FKey_restrict_del PGUID 11 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_restrict_del - )); DESCR("referential integrity ON DELETE RESTRICT"); -DATA(insert OID = 1649 ( RI_FKey_restrict_upd PGUID 11 f t f 0 f 0 "" 100 0 0 100 RI_FKey_restrict_upd - )); +DATA(insert OID = 1649 ( RI_FKey_restrict_upd PGUID 11 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_restrict_upd - )); DESCR("referential integrity ON UPDATE RESTRICT"); -DATA(insert OID = 1650 ( RI_FKey_setnull_del PGUID 11 f t f 0 f 0 "" 100 0 0 100 RI_FKey_setnull_del - )); +DATA(insert OID = 1650 ( RI_FKey_setnull_del PGUID 11 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_setnull_del - )); DESCR("referential integrity ON DELETE SET NULL"); -DATA(insert OID = 1651 ( RI_FKey_setnull_upd PGUID 11 f t f 0 f 0 "" 100 0 0 100 RI_FKey_setnull_upd - )); +DATA(insert OID = 1651 ( RI_FKey_setnull_upd PGUID 11 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_setnull_upd - )); DESCR("referential integrity ON UPDATE SET NULL"); -DATA(insert OID = 1652 ( RI_FKey_setdefault_del PGUID 11 f t f 0 f 0 "" 100 0 0 100 RI_FKey_setdefault_del - )); +DATA(insert OID = 1652 ( RI_FKey_setdefault_del PGUID 11 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_setdefault_del - )); DESCR("referential integrity ON DELETE SET DEFAULT"); -DATA(insert OID = 1653 ( RI_FKey_setdefault_upd PGUID 11 f t f 0 f 0 "" 100 0 0 100 RI_FKey_setdefault_upd - )); +DATA(insert OID = 1653 ( RI_FKey_setdefault_upd PGUID 11 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_setdefault_upd - )); DESCR("referential integrity ON UPDATE SET DEFAULT"); -DATA(insert OID = 1654 ( RI_FKey_noaction_del PGUID 11 f t f 0 f 0 "" 100 0 0 100 RI_FKey_noaction_del - )); +DATA(insert OID = 1654 ( RI_FKey_noaction_del PGUID 11 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_noaction_del - )); DESCR("referential integrity ON DELETE NO ACTION"); -DATA(insert OID = 1655 ( RI_FKey_noaction_upd PGUID 11 f t f 0 f 0 "" 100 0 0 100 RI_FKey_noaction_upd - )); +DATA(insert OID = 1655 ( RI_FKey_noaction_upd PGUID 11 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_noaction_upd - )); DESCR("referential integrity ON UPDATE NO ACTION"); -DATA(insert OID = 1666 ( varbiteq PGUID 11 f t t 2 f 16 "1562 1562" 100 0 1 0 varbiteq - )); +DATA(insert OID = 1666 ( varbiteq PGUID 11 f t t t 2 f 16 "1562 1562" 100 0 1 0 varbiteq - )); DESCR("equal"); -DATA(insert OID = 1667 ( varbitne PGUID 11 f t t 2 f 16 "1562 1562" 100 0 1 0 varbitne - )); +DATA(insert OID = 1667 ( varbitne PGUID 11 f t t t 2 f 16 "1562 1562" 100 0 1 0 varbitne - )); DESCR("not equal"); -DATA(insert OID = 1668 ( varbitge PGUID 11 f t t 2 f 16 "1562 1562" 100 0 1 0 varbitge - )); +DATA(insert OID = 1668 ( varbitge PGUID 11 f t t t 2 f 16 "1562 1562" 100 0 1 0 varbitge - )); DESCR("greater than or equal"); -DATA(insert OID = 1669 ( varbitgt PGUID 11 f t t 2 f 16 "1562 1562" 100 0 1 0 varbitgt - )); +DATA(insert OID = 1669 ( varbitgt PGUID 11 f t t t 2 f 16 "1562 1562" 100 0 1 0 varbitgt - )); DESCR("greater than"); -DATA(insert OID = 1670 ( varbitle PGUID 11 f t t 2 f 16 "1562 1562" 100 0 1 0 varbitle - )); +DATA(insert OID = 1670 ( varbitle PGUID 11 f t t t 2 f 16 "1562 1562" 100 0 1 0 varbitle - )); DESCR("less than or equal"); -DATA(insert OID = 1671 ( varbitlt PGUID 11 f t t 2 f 16 "1562 1562" 100 0 1 0 varbitlt - )); +DATA(insert OID = 1671 ( varbitlt PGUID 11 f t t t 2 f 16 "1562 1562" 100 0 1 0 varbitlt - )); DESCR("less than"); -DATA(insert OID = 1672 ( varbitcmp PGUID 11 f t t 2 f 23 "1562 1562" 100 0 1 0 varbitcmp - )); +DATA(insert OID = 1672 ( varbitcmp PGUID 11 f t t t 2 f 23 "1562 1562" 100 0 1 0 varbitcmp - )); DESCR("compare"); -DATA(insert OID = 1673 ( bitand PGUID 11 f t t 2 f 1560 "1560 1560" 100 0 1 0 bitand - )); +DATA(insert OID = 1673 ( bitand PGUID 11 f t t t 2 f 1560 "1560 1560" 100 0 1 0 bitand - )); DESCR("bitwise and"); -DATA(insert OID = 1674 ( bitor PGUID 11 f t t 2 f 1560 "1560 1560" 100 0 1 0 bitor - )); +DATA(insert OID = 1674 ( bitor PGUID 11 f t t t 2 f 1560 "1560 1560" 100 0 1 0 bitor - )); DESCR("bitwise or"); -DATA(insert OID = 1675 ( bitxor PGUID 11 f t t 2 f 1560 "1560 1560" 100 0 1 0 bitxor - )); +DATA(insert OID = 1675 ( bitxor PGUID 11 f t t t 2 f 1560 "1560 1560" 100 0 1 0 bitxor - )); DESCR("bitwise exclusive or"); -DATA(insert OID = 1676 ( bitnot PGUID 11 f t t 2 f 1560 "1560 1560" 100 0 1 0 bitnot - )); +DATA(insert OID = 1676 ( bitnot PGUID 11 f t t t 2 f 1560 "1560 1560" 100 0 1 0 bitnot - )); DESCR("bitwise negation"); -DATA(insert OID = 1677 ( bitshiftright PGUID 11 f t t 2 f 1560 "1560 1560" 100 0 1 0 bitshiftright - )); +DATA(insert OID = 1677 ( bitshiftright PGUID 11 f t t t 2 f 1560 "1560 1560" 100 0 1 0 bitshiftright - )); DESCR("bitwise right shift"); -DATA(insert OID = 1678 ( bitshiftleft PGUID 11 f t t 2 f 1560 "1560 1560" 100 0 1 0 bitshiftleft - )); +DATA(insert OID = 1678 ( bitshiftleft PGUID 11 f t t t 2 f 1560 "1560 1560" 100 0 1 0 bitshiftleft - )); DESCR("bitwise left shift"); -DATA(insert OID = 1679 ( bitcat PGUID 11 f t t 2 f 1560 "1560 1560" 100 0 1 0 bitcat - )); +DATA(insert OID = 1679 ( bitcat PGUID 11 f t t t 2 f 1560 "1560 1560" 100 0 1 0 bitcat - )); DESCR("bitwise concatenation"); -DATA(insert OID = 1680 ( bitsubstr PGUID 11 f t t 2 f 1560 "1560 1560" 100 0 1 0 bitsubstr - )); +DATA(insert OID = 1680 ( bitsubstr PGUID 11 f t t t 2 f 1560 "1560 1560" 100 0 1 0 bitsubstr - )); DESCR("bitwise field"); -DATA(insert OID = 1681 ( varbitand PGUID 11 f t t 2 f 1562 "1562 1562" 100 0 1 0 varbitand - )); +DATA(insert OID = 1681 ( varbitand PGUID 11 f t t t 2 f 1562 "1562 1562" 100 0 1 0 varbitand - )); DESCR("bitwise and"); -DATA(insert OID = 1682 ( varbitor PGUID 11 f t t 2 f 1562 "1562 1562" 100 0 1 0 varbitor - )); +DATA(insert OID = 1682 ( varbitor PGUID 11 f t t t 2 f 1562 "1562 1562" 100 0 1 0 varbitor - )); DESCR("bitwise or"); -DATA(insert OID = 1683 ( varbitxor PGUID 11 f t t 2 f 1562 "1562 1562" 100 0 1 0 varbitxor - )); +DATA(insert OID = 1683 ( varbitxor PGUID 11 f t t t 2 f 1562 "1562 1562" 100 0 1 0 varbitxor - )); DESCR("bitwise exclusive or"); -DATA(insert OID = 1684 ( varbitnot PGUID 11 f t t 2 f 1562 "1562 1562" 100 0 1 0 varbitnot - )); +DATA(insert OID = 1684 ( varbitnot PGUID 11 f t t t 2 f 1562 "1562 1562" 100 0 1 0 varbitnot - )); DESCR("bitwise negation"); -DATA(insert OID = 1685 ( varbitshiftright PGUID 11 f t t 2 f 1562 "1562 1562" 100 0 1 0 varbitshiftright - )); +DATA(insert OID = 1685 ( varbitshiftright PGUID 11 f t t t 2 f 1562 "1562 1562" 100 0 1 0 varbitshiftright - )); DESCR("bitwise right shift"); -DATA(insert OID = 1686 ( varbitshiftleft PGUID 11 f t t 2 f 1562 "1562 1562" 100 0 1 0 varbitshiftleft - )); +DATA(insert OID = 1686 ( varbitshiftleft PGUID 11 f t t t 2 f 1562 "1562 1562" 100 0 1 0 varbitshiftleft - )); DESCR("bitwise left shift"); -DATA(insert OID = 1687 ( varbitcat PGUID 11 f t t 2 f 1562 "1562 1562" 100 0 1 0 varbitcat - )); +DATA(insert OID = 1687 ( varbitcat PGUID 11 f t t t 2 f 1562 "1562 1562" 100 0 1 0 varbitcat - )); DESCR("bitwise concatenation"); -DATA(insert OID = 1688 ( varbitsubstr PGUID 11 f t t 2 f 1562 "1562 1562" 100 0 1 0 varbitsubstr - )); +DATA(insert OID = 1688 ( varbitsubstr PGUID 11 f t t t 2 f 1562 "1562 1562" 100 0 1 0 varbitsubstr - )); DESCR("bitwise field"); /* for mac type support */ -DATA(insert OID = 436 ( macaddr_in PGUID 11 f t t 1 f 829 "0" 100 0 0 100 macaddr_in - )); +DATA(insert OID = 436 ( macaddr_in PGUID 11 f t t t 1 f 829 "0" 100 0 0 100 macaddr_in - )); DESCR("(internal)"); -DATA(insert OID = 437 ( macaddr_out PGUID 11 f t t 1 f 23 "0" 100 0 0 100 macaddr_out - )); +DATA(insert OID = 437 ( macaddr_out PGUID 11 f t t t 1 f 23 "0" 100 0 0 100 macaddr_out - )); DESCR("(internal)"); -DATA(insert OID = 830 ( macaddr_eq PGUID 11 f t t 2 f 16 "829 829" 100 0 0 100 macaddr_eq - )); +DATA(insert OID = 830 ( macaddr_eq PGUID 11 f t t t 2 f 16 "829 829" 100 0 0 100 macaddr_eq - )); DESCR("equal"); -DATA(insert OID = 831 ( macaddr_lt PGUID 11 f t t 2 f 16 "829 829" 100 0 0 100 macaddr_lt - )); +DATA(insert OID = 831 ( macaddr_lt PGUID 11 f t t t 2 f 16 "829 829" 100 0 0 100 macaddr_lt - )); DESCR("less-than"); -DATA(insert OID = 832 ( macaddr_le PGUID 11 f t t 2 f 16 "829 829" 100 0 0 100 macaddr_le - )); +DATA(insert OID = 832 ( macaddr_le PGUID 11 f t t t 2 f 16 "829 829" 100 0 0 100 macaddr_le - )); DESCR("less-than-or-equal"); -DATA(insert OID = 833 ( macaddr_gt PGUID 11 f t t 2 f 16 "829 829" 100 0 0 100 macaddr_gt - )); +DATA(insert OID = 833 ( macaddr_gt PGUID 11 f t t t 2 f 16 "829 829" 100 0 0 100 macaddr_gt - )); DESCR("greater-than"); -DATA(insert OID = 834 ( macaddr_ge PGUID 11 f t t 2 f 16 "829 829" 100 0 0 100 macaddr_ge - )); +DATA(insert OID = 834 ( macaddr_ge PGUID 11 f t t t 2 f 16 "829 829" 100 0 0 100 macaddr_ge - )); DESCR("greater-than-or-equal"); -DATA(insert OID = 835 ( macaddr_ne PGUID 11 f t t 2 f 16 "829 829" 100 0 0 100 macaddr_ne - )); +DATA(insert OID = 835 ( macaddr_ne PGUID 11 f t t t 2 f 16 "829 829" 100 0 0 100 macaddr_ne - )); DESCR("not equal"); -DATA(insert OID = 836 ( macaddr_cmp PGUID 11 f t t 2 f 23 "829 829" 100 0 0 100 macaddr_cmp - )); +DATA(insert OID = 836 ( macaddr_cmp PGUID 11 f t t t 2 f 23 "829 829" 100 0 0 100 macaddr_cmp - )); DESCR("less-equal-greater"); -DATA(insert OID = 837 ( macaddr_manuf PGUID 11 f t t 1 f 25 "829" 100 0 0 100 macaddr_manuf - )); +DATA(insert OID = 837 ( macaddr_manuf PGUID 11 f t t t 1 f 25 "829" 100 0 0 100 macaddr_manuf - )); DESCR("MAC manufacturer"); /* for inet type support */ -DATA(insert OID = 910 ( inet_in PGUID 11 f t t 1 f 869 "0" 100 0 0 100 inet_in - )); +DATA(insert OID = 910 ( inet_in PGUID 11 f t t t 1 f 869 "0" 100 0 0 100 inet_in - )); DESCR("(internal)"); -DATA(insert OID = 911 ( inet_out PGUID 11 f t t 1 f 23 "0" 100 0 0 100 inet_out - )); +DATA(insert OID = 911 ( inet_out PGUID 11 f t t t 1 f 23 "0" 100 0 0 100 inet_out - )); DESCR("(internal)"); /* for cidr type support */ -DATA(insert OID = 1267 ( cidr_in PGUID 11 f t t 1 f 650 "0" 100 0 0 100 cidr_in - )); +DATA(insert OID = 1267 ( cidr_in PGUID 11 f t t t 1 f 650 "0" 100 0 0 100 cidr_in - )); DESCR("(internal)"); -DATA(insert OID = 1427 ( cidr_out PGUID 11 f t t 1 f 23 "0" 100 0 0 100 cidr_out - )); +DATA(insert OID = 1427 ( cidr_out PGUID 11 f t t t 1 f 23 "0" 100 0 0 100 cidr_out - )); DESCR("(internal)"); /* these are used for both inet and cidr */ -DATA(insert OID = 920 ( network_eq PGUID 11 f t t 2 f 16 "869 869" 100 0 0 100 network_eq - )); +DATA(insert OID = 920 ( network_eq PGUID 11 f t t t 2 f 16 "869 869" 100 0 0 100 network_eq - )); DESCR("equal"); -DATA(insert OID = 921 ( network_lt PGUID 11 f t t 2 f 16 "869 869" 100 0 0 100 network_lt - )); +DATA(insert OID = 921 ( network_lt PGUID 11 f t t t 2 f 16 "869 869" 100 0 0 100 network_lt - )); DESCR("less-than"); -DATA(insert OID = 922 ( network_le PGUID 11 f t t 2 f 16 "869 869" 100 0 0 100 network_le - )); +DATA(insert OID = 922 ( network_le PGUID 11 f t t t 2 f 16 "869 869" 100 0 0 100 network_le - )); DESCR("less-than-or-equal"); -DATA(insert OID = 923 ( network_gt PGUID 11 f t t 2 f 16 "869 869" 100 0 0 100 network_gt - )); +DATA(insert OID = 923 ( network_gt PGUID 11 f t t t 2 f 16 "869 869" 100 0 0 100 network_gt - )); DESCR("greater-than"); -DATA(insert OID = 924 ( network_ge PGUID 11 f t t 2 f 16 "869 869" 100 0 0 100 network_ge - )); +DATA(insert OID = 924 ( network_ge PGUID 11 f t t t 2 f 16 "869 869" 100 0 0 100 network_ge - )); DESCR("greater-than-or-equal"); -DATA(insert OID = 925 ( network_ne PGUID 11 f t t 2 f 16 "869 869" 100 0 0 100 network_ne - )); +DATA(insert OID = 925 ( network_ne PGUID 11 f t t t 2 f 16 "869 869" 100 0 0 100 network_ne - )); DESCR("not equal"); -DATA(insert OID = 926 ( network_cmp PGUID 11 f t t 2 f 23 "869 869" 100 0 0 100 network_cmp - )); +DATA(insert OID = 926 ( network_cmp PGUID 11 f t t t 2 f 23 "869 869" 100 0 0 100 network_cmp - )); DESCR("less-equal-greater"); -DATA(insert OID = 927 ( network_sub PGUID 11 f t t 2 f 16 "869 869" 100 0 0 100 network_sub - )); +DATA(insert OID = 927 ( network_sub PGUID 11 f t t t 2 f 16 "869 869" 100 0 0 100 network_sub - )); DESCR("is-subnet"); -DATA(insert OID = 928 ( network_subeq PGUID 11 f t t 2 f 16 "869 869" 100 0 0 100 network_subeq - )); +DATA(insert OID = 928 ( network_subeq PGUID 11 f t t t 2 f 16 "869 869" 100 0 0 100 network_subeq - )); DESCR("is-subnet-or-equal"); -DATA(insert OID = 929 ( network_sup PGUID 11 f t t 2 f 16 "869 869" 100 0 0 100 network_sup - )); +DATA(insert OID = 929 ( network_sup PGUID 11 f t t t 2 f 16 "869 869" 100 0 0 100 network_sup - )); DESCR("is-supernet"); -DATA(insert OID = 930 ( network_supeq PGUID 11 f t t 2 f 16 "869 869" 100 0 0 100 network_supeq - )); +DATA(insert OID = 930 ( network_supeq PGUID 11 f t t t 2 f 16 "869 869" 100 0 0 100 network_supeq - )); DESCR("is-supernet-or-equal"); /* inet/cidr versions */ -DATA(insert OID = 696 ( netmask PGUID 11 f t t 1 f 25 "869" 100 0 0 100 network_netmask - )); +DATA(insert OID = 696 ( netmask PGUID 11 f t t t 1 f 25 "869" 100 0 0 100 network_netmask - )); DESCR("netmask of address"); -DATA(insert OID = 697 ( masklen PGUID 11 f t t 1 f 23 "869" 100 0 0 100 network_masklen - )); +DATA(insert OID = 697 ( masklen PGUID 11 f t t t 1 f 23 "869" 100 0 0 100 network_masklen - )); DESCR("netmask length"); -DATA(insert OID = 698 ( broadcast PGUID 11 f t t 1 f 25 "869" 100 0 0 100 network_broadcast - )); +DATA(insert OID = 698 ( broadcast PGUID 11 f t t t 1 f 25 "869" 100 0 0 100 network_broadcast - )); DESCR("broadcast address"); -DATA(insert OID = 699 ( host PGUID 11 f t t 1 f 25 "869" 100 0 0 100 network_host - )); +DATA(insert OID = 699 ( host PGUID 11 f t t t 1 f 25 "869" 100 0 0 100 network_host - )); DESCR("host address"); -DATA(insert OID = 683 ( network PGUID 11 f t t 1 f 25 "869" 100 0 0 100 network_network - )); +DATA(insert OID = 683 ( network PGUID 11 f t t t 1 f 25 "869" 100 0 0 100 network_network - )); DESCR("network address"); -DATA(insert OID = 1691 ( boolle PGUID 11 f t t 2 f 16 "16 16" 100 0 0 100 boolle - )); +DATA(insert OID = 1691 ( boolle PGUID 11 f t t t 2 f 16 "16 16" 100 0 0 100 boolle - )); DESCR("less-than-or-equal"); -DATA(insert OID = 1692 ( boolge PGUID 11 f t t 2 f 16 "16 16" 100 0 0 100 boolge - )); +DATA(insert OID = 1692 ( boolge PGUID 11 f t t t 2 f 16 "16 16" 100 0 0 100 boolge - )); DESCR("greater-than-or-equal"); -DATA(insert OID = 1693 ( btboolcmp PGUID 11 f t t 2 f 23 "16 16" 100 0 0 100 btboolcmp - )); +DATA(insert OID = 1693 ( btboolcmp PGUID 11 f t t t 2 f 23 "16 16" 100 0 0 100 btboolcmp - )); DESCR("btree less-equal-greater"); /* OID's 1700 - 1799 NUMERIC data type */ -DATA(insert OID = 1701 ( numeric_in PGUID 11 f t t 3 f 1700 "0 0 23" 100 0 0 100 numeric_in - )); +DATA(insert OID = 1701 ( numeric_in PGUID 11 f t t t 3 f 1700 "0 0 23" 100 0 0 100 numeric_in - )); DESCR("(internal)"); -DATA(insert OID = 1702 ( numeric_out PGUID 11 f t t 1 f 23 "0" 100 0 0 100 numeric_out - )); +DATA(insert OID = 1702 ( numeric_out PGUID 11 f t t t 1 f 23 "0" 100 0 0 100 numeric_out - )); DESCR("(internal)"); -DATA(insert OID = 1703 ( numeric PGUID 11 f t t 2 f 1700 "1700 23" 100 0 0 100 numeric - )); +DATA(insert OID = 1703 ( numeric PGUID 11 f t t t 2 f 1700 "1700 23" 100 0 0 100 numeric - )); DESCR("(internal)"); -DATA(insert OID = 1704 ( numeric_abs PGUID 11 f t t 1 f 1700 "1700" 100 0 0 100 numeric_abs - )); +DATA(insert OID = 1704 ( numeric_abs PGUID 11 f t t t 1 f 1700 "1700" 100 0 0 100 numeric_abs - )); DESCR("absolute value"); -DATA(insert OID = 1705 ( abs PGUID 11 f t t 1 f 1700 "1700" 100 0 0 100 numeric_abs - )); +DATA(insert OID = 1705 ( abs PGUID 11 f t t t 1 f 1700 "1700" 100 0 0 100 numeric_abs - )); DESCR("absolute value"); -DATA(insert OID = 1706 ( sign PGUID 11 f t t 1 f 1700 "1700" 100 0 0 100 numeric_sign - )); +DATA(insert OID = 1706 ( sign PGUID 11 f t t t 1 f 1700 "1700" 100 0 0 100 numeric_sign - )); DESCR("sign of value"); -DATA(insert OID = 1707 ( round PGUID 11 f t t 2 f 1700 "1700 23" 100 0 0 100 numeric_round - )); +DATA(insert OID = 1707 ( round PGUID 11 f t t t 2 f 1700 "1700 23" 100 0 0 100 numeric_round - )); DESCR("value rounded to 'scale'"); -DATA(insert OID = 1708 ( round PGUID 14 f t t 1 f 1700 "1700" 100 0 0 100 "select numeric_round($1,0)" - )); +DATA(insert OID = 1708 ( round PGUID 14 f t t t 1 f 1700 "1700" 100 0 0 100 "select numeric_round($1,0)" - )); DESCR("value rounded to 'scale' of zero"); -DATA(insert OID = 1709 ( trunc PGUID 11 f t t 2 f 1700 "1700 23" 100 0 0 100 numeric_trunc - )); +DATA(insert OID = 1709 ( trunc PGUID 11 f t t t 2 f 1700 "1700 23" 100 0 0 100 numeric_trunc - )); DESCR("value truncated to 'scale'"); -DATA(insert OID = 1710 ( trunc PGUID 14 f t t 1 f 1700 "1700" 100 0 0 100 "select trunc($1,0)" - )); +DATA(insert OID = 1710 ( trunc PGUID 14 f t t t 1 f 1700 "1700" 100 0 0 100 "select trunc($1,0)" - )); DESCR("value truncated to 'scale' of zero"); -DATA(insert OID = 1711 ( ceil PGUID 11 f t t 1 f 1700 "1700" 100 0 0 100 numeric_ceil - )); +DATA(insert OID = 1711 ( ceil PGUID 11 f t t t 1 f 1700 "1700" 100 0 0 100 numeric_ceil - )); DESCR("smallest integer >= value"); -DATA(insert OID = 1712 ( floor PGUID 11 f t t 1 f 1700 "1700" 100 0 0 100 numeric_floor - )); +DATA(insert OID = 1712 ( floor PGUID 11 f t t t 1 f 1700 "1700" 100 0 0 100 numeric_floor - )); DESCR("largest integer <= value"); -DATA(insert OID = 1718 ( numeric_eq PGUID 11 f t t 2 f 16 "1700 1700" 100 0 0 100 numeric_eq - )); +DATA(insert OID = 1718 ( numeric_eq PGUID 11 f t t t 2 f 16 "1700 1700" 100 0 0 100 numeric_eq - )); DESCR("equal"); -DATA(insert OID = 1719 ( numeric_ne PGUID 11 f t t 2 f 16 "1700 1700" 100 0 0 100 numeric_ne - )); +DATA(insert OID = 1719 ( numeric_ne PGUID 11 f t t t 2 f 16 "1700 1700" 100 0 0 100 numeric_ne - )); DESCR("not equal"); -DATA(insert OID = 1720 ( numeric_gt PGUID 11 f t t 2 f 16 "1700 1700" 100 0 0 100 numeric_gt - )); +DATA(insert OID = 1720 ( numeric_gt PGUID 11 f t t t 2 f 16 "1700 1700" 100 0 0 100 numeric_gt - )); DESCR("greater-than"); -DATA(insert OID = 1721 ( numeric_ge PGUID 11 f t t 2 f 16 "1700 1700" 100 0 0 100 numeric_ge - )); +DATA(insert OID = 1721 ( numeric_ge PGUID 11 f t t t 2 f 16 "1700 1700" 100 0 0 100 numeric_ge - )); DESCR("greater-than-or-equal"); -DATA(insert OID = 1722 ( numeric_lt PGUID 11 f t t 2 f 16 "1700 1700" 100 0 0 100 numeric_lt - )); +DATA(insert OID = 1722 ( numeric_lt PGUID 11 f t t t 2 f 16 "1700 1700" 100 0 0 100 numeric_lt - )); DESCR("lower-than"); -DATA(insert OID = 1723 ( numeric_le PGUID 11 f t t 2 f 16 "1700 1700" 100 0 0 100 numeric_le - )); +DATA(insert OID = 1723 ( numeric_le PGUID 11 f t t t 2 f 16 "1700 1700" 100 0 0 100 numeric_le - )); DESCR("lower-than-or-equal"); -DATA(insert OID = 1724 ( numeric_add PGUID 11 f t t 2 f 1700 "1700 1700" 100 0 0 100 numeric_add - )); +DATA(insert OID = 1724 ( numeric_add PGUID 11 f t t t 2 f 1700 "1700 1700" 100 0 0 100 numeric_add - )); DESCR("addition"); -DATA(insert OID = 1725 ( numeric_sub PGUID 11 f t t 2 f 1700 "1700 1700" 100 0 0 100 numeric_sub - )); +DATA(insert OID = 1725 ( numeric_sub PGUID 11 f t t t 2 f 1700 "1700 1700" 100 0 0 100 numeric_sub - )); DESCR("subtract"); -DATA(insert OID = 1726 ( numeric_mul PGUID 11 f t t 2 f 1700 "1700 1700" 100 0 0 100 numeric_mul - )); +DATA(insert OID = 1726 ( numeric_mul PGUID 11 f t t t 2 f 1700 "1700 1700" 100 0 0 100 numeric_mul - )); DESCR("multiply"); -DATA(insert OID = 1727 ( numeric_div PGUID 11 f t t 2 f 1700 "1700 1700" 100 0 0 100 numeric_div - )); +DATA(insert OID = 1727 ( numeric_div PGUID 11 f t t t 2 f 1700 "1700 1700" 100 0 0 100 numeric_div - )); DESCR("divide"); -DATA(insert OID = 1728 ( mod PGUID 11 f t t 2 f 1700 "1700 1700" 100 0 0 100 numeric_mod - )); +DATA(insert OID = 1728 ( mod PGUID 11 f t t t 2 f 1700 "1700 1700" 100 0 0 100 numeric_mod - )); DESCR("modulus"); -DATA(insert OID = 1729 ( numeric_mod PGUID 11 f t t 2 f 1700 "1700 1700" 100 0 0 100 numeric_mod - )); +DATA(insert OID = 1729 ( numeric_mod PGUID 11 f t t t 2 f 1700 "1700 1700" 100 0 0 100 numeric_mod - )); DESCR("modulus"); -DATA(insert OID = 1730 ( sqrt PGUID 11 f t t 1 f 1700 "1700" 100 0 0 100 numeric_sqrt - )); +DATA(insert OID = 1730 ( sqrt PGUID 11 f t t t 1 f 1700 "1700" 100 0 0 100 numeric_sqrt - )); DESCR("square root"); -DATA(insert OID = 1731 ( numeric_sqrt PGUID 11 f t t 1 f 1700 "1700" 100 0 0 100 numeric_sqrt - )); +DATA(insert OID = 1731 ( numeric_sqrt PGUID 11 f t t t 1 f 1700 "1700" 100 0 0 100 numeric_sqrt - )); DESCR("square root"); -DATA(insert OID = 1732 ( exp PGUID 11 f t t 1 f 1700 "1700" 100 0 0 100 numeric_exp - )); +DATA(insert OID = 1732 ( exp PGUID 11 f t t t 1 f 1700 "1700" 100 0 0 100 numeric_exp - )); DESCR("e raised to the power of n"); -DATA(insert OID = 1733 ( numeric_exp PGUID 11 f t t 1 f 1700 "1700" 100 0 0 100 numeric_exp - )); +DATA(insert OID = 1733 ( numeric_exp PGUID 11 f t t t 1 f 1700 "1700" 100 0 0 100 numeric_exp - )); DESCR("e raised to the power of n"); -DATA(insert OID = 1734 ( ln PGUID 11 f t t 1 f 1700 "1700" 100 0 0 100 numeric_ln - )); +DATA(insert OID = 1734 ( ln PGUID 11 f t t t 1 f 1700 "1700" 100 0 0 100 numeric_ln - )); DESCR("natural logarithm of n"); -DATA(insert OID = 1735 ( numeric_ln PGUID 11 f t t 1 f 1700 "1700" 100 0 0 100 numeric_ln - )); +DATA(insert OID = 1735 ( numeric_ln PGUID 11 f t t t 1 f 1700 "1700" 100 0 0 100 numeric_ln - )); DESCR("natural logarithm of n"); -DATA(insert OID = 1736 ( log PGUID 11 f t t 2 f 1700 "1700 1700" 100 0 0 100 numeric_log - )); +DATA(insert OID = 1736 ( log PGUID 11 f t t t 2 f 1700 "1700 1700" 100 0 0 100 numeric_log - )); DESCR("logarithm base m of n"); -DATA(insert OID = 1737 ( numeric_log PGUID 11 f t t 2 f 1700 "1700 1700" 100 0 0 100 numeric_log - )); +DATA(insert OID = 1737 ( numeric_log PGUID 11 f t t t 2 f 1700 "1700 1700" 100 0 0 100 numeric_log - )); DESCR("logarithm base m of n"); -DATA(insert OID = 1738 ( pow PGUID 11 f t t 2 f 1700 "1700 1700" 100 0 0 100 numeric_power - )); +DATA(insert OID = 1738 ( pow PGUID 11 f t t t 2 f 1700 "1700 1700" 100 0 0 100 numeric_power - )); DESCR("m raised to the power of n"); -DATA(insert OID = 1739 ( numeric_power PGUID 11 f t t 2 f 1700 "1700 1700" 100 0 0 100 numeric_power - )); +DATA(insert OID = 1739 ( numeric_power PGUID 11 f t t t 2 f 1700 "1700 1700" 100 0 0 100 numeric_power - )); DESCR("m raised to the power of n"); -DATA(insert OID = 1740 ( numeric PGUID 11 f t t 1 f 1700 "23" 100 0 0 100 int4_numeric - )); +DATA(insert OID = 1740 ( numeric PGUID 11 f t t t 1 f 1700 "23" 100 0 0 100 int4_numeric - )); DESCR("(internal)"); -DATA(insert OID = 1741 ( log PGUID 14 f t t 1 f 1700 "1700" 100 0 0 100 "select log(10, $1)" - )); +DATA(insert OID = 1741 ( log PGUID 14 f t t t 1 f 1700 "1700" 100 0 0 100 "select log(10, $1)" - )); DESCR("logarithm base 10 of n"); -DATA(insert OID = 1742 ( numeric PGUID 11 f t t 1 f 1700 "700" 100 0 0 100 float4_numeric - )); +DATA(insert OID = 1742 ( numeric PGUID 11 f t t t 1 f 1700 "700" 100 0 0 100 float4_numeric - )); DESCR("(internal)"); -DATA(insert OID = 1743 ( numeric PGUID 11 f t t 1 f 1700 "701" 100 0 0 100 float8_numeric - )); +DATA(insert OID = 1743 ( numeric PGUID 11 f t t t 1 f 1700 "701" 100 0 0 100 float8_numeric - )); DESCR("(internal)"); -DATA(insert OID = 1744 ( int4 PGUID 11 f t t 1 f 23 "1700" 100 0 0 100 numeric_int4 - )); +DATA(insert OID = 1744 ( int4 PGUID 11 f t t t 1 f 23 "1700" 100 0 0 100 numeric_int4 - )); DESCR("(internal)"); -DATA(insert OID = 1745 ( float4 PGUID 11 f t t 1 f 700 "1700" 100 0 0 100 numeric_float4 - )); +DATA(insert OID = 1745 ( float4 PGUID 11 f t t t 1 f 700 "1700" 100 0 0 100 numeric_float4 - )); DESCR("(internal)"); -DATA(insert OID = 1746 ( float8 PGUID 11 f t t 1 f 701 "1700" 100 0 0 100 numeric_float8 - )); +DATA(insert OID = 1746 ( float8 PGUID 11 f t t t 1 f 701 "1700" 100 0 0 100 numeric_float8 - )); DESCR("(internal)"); -DATA(insert OID = 1764 ( numeric_inc PGUID 11 f t t 1 f 1700 "1700" 100 0 0 100 numeric_inc - )); +DATA(insert OID = 1764 ( numeric_inc PGUID 11 f t t t 1 f 1700 "1700" 100 0 0 100 numeric_inc - )); DESCR("increment by one"); -DATA(insert OID = 1765 ( numeric_dec PGUID 11 f t t 1 f 1700 "1700" 100 0 0 100 numeric_dec - )); +DATA(insert OID = 1765 ( numeric_dec PGUID 11 f t t t 1 f 1700 "1700" 100 0 0 100 numeric_dec - )); DESCR("decrement by one"); -DATA(insert OID = 1766 ( numeric_smaller PGUID 11 f t t 2 f 1700 "1700 1700" 100 0 0 100 numeric_smaller - )); +DATA(insert OID = 1766 ( numeric_smaller PGUID 11 f t t t 2 f 1700 "1700 1700" 100 0 0 100 numeric_smaller - )); DESCR("smaller of two numbers"); -DATA(insert OID = 1767 ( numeric_larger PGUID 11 f t t 2 f 1700 "1700 1700" 100 0 0 100 numeric_larger - )); +DATA(insert OID = 1767 ( numeric_larger PGUID 11 f t t t 2 f 1700 "1700 1700" 100 0 0 100 numeric_larger - )); DESCR("larger of two numbers"); -DATA(insert OID = 1769 ( numeric_cmp PGUID 11 f t t 2 f 23 "1700 1700" 100 0 0 100 numeric_cmp - )); +DATA(insert OID = 1769 ( numeric_cmp PGUID 11 f t t t 2 f 23 "1700 1700" 100 0 0 100 numeric_cmp - )); DESCR("compare two numbers"); -DATA(insert OID = 1771 ( numeric_uminus PGUID 11 f t t 1 f 1700 "1700" 100 0 0 100 numeric_uminus - )); +DATA(insert OID = 1771 ( numeric_uminus PGUID 11 f t t t 1 f 1700 "1700" 100 0 0 100 numeric_uminus - )); DESCR("negate"); -DATA(insert OID = 1779 ( int8 PGUID 11 f t t 1 f 20 "1700" 100 0 0 100 numeric_int8 - )); +DATA(insert OID = 1779 ( int8 PGUID 11 f t t t 1 f 20 "1700" 100 0 0 100 numeric_int8 - )); DESCR("(internal)"); -DATA(insert OID = 1781 ( numeric PGUID 11 f t t 1 f 1700 "20" 100 0 0 100 int8_numeric - )); +DATA(insert OID = 1781 ( numeric PGUID 11 f t t t 1 f 1700 "20" 100 0 0 100 int8_numeric - )); DESCR("(internal)"); -DATA(insert OID = 1782 ( numeric PGUID 11 f t t 1 f 1700 "21" 100 0 0 100 int2_numeric - )); +DATA(insert OID = 1782 ( numeric PGUID 11 f t t t 1 f 1700 "21" 100 0 0 100 int2_numeric - )); DESCR("(internal)"); -DATA(insert OID = 1783 ( int2 PGUID 11 f t t 1 f 21 "1700" 100 0 0 100 numeric_int2 - )); +DATA(insert OID = 1783 ( int2 PGUID 11 f t t t 1 f 21 "1700" 100 0 0 100 numeric_int2 - )); DESCR("(internal)"); /* formatting */ -DATA(insert OID = 1770 ( to_char PGUID 11 f t f 2 f 25 "1184 25" 100 0 0 100 timestamp_to_char - )); +DATA(insert OID = 1770 ( to_char PGUID 11 f t f t 2 f 25 "1184 25" 100 0 0 100 timestamp_to_char - )); DESCR("format timestamp to text"); -DATA(insert OID = 1772 ( to_char PGUID 11 f t f 2 f 25 "1700 25" 100 0 0 100 numeric_to_char - )); +DATA(insert OID = 1772 ( to_char PGUID 11 f t f t 2 f 25 "1700 25" 100 0 0 100 numeric_to_char - )); DESCR("format numeric to text"); -DATA(insert OID = 1773 ( to_char PGUID 11 f t f 2 f 25 "23 25" 100 0 0 100 int4_to_char - )); +DATA(insert OID = 1773 ( to_char PGUID 11 f t f t 2 f 25 "23 25" 100 0 0 100 int4_to_char - )); DESCR("format int4 to text"); -DATA(insert OID = 1774 ( to_char PGUID 11 f t f 2 f 25 "20 25" 100 0 0 100 int8_to_char - )); +DATA(insert OID = 1774 ( to_char PGUID 11 f t f t 2 f 25 "20 25" 100 0 0 100 int8_to_char - )); DESCR("format int8 to text"); -DATA(insert OID = 1775 ( to_char PGUID 11 f t f 2 f 25 "700 25" 100 0 0 100 float4_to_char - )); +DATA(insert OID = 1775 ( to_char PGUID 11 f t f t 2 f 25 "700 25" 100 0 0 100 float4_to_char - )); DESCR("format float4 to text"); -DATA(insert OID = 1776 ( to_char PGUID 11 f t f 2 f 25 "701 25" 100 0 0 100 float8_to_char - )); +DATA(insert OID = 1776 ( to_char PGUID 11 f t f t 2 f 25 "701 25" 100 0 0 100 float8_to_char - )); DESCR("format float8 to text"); -DATA(insert OID = 1777 ( to_number PGUID 11 f t f 2 f 1700 "25 25" 100 0 0 100 numeric_to_number - )); +DATA(insert OID = 1777 ( to_number PGUID 11 f t f t 2 f 1700 "25 25" 100 0 0 100 numeric_to_number - )); DESCR("convert text to numeric"); -DATA(insert OID = 1778 ( to_timestamp PGUID 11 f t f 2 f 1184 "25 25" 100 0 0 100 to_timestamp - )); +DATA(insert OID = 1778 ( to_timestamp PGUID 11 f t f t 2 f 1184 "25 25" 100 0 0 100 to_timestamp - )); DESCR("convert text to timestamp"); -DATA(insert OID = 1780 ( to_date PGUID 11 f t f 2 f 1082 "25 25" 100 0 0 100 to_date - )); +DATA(insert OID = 1780 ( to_date PGUID 11 f t f t 2 f 1082 "25 25" 100 0 0 100 to_date - )); DESCR("convert text to date"); /* Selectivity estimators for LIKE and related operators */ -DATA(insert OID = 1818 ( regexeqsel PGUID 11 f t f 5 f 701 "26 26 21 0 23" 100 0 0 100 regexeqsel - )); +DATA(insert OID = 1818 ( regexeqsel PGUID 11 f t f t 5 f 701 "26 26 21 0 23" 100 0 0 100 regexeqsel - )); DESCR("restriction selectivity of regex match"); -DATA(insert OID = 1819 ( likesel PGUID 11 f t f 5 f 701 "26 26 21 0 23" 100 0 0 100 likesel - )); +DATA(insert OID = 1819 ( likesel PGUID 11 f t f t 5 f 701 "26 26 21 0 23" 100 0 0 100 likesel - )); DESCR("restriction selectivity of LIKE"); -DATA(insert OID = 1820 ( icregexeqsel PGUID 11 f t f 5 f 701 "26 26 21 0 23" 100 0 0 100 icregexeqsel - )); +DATA(insert OID = 1820 ( icregexeqsel PGUID 11 f t f t 5 f 701 "26 26 21 0 23" 100 0 0 100 icregexeqsel - )); DESCR("restriction selectivity of case-insensitive regex match"); -DATA(insert OID = 1821 ( regexnesel PGUID 11 f t f 5 f 701 "26 26 21 0 23" 100 0 0 100 regexnesel - )); +DATA(insert OID = 1821 ( regexnesel PGUID 11 f t f t 5 f 701 "26 26 21 0 23" 100 0 0 100 regexnesel - )); DESCR("restriction selectivity of regex non-match"); -DATA(insert OID = 1822 ( nlikesel PGUID 11 f t f 5 f 701 "26 26 21 0 23" 100 0 0 100 nlikesel - )); +DATA(insert OID = 1822 ( nlikesel PGUID 11 f t f t 5 f 701 "26 26 21 0 23" 100 0 0 100 nlikesel - )); DESCR("restriction selectivity of NOT LIKE"); -DATA(insert OID = 1823 ( icregexnesel PGUID 11 f t f 5 f 701 "26 26 21 0 23" 100 0 0 100 icregexnesel - )); +DATA(insert OID = 1823 ( icregexnesel PGUID 11 f t f t 5 f 701 "26 26 21 0 23" 100 0 0 100 icregexnesel - )); DESCR("restriction selectivity of case-insensitive regex non-match"); -DATA(insert OID = 1824 ( regexeqjoinsel PGUID 11 f t f 5 f 701 "26 26 21 26 21" 100 0 0 100 regexeqjoinsel - )); +DATA(insert OID = 1824 ( regexeqjoinsel PGUID 11 f t f t 5 f 701 "26 26 21 26 21" 100 0 0 100 regexeqjoinsel - )); DESCR("join selectivity of regex match"); -DATA(insert OID = 1825 ( likejoinsel PGUID 11 f t f 5 f 701 "26 26 21 26 21" 100 0 0 100 likejoinsel - )); +DATA(insert OID = 1825 ( likejoinsel PGUID 11 f t f t 5 f 701 "26 26 21 26 21" 100 0 0 100 likejoinsel - )); DESCR("join selectivity of LIKE"); -DATA(insert OID = 1826 ( icregexeqjoinsel PGUID 11 f t f 5 f 701 "26 26 21 26 21" 100 0 0 100 icregexeqjoinsel - )); +DATA(insert OID = 1826 ( icregexeqjoinsel PGUID 11 f t f t 5 f 701 "26 26 21 26 21" 100 0 0 100 icregexeqjoinsel - )); DESCR("join selectivity of case-insensitive regex match"); -DATA(insert OID = 1827 ( regexnejoinsel PGUID 11 f t f 5 f 701 "26 26 21 26 21" 100 0 0 100 regexnejoinsel - )); +DATA(insert OID = 1827 ( regexnejoinsel PGUID 11 f t f t 5 f 701 "26 26 21 26 21" 100 0 0 100 regexnejoinsel - )); DESCR("join selectivity of regex non-match"); -DATA(insert OID = 1828 ( nlikejoinsel PGUID 11 f t f 5 f 701 "26 26 21 26 21" 100 0 0 100 nlikejoinsel - )); +DATA(insert OID = 1828 ( nlikejoinsel PGUID 11 f t f t 5 f 701 "26 26 21 26 21" 100 0 0 100 nlikejoinsel - )); DESCR("join selectivity of NOT LIKE"); -DATA(insert OID = 1829 ( icregexnejoinsel PGUID 11 f t f 5 f 701 "26 26 21 26 21" 100 0 0 100 icregexnejoinsel - )); +DATA(insert OID = 1829 ( icregexnejoinsel PGUID 11 f t f t 5 f 701 "26 26 21 26 21" 100 0 0 100 icregexnejoinsel - )); DESCR("join selectivity of case-insensitive regex non-match"); @@ -2472,8 +2475,9 @@ extern Oid ProcedureCreate(char *procedureName, char *languageName, char *prosrc, char *probin, - bool canCache, bool trusted, + bool canCache, + bool isStrict, int32 byte_pct, int32 perbyte_cpu, int32 percall_cpu, diff --git a/src/include/executor/functions.h b/src/include/executor/functions.h index 1c64712ebe..26f2daac53 100644 --- a/src/include/executor/functions.h +++ b/src/include/executor/functions.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: functions.h,v 1.11 2000/01/26 05:58:05 momjian Exp $ + * $Id: functions.h,v 1.12 2000/05/28 17:56:18 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -18,9 +18,11 @@ #include "utils/syscache.h" extern Datum ProjectAttribute(TupleDesc TD, TargetEntry *tlist, - HeapTuple tup, bool *isnullP); + HeapTuple tup, bool *isnullP); -extern Datum postquel_function(Func *funcNode, char **args, - bool *isNull, bool *isDone); +extern Datum postquel_function(FunctionCallInfo fcinfo, + FunctionCachePtr fcache, + List *func_tlist, + bool *isDone); #endif /* FUNCTIONS_H */ diff --git a/src/include/fmgr.h b/src/include/fmgr.h new file mode 100644 index 0000000000..18b01f7fad --- /dev/null +++ b/src/include/fmgr.h @@ -0,0 +1,301 @@ +/*------------------------------------------------------------------------- + * + * fmgr.h + * Definitions for the Postgres function manager and function-call + * interface. + * + * This file must be included by all Postgres modules that either define + * or call fmgr-callable functions. + * + * + * Portions Copyright (c) 1996-2000, PostgreSQL, Inc + * Portions Copyright (c) 1994, Regents of the University of California + * + * $Id: fmgr.h,v 1.1 2000/05/28 17:56:12 tgl Exp $ + * + *------------------------------------------------------------------------- + */ +#ifndef FMGR_H +#define FMGR_H + + +/* + * All functions that can be called directly by fmgr must have this signature. + * (Other functions can be called by using a handler that does have this + * signature.) + */ + +typedef struct FunctionCallInfoData *FunctionCallInfo; + +typedef Datum (*PGFunction) (FunctionCallInfo fcinfo); + +/* + * This struct holds the system-catalog information that must be looked up + * before a function can be called through fmgr. If the same function is + * to be called multiple times, the lookup need be done only once and the + * info struct saved for re-use. + */ +typedef struct +{ + PGFunction fn_addr; /* pointer to function or handler to be called */ + Oid fn_oid; /* OID of function (NOT of handler, if any) */ + short fn_nargs; /* 0..FUNC_MAX_ARGS, or -1 if variable arg count */ + bool fn_strict; /* function is "strict" (NULL in => NULL out) */ + void *fn_extra; /* extra space for use by handler */ +} FmgrInfo; + +/* + * This struct is the data actually passed to an fmgr-called function. + */ +typedef struct FunctionCallInfoData +{ + FmgrInfo *flinfo; /* ptr to lookup info used for this call */ + struct Node *context; /* pass info about context of call */ + struct Node *resultinfo; /* pass or return extra info about result */ + bool isnull; /* function must set true if result is NULL */ + short nargs; /* # arguments actually passed */ + Datum arg[FUNC_MAX_ARGS]; /* Arguments passed to function */ + bool argnull[FUNC_MAX_ARGS]; /* T if arg[i] is actually NULL */ +} FunctionCallInfoData; + +/* + * This routine fills a FmgrInfo struct, given the OID + * of the function to be called. + */ +extern void fmgr_info(Oid functionId, FmgrInfo *finfo); + +/* + * This macro invokes a function given a filled-in FunctionCallInfoData + * struct. The macro result is the returned Datum --- but note that + * caller must still check fcinfo->isnull! Also, if function is strict, + * it is caller's responsibility to verify that no null arguments are present + * before calling. + */ +#define FunctionCallInvoke(fcinfo) ((* (fcinfo)->flinfo->fn_addr) (fcinfo)) + + +/*------------------------------------------------------------------------- + * Support macros to ease writing fmgr-compatible functions + * + * A C-coded fmgr-compatible function should be declared as + * + * Datum + * function_name(PG_FUNCTION_ARGS) + * { + * ... + * } + * + * It should access its arguments using appropriate PG_GETARG_xxx macros + * and should return its result using PG_RETURN_xxx. + * + *------------------------------------------------------------------------- + */ + +/* Standard parameter list for fmgr-compatible functions */ +#define PG_FUNCTION_ARGS FunctionCallInfo fcinfo + +/* If function is not marked "proisstrict" in pg_proc, it must check for + * null arguments using this macro. Do not try to GETARG a null argument! + */ +#define PG_ARGISNULL(n) (fcinfo->argnull[n]) + +/* Macros for fetching arguments of standard types */ + +#define PG_GETARG_INT32(n) DatumGetInt32(fcinfo->arg[n]) +#define PG_GETARG_INT16(n) DatumGetInt16(fcinfo->arg[n]) +#define PG_GETARG_CHAR(n) DatumGetChar(fcinfo->arg[n]) +#define PG_GETARG_BOOL(n) DatumGetBool(fcinfo->arg[n]) +#define PG_GETARG_OID(n) DatumGetObjectId(fcinfo->arg[n]) +#define PG_GETARG_POINTER(n) DatumGetPointer(fcinfo->arg[n]) +/* these macros hide the pass-by-reference-ness of the datatype: */ +#define PG_GETARG_FLOAT4(n) DatumGetFloat4(fcinfo->arg[n]) +#define PG_GETARG_FLOAT8(n) DatumGetFloat8(fcinfo->arg[n]) +#define PG_GETARG_INT64(n) DatumGetInt64(fcinfo->arg[n]) +/* use this if you want the raw, possibly-toasted input datum: */ +#define PG_GETARG_RAW_VARLENA_P(n) ((struct varlena *) PG_GETARG_POINTER(n)) +/* use this if you want the input datum de-toasted: */ +#define PG_GETARG_VARLENA_P(n) \ + (VARATT_IS_EXTENDED(PG_GETARG_RAW_VARLENA_P(n)) ? \ + (struct varlena *) heap_tuple_untoast_attr((varattrib *) PG_GETARG_RAW_VARLENA_P(n)) : \ + PG_GETARG_RAW_VARLENA_P(n)) +/* GETARG macros for varlena types will typically look like this: */ +#define PG_GETARG_TEXT_P(n) ((text *) PG_GETARG_VARLENA_P(n)) + +/* To return a NULL do this: */ +#define PG_RETURN_NULL() \ + do { fcinfo->isnull = true; return (Datum) 0; } while (0) + +/* Macros for returning results of standard types */ + +#define PG_RETURN_INT32(x) return Int32GetDatum(x) +#define PG_RETURN_INT16(x) return Int16GetDatum(x) +#define PG_RETURN_CHAR(x) return CharGetDatum(x) +#define PG_RETURN_BOOL(x) return BoolGetDatum(x) +#define PG_RETURN_OID(x) return ObjectIdGetDatum(x) +#define PG_RETURN_POINTER(x) return PointerGetDatum(x) +/* these macros hide the pass-by-reference-ness of the datatype: */ +#define PG_RETURN_FLOAT4(x) return Float4GetDatum(x) +#define PG_RETURN_FLOAT8(x) return Float8GetDatum(x) +#define PG_RETURN_INT64(x) return Int64GetDatum(x) +/* RETURN macros for other pass-by-ref types will typically look like this: */ +#define PG_RETURN_TEXT_P(x) PG_RETURN_POINTER(x) + + +/*------------------------------------------------------------------------- + * Support routines and macros for callers of fmgr-compatible functions + *------------------------------------------------------------------------- + */ + +/* These are for invocation of a specifically named function with a + * directly-computed parameter list. Note that neither arguments nor result + * are allowed to be NULL. + */ +extern Datum DirectFunctionCall1(PGFunction func, Datum arg1); +extern Datum DirectFunctionCall2(PGFunction func, Datum arg1, Datum arg2); +extern Datum DirectFunctionCall3(PGFunction func, Datum arg1, Datum arg2, + Datum arg3); +extern Datum DirectFunctionCall4(PGFunction func, Datum arg1, Datum arg2, + Datum arg3, Datum arg4); +extern Datum DirectFunctionCall5(PGFunction func, Datum arg1, Datum arg2, + Datum arg3, Datum arg4, Datum arg5); +extern Datum DirectFunctionCall6(PGFunction func, Datum arg1, Datum arg2, + Datum arg3, Datum arg4, Datum arg5, + Datum arg6); +extern Datum DirectFunctionCall7(PGFunction func, Datum arg1, Datum arg2, + Datum arg3, Datum arg4, Datum arg5, + Datum arg6, Datum arg7); +extern Datum DirectFunctionCall8(PGFunction func, Datum arg1, Datum arg2, + Datum arg3, Datum arg4, Datum arg5, + Datum arg6, Datum arg7, Datum arg8); +extern Datum DirectFunctionCall9(PGFunction func, Datum arg1, Datum arg2, + Datum arg3, Datum arg4, Datum arg5, + Datum arg6, Datum arg7, Datum arg8, + Datum arg9); + +/* These are for invocation of a previously-looked-up function with a + * directly-computed parameter list. Note that neither arguments nor result + * are allowed to be NULL. + */ +extern Datum FunctionCall1(FmgrInfo *flinfo, Datum arg1); +extern Datum FunctionCall2(FmgrInfo *flinfo, Datum arg1, Datum arg2); +extern Datum FunctionCall3(FmgrInfo *flinfo, Datum arg1, Datum arg2, + Datum arg3); +extern Datum FunctionCall4(FmgrInfo *flinfo, Datum arg1, Datum arg2, + Datum arg3, Datum arg4); +extern Datum FunctionCall5(FmgrInfo *flinfo, Datum arg1, Datum arg2, + Datum arg3, Datum arg4, Datum arg5); +extern Datum FunctionCall6(FmgrInfo *flinfo, Datum arg1, Datum arg2, + Datum arg3, Datum arg4, Datum arg5, + Datum arg6); +extern Datum FunctionCall7(FmgrInfo *flinfo, Datum arg1, Datum arg2, + Datum arg3, Datum arg4, Datum arg5, + Datum arg6, Datum arg7); +extern Datum FunctionCall8(FmgrInfo *flinfo, Datum arg1, Datum arg2, + Datum arg3, Datum arg4, Datum arg5, + Datum arg6, Datum arg7, Datum arg8); +extern Datum FunctionCall9(FmgrInfo *flinfo, Datum arg1, Datum arg2, + Datum arg3, Datum arg4, Datum arg5, + Datum arg6, Datum arg7, Datum arg8, + Datum arg9); + +/* These are for invocation of a function identified by OID with a + * directly-computed parameter list. Note that neither arguments nor result + * are allowed to be NULL. These are essentially FunctionLookup() followed + * by FunctionCallN(). If the same function is to be invoked repeatedly, + * do the FunctionLookup() once and then use FunctionCallN(). + */ +extern Datum OidFunctionCall1(Oid functionId, Datum arg1); +extern Datum OidFunctionCall2(Oid functionId, Datum arg1, Datum arg2); +extern Datum OidFunctionCall3(Oid functionId, Datum arg1, Datum arg2, + Datum arg3); +extern Datum OidFunctionCall4(Oid functionId, Datum arg1, Datum arg2, + Datum arg3, Datum arg4); +extern Datum OidFunctionCall5(Oid functionId, Datum arg1, Datum arg2, + Datum arg3, Datum arg4, Datum arg5); +extern Datum OidFunctionCall6(Oid functionId, Datum arg1, Datum arg2, + Datum arg3, Datum arg4, Datum arg5, + Datum arg6); +extern Datum OidFunctionCall7(Oid functionId, Datum arg1, Datum arg2, + Datum arg3, Datum arg4, Datum arg5, + Datum arg6, Datum arg7); +extern Datum OidFunctionCall8(Oid functionId, Datum arg1, Datum arg2, + Datum arg3, Datum arg4, Datum arg5, + Datum arg6, Datum arg7, Datum arg8); +extern Datum OidFunctionCall9(Oid functionId, Datum arg1, Datum arg2, + Datum arg3, Datum arg4, Datum arg5, + Datum arg6, Datum arg7, Datum arg8, + Datum arg9); + + +/* + * Routines in fmgr.c + */ +extern Oid fmgr_internal_language(const char *proname); + +/* + * Routines in dfmgr.c + */ +extern PGFunction fmgr_dynamic(Oid functionId); +extern PGFunction load_external_function(char *filename, char *funcname); +extern void load_file(char *filename); + + +/*------------------------------------------------------------------------- + * + * !!! OLD INTERFACE !!! + * + * All the definitions below here are associated with the old fmgr API. + * They will go away as soon as we have converted all call points to use + * the new API. Note that old-style callee functions do not depend on + * these definitions, so we don't need to have converted all of them before + * dropping the old API ... just all the old-style call points. + * + *------------------------------------------------------------------------- + */ + +/* ptr to func returning (char *) */ +#if defined(__mc68000__) && defined(__ELF__) +/* The m68k SVR4 ABI defines that pointers are returned in %a0 instead of + * %d0. So if a function pointer is declared to return a pointer, the + * compiler may look only into %a0, but if the called function was declared + * to return return an integer type, it puts its value only into %d0. So the + * caller doesn't pink up the correct return value. The solution is to + * declare the function pointer to return int, so the compiler picks up the + * return value from %d0. (Functions returning pointers put their value + * *additionally* into %d0 for compability.) The price is that there are + * some warnings about int->pointer conversions... + */ +typedef int32 ((*func_ptr) ()); +#else +typedef char *((*func_ptr) ()); +#endif + +typedef struct { + char *data[FUNC_MAX_ARGS]; +} FmgrValues; + +/* + * defined in fmgr.c + */ +extern char *fmgr(Oid procedureId, ... ); +extern char *fmgr_faddr_link(char *arg0, ...); + +/* + * Macros for calling through the result of fmgr_info. + */ + +/* We don't make this static so fmgr_faddr() macros can access it */ +extern FmgrInfo *fmgr_pl_finfo; + +#define fmgr_faddr(finfo) (fmgr_pl_finfo = (finfo), (func_ptr) fmgr_faddr_link) + +#define FMGR_PTR2(FINFO, ARG1, ARG2) ((*(fmgr_faddr(FINFO))) (ARG1, ARG2)) + +/* + * Flags for the builtin oprrest selectivity routines. + * XXX These do not belong here ... put 'em in some planner/optimizer header. + */ +#define SEL_CONSTANT 1 /* operator's non-var arg is a constant */ +#define SEL_RIGHT 2 /* operator's non-var arg is on the right */ + +#endif /* FMGR_H */ diff --git a/src/include/postgres.h b/src/include/postgres.h index 0d16c55352..ee02a3c0c3 100644 --- a/src/include/postgres.h +++ b/src/include/postgres.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1995, Regents of the University of California * - * $Id: postgres.h,v 1.38 2000/04/12 17:16:24 momjian Exp $ + * $Id: postgres.h,v 1.39 2000/05/28 17:56:12 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -47,11 +47,6 @@ * ---------------------------------------------------------------- */ -typedef int16 int2; -typedef int32 int4; -typedef float float4; -typedef double float8; - typedef int4 aclitem; #define InvalidOid 0 @@ -61,26 +56,6 @@ typedef int4 aclitem; typedef Oid regproc; typedef Oid RegProcedure; -/* ptr to func returning (char *) */ -#if defined(__mc68000__) && defined(__ELF__) -/* The m68k SVR4 ABI defines that pointers are returned in %a0 instead of - * %d0. So if a function pointer is declared to return a pointer, the - * compiler may look only into %a0, but if the called function was declared - * to return return an integer type, it puts its value only into %d0. So the - * caller doesn't pink up the correct return value. The solution is to - * declare the function pointer to return int, so the compiler picks up the - * return value from %d0. (Functions returning pointers put their value - * *additionally* into %d0 for compability.) The price is that there are - * some warnings about int->pointer conversions... - */ -typedef int32 ((*func_ptr) ()); - -#else -typedef char *((*func_ptr) ()); - -#endif - - #define RegProcedureIsValid(p) OidIsValid(p) /* ---------------------------------------------------------------- diff --git a/src/include/utils/dynamic_loader.h b/src/include/utils/dynamic_loader.h index a83baae40e..535d5c6d3a 100644 --- a/src/include/utils/dynamic_loader.h +++ b/src/include/utils/dynamic_loader.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: dynamic_loader.h,v 1.14 2000/01/26 05:58:37 momjian Exp $ + * $Id: dynamic_loader.h,v 1.15 2000/05/28 17:56:20 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -19,26 +19,12 @@ /* we need this include because port files use them */ #include "postgres.h" -#ifdef MIN -#undef MIN -#undef MAX -#endif /* MIN */ +/* and this one for typedef PGFunction */ +#include "fmgr.h" -/* - * List of dynamically loaded files. - */ - -typedef struct df_files -{ - char filename[MAXPGPATH]; /* Full pathname of file */ - dev_t device; /* Device file is on */ - ino_t inode; /* Inode number of file */ - void *handle; /* a handle for pg_dl* functions */ - struct df_files *next; -} DynamicFileList; extern void *pg_dlopen(char *filename); -extern func_ptr pg_dlsym(void *handle, char *funcname); +extern PGFunction pg_dlsym(void *handle, char *funcname); extern void pg_dlclose(void *handle); extern char *pg_dlerror(void); diff --git a/src/include/utils/fcache.h b/src/include/utils/fcache.h index 24e6db1f0c..db3a05baf4 100644 --- a/src/include/utils/fcache.h +++ b/src/include/utils/fcache.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: fcache.h,v 1.10 2000/01/26 05:58:38 momjian Exp $ + * $Id: fcache.h,v 1.11 2000/05/28 17:56:20 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -19,22 +19,11 @@ typedef struct { - int typlen; /* length of the return type */ - int typbyval; /* true if return type is pass by value */ - FmgrInfo func; /* address of function to call (for c - * funcs) */ + FmgrInfo func; /* info for fmgr call mechanism */ Oid foid; /* oid of the function in pg_proc */ Oid language; /* oid of the language in pg_language */ - int nargs; /* number of arguments */ - - /* Might want to make these two arrays of size MAXFUNCARGS */ - - Oid *argOidVect; /* oids of all the arguments */ - bool *nullVect; /* keep track of null arguments */ - - char *src; /* source code of the function */ - char *bin; /* binary object code ?? */ - char *func_state; /* fuction_state struct for execution */ + int typlen; /* length of the return type */ + bool typbyval; /* true if return type is pass by value */ bool oneResult; /* true we only want 1 result from the * function */ @@ -42,17 +31,23 @@ typedef struct * expr whose argument is func returning a * set ugh! */ + int nargs; /* actual number of arguments */ + Oid *argOidVect; /* oids of all the argument types */ + + char *src; /* source code of the function */ + char *bin; /* binary object code ?? */ + char *func_state; /* function_state struct for execution */ + Pointer funcSlot; /* if one result we need to copy it before * we end execution of the function and * free stuff */ - char *setArg; /* current argument for nested dot + Datum setArg; /* current argument for nested dot * execution Nested dot expressions mean * we have funcs whose argument is a set * of tuples */ +} FunctionCache; - bool istrusted; /* trusted fn? */ -} FunctionCache, - *FunctionCachePtr; +typedef FunctionCache *FunctionCachePtr; #endif /* FCACHE_H */ diff --git a/src/include/utils/fmgrtab.h b/src/include/utils/fmgrtab.h index 21e28904d5..e6cfe51965 100644 --- a/src/include/utils/fmgrtab.h +++ b/src/include/utils/fmgrtab.h @@ -1,30 +1,39 @@ /*------------------------------------------------------------------------- * * fmgrtab.h - * - * + * The function manager's table of internal functions. * * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: fmgrtab.h,v 1.12 2000/01/26 05:58:38 momjian Exp $ + * $Id: fmgrtab.h,v 1.13 2000/05/28 17:56:20 tgl Exp $ * *------------------------------------------------------------------------- */ #ifndef FMGRTAB_H #define FMGRTAB_H +#include "fmgr.h" + + +/* + * This table stores info about all the built-in functions (ie, functions + * that are compiled into the Postgres executable). The table entries are + * required to appear in Oid order, so that binary search can be used. + */ typedef struct { - Oid proid; - int nargs; - func_ptr func; - char *funcName; -} FmgrCall; + Oid foid; /* OID of the function */ + const char *funcName; /* C name of the function */ + short nargs; /* 0..FUNC_MAX_ARGS, or -1 if variable count */ + bool strict; /* T if function is "strict" */ + bool oldstyle; /* T if function uses old fmgr interface */ + PGFunction func; /* pointer to compiled function */ +} FmgrBuiltin; -extern FmgrCall *fmgr_isbuiltin(Oid id); -extern func_ptr fmgr_lookupByName(char *name); -extern void load_file(char *filename); +extern const FmgrBuiltin fmgr_builtins[]; + +extern const int fmgr_nbuiltins; /* number of entries in table */ #endif /* FMGRTAB_H */ diff --git a/src/include/utils/int8.h b/src/include/utils/int8.h index dab1e0addd..b8ad531ab2 100644 --- a/src/include/utils/int8.h +++ b/src/include/utils/int8.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: int8.h,v 1.20 2000/04/12 17:16:55 momjian Exp $ + * $Id: int8.h,v 1.21 2000/05/28 17:56:20 tgl Exp $ * * NOTES * These data types are supported on all 64-bit architectures, and may @@ -24,28 +24,6 @@ #ifndef INT8_H #define INT8_H -#ifdef HAVE_LONG_INT_64 -/* Plain "long int" fits, use it */ -typedef long int int64; - -#else -#ifdef HAVE_LONG_LONG_INT_64 -/* We have working support for "long long int", use that */ -typedef long long int int64; - -#else -/* Won't actually work, but fall back to long int so that int8.c compiles */ -typedef long int int64; - -#define INT64_IS_BUSTED -#endif -#endif - -/* this should be set in config.h: */ -#ifndef INT64_FORMAT -#define INT64_FORMAT "%ld" -#endif - extern int64 *int8in(char *str); extern char *int8out(int64 *val); diff --git a/src/interfaces/libpq/Makefile.in b/src/interfaces/libpq/Makefile.in index 7e38434592..a5c43a4512 100644 --- a/src/interfaces/libpq/Makefile.in +++ b/src/interfaces/libpq/Makefile.in @@ -6,7 +6,7 @@ # Copyright (c) 1994, Regents of the University of California # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.57 2000/05/27 04:13:05 momjian Exp $ +# $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.58 2000/05/28 17:56:25 tgl Exp $ # #------------------------------------------------------------------------- @@ -70,15 +70,6 @@ big5.c: $(SRCDIR)/backend/utils/mb/big5.c endif -# The following rules cause dependencies in the backend directory to -# get made if they don't exist, but don't cause them to get remade if they -# are out of date. -fe-lobj.o: $(SRCDIR)/backend/fmgr.h - -$(SRCDIR)/backend/fmgr.h: - $(MAKE) -C $(SRCDIR)/backend fmgr.h - - .PHONY: install install-headers install: install-headers install-lib $(install-shlib-dep) diff --git a/src/pl/plperl/plperl.c b/src/pl/plperl/plperl.c index 86ffbb265f..b440be12de 100644 --- a/src/pl/plperl/plperl.c +++ b/src/pl/plperl/plperl.c @@ -32,6 +32,9 @@ * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, * ENHANCEMENTS, OR MODIFICATIONS. * + * IDENTIFICATION + * $Header: /cvsroot/pgsql/src/pl/plperl/plperl.c,v 1.7 2000/05/28 17:56:26 tgl Exp $ + * **********************************************************************/ @@ -130,17 +133,15 @@ static Tcl_HashTable *plperl_query_hash = NULL; static void plperl_init_all(void); static void plperl_init_safe_interp(void); -Datum plperl_call_handler(FmgrInfo *proinfo, - FmgrValues *proargs, bool *isNull); +Datum plperl_call_handler(PG_FUNCTION_ARGS); -static Datum plperl_func_handler(FmgrInfo *proinfo, - FmgrValues *proargs, bool *isNull); +static Datum plperl_func_handler(PG_FUNCTION_ARGS); static SV *plperl_build_tuple_argument(HeapTuple tuple, TupleDesc tupdesc); static void plperl_init_shared_libs(void); #ifdef REALLYHAVEITONTHEBALL -static HeapTuple plperl_trigger_handler(FmgrInfo *proinfo); +static HeapTuple plperl_trigger_handler(PG_FUNCTION_ARGS); static int plperl_elog(ClientData cdata, Tcl_Interp *interp, int argc, char *argv[]); @@ -258,9 +259,7 @@ plperl_init_safe_interp(void) /* keep non-static */ Datum -plperl_call_handler(FmgrInfo *proinfo, - FmgrValues *proargs, - bool *isNull) +plperl_call_handler(PG_FUNCTION_ARGS) { Datum retval; @@ -285,13 +284,13 @@ plperl_call_handler(FmgrInfo *proinfo, * call appropriate subhandler ************************************************************/ if (CurrentTriggerData == NULL) - retval = plperl_func_handler(proinfo, proargs, isNull); + retval = plperl_func_handler(fcinfo); else { elog(ERROR, "plperl: can't use perl in triggers yet."); /* - * retval = (Datum) plperl_trigger_handler(proinfo); + * retval = (Datum) plperl_trigger_handler(fcinfo); */ /* make the compiler happy */ retval = (Datum) 0; @@ -390,7 +389,7 @@ plperl_init_shared_libs(void) **********************************************************************/ static SV * -plperl_call_perl_func(plperl_proc_desc * desc, FmgrValues *pargs) +plperl_call_perl_func(plperl_proc_desc * desc, FunctionCallInfo fcinfo) { dSP; @@ -407,25 +406,34 @@ plperl_call_perl_func(plperl_proc_desc * desc, FmgrValues *pargs) { if (desc->arg_is_rel[i]) { + TupleTableSlot *slot = (TupleTableSlot *) fcinfo->arg[i]; + SV *hashref; + Assert(slot != NULL && ! fcinfo->argnull[i]); /* * plperl_build_tuple_argument better return a mortal SV. */ - SV *hashref = plperl_build_tuple_argument( - ((TupleTableSlot *) (pargs->data[i]))->val, - ((TupleTableSlot *) (pargs->data[i]))->ttc_tupleDescriptor); - + hashref = plperl_build_tuple_argument(slot->val, + slot->ttc_tupleDescriptor); XPUSHs(hashref); } else { - char *tmp = (*fmgr_faddr(&(desc->arg_out_func[i]))) - (pargs->data[i], - desc->arg_out_elem[i], - desc->arg_out_len[i]); + if (fcinfo->argnull[i]) + { + XPUSHs(&PL_sv_undef); + } + else + { + char *tmp; - XPUSHs(sv_2mortal(newSVpv(tmp, 0))); - pfree(tmp); + tmp = (*fmgr_faddr(&(desc->arg_out_func[i]))) + (fcinfo->arg[i], + desc->arg_out_elem[i], + desc->arg_out_len[i]); + XPUSHs(sv_2mortal(newSVpv(tmp, 0))); + pfree(tmp); + } } } PUTBACK; @@ -466,14 +474,11 @@ plperl_call_perl_func(plperl_proc_desc * desc, FmgrValues *pargs) * plperl_func_handler() - Handler for regular function calls **********************************************************************/ static Datum -plperl_func_handler(FmgrInfo *proinfo, - FmgrValues *proargs, - bool *isNull) +plperl_func_handler(PG_FUNCTION_ARGS) { int i; char internal_proname[512]; int proname_len; - char *stroid; plperl_proc_desc *prodesc; SV *perlret; Datum retval; @@ -482,10 +487,7 @@ plperl_func_handler(FmgrInfo *proinfo, /************************************************************ * Build our internal proc name from the functions Oid ************************************************************/ - stroid = oidout(proinfo->fn_oid); - strcpy(internal_proname, "__PLperl_proc_"); - strcat(internal_proname, stroid); - pfree(stroid); + sprintf(internal_proname, "__PLPerl_proc_%u", fcinfo->flinfo->fn_oid); proname_len = strlen(internal_proname); /************************************************************ @@ -518,14 +520,14 @@ plperl_func_handler(FmgrInfo *proinfo, * Lookup the pg_proc tuple by Oid ************************************************************/ procTup = SearchSysCacheTuple(PROCOID, - ObjectIdGetDatum(proinfo->fn_oid), + ObjectIdGetDatum(fcinfo->flinfo->fn_oid), 0, 0, 0); if (!HeapTupleIsValid(procTup)) { free(prodesc->proname); free(prodesc); elog(ERROR, "plperl: cache lookup for proc %u failed", - proinfo->fn_oid); + fcinfo->flinfo->fn_oid); } procStruct = (Form_pg_proc) GETSTRUCT(procTup); @@ -560,8 +562,8 @@ plperl_func_handler(FmgrInfo *proinfo, * Get the required information for output conversion * of all procedure arguments ************************************************************/ - prodesc->nargs = proinfo->fn_nargs; - for (i = 0; i < proinfo->fn_nargs; i++) + prodesc->nargs = procStruct->pronargs; + for (i = 0; i < prodesc->nargs; i++) { typeTup = SearchSysCacheTuple(TYPEOID, ObjectIdGetDatum(procStruct->proargtypes[i]), @@ -639,7 +641,7 @@ plperl_func_handler(FmgrInfo *proinfo, /************************************************************ * Call the Perl function ************************************************************/ - perlret = plperl_call_perl_func(prodesc, proargs); + perlret = plperl_call_perl_func(prodesc, fcinfo); /************************************************************ * Disconnect from SPI manager and then create the return @@ -650,10 +652,19 @@ plperl_func_handler(FmgrInfo *proinfo, if (SPI_finish() != SPI_OK_FINISH) elog(ERROR, "plperl: SPI_finish() failed"); - retval = (Datum) (*fmgr_faddr(&prodesc->result_in_func)) - (SvPV(perlret, na), - prodesc->result_in_elem, - prodesc->result_in_len); + /* XXX is this the approved way to check for an undef result? */ + if (perlret == &PL_sv_undef) + { + retval = (Datum) 0; + fcinfo->isnull = true; + } + else + { + retval = FunctionCall3(&prodesc->result_in_func, + PointerGetDatum(SvPV(perlret, na)), + ObjectIdGetDatum(prodesc->result_in_elem), + Int32GetDatum(prodesc->result_in_len)); + } SvREFCNT_dec(perlret); @@ -674,7 +685,7 @@ plperl_func_handler(FmgrInfo *proinfo, * plperl_trigger_handler() - Handler for trigger calls **********************************************************************/ static HeapTuple -plperl_trigger_handler(FmgrInfo *proinfo) +plperl_trigger_handler(PG_FUNCTION_ARGS) { TriggerData *trigdata; char internal_proname[512]; @@ -708,10 +719,7 @@ plperl_trigger_handler(FmgrInfo *proinfo) /************************************************************ * Build our internal proc name from the functions Oid ************************************************************/ - stroid = oidout(proinfo->fn_oid); - strcpy(internal_proname, "__PLTcl_proc_"); - strcat(internal_proname, stroid); - pfree(stroid); + sprintf(internal_proname, "__PLPerl_proc_%u", fcinfo->flinfo->fn_oid); /************************************************************ * Lookup the internal proc name in the hashtable @@ -741,14 +749,14 @@ plperl_trigger_handler(FmgrInfo *proinfo) * Lookup the pg_proc tuple by Oid ************************************************************/ procTup = SearchSysCacheTuple(PROCOID, - ObjectIdGetDatum(proinfo->fn_oid), + ObjectIdGetDatum(fcinfo->flinfo->fn_oid), 0, 0, 0); if (!HeapTupleIsValid(procTup)) { free(prodesc->proname); free(prodesc); elog(ERROR, "plperl: cache lookup for proc %u failed", - proinfo->fn_oid); + fcinfo->flinfo->fn_oid); } procStruct = (Form_pg_proc) GETSTRUCT(procTup); diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c index a2565a4363..e587aecba6 100644 --- a/src/pl/plpgsql/src/pl_exec.c +++ b/src/pl/plpgsql/src/pl_exec.c @@ -3,7 +3,7 @@ * procedural language * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.21 2000/04/28 00:12:44 tgl Exp $ + * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.22 2000/05/28 17:56:28 tgl Exp $ * * This software is copyrighted by Jan Wieck - Hamburg. * @@ -141,8 +141,7 @@ static void exec_set_found(PLpgSQL_execstate * estate, bool state); * ---------- */ Datum -plpgsql_exec_function(PLpgSQL_function * func, - FmgrValues *args, bool *isNull) +plpgsql_exec_function(PLpgSQL_function * func, FunctionCallInfo fcinfo) { PLpgSQL_execstate estate; int i; @@ -302,21 +301,22 @@ plpgsql_exec_function(PLpgSQL_function * func, { PLpgSQL_var *var = (PLpgSQL_var *) estate.datums[n]; - var->value = (Datum) (args->data[i]); - var->isnull = *isNull; + var->value = fcinfo->arg[i]; + var->isnull = fcinfo->argnull[i]; var->shouldfree = false; } break; case PLPGSQL_DTYPE_ROW: { + PLpgSQL_row *row = (PLpgSQL_row *) estate.datums[n]; + TupleTableSlot *slot = (TupleTableSlot *) fcinfo->arg[i]; HeapTuple tup; TupleDesc tupdesc; - PLpgSQL_row *row = (PLpgSQL_row *) estate.datums[n]; - - tup = ((TupleTableSlot *) (args->data[i]))->val; - tupdesc = ((TupleTableSlot *) (args->data[i]))->ttc_tupleDescriptor; + Assert(slot != NULL && ! fcinfo->argnull[i]); + tup = slot->val; + tupdesc = slot->ttc_tupleDescriptor; exec_move_row(&estate, NULL, row, tup, tupdesc); } break; @@ -384,7 +384,7 @@ plpgsql_exec_function(PLpgSQL_function * func, error_info_stmt = NULL; error_info_text = "while casting return value to functions return type"; - *isNull = estate.retisnull; + fcinfo->isnull = estate.retisnull; if (!estate.retistuple) { @@ -393,14 +393,14 @@ plpgsql_exec_function(PLpgSQL_function * func, &(func->fn_retinput), func->fn_rettypelem, -1, - isNull); + &fcinfo->isnull); /* ---------- * If the functions return type isn't by value, * copy the value into upper executor memory context. * ---------- */ - if (!*isNull && !func->fn_retbyval) + if (!fcinfo->isnull && !func->fn_retbyval) { int len; Datum tmp; diff --git a/src/pl/plpgsql/src/pl_handler.c b/src/pl/plpgsql/src/pl_handler.c index 0215eea6bb..54ecb1f4e8 100644 --- a/src/pl/plpgsql/src/pl_handler.c +++ b/src/pl/plpgsql/src/pl_handler.c @@ -3,7 +3,7 @@ * procedural language * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_handler.c,v 1.3 1999/07/15 15:21:48 momjian Exp $ + * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_handler.c,v 1.4 2000/05/28 17:56:28 tgl Exp $ * * This software is copyrighted by Jan Wieck - Hamburg. * @@ -45,44 +45,45 @@ #include "plpgsql.h" #include "pl.tab.h" -#include "executor/spi.h" -#include "commands/trigger.h" -#include "utils/builtins.h" -#include "fmgr.h" #include "access/heapam.h" - -#include "utils/syscache.h" #include "catalog/pg_proc.h" #include "catalog/pg_type.h" +#include "utils/builtins.h" +#include "utils/syscache.h" +/* + * Head of list of already-compiled functions + */ static PLpgSQL_function *compiled_functions = NULL; -Datum plpgsql_call_handler(FmgrInfo *proinfo, - FmgrValues *proargs, bool *isNull); - -static Datum plpgsql_func_handler(FmgrInfo *proinfo, - FmgrValues *proargs, bool *isNull); - -static HeapTuple plpgsql_trigger_handler(FmgrInfo *proinfo); - - /* ---------- - * plpgsql_call_handler - This is the only visible function - * of the PL interpreter. The PostgreSQL - * function manager and trigger manager - * call this function for execution of - * PL/pgSQL procedures. + * plpgsql_call_handler + * + * This is the only visible function of the PL interpreter. + * The PostgreSQL function manager and trigger manager + * call this function for execution of PL/pgSQL procedures. * ---------- */ Datum -plpgsql_call_handler(FmgrInfo *proinfo, - FmgrValues *proargs, - bool *isNull) +plpgsql_call_handler(PG_FUNCTION_ARGS) { + TriggerData *trigdata; + bool isTrigger; + PLpgSQL_function *func; Datum retval; + /* ---------- + * Save the current trigger data local + * + * XXX this should go away in favor of using fcinfo->context + * ---------- + */ + trigdata = CurrentTriggerData; + CurrentTriggerData = NULL; + isTrigger = (trigdata != NULL); + /* ---------- * Connect to SPI manager * ---------- @@ -90,15 +91,54 @@ plpgsql_call_handler(FmgrInfo *proinfo, if (SPI_connect() != SPI_OK_CONNECT) elog(ERROR, "plpgsql: cannot connect to SPI manager"); + /* ---------- + * Check if we already compiled this function and saved the pointer + * (ie, current FmgrInfo has been used before) + * ---------- + */ + func = (PLpgSQL_function *) fcinfo->flinfo->fn_extra; + if (func == NULL) + { + /* ---------- + * Check if we already compiled this function + * ---------- + */ + Oid funcOid = fcinfo->flinfo->fn_oid; + + for (func = compiled_functions; func != NULL; func = func->next) + { + if (funcOid == func->fn_oid) + break; + } + + /* ---------- + * If not, do so and add it to the compiled ones + * ---------- + */ + if (func == NULL) + { + func = plpgsql_compile(funcOid, + isTrigger ? T_TRIGGER : T_FUNCTION); + func->next = compiled_functions; + compiled_functions = func; + } + + /* ---------- + * Save pointer in FmgrInfo to avoid search on subsequent calls + * ---------- + */ + fcinfo->flinfo->fn_extra = (void *) func; + } + /* ---------- * Determine if called as function or trigger and * call appropriate subhandler * ---------- */ - if (CurrentTriggerData == NULL) - retval = plpgsql_func_handler(proinfo, proargs, isNull); + if (isTrigger) + retval = PointerGetDatum(plpgsql_exec_trigger(func, trigdata)); else - retval = (Datum) plpgsql_trigger_handler(proinfo); + retval = plpgsql_exec_function(func, fcinfo); /* ---------- * Disconnect from SPI manager @@ -109,83 +149,3 @@ plpgsql_call_handler(FmgrInfo *proinfo, return retval; } - - -/* ---------- - * plpgsql_func_handler() - Handler for regular function calls - * ---------- - */ -static Datum -plpgsql_func_handler(FmgrInfo *proinfo, - FmgrValues *proargs, - bool *isNull) -{ - PLpgSQL_function *func; - - /* ---------- - * Check if we already compiled this function - * ---------- - */ - for (func = compiled_functions; func != NULL; func = func->next) - { - if (proinfo->fn_oid == func->fn_oid) - break; - } - - /* ---------- - * If not, do so and add it to the compiled ones - * ---------- - */ - if (func == NULL) - { - func = plpgsql_compile(proinfo->fn_oid, T_FUNCTION); - - func->next = compiled_functions; - compiled_functions = func; - } - - return plpgsql_exec_function(func, proargs, isNull); -} - - -/* ---------- - * plpgsql_trigger_handler() - Handler for trigger calls - * ---------- - */ -static HeapTuple -plpgsql_trigger_handler(FmgrInfo *proinfo) -{ - TriggerData *trigdata; - PLpgSQL_function *func; - - /* ---------- - * Save the current trigger data local - * ---------- - */ - trigdata = CurrentTriggerData; - CurrentTriggerData = NULL; - - /* ---------- - * Check if we already compiled this trigger procedure - * ---------- - */ - for (func = compiled_functions; func != NULL; func = func->next) - { - if (proinfo->fn_oid == func->fn_oid) - break; - } - - /* ---------- - * If not, do so and add it to the compiled ones - * ---------- - */ - if (func == NULL) - { - func = plpgsql_compile(proinfo->fn_oid, T_TRIGGER); - - func->next = compiled_functions; - compiled_functions = func; - } - - return plpgsql_exec_trigger(func, trigdata); -} diff --git a/src/pl/plpgsql/src/plpgsql.h b/src/pl/plpgsql/src/plpgsql.h index 5efbccff8a..f4246980fc 100644 --- a/src/pl/plpgsql/src/plpgsql.h +++ b/src/pl/plpgsql/src/plpgsql.h @@ -3,7 +3,7 @@ * procedural language * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/plpgsql.h,v 1.8 2000/01/20 05:44:34 tgl Exp $ + * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/plpgsql.h,v 1.9 2000/05/28 17:56:28 tgl Exp $ * * This software is copyrighted by Jan Wieck - Hamburg. * @@ -38,9 +38,10 @@ #define PLPGSQL_H #include "postgres.h" + +#include "fmgr.h" #include "executor/spi.h" #include "commands/trigger.h" -#include "fmgr.h" /********************************************************************** * Definitions @@ -451,15 +452,20 @@ extern void plpgsql_adddatum(PLpgSQL_datum * new); extern int plpgsql_add_initdatums(int **varnos); extern void plpgsql_comperrinfo(void); +/* ---------- + * Functions in pl_handler.c + * ---------- + */ +extern Datum plpgsql_call_handler(PG_FUNCTION_ARGS); /* ---------- * Functions in pl_exec.c * ---------- */ extern Datum plpgsql_exec_function(PLpgSQL_function * func, - FmgrValues *args, bool *isNull); + FunctionCallInfo fcinfo); extern HeapTuple plpgsql_exec_trigger(PLpgSQL_function * func, - TriggerData *trigdata); + TriggerData *trigdata); /* ---------- diff --git a/src/pl/tcl/pltcl.c b/src/pl/tcl/pltcl.c index a57812e20a..c968471ed9 100644 --- a/src/pl/tcl/pltcl.c +++ b/src/pl/tcl/pltcl.c @@ -2,9 +2,6 @@ * pltcl.c - PostgreSQL support for Tcl as * procedural language (PL) * - * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.22 2000/05/23 01:59:05 tgl Exp $ - * * This software is copyrighted by Jan Wieck - Hamburg. * * The author hereby grants permission to use, copy, modify, @@ -33,6 +30,9 @@ * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, * ENHANCEMENTS, OR MODIFICATIONS. * + * IDENTIFICATION + * $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.23 2000/05/28 17:56:29 tgl Exp $ + * **********************************************************************/ #include @@ -111,13 +111,11 @@ static void pltcl_init_load_unknown(void); #endif /* PLTCL_UNKNOWN_SUPPORT */ -Datum pltcl_call_handler(FmgrInfo *proinfo, - FmgrValues *proargs, bool *isNull); +Datum pltcl_call_handler(PG_FUNCTION_ARGS); -static Datum pltcl_func_handler(FmgrInfo *proinfo, - FmgrValues *proargs, bool *isNull); +static Datum pltcl_func_handler(PG_FUNCTION_ARGS); -static HeapTuple pltcl_trigger_handler(FmgrInfo *proinfo); +static HeapTuple pltcl_trigger_handler(PG_FUNCTION_ARGS); static int pltcl_elog(ClientData cdata, Tcl_Interp *interp, int argc, char *argv[]); @@ -368,9 +366,7 @@ pltcl_init_load_unknown(void) /* keep non-static */ Datum -pltcl_call_handler(FmgrInfo *proinfo, - FmgrValues *proargs, - bool *isNull) +pltcl_call_handler(PG_FUNCTION_ARGS) { Datum retval; @@ -395,9 +391,9 @@ pltcl_call_handler(FmgrInfo *proinfo, * call appropriate subhandler ************************************************************/ if (CurrentTriggerData == NULL) - retval = pltcl_func_handler(proinfo, proargs, isNull); + retval = pltcl_func_handler(fcinfo); else - retval = (Datum) pltcl_trigger_handler(proinfo); + retval = (Datum) pltcl_trigger_handler(fcinfo); pltcl_call_level--; @@ -408,13 +404,10 @@ pltcl_call_handler(FmgrInfo *proinfo, * pltcl_func_handler() - Handler for regular function calls **********************************************************************/ static Datum -pltcl_func_handler(FmgrInfo *proinfo, - FmgrValues *proargs, - bool *isNull) +pltcl_func_handler(PG_FUNCTION_ARGS) { int i; char internal_proname[512]; - char *stroid; Tcl_HashEntry *hashent; int hashnew; pltcl_proc_desc *volatile prodesc; @@ -427,10 +420,7 @@ pltcl_func_handler(FmgrInfo *proinfo, /************************************************************ * Build our internal proc name from the functions Oid ************************************************************/ - stroid = oidout(proinfo->fn_oid); - strcpy(internal_proname, "__PLTcl_proc_"); - strcat(internal_proname, stroid); - pfree(stroid); + sprintf(internal_proname, "__PLTcl_proc_%u", fcinfo->flinfo->fn_oid); /************************************************************ * Lookup the internal proc name in the hashtable @@ -467,14 +457,14 @@ pltcl_func_handler(FmgrInfo *proinfo, * Lookup the pg_proc tuple by Oid ************************************************************/ procTup = SearchSysCacheTuple(PROCOID, - ObjectIdGetDatum(proinfo->fn_oid), + ObjectIdGetDatum(fcinfo->flinfo->fn_oid), 0, 0, 0); if (!HeapTupleIsValid(procTup)) { free(prodesc->proname); free(prodesc); elog(ERROR, "pltcl: cache lookup for proc %u failed", - proinfo->fn_oid); + fcinfo->flinfo->fn_oid); } procStruct = (Form_pg_proc) GETSTRUCT(procTup); @@ -508,9 +498,9 @@ pltcl_func_handler(FmgrInfo *proinfo, * Get the required information for output conversion * of all procedure arguments ************************************************************/ - prodesc->nargs = proinfo->fn_nargs; + prodesc->nargs = procStruct->pronargs; proc_internal_args[0] = '\0'; - for (i = 0; i < proinfo->fn_nargs; i++) + for (i = 0; i < prodesc->nargs; i++) { typeTup = SearchSysCacheTuple(TYPEOID, ObjectIdGetDatum(procStruct->proargtypes[i]), @@ -564,7 +554,7 @@ pltcl_func_handler(FmgrInfo *proinfo, Tcl_DStringAppend(&proc_internal_body, "upvar #0 ", -1); Tcl_DStringAppend(&proc_internal_body, internal_proname, -1); Tcl_DStringAppend(&proc_internal_body, " GD\n", -1); - for (i = 0; i < proinfo->fn_nargs; i++) + for (i = 0; i < fcinfo->nargs; i++) { if (!prodesc->arg_is_rel[i]) continue; @@ -640,10 +630,12 @@ pltcl_func_handler(FmgrInfo *proinfo, /************************************************** * For tuple values, add a list for 'array set ...' **************************************************/ + TupleTableSlot *slot = (TupleTableSlot *) fcinfo->arg[i]; + + Assert(slot != NULL && ! fcinfo->argnull[i]); Tcl_DStringInit(&list_tmp); - pltcl_build_tuple_argument( - ((TupleTableSlot *) (proargs->data[i]))->val, - ((TupleTableSlot *) (proargs->data[i]))->ttc_tupleDescriptor, + pltcl_build_tuple_argument(slot->val, + slot->ttc_tupleDescriptor, &list_tmp); Tcl_DStringAppendElement(&tcl_cmd, Tcl_DStringValue(&list_tmp)); Tcl_DStringFree(&list_tmp); @@ -655,14 +647,21 @@ pltcl_func_handler(FmgrInfo *proinfo, * Single values are added as string element * of their external representation **************************************************/ - char *tmp; + if (fcinfo->argnull[i]) + { + Tcl_DStringAppendElement(&tcl_cmd, ""); + } + else + { + char *tmp; - tmp = (*fmgr_faddr(&(prodesc->arg_out_func[i]))) - (proargs->data[i], - prodesc->arg_out_elem[i], - prodesc->arg_out_len[i]); - Tcl_DStringAppendElement(&tcl_cmd, tmp); - pfree(tmp); + tmp = (*fmgr_faddr(&(prodesc->arg_out_func[i]))) + (fcinfo->arg[i], + prodesc->arg_out_elem[i], + prodesc->arg_out_len[i]); + Tcl_DStringAppendElement(&tcl_cmd, tmp); + pfree(tmp); + } } } Tcl_DStringFree(&list_tmp); @@ -719,10 +718,10 @@ pltcl_func_handler(FmgrInfo *proinfo, if (SPI_finish() != SPI_OK_FINISH) elog(ERROR, "pltcl: SPI_finish() failed"); - retval = (Datum) (*fmgr_faddr(&prodesc->result_in_func)) - (pltcl_safe_interp->result, - prodesc->result_in_elem, - -1); + retval = FunctionCall3(&prodesc->result_in_func, + PointerGetDatum(pltcl_safe_interp->result), + ObjectIdGetDatum(prodesc->result_in_elem), + Int32GetDatum(-1)); memcpy(&Warn_restart, &save_restart, sizeof(Warn_restart)); return retval; @@ -733,7 +732,7 @@ pltcl_func_handler(FmgrInfo *proinfo, * pltcl_trigger_handler() - Handler for trigger calls **********************************************************************/ static HeapTuple -pltcl_trigger_handler(FmgrInfo *proinfo) +pltcl_trigger_handler(PG_FUNCTION_ARGS) { TriggerData *trigdata; char internal_proname[512]; @@ -767,10 +766,7 @@ pltcl_trigger_handler(FmgrInfo *proinfo) /************************************************************ * Build our internal proc name from the functions Oid ************************************************************/ - stroid = oidout(proinfo->fn_oid); - strcpy(internal_proname, "__PLTcl_proc_"); - strcat(internal_proname, stroid); - pfree(stroid); + sprintf(internal_proname, "__PLTcl_proc_%u", fcinfo->flinfo->fn_oid); /************************************************************ * Lookup the internal proc name in the hashtable @@ -800,14 +796,14 @@ pltcl_trigger_handler(FmgrInfo *proinfo) * Lookup the pg_proc tuple by Oid ************************************************************/ procTup = SearchSysCacheTuple(PROCOID, - ObjectIdGetDatum(proinfo->fn_oid), + ObjectIdGetDatum(fcinfo->flinfo->fn_oid), 0, 0, 0); if (!HeapTupleIsValid(procTup)) { free(prodesc->proname); free(prodesc); elog(ERROR, "pltcl: cache lookup for proc %u failed", - proinfo->fn_oid); + fcinfo->flinfo->fn_oid); } procStruct = (Form_pg_proc) GETSTRUCT(procTup);