1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-08 11:42:09 +03:00

Implement new-protocol binary I/O support in DataRow, Bind, and FunctionCall

messages.  Binary I/O is now up and working, but only for a small set
of datatypes (integers, text, bytea).
This commit is contained in:
Tom Lane
2003-05-09 18:08:48 +00:00
parent d85a0a6bef
commit 0ac6298bb8
7 changed files with 434 additions and 344 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.198 2003/05/08 18:16:36 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.199 2003/05/09 18:08:48 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -828,11 +828,9 @@ CopyTo(Relation rel, List *attnumlist, bool binary, bool oids,
int attnum = lfirsti(cur);
Oid out_func_oid;
if (!getTypeOutputInfo(attr[attnum - 1]->atttypid,
&out_func_oid, &elements[attnum - 1],
&isvarlena[attnum - 1]))
elog(ERROR, "COPY: couldn't lookup info for type %u",
attr[attnum - 1]->atttypid);
getTypeOutputInfo(attr[attnum - 1]->atttypid,
&out_func_oid, &elements[attnum - 1],
&isvarlena[attnum - 1]);
fmgr_info(out_func_oid, &out_functions[attnum - 1]);
if (binary && attr[attnum - 1]->attlen == -2)
elog(ERROR, "COPY BINARY: cstring not supported");