1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-12 05:01:15 +03:00

Add a bunch of pseudo-types to replace the behavior formerly associated

with OPAQUE, as per recent pghackers discussion.  I still want to do some
more work on the 'cstring' pseudo-type, but I'm going to commit the bulk
of the changes now before the tree starts shifting under me ...
This commit is contained in:
Tom Lane
2002-08-22 00:01:51 +00:00
parent 606c9b9d4f
commit b663f3443b
126 changed files with 2005 additions and 1205 deletions

View File

@@ -1,7 +1,7 @@
#
# Makefile for utils/adt
#
# $Header: /cvsroot/pgsql/src/backend/utils/adt/Makefile,v 1.52 2002/08/17 13:04:15 momjian Exp $
# $Header: /cvsroot/pgsql/src/backend/utils/adt/Makefile,v 1.53 2002/08/22 00:01:43 tgl Exp $
#
subdir = src/backend/utils/adt
@@ -19,7 +19,7 @@ OBJS = acl.o arrayfuncs.o arrayutils.o bool.o cash.o char.o \
date.o datetime.o datum.o float.o format_type.o \
geo_ops.o geo_selfuncs.o int.o int8.o like.o lockfuncs.o \
misc.o nabstime.o name.o not_in.o numeric.o numutils.o \
oid.o oracle_compat.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 \
network.o mac.o inet_net_ntop.o inet_net_pton.o \

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.51 2002/06/20 20:29:37 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.52 2002/08/22 00:01:43 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -144,59 +144,6 @@ int2vectoreq(PG_FUNCTION_ARGS)
PG_RETURN_BOOL(memcmp(arg1, arg2, INDEX_MAX_KEYS * sizeof(int16)) == 0);
}
/*
* Type int44 has no real-world use, but the regression tests use it.
* It's a four-element vector of int4's.
*/
/*
* int44in - converts "num num ..." to internal form
*
* Note: Fills any missing positions with zeroes.
*/
Datum
int44in(PG_FUNCTION_ARGS)
{
char *input_string = PG_GETARG_CSTRING(0);
int32 *result = (int32 *) palloc(4 * sizeof(int32));
int i;
i = sscanf(input_string,
"%d, %d, %d, %d",
&result[0],
&result[1],
&result[2],
&result[3]);
while (i < 4)
result[i++] = 0;
PG_RETURN_POINTER(result);
}
/*
* int44out - converts internal form to "num num ..."
*/
Datum
int44out(PG_FUNCTION_ARGS)
{
int32 *an_array = (int32 *) PG_GETARG_POINTER(0);
char *result = (char *) palloc(16 * 4); /* Allow 14 digits +
* sign */
int i;
char *walk;
walk = result;
for (i = 0; i < 4; i++)
{
pg_ltoa(an_array[i], walk);
while (*++walk != '\0')
;
*walk++ = ' ';
}
*--walk = '\0';
PG_RETURN_CSTRING(result);
}
/*****************************************************************************
* PUBLIC ROUTINES *

View File

@@ -0,0 +1,234 @@
/*-------------------------------------------------------------------------
*
* pseudotypes.c
* Functions for the system pseudo-types.
*
* A pseudo-type isn't really a type and never has any operations, but
* we do need to supply input and output functions to satisfy the links
* in the pseudo-type's entry in pg_type. In most cases the functions
* just throw an error if invoked. (XXX the error messages here cover
* the most common case, but might be confusing in some contexts. Can
* we do better?)
*
*
* 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/pseudotypes.c,v 1.1 2002/08/22 00:01:43 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
#include "utils/builtins.h"
/*
* record_in - input routine for pseudo-type RECORD.
*/
Datum
record_in(PG_FUNCTION_ARGS)
{
elog(ERROR, "Cannot accept a constant of type %s", "RECORD");
PG_RETURN_VOID(); /* keep compiler quiet */
}
/*
* record_out - output routine for pseudo-type RECORD.
*/
Datum
record_out(PG_FUNCTION_ARGS)
{
elog(ERROR, "Cannot display a value of type %s", "RECORD");
PG_RETURN_VOID(); /* keep compiler quiet */
}
/*
* cstring_in - input routine for pseudo-type CSTRING.
*/
Datum
cstring_in(PG_FUNCTION_ARGS)
{
elog(ERROR, "Cannot accept a constant of type %s", "CSTRING");
PG_RETURN_VOID(); /* keep compiler quiet */
}
/*
* cstring_out - output routine for pseudo-type CSTRING.
*/
Datum
cstring_out(PG_FUNCTION_ARGS)
{
elog(ERROR, "Cannot display a value of type %s", "CSTRING");
PG_RETURN_VOID(); /* keep compiler quiet */
}
/*
* any_in - input routine for pseudo-type ANY.
*/
Datum
any_in(PG_FUNCTION_ARGS)
{
elog(ERROR, "Cannot accept a constant of type %s", "ANY");
PG_RETURN_VOID(); /* keep compiler quiet */
}
/*
* any_out - output routine for pseudo-type ANY.
*/
Datum
any_out(PG_FUNCTION_ARGS)
{
elog(ERROR, "Cannot display a value of type %s", "ANY");
PG_RETURN_VOID(); /* keep compiler quiet */
}
/*
* anyarray_in - input routine for pseudo-type ANYARRAY.
*/
Datum
anyarray_in(PG_FUNCTION_ARGS)
{
elog(ERROR, "Cannot accept a constant of type %s", "ANYARRAY");
PG_RETURN_VOID(); /* keep compiler quiet */
}
/*
* anyarray_out - output routine for pseudo-type ANYARRAY.
*/
Datum
anyarray_out(PG_FUNCTION_ARGS)
{
elog(ERROR, "Cannot display a value of type %s", "ANYARRAY");
PG_RETURN_VOID(); /* keep compiler quiet */
}
/*
* void_in - input routine for pseudo-type VOID.
*
* We allow this so that PL functions can return VOID without any special
* hack in the PL handler. Whatever value the PL thinks it's returning
* will just be ignored.
*/
Datum
void_in(PG_FUNCTION_ARGS)
{
PG_RETURN_VOID(); /* you were expecting something different? */
}
/*
* void_out - output routine for pseudo-type VOID.
*
* We allow this so that "SELECT function_returning_void(...)" works.
*/
Datum
void_out(PG_FUNCTION_ARGS)
{
PG_RETURN_CSTRING(pstrdup(""));
}
/*
* trigger_in - input routine for pseudo-type TRIGGER.
*/
Datum
trigger_in(PG_FUNCTION_ARGS)
{
elog(ERROR, "Cannot accept a constant of type %s", "TRIGGER");
PG_RETURN_VOID(); /* keep compiler quiet */
}
/*
* trigger_out - output routine for pseudo-type TRIGGER.
*/
Datum
trigger_out(PG_FUNCTION_ARGS)
{
elog(ERROR, "Cannot display a value of type %s", "TRIGGER");
PG_RETURN_VOID(); /* keep compiler quiet */
}
/*
* language_handler_in - input routine for pseudo-type LANGUAGE_HANDLER.
*/
Datum
language_handler_in(PG_FUNCTION_ARGS)
{
elog(ERROR, "Cannot accept a constant of type %s", "LANGUAGE_HANDLER");
PG_RETURN_VOID(); /* keep compiler quiet */
}
/*
* language_handler_out - output routine for pseudo-type LANGUAGE_HANDLER.
*/
Datum
language_handler_out(PG_FUNCTION_ARGS)
{
elog(ERROR, "Cannot display a value of type %s", "LANGUAGE_HANDLER");
PG_RETURN_VOID(); /* keep compiler quiet */
}
/*
* internal_in - input routine for pseudo-type INTERNAL.
*/
Datum
internal_in(PG_FUNCTION_ARGS)
{
elog(ERROR, "Cannot accept a constant of type %s", "INTERNAL");
PG_RETURN_VOID(); /* keep compiler quiet */
}
/*
* internal_out - output routine for pseudo-type INTERNAL.
*/
Datum
internal_out(PG_FUNCTION_ARGS)
{
elog(ERROR, "Cannot display a value of type %s", "INTERNAL");
PG_RETURN_VOID(); /* keep compiler quiet */
}
/*
* opaque_in - input routine for pseudo-type OPAQUE.
*/
Datum
opaque_in(PG_FUNCTION_ARGS)
{
elog(ERROR, "Cannot accept a constant of type %s", "OPAQUE");
PG_RETURN_VOID(); /* keep compiler quiet */
}
/*
* opaque_out - output routine for pseudo-type OPAQUE.
*/
Datum
opaque_out(PG_FUNCTION_ARGS)
{
elog(ERROR, "Cannot display a value of type %s", "OPAQUE");
PG_RETURN_VOID(); /* keep compiler quiet */
}

