diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-05-12 23:08:52 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-05-12 23:08:52 +0000 |
commit | 30f609484d025bfb7c69f8f6b9610dc981cb5fb8 (patch) | |
tree | 479152f5d7605284dfecb779eadaf0e254723815 /src/backend/utils/adt/varchar.c | |
parent | b02832719ce9926fe5a1c9b7e03cebf3dbf6a653 (diff) | |
download | postgresql-30f609484d025bfb7c69f8f6b9610dc981cb5fb8.tar.gz postgresql-30f609484d025bfb7c69f8f6b9610dc981cb5fb8.zip |
Add binary I/O routines for a bunch more datatypes. Still a few to go,
but that was enough tedium for one day. Along the way, move the few
support routines for types xid and cid into a more logical place.
Diffstat (limited to 'src/backend/utils/adt/varchar.c')
-rw-r--r-- | src/backend/utils/adt/varchar.c | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/src/backend/utils/adt/varchar.c b/src/backend/utils/adt/varchar.c index 03579f437b6..77fb26a4807 100644 --- a/src/backend/utils/adt/varchar.c +++ b/src/backend/utils/adt/varchar.c @@ -8,7 +8,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -163,6 +163,26 @@ bpcharout(PG_FUNCTION_ARGS) 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. @@ -405,6 +425,26 @@ varcharout(PG_FUNCTION_ARGS) 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. |