diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml
index 72c9384..9ad3bfd 100644
--- a/doc/src/sgml/libpq.sgml
+++ b/doc/src/sgml/libpq.sgml
@@ -7233,6 +7233,215 @@ int PQisthreadsafe();
+
+ Alternative row processor
+
+
+ PGresult
+ PGconn
+
+
+
+ As the standard usage, users can get the result of command
+ execution from PGresult aquired
+ with PGgetResult
+ from PGConn. While the memory areas for
+ the PGresult are allocated with malloc() internally within calls of
+ command execution functions such as PQexec
+ and PQgetResult. If you have difficulties to
+ handle the result records in the form of PGresult, you can instruct
+ PGconn to pass every row to your own row processor instead of
+ storing into PGresult.
+
+
+
+
+
+ PQregisterRowProcessor
+
+ PQregisterRowProcessor
+
+
+
+
+
+ Sets a callback function to process each row.
+
+void PQregisterRowProcessor(PGconn *conn,
+ RowProcessor func,
+ void *param);
+
+
+
+
+
+
+ conn
+
+
+ The connection object to set the storage handler
+ function. PGresult created from this connection calls this
+ function to process each row.
+
+
+
+
+ func
+
+
+ Storage handler function to set. NULL means to use the
+ default processor.
+
+
+
+
+ param
+
+
+ A pointer to contextual parameter passed
+ to func. You can get this pointer
+ in RowProcessor
+ by PQgetRowProcessorParam.
+
+
+
+
+
+
+
+
+
+
+
+
+ RowProcessor
+
+ RowProcessor
+
+
+
+
+
+ The type for the row processor callback function.
+
+void *(*RowProcessor)(PGresult *res,
+ PGresAttValue *columns);
+
+
+
+
+ Generally this function must return NULL for failure and should
+ set the error message
+ with PGsetRowProcessorErrMes if the cause
+ is other than out of memory. This funcion must not throw any
+ exception.
+
+
+
+ res
+
+
+ A pointer to the PGresult object.
+
+
+
+
+ columns
+
+
+ An column values of the row to process.
+
+
+
+
+
+
+
+
+
+
+
+ PQgetRowProcessorParam
+
+ PQgetRowProcessorParam
+
+
+
+
+ Get the pointer passed to PQregisterRowProcessor
+ as param.
+
+void *PQgetRowProcessorParam(PGresult *res)
+
+
+
+
+
+ res
+
+
+ A pointer to the PGresult object.
+
+
+
+
+
+
+
+
+
+
+
+
+ PQsetRowProcessorErrMes
+
+ PQsetRowProcessorErrMes
+
+
+
+
+ Set the message for the error occurred
+ in RowProcessor. If this message is not set, the
+ caller assumes the error to be out of memory.
+
+void PQsetRowProcessorErrMes(PGresult *res, char *mes)
+
+
+
+
+
+ res
+
+
+ A pointer to the PGresult object
+ passed to RowProcessor.
+
+
+
+
+ mes
+
+
+ A pointer to the memory block containing the error message,
+ which is allocated by malloc(). The
+ memory block will be freed with free() in
+ the caller of RowProcessor only if it returns NULL.
+
+
+ If res already has a message previously
+ set, it is freed and then the given message is set. Set NULL
+ to cancel the the costom message.
+
+
+
+
+
+
+
+
+
+
+
Building libpq Programs