Large objects are not directly supported by ECPG, but ECPG
application can manipulate large objects through the libpq large
object functions, obtaining the necessary PGconn object by calling the ECPGget_PGconn() function. (However, use of the
ECPGget_PGconn() function and
touching PGconn objects directly should be
done very carefully and ideally not mixed with other ECPG
database access calls.)

For more details about the ECPGget_PGconn(), see Section 33.11. For information about the
large object function interface, see Chapter 32.

Large object functions have to be called in a transaction
block, so when autocommit is off, BEGIN
commands have to be issued explicitly.

Example 33-2 shows
an example program that illustrates how to create, write, and
read a large object in an ECPG application.