Commit d6942607 authored by Peter Eisentraut's avatar Peter Eisentraut

Markup examples as examples.

parent 4284002d
...@@ -128,10 +128,13 @@ in a BEGIN/END transaction block. ...@@ -128,10 +128,13 @@ in a BEGIN/END transaction block.
<Sect1 id="libpgtcl-examples"> <Sect1 id="libpgtcl-examples">
<Title>Examples</Title> <Title>Examples</Title>
<Para> <example>
Here's a small example of how to use the routines: <title><application>pgtcl</application> Example Program</title>
<ProgramListing> <para>
Here's a small example of how to use the routines:
<programlisting>
# getDBs : # getDBs :
# get the names of all the databases at a given host and port number # get the names of all the databases at a given host and port number
# with the defaults being the localhost and port 5432 # with the defaults being the localhost and port 5432
...@@ -149,8 +152,8 @@ proc getDBs { {host "localhost"} {port "5432"} } { ...@@ -149,8 +152,8 @@ proc getDBs { {host "localhost"} {port "5432"} } {
return $datnames return $datnames
} }
</ProgramListing> </ProgramListing>
</para>
</Para> </example>
</Sect1> </Sect1>
<Sect1 id="libpgtcl-ref"> <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"> <chapter id="largeObjects">
...@@ -254,7 +254,7 @@ Oid lo_unlink(PGconn *<replaceable class="parameter">conn</replaceable>, Oid lob ...@@ -254,7 +254,7 @@ Oid lo_unlink(PGconn *<replaceable class="parameter">conn</replaceable>, Oid lob
</sect1> </sect1>
<sect1 id="lo-funcs"> <sect1 id="lo-funcs">
<title>Built in registered functions</title> <title>Server-side Built-in Functions</title>
<para> <para>
There are two built-in registered functions, <acronym>lo_import</acronym> There are two built-in registered functions, <acronym>lo_import</acronym>
...@@ -295,10 +295,11 @@ SELECT lo_export(image.raster, '/tmp/motd') from image ...@@ -295,10 +295,11 @@ SELECT lo_export(image.raster, '/tmp/motd') from image
</para> </para>
</sect1> </sect1>
<sect1 id="lo-sample"> <sect1 id="lo-example">
<title>Sample Program</title> <title>Example Program</title>
<para> <example>
<title>Large Objects with <application>Libpq</application> Example Program</title>
<programlisting> <programlisting>
/*-------------------------------------------------------------- /*--------------------------------------------------------------
* *
...@@ -320,8 +321,8 @@ SELECT lo_export(image.raster, '/tmp/motd') from image ...@@ -320,8 +321,8 @@ SELECT lo_export(image.raster, '/tmp/motd') from image
#define BUFSIZE 1024 #define BUFSIZE 1024
/* /*
* importFile * import file &quot;in_filename&quot; into database as large object &quot;lob * importFile
jOid&quot; * import file &quot;in_filename&quot; into database as large object &quot;lobjOid&quot;
* *
*/ */
Oid Oid
...@@ -552,7 +553,7 @@ main(int argc, char **argv) ...@@ -552,7 +553,7 @@ main(int argc, char **argv)
exit(0); exit(0);
} }
</programlisting> </programlisting>
</para> </example>
</sect1> </sect1>
</chapter> </chapter>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment