Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5e55bb0

Browse files
author
Thomas G. Lockhart
committed
Add Bruce's pgeasy doc from the man page.
1 parentf38d2af commit5e55bb0

File tree

3 files changed

+173
-58
lines changed

3 files changed

+173
-58
lines changed

‎doc/src/sgml/libpgeasy.sgml

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
<!--
2+
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpgeasy.sgml,v 2.1 2000/03/31 03:26:21 thomas Exp $
3+
-->
4+
5+
<chapter id="pgeasy-chapter">
6+
<title id="pgeasy">libpgeasy - Simplified C Binding Library</title>
7+
8+
<note>
9+
<title>Author</title>
10+
11+
<para>
12+
Written by Bruce Momjian
13+
(<ulink url="mailto:root@candle.pha.pa.us">root@candle.pha.pa.us</ulink>)
14+
and last updated 2000-03-30.
15+
</para>
16+
</note>
17+
18+
<para>
19+
<productname>pgeasy</productname> allows you to cleanly interface
20+
to the <productname>libpq</productname> library,
21+
more like a 4GL SQL interface.
22+
</para>
23+
24+
<para>
25+
It consists of set of simplified C functions that encapsulate the
26+
functionality of libpq.
27+
The functions are:
28+
29+
<itemizedlist>
30+
<listitem>
31+
<para>
32+
PGresult *doquery(char *query);
33+
</para>
34+
</listitem>
35+
36+
<listitem>
37+
<para>
38+
PGconn *connectdb();
39+
</para>
40+
</listitem>
41+
42+
<listitem>
43+
<para>
44+
void disconnectdb();
45+
</para>
46+
</listitem>
47+
48+
<listitem>
49+
<para>
50+
int fetch(void *param,...);
51+
</para>
52+
</listitem>
53+
54+
<listitem>
55+
<para>
56+
int fetchwithnulls(void *param,...);
57+
</para>
58+
</listitem>
59+
60+
<listitem>
61+
<para>
62+
void reset_fetch();
63+
</para>
64+
</listitem>
65+
66+
<listitem>
67+
<para>
68+
void on_error_continue();
69+
</para>
70+
</listitem>
71+
72+
<listitem>
73+
<para>
74+
void on_error_stop();
75+
</para>
76+
</listitem>
77+
78+
<listitem>
79+
<para>
80+
PGresult *get_result();
81+
</para>
82+
</listitem>
83+
84+
<listitem>
85+
<para>
86+
void set_result(PGresult *newres);
87+
</para>
88+
</listitem>
89+
90+
<listitem>
91+
<para>
92+
void unset_result(PGresult *oldres);
93+
</para>
94+
</listitem>
95+
</itemizedlist>
96+
</para>
97+
98+
<para>
99+
Many functions return a structure or value, so you can do more work
100+
with the result if required.
101+
</para>
102+
103+
<para>
104+
You basically connect to the database with <function>connectdb</function>,
105+
issue your query with <function>doquery</function>,
106+
fetch the results with <function>fetch</function>,
107+
and finish with <function>disconnectdb</function>.
108+
</para>
109+
110+
<para>
111+
For <literal>select</literal> queries, <function>fetch</function>
112+
allows you to pass pointers as parameters, and on return the variables
113+
are filled with data from the binary cursor you opened. These binary
114+
cursors can not be used if you are running the
115+
<productname>pgeasy</productname>
116+
client on a system with a different architecture than the database
117+
server. If you pass a NULL pointer parameter, the column is skipped.
118+
<function>fetchwithnulls</function> allows you to retrieve the NULL
119+
status of the field by passing an <literal>int*</literal>
120+
after each result pointer, which returns true or false if the field is null.
121+
You can always use libpq functions on the PGresult pointer returned
122+
by <function>doquery</function>.
123+
<function>reset_fetch</function> starts the fetch back at the beginning.
124+
</para>
125+
126+
<para>
127+
<function>get_result</function>,
128+
<function>set_result</function>,
129+
and
130+
<function>unset_result</function>
131+
allow you to handle multiple result sets at the same time.
132+
</para>
133+
134+
<para>
135+
There are a variety of demonstration programs in the
136+
source directory.
137+
</para>
138+
</chapter>
139+
140+
<!-- Keep this comment at the end of the file
141+
Local variables:
142+
mode:sgml
143+
sgml-omittag:nil
144+
sgml-shorttag:t
145+
sgml-minimize-attributes:nil
146+
sgml-always-quote-attributes:t
147+
sgml-indent-step:1
148+
sgml-indent-data:t
149+
sgml-parent-document:nil
150+
sgml-default-dtd-file:"./reference.ced"
151+
sgml-exposed-tags:nil
152+
sgml-local-catalogs:("/usr/lib/sgml/catalog")
153+
sgml-local-ecat-files:nil
154+
End:
155+
-->

‎doc/src/sgml/postgres.sgml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<!--
2+
$Header: /cvsroot/pgsql/doc/src/sgml/postgres.sgml,v 1.35 2000/03/31 03:26:21 thomas Exp $
3+
-->
4+
15
<!doctype book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
26