View File

@@ -13,7 +13,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.72 2002/07/29 22:14:11 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.73 2002/08/22 00:01:43 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -38,7 +38,7 @@
#include "utils/syscache.h"
static void parseNameAndArgTypes(const char *string, const char *caller,
const char *type0_spelling,
bool allowNone,
List **names, int *nargs, Oid *argtypes);
@@ -260,7 +260,7 @@ regprocedurein(PG_FUNCTION_ARGS)
* datatype cannot be used for any system column that needs to receive
* data during bootstrap.
*/
parseNameAndArgTypes(pro_name_or_oid, "regprocedurein", "opaque",
parseNameAndArgTypes(pro_name_or_oid, "regprocedurein", false,
&names, &nargs, argtypes);
clist = FuncnameGetCandidates(names, nargs);
@@ -325,10 +325,7 @@ format_procedure(Oid procedure_oid)
if (i > 0)
appendStringInfoChar(&buf, ',');
if (OidIsValid(thisargtype))
appendStringInfo(&buf, "%s", format_type_be(thisargtype));
else
appendStringInfo(&buf, "opaque");
appendStringInfo(&buf, "%s", format_type_be(thisargtype));
}
appendStringInfoChar(&buf, ')');
@@ -584,7 +581,7 @@ regoperatorin(PG_FUNCTION_ARGS)
* datatype cannot be used for any system column that needs to receive
* data during bootstrap.
*/
parseNameAndArgTypes(opr_name_or_oid, "regoperatorin", "none",
parseNameAndArgTypes(opr_name_or_oid, "regoperatorin", true,
&names, &nargs, argtypes);
if (nargs == 1)
elog(ERROR, "regoperatorin: use NONE to denote the missing argument of a unary operator");
@@ -1036,12 +1033,12 @@ stringToQualifiedNameList(const char *string, const char *caller)
* the argtypes array should be of size FUNC_MAX_ARGS). The function or
* operator name is returned to *names as a List of Strings.
*
* If type0_spelling is not NULL, it is a name to be accepted as a
* placeholder for OID 0.
* If allowNone is TRUE, accept "NONE" and return it as InvalidOid (this is
* for unary operators).
*/
static void
parseNameAndArgTypes(const char *string, const char *caller,
const char *type0_spelling,
bool allowNone,
List **names, int *nargs, Oid *argtypes)
{
char *rawname;
@@ -1147,9 +1144,9 @@ parseNameAndArgTypes(const char *string, const char *caller,
*ptr2 = '\0';
}
if (type0_spelling && strcasecmp(typename, type0_spelling) == 0)
if (allowNone && strcasecmp(typename, "none") == 0)
{
/* Special case for OPAQUE or NONE */
/* Special case for NONE */
typeid = InvalidOid;
typmod = -1;
}

View File

@@ -15,7 +15,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.112 2002/06/20 20:29:38 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.113 2002/08/22 00:01:44 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -53,7 +53,7 @@
*
* This is represented at the SQL level (in pg_proc) as
*
* float8 oprrest (opaque, oid, opaque, int4);
* float8 oprrest (internal, oid, internal, int4);
*
* The call convention for a join estimator (oprjoin function) is similar
* except that varRelid is not needed:
@@ -62,7 +62,7 @@
* Oid operator,
* List *args);
*
* float8 oprjoin (opaque, oid, opaque);
* float8 oprjoin (internal, oid, internal);
*----------
*/

View File

@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.78 2002/08/05 02:30:50 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.79 2002/08/22 00:01:44 tgl Exp $
*
* NOTES
* Eventually, the index information should go through here, too.
@@ -1166,6 +1166,34 @@ get_typtype(Oid typid)
return '\0';
}
/*
* getTypeOutputInfo
*
* Get info needed for printing values of a type
*
* Returns true if data valid (a false result probably means it's a shell type)
*/
bool
getTypeOutputInfo(Oid type, Oid *typOutput, Oid *typElem,
bool *typIsVarlena)
{
HeapTuple typeTuple;
Form_pg_type pt;
typeTuple = SearchSysCache(TYPEOID,
ObjectIdGetDatum(type),
0, 0, 0);
if (!HeapTupleIsValid(typeTuple))
elog(ERROR, "getTypeOutputInfo: Cache lookup of type %u failed", type);
pt = (Form_pg_type) GETSTRUCT(typeTuple);
*typOutput = pt->typoutput;
*typElem = pt->typelem;
*typIsVarlena = (!pt->typbyval) && (pt->typlen == -1);
ReleaseSysCache(typeTuple);
return OidIsValid(*typOutput);
}
/* ---------- STATISTICS CACHE ---------- */

View File

@@ -4,7 +4,7 @@
# Makefile for utils/mb/conversion_procs
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/Makefile,v 1.4 2002/08/14 02:45:10 ishii Exp $
# $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/Makefile,v 1.5 2002/08/22 00:01:44 tgl Exp $
#
#-------------------------------------------------------------------------
@@ -153,7 +153,7 @@ $(SQLSCRIPT): Makefile
func=$$1; shift; \
obj=$$1; shift; \
echo "-- $$se --> $$de"; \
echo "CREATE OR REPLACE FUNCTION $$func (INTEGER, INTEGER, OPAQUE, OPAQUE, INTEGER) RETURNS INTEGER AS '$$"libdir"/$$obj', '$$func' LANGUAGE 'c';"; \
echo "CREATE OR REPLACE FUNCTION $$func (INTEGER, INTEGER, CSTRING, CSTRING, INTEGER) RETURNS VOID AS '$$"libdir"/$$obj', '$$func' LANGUAGE 'c';"; \
echo "DROP CONVERSION pg_catalog.$$name;"; \
echo "CREATE DEFAULT CONVERSION pg_catalog.$$name FOR '$$se' TO '$$de' FROM $$func;"; \
done > $@

