summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTom Lane2000-06-13 07:35:40 +0000
committerTom Lane2000-06-13 07:35:40 +0000
commitf2d120532207b8873a5e74e7350dd2904f377289 (patch)
tree992c89e023c4b29b42bf4fd6563de91f8d6ec8ca /src/include
parent8f057d971d663fff9bbb2ae7d053bf71cf09b4a2 (diff)
Another batch of fmgr updates. I think I have gotten all old-style
functions that take pass-by-value datatypes. Should be ready for port testing ...
Diffstat (limited to 'src/include')
-rw-r--r--src/include/access/gist.h13
-rw-r--r--src/include/access/gistscan.h12
-rw-r--r--src/include/access/hash.h24
-rw-r--r--src/include/access/nbtree.h25
-rw-r--r--src/include/access/rtree.h31
-rw-r--r--src/include/catalog/catversion.h4
-rw-r--r--src/include/catalog/pg_proc.h284
-rw-r--r--src/include/fmgr.h65
-rw-r--r--src/include/mb/pg_wchar.h8
-rw-r--r--src/include/miscadmin.h9
-rw-r--r--src/include/postgres.h23
-rw-r--r--src/include/utils/array.h39
-rw-r--r--src/include/utils/builtins.h70
-rw-r--r--src/include/utils/cash.h6
-rw-r--r--src/include/utils/formatting.h14
-rw-r--r--src/include/utils/geo_decls.h47
-rw-r--r--src/include/utils/int8.h95
-rw-r--r--src/include/utils/numeric.h11
18 files changed, 412 insertions, 368 deletions
diff --git a/src/include/access/gist.h b/src/include/access/gist.h
index 8c3c7a75fd4..dd8f557e9ba 100644
--- a/src/include/access/gist.h
+++ b/src/include/access/gist.h
@@ -182,14 +182,9 @@ typedef struct intrange
int flag;
} INTRANGE;
-extern void gistbuild(Relation heap,
- Relation index, int natts,
- AttrNumber *attnum, IndexStrategy istrat,
- uint16 pint, Datum *params,
- FuncIndexInfo *finfo,
- PredInfo *predInfo);
-extern InsertIndexResult gistinsert(Relation r, Datum *datum,
- char *nulls, ItemPointer ht_ctid, Relation heapRel);
+extern Datum gistbuild(PG_FUNCTION_ARGS);
+extern Datum gistinsert(PG_FUNCTION_ARGS);
+extern Datum gistdelete(PG_FUNCTION_ARGS);
extern void _gistdump(Relation r);
extern void gistfreestack(GISTSTACK *s);
extern void initGISTstate(GISTSTATE *giststate, Relation index);
@@ -198,6 +193,6 @@ extern void gistdentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr,
extern StrategyNumber RelationGetGISTStrategy(Relation, AttrNumber, RegProcedure);
/* gistget.c */
-extern RetrieveIndexResult gistgettuple(IndexScanDesc s, ScanDirection dir);
+extern Datum gistgettuple(PG_FUNCTION_ARGS);
#endif /* GIST_H */
diff --git a/src/include/access/gistscan.h b/src/include/access/gistscan.h
index ef55ab39518..98498965f73 100644
--- a/src/include/access/gistscan.h
+++ b/src/include/access/gistscan.h
@@ -10,15 +10,15 @@
*-------------------------------------------------------------------------
*/
#ifndef GISTSCAN_H
+#define GISTSCAN_H
#include "access/relscan.h"
-extern IndexScanDesc gistbeginscan(Relation r, bool fromEnd,
- uint16 nkeys, ScanKey key);
-extern void gistrescan(IndexScanDesc s, bool fromEnd, ScanKey key);
-extern void gistmarkpos(IndexScanDesc s);
-extern void gistrestrpos(IndexScanDesc s);
-extern void gistendscan(IndexScanDesc s);
+extern Datum gistbeginscan(PG_FUNCTION_ARGS);
+extern Datum gistrescan(PG_FUNCTION_ARGS);
+extern Datum gistmarkpos(PG_FUNCTION_ARGS);
+extern Datum gistrestrpos(PG_FUNCTION_ARGS);
+extern Datum gistendscan(PG_FUNCTION_ARGS);
extern void gistadjscans(Relation r, int op, BlockNumber blkno, OffsetNumber offnum);
#endif /* GISTSCAN_H */
diff --git a/src/include/access/hash.h b/src/include/access/hash.h
index 06c0fda9591..294531fdb3f 100644
--- a/src/include/access/hash.h
+++ b/src/include/access/hash.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: hash.h,v 1.32 2000/06/05 07:28:57 tgl Exp $
+ * $Id: hash.h,v 1.33 2000/06/13 07:35:17 tgl Exp $
*
* NOTES
* modeled after Margo Seltzer's hash implementation for unix.
@@ -248,19 +248,15 @@ typedef HashItemData *HashItem;
/* public routines */
-extern void hashbuild(Relation heap, Relation index, int natts,
- AttrNumber *attnum, IndexStrategy istrat, uint16 pcount,
- Datum *params, FuncIndexInfo *finfo, PredInfo *predInfo);
-extern InsertIndexResult hashinsert(Relation rel, Datum *datum, char *nulls,
- ItemPointer ht_ctid, Relation heapRel);
-extern char *hashgettuple(IndexScanDesc scan, ScanDirection dir);
-extern char *hashbeginscan(Relation rel, bool fromEnd, uint16 keysz,
- ScanKey scankey);
-extern void hashrescan(IndexScanDesc scan, bool fromEnd, ScanKey scankey);
-extern void hashendscan(IndexScanDesc scan);
-extern void hashmarkpos(IndexScanDesc scan);
-extern void hashrestrpos(IndexScanDesc scan);
-extern void hashdelete(Relation rel, ItemPointer tid);
+extern Datum hashbuild(PG_FUNCTION_ARGS);
+extern Datum hashinsert(PG_FUNCTION_ARGS);
+extern Datum hashgettuple(PG_FUNCTION_ARGS);
+extern Datum hashbeginscan(PG_FUNCTION_ARGS);
+extern Datum hashrescan(PG_FUNCTION_ARGS);
+extern Datum hashendscan(PG_FUNCTION_ARGS);
+extern Datum hashmarkpos(PG_FUNCTION_ARGS);
+extern Datum hashrestrpos(PG_FUNCTION_ARGS);
+extern Datum hashdelete(PG_FUNCTION_ARGS);
/*
* Datatype-specific hash functions in hashfunc.c.
diff --git a/src/include/access/nbtree.h b/src/include/access/nbtree.h
index 5880a4047e2..8dc3a162a35 100644
--- a/src/include/access/nbtree.h
+++ b/src/include/access/nbtree.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: nbtree.h,v 1.36 2000/06/08 22:37:38 momjian Exp $
+ * $Id: nbtree.h,v 1.37 2000/06/13 07:35:17 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -227,21 +227,16 @@ extern void _bt_pagedel(Relation rel, ItemPointer tid);
*/
extern bool BuildingBtree; /* in nbtree.c */
-extern void btbuild(Relation heap, Relation index, int natts,
- AttrNumber *attnum, IndexStrategy istrat, uint16 pcount,
- Datum *params, FuncIndexInfo *finfo, PredInfo *predInfo);
-extern InsertIndexResult btinsert(Relation rel, Datum *datum, char *nulls,
- ItemPointer ht_ctid, Relation heapRel);
-extern char *btgettuple(IndexScanDesc scan, ScanDirection dir);
-extern char *btbeginscan(Relation rel, bool fromEnd, uint16 keysz,
- ScanKey scankey);
-
-extern void btrescan(IndexScanDesc scan, bool fromEnd, ScanKey scankey);
+extern Datum btbuild(PG_FUNCTION_ARGS);
+extern Datum btinsert(PG_FUNCTION_ARGS);
+extern Datum btgettuple(PG_FUNCTION_ARGS);
+extern Datum btbeginscan(PG_FUNCTION_ARGS);
+extern Datum btrescan(PG_FUNCTION_ARGS);
extern void btmovescan(IndexScanDesc scan, Datum v);
-extern void btendscan(IndexScanDesc scan);
-extern void btmarkpos(IndexScanDesc scan);
-extern void btrestrpos(IndexScanDesc scan);
-extern void btdelete(Relation rel, ItemPointer tid);
+extern Datum btendscan(PG_FUNCTION_ARGS);
+extern Datum btmarkpos(PG_FUNCTION_ARGS);
+extern Datum btrestrpos(PG_FUNCTION_ARGS);
+extern Datum btdelete(PG_FUNCTION_ARGS);
/*
* prototypes for functions in nbtscan.c
diff --git a/src/include/access/rtree.h b/src/include/access/rtree.h
index 06de77cf2cd..c5e0967f57d 100644
--- a/src/include/access/rtree.h
+++ b/src/include/access/rtree.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: rtree.h,v 1.17 2000/01/26 05:57:51 momjian Exp $
+ * $Id: rtree.h,v 1.18 2000/06/13 07:35:17 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -104,28 +104,21 @@ typedef RTreeScanOpaqueData *RTreeScanOpaque;
/* defined in rtree.c */
extern void freestack(RTSTACK *s);
-/* rget.c */
-extern RetrieveIndexResult rtgettuple(IndexScanDesc s, ScanDirection dir);
-
/*
* RTree code.
* Defined in access/index-rtree/
*/
-extern InsertIndexResult rtinsert(Relation r, Datum *datum, char *nulls,
- ItemPointer ht_ctid, Relation heapRel);
-extern char *rtdelete(Relation r, ItemPointer tid);
-
-extern RetrieveIndexResult rtgettuple(IndexScanDesc s, ScanDirection dir);
-extern IndexScanDesc rtbeginscan(Relation r, bool fromEnd, uint16 nkeys,
- ScanKey key);
-
-extern void rtendscan(IndexScanDesc s);
-extern void rtmarkpos(IndexScanDesc s);
-extern void rtrestrpos(IndexScanDesc s);
-extern void rtrescan(IndexScanDesc s, bool fromEnd, ScanKey key);
-extern void rtbuild(Relation heap, Relation index, int natts,
- AttrNumber *attnum, IndexStrategy istrat, uint16 pcount,
- Datum *params, FuncIndexInfo *finfo, PredInfo *predInfo);
+extern Datum rtinsert(PG_FUNCTION_ARGS);
+extern Datum rtdelete(PG_FUNCTION_ARGS);
+
+extern Datum rtgettuple(PG_FUNCTION_ARGS);
+extern Datum rtbeginscan(PG_FUNCTION_ARGS);
+
+extern Datum rtendscan(PG_FUNCTION_ARGS);
+extern Datum rtmarkpos(PG_FUNCTION_ARGS);
+extern Datum rtrestrpos(PG_FUNCTION_ARGS);
+extern Datum rtrescan(PG_FUNCTION_ARGS);
+extern Datum rtbuild(PG_FUNCTION_ARGS);
extern void _rtdump(Relation r);
/* rtscan.c */
diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h
index f15a07fe2b0..fd099038a54 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.30 2000/06/12 22:36:12 momjian Exp $
+ * $Id: catversion.h,v 1.31 2000/06/13 07:35:19 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -53,6 +53,6 @@
*/
/* yyyymmddN */
-#define CATALOG_VERSION_NO 200006121
+#define CATALOG_VERSION_NO 200006131
#endif
diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h
index e870737bf25..acd92072392 100644
--- a/src/include/catalog/pg_proc.h
+++ b/src/include/catalog/pg_proc.h
@@ -7,12 +7,12 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_proc.h,v 1.138 2000/06/11 20:07:51 tgl Exp $
+ * $Id: pg_proc.h,v 1.139 2000/06/13 07:35:19 tgl Exp $
*
* NOTES
* The script catalog/genbki.sh reads this file and generates .bki
* information from the DATA() statements. utils/Gen_fmgrtab.sh
- * generates fmgr.h and fmgrtab.c the same way.
+ * generates fmgroids.h and fmgrtab.c the same way.
*
* XXX do NOT break up DATA() statements into multiple lines!
* the scripts are not as smart as you might think...
@@ -217,7 +217,7 @@ DESCR("btree cost estimator");
/* OIDS 100 - 199 */
-DATA(insert OID = 100 ( int8fac PGUID 11 f t t t 1 f 20 "20" 100 0 0 100 int8fac - ));
+DATA(insert OID = 100 ( int8fac PGUID 12 f t t t 1 f 20 "20" 100 0 0 100 int8fac - ));
DESCR("factorial");
DATA(insert OID = 101 ( eqsel PGUID 12 f t f t 5 f 701 "26 26 21 0 23" 100 0 0 100 eqsel - ));
DESCR("restriction selectivity of = and related operators");
@@ -412,7 +412,7 @@ DATA(insert OID = 197 ( rt_poly_union PGUID 11 f t t t 2 f 604 "604 604" 100
DESCR("r-tree");
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 t 2 f 23 "604 23" 100 0 0 100 rt_poly_size - ));
+DATA(insert OID = 199 ( rt_poly_size PGUID 12 f t t t 2 f 23 "604 700" 100 0 0 100 rt_poly_size - ));
DESCR("r-tree");
/* OIDS 200 - 299 */
@@ -662,51 +662,51 @@ DATA(insert OID = 314 ( int2 PGUID 12 f t t t 1 f 21 "23" 100 0 0 100 i
DESCR("convert int4 to int2");
DATA(insert OID = 315 ( int2vectoreq PGUID 12 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 t 1 f 701 "23" 100 0 0 100 i4tod - ));
+DATA(insert OID = 316 ( float8 PGUID 12 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 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 t 1 f 700 "23" 100 0 0 100 i4tof - ));
+DATA(insert OID = 318 ( float4 PGUID 12 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 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 t 5 f 23 "0" 100 0 0 100 rtinsert - ));
+DATA(insert OID = 320 ( rtinsert PGUID 12 f t f t 5 f 23 "0 0 0 0 0" 100 0 0 100 rtinsert - ));
DESCR("r-tree(internal)");
-DATA(insert OID = 321 ( rtdelete PGUID 11 f t f t 2 f 23 "0" 100 0 0 100 rtdelete - ));
+DATA(insert OID = 321 ( rtdelete PGUID 12 f t f t 2 f 23 "0 0" 100 0 0 100 rtdelete - ));
DESCR("r-tree(internal)");
-DATA(insert OID = 322 ( rtgettuple PGUID 11 f t f t 2 f 23 "0" 100 0 0 100 rtgettuple - ));
+DATA(insert OID = 322 ( rtgettuple PGUID 12 f t f t 2 f 23 "0 0" 100 0 0 100 rtgettuple - ));
DESCR("r-tree(internal)");
-DATA(insert OID = 323 ( rtbuild PGUID 11 f t f t 9 f 23 "0" 100 0 0 100 rtbuild - ));
+DATA(insert OID = 323 ( rtbuild PGUID 12 f t f t 9 f 23 "0 0 0 0 0 0 0 0 0" 100 0 0 100 rtbuild - ));
DESCR("r-tree(internal)");
-DATA(insert OID = 324 ( rtbeginscan PGUID 11 f t f t 4 f 23 "0" 100 0 0 100 rtbeginscan - ));
+DATA(insert OID = 324 ( rtbeginscan PGUID 12 f t f t 4 f 23 "0 0 0 0" 100 0 0 100 rtbeginscan - ));
DESCR("r-tree(internal)");
-DATA(insert OID = 325 ( rtendscan PGUID 11 f t f t 1 f 23 "0" 100 0 0 100 rtendscan - ));
+DATA(insert OID = 325 ( rtendscan PGUID 12 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 t 1 f 23 "0" 100 0 0 100 rtmarkpos - ));
+DATA(insert OID = 326 ( rtmarkpos PGUID 12 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 t 1 f 23 "0" 100 0 0 100 rtrestrpos - ));
+DATA(insert OID = 327 ( rtrestrpos PGUID 12 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 t 3 f 23 "0" 100 0 0 100 rtrescan - ));
+DATA(insert OID = 328 ( rtrescan PGUID 12 f t f t 3 f 23 "0 0 0" 100 0 0 100 rtrescan - ));
DESCR("r-tree(internal)");
-DATA(insert OID = 330 ( btgettuple PGUID 11 f t f t 2 f 23 "0" 100 0 0 100 btgettuple - ));
+DATA(insert OID = 330 ( btgettuple PGUID 12 f t f t 2 f 23 "0 0" 100 0 0 100 btgettuple - ));
DESCR("btree(internal)");
-DATA(insert OID = 331 ( btinsert PGUID 11 f t f t 5 f 23 "0" 100 0 0 100 btinsert - ));
+DATA(insert OID = 331 ( btinsert PGUID 12 f t f t 5 f 23 "0 0 0 0 0" 100 0 0 100 btinsert - ));
DESCR("btree(internal)");
-DATA(insert OID = 332 ( btdelete PGUID 11 f t f t 2 f 23 "0" 100 0 0 100 btdelete - ));
+DATA(insert OID = 332 ( btdelete PGUID 12 f t f t 2 f 23 "0 0" 100 0 0 100 btdelete - ));
DESCR("btree(internal)");
-DATA(insert OID = 333 ( btbeginscan PGUID 11 f t f t 4 f 23 "0" 100 0 0 100 btbeginscan - ));
+DATA(insert OID = 333 ( btbeginscan PGUID 12 f t f t 4 f 23 "0 0 0 0" 100 0 0 100 btbeginscan - ));
DESCR("btree(internal)");
-DATA(insert OID = 334 ( btrescan PGUID 11 f t f t 3 f 23 "0" 100 0 0 100 btrescan - ));
+DATA(insert OID = 334 ( btrescan PGUID 12 f t f t 3 f 23 "0 0 0" 100 0 0 100 btrescan - ));
DESCR("btree(internal)");
-DATA(insert OID = 335 ( btendscan PGUID 11 f t f t 1 f 23 "0" 100 0 0 100 btendscan - ));
+DATA(insert OID = 335 ( btendscan PGUID 12 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 t 1 f 23 "0" 100 0 0 100 btmarkpos - ));
+DATA(insert OID = 336 ( btmarkpos PGUID 12 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 t 1 f 23 "0" 100 0 0 100 btrestrpos - ));
+DATA(insert OID = 337 ( btrestrpos PGUID 12 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 t 9 f 23 "0" 100 0 0 100 btbuild - ));
+DATA(insert OID = 338 ( btbuild PGUID 12 f t f t 9 f 23 "0 0 0 0 0 0 0 0 0" 100 0 0 100 btbuild - ));
DESCR("btree(internal)");
DATA(insert OID = 339 ( poly_same PGUID 11 f t t t 2 f 16 "604 604" 100 0 1 0 poly_same - ));
@@ -798,23 +798,23 @@ DESCR("convert char() to name");
DATA(insert OID = 438 ( hashcostestimate PGUID 12 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 t 2 f 23 "0" 100 0 0 100 hashgettuple - ));
+DATA(insert OID = 440 ( hashgettuple PGUID 12 f t f t 2 f 23 "0 0" 100 0 0 100 hashgettuple - ));
DESCR("hash(internal)");
-DATA(insert OID = 441 ( hashinsert PGUID 11 f t f t 5 f 23 "0" 100 0 0 100 hashinsert - ));
+DATA(insert OID = 441 ( hashinsert PGUID 12 f t f t 5 f 23 "0 0 0 0 0" 100 0 0 100 hashinsert - ));
DESCR("hash(internal)");
-DATA(insert OID = 442 ( hashdelete PGUID 11 f t f t 2 f 23 "0" 100 0 0 100 hashdelete - ));
+DATA(insert OID = 442 ( hashdelete PGUID 12 f t f t 2 f 23 "0 0" 100 0 0 100 hashdelete - ));
DESCR("hash(internal)");
-DATA(insert OID = 443 ( hashbeginscan PGUID 11 f t f t 4 f 23 "0" 100 0 0 100 hashbeginscan - ));
+DATA(insert OID = 443 ( hashbeginscan PGUID 12 f t f t 4 f 23 "0 0 0 0" 100 0 0 100 hashbeginscan - ));
DESCR("hash(internal)");
-DATA(insert OID = 444 ( hashrescan PGUID 11 f t f t 3 f 23 "0" 100 0 0 100 hashrescan - ));
+DATA(insert OID = 444 ( hashrescan PGUID 12 f t f t 3 f 23 "0 0 0" 100 0 0 100 hashrescan - ));
DESCR("hash(internal)");
-DATA(insert OID = 445 ( hashendscan PGUID 11 f t f t 1 f 23 "0" 100 0 0 100 hashendscan - ));
+DATA(insert OID = 445 ( hashendscan PGUID 12 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 t 1 f 23 "0" 100 0 0 100 hashmarkpos - ));
+DATA(insert OID = 446 ( hashmarkpos PGUID 12 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 t 1 f 23 "0" 100 0 0 100 hashrestrpos - ));
+DATA(insert OID = 447 ( hashrestrpos PGUID 12 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 t 9 f 23 "0" 100 0 0 100 hashbuild - ));
+DATA(insert OID = 448 ( hashbuild PGUID 12 f t f t 9 f 23 "0 0 0 0 0 0 0 0 0" 100 0 0 100 hashbuild - ));
DESCR("hash(internal)");
DATA(insert OID = 449 ( hashint2 PGUID 12 f t t t 1 f 23 "21" 100 0 0 100 hashint2 - ));
DESCR("hash");
@@ -841,53 +841,53 @@ DESCR("larger of two");
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 t 1 f 20 "0" 100 0 0 100 int8in - ));
+DATA(insert OID = 460 ( int8in PGUID 12 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 t 1 f 23 "0" 100 0 0 100 int8out - ));
+DATA(insert OID = 461 ( int8out PGUID 12 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 t 1 f 20 "20" 100 0 0 100 int8um - ));
+DATA(insert OID = 462 ( int8um PGUID 12 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 t 2 f 20 "20 20" 100 0 0 100 int8pl - ));
+DATA(insert OID = 463 ( int8pl PGUID 12 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 t 2 f 20 "20 20" 100 0 0 100 int8mi - ));
+DATA(insert OID = 464 ( int8mi PGUID 12 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 t 2 f 20 "20 20" 100 0 0 100 int8mul - ));
+DATA(insert OID = 465 ( int8mul PGUID 12 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 t 2 f 20 "20 20" 100 0 0 100 int8div - ));
+DATA(insert OID = 466 ( int8div PGUID 12 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 t 2 f 16 "20 20" 100 0 0 100 int8eq - ));
+DATA(insert OID = 467 ( int8eq PGUID 12 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 t 2 f 16 "20 20" 100 0 0 100 int8ne - ));
+DATA(insert OID = 468 ( int8ne PGUID 12 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 t 2 f 16 "20 20" 100 0 0 100 int8lt - ));
+DATA(insert OID = 469 ( int8lt PGUID 12 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 t 2 f 16 "20 20" 100 0 0 100 int8gt - ));
+DATA(insert OID = 470 ( int8gt PGUID 12 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 t 2 f 16 "20 20" 100 0 0 100 int8le - ));
+DATA(insert OID = 471 ( int8le PGUID 12 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 t 2 f 16 "20 20" 100 0 0 100 int8ge - ));
+DATA(insert OID = 472 ( int8ge PGUID 12 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 t 2 f 16 "20 23" 100 0 0 100 int84eq - ));
+DATA(insert OID = 474 ( int84eq PGUID 12 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 t 2 f 16 "20 23" 100 0 0 100 int84ne - ));
+DATA(insert OID = 475 ( int84ne PGUID 12 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 t 2 f 16 "20 23" 100 0 0 100 int84lt - ));
+DATA(insert OID = 476 ( int84lt PGUID 12 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 t 2 f 16 "20 23" 100 0 0 100 int84gt - ));
+DATA(insert OID = 477 ( int84gt PGUID 12 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 t 2 f 16 "20 23" 100 0 0 100 int84le - ));
+DATA(insert OID = 478 ( int84le PGUID 12 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 t 2 f 16 "20 23" 100 0 0 100 int84ge - ));
+DATA(insert OID = 479 ( int84ge PGUID 12 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 t 1 f 23 "20" 100 0 0 100 int84 - ));
+DATA(insert OID = 480 ( int4 PGUID 12 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 t 1 f 20 "23" 100 0 0 100 int48 - ));
+DATA(insert OID = 481 ( int8 PGUID 12 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 t 1 f 701 "20" 100 0 0 100 i8tod - ));
+DATA(insert OID = 482 ( float8 PGUID 12 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 t 1 f 20 "701" 100 0 0 100 dtoi8 - ));
+DATA(insert OID = 483 ( int8 PGUID 12 f t t t 1 f 20 "701" 100 0 0 100 dtoi8 - ));
DESCR("convert float8 to int8");
/* OIDS 500 - 599 */
@@ -913,10 +913,10 @@ DESCR("greater-than-or-equal");
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 t 2 f 1042 "1042 23" 100 0 0 100 bpchar - ));
-DESCR("truncate char()");
-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 = 668 ( bpchar PGUID 12 f t t t 2 f 1042 "1042 23" 100 0 0 100 bpchar - ));
+DESCR("adjust char() to typmod length");
+DATA(insert OID = 669 ( varchar PGUID 12 f t t t 2 f 1043 "1043 23" 100 0 0 100 varchar - ));
+DESCR("adjust varchar() to typmod length");
DATA(insert OID = 676 ( mktinterval PGUID 12 f t f t 2 f 704 "702 702" 100 0 0 100 mktinterval - ));
DESCR("convert to tinterval");
@@ -949,13 +949,13 @@ DESCR("equal");
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 t 2 f 23 "17 23" 100 0 0 100 byteaGetByte - ));
+DATA(insert OID = 721 ( get_byte PGUID 12 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 t 3 f 17 "17 23 23" 100 0 0 100 byteaSetByte - ));
+DATA(insert OID = 722 ( set_byte PGUID 12 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 t 2 f 23 "17 23" 100 0 0 100 byteaGetBit - ));
+DATA(insert OID = 723 ( get_bit PGUID 12 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 t 3 f 17 "17 23 23" 100 0 0 100 byteaSetBit - ));
+DATA(insert OID = 724 ( set_bit PGUID 12 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 t 2 f 701 "600 628" 100 0 0 100 dist_pl - ));
@@ -981,26 +981,18 @@ DESCR("greater-than");
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 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 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 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 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 t 8 f 23 "0 23 0 0 23 23 23 0" 100 0 0 100 array_set -));
+DATA(insert OID = 744 ( array_eq PGUID 12 f t t t 2 f 16 "0 0" 100 0 0 100 array_eq -));
+DESCR("array equal");
+DATA(insert OID = 747 ( array_dims PGUID 12 f t t t 1 f 25 "0" 100 0 0 100 array_dims -));
+DESCR("array dimensions");
+DATA(insert OID = 750 ( array_in PGUID 12 f t t t 3 f 23 "0 26 23" 100 0 0 100 array_in - ));
DESCR("array");
-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 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 t 2 f 23 "0 0" 100 0 0 100 array_out - ));
+DATA(insert OID = 751 ( array_out PGUID 12 f t t t 2 f 23 "0 26" 100 0 0 100 array_out - ));
DESCR("array");
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 t 2 f 23 "0 0" 100 0 0 100 filename_out - ));
+DATA(insert OID = 753 ( filename_out PGUID 11 f t t t 2 f 23 "0 26" 100 0 0 100 filename_out - ));
DESCR("(internal)");
DATA(insert OID = 760 ( smgrin PGUID 12 f t f t 1 f 210 "0" 100 0 0 100 smgrin - ));
@@ -1032,23 +1024,23 @@ DESCR("smaller of two");
DATA(insert OID = 772 ( gistcostestimate PGUID 12 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 t 2 f 23 "0" 100 0 0 100 gistgettuple - ));
+DATA(insert OID = 774 ( gistgettuple PGUID 12 f t f t 2 f 23 "0 0" 100 0 0 100 gistgettuple - ));
DESCR("gist(internal)");
-DATA(insert OID = 775 ( gistinsert PGUID 11 f t f t 5 f 23 "0" 100 0 0 100 gistinsert - ));
+DATA(insert OID = 775 ( gistinsert PGUID 12 f t f t 5 f 23 "0 0 0 0 0" 100 0 0 100 gistinsert - ));
DESCR("gist(internal)");
-DATA(insert OID = 776 ( gistdelete PGUID 11 f t f t 2 f 23 "0" 100 0 0 100 gistdelete - ));
+DATA(insert OID = 776 ( gistdelete PGUID 12 f t f t 2 f 23 "0 0" 100 0 0 100 gistdelete - ));
DESCR("gist(internal)");
-DATA(insert OID = 777 ( gistbeginscan PGUID 11 f t f t 4 f 23 "0" 100 0 0 100 gistbeginscan - ));
+DATA(insert OID = 777 ( gistbeginscan PGUID 12 f t f t 4 f 23 "0 0 0 0" 100 0 0 100 gistbeginscan - ));
DESCR("gist(internal)");
-DATA(insert OID = 778 ( gistrescan PGUID 11 f t f t 3 f 23 "0" 100 0 0 100 gistrescan - ));
+DATA(insert OID = 778 ( gistrescan PGUID 12 f t f t 3 f 23 "0 0 0" 100 0 0 100 gistrescan - ));
DESCR("gist(internal)");
-DATA(insert OID = 779 ( gistendscan PGUID 11 f t f t 1 f 23 "0" 100 0 0 100 gistendscan - ));
+DATA(insert OID = 779 ( gistendscan PGUID 12 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 t 1 f 23 "0" 100 0 0 100 gistmarkpos - ));
+DATA(insert OID = 780 ( gistmarkpos PGUID 12 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 t 1 f 23 "0" 100 0 0 100 gistrestrpos - ));
+DATA(insert OID = 781 ( gistrestrpos PGUID 12 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 t 9 f 23 "0" 100 0 0 100 gistbuild - ));
+DATA(insert OID = 782 ( gistbuild PGUID 12 f t f t 9 f 23 "0 0 0 0 0 0 0 0 0" 100 0 0 100 gistbuild - ));
DESCR("gist(internal)");
DATA(insert OID = 784 ( tintervaleq PGUID 12 f t f t 2 f 16 "704 704" 100 0 0 100 tintervaleq - ));
@@ -1096,17 +1088,17 @@ DESCR("matches LIKE expression");
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 t 2 f 16 "23 20" 100 0 0 100 int48eq - ));
+DATA(insert OID = 852 ( int48eq PGUID 12 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 t 2 f 16 "23 20" 100 0 0 100 int48ne - ));
+DATA(insert OID = 853 ( int48ne PGUID 12 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 t 2 f 16 "23 20" 100 0 0 100 int48lt - ));
+DATA(insert OID = 854 ( int48lt PGUID 12 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 t 2 f 16 "23 20" 100 0 0 100 int48gt - ));
+DATA(insert OID = 855 ( int48gt PGUID 12 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 t 2 f 16 "23 20" 100 0 0 100 int48le - ));
+DATA(insert OID = 856 ( int48le PGUID 12 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 t 2 f 16 "23 20" 100 0 0 100 int48ge - ));
+DATA(insert OID = 857 ( int48ge PGUID 12 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 t 2 f 16 "19 25" 100 0 0 100 namelike - ));
@@ -1119,13 +1111,13 @@ DESCR("convert char to char()");
DATA(insert OID = 861 ( char PGUID 12 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 t 2 f 790 "23 790" 100 0 0 100 int4_mul_cash - ));
+DATA(insert OID = 862 ( int4_mul_cash PGUID 12 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 12 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 t 2 f 790 "790 23" 100 0 0 100 cash_mul_int4 - ));
+DATA(insert OID = 864 ( cash_mul_int4 PGUID 12 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 t 2 f 790 "790 23" 100 0 0 100 cash_div_int4 - ));
+DATA(insert OID = 865 ( cash_div_int4 PGUID 12 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 12 f t t t 2 f 790 "790 21" 100 0 0 100 cash_mul_int2 - ));
DESCR("multiply");
@@ -1187,9 +1179,9 @@ DESCR("modulus");
DATA(insert OID = 943 ( mod PGUID 12 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 t 2 f 20 "20 20" 100 0 0 100 int8mod - ));
+DATA(insert OID = 945 ( int8mod PGUID 12 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 t 2 f 20 "20 20" 100 0 0 100 int8mod - ));
+DATA(insert OID = 947 ( mod PGUID 12 f t t t 2 f 20 "20 20" 100 0 0 100 int8mod - ));
DESCR("modulus");
DATA(insert OID = 944 ( char PGUID 12 f t t t 1 f 18 "25" 100 0 0 100 text_char - ));
@@ -1304,13 +1296,13 @@ DATA(insert OID = 1037 ( aclcontains PGUID 11 f t f t 2 f 16 "1034 1033" 100
DESCR("matches regex., case-sensitive");
DATA(insert OID = 1038 ( seteval PGUID 12 f t f t 1 f 23 "26" 100 0 0 100 seteval - ));
DESCR("");
-DATA(insert OID = 1044 ( bpcharin PGUID 11 f t t t 3 f 1042 "0 0 23" 100 0 0 100 bpcharin - ));
+DATA(insert OID = 1044 ( bpcharin PGUID 12 f t t t 3 f 1042 "0 26 23" 100 0 0 100 bpcharin - ));
DESCR("(internal)");
-DATA(insert OID = 1045 ( bpcharout PGUID 11 f t t t 1 f 23 "0" 100 0 0 100 bpcharout - ));
+DATA(insert OID = 1045 ( bpcharout PGUID 12 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 t 3 f 1043 "0 0 23" 100 0 0 100 varcharin - ));
+DATA(insert OID = 1046 ( varcharin PGUID 12 f t t t 3 f 1043 "0 26 23" 100 0 0 100 varcharin - ));
DESCR("(internal)");
-DATA(insert OID = 1047 ( varcharout PGUID 11 f t t t 1 f 23 "0" 100 0 0 100 varcharout - ));
+DATA(insert OID = 1047 ( varcharout PGUID 12 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 t 2 f 16 "1042 1042" 100 0 0 100 bpchareq - ));
DESCR("equal");
@@ -1500,12 +1492,12 @@ DESCR("truncate timestamp to specified units");
DATA(insert OID = 1218 ( date_trunc PGUID 12 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 t 1 f 20 "20" 100 0 0 100 int8abs - ));
+DATA(insert OID = 1230 ( int8abs PGUID 12 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 t 2 f 20 "20 20" 100 0 0 100 int8larger - ));
+DATA(insert OID = 1236 ( int8larger PGUID 12 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 t 2 f 20 "20 20" 100 0 0 100 int8smaller - ));
+DATA(insert OID = 1237 ( int8smaller PGUID 12 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 t 2 f 16 "25 25" 100 0 1 0 texticregexeq - ));
@@ -1530,32 +1522,32 @@ DESCR("SQL92 interval comparison");
DATA(insert OID = 1272 ( datetime_pl PGUID 12 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 t 2 f 20 "20 23" 100 0 0 100 int84pl - ));
+DATA(insert OID = 1274 ( int84pl PGUID 12 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 t 2 f 20 "20 23" 100 0 0 100 int84mi - ));
+DATA(insert OID = 1275 ( int84mi PGUID 12 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 t 2 f 20 "20 23" 100 0 0 100 int84mul - ));
+DATA(insert OID = 1276 ( int84mul PGUID 12 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 t 2 f 20 "20 23" 100 0 0 100 int84div - ));
+DATA(insert OID = 1277 ( int84div PGUID 12 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 t 2 f 20 "23 20" 100 0 0 100 int48pl - ));
+DATA(insert OID = 1278 ( int48pl PGUID 12 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 t 2 f 20 "23 20" 100 0 0 100 int48mi - ));
+DATA(insert OID = 1279 ( int48mi PGUID 12 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 t 2 f 20 "23 20" 100 0 0 100 int48mul - ));
+DATA(insert OID = 1280 ( int48mul PGUID 12 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 t 2 f 20 "23 20" 100 0 0 100 int48div - ));
+DATA(insert OID = 1281 ( int48div PGUID 12 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 t 1 f 25 "20" 100 0 0 100 int8_text - ));
+DATA(insert OID = 1288 ( text PGUID 12 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 t 1 f 20 "25" 100 0 0 100 text_int8 - ));
+DATA(insert OID = 1289 ( int8 PGUID 12 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 t 2 f 1014 "1014 23" 100 0 0 100 _bpchar - ));
-DESCR("truncate _char()");
-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 = 1290 ( _bpchar PGUID 12 f t t t 2 f 1014 "1014 23" 100 0 0 100 _bpchar - ));
+DESCR("adjust char()[] to typmod length");
+DATA(insert OID = 1291 ( _varchar PGUID 12 f t t t 2 f 1015 "1015 23" 100 0 0 100 _varchar - ));
+DESCR("adjust varchar()[] to typmod length");
DATA(insert OID = 1292 ( tideq PGUID 11 f t f t 2 f 16 "27 27" 100 0 0 100 tideq - ));
DESCR("equal");
@@ -1731,13 +1723,13 @@ DATA(insert OID = 1391 ( factorial PGUID 12 f t t t 1 f 23 "21" 100 0 0 100
DESCR("factorial");
DATA(insert OID = 1392 ( factorial PGUID 12 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 t 1 f 20 "20" 100 0 0 100 int8fac - ));
+DATA(insert OID = 1393 ( factorial PGUID 12 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 t 1 f 700 "700" 100 0 0 100 float4abs - ));
DESCR("absolute value");
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 t 1 f 20 "20" 100 0 0 100 int8abs - ));
+DATA(insert OID = 1396 ( abs PGUID 12 f t t t 1 f 20 "20" 100 0 0 100 int8abs - ));
DESCR("absolute value");
DATA(insert OID = 1397 ( abs PGUID 12 f t t t 1 f 23 "23" 100 0 0 100 int4abs - ));
DESCR("absolute value");
@@ -1903,7 +1895,7 @@ DATA(insert OID = 1473 ( circle PGUID 11 f t t t 2 f 718 "600 701" 100 0 1 0
DESCR("convert point and radius to 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 t 2 f 604 "23 718" 100 0 1 0 circle_poly - ));
+DATA(insert OID = 1475 ( polygon PGUID 12 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 t 2 f 701 "600 718" 100 0 1 0 dist_pc - ));
DESCR("distance between point and circle");
@@ -2067,12 +2059,12 @@ DESCR("convert int4 to varchar");
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 t 1 f 25 "23" 100 0 0 100 ichar - ));
+DATA(insert OID = 1621 ( ichar PGUID 12 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 t 2 f 25 "25 23" 100 0 0 100 repeat - ));
+DATA(insert OID = 1622 ( repeat PGUID 12 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 t 1 f 1043 "20" 100 0 0 100 int8_text - ));
+DATA(insert OID = 1623 ( varchar PGUID 12 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 12 f t t t 2 f 1186 "701 1186" 100 0 0 100 mul_d_interval - ));
@@ -2120,15 +2112,15 @@ DATA(insert OID = 871 ( upper PGUID 11 f t t t 1 f 25 "25" 100 0 0 100 up
DESCR("uppercase");
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 t 3 f 25 "25 23 25" 100 0 0 100 lpad - ));
+DATA(insert OID = 873 ( lpad PGUID 12 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 t 3 f 25 "25 23 25" 100 0 0 100 rpad - ));
+DATA(insert OID = 874 ( rpad PGUID 12 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 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 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 t 3 f 25 "25 23 23" 100 0 0 100 text_substr - ));
+DATA(insert OID = 877 ( substr PGUID 12 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 t 3 f 25 "25 25 25" 100 0 0 100 translate - ));
DESCR("modify string by substring replacement");
@@ -2148,13 +2140,13 @@ DATA(insert OID = 885 ( btrim PGUID 14 f t t t 1 f 25 "25" 100 0 0 100 "s
DESCR("trim both ends of string");
/* for multi-byte support */
-DATA(insert OID = 1039 ( getdatabaseencoding PGUID 11 f t f t 0 f 19 "0" 100 0 0 100 getdatabaseencoding - ));
+DATA(insert OID = 1039 ( getdatabaseencoding PGUID 12 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 t 1 f 23 "19" 100 0 0 100 pg_char_to_encoding - ));
+DATA(insert OID = 1295 ( pg_char_to_encoding PGUID 12 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 t 1 f 19 "23" 100 0 0 100 pg_encoding_to_char - ));
+DATA(insert OID = 1597 ( pg_encoding_to_char PGUID 12 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 */
@@ -2162,7 +2154,7 @@ DATA(insert OID = 1640 ( pg_get_ruledef PGUID 11 f t f t 1 f 25 "19" 100 0 0
DESCR("source text of a rule");
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 t 1 f 19 "23" 100 0 0 100 pg_get_userbyid - ));
+DATA(insert OID = 1642 ( pg_get_userbyid PGUID 12 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 12 f t f t 1 f 25 "26" 100 0 0 100 pg_get_indexdef - ));
DESCR("index description");
@@ -2321,23 +2313,23 @@ DATA(insert OID = 1693 ( btboolcmp PGUID 12 f t t t 2 f 23 "16 16" 100 0 0
DESCR("btree less-equal-greater");
/* OID's 1700 - 1799 NUMERIC data type */
-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 t 1 f 23 "0" 100 0 0 100 numeric_out - ));
+DATA(insert OID = 1701 ( numeric_in PGUID 12 f t t t 3 f 1700 "0 26 23" 100 0 0 100 numeric_in - ));
DESCR("(internal)");
-DATA(insert OID = 1703 ( numeric PGUID 11 f t t t 2 f 1700 "1700 23" 100 0 0 100 numeric - ));
+DATA(insert OID = 1702 ( numeric_out PGUID 12 f t t t 1 f 23 "0" 100 0 0 100 numeric_out - ));
DESCR("(internal)");
+DATA(insert OID = 1703 ( numeric PGUID 12 f t t t 2 f 1700 "1700 23" 100 0 0 100 numeric - ));
+DESCR("adjust numeric to typmod precision/scale");
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 t 1 f 1700 "1700" 100 0 0 100 numeric_abs - ));
DESCR("absolute value");
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 t 2 f 1700 "1700 23" 100 0 0 100 numeric_round - ));
+DATA(insert OID = 1707 ( round PGUID 12 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 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 t 2 f 1700 "1700 23" 100 0 0 100 numeric_trunc - ));
+DATA(insert OID = 1709 ( trunc PGUID 12 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 t 1 f 1700 "1700" 100 0 0 100 "select trunc($1,0)" - ));
DESCR("value truncated to 'scale' of zero");
@@ -2389,7 +2381,7 @@ DATA(insert OID = 1738 ( pow PGUID 11 f t t t 2 f 1700 "1700 1700" 100 0 0 1
DESCR("m raised to the power of n");
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 t 1 f 1700 "23" 100 0 0 100 int4_numeric - ));
+DATA(insert OID = 1740 ( numeric PGUID 12 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 t 1 f 1700 "1700" 100 0 0 100 "select log(10, $1)" - ));
DESCR("logarithm base 10 of n");
@@ -2427,17 +2419,17 @@ DESCR("(internal)");
/* formatting */
DATA(insert OID = 1770 ( to_char PGUID 12 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 t 2 f 25 "1700 25" 100 0 0 100 numeric_to_char - ));
+DATA(insert OID = 1772 ( to_char PGUID 12 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 t 2 f 25 "23 25" 100 0 0 100 int4_to_char - ));
+DATA(insert OID = 1773 ( to_char PGUID 12 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 t 2 f 25 "20 25" 100 0 0 100 int8_to_char - ));
+DATA(insert OID = 1774 ( to_char PGUID 12 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 t 2 f 25 "700 25" 100 0 0 100 float4_to_char - ));
+DATA(insert OID = 1775 ( to_char PGUID 12 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 t 2 f 25 "701 25" 100 0 0 100 float8_to_char - ));
+DATA(insert OID = 1776 ( to_char PGUID 12 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 t 2 f 1700 "25 25" 100 0 0 100 numeric_to_number - ));
+DATA(insert OID = 1777 ( to_number PGUID 12 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 12 f t f t 2 f 1184 "25 25" 100 0 0 100 to_timestamp - ));
DESCR("convert text to timestamp");
diff --git a/src/include/fmgr.h b/src/include/fmgr.h
index 6bbab9676ca..cf5a3eb0cbf 100644
--- a/src/include/fmgr.h
+++ b/src/include/fmgr.h
@@ -11,7 +11,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: fmgr.h,v 1.4 2000/06/05 07:29:02 tgl Exp $
+ * $Id: fmgr.h,v 1.5 2000/06/13 07:35:23 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -99,37 +99,49 @@ extern void fmgr_info(Oid functionId, FmgrInfo *finfo);
*/
#define PG_ARGISNULL(n) (fcinfo->argnull[n])
+#if 1
+/* VERY TEMPORARY until some TOAST support is committed ... */
+#define PG_DETOAST_DATUM(datum) \
+ ((struct varlena *) DatumGetPointer(datum))
+#else
+/* Eventually it will look more like this... */
+#define PG_DETOAST_DATUM(datum) \
+ (VARATT_IS_EXTENDED(DatumGetPointer(datum)) ? \
+ (struct varlena *) heap_tuple_untoast_attr((varattrib *) DatumGetPointer(datum)) : \
+ (struct varlena *) DatumGetPointer(datum))
+#endif
+
/* Macros for fetching arguments of standard types */
#define PG_GETARG_DATUM(n) (fcinfo->arg[n])
-#define PG_GETARG_INT32(n) DatumGetInt32(fcinfo->arg[n])
-#define PG_GETARG_UINT32(n) DatumGetUInt32(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])
-#define PG_GETARG_CSTRING(n) DatumGetCString(fcinfo->arg[n])
-#define PG_GETARG_NAME(n) DatumGetName(fcinfo->arg[n])
+#define PG_GETARG_INT32(n) DatumGetInt32(PG_GETARG_DATUM(n))
+#define PG_GETARG_UINT32(n) DatumGetUInt32(PG_GETARG_DATUM(n))
+#define PG_GETARG_INT16(n) DatumGetInt16(PG_GETARG_DATUM(n))
+#define PG_GETARG_UINT16(n) DatumGetUInt16(PG_GETARG_DATUM(n))
+#define PG_GETARG_CHAR(n) DatumGetChar(PG_GETARG_DATUM(n))
+#define PG_GETARG_BOOL(n) DatumGetBool(PG_GETARG_DATUM(n))
+#define PG_GETARG_OID(n) DatumGetObjectId(PG_GETARG_DATUM(n))
+#define PG_GETARG_POINTER(n) DatumGetPointer(PG_GETARG_DATUM(n))
+#define PG_GETARG_CSTRING(n) DatumGetCString(PG_GETARG_DATUM(n))
+#define PG_GETARG_NAME(n) DatumGetName(PG_GETARG_DATUM(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])
+#define PG_GETARG_FLOAT4(n) DatumGetFloat4(PG_GETARG_DATUM(n))
+#define PG_GETARG_FLOAT8(n) DatumGetFloat8(PG_GETARG_DATUM(n))
+#define PG_GETARG_INT64(n) DatumGetInt64(PG_GETARG_DATUM(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: */
-#if 1
-/* VERY TEMPORARY until some TOAST support is committed ... */
-#define PG_GETARG_VARLENA_P(n) PG_GETARG_RAW_VARLENA_P(n)
-#else
-/* Eventually it will look more like this... */
-#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))
-#endif
+#define PG_GETARG_VARLENA_P(n) PG_DETOAST_DATUM(PG_GETARG_DATUM(n))
+/* DatumGetFoo macros for varlena types will typically look like this: */
+#define DatumGetByteaP(X) ((bytea *) PG_DETOAST_DATUM(X))
+#define DatumGetTextP(X) ((text *) PG_DETOAST_DATUM(X))
+#define DatumGetBpCharP(X) ((BpChar *) PG_DETOAST_DATUM(X))
+#define DatumGetVarCharP(X) ((VarChar *) PG_DETOAST_DATUM(X))
/* GETARG macros for varlena types will typically look like this: */
-#define PG_GETARG_TEXT_P(n) ((text *) PG_GETARG_VARLENA_P(n))
+#define PG_GETARG_BYTEA_P(n) DatumGetByteaP(PG_GETARG_DATUM(n))
+#define PG_GETARG_TEXT_P(n) DatumGetTextP(PG_GETARG_DATUM(n))
+#define PG_GETARG_BPCHAR_P(n) DatumGetBpCharP(PG_GETARG_DATUM(n))
+#define PG_GETARG_VARCHAR_P(n) DatumGetVarCharP(PG_GETARG_DATUM(n))
/* To return a NULL do this: */
#define PG_RETURN_NULL() \
@@ -151,7 +163,10 @@ extern void fmgr_info(Oid functionId, FmgrInfo *finfo);
#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)
+#define PG_RETURN_BYTEA_P(x) PG_RETURN_POINTER(x)
+#define PG_RETURN_TEXT_P(x) PG_RETURN_POINTER(x)
+#define PG_RETURN_BPCHAR_P(x) PG_RETURN_POINTER(x)
+#define PG_RETURN_VARCHAR_P(x) PG_RETURN_POINTER(x)
/*-------------------------------------------------------------------------
diff --git a/src/include/mb/pg_wchar.h b/src/include/mb/pg_wchar.h
index 97caffeb808..5a1acc190f3 100644
--- a/src/include/mb/pg_wchar.h
+++ b/src/include/mb/pg_wchar.h
@@ -1,4 +1,4 @@
-/* $Id: pg_wchar.h,v 1.14 2000/04/20 22:40:18 tgl Exp $ */
+/* $Id: pg_wchar.h,v 1.15 2000/06/13 07:35:27 tgl Exp $ */
#ifndef PG_WCHAR_H
#define PG_WCHAR_H
@@ -122,11 +122,11 @@ extern unsigned char *pg_client_to_server(unsigned char *, int);
extern unsigned char *pg_server_to_client(unsigned char *, int);
extern int pg_valid_client_encoding(const char *);
-/* moved to miscadmin.h
- * pg_proc.h now have them.
+/* internally-used versions of functions. The PG_xxx forms of these
+ * functions have fmgr-compatible interfaves.
+ */
extern const char *pg_encoding_to_char(int);
extern int pg_char_to_encoding(const char *);
-*/
extern int GetDatabaseEncoding(void);
extern void SetDatabaseEncoding(int);
diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h
index dd778e7e3ef..b56ad152f2b 100644
--- a/src/include/miscadmin.h
+++ b/src/include/miscadmin.h
@@ -12,7 +12,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: miscadmin.h,v 1.58 2000/06/08 22:37:35 momjian Exp $
+ * $Id: miscadmin.h,v 1.59 2000/06/13 07:35:24 tgl Exp $
*
* NOTES
* some of the information in this file will be moved to
@@ -131,13 +131,6 @@ extern char *ExpandDatabasePath(const char *path);
extern void SetDatabaseName(const char *name);
extern void SetDatabasePath(const char *path);
-/* even if MULTIBYTE is not enabled, this function is neccesary
- * since pg_proc.h does have.
- */
-extern const char *getdatabaseencoding(void);
-extern const char *pg_encoding_to_char(int);
-extern int pg_char_to_encoding(const char *);
-
extern char *getpgusername(void);
extern void SetPgUserName(void);
extern int GetUserId(void);
diff --git a/src/include/postgres.h b/src/include/postgres.h
index c64eab2cc46..0f26b7978a4 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.40 2000/06/02 15:57:40 momjian Exp $
+ * $Id: postgres.h,v 1.41 2000/06/13 07:35:24 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -49,7 +49,7 @@
typedef int4 aclitem;
-#define InvalidOid 0
+#define InvalidOid ((Oid) 0)
#define OidIsValid(objectId) ((bool) ((objectId) != InvalidOid))
/* unfortunately, both regproc and RegProcedure are used */
@@ -76,12 +76,15 @@ struct varlena
#define VARDATA(PTR) (((struct varlena *)(PTR))->vl_dat)
#define VARHDRSZ ((int32) sizeof(int32))
+/*
+ * These widely-used datatypes are just a varlena header and the data bytes.
+ * There is no terminating null or anything like that --- the data length is
+ * always VARSIZE(ptr) - VARHDRSZ.
+ */
typedef struct varlena bytea;
typedef struct varlena text;
-
-typedef int2 int2vector[INDEX_MAX_KEYS];
-typedef Oid oidvector[INDEX_MAX_KEYS];
-
+typedef struct varlena BpChar; /* blank-padded char, ie SQL char(n) */
+typedef struct varlena VarChar; /* var-length char, ie SQL varchar(n) */
/*
* Proposed new layout for variable length attributes
@@ -155,6 +158,11 @@ extern varattrib *heap_tuple_untoast_attr(varattrib * attr);
#endif /* TUPLE_TOASTER_ACTIVE */
+/* fixed-length array types (these are not varlena's!) */
+
+typedef int2 int2vector[INDEX_MAX_KEYS];
+typedef Oid oidvector[INDEX_MAX_KEYS];
+
/* We want NameData to have length NAMEDATALEN and int alignment,
* because that's how the data type 'name' is defined in pg_type.
* Use a union to make sure the compiler agrees.
@@ -176,6 +184,7 @@ typedef NameData *Name;
typedef uint32 TransactionId;
#define InvalidTransactionId 0
+
typedef uint32 CommandId;
#define FirstCommandId 0
@@ -228,7 +237,7 @@ typedef uint32 CommandId;
* ---------------
*/
#ifdef CYR_RECODE
-extern void SetCharSet();
+extern void SetCharSet(void);
#endif /* CYR_RECODE */
#endif /* POSTGRES_H */
diff --git a/src/include/utils/array.h b/src/include/utils/array.h
index c48baa974f7..4fb296671d7 100644
--- a/src/include/utils/array.h
+++ b/src/include/utils/array.h
@@ -11,7 +11,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: array.h,v 1.24 2000/05/29 21:02:32 tgl Exp $
+ * $Id: array.h,v 1.25 2000/06/13 07:35:30 tgl Exp $
*
* NOTES
* XXX the data array should be MAXALIGN'd -- notice that the array
@@ -99,7 +99,8 @@ typedef struct
*------------------------------------------------------------------------
*/
-#define RETURN_NULL do {*isNull = true; return(0); } while (0)
+#define RETURN_NULL(type) do { *isNull = true; return (type) 0; } while (0)
+
#define NAME_LEN 30
#define MAX_BUFF_SIZE BLCKSZ
@@ -112,23 +113,29 @@ typedef struct
/*
* prototypes for functions defined in arrayfuncs.c
*/
-extern char *array_in(char *string, Oid element_type, int32 typmod);
-extern char *array_out(ArrayType *v, Oid element_type);
-extern char *array_dims(ArrayType *v, bool *isNull);
-extern Datum array_ref(ArrayType *array, int n, int *indx, int reftype,
- int elmlen, int arraylen, bool *isNull);
-extern Datum array_clip(ArrayType *array, int n, int *upperIndx,
- int *lowerIndx, int reftype, int len, bool *isNull);
-extern char *array_set(ArrayType *array, int n, int *indx, char *dataPtr,
- int reftype, int elmlen, int arraylen, bool *isNull);
-extern char *array_assgn(ArrayType *array, int n, int *upperIndx,
- int *lowerIndx, ArrayType *newArr, int reftype,
- int len, bool *isNull);
+extern Datum array_in(PG_FUNCTION_ARGS);
+extern Datum array_out(PG_FUNCTION_ARGS);
+extern Datum array_eq(PG_FUNCTION_ARGS);
+extern Datum array_dims(PG_FUNCTION_ARGS);
+
+extern Datum array_ref(ArrayType *array, int nSubscripts, int *indx,
+ bool elmbyval, int elmlen,
+ int arraylen, bool *isNull);
+extern ArrayType *array_set(ArrayType *array, int nSubscripts, int *indx,
+ Datum dataValue,
+ bool elmbyval, int elmlen,
+ int arraylen, bool *isNull);
+extern ArrayType *array_clip(ArrayType *array, int nSubscripts,
+ int *upperIndx, int *lowerIndx,
+ bool elmbyval, int elmlen, bool *isNull);
+extern ArrayType *array_assgn(ArrayType *array, int nSubscripts,
+ int *upperIndx, int *lowerIndx,
+ ArrayType *newArr,
+ bool elmbyval, int elmlen, bool *isNull);
extern Datum array_map(FunctionCallInfo fcinfo, Oid inpType, Oid retType);
-extern int array_eq(ArrayType *array1, ArrayType *array2);
+
extern int _LOtransfer(char **destfd, int size, int nitems, char **srcfd,
int isSrcLO, int isDestLO);
-
extern char *_array_newLO(int *fd, int flag);
diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h
index 7000ad3a901..6c4071fd5d8 100644
--- a/src/include/utils/builtins.h
+++ b/src/include/utils/builtins.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: builtins.h,v 1.115 2000/06/09 01:11:14 tgl Exp $
+ * $Id: builtins.h,v 1.116 2000/06/13 07:35:30 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -190,7 +190,7 @@ extern BOX *rt_box_union(BOX *a, BOX *b);
extern BOX *rt_box_inter(BOX *a, BOX *b);
extern void rt_box_size(BOX *a, float *size);
extern void rt_bigbox_size(BOX *a, float *size);
-extern void rt_poly_size(POLYGON *a, float *size);
+extern Datum rt_poly_size(PG_FUNCTION_ARGS);
extern POLYGON *rt_poly_union(POLYGON *a, POLYGON *b);
extern POLYGON *rt_poly_inter(POLYGON *a, POLYGON *b);
@@ -244,12 +244,12 @@ extern bool float8le(float64 arg1, float64 arg2);
extern bool float8gt(float64 arg1, float64 arg2);
extern bool float8ge(float64 arg1, float64 arg2);
extern float64 ftod(float32 num);
-extern float64 i4tod(int32 num);
+extern Datum i4tod(PG_FUNCTION_ARGS);
extern Datum i2tod(PG_FUNCTION_ARGS);
extern float32 dtof(float64 num);
extern int32 dtoi4(float64 num);
extern Datum dtoi2(PG_FUNCTION_ARGS);
-extern float32 i4tof(int32 num);
+extern Datum i4tof(PG_FUNCTION_ARGS);
extern Datum i2tof(PG_FUNCTION_ARGS);
extern int32 ftoi4(float32 num);
extern Datum ftoi2(PG_FUNCTION_ARGS);
@@ -354,7 +354,7 @@ extern Datum regproctooid(PG_FUNCTION_ARGS);
extern text *pg_get_ruledef(NameData *rname);
extern text *pg_get_viewdef(NameData *rname);
extern Datum pg_get_indexdef(PG_FUNCTION_ARGS);
-extern NameData *pg_get_userbyid(int32 uid);
+extern Datum pg_get_userbyid(PG_FUNCTION_ARGS);
extern char *deparse_expression(Node *expr, List *rangetables,
bool forceprefix);
@@ -412,16 +412,10 @@ extern Datum currtid_byrelname(PG_FUNCTION_ARGS);
/* varchar.c */
-/* bpchar and varchar are just a varlena header and some characters */
-#define PG_GETARG_BPCHAR_P(n) ((struct varlena *) PG_GETARG_VARLENA_P(n))
-#define PG_RETURN_BPCHAR_P(x) PG_RETURN_POINTER(x)
-#define PG_GETARG_VARCHAR_P(n) ((struct varlena *) PG_GETARG_VARLENA_P(n))
-#define PG_RETURN_VARCHAR_P(x) PG_RETURN_POINTER(x)
-
-extern char *bpcharin(char *s, int dummy, int32 atttypmod);
-extern char *bpcharout(char *s);
-extern char *bpchar(char *s, int32 slen);
-extern ArrayType *_bpchar(ArrayType *v, int32 slen);
+extern Datum bpcharin(PG_FUNCTION_ARGS);
+extern Datum bpcharout(PG_FUNCTION_ARGS);
+extern Datum bpchar(PG_FUNCTION_ARGS);
+extern Datum _bpchar(PG_FUNCTION_ARGS);
extern Datum char_bpchar(PG_FUNCTION_ARGS);
extern Datum bpchar_char(PG_FUNCTION_ARGS);
extern char *name_bpchar(NameData *s);
@@ -437,10 +431,10 @@ extern int32 bpcharlen(char *arg);
extern int32 bpcharoctetlen(char *arg);
extern uint32 hashbpchar(struct varlena * key);
-extern char *varcharin(char *s, int dummy, int32 atttypmod);
-extern char *varcharout(char *s);
-extern char *varchar(char *s, int32 slen);
-extern ArrayType *_varchar(ArrayType *v, int32 slen);
+extern Datum varcharin(PG_FUNCTION_ARGS);
+extern Datum varcharout(PG_FUNCTION_ARGS);
+extern Datum varchar(PG_FUNCTION_ARGS);
+extern Datum _varchar(PG_FUNCTION_ARGS);
extern bool varchareq(char *arg1, char *arg2);
extern bool varcharne(char *arg1, char *arg2);
extern bool varcharlt(char *arg1, char *arg2);
@@ -468,17 +462,17 @@ extern text *text_smaller(text *arg1, text *arg2);
extern int32 textlen(text *arg);
extern int32 textoctetlen(text *arg);
extern int32 textpos(text *arg1, text *arg2);
-extern text *text_substr(text *string, int32 m, int32 n);
+extern Datum text_substr(PG_FUNCTION_ARGS);
extern text *name_text(NameData *s);
extern NameData *text_name(text *s);
extern bytea *byteain(char *inputText);
extern char *byteaout(bytea *vlena);
extern int32 byteaoctetlen(bytea *v);
-extern int32 byteaGetByte(bytea *v, int32 n);
-extern int32 byteaGetBit(bytea *v, int32 n);
-extern bytea *byteaSetByte(bytea *v, int32 n, int32 newByte);
-extern bytea *byteaSetBit(bytea *v, int32 n, int32 newBit);
+extern Datum byteaGetByte(PG_FUNCTION_ARGS);
+extern Datum byteaGetBit(PG_FUNCTION_ARGS);
+extern Datum byteaSetByte(PG_FUNCTION_ARGS);
+extern Datum byteaSetBit(PG_FUNCTION_ARGS);
/* like.c */
extern bool namelike(NameData *n, struct varlena * p);
@@ -491,15 +485,14 @@ extern bool textnlike(struct varlena * s, struct varlena * p);
extern text *lower(text *string);
extern text *upper(text *string);
extern text *initcap(text *string);
-extern text *lpad(text *string1, int4 len, text *string2);
-extern text *rpad(text *string1, int4 len, text *string2);
+extern Datum lpad(PG_FUNCTION_ARGS);
+extern Datum rpad(PG_FUNCTION_ARGS);
extern text *btrim(text *string, text *set);
extern text *ltrim(text *string, text *set);
extern text *rtrim(text *string, text *set);
-extern text *substr(text *string, int4 m, int4 n);
extern text *translate(text *string, text *from, text *to);
-extern text *ichar(int4 arg1);
-extern text *repeat(text *string, int4 count);
+extern Datum ichar(PG_FUNCTION_ARGS);
+extern Datum repeat(PG_FUNCTION_ARGS);
extern int4 ascii(text *string);
/* acl.c */
@@ -547,14 +540,14 @@ extern int4 macaddr_cmp(macaddr *a1, macaddr *a2);
extern text *macaddr_manuf(macaddr *addr);
/* numeric.c */
-extern Numeric numeric_in(char *str, int dummy, int32 typmod);
-extern char *numeric_out(Numeric num);
-extern Numeric numeric(Numeric num, int32 typmod);
+extern Datum numeric_in(PG_FUNCTION_ARGS);
+extern Datum numeric_out(PG_FUNCTION_ARGS);
+extern Datum numeric(PG_FUNCTION_ARGS);
extern Numeric numeric_abs(Numeric num);
extern Numeric numeric_uminus(Numeric num);
extern Numeric numeric_sign(Numeric num);
-extern Numeric numeric_round(Numeric num, int32 scale);
-extern Numeric numeric_trunc(Numeric num, int32 scale);
+extern Datum numeric_round(PG_FUNCTION_ARGS);
+extern Datum numeric_trunc(PG_FUNCTION_ARGS);
extern Numeric numeric_ceil(Numeric num);
extern Numeric numeric_floor(Numeric num);
extern int32 numeric_cmp(Numeric num1, Numeric num2);
@@ -578,7 +571,7 @@ extern Numeric numeric_exp(Numeric num);
extern Numeric numeric_ln(Numeric num);
extern Numeric numeric_log(Numeric num1, Numeric num2);
extern Numeric numeric_power(Numeric num1, Numeric num2);
-extern Numeric int4_numeric(int32 val);
+extern Datum int4_numeric(PG_FUNCTION_ARGS);
extern int32 numeric_int4(Numeric num);
extern Numeric int8_numeric(int64 *val);
extern int64 *numeric_int8(Numeric num);
@@ -618,4 +611,11 @@ extern Datum RI_FKey_setnull_upd(PG_FUNCTION_ARGS);
extern Datum RI_FKey_setdefault_del(PG_FUNCTION_ARGS);
extern Datum RI_FKey_setdefault_upd(PG_FUNCTION_ARGS);
+/* even if MULTIBYTE is not enabled, these functions are necessary
+ * since pg_proc.h has references to them.
+ */
+extern Datum getdatabaseencoding(PG_FUNCTION_ARGS);
+extern Datum PG_encoding_to_char(PG_FUNCTION_ARGS);
+extern Datum PG_char_to_encoding(PG_FUNCTION_ARGS);
+
#endif /* BUILTINS_H */
diff --git a/src/include/utils/cash.h b/src/include/utils/cash.h
index ab688c46f8b..7eca3f9147a 100644
--- a/src/include/utils/cash.h
+++ b/src/include/utils/cash.h
@@ -33,9 +33,9 @@ extern Cash *cash_mul_flt4(Cash *c, float4 *f);
extern Cash *cash_div_flt4(Cash *c, float4 *f);
extern Cash *flt4_mul_cash(float4 *f, Cash *c);
-extern Cash *cash_mul_int4(Cash *c, int4 i);
-extern Cash *cash_div_int4(Cash *c, int4 i);
-extern Cash *int4_mul_cash(int4 i, Cash *c);
+extern Datum cash_mul_int4(PG_FUNCTION_ARGS);
+extern Datum cash_div_int4(PG_FUNCTION_ARGS);
+extern Datum int4_mul_cash(PG_FUNCTION_ARGS);
extern Datum cash_mul_int2(PG_FUNCTION_ARGS);
extern Datum int2_mul_cash(PG_FUNCTION_ARGS);
diff --git a/src/include/utils/formatting.h b/src/include/utils/formatting.h
index 327b83f6e8a..e296484e1fe 100644
--- a/src/include/utils/formatting.h
+++ b/src/include/utils/formatting.h
@@ -2,7 +2,7 @@
/* -----------------------------------------------------------------------
* formatting.h
*
- * $Id: formatting.h,v 1.5 2000/06/09 01:11:15 tgl Exp $
+ * $Id: formatting.h,v 1.6 2000/06/13 07:35:30 tgl Exp $
*
*
* Portions Copyright (c) 1999-2000, PostgreSQL, Inc
@@ -24,11 +24,11 @@
extern Datum timestamp_to_char(PG_FUNCTION_ARGS);
extern Datum to_timestamp(PG_FUNCTION_ARGS);
extern Datum to_date(PG_FUNCTION_ARGS);
-extern Numeric numeric_to_number(text *value, text *fmt);
-extern text *numeric_to_char(Numeric value, text *fmt);
-extern text *int4_to_char(int32 value, text *fmt);
-extern text *int8_to_char(int64 *value, text *fmt);
-extern text *float4_to_char(float32 value, text *fmt);
-extern text *float8_to_char(float64 value, text *fmt);
+extern Datum numeric_to_number(PG_FUNCTION_ARGS);
+extern Datum numeric_to_char(PG_FUNCTION_ARGS);
+extern Datum int4_to_char(PG_FUNCTION_ARGS);
+extern Datum int8_to_char(PG_FUNCTION_ARGS);
+extern Datum float4_to_char(PG_FUNCTION_ARGS);
+extern Datum float8_to_char(PG_FUNCTION_ARGS);
#endif
diff --git a/src/include/utils/geo_decls.h b/src/include/utils/geo_decls.h
index 0a722fe81e0..a204d617579 100644
--- a/src/include/utils/geo_decls.h
+++ b/src/include/utils/geo_decls.h
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: geo_decls.h,v 1.28 2000/06/05 07:29:07 tgl Exp $
+ * $Id: geo_decls.h,v 1.29 2000/06/13 07:35:30 tgl Exp $
*
* NOTE
* These routines do *not* use the float types from adt/.
@@ -136,6 +136,49 @@ typedef struct
} CIRCLE;
/*
+ * fmgr interface macros
+ *
+ * Path and Polygon are toastable varlena types, the others are just
+ * fixed-size pass-by-reference types.
+ */
+
+#define DatumGetPointP(X) ((Point *) DatumGetPointer(X))
+#define PointPGetDatum(X) PointerGetDatum(X)
+#define PG_GETARG_POINT_P(n) DatumGetPointP(PG_GETARG_DATUM(n))
+#define PG_RETURN_POINT_P(x) return PointPGetDatum(x)
+
+#define DatumGetLsegP(X) ((LSEG *) DatumGetPointer(X))
+#define LsegPGetDatum(X) PointerGetDatum(X)
+#define PG_GETARG_LSEG_P(n) DatumGetLsegP(PG_GETARG_DATUM(n))
+#define PG_RETURN_LSEG_P(x) return LsegPGetDatum(x)
+
+#define DatumGetPathP(X) ((PATH *) PG_DETOAST_DATUM(X))
+#define PathPGetDatum(X) PointerGetDatum(X)
+#define PG_GETARG_PATH_P(n) DatumGetPathP(PG_GETARG_DATUM(n))
+#define PG_RETURN_PATH_P(x) return PathPGetDatum(x)
+
+#define DatumGetLineP(X) ((LINE *) DatumGetPointer(X))
+#define LinePGetDatum(X) PointerGetDatum(X)
+#define PG_GETARG_LINE_P(n) DatumGetLineP(PG_GETARG_DATUM(n))
+#define PG_RETURN_LINE_P(x) return LinePGetDatum(x)
+
+#define DatumGetBoxP(X) ((BOX *) DatumGetPointer(X))
+#define BoxPGetDatum(X) PointerGetDatum(X)
+#define PG_GETARG_BOX_P(n) DatumGetBoxP(PG_GETARG_DATUM(n))
+#define PG_RETURN_BOX_P(x) return BoxPGetDatum(x)
+
+#define DatumGetPolygonP(X) ((POLYGON *) PG_DETOAST_DATUM(X))
+#define PolygonPGetDatum(X) PointerGetDatum(X)
+#define PG_GETARG_POLYGON_P(n) DatumGetPolygonP(PG_GETARG_DATUM(n))
+#define PG_RETURN_POLYGON_P(x) return PolygonPGetDatum(x)
+
+#define DatumGetCircleP(X) ((CIRCLE *) DatumGetPointer(X))
+#define CirclePGetDatum(X) PointerGetDatum(X)
+#define PG_GETARG_CIRCLE_P(n) DatumGetCircleP(PG_GETARG_DATUM(n))
+#define PG_RETURN_CIRCLE_P(x) return CirclePGetDatum(x)
+
+
+/*
* in geo_ops.h
*/
@@ -354,7 +397,7 @@ extern CIRCLE *circle(Point *center, float8 *radius);
extern CIRCLE *box_circle(BOX *box);
extern BOX *circle_box(CIRCLE *circle);
extern CIRCLE *poly_circle(POLYGON *poly);
-extern POLYGON *circle_poly(int npts, CIRCLE *circle);
+extern Datum circle_poly(PG_FUNCTION_ARGS);
/* private routines */
extern double *circle_area(CIRCLE *circle);
diff --git a/src/include/utils/int8.h b/src/include/utils/int8.h
index b8ad531ab28..77dc6d7212f 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.21 2000/05/28 17:56:20 tgl Exp $
+ * $Id: int8.h,v 1.22 2000/06/13 07:35:30 tgl Exp $
*
* NOTES
* These data types are supported on all 64-bit architectures, and may
@@ -24,64 +24,61 @@
#ifndef INT8_H
#define INT8_H
+#include "fmgr.h"
-extern int64 *int8in(char *str);
-extern char *int8out(int64 *val);
-extern bool int8eq(int64 *val1, int64 *val2);
-extern bool int8ne(int64 *val1, int64 *val2);
-extern bool int8lt(int64 *val1, int64 *val2);
-extern bool int8gt(int64 *val1, int64 *val2);
-extern bool int8le(int64 *val1, int64 *val2);
-extern bool int8ge(int64 *val1, int64 *val2);
+extern Datum int8in(PG_FUNCTION_ARGS);
+extern Datum int8out(PG_FUNCTION_ARGS);
-extern bool int84eq(int64 *val1, int32 val2);
-extern bool int84ne(int64 *val1, int32 val2);
-extern bool int84lt(int64 *val1, int32 val2);
-extern bool int84gt(int64 *val1, int32 val2);
-extern bool int84le(int64 *val1, int32 val2);
-extern bool int84ge(int64 *val1, int32 val2);
+extern Datum int8eq(PG_FUNCTION_ARGS);
+extern Datum int8ne(PG_FUNCTION_ARGS);
+extern Datum int8lt(PG_FUNCTION_ARGS);
+extern Datum int8gt(PG_FUNCTION_ARGS);
+extern Datum int8le(PG_FUNCTION_ARGS);
+extern Datum int8ge(PG_FUNCTION_ARGS);
-extern bool int48eq(int32 val1, int64 *val2);
-extern bool int48ne(int32 val1, int64 *val2);
-extern bool int48lt(int32 val1, int64 *val2);
-extern bool int48gt(int32 val1, int64 *val2);
-extern bool int48le(int32 val1, int64 *val2);
-extern bool int48ge(int32 val1, int64 *val2);
+extern Datum int84eq(PG_FUNCTION_ARGS);
+extern Datum int84ne(PG_FUNCTION_ARGS);
+extern Datum int84lt(PG_FUNCTION_ARGS);
+extern Datum int84gt(PG_FUNCTION_ARGS);
+extern Datum int84le(PG_FUNCTION_ARGS);
+extern Datum int84ge(PG_FUNCTION_ARGS);
-extern int64 *int8um(int64 *val);
-extern int64 *int8pl(int64 *val1, int64 *val2);
-extern int64 *int8mi(int64 *val1, int64 *val2);
-extern int64 *int8mul(int64 *val1, int64 *val2);
-extern int64 *int8div(int64 *val1, int64 *val2);
-extern int64 *int8abs(int64 *val1);
-extern int64 *int8fac(int64 *val1);
-extern int64 *int8mod(int64 *val1, int64 *val2);
-extern int64 *int8larger(int64 *val1, int64 *val2);
-extern int64 *int8smaller(int64 *val1, int64 *val2);
+extern Datum int48eq(PG_FUNCTION_ARGS);
+extern Datum int48ne(PG_FUNCTION_ARGS);
+extern Datum int48lt(PG_FUNCTION_ARGS);
+extern Datum int48gt(PG_FUNCTION_ARGS);
+extern Datum int48le(PG_FUNCTION_ARGS);
+extern Datum int48ge(PG_FUNCTION_ARGS);
-extern int64 *int84pl(int64 *val1, int32 val2);
-extern int64 *int84mi(int64 *val1, int32 val2);
-extern int64 *int84mul(int64 *val1, int32 val2);
-extern int64 *int84div(int64 *val1, int32 val2);
+extern Datum int8um(PG_FUNCTION_ARGS);
+extern Datum int8pl(PG_FUNCTION_ARGS);
+extern Datum int8mi(PG_FUNCTION_ARGS);
+extern Datum int8mul(PG_FUNCTION_ARGS);
+extern Datum int8div(PG_FUNCTION_ARGS);
+extern Datum int8abs(PG_FUNCTION_ARGS);
+extern Datum int8fac(PG_FUNCTION_ARGS);
+extern Datum int8mod(PG_FUNCTION_ARGS);
+extern Datum int8larger(PG_FUNCTION_ARGS);
+extern Datum int8smaller(PG_FUNCTION_ARGS);
-extern int64 *int48pl(int32 val1, int64 *val2);
-extern int64 *int48mi(int32 val1, int64 *val2);
-extern int64 *int48mul(int32 val1, int64 *val2);
-extern int64 *int48div(int32 val1, int64 *val2);
+extern Datum int84pl(PG_FUNCTION_ARGS);
+extern Datum int84mi(PG_FUNCTION_ARGS);
+extern Datum int84mul(PG_FUNCTION_ARGS);
+extern Datum int84div(PG_FUNCTION_ARGS);
-extern int64 *int48(int32 val);
-extern int32 int84(int64 *val);
+extern Datum int48pl(PG_FUNCTION_ARGS);
+extern Datum int48mi(PG_FUNCTION_ARGS);
+extern Datum int48mul(PG_FUNCTION_ARGS);
+extern Datum int48div(PG_FUNCTION_ARGS);
-#ifdef NOT_USED
-extern int16 int82(int64 *val);
+extern Datum int48(PG_FUNCTION_ARGS);
+extern Datum int84(PG_FUNCTION_ARGS);
-#endif
+extern Datum i8tod(PG_FUNCTION_ARGS);
+extern Datum dtoi8(PG_FUNCTION_ARGS);
-extern float64 i8tod(int64 *val);
-extern int64 *dtoi8(float64 val);
-
-extern text *int8_text(int64 *val);
-extern int64 *text_int8(text *str);
+extern Datum int8_text(PG_FUNCTION_ARGS);
+extern Datum text_int8(PG_FUNCTION_ARGS);
#endif /* INT8_H */
diff --git a/src/include/utils/numeric.h b/src/include/utils/numeric.h
index 1b3864dc0dd..1a0dd692dbd 100644
--- a/src/include/utils/numeric.h
+++ b/src/include/utils/numeric.h
@@ -5,7 +5,7 @@
*
* 1998 Jan Wieck
*
- * $Header: /cvsroot/pgsql/src/include/utils/numeric.h,v 1.9 2000/04/12 17:16:55 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/include/utils/numeric.h,v 1.10 2000/06/13 07:35:31 tgl Exp $
*
* ----------
*/
@@ -71,4 +71,13 @@ typedef NumericData *Numeric;
#define NUMERIC_HDRSZ (sizeof(int32) + sizeof(uint16) * 3)
+/*
+ * fmgr interface macros
+ */
+
+#define DatumGetNumeric(X) ((Numeric) PG_DETOAST_DATUM(X))
+#define NumericGetDatum(X) PointerGetDatum(X)
+#define PG_GETARG_NUMERIC(n) DatumGetNumeric(PG_GETARG_DATUM(n))
+#define PG_RETURN_NUMERIC(x) return NumericGetDatum(x)
+
#endif /* _PG_NUMERIC_H_ */