1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-03 20:02:46 +03:00

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.
This commit is contained in:
Tom Lane
2003-05-12 23:08:52 +00:00
parent b02832719c
commit 30f609484d
25 changed files with 1133 additions and 216 deletions

View File

@ -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.