View File

@@ -6,7 +6,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/ascii_and_mic/ascii_and_mic.c,v 1.1 2002/08/14 02:45:10 ishii Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/ascii_and_mic/ascii_and_mic.c,v 1.2 2002/08/22 00:01:44 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -25,10 +25,10 @@ extern Datum mic_to_ascii(PG_FUNCTION_ARGS);
* conv_proc(
* INTEGER, -- source encoding id
* INTEGER, -- destination encoding id
* OPAQUE, -- source string (null terminated C string)
* OPAQUE, -- destination string (null terminated C string)
* CSTRING, -- source string (null terminated C string)
* CSTRING, -- destination string (null terminated C string)
* INTEGER -- source string length
* ) returns INTEGER; -- dummy. returns nothing, actually.
* ) returns VOID;
* ----------
*/

View File

@@ -6,7 +6,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/cyrillic_and_mic/cyrillic_and_mic.c,v 1.1 2002/08/14 02:45:10 ishii Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/cyrillic_and_mic/cyrillic_and_mic.c,v 1.2 2002/08/22 00:01:44 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -63,10 +63,10 @@ extern Datum alt_to_iso(PG_FUNCTION_ARGS);
* conv_proc(
* INTEGER, -- source encoding id
* INTEGER, -- destination encoding id
* OPAQUE, -- source string (null terminated C string)
* OPAQUE, -- destination string (null terminated C string)
* CSTRING, -- source string (null terminated C string)
* CSTRING, -- destination string (null terminated C string)
* INTEGER -- source string length
* ) returns INTEGER; -- dummy. returns nothing, actually.
* ) returns VOID;
* ----------
*/

View File

@@ -6,7 +6,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/euc_cn_and_mic/euc_cn_and_mic.c,v 1.1 2002/08/14 02:45:10 ishii Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/euc_cn_and_mic/euc_cn_and_mic.c,v 1.2 2002/08/22 00:01:44 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -25,10 +25,10 @@ extern Datum mic_to_euc_cn(PG_FUNCTION_ARGS);
* conv_proc(
* INTEGER, -- source encoding id
* INTEGER, -- destination encoding id
* OPAQUE, -- source string (null terminated C string)
* OPAQUE, -- destination string (null terminated C string)
* CSTRING, -- source string (null terminated C string)
* CSTRING, -- destination string (null terminated C string)
* INTEGER -- source string length
* ) returns INTEGER; -- dummy. returns nothing, actually.
* ) returns VOID;
* ----------
*/

View File

@@ -6,7 +6,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/euc_jp_and_sjis/euc_jp_and_sjis.c,v 1.1 2002/07/16 09:25:05 ishii Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/euc_jp_and_sjis/euc_jp_and_sjis.c,v 1.2 2002/08/22 00:01:44 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -47,10 +47,10 @@ extern Datum mic_to_sjis(PG_FUNCTION_ARGS);
* conv_proc(
* INTEGER, -- source encoding id
* INTEGER, -- destination encoding id
* OPAQUE, -- source string (null terminated C string)
* OPAQUE, -- destination string (null terminated C string)
* CSTRING, -- source string (null terminated C string)
* CSTRING, -- destination string (null terminated C string)
* INTEGER -- source string length
* ) returns INTEGER; -- dummy. returns nothing, actually.
* ) returns VOID;
* ----------
*/