37
<!entity about SYSTEM "about.sgml">
@@ -68,6 +72,7 @@
6872
<!entity intro-pg SYSTEM "intro-pg.sgml">
6973
<!entity indexcost SYSTEM "indexcost.sgml">
7074
<!entity jdbc SYSTEM "jdbc.sgml">
75+
<!entity libpgeasy SYSTEM "libpgeasy.sgml">
7176
<!entity libpq SYSTEM "libpq.sgml">
7277
<!entity libpqpp SYSTEM "libpq++.sgml">
7378
<!entity libpgtcl SYSTEM "libpgtcl.sgml">
@@ -269,6 +274,7 @@ Your name here...
269274
&libpq;
270275
&libpqpp;
271276
&libpgtcl;
277+
&libpgeasy;
272278
&odbc;
273279
&jdbc;
274280
&lisp;
@@ -345,7 +351,7 @@ sgml-indent-data:t
345351
sgml-parent-document:nil
346352
sgml-default-dtd-file:"./reference.ced"
347353
sgml-exposed-tags:nil
348-
sgml-local-catalogs:("/usr/lib/sgml/CATALOG")
354+
sgml-local-catalogs:("/usr/lib/sgml/catalog")
349355
sgml-local-ecat-files:nil
350356
End:
351357
-->

‎doc/src/sgml/programmer.sgml

Lines changed: 11 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,18 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/programmer.sgml,v 1.24 2000/03/30 22:34:29 thomas Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/programmer.sgml,v 1.25 2000/03/31 03:26:21 thomas Exp $
33

44
Postgres Programmer's Guide.
5-
6-
$Log: programmer.sgml,v $
7-
Revision 1.24 2000/03/30 22:34:29 thomas
8-
Remove PL/perl language chapter, since it shows up in the User's Guide.
9-
10-
Revision 1.23 2000/03/30 22:22:41 thomas
11-
Accumulated fixups.
12-
Add some chapters on new topics.
13-
Change to referencing OASIS/Docbook v3.1 rather than Davenport/Docbook v3.0
14-
Grepped for and fixed apparent tag mangling from emacs
15-
"Normalize" operation. Should be the last of those.
16-
17-
Revision 1.22 2000/03/28 14:16:06 thomas
18-
Update SGML catalog references to DocBook 3.1 on FreeBSD.
19-
Matches postgresql.org/hub.org environment.
20-
21-
Revision 1.21 2000/02/02 16:25:04 thomas
22-
Add short chapter in developer's guide on formatting source code.
23-
24-
Revision 1.20 1999/12/06 16:37:11 thomas
25-
Remove references to PostgreSQL as "public-domain" since that has a
26-
specific meaning wrt copyright (or lack thereof).
27-
28-
Revision 1.19 1999/07/22 15:11:04 thomas
29-
Complete merge of all old man page information.
30-
lisp.sgml is a placeholder for Eric Marsden's upcoming contribution.
31-
catalogs.sgml is not yet marked up or integrated.
32-
It should perhaps become an appendix.
33-
34-
Revision 1.18 1999/06/23 06:21:19 thomas
35-
Remove User's Guide entities since they were not being used.
36-
37-
Revision 1.16 1999/05/26 17:30:30 thomas
38-
Add chapters on CVS access, MVCC, SQL theory to the docs.
39-
Add an appendix with more details on date/time attributes and handling.
40-
Update most references to Postgres version numbers to 6.5,
41-
*except* for the porting list which will require a report
42-
from a successful installation to be updated.
43-
44-
Revision 1.12 1999/02/13 03:54:51 thomas
45-
Re-enable arch-dev.sgml now that it has new information from Stefan's
46-
Master's Thesis.
47-
48-
Revision 1.10 1998/10/31 09:36:36 thomas
49-
Cleanup for v6.4 release.
50-
Make new file current.sgml to hold release info for the current release.
51-
Should be moved to release.sgml before filling with next release info.
52-
535
-->
546

557
<!doctype book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
568

57-
<!entity about SYSTEM "about.sgml">
58-
<!entity history SYSTEM "history.sgml">
59-
<!entity info SYSTEM "info.sgml">
60-
<!entity legal SYSTEM "legal.sgml">
61-
<!entity notation SYSTEM "notation.sgml">
62-
<!entity problems SYSTEM "problems.sgml">
63-
<!entity y2k SYSTEM "y2k.sgml">
9+
<!entity aboutSYSTEM "about.sgml">
10+
<!entity historySYSTEM "history.sgml">
11+
<!entity infoSYSTEM "info.sgml">
12+
<!entity legalSYSTEM "legal.sgml">
13+
<!entity notationSYSTEM "notation.sgml">
14+
<!entity problemsSYSTEM "problems.sgml">
15+
<!entity y2kSYSTEM "y2k.sgml">
6416

6517
<!entity arch-pg SYSTEM "arch-pg.sgml">
6618
<!entity dfunc SYSTEM "dfunc.sgml">
@@ -71,6 +23,7 @@ Make new file current.sgml to hold release info for the current release.
7123
<!entity intro-pg SYSTEM "intro-pg.sgml">
7224
<!entity indexcost SYSTEM "indexcost.sgml">
7325
<!entity jdbc SYSTEM "jdbc.sgml">
26+
<!entity libpgeasy SYSTEM "libpgeasy.sgml">
7427
<!entity libpq SYSTEM "libpq.sgml">
7528
<!entity libpqpp SYSTEM "libpq++.sgml">
7629
<!entity libpgtcl SYSTEM "libpgtcl.sgml">
@@ -201,6 +154,7 @@ Disable it until we put in some info.
201154
&libpq;
202155
&libpqpp;
203156
&libpgtcl;
157+
&libpgeasy;
204158
&ecpg;
205159
&odbc;
206160
&jdbc;
@@ -246,7 +200,7 @@ sgml-indent-data:t
246200
sgml-parent-document:nil
247201
sgml-default-dtd-file:"./reference.ced"
248202
sgml-exposed-tags:nil
249-
sgml-local-catalogs:("/usr/lib/sgml/CATALOG")
203+
sgml-local-catalogs:("/usr/lib/sgml/catalog")
250204
sgml-local-ecat-files:nil
251205
End:
252206
-->

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp