<Sect1 id="libpgtcl-examples">
<Title>Examples</Title>
-<Para>
-Here's a small example of how to use the routines:
+ <example>
+ <title><application>pgtcl</application> Example Program</title>
-<ProgramListing>
+ <para>
+ Here's a small example of how to use the routines:
+
+<programlisting>
# getDBs :
# get the names of all the databases at a given host and port number
# with the defaults being the localhost and port 5432
return $datnames
}
</ProgramListing>
-
-</Para>
+ </para>
+ </example>
</Sect1>
<Sect1 id="libpgtcl-ref">
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/lobj.sgml,v 1.20 2001/09/13 15:55:23 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/lobj.sgml,v 1.21 2001/09/15 16:08:59 petere Exp $
-->
<chapter id="largeObjects">
</sect1>
<sect1 id="lo-funcs">
-<title>Built in registered functions</title>
+<title>Server-side Built-in Functions</title>
<para>
There are two built-in registered functions, <acronym>lo_import</acronym>
</para>
</sect1>
-<sect1 id="lo-sample">
-<title>Sample Program</title>
+<sect1 id="lo-example">
+<title>Example Program</title>
-<para>
+ <example>
+ <title>Large Objects with <application>Libpq</application> Example Program</title>
<programlisting>
/*--------------------------------------------------------------
*
#define BUFSIZE 1024
/*
- * importFile * import file "in_filename" into database as large object "lob
-jOid"
+ * importFile
+ * import file "in_filename" into database as large object "lobjOid"
*
*/
Oid
exit(0);
}
</programlisting>
-</para>
+</example>
</sect1>
</chapter>