View File

@@ -6,7 +6,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/euc_kr_and_mic/euc_kr_and_mic.c,v 1.1 2002/08/14 02:45:10 ishii Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/euc_kr_and_mic/euc_kr_and_mic.c,v 1.2 2002/08/22 00:01:44 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -25,10 +25,10 @@ extern Datum mic_to_euc_kr(PG_FUNCTION_ARGS);
* conv_proc(
* INTEGER, -- source encoding id
* INTEGER, -- destination encoding id
* OPAQUE, -- source string (null terminated C string)
* OPAQUE, -- destination string (null terminated C string)
* CSTRING, -- source string (null terminated C string)
* CSTRING, -- destination string (null terminated C string)
* INTEGER -- source string length
* ) returns INTEGER; -- dummy. returns nothing, actually.
* ) returns VOID;
* ----------
*/

View File

@@ -6,7 +6,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/euc_tw_and_big5/euc_tw_and_big5.c,v 1.1 2002/07/16 09:25:05 ishii Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/euc_tw_and_big5/euc_tw_and_big5.c,v 1.2 2002/08/22 00:01:44 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -35,10 +35,10 @@ extern Datum mic_to_big5(PG_FUNCTION_ARGS);
* conv_proc(
* INTEGER, -- source encoding id
* INTEGER, -- destination encoding id
* OPAQUE, -- source string (null terminated C string)
* OPAQUE, -- destination string (null terminated C string)
* CSTRING, -- source string (null terminated C string)
* CSTRING, -- destination string (null terminated C string)
* INTEGER -- source string length
* ) returns INTEGER; -- dummy. returns nothing, actually.
* ) returns VOID;
* ----------
*/

View File

@@ -6,7 +6,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/latin2_and_win1250/latin2_and_win1250.c,v 1.1 2002/08/14 02:45:10 ishii Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/latin2_and_win1250/latin2_and_win1250.c,v 1.2 2002/08/22 00:01:44 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -35,10 +35,10 @@ extern Datum win1250_to_latin2(PG_FUNCTION_ARGS);
* conv_proc(
* INTEGER, -- source encoding id
* INTEGER, -- destination encoding id
* OPAQUE, -- source string (null terminated C string)
* OPAQUE, -- destination string (null terminated C string)
* CSTRING, -- source string (null terminated C string)
* CSTRING, -- destination string (null terminated C string)
* INTEGER -- source string length
* ) returns INTEGER; -- dummy. returns nothing, actually.
* ) returns VOID;
* ----------
*/

View File

@@ -6,7 +6,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/latin_and_mic/latin_and_mic.c,v 1.1 2002/08/14 02:45:10 ishii Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/latin_and_mic/latin_and_mic.c,v 1.2 2002/08/22 00:01:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -33,10 +33,10 @@ extern Datum mic_to_latin4(PG_FUNCTION_ARGS);
* conv_proc(
* INTEGER, -- source encoding id
* INTEGER, -- destination encoding id
* OPAQUE, -- source string (null terminated C string)
* OPAQUE, -- destination string (null terminated C string)
* CSTRING, -- source string (null terminated C string)
* CSTRING, -- destination string (null terminated C string)
* INTEGER -- source string length
* ) returns INTEGER; -- dummy. returns nothing, actually.
* ) returns VOID;
* ----------
*/

View File

@@ -6,7 +6,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_ascii/utf8_and_ascii.c,v 1.1 2002/07/16 09:25:05 ishii Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_ascii/utf8_and_ascii.c,v 1.2 2002/08/22 00:01:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -25,10 +25,10 @@ extern Datum utf8_to_ascii(PG_FUNCTION_ARGS);
* conv_proc(
* INTEGER, -- source encoding id
* INTEGER, -- destination encoding id
* OPAQUE, -- source string (null terminated C string)
* OPAQUE, -- destination string (null terminated C string)
* CSTRING, -- source string (null terminated C string)
* CSTRING, -- destination string (null terminated C string)
* INTEGER -- source string length
* ) returns INTEGER; -- dummy. returns nothing, actually.
* ) returns VOID;
* ----------
*/

View File

