aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/int.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-08-22 00:01:51 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-08-22 00:01:51 +0000
commitb663f3443ba096a06970214c3e83e79f6e570b84 (patch)
tree049e26c1b02535c12bee6e60ba89cf1d42a41a72 /src/backend/utils/adt/int.c
parent606c9b9d4fafe9300d039c044edc9727c0ed43c9 (diff)
downloadpostgresql-b663f3443ba096a06970214c3e83e79f6e570b84.tar.gz
postgresql-b663f3443ba096a06970214c3e83e79f6e570b84.zip
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 ...
Diffstat (limited to 'src/backend/utils/adt/int.c')
-rw-r--r--src/backend/utils/adt/int.c55
1 files changed, 1 insertions, 54 deletions
diff --git a/src/backend/utils/adt/int.c b/src/backend/utils/adt/int.c
index c228e85ae8e..859e78b58cb 100644
--- a/src/backend/utils/adt/int.c
+++ b/src/backend/utils/adt/int.c
@@ -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 *