# Makefile for access/transam
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/access/transam/Makefile,v 1.15 2001/08/25 18:52:41 tgl Exp $
+# $Header: /cvsroot/pgsql/src/backend/access/transam/Makefile,v 1.16 2003/05/12 23:08:50 tgl Exp $
#
#-------------------------------------------------------------------------
top_builddir = ../../../..
include $(top_builddir)/src/Makefile.global
-OBJS = clog.o transam.o varsup.o xact.o xid.o xlog.o xlogutils.o rmgr.o
+OBJS = clog.o transam.o varsup.o xact.o xlog.o xlogutils.o rmgr.o
all: SUBSYS.o
+++ /dev/null
-/*-------------------------------------------------------------------------
- *
- * xid.c
- * POSTGRES transaction identifier datatype.
- *
- * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * $Id: xid.c,v 1.35 2002/06/20 20:29:25 momjian Exp $
- *
- *-------------------------------------------------------------------------
- */
-
-#include "postgres.h"
-
-#include <limits.h>
-
-#include "access/xact.h"
-
-
-#define PG_GETARG_TRANSACTIONID(n) DatumGetTransactionId(PG_GETARG_DATUM(n))
-#define PG_RETURN_TRANSACTIONID(x) return TransactionIdGetDatum(x)
-
-
-Datum
-xidin(PG_FUNCTION_ARGS)
-{
- char *str = PG_GETARG_CSTRING(0);
-
- PG_RETURN_TRANSACTIONID((TransactionId) strtoul(str, NULL, 0));
-}
-
-Datum
-xidout(PG_FUNCTION_ARGS)
-{
- TransactionId transactionId = PG_GETARG_TRANSACTIONID(0);
-
- /* maximum 32 bit unsigned integer representation takes 10 chars */
- char *str = palloc(11);
-
- snprintf(str, 11, "%lu", (unsigned long) transactionId);
-
- PG_RETURN_CSTRING(str);
-}
-
-/*
- * xideq - are two xids equal?
- */
-Datum
-xideq(PG_FUNCTION_ARGS)
-{
- TransactionId xid1 = PG_GETARG_TRANSACTIONID(0);
- TransactionId xid2 = PG_GETARG_TRANSACTIONID(1);
-
- PG_RETURN_BOOL(TransactionIdEquals(xid1, xid2));
-}
-
-/*
- * xid_age - compute age of an XID (relative to current xact)
- */
-Datum
-xid_age(PG_FUNCTION_ARGS)
-{
- TransactionId xid = PG_GETARG_TRANSACTIONID(0);
- TransactionId now = GetCurrentTransactionId();
-
- /* Permanent XIDs are always infinitely old */
- if (!TransactionIdIsNormal(xid))
- PG_RETURN_INT32(INT_MAX);
-
- PG_RETURN_INT32((int32) (now - xid));
-}
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.116 2003/01/27 00:47:37 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.117 2003/05/12 23:08:50 tgl Exp $
*
*-------------------------------------------------------------------------
*/
if (isnull)
valuntil = pstrdup("");
else
- valuntil = DatumGetCString(DirectFunctionCall1(nabstimeout, datum));
+ valuntil = DatumGetCString(DirectFunctionCall1(abstimeout, datum));
/*
* Check for illegal characters in the username and password.
if (validUntil)
new_record[Anum_pg_shadow_valuntil - 1] =
- DirectFunctionCall1(nabstimein, CStringGetDatum(validUntil));
+ DirectFunctionCall1(abstimein, CStringGetDatum(validUntil));
else
new_record_nulls[Anum_pg_shadow_valuntil - 1] = 'n';
if (validUntil)
{
new_record[Anum_pg_shadow_valuntil - 1] =
- DirectFunctionCall1(nabstimein, CStringGetDatum(validUntil));
+ DirectFunctionCall1(abstimein, CStringGetDatum(validUntil));
new_record_repl[Anum_pg_shadow_valuntil - 1] = 'r';
}
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Header: /cvsroot/pgsql/src/backend/libpq/crypt.c,v 1.52 2003/04/17 22:26:01 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/crypt.c,v 1.53 2003/05/12 23:08:50 tgl Exp $
*
*-------------------------------------------------------------------------
*/
if (!valuntil)
vuntil = INVALID_ABSTIME;
else
- vuntil = DatumGetAbsoluteTime(DirectFunctionCall1(nabstimein,
+ vuntil = DatumGetAbsoluteTime(DirectFunctionCall1(abstimein,
CStringGetDatum(valuntil)));
current = GetCurrentAbsoluteTime();
if (vuntil != INVALID_ABSTIME && vuntil < current)
#
# Makefile for utils/adt
#
-# $Header: /cvsroot/pgsql/src/backend/utils/adt/Makefile,v 1.54 2003/04/08 23:20:02 tgl Exp $
+# $Header: /cvsroot/pgsql/src/backend/utils/adt/Makefile,v 1.55 2003/05/12 23:08:50 tgl Exp $
#
subdir = src/backend/utils/adt
misc.o nabstime.o name.o not_in.o numeric.o numutils.o \
oid.o oracle_compat.o pseudotypes.o \
regexp.o regproc.o ruleutils.o selfuncs.o sets.o \
- tid.o timestamp.o varbit.o varchar.o varlena.o version.o \
+ tid.o timestamp.o varbit.o varchar.o varlena.o version.o xid.o \
network.o mac.o inet_net_ntop.o inet_net_pton.o \
ri_triggers.o pg_lzcompress.o pg_locale.o formatting.o \
ascii.o quote.o pgstatfuncs.o encode.o
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/bool.c,v 1.26 2002/06/20 20:29:36 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/bool.c,v 1.27 2003/05/12 23:08:50 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
+#include "libpq/pqformat.h"
#include "utils/builtins.h"
/*****************************************************************************
PG_RETURN_CSTRING(result);
}
+/*
+ * boolrecv - converts external binary format to bool
+ *
+ * The external representation is one byte. Any nonzero value is taken
+ * as "true".
+ */
+Datum
+boolrecv(PG_FUNCTION_ARGS)
+{
+ StringInfo buf = (StringInfo) PG_GETARG_POINTER(0);
+ int ext;
+
+ ext = pq_getmsgbyte(buf);
+ PG_RETURN_BOOL((ext != 0) ? true : false);
+}
+
+/*
+ * boolsend - converts bool to binary format
+ */
+Datum
+boolsend(PG_FUNCTION_ARGS)
+{
+ bool arg1 = PG_GETARG_BOOL(0);
+ StringInfoData buf;
+
+ pq_begintypsend(&buf);
+ pq_sendbyte(&buf, arg1 ? 1 : 0);
+ PG_RETURN_BYTEA_P(pq_endtypsend(&buf));
+}
+
/*****************************************************************************
* PUBLIC ROUTINES *
/*-------------------------------------------------------------------------
*
* char.c
- * Functions for the built-in type "char".
- * Functions for the built-in type "cid" (what's that doing here?)
+ * Functions for the built-in type "char" (not to be confused with
+ * bpchar, which is the SQL CHAR(n) type).
*
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/char.c,v 1.34 2003/03/11 21:01:33 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/char.c,v 1.35 2003/05/12 23:08:50 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
+#include "libpq/pqformat.h"
#include "utils/builtins.h"
/*****************************************************************************
PG_RETURN_CSTRING(result);
}
+/*
+ * charrecv - converts external binary format to char
+ *
+ * The external representation is one byte, with no character set
+ * conversion. This is somewhat dubious, perhaps, but in many
+ * cases people use char for a 1-byte binary type.
+ */
+Datum
+charrecv(PG_FUNCTION_ARGS)
+{
+ StringInfo buf = (StringInfo) PG_GETARG_POINTER(0);
+
+ PG_RETURN_CHAR(pq_getmsgbyte(buf));
+}
+
+/*
+ * charsend - converts char to binary format
+ */
+Datum
+charsend(PG_FUNCTION_ARGS)
+{
+ char arg1 = PG_GETARG_CHAR(0);
+ StringInfoData buf;
+
+ pq_begintypsend(&buf);
+ pq_sendbyte(&buf, arg1);
+ PG_RETURN_BYTEA_P(pq_endtypsend(&buf));
+}
+
/*****************************************************************************
* PUBLIC ROUTINES *
*****************************************************************************/
PG_RETURN_TEXT_P(result);
}
-
-
-/*****************************************************************************
- * USER I/O ROUTINES *
- *****************************************************************************/
-
-/*
- * cidin - converts CommandId to internal representation.
- */
-Datum
-cidin(PG_FUNCTION_ARGS)
-{
- char *s = PG_GETARG_CSTRING(0);
- CommandId c;
-
- c = atoi(s);
-
- /* XXX assume that CommandId is 32 bits... */
- PG_RETURN_INT32((int32) c);
-}
-
-/*
- * cidout - converts a cid to external representation.
- */
-Datum
-cidout(PG_FUNCTION_ARGS)
-{
- /* XXX assume that CommandId is 32 bits... */
- CommandId c = PG_GETARG_INT32(0);
- char *result = (char *) palloc(16);
-
- sprintf(result, "%u", (unsigned int) c);
- PG_RETURN_CSTRING(result);
-}
-
-/*****************************************************************************
- * PUBLIC ROUTINES *
- *****************************************************************************/
-
-Datum
-cideq(PG_FUNCTION_ARGS)
-{
- /* XXX assume that CommandId is 32 bits... */
- CommandId arg1 = PG_GETARG_INT32(0);
- CommandId arg2 = PG_GETARG_INT32(1);
-
- PG_RETURN_BOOL(arg1 == arg2);
-}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.81 2003/04/08 17:02:04 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.82 2003/05/12 23:08:50 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#include <float.h>
#include "access/hash.h"
+#include "libpq/pqformat.h"
#include "miscadmin.h"
#include "utils/builtins.h"
#include "utils/date.h"
PG_RETURN_CSTRING(result);
}
+/*
+ * date_recv - converts external binary format to date
+ */
+Datum
+date_recv(PG_FUNCTION_ARGS)
+{
+ StringInfo buf = (StringInfo) PG_GETARG_POINTER(0);
+
+ PG_RETURN_DATEADT((DateADT) pq_getmsgint(buf, sizeof(DateADT)));
+}
+
+/*
+ * date_send - converts date to binary format
+ */
+Datum
+date_send(PG_FUNCTION_ARGS)
+{
+ DateADT date = PG_GETARG_DATEADT(0);
+ StringInfoData buf;
+
+ pq_begintypsend(&buf);
+ pq_sendint(&buf, date, sizeof(date));
+ PG_RETURN_BYTEA_P(pq_endtypsend(&buf));
+}
+
+
Datum
date_eq(PG_FUNCTION_ARGS)
{
PG_RETURN_CSTRING(result);
}
+/*
+ * time_recv - converts external binary format to time
+ *
+ * We make no attempt to provide compatibility between int and float
+ * time representations ...
+ */
+Datum
+time_recv(PG_FUNCTION_ARGS)
+{
+ StringInfo buf = (StringInfo) PG_GETARG_POINTER(0);
+
+#ifdef HAVE_INT64_TIMESTAMP
+ PG_RETURN_TIMEADT((TimeADT) pq_getmsgint64(buf));
+#else
+ PG_RETURN_TIMEADT((TimeADT) pq_getmsgfloat8(buf));
+#endif
+}
+
+/*
+ * time_send - converts time to binary format
+ */
+Datum
+time_send(PG_FUNCTION_ARGS)
+{
+ TimeADT time = PG_GETARG_TIMEADT(0);
+ StringInfoData buf;
+
+ pq_begintypsend(&buf);
+#ifdef HAVE_INT64_TIMESTAMP
+ pq_sendint64(&buf, time);
+#else
+ pq_sendfloat8(&buf, time);
+#endif
+ PG_RETURN_BYTEA_P(pq_endtypsend(&buf));
+}
+
+
/* time_scale()
* Adjust time type for specified scale factor.
* Used by PostgreSQL type system to stuff columns.
PG_RETURN_CSTRING(result);
}
+/*
+ * timetz_recv - converts external binary format to timetz
+ */
+Datum
+timetz_recv(PG_FUNCTION_ARGS)
+{
+ StringInfo buf = (StringInfo) PG_GETARG_POINTER(0);
+ TimeTzADT *time;
+
+ time = (TimeTzADT *) palloc(sizeof(TimeTzADT));
+
+#ifdef HAVE_INT64_TIMESTAMP
+ time->time = pq_getmsgint64(buf);
+#else
+ time->time = pq_getmsgfloat8(buf);
+#endif
+ time->zone = pq_getmsgint(buf, sizeof(time->zone));
+
+ PG_RETURN_TIMETZADT_P(time);
+}
+
+/*
+ * timetz_send - converts timetz to binary format
+ */
+Datum
+timetz_send(PG_FUNCTION_ARGS)
+{
+ TimeTzADT *time = PG_GETARG_TIMETZADT_P(0);
+ StringInfoData buf;
+
+ pq_begintypsend(&buf);
+#ifdef HAVE_INT64_TIMESTAMP
+ pq_sendint64(&buf, time->time);
+#else
+ pq_sendfloat8(&buf, time->time);
+#endif
+ pq_sendint(&buf, time->zone, sizeof(time->zone));
+ PG_RETURN_BYTEA_P(pq_endtypsend(&buf));
+}
+
+
/* timetz2tm()
* Convert TIME WITH TIME ZONE data type to POSIX time structure.
*/
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.107 2003/05/04 04:30:15 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.108 2003/05/12 23:08:50 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#include <limits.h>
#include "access/xact.h"
+#include "libpq/pqformat.h"
#include "miscadmin.h"
#include "utils/builtins.h"
}
-/* nabstimein()
+/* abstimein()
* Decode date/time string and return abstime.
*/
Datum
-nabstimein(PG_FUNCTION_ARGS)
+abstimein(PG_FUNCTION_ARGS)
{
char *str = PG_GETARG_CSTRING(0);
AbsoluteTime result;
}
-/* nabstimeout()
+/* abstimeout()
* Given an AbsoluteTime return the English text version of the date
*/
Datum
-nabstimeout(PG_FUNCTION_ARGS)
+abstimeout(PG_FUNCTION_ARGS)
{
AbsoluteTime time = PG_GETARG_ABSOLUTETIME(0);
char *result;
PG_RETURN_CSTRING(result);
}
+/*
+ * abstimerecv - converts external binary format to abstime
+ */
+Datum
+abstimerecv(PG_FUNCTION_ARGS)
+{
+ StringInfo buf = (StringInfo) PG_GETARG_POINTER(0);
+
+ PG_RETURN_ABSOLUTETIME((AbsoluteTime) pq_getmsgint(buf, sizeof(AbsoluteTime)));
+}
+
+/*
+ * abstimesend - converts abstime to binary format
+ */
+Datum
+abstimesend(PG_FUNCTION_ARGS)
+{
+ AbsoluteTime time = PG_GETARG_ABSOLUTETIME(0);
+ StringInfoData buf;
+
+ pq_begintypsend(&buf);
+ pq_sendint(&buf, time, sizeof(time));
+ PG_RETURN_BYTEA_P(pq_endtypsend(&buf));
+}
+
/* abstime_finite()
*/
PG_RETURN_RELATIVETIME(result);
}
-
/*
* reltimeout - converts the internal format to a reltime string
*/
PG_RETURN_CSTRING(result);
}
+/*
+ * reltimerecv - converts external binary format to reltime
+ */
+Datum
+reltimerecv(PG_FUNCTION_ARGS)
+{
+ StringInfo buf = (StringInfo) PG_GETARG_POINTER(0);
+
+ PG_RETURN_RELATIVETIME((RelativeTime) pq_getmsgint(buf, sizeof(RelativeTime)));
+}
+
+/*
+ * reltimesend - converts reltime to binary format
+ */
+Datum
+reltimesend(PG_FUNCTION_ARGS)
+{
+ RelativeTime time = PG_GETARG_RELATIVETIME(0);
+ StringInfoData buf;
+
+ pq_begintypsend(&buf);
+ pq_sendint(&buf, time, sizeof(time));
+ PG_RETURN_BYTEA_P(pq_endtypsend(&buf));
+}
+
static void
reltime2tm(RelativeTime time, struct tm * tm)
/*
* tintervalout - converts an internal interval format to a string
- *
*/
Datum
tintervalout(PG_FUNCTION_ARGS)
strcat(i_str, INVALID_INTERVAL_STR);
else
{
- p = DatumGetCString(DirectFunctionCall1(nabstimeout,
+ p = DatumGetCString(DirectFunctionCall1(abstimeout,
AbsoluteTimeGetDatum(interval->data[0])));
strcat(i_str, p);
pfree(p);
strcat(i_str, "\" \"");
- p = DatumGetCString(DirectFunctionCall1(nabstimeout,
+ p = DatumGetCString(DirectFunctionCall1(abstimeout,
AbsoluteTimeGetDatum(interval->data[1])));
strcat(i_str, p);
pfree(p);
PG_RETURN_CSTRING(i_str);
}
+/*
+ * tintervalrecv - converts external binary format to tinterval
+ */
+Datum
+tintervalrecv(PG_FUNCTION_ARGS)
+{
+ StringInfo buf = (StringInfo) PG_GETARG_POINTER(0);
+ TimeInterval interval;
+
+ interval = (TimeInterval) palloc(sizeof(TimeIntervalData));
+
+ interval->status = pq_getmsgint(buf, sizeof(interval->status));
+ if (!(interval->status == T_INTERVAL_INVAL ||
+ interval->status == T_INTERVAL_VALID))
+ elog(ERROR, "Invalid status in external tinterval");
+ interval->data[0] = pq_getmsgint(buf, sizeof(interval->data[0]));
+ interval->data[1] = pq_getmsgint(buf, sizeof(interval->data[1]));
+
+ PG_RETURN_TIMEINTERVAL(interval);
+}
+
+/*
+ * tintervalsend - converts tinterval to binary format
+ */
+Datum
+tintervalsend(PG_FUNCTION_ARGS)
+{
+ TimeInterval interval = PG_GETARG_TIMEINTERVAL(0);
+ StringInfoData buf;
+
+ pq_begintypsend(&buf);
+ pq_sendint(&buf, interval->status, sizeof(interval->status));
+ pq_sendint(&buf, interval->data[0], sizeof(interval->data[0]));
+ pq_sendint(&buf, interval->data[1], sizeof(interval->data[1]));
+ PG_RETURN_BYTEA_P(pq_endtypsend(&buf));
+}
+
/*****************************************************************************
* PUBLIC ROUTINES *
p1++;
}
/* get the first date */
- *i_start = DatumGetAbsoluteTime(DirectFunctionCall1(nabstimein,
+ *i_start = DatumGetAbsoluteTime(DirectFunctionCall1(abstimein,
CStringGetDatum(p)));
/* rechange NULL at the end of the first date to a "'" */
*p1 = '"';
p1++;
}
/* get the second date */
- *i_end = DatumGetAbsoluteTime(DirectFunctionCall1(nabstimein,
+ *i_end = DatumGetAbsoluteTime(DirectFunctionCall1(abstimein,
CStringGetDatum(p)));
/* rechange NULL at the end of the first date to a ''' */
*p1 = '"';
* Copyright (c) 1998-2003, PostgreSQL Global Development Group
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/numeric.c,v 1.60 2003/04/21 00:22:24 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/numeric.c,v 1.61 2003/05/12 23:08:50 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#include <errno.h>
#include "catalog/pg_type.h"
+#include "libpq/pqformat.h"
#include "utils/array.h"
#include "utils/builtins.h"
#include "utils/int8.h"
PG_RETURN_CSTRING(str);
}
+/*
+ * numeric_recv - converts external binary format to numeric
+ *
+ * External format is a sequence of int16's:
+ * ndigits, weight, sign, dscale, NumericDigits.
+ */
+Datum
+numeric_recv(PG_FUNCTION_ARGS)
+{
+ StringInfo buf = (StringInfo) PG_GETARG_POINTER(0);
+ NumericVar value;
+ Numeric res;
+ int len,
+ i;
+
+ init_var(&value);
+
+ len = (uint16) pq_getmsgint(buf, sizeof(uint16));
+ if (len < 0 || len > NUMERIC_MAX_PRECISION + NUMERIC_MAX_RESULT_SCALE)
+ elog(ERROR, "Invalid length in external numeric");
+
+ alloc_var(&value, len);
+
+ value.weight = (int16) pq_getmsgint(buf, sizeof(int16));
+ value.sign = (uint16) pq_getmsgint(buf, sizeof(uint16));
+ if (!(value.sign == NUMERIC_POS ||
+ value.sign == NUMERIC_NEG ||
+ value.sign == NUMERIC_NAN))
+ elog(ERROR, "Invalid sign in external numeric");
+ value.dscale = (uint16) pq_getmsgint(buf, sizeof(uint16));
+ for (i = 0; i < len; i++)
+ {
+ NumericDigit d = pq_getmsgint(buf, sizeof(NumericDigit));
+
+ if (d < 0 || d >= NBASE)
+ elog(ERROR, "Invalid digit in external numeric");
+ value.digits[i] = d;
+ }
+
+ res = make_result(&value);
+ free_var(&value);
+
+ PG_RETURN_NUMERIC(res);
+}
+
+/*
+ * numeric_send - converts numeric to binary format
+ */
+Datum
+numeric_send(PG_FUNCTION_ARGS)
+{
+ Numeric num = PG_GETARG_NUMERIC(0);
+ NumericVar x;
+ StringInfoData buf;
+ int i;
+
+ init_var(&x);
+ set_var_from_num(num, &x);
+
+ pq_begintypsend(&buf);
+
+ pq_sendint(&buf, x.ndigits, sizeof(int16));
+ pq_sendint(&buf, x.weight, sizeof(int16));
+ pq_sendint(&buf, x.sign, sizeof(int16));
+ pq_sendint(&buf, x.dscale, sizeof(int16));
+ for (i = 0; i < x.ndigits; i++)
+ pq_sendint(&buf, x.digits[i], sizeof(NumericDigit));
+
+ free_var(&x);
+
+ PG_RETURN_BYTEA_P(pq_endtypsend(&buf));
+}
+
/*
* numeric() -
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.76 2002/09/18 21:35:23 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.77 2003/05/12 23:08:50 tgl Exp $
*
*-------------------------------------------------------------------------
*/
PG_RETURN_CSTRING(result);
}
+/*
+ * regprocrecv - converts external binary format to regproc
+ */
+Datum
+regprocrecv(PG_FUNCTION_ARGS)
+{
+ /* Exactly the same as oidrecv, so share code */
+ return oidrecv(fcinfo);
+}
+
+/*
+ * regprocsend - converts regproc to binary format
+ */
+Datum
+regprocsend(PG_FUNCTION_ARGS)
+{
+ /* Exactly the same as oidsend, so share code */
+ return oidsend(fcinfo);
+}
+
/*
* regprocedurein - converts "proname(args)" to proc OID
PG_RETURN_CSTRING(result);
}
+/*
+ * regprocedurerecv - converts external binary format to regprocedure
+ */
+Datum
+regprocedurerecv(PG_FUNCTION_ARGS)
+{
+ /* Exactly the same as oidrecv, so share code */
+ return oidrecv(fcinfo);
+}
+
+/*
+ * regproceduresend - converts regprocedure to binary format
+ */
+Datum
+regproceduresend(PG_FUNCTION_ARGS)
+{
+ /* Exactly the same as oidsend, so share code */
+ return oidsend(fcinfo);
+}
+
/*
* regoperin - converts "oprname" to operator OID
PG_RETURN_CSTRING(result);
}
+/*
+ * regoperrecv - converts external binary format to regoper
+ */
+Datum
+regoperrecv(PG_FUNCTION_ARGS)
+{
+ /* Exactly the same as oidrecv, so share code */
+ return oidrecv(fcinfo);
+}
+
+/*
+ * regopersend - converts regoper to binary format
+ */
+Datum
+regopersend(PG_FUNCTION_ARGS)
+{
+ /* Exactly the same as oidsend, so share code */
+ return oidsend(fcinfo);
+}
+
/*
* regoperatorin - converts "oprname(args)" to operator OID
PG_RETURN_CSTRING(result);
}
+/*
+ * regoperatorrecv - converts external binary format to regoperator
+ */
+Datum
+regoperatorrecv(PG_FUNCTION_ARGS)
+{
+ /* Exactly the same as oidrecv, so share code */
+ return oidrecv(fcinfo);
+}
+
+/*
+ * regoperatorsend - converts regoperator to binary format
+ */
+Datum
+regoperatorsend(PG_FUNCTION_ARGS)
+{
+ /* Exactly the same as oidsend, so share code */
+ return oidsend(fcinfo);
+}
+
/*
* regclassin - converts "classname" to class OID
PG_RETURN_CSTRING(result);
}
+/*
+ * regclassrecv - converts external binary format to regclass
+ */
+Datum
+regclassrecv(PG_FUNCTION_ARGS)
+{
+ /* Exactly the same as oidrecv, so share code */
+ return oidrecv(fcinfo);
+}
+
+/*
+ * regclasssend - converts regclass to binary format
+ */
+Datum
+regclasssend(PG_FUNCTION_ARGS)
+{
+ /* Exactly the same as oidsend, so share code */
+ return oidsend(fcinfo);
+}
+
/*
* regtypein - converts "typename" to type OID
PG_RETURN_CSTRING(result);
}
+/*
+ * regtyperecv - converts external binary format to regtype
+ */
+Datum
+regtyperecv(PG_FUNCTION_ARGS)
+{
+ /* Exactly the same as oidrecv, so share code */
+ return oidrecv(fcinfo);
+}
+
+/*
+ * regtypesend - converts regtype to binary format
+ */
+Datum
+regtypesend(PG_FUNCTION_ARGS)
+{
+ /* Exactly the same as oidsend, so share code */
+ return oidsend(fcinfo);
+}
+
/*
* Given a C string, parse it into a qualified-name list.
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/tid.c,v 1.36 2002/09/04 20:31:29 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/tid.c,v 1.37 2003/05/12 23:08:50 tgl Exp $
*
* NOTES
* input routine largely stolen from boxin().
#include "access/heapam.h"
#include "catalog/namespace.h"
-#include "utils/builtins.h"
#include "catalog/pg_type.h"
+#include "libpq/pqformat.h"
+#include "utils/builtins.h"
+
#define DatumGetItemPointer(X) ((ItemPointer) DatumGetPointer(X))
#define ItemPointerGetDatum(X) PointerGetDatum(X)
BlockNumber blockNumber;
OffsetNumber offsetNumber;
char buf[32];
- static char *invalidTid = "()";
if (!ItemPointerIsValid(itemPtr))
- PG_RETURN_CSTRING(pstrdup(invalidTid));
+ PG_RETURN_CSTRING(pstrdup("()"));
blockId = &(itemPtr->ip_blkid);
-
blockNumber = BlockIdGetBlockNumber(blockId);
offsetNumber = itemPtr->ip_posid;
PG_RETURN_CSTRING(pstrdup(buf));
}
+/*
+ * tidrecv - converts external binary format to tid
+ */
+Datum
+tidrecv(PG_FUNCTION_ARGS)
+{
+ StringInfo buf = (StringInfo) PG_GETARG_POINTER(0);
+ ItemPointer result;
+ BlockNumber blockNumber;
+ OffsetNumber offsetNumber;
+
+ blockNumber = pq_getmsgint(buf, sizeof(blockNumber));
+ offsetNumber = pq_getmsgint(buf, sizeof(offsetNumber));
+
+ result = (ItemPointer) palloc(sizeof(ItemPointerData));
+
+ ItemPointerSet(result, blockNumber, offsetNumber);
+
+ PG_RETURN_ITEMPOINTER(result);
+}
+
+/*
+ * tidsend - converts tid to binary format
+ */
+Datum
+tidsend(PG_FUNCTION_ARGS)
+{
+ ItemPointer itemPtr = PG_GETARG_ITEMPOINTER(0);
+ BlockId blockId;
+ BlockNumber blockNumber;
+ OffsetNumber offsetNumber;
+ StringInfoData buf;
+
+ blockId = &(itemPtr->ip_blkid);
+ blockNumber = BlockIdGetBlockNumber(blockId);
+ offsetNumber = itemPtr->ip_posid;
+
+ pq_begintypsend(&buf);
+ pq_sendint(&buf, blockNumber, sizeof(blockNumber));
+ pq_sendint(&buf, offsetNumber, sizeof(offsetNumber));
+ PG_RETURN_BYTEA_P(pq_endtypsend(&buf));
+}
+
/*****************************************************************************
* PUBLIC ROUTINES *
*****************************************************************************/
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.83 2003/04/07 15:04:03 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.84 2003/05/12 23:08:50 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#include "access/hash.h"
#include "access/xact.h"
#include "catalog/pg_type.h"
+#include "libpq/pqformat.h"
#include "miscadmin.h"
#include "utils/array.h"
#include "utils/builtins.h"
PG_RETURN_CSTRING(result);
}
+/*
+ * timestamp_recv - converts external binary format to timestamp
+ *
+ * We make no attempt to provide compatibility between int and float
+ * timestamp representations ...
+ */
+Datum
+timestamp_recv(PG_FUNCTION_ARGS)
+{
+ StringInfo buf = (StringInfo) PG_GETARG_POINTER(0);
+
+#ifdef HAVE_INT64_TIMESTAMP
+ PG_RETURN_TIMESTAMP((Timestamp) pq_getmsgint64(buf));
+#else
+ PG_RETURN_TIMESTAMP((Timestamp) pq_getmsgfloat8(buf));
+#endif
+}
+
+/*
+ * timestamp_send - converts timestamp to binary format
+ */
+Datum
+timestamp_send(PG_FUNCTION_ARGS)
+{
+ Timestamp timestamp = PG_GETARG_TIMESTAMP(0);
+ StringInfoData buf;
+
+ pq_begintypsend(&buf);
+#ifdef HAVE_INT64_TIMESTAMP
+ pq_sendint64(&buf, timestamp);
+#else
+ pq_sendfloat8(&buf, timestamp);
+#endif
+ PG_RETURN_BYTEA_P(pq_endtypsend(&buf));
+}
+
+
/* timestamp_scale()
* Adjust time type for specified scale factor.
* Used by PostgreSQL type system to stuff columns.
Datum
timestamptz_out(PG_FUNCTION_ARGS)
{
- TimestampTz dt = PG_GETARG_TIMESTAMP(0);
+ TimestampTz dt = PG_GETARG_TIMESTAMPTZ(0);
char *result;
int tz;
struct tm tt,
PG_RETURN_CSTRING(result);
}
+/*
+ * timestamptz_recv - converts external binary format to timestamptz
+ *
+ * We make no attempt to provide compatibility between int and float
+ * timestamp representations ...
+ */
+Datum
+timestamptz_recv(PG_FUNCTION_ARGS)
+{
+ StringInfo buf = (StringInfo) PG_GETARG_POINTER(0);
+
+#ifdef HAVE_INT64_TIMESTAMP
+ PG_RETURN_TIMESTAMPTZ((TimestampTz) pq_getmsgint64(buf));
+#else
+ PG_RETURN_TIMESTAMPTZ((TimestampTz) pq_getmsgfloat8(buf));
+#endif
+}
+
+/*
+ * timestamptz_send - converts timestamptz to binary format
+ */
+Datum
+timestamptz_send(PG_FUNCTION_ARGS)
+{
+ TimestampTz timestamp = PG_GETARG_TIMESTAMPTZ(0);
+ StringInfoData buf;
+
+ pq_begintypsend(&buf);
+#ifdef HAVE_INT64_TIMESTAMP
+ pq_sendint64(&buf, timestamp);
+#else
+ pq_sendfloat8(&buf, timestamp);
+#endif
+ PG_RETURN_BYTEA_P(pq_endtypsend(&buf));
+}
+
+
/* timestamptz_scale()
* Adjust time type for specified scale factor.
* Used by PostgreSQL type system to stuff columns.
Datum
timestamptz_scale(PG_FUNCTION_ARGS)
{
- TimestampTz timestamp = PG_GETARG_TIMESTAMP(0);
+ TimestampTz timestamp = PG_GETARG_TIMESTAMPTZ(0);
int32 typmod = PG_GETARG_INT32(1);
TimestampTz result;
PG_RETURN_CSTRING(result);
}
+/*
+ * interval_recv - converts external binary format to interval
+ */
+Datum
+interval_recv(PG_FUNCTION_ARGS)
+{
+ StringInfo buf = (StringInfo) PG_GETARG_POINTER(0);
+ Interval *interval;
+
+ interval = (Interval *) palloc(sizeof(Interval));
+
+#ifdef HAVE_INT64_TIMESTAMP
+ interval->time = pq_getmsgint64(buf);
+#else
+ interval->time = pq_getmsgfloat8(buf);
+#endif
+ interval->month = pq_getmsgint(buf, sizeof(interval->month));
+
+ PG_RETURN_INTERVAL_P(interval);
+}
+
+/*
+ * interval_send - converts interval to binary format
+ */
+Datum
+interval_send(PG_FUNCTION_ARGS)
+{
+ Interval *interval = PG_GETARG_INTERVAL_P(0);
+ StringInfoData buf;
+
+ pq_begintypsend(&buf);
+#ifdef HAVE_INT64_TIMESTAMP
+ pq_sendint64(&buf, interval->time);
+#else
+ pq_sendfloat8(&buf, interval->time);
+#endif
+ pq_sendint(&buf, interval->month, sizeof(interval->month));
+ PG_RETURN_BYTEA_P(pq_endtypsend(&buf));
+}
+
+
/* interval_scale()
* Adjust interval type for specified fields.
* Used by PostgreSQL type system to stuff columns.
Datum
timestamptz_pl_span(PG_FUNCTION_ARGS)
{
- TimestampTz timestamp = PG_GETARG_TIMESTAMP(0);
+ TimestampTz timestamp = PG_GETARG_TIMESTAMPTZ(0);
Interval *span = PG_GETARG_INTERVAL_P(1);
TimestampTz result;
int tz;
Datum
timestamptz_mi_span(PG_FUNCTION_ARGS)
{
- TimestampTz timestamp = PG_GETARG_TIMESTAMP(0);
+ TimestampTz timestamp = PG_GETARG_TIMESTAMPTZ(0);
Interval *span = PG_GETARG_INTERVAL_P(1);
Interval tspan;
Datum
timestamptz_age(PG_FUNCTION_ARGS)
{
- TimestampTz dt1 = PG_GETARG_TIMESTAMP(0);
- TimestampTz dt2 = PG_GETARG_TIMESTAMP(1);
+ TimestampTz dt1 = PG_GETARG_TIMESTAMPTZ(0);
+ TimestampTz dt2 = PG_GETARG_TIMESTAMPTZ(1);
Interval *result;
fsec_t fsec,
fsec1,
timestamptz_trunc(PG_FUNCTION_ARGS)
{
text *units = PG_GETARG_TEXT_P(0);
- TimestampTz timestamp = PG_GETARG_TIMESTAMP(1);
+ TimestampTz timestamp = PG_GETARG_TIMESTAMPTZ(1);
TimestampTz result;
int tz;
int type,
timestamptz_part(PG_FUNCTION_ARGS)
{
text *units = PG_GETARG_TEXT_P(0);
- TimestampTz timestamp = PG_GETARG_TIMESTAMP(1);
+ TimestampTz timestamp = PG_GETARG_TIMESTAMPTZ(1);
float8 result;
int tz;
int type,
Datum
timestamptz_timestamp(PG_FUNCTION_ARGS)
{
- TimestampTz timestamp = PG_GETARG_TIMESTAMP(0);
+ TimestampTz timestamp = PG_GETARG_TIMESTAMPTZ(0);
Timestamp result;
struct tm tt,
*tm = &tt;
timestamptz_zone(PG_FUNCTION_ARGS)
{
text *zone = PG_GETARG_TEXT_P(0);
- TimestampTz timestamp = PG_GETARG_TIMESTAMP(1);
+ TimestampTz timestamp = PG_GETARG_TIMESTAMPTZ(1);
Timestamp result;
int tz;
timestamptz_izone(PG_FUNCTION_ARGS)
{
Interval *zone = PG_GETARG_INTERVAL_P(0);
- TimestampTz timestamp = PG_GETARG_TIMESTAMP(1);
+ TimestampTz timestamp = PG_GETARG_TIMESTAMPTZ(1);
Timestamp result;
int tz;
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/varbit.c,v 1.29 2002/11/13 00:39:47 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/varbit.c,v 1.30 2003/05/12 23:08:50 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
#include "catalog/pg_type.h"
+#include "libpq/pqformat.h"
#include "utils/array.h"
#include "utils/fmgroids.h"
#include "utils/memutils.h"
#endif
}
+/*
+ * bit_recv - converts external binary format to bit
+ */
+Datum
+bit_recv(PG_FUNCTION_ARGS)
+{
+ /* Exactly the same as varbit_recv, so share code */
+ return varbit_recv(fcinfo);
+}
+
+/*
+ * bit_send - converts bit to binary format
+ */
+Datum
+bit_send(PG_FUNCTION_ARGS)
+{
+ /* Exactly the same as varbit_send, so share code */
+ return varbit_send(fcinfo);
+}
+
/* bit()
* Converts a bit() type to a specific internal length.
* len is the bitlength specified in the column definition.
PG_RETURN_CSTRING(result);
}
+/*
+ * varbit_recv - converts external binary format to varbit
+ *
+ * External format is the bitlen as an int32, then the byte array.
+ */
+Datum
+varbit_recv(PG_FUNCTION_ARGS)
+{
+ StringInfo buf = (StringInfo) PG_GETARG_POINTER(0);
+ VarBit *result;
+ int len,
+ bitlen;
+ int ipad;
+ bits8 mask;
+
+ bitlen = pq_getmsgint(buf, sizeof(int32));
+ if (bitlen < 0)
+ elog(ERROR, "Invalid length in external bit string");
+
+ len = VARBITTOTALLEN(bitlen);
+ result = (VarBit *) palloc(len);
+ VARATT_SIZEP(result) = len;
+ VARBITLEN(result) = bitlen;
+
+ pq_copymsgbytes(buf, (char *) VARBITS(result), VARBITBYTES(result));
+
+ /* Make sure last byte is zero-padded if needed */
+ ipad = VARBITPAD(result);
+ if (ipad > 0)
+ {
+ mask = BITMASK << ipad;
+ *(VARBITS(result) + VARBITBYTES(result) - 1) &= mask;
+ }
+
+ PG_RETURN_VARBIT_P(result);
+}
+
+/*
+ * varbit_send - converts varbit to binary format
+ */
+Datum
+varbit_send(PG_FUNCTION_ARGS)
+{
+ VarBit *s = PG_GETARG_VARBIT_P(0);
+ StringInfoData buf;
+
+ pq_begintypsend(&buf);
+ pq_sendint(&buf, VARBITLEN(s), sizeof(int32));
+ pq_sendbytes(&buf, VARBITS(s), VARBITBYTES(s));
+ PG_RETURN_BYTEA_P(pq_endtypsend(&buf));
+}
+
/* varbit()
* Converts a varbit() type to a specific internal length.
* len is the maximum bitlength specified in the column definition.
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.95 2002/09/18 21:35:23 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.96 2003/05/12 23:08:50 tgl Exp $
*
*-------------------------------------------------------------------------
*/
PG_RETURN_CSTRING(result);
}
+/*
+ * bpcharrecv - converts external binary format to bpchar
+ */
+Datum
+bpcharrecv(PG_FUNCTION_ARGS)
+{
+ /* Exactly the same as textrecv, so share code */
+ return textrecv(fcinfo);
+}
+
+/*
+ * bpcharsend - converts bpchar to binary format
+ */
+Datum
+bpcharsend(PG_FUNCTION_ARGS)
+{
+ /* Exactly the same as textsend, so share code */
+ return textsend(fcinfo);
+}
+
/*
* Converts a CHARACTER type to the specified size.
PG_RETURN_CSTRING(result);
}
+/*
+ * varcharrecv - converts external binary format to varchar
+ */
+Datum
+varcharrecv(PG_FUNCTION_ARGS)
+{
+ /* Exactly the same as textrecv, so share code */
+ return textrecv(fcinfo);
+}
+
+/*
+ * varcharsend - converts varchar to binary format
+ */
+Datum
+varcharsend(PG_FUNCTION_ARGS)
+{
+ /* Exactly the same as textsend, so share code */
+ return textsend(fcinfo);
+}
+
/*
* Converts a VARCHAR type to the specified size.
--- /dev/null
+/*-------------------------------------------------------------------------
+ *
+ * xid.c
+ * POSTGRES transaction identifier and command identifier datatypes.
+ *
+ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ *
+ * IDENTIFICATION
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/xid.c,v 1.1 2003/05/12 23:08:50 tgl Exp $
+ *
+ *-------------------------------------------------------------------------
+ */
+#include "postgres.h"
+
+#include <limits.h>
+
+#include "access/xact.h"
+#include "libpq/pqformat.h"
+#include "utils/builtins.h"
+
+
+#define PG_GETARG_TRANSACTIONID(n) DatumGetTransactionId(PG_GETARG_DATUM(n))
+#define PG_RETURN_TRANSACTIONID(x) return TransactionIdGetDatum(x)
+
+#define PG_GETARG_COMMANDID(n) DatumGetCommandId(PG_GETARG_DATUM(n))
+#define PG_RETURN_COMMANDID(x) return CommandIdGetDatum(x)
+
+
+Datum
+xidin(PG_FUNCTION_ARGS)
+{
+ char *str = PG_GETARG_CSTRING(0);
+
+ PG_RETURN_TRANSACTIONID((TransactionId) strtoul(str, NULL, 0));
+}
+
+Datum
+xidout(PG_FUNCTION_ARGS)
+{
+ TransactionId transactionId = PG_GETARG_TRANSACTIONID(0);
+
+ /* maximum 32 bit unsigned integer representation takes 10 chars */
+ char *str = palloc(11);
+
+ snprintf(str, 11, "%lu", (unsigned long) transactionId);
+
+ PG_RETURN_CSTRING(str);
+}
+
+/*
+ * xidrecv - converts external binary format to xid
+ */
+Datum
+xidrecv(PG_FUNCTION_ARGS)
+{
+ StringInfo buf = (StringInfo) PG_GETARG_POINTER(0);
+
+ PG_RETURN_TRANSACTIONID((TransactionId) pq_getmsgint(buf, sizeof(TransactionId)));
+}
+
+/*
+ * xidsend - converts xid to binary format
+ */
+Datum
+xidsend(PG_FUNCTION_ARGS)
+{
+ TransactionId arg1 = PG_GETARG_TRANSACTIONID(0);
+ StringInfoData buf;
+
+ pq_begintypsend(&buf);
+ pq_sendint(&buf, arg1, sizeof(arg1));
+ PG_RETURN_BYTEA_P(pq_endtypsend(&buf));
+}
+
+/*
+ * xideq - are two xids equal?
+ */
+Datum
+xideq(PG_FUNCTION_ARGS)
+{
+ TransactionId xid1 = PG_GETARG_TRANSACTIONID(0);
+ TransactionId xid2 = PG_GETARG_TRANSACTIONID(1);
+
+ PG_RETURN_BOOL(TransactionIdEquals(xid1, xid2));
+}
+
+/*
+ * xid_age - compute age of an XID (relative to current xact)
+ */
+Datum
+xid_age(PG_FUNCTION_ARGS)
+{
+ TransactionId xid = PG_GETARG_TRANSACTIONID(0);
+ TransactionId now = GetCurrentTransactionId();
+
+ /* Permanent XIDs are always infinitely old */
+ if (!TransactionIdIsNormal(xid))
+ PG_RETURN_INT32(INT_MAX);
+
+ PG_RETURN_INT32((int32) (now - xid));
+}
+
+
+/*****************************************************************************
+ * COMMAND IDENTIFIER ROUTINES *
+ *****************************************************************************/
+
+/*
+ * cidin - converts CommandId to internal representation.
+ */
+Datum
+cidin(PG_FUNCTION_ARGS)
+{
+ char *s = PG_GETARG_CSTRING(0);
+ CommandId c;
+
+ c = atoi(s);
+
+ PG_RETURN_COMMANDID(c);
+}
+
+/*
+ * cidout - converts a cid to external representation.
+ */
+Datum
+cidout(PG_FUNCTION_ARGS)
+{
+ CommandId c = PG_GETARG_COMMANDID(0);
+ char *result = (char *) palloc(16);
+
+ snprintf(result, 16, "%u", (unsigned int) c);
+ PG_RETURN_CSTRING(result);
+}
+
+/*
+ * cidrecv - converts external binary format to cid
+ */
+Datum
+cidrecv(PG_FUNCTION_ARGS)
+{
+ StringInfo buf = (StringInfo) PG_GETARG_POINTER(0);
+
+ PG_RETURN_COMMANDID((CommandId) pq_getmsgint(buf, sizeof(CommandId)));
+}
+
+/*
+ * cidsend - converts cid to binary format
+ */
+Datum
+cidsend(PG_FUNCTION_ARGS)
+{
+ CommandId arg1 = PG_GETARG_COMMANDID(0);
+ StringInfoData buf;
+
+ pq_begintypsend(&buf);
+ pq_sendint(&buf, arg1, sizeof(arg1));
+ PG_RETURN_BYTEA_P(pq_endtypsend(&buf));
+}
+
+Datum
+cideq(PG_FUNCTION_ARGS)
+{
+ CommandId arg1 = PG_GETARG_COMMANDID(0);
+ CommandId arg2 = PG_GETARG_COMMANDID(1);
+
+ PG_RETURN_BOOL(arg1 == arg2);
+}
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: xact.h,v 1.50 2003/04/26 20:22:59 tgl Exp $
+ * $Id: xact.h,v 1.51 2003/05/12 23:08:50 tgl Exp $
*
*-------------------------------------------------------------------------
*/
extern void xact_undo(XLogRecPtr lsn, XLogRecord *record);
extern void xact_desc(char *buf, uint8 xl_info, char *rec);
-/* defined in xid.c */
-extern Datum xidin(PG_FUNCTION_ARGS);
-extern Datum xidout(PG_FUNCTION_ARGS);
-extern Datum xideq(PG_FUNCTION_ARGS);
-extern Datum xid_age(PG_FUNCTION_ARGS);
-
#endif /* XACT_H */
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: catversion.h,v 1.190 2003/05/09 23:01:45 tgl Exp $
+ * $Id: catversion.h,v 1.191 2003/05/12 23:08:50 tgl Exp $
*
*-------------------------------------------------------------------------
*/
*/
/* yyyymmddN */
-#define CATALOG_VERSION_NO 200305093
+#define CATALOG_VERSION_NO 200305121
#endif
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_proc.h,v 1.297 2003/05/09 23:01:45 tgl Exp $
+ * $Id: pg_proc.h,v 1.298 2003/05/12 23:08:51 tgl Exp $
*
* NOTES
* The script catalog/genbki.sh reads this file and generates .bki
DATA(insert OID = 239 ( line_distance PGNSP PGUID 12 f f t f i 2 701 "628 628" line_distance - _null_ ));
DESCR("distance between");
-DATA(insert OID = 240 ( nabstimein PGNSP PGUID 12 f f t f s 1 702 "2275" nabstimein - _null_ ));
+DATA(insert OID = 240 ( abstimein PGNSP PGUID 12 f f t f s 1 702 "2275" abstimein - _null_ ));
DESCR("I/O");
-DATA(insert OID = 241 ( nabstimeout PGNSP PGUID 12 f f t f s 1 2275 "702" nabstimeout - _null_ ));
+DATA(insert OID = 241 ( abstimeout PGNSP PGUID 12 f f t f s 1 2275 "702" abstimeout - _null_ ));
DESCR("I/O");
DATA(insert OID = 242 ( reltimein PGNSP PGUID 12 f f t f s 1 703 "2275" reltimein - _null_ ));
DESCR("I/O");
DESCR("I/O");
DATA(insert OID = 2429 ( point_send PGNSP PGUID 12 f f t f i 1 17 "600" point_send - _null_ ));
DESCR("I/O");
+DATA(insert OID = 2430 ( bpcharrecv PGNSP PGUID 12 f f t f s 1 1042 "2281" bpcharrecv - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2431 ( bpcharsend PGNSP PGUID 12 f f t f s 1 17 "1042" bpcharsend - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2432 ( varcharrecv PGNSP PGUID 12 f f t f s 1 1043 "2281" varcharrecv - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2433 ( varcharsend PGNSP PGUID 12 f f t f s 1 17 "1043" varcharsend - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2434 ( charrecv PGNSP PGUID 12 f f t f i 1 18 "2281" charrecv - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2435 ( charsend PGNSP PGUID 12 f f t f i 1 17 "18" charsend - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2436 ( boolrecv PGNSP PGUID 12 f f t f i 1 16 "2281" boolrecv - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2437 ( boolsend PGNSP PGUID 12 f f t f i 1 17 "16" boolsend - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2438 ( tidrecv PGNSP PGUID 12 f f t f i 1 27 "2281" tidrecv - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2439 ( tidsend PGNSP PGUID 12 f f t f i 1 17 "27" tidsend - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2440 ( xidrecv PGNSP PGUID 12 f f t f i 1 28 "2281" xidrecv - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2441 ( xidsend PGNSP PGUID 12 f f t f i 1 17 "28" xidsend - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2442 ( cidrecv PGNSP PGUID 12 f f t f i 1 29 "2281" cidrecv - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2443 ( cidsend PGNSP PGUID 12 f f t f i 1 17 "29" cidsend - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2444 ( regprocrecv PGNSP PGUID 12 f f t f i 1 24 "2281" regprocrecv - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2445 ( regprocsend PGNSP PGUID 12 f f t f i 1 17 "24" regprocsend - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2446 ( regprocedurerecv PGNSP PGUID 12 f f t f i 1 2202 "2281" regprocedurerecv - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2447 ( regproceduresend PGNSP PGUID 12 f f t f i 1 17 "2202" regproceduresend - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2448 ( regoperrecv PGNSP PGUID 12 f f t f i 1 2203 "2281" regoperrecv - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2449 ( regopersend PGNSP PGUID 12 f f t f i 1 17 "2203" regopersend - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2450 ( regoperatorrecv PGNSP PGUID 12 f f t f i 1 2204 "2281" regoperatorrecv - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2451 ( regoperatorsend PGNSP PGUID 12 f f t f i 1 17 "2204" regoperatorsend - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2452 ( regclassrecv PGNSP PGUID 12 f f t f i 1 2205 "2281" regclassrecv - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2453 ( regclasssend PGNSP PGUID 12 f f t f i 1 17 "2205" regclasssend - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2454 ( regtyperecv PGNSP PGUID 12 f f t f i 1 2206 "2281" regtyperecv - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2455 ( regtypesend PGNSP PGUID 12 f f t f i 1 17 "2206" regtypesend - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2456 ( bit_recv PGNSP PGUID 12 f f t f i 1 1560 "2281" bit_recv - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2457 ( bit_send PGNSP PGUID 12 f f t f i 1 17 "1560" bit_send - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2458 ( varbit_recv PGNSP PGUID 12 f f t f i 1 1562 "2281" varbit_recv - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2459 ( varbit_send PGNSP PGUID 12 f f t f i 1 17 "1562" varbit_send - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2460 ( numeric_recv PGNSP PGUID 12 f f t f i 1 1700 "2281" numeric_recv - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2461 ( numeric_send PGNSP PGUID 12 f f t f i 1 17 "1700" numeric_send - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2462 ( abstimerecv PGNSP PGUID 12 f f t f i 1 702 "2281" abstimerecv - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2463 ( abstimesend PGNSP PGUID 12 f f t f i 1 17 "702" abstimesend - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2464 ( reltimerecv PGNSP PGUID 12 f f t f i 1 703 "2281" reltimerecv - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2465 ( reltimesend PGNSP PGUID 12 f f t f i 1 17 "703" reltimesend - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2466 ( tintervalrecv PGNSP PGUID 12 f f t f i 1 704 "2281" tintervalrecv - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2467 ( tintervalsend PGNSP PGUID 12 f f t f i 1 17 "704" tintervalsend - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2468 ( date_recv PGNSP PGUID 12 f f t f i 1 1082 "2281" date_recv - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2469 ( date_send PGNSP PGUID 12 f f t f i 1 17 "1082" date_send - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2470 ( time_recv PGNSP PGUID 12 f f t f i 1 1083 "2281" time_recv - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2471 ( time_send PGNSP PGUID 12 f f t f i 1 17 "1083" time_send - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2472 ( timetz_recv PGNSP PGUID 12 f f t f i 1 1266 "2281" timetz_recv - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2473 ( timetz_send PGNSP PGUID 12 f f t f i 1 17 "1266" timetz_send - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2474 ( timestamp_recv PGNSP PGUID 12 f f t f i 1 1114 "2281" timestamp_recv - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2475 ( timestamp_send PGNSP PGUID 12 f f t f i 1 17 "1114" timestamp_send - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2476 ( timestamptz_recv PGNSP PGUID 12 f f t f i 1 1184 "2281" timestamptz_recv - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2477 ( timestamptz_send PGNSP PGUID 12 f f t f i 1 17 "1184" timestamptz_send - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2478 ( interval_recv PGNSP PGUID 12 f f t f i 1 1186 "2281" interval_recv - _null_ ));
+DESCR("I/O");
+DATA(insert OID = 2479 ( interval_send PGNSP PGUID 12 f f t f i 1 17 "1186" interval_send - _null_ ));
+DESCR("I/O");
/*
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_type.h,v 1.143 2003/05/09 21:19:50 tgl Exp $
+ * $Id: pg_type.h,v 1.144 2003/05/12 23:08:51 tgl Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
*/
/* OIDS 1 - 99 */
-DATA(insert OID = 16 ( bool PGNSP PGUID 1 t b t \054 0 0 boolin boolout - - c p f 0 -1 0 _null_ _null_ ));
+DATA(insert OID = 16 ( bool PGNSP PGUID 1 t b t \054 0 0 boolin boolout boolrecv boolsend c p f 0 -1 0 _null_ _null_ ));
DESCR("boolean, 'true'/'false'");
#define BOOLOID 16
DESCR("variable-length string, binary values escaped");
#define BYTEAOID 17
-DATA(insert OID = 18 ( char PGNSP PGUID 1 t b t \054 0 0 charin charout - - c p f 0 -1 0 _null_ _null_ ));
+DATA(insert OID = 18 ( char PGNSP PGUID 1 t b t \054 0 0 charin charout charrecv charsend c p f 0 -1 0 _null_ _null_ ));
DESCR("single character");
#define CHAROID 18
DESCR("-2 billion to 2 billion integer, 4-byte storage");
#define INT4OID 23
-DATA(insert OID = 24 ( regproc PGNSP PGUID 4 t b t \054 0 0 regprocin regprocout - - i p f 0 -1 0 _null_ _null_ ));
+DATA(insert OID = 24 ( regproc PGNSP PGUID 4 t b t \054 0 0 regprocin regprocout regprocrecv regprocsend i p f 0 -1 0 _null_ _null_ ));
DESCR("registered procedure");
#define REGPROCOID 24
DESCR("object identifier(oid), maximum 4 billion");
#define OIDOID 26
-DATA(insert OID = 27 ( tid PGNSP PGUID 6 f b t \054 0 0 tidin tidout - - i p f 0 -1 0 _null_ _null_ ));
+DATA(insert OID = 27 ( tid PGNSP PGUID 6 f b t \054 0 0 tidin tidout tidrecv tidsend i p f 0 -1 0 _null_ _null_ ));
DESCR("(Block, offset), physical location of tuple");
#define TIDOID 27
-DATA(insert OID = 28 ( xid PGNSP PGUID 4 t b t \054 0 0 xidin xidout - - i p f 0 -1 0 _null_ _null_ ));
+DATA(insert OID = 28 ( xid PGNSP PGUID 4 t b t \054 0 0 xidin xidout xidrecv xidsend i p f 0 -1 0 _null_ _null_ ));
DESCR("transaction id");
#define XIDOID 28
-DATA(insert OID = 29 ( cid PGNSP PGUID 4 t b t \054 0 0 cidin cidout - - i p f 0 -1 0 _null_ _null_ ));
+DATA(insert OID = 29 ( cid PGNSP PGUID 4 t b t \054 0 0 cidin cidout cidrecv cidsend i p f 0 -1 0 _null_ _null_ ));
DESCR("command identifier type, sequence in transaction id");
#define CIDOID 29
DATA(insert OID = 701 ( float8 PGNSP PGUID 8 f b t \054 0 0 float8in float8out float8recv float8send d p f 0 -1 0 _null_ _null_ ));
DESCR("double-precision floating point number, 8-byte storage");
#define FLOAT8OID 701
-DATA(insert OID = 702 ( abstime PGNSP PGUID 4 t b t \054 0 0 nabstimein nabstimeout - - i p f 0 -1 0 _null_ _null_ ));
+DATA(insert OID = 702 ( abstime PGNSP PGUID 4 t b t \054 0 0 abstimein abstimeout abstimerecv abstimesend i p f 0 -1 0 _null_ _null_ ));
DESCR("absolute, limited-range date and time (Unix system time)");
#define ABSTIMEOID 702
-DATA(insert OID = 703 ( reltime PGNSP PGUID 4 t b t \054 0 0 reltimein reltimeout - - i p f 0 -1 0 _null_ _null_ ));
+DATA(insert OID = 703 ( reltime PGNSP PGUID 4 t b t \054 0 0 reltimein reltimeout reltimerecv reltimesend i p f 0 -1 0 _null_ _null_ ));
DESCR("relative, limited-range time interval (Unix delta time)");
#define RELTIMEOID 703
-DATA(insert OID = 704 ( tinterval PGNSP PGUID 12 f b t \054 0 0 tintervalin tintervalout - - i p f 0 -1 0 _null_ _null_ ));
+DATA(insert OID = 704 ( tinterval PGNSP PGUID 12 f b t \054 0 0 tintervalin tintervalout tintervalrecv tintervalsend i p f 0 -1 0 _null_ _null_ ));
DESCR("(abstime,abstime), time interval");
#define TINTERVALOID 704
DATA(insert OID = 705 ( unknown PGNSP PGUID -1 f b t \054 0 0 unknownin unknownout unknownrecv unknownsend i p f 0 -1 0 _null_ _null_ ));
DATA(insert OID = 1040 ( _macaddr PGNSP PGUID -1 f b t \054 0 829 array_in array_out array_recv array_send i x f 0 -1 0 _null_ _null_ ));
DATA(insert OID = 1041 ( _inet PGNSP PGUID -1 f b t \054 0 869 array_in array_out array_recv array_send i x f 0 -1 0 _null_ _null_ ));
DATA(insert OID = 651 ( _cidr PGNSP PGUID -1 f b t \054 0 650 array_in array_out array_recv array_send i x f 0 -1 0 _null_ _null_ ));
-DATA(insert OID = 1042 ( bpchar PGNSP PGUID -1 f b t \054 0 0 bpcharin bpcharout - - i x f 0 -1 0 _null_ _null_ ));
+DATA(insert OID = 1042 ( bpchar PGNSP PGUID -1 f b t \054 0 0 bpcharin bpcharout bpcharrecv bpcharsend i x f 0 -1 0 _null_ _null_ ));
DESCR("char(length), blank-padded string, fixed storage length");
#define BPCHAROID 1042
-DATA(insert OID = 1043 ( varchar PGNSP PGUID -1 f b t \054 0 0 varcharin varcharout - - i x f 0 -1 0 _null_ _null_ ));
+DATA(insert OID = 1043 ( varchar PGNSP PGUID -1 f b t \054 0 0 varcharin varcharout varcharrecv varcharsend i x f 0 -1 0 _null_ _null_ ));
DESCR("varchar(length), non-blank-padded string, variable storage length");
#define VARCHAROID 1043
-DATA(insert OID = 1082 ( date PGNSP PGUID 4 t b t \054 0 0 date_in date_out - - i p f 0 -1 0 _null_ _null_ ));
+DATA(insert OID = 1082 ( date PGNSP PGUID 4 t b t \054 0 0 date_in date_out date_recv date_send i p f 0 -1 0 _null_ _null_ ));
DESCR("ANSI SQL date");
#define DATEOID 1082
-DATA(insert OID = 1083 ( time PGNSP PGUID 8 f b t \054 0 0 time_in time_out - - d p f 0 -1 0 _null_ _null_ ));
+DATA(insert OID = 1083 ( time PGNSP PGUID 8 f b t \054 0 0 time_in time_out time_recv time_send d p f 0 -1 0 _null_ _null_ ));
DESCR("hh:mm:ss, ANSI SQL time");
#define TIMEOID 1083
/* OIDS 1100 - 1199 */
-DATA(insert OID = 1114 ( timestamp PGNSP PGUID 8 f b t \054 0 0 timestamp_in timestamp_out - - d p f 0 -1 0 _null_ _null_ ));
+DATA(insert OID = 1114 ( timestamp PGNSP PGUID 8 f b t \054 0 0 timestamp_in timestamp_out timestamp_recv timestamp_send d p f 0 -1 0 _null_ _null_ ));
DESCR("date and time");
#define TIMESTAMPOID 1114
DATA(insert OID = 1115 ( _timestamp PGNSP PGUID -1 f b t \054 0 1114 array_in array_out array_recv array_send d x f 0 -1 0 _null_ _null_ ));
DATA(insert OID = 1182 ( _date PGNSP PGUID -1 f b t \054 0 1082 array_in array_out array_recv array_send i x f 0 -1 0 _null_ _null_ ));
DATA(insert OID = 1183 ( _time PGNSP PGUID -1 f b t \054 0 1083 array_in array_out array_recv array_send d x f 0 -1 0 _null_ _null_ ));
-DATA(insert OID = 1184 ( timestamptz PGNSP PGUID 8 f b t \054 0 0 timestamptz_in timestamptz_out - - d p f 0 -1 0 _null_ _null_ ));
+DATA(insert OID = 1184 ( timestamptz PGNSP PGUID 8 f b t \054 0 0 timestamptz_in timestamptz_out timestamptz_recv timestamptz_send d p f 0 -1 0 _null_ _null_ ));
DESCR("date and time with time zone");
#define TIMESTAMPTZOID 1184
DATA(insert OID = 1185 ( _timestamptz PGNSP PGUID -1 f b t \054 0 1184 array_in array_out array_recv array_send d x f 0 -1 0 _null_ _null_ ));
-DATA(insert OID = 1186 ( interval PGNSP PGUID 12 f b t \054 0 0 interval_in interval_out - - d p f 0 -1 0 _null_ _null_ ));
+DATA(insert OID = 1186 ( interval PGNSP PGUID 12 f b t \054 0 0 interval_in interval_out interval_recv interval_send d p f 0 -1 0 _null_ _null_ ));
DESCR("@ <number> <units>, time interval");
#define INTERVALOID 1186
DATA(insert OID = 1187 ( _interval PGNSP PGUID -1 f b t \054 0 1186 array_in array_out array_recv array_send d x f 0 -1 0 _null_ _null_ ));
/* OIDS 1200 - 1299 */
DATA(insert OID = 1231 ( _numeric PGNSP PGUID -1 f b t \054 0 1700 array_in array_out array_recv array_send i x f 0 -1 0 _null_ _null_ ));
-DATA(insert OID = 1266 ( timetz PGNSP PGUID 12 f b t \054 0 0 timetz_in timetz_out - - d p f 0 -1 0 _null_ _null_ ));
+DATA(insert OID = 1266 ( timetz PGNSP PGUID 12 f b t \054 0 0 timetz_in timetz_out timetz_recv timetz_send d p f 0 -1 0 _null_ _null_ ));
DESCR("hh:mm:ss, ANSI SQL time");
#define TIMETZOID 1266
DATA(insert OID = 1270 ( _timetz PGNSP PGUID -1 f b t \054 0 1266 array_in array_out array_recv array_send d x f 0 -1 0 _null_ _null_ ));
/* OIDS 1500 - 1599 */
-DATA(insert OID = 1560 ( bit PGNSP PGUID -1 f b t \054 0 0 bit_in bit_out - - i x f 0 -1 0 _null_ _null_ ));
+DATA(insert OID = 1560 ( bit PGNSP PGUID -1 f b t \054 0 0 bit_in bit_out bit_recv bit_send i x f 0 -1 0 _null_ _null_ ));
DESCR("fixed-length bit string");
#define BITOID 1560
DATA(insert OID = 1561 ( _bit PGNSP PGUID -1 f b t \054 0 1560 array_in array_out array_recv array_send i x f 0 -1 0 _null_ _null_ ));
-DATA(insert OID = 1562 ( varbit PGNSP PGUID -1 f b t \054 0 0 varbit_in varbit_out - - i x f 0 -1 0 _null_ _null_ ));
+DATA(insert OID = 1562 ( varbit PGNSP PGUID -1 f b t \054 0 0 varbit_in varbit_out varbit_recv varbit_send i x f 0 -1 0 _null_ _null_ ));
DESCR("variable-length bit string");
#define VARBITOID 1562
DATA(insert OID = 1563 ( _varbit PGNSP PGUID -1 f b t \054 0 1562 array_in array_out array_recv array_send i x f 0 -1 0 _null_ _null_ ));
/* OIDS 1600 - 1699 */
/* OIDS 1700 - 1799 */
-DATA(insert OID = 1700 ( numeric PGNSP PGUID -1 f b t \054 0 0 numeric_in numeric_out - - i m f 0 -1 0 _null_ _null_ ));
+DATA(insert OID = 1700 ( numeric PGNSP PGUID -1 f b t \054 0 0 numeric_in numeric_out numeric_recv numeric_send i m f 0 -1 0 _null_ _null_ ));
DESCR("numeric(precision, decimal), arbitrary precision number");
#define NUMERICOID 1700
/* OIDS 2200 - 2299 */
DATA(insert OID = 2201 ( _refcursor PGNSP PGUID -1 f b t \054 0 1790 array_in array_out array_recv array_send i x f 0 -1 0 _null_ _null_ ));
-DATA(insert OID = 2202 ( regprocedure PGNSP PGUID 4 t b t \054 0 0 regprocedurein regprocedureout - - i p f 0 -1 0 _null_ _null_ ));
+DATA(insert OID = 2202 ( regprocedure PGNSP PGUID 4 t b t \054 0 0 regprocedurein regprocedureout regprocedurerecv regproceduresend i p f 0 -1 0 _null_ _null_ ));
DESCR("registered procedure (with args)");
#define REGPROCEDUREOID 2202
-DATA(insert OID = 2203 ( regoper PGNSP PGUID 4 t b t \054 0 0 regoperin regoperout - - i p f 0 -1 0 _null_ _null_ ));
+DATA(insert OID = 2203 ( regoper PGNSP PGUID 4 t b t \054 0 0 regoperin regoperout regoperrecv regopersend i p f 0 -1 0 _null_ _null_ ));
DESCR("registered operator");
#define REGOPEROID 2203
-DATA(insert OID = 2204 ( regoperator PGNSP PGUID 4 t b t \054 0 0 regoperatorin regoperatorout - - i p f 0 -1 0 _null_ _null_ ));
+DATA(insert OID = 2204 ( regoperator PGNSP PGUID 4 t b t \054 0 0 regoperatorin regoperatorout regoperatorrecv regoperatorsend i p f 0 -1 0 _null_ _null_ ));
DESCR("registered operator (with args)");
#define REGOPERATOROID 2204
-DATA(insert OID = 2205 ( regclass PGNSP PGUID 4 t b t \054 0 0 regclassin regclassout - - i p f 0 -1 0 _null_ _null_ ));
+DATA(insert OID = 2205 ( regclass PGNSP PGUID 4 t b t \054 0 0 regclassin regclassout regclassrecv regclasssend i p f 0 -1 0 _null_ _null_ ));
DESCR("registered class");
#define REGCLASSOID 2205
-DATA(insert OID = 2206 ( regtype PGNSP PGUID 4 t b t \054 0 0 regtypein regtypeout - - i p f 0 -1 0 _null_ _null_ ));
+DATA(insert OID = 2206 ( regtype PGNSP PGUID 4 t b t \054 0 0 regtypein regtypeout regtyperecv regtypesend i p f 0 -1 0 _null_ _null_ ));
DESCR("registered type");
#define REGTYPEOID 2206
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: builtins.h,v 1.214 2003/05/09 21:19:50 tgl Exp $
+ * $Id: builtins.h,v 1.215 2003/05/12 23:08:51 tgl Exp $
*
*-------------------------------------------------------------------------
*/
/* bool.c */
extern Datum boolin(PG_FUNCTION_ARGS);
extern Datum boolout(PG_FUNCTION_ARGS);
+extern Datum boolrecv(PG_FUNCTION_ARGS);
+extern Datum boolsend(PG_FUNCTION_ARGS);
extern Datum booleq(PG_FUNCTION_ARGS);
extern Datum boolne(PG_FUNCTION_ARGS);
extern Datum boollt(PG_FUNCTION_ARGS);
/* char.c */
extern Datum charin(PG_FUNCTION_ARGS);
extern Datum charout(PG_FUNCTION_ARGS);
+extern Datum charrecv(PG_FUNCTION_ARGS);
+extern Datum charsend(PG_FUNCTION_ARGS);
extern Datum chareq(PG_FUNCTION_ARGS);
extern Datum charne(PG_FUNCTION_ARGS);
extern Datum charlt(PG_FUNCTION_ARGS);
extern Datum chardiv(PG_FUNCTION_ARGS);
extern Datum text_char(PG_FUNCTION_ARGS);
extern Datum char_text(PG_FUNCTION_ARGS);
-extern Datum cidin(PG_FUNCTION_ARGS);
-extern Datum cidout(PG_FUNCTION_ARGS);
-extern Datum cideq(PG_FUNCTION_ARGS);
/* int.c */
extern Datum int2in(PG_FUNCTION_ARGS);
/* regproc.c */
extern Datum regprocin(PG_FUNCTION_ARGS);
extern Datum regprocout(PG_FUNCTION_ARGS);
+extern Datum regprocrecv(PG_FUNCTION_ARGS);
+extern Datum regprocsend(PG_FUNCTION_ARGS);
extern Datum regprocedurein(PG_FUNCTION_ARGS);
extern Datum regprocedureout(PG_FUNCTION_ARGS);
+extern Datum regprocedurerecv(PG_FUNCTION_ARGS);
+extern Datum regproceduresend(PG_FUNCTION_ARGS);
extern Datum regoperin(PG_FUNCTION_ARGS);
extern Datum regoperout(PG_FUNCTION_ARGS);
+extern Datum regoperrecv(PG_FUNCTION_ARGS);
+extern Datum regopersend(PG_FUNCTION_ARGS);
extern Datum regoperatorin(PG_FUNCTION_ARGS);
extern Datum regoperatorout(PG_FUNCTION_ARGS);
+extern Datum regoperatorrecv(PG_FUNCTION_ARGS);
+extern Datum regoperatorsend(PG_FUNCTION_ARGS);
extern Datum regclassin(PG_FUNCTION_ARGS);
extern Datum regclassout(PG_FUNCTION_ARGS);
+extern Datum regclassrecv(PG_FUNCTION_ARGS);
+extern Datum regclasssend(PG_FUNCTION_ARGS);
extern Datum regtypein(PG_FUNCTION_ARGS);
extern Datum regtypeout(PG_FUNCTION_ARGS);
+extern Datum regtyperecv(PG_FUNCTION_ARGS);
+extern Datum regtypesend(PG_FUNCTION_ARGS);
extern List *stringToQualifiedNameList(const char *string, const char *caller);
extern char *format_procedure(Oid procedure_oid);
extern char *format_operator(Oid operator_oid);
const char *ident);
/* tid.c */
-extern void setLastTid(const ItemPointer tid);
extern Datum tidin(PG_FUNCTION_ARGS);
extern Datum tidout(PG_FUNCTION_ARGS);
+extern Datum tidrecv(PG_FUNCTION_ARGS);
+extern Datum tidsend(PG_FUNCTION_ARGS);
extern Datum tideq(PG_FUNCTION_ARGS);
extern Datum currtid_byreloid(PG_FUNCTION_ARGS);
extern Datum currtid_byrelname(PG_FUNCTION_ARGS);
+extern void setLastTid(const ItemPointer tid);
/* varchar.c */
extern Datum bpcharin(PG_FUNCTION_ARGS);
extern Datum bpcharout(PG_FUNCTION_ARGS);
+extern Datum bpcharrecv(PG_FUNCTION_ARGS);
+extern Datum bpcharsend(PG_FUNCTION_ARGS);
extern Datum bpchar(PG_FUNCTION_ARGS);
extern Datum char_bpchar(PG_FUNCTION_ARGS);
extern Datum name_bpchar(PG_FUNCTION_ARGS);
extern Datum varcharin(PG_FUNCTION_ARGS);
extern Datum varcharout(PG_FUNCTION_ARGS);
+extern Datum varcharrecv(PG_FUNCTION_ARGS);
+extern Datum varcharsend(PG_FUNCTION_ARGS);
extern Datum varchar(PG_FUNCTION_ARGS);
extern Datum varchareq(PG_FUNCTION_ARGS);
extern Datum varcharne(PG_FUNCTION_ARGS);
/* version.c */
extern Datum pgsql_version(PG_FUNCTION_ARGS);
+/* xid.c */
+extern Datum xidin(PG_FUNCTION_ARGS);
+extern Datum xidout(PG_FUNCTION_ARGS);
+extern Datum xidrecv(PG_FUNCTION_ARGS);
+extern Datum xidsend(PG_FUNCTION_ARGS);
+extern Datum xideq(PG_FUNCTION_ARGS);
+extern Datum xid_age(PG_FUNCTION_ARGS);
+extern Datum cidin(PG_FUNCTION_ARGS);
+extern Datum cidout(PG_FUNCTION_ARGS);
+extern Datum cidrecv(PG_FUNCTION_ARGS);
+extern Datum cidsend(PG_FUNCTION_ARGS);
+extern Datum cideq(PG_FUNCTION_ARGS);
+
/* like.c */
extern Datum namelike(PG_FUNCTION_ARGS);
extern Datum namenlike(PG_FUNCTION_ARGS);
/* numeric.c */
extern Datum numeric_in(PG_FUNCTION_ARGS);
extern Datum numeric_out(PG_FUNCTION_ARGS);
+extern Datum numeric_recv(PG_FUNCTION_ARGS);
+extern Datum numeric_send(PG_FUNCTION_ARGS);
extern Datum numeric(PG_FUNCTION_ARGS);
extern Datum numeric_abs(PG_FUNCTION_ARGS);
extern Datum numeric_uminus(PG_FUNCTION_ARGS);
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: date.h,v 1.22 2003/01/29 01:08:42 tgl Exp $
+ * $Id: date.h,v 1.23 2003/05/12 23:08:51 tgl Exp $
*
*-------------------------------------------------------------------------
*/
/* date.c */
extern Datum date_in(PG_FUNCTION_ARGS);
extern Datum date_out(PG_FUNCTION_ARGS);
+extern Datum date_recv(PG_FUNCTION_ARGS);
+extern Datum date_send(PG_FUNCTION_ARGS);
extern Datum date_eq(PG_FUNCTION_ARGS);
extern Datum date_ne(PG_FUNCTION_ARGS);
extern Datum date_lt(PG_FUNCTION_ARGS);
extern Datum time_in(PG_FUNCTION_ARGS);
extern Datum time_out(PG_FUNCTION_ARGS);
+extern Datum time_recv(PG_FUNCTION_ARGS);
+extern Datum time_send(PG_FUNCTION_ARGS);
extern Datum time_scale(PG_FUNCTION_ARGS);
extern Datum time_eq(PG_FUNCTION_ARGS);
extern Datum time_ne(PG_FUNCTION_ARGS);
extern Datum timetz_in(PG_FUNCTION_ARGS);
extern Datum timetz_out(PG_FUNCTION_ARGS);
+extern Datum timetz_recv(PG_FUNCTION_ARGS);
+extern Datum timetz_send(PG_FUNCTION_ARGS);
extern Datum timetz_scale(PG_FUNCTION_ARGS);
extern Datum timetz_eq(PG_FUNCTION_ARGS);
extern Datum timetz_ne(PG_FUNCTION_ARGS);
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: nabstime.h,v 1.38 2003/04/04 04:50:44 tgl Exp $
+ * $Id: nabstime.h,v 1.39 2003/05/12 23:08:52 tgl Exp $
*
*-------------------------------------------------------------------------
*/
/*
* nabstime.c prototypes
*/
-extern Datum nabstimein(PG_FUNCTION_ARGS);
-extern Datum nabstimeout(PG_FUNCTION_ARGS);
+extern Datum abstimein(PG_FUNCTION_ARGS);
+extern Datum abstimeout(PG_FUNCTION_ARGS);
+extern Datum abstimerecv(PG_FUNCTION_ARGS);
+extern Datum abstimesend(PG_FUNCTION_ARGS);
extern Datum abstimeeq(PG_FUNCTION_ARGS);
extern Datum abstimene(PG_FUNCTION_ARGS);
extern Datum reltimein(PG_FUNCTION_ARGS);
extern Datum reltimeout(PG_FUNCTION_ARGS);
+extern Datum reltimerecv(PG_FUNCTION_ARGS);
+extern Datum reltimesend(PG_FUNCTION_ARGS);
extern Datum tintervalin(PG_FUNCTION_ARGS);
extern Datum tintervalout(PG_FUNCTION_ARGS);
+extern Datum tintervalrecv(PG_FUNCTION_ARGS);
+extern Datum tintervalsend(PG_FUNCTION_ARGS);
extern Datum interval_reltime(PG_FUNCTION_ARGS);
extern Datum reltime_interval(PG_FUNCTION_ARGS);
extern Datum mktinterval(PG_FUNCTION_ARGS);
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: timestamp.h,v 1.29 2002/09/04 20:31:46 momjian Exp $
+ * $Id: timestamp.h,v 1.30 2003/05/12 23:08:52 tgl Exp $
*
*-------------------------------------------------------------------------
*/
extern Datum timestamp_in(PG_FUNCTION_ARGS);
extern Datum timestamp_out(PG_FUNCTION_ARGS);
+extern Datum timestamp_recv(PG_FUNCTION_ARGS);
+extern Datum timestamp_send(PG_FUNCTION_ARGS);
extern Datum timestamp_scale(PG_FUNCTION_ARGS);
extern Datum timestamp_eq(PG_FUNCTION_ARGS);
extern Datum timestamp_ne(PG_FUNCTION_ARGS);
extern Datum interval_in(PG_FUNCTION_ARGS);
extern Datum interval_out(PG_FUNCTION_ARGS);
+extern Datum interval_recv(PG_FUNCTION_ARGS);
+extern Datum interval_send(PG_FUNCTION_ARGS);
extern Datum interval_scale(PG_FUNCTION_ARGS);
extern Datum interval_eq(PG_FUNCTION_ARGS);
extern Datum interval_ne(PG_FUNCTION_ARGS);
extern Datum timestamptz_in(PG_FUNCTION_ARGS);
extern Datum timestamptz_out(PG_FUNCTION_ARGS);
+extern Datum timestamptz_recv(PG_FUNCTION_ARGS);
+extern Datum timestamptz_send(PG_FUNCTION_ARGS);
extern Datum timestamptz_scale(PG_FUNCTION_ARGS);
extern Datum timestamptz_timestamp(PG_FUNCTION_ARGS);
extern Datum timestamptz_zone(PG_FUNCTION_ARGS);
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: varbit.h,v 1.16 2002/09/18 21:35:25 tgl Exp $
+ * $Id: varbit.h,v 1.17 2003/05/12 23:08:52 tgl Exp $
*
*-------------------------------------------------------------------------
*/
extern Datum bit_in(PG_FUNCTION_ARGS);
extern Datum bit_out(PG_FUNCTION_ARGS);
+extern Datum bit_recv(PG_FUNCTION_ARGS);
+extern Datum bit_send(PG_FUNCTION_ARGS);
extern Datum varbit_in(PG_FUNCTION_ARGS);
extern Datum varbit_out(PG_FUNCTION_ARGS);
+extern Datum varbit_recv(PG_FUNCTION_ARGS);
+extern Datum varbit_send(PG_FUNCTION_ARGS);
extern Datum bit(PG_FUNCTION_ARGS);
extern Datum varbit(PG_FUNCTION_ARGS);
extern Datum biteq(PG_FUNCTION_ARGS);