@@ -6,7 +6,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_big5/utf8_and_big5.c,v 1.1 2002/07/16 09:25:05 ishii Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_big5/utf8_and_big5.c,v 1.2 2002/08/22 00:01:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -27,10 +27,10 @@ extern Datum utf8_to_big5(PG_FUNCTION_ARGS);
* conv_proc(
* INTEGER, -- source encoding id
* INTEGER, -- destination encoding id
* OPAQUE, -- source string (null terminated C string)
* OPAQUE, -- destination string (null terminated C string)
* CSTRING, -- source string (null terminated C string)
* CSTRING, -- destination string (null terminated C string)
* INTEGER -- source string length
* ) returns INTEGER; -- dummy. returns nothing, actually.
* ) returns VOID;
* ----------
*/
Datum

View File

@@ -6,7 +6,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_cyrillic/utf8_and_cyrillic.c,v 1.1 2002/08/14 02:45:10 ishii Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_cyrillic/utf8_and_cyrillic.c,v 1.2 2002/08/22 00:01:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -39,10 +39,10 @@ extern Datum alt_to_utf8(PG_FUNCTION_ARGS);
* conv_proc(
* INTEGER, -- source encoding id
* INTEGER, -- destination encoding id
* OPAQUE, -- source string (null terminated C string)
* OPAQUE, -- destination string (null terminated C string)
* CSTRING, -- source string (null terminated C string)
* CSTRING, -- destination string (null terminated C string)
* INTEGER -- source string length
* ) returns INTEGER; -- dummy. returns nothing, actually.
* ) returns VOID;
* ----------
*/

View File

@@ -6,7 +6,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_euc_cn/utf8_and_euc_cn.c,v 1.1 2002/07/16 09:25:05 ishii Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_euc_cn/utf8_and_euc_cn.c,v 1.2 2002/08/22 00:01:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -27,10 +27,10 @@ extern Datum utf8_to_euc_cn(PG_FUNCTION_ARGS);
* conv_proc(
* INTEGER, -- source encoding id
* INTEGER, -- destination encoding id
* OPAQUE, -- source string (null terminated C string)
* OPAQUE, -- destination string (null terminated C string)
* CSTRING, -- source string (null terminated C string)
* CSTRING, -- destination string (null terminated C string)
* INTEGER -- source string length
* ) returns INTEGER; -- dummy. returns nothing, actually.
* ) returns VOID;
* ----------
*/
Datum

View File

@@ -6,7 +6,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_euc_jp/utf8_and_euc_jp.c,v 1.1 2002/07/16 09:25:05 ishii Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_euc_jp/utf8_and_euc_jp.c,v 1.2 2002/08/22 00:01:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -27,10 +27,10 @@ extern Datum utf8_to_euc_jp(PG_FUNCTION_ARGS);
* conv_proc(
* INTEGER, -- source encoding id
* INTEGER, -- destination encoding id
* OPAQUE, -- source string (null terminated C string)
* OPAQUE, -- destination string (null terminated C string)
* CSTRING, -- source string (null terminated C string)
* CSTRING, -- destination string (null terminated C string)
* INTEGER -- source string length
* ) returns INTEGER; -- dummy. returns nothing, actually.
* ) returns VOID;
* ----------
*/
Datum

View File

@@ -6,7 +6,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_euc_kr/utf8_and_euc_kr.c,v 1.1 2002/07/16 09:25:05 ishii Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_euc_kr/utf8_and_euc_kr.c,v 1.2 2002/08/22 00:01:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -27,10 +27,10 @@ extern Datum utf8_to_euc_kr(PG_FUNCTION_ARGS);
* conv_proc(
* INTEGER, -- source encoding id
* INTEGER, -- destination encoding id
* OPAQUE, -- source string (null terminated C string)
* OPAQUE, -- destination string (null terminated C string)
* CSTRING, -- source string (null terminated C string)
* CSTRING, -- destination string (null terminated C string)
* INTEGER -- source string length
* ) returns INTEGER; -- dummy. returns nothing, actually.
* ) returns VOID;
* ----------
*/
Datum

View File

@@ -6,7 +6,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_euc_tw/utf8_and_euc_tw.c,v 1.1 2002/07/16 09:25:05 ishii Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_euc_tw/utf8_and_euc_tw.c,v 1.2 2002/08/22 00:01:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -27,10 +27,10 @@ extern Datum utf8_to_euc_tw(PG_FUNCTION_ARGS);
* conv_proc(
* INTEGER, -- source encoding id
* INTEGER, -- destination encoding id
* OPAQUE, -- source string (null terminated C string)
* OPAQUE, -- destination string (null terminated C string)
* CSTRING, -- source string (null terminated C string)
* CSTRING, -- destination string (null terminated C string)
* INTEGER -- source string length
* ) returns INTEGER; -- dummy. returns nothing, actually.
* ) returns VOID;
* ----------
*/
Datum

