logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

PQregisterResult - Registers sub-classes, composites and user-defined types found within a PGresult.

Author

       A contribution of eSilo, LLC. for the PostgreSQL Database Management System.  Written by Andrew Chernow.

Description

       The  PQregisterResult()  function  registers  the types found within a given PGresult, thus this function
       makes no calls to a PostgreSQL server since the result data is already available.

       The which argument can be PQT_COMPOSITE or PQT_USERDEFINED, but not PQT_SUBCLASS.  The only reason  being
       sub-classes don't talk to the server so they have no result set.

       The  types argument is an array containing count types to register.  This array must be identical to what
       was provided to the originating PQregisterTypes call.

       The res argument is a PGresult normally created  by  calling  PQregisterTypes  followed  by  PQgetResult.
       However,  it  is possible to create your own result via PQmakeEmptyPGresult, PQsetResultAttrs, PQsetvalue
       and call this function.  This approach is a bit risky being how the result set generated by  type  lookup
       queries are internal and subject to change.

Examples

       None.

Name

       PQregisterResult - Registers sub-classes, composites and user-defined types found within a PGresult.

Reporting Bugs

       Report bugs to <libpqtypes@esilo.com>.

Return Value

       On success, a non-zero value is returned.  On error, zero is returned and PQgeterror(3) will  contain  an
       error message.

See Also

PQregisterTypes(3), pqt-handlers(3), PQputf(3), PQgetf(3)

libpqtypes                                            2011                                   PQregisterResult(3)

Synopsis

#include<libpqtypes.h>intPQregisterResult(PGconn*conn,intwhich,PGregisterType*types,intcount,PGresult*res);

See Also