PQregisterSubClasses3
Registers a type aliases or sub-classes.
Usage
#include <libpqtypes.h>
int PQregisterSubClasses(PGconn *conn, PGregisterType *types,
int count);
Deprecated
THIS FUNCTION IS DEPRECATED. New applications should use PQregisterTypes. This function is now a wrapper to PQregisterTypes.
Overview
The PQregisterSubClasses() function allows an application to register an alias or sub-class of another type.
The types argument is an array containing count sub class types to register. The typname member of the PGregisterType structure must specify an inheritence relationship: ex. "myint=int4" where myint inherits from int4. The ´=´ is called the inheritence operator. If both typput and typget members of the PGregisterType structure are NULL, the type at that element will behave identically to the type it is inheriting from; an alias. Otherwise, the base type's put and/or get routines will be overridden.
NOTE: The typname member of the PGregisterType structure can optionally contain the type's schema: schema.typname.
WARNING: PQparamCreate is only aware of types that have already been registered. If you need to put a type into a param, make sure it is first registered.
Return value
On success, a non-zero value is returned. On error, zero is returned and PQgeterror(3) will contain an error message.
Examples
None.
Releases
Unchanged in 5 releases since Debian 8 (Jessie).