View File

@@ -6,7 +6,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_gb18030/utf8_and_gb18030.c,v 1.1 2002/07/16 09:25:05 ishii Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_gb18030/utf8_and_gb18030.c,v 1.2 2002/08/22 00:01:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -27,10 +27,10 @@ extern Datum utf8_to_gb18030(PG_FUNCTION_ARGS);
* conv_proc(
* INTEGER, -- source encoding id
* INTEGER, -- destination encoding id
* OPAQUE, -- source string (null terminated C string)
* OPAQUE, -- destination string (null terminated C string)
* CSTRING, -- source string (null terminated C string)
* CSTRING, -- destination string (null terminated C string)
* INTEGER -- source string length
* ) returns INTEGER; -- dummy. returns nothing, actually.
* ) returns VOID;
* ----------
*/
Datum

View File

@@ -6,7 +6,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_gbk/utf8_and_gbk.c,v 1.1 2002/07/16 09:25:05 ishii Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_gbk/utf8_and_gbk.c,v 1.2 2002/08/22 00:01:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -27,10 +27,10 @@ extern Datum utf8_to_gbk(PG_FUNCTION_ARGS);
* conv_proc(
* INTEGER, -- source encoding id
* INTEGER, -- destination encoding id
* OPAQUE, -- source string (null terminated C string)
* OPAQUE, -- destination string (null terminated C string)
* CSTRING, -- source string (null terminated C string)
* CSTRING, -- destination string (null terminated C string)
* INTEGER -- source string length
* ) returns INTEGER; -- dummy. returns nothing, actually.
* ) returns VOID;
* ----------
*/
Datum

View File

@@ -6,7 +6,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_iso8859/utf8_and_iso8859.c,v 1.1 2002/07/16 09:25:05 ishii Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_iso8859/utf8_and_iso8859.c,v 1.2 2002/08/22 00:01:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -51,10 +51,10 @@ extern Datum utf8_to_iso8859(PG_FUNCTION_ARGS);
* conv_proc(
* INTEGER, -- source encoding id
* INTEGER, -- destination encoding id
* OPAQUE, -- source string (null terminated C string)
* OPAQUE, -- destination string (null terminated C string)
* CSTRING, -- source string (null terminated C string)
* CSTRING, -- destination string (null terminated C string)
* INTEGER -- source string length
* ) returns INTEGER; -- dummy. returns nothing, actually.
* ) returns VOID;
* ----------
*/

View File

@@ -6,7 +6,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_iso8859_1/utf8_and_iso8859_1.c,v 1.1 2002/07/16 09:25:05 ishii Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_iso8859_1/utf8_and_iso8859_1.c,v 1.2 2002/08/22 00:01:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -25,10 +25,10 @@ extern Datum utf8_to_iso8859_1(PG_FUNCTION_ARGS);
* conv_proc(
* INTEGER, -- source encoding id
* INTEGER, -- destination encoding id
* OPAQUE, -- source string (null terminated C string)
* OPAQUE, -- destination string (null terminated C string)
* CSTRING, -- source string (null terminated C string)
* CSTRING, -- destination string (null terminated C string)
* INTEGER -- source string length
* ) returns INTEGER; -- dummy. returns nothing, actually.
* ) returns VOID;
* ----------
*/

View File

@@ -6,7 +6,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_johab/utf8_and_johab.c,v 1.1 2002/07/16 09:25:06 ishii Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_johab/utf8_and_johab.c,v 1.2 2002/08/22 00:01:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -27,10 +27,10 @@ extern Datum utf8_to_johab(PG_FUNCTION_ARGS);
* conv_proc(
* INTEGER, -- source encoding id
* INTEGER, -- destination encoding id
* OPAQUE, -- source string (null terminated C string)
* OPAQUE, -- destination string (null terminated C string)
* CSTRING, -- source string (null terminated C string)
* CSTRING, -- destination string (null terminated C string)
* INTEGER -- source string length
* ) returns INTEGER; -- dummy. returns nothing, actually.
* ) returns VOID;
* ----------
*/
Datum

View File

