From ba1e066e4637d64886b6ba12706b18ca35a6e258 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 9 May 2003 23:01:45 +0000 Subject: Implement array_send/array_recv (binary I/O for arrays). This exposed the folly of not passing element type to typsend/typreceive, so fix that. --- doc/src/sgml/ref/create_type.sgml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/ref/create_type.sgml b/doc/src/sgml/ref/create_type.sgml index 5fe4d2be4fc..2d2b92a85aa 100644 --- a/doc/src/sgml/ref/create_type.sgml +++ b/doc/src/sgml/ref/create_type.sgml @@ -1,5 +1,5 @@ @@ -117,15 +117,20 @@ CREATE TYPE typename ( representation is in the machine's native byte order.) The receive function should perform adequate checking to ensure that the value is valid. - The receive function should be declared as taking one argument of type - internal and returning a value of the data type itself. - (The argument actually supplied is a pointer to a StringInfo buffer - holding the received byte string.) Similarly, the optional + The receive function may be declared as taking one argument of type + internal, or two arguments of types internal + and oid. It must return a value of the data type itself. + (The first argument is a pointer to a StringInfo buffer + holding the received byte string; the optional second argument is the + element type in case this is an array type.) Similarly, the optional send_function converts from the internal representation to the external binary representation. If this function is not supplied, the type cannot participate in binary - output. The send function should be declared as taking one argument of the - new data type and returning type bytea. + output. The send function may be + declared as taking one argument of the new data type, or as taking + two arguments of which the second is type oid. + The second argument is again the array element type for array types. + The send function must return type bytea. -- cgit v1.2.3