@@ -6,7 +6,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_sjis/utf8_and_sjis.c,v 1.1 2002/07/16 09:25:06 ishii Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_sjis/utf8_and_sjis.c,v 1.2 2002/08/22 00:01:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -27,10 +27,10 @@ extern Datum utf8_to_sjis(PG_FUNCTION_ARGS);
* conv_proc(
* INTEGER, -- source encoding id
* INTEGER, -- destination encoding id
* OPAQUE, -- source string (null terminated C string)
* OPAQUE, -- destination string (null terminated C string)
* CSTRING, -- source string (null terminated C string)
* CSTRING, -- destination string (null terminated C string)
* INTEGER -- source string length
* ) returns INTEGER; -- dummy. returns nothing, actually.
* ) returns VOID;
* ----------
*/
Datum

View File

@@ -6,7 +6,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_tcvn/Attic/utf8_and_tcvn.c,v 1.1 2002/07/16 09:25:06 ishii Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_tcvn/Attic/utf8_and_tcvn.c,v 1.2 2002/08/22 00:01:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -27,10 +27,10 @@ extern Datum utf8_to_tcvn(PG_FUNCTION_ARGS);
* conv_proc(
* INTEGER, -- source encoding id
* INTEGER, -- destination encoding id
* OPAQUE, -- source string (null terminated C string)
* OPAQUE, -- destination string (null terminated C string)
* CSTRING, -- source string (null terminated C string)
* CSTRING, -- destination string (null terminated C string)
* INTEGER -- source string length
* ) returns INTEGER; -- dummy. returns nothing, actually.
* ) returns VOID;
* ----------
*/
Datum

View File

@@ -6,7 +6,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_uhc/utf8_and_uhc.c,v 1.1 2002/07/16 09:25:06 ishii Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_uhc/utf8_and_uhc.c,v 1.2 2002/08/22 00:01:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -27,10 +27,10 @@ extern Datum utf8_to_uhc(PG_FUNCTION_ARGS);
* conv_proc(
* INTEGER, -- source encoding id
* INTEGER, -- destination encoding id
* OPAQUE, -- source string (null terminated C string)
* OPAQUE, -- destination string (null terminated C string)
* CSTRING, -- source string (null terminated C string)
* CSTRING, -- destination string (null terminated C string)
* INTEGER -- source string length
* ) returns INTEGER; -- dummy. returns nothing, actually.
* ) returns VOID;
* ----------
*/
Datum

View File

@@ -6,7 +6,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_win1250/Attic/utf8_and_win1250.c,v 1.1 2002/08/14 02:45:10 ishii Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_win1250/Attic/utf8_and_win1250.c,v 1.2 2002/08/22 00:01:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -27,10 +27,10 @@ extern Datum win1250_to_utf(PG_FUNCTION_ARGS);
* conv_proc(
* INTEGER, -- source encoding id
* INTEGER, -- destination encoding id
* OPAQUE, -- source string (null terminated C string)
* OPAQUE, -- destination string (null terminated C string)
* CSTRING, -- source string (null terminated C string)
* CSTRING, -- destination string (null terminated C string)
* INTEGER -- source string length
* ) returns INTEGER; -- dummy. returns nothing, actually.
* ) returns VOID;
* ----------
*/

View File

@@ -6,7 +6,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_win1256/Attic/utf8_and_win1256.c,v 1.1 2002/08/14 02:45:10 ishii Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_win1256/Attic/utf8_and_win1256.c,v 1.2 2002/08/22 00:01:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -27,10 +27,10 @@ extern Datum win1256_to_utf(PG_FUNCTION_ARGS);
* conv_proc(
* INTEGER, -- source encoding id
* INTEGER, -- destination encoding id
* OPAQUE, -- source string (null terminated C string)
* OPAQUE, -- destination string (null terminated C string)
* CSTRING, -- source string (null terminated C string)
* CSTRING, -- destination string (null terminated C string)
* INTEGER -- source string length
* ) returns INTEGER; -- dummy. returns nothing, actually.
* ) returns VOID;
* ----------
*/

View File

@@ -6,7 +6,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_win874/Attic/utf8_and_win874.c,v 1.1 2002/08/14 02:45:10 ishii Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_win874/Attic/utf8_and_win874.c,v 1.2 2002/08/22 00:01:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -27,10 +27,10 @@ extern Datum win874_to_utf(PG_FUNCTION_ARGS);
* conv_proc(
* INTEGER, -- source encoding id
* INTEGER, -- destination encoding id
* OPAQUE, -- source string (null terminated C string)
* OPAQUE, -- destination string (null terminated C string)
* CSTRING, -- source string (null terminated C string)
* CSTRING, -- destination string (null terminated C string)
* INTEGER -- source string length
* ) returns INTEGER; -- dummy. returns nothing, actually.
* ) returns VOID;
* ----------
*/