1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5
>Using Descriptor Areas</TITLE
8
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
10
HREF="mailto:pgsql-docs@postgresql.org"><LINK
12
TITLE="PostgreSQL 9.1beta1 Documentation"
13
HREF="index.html"><LINK
15
TITLE="ECPG - Embedded SQL in C"
16
HREF="ecpg.html"><LINK
18
TITLE="pgtypes Library"
19
HREF="ecpg-pgtypes.html"><LINK
21
TITLE="Error Handling"
22
HREF="ecpg-errors.html"><LINK
25
HREF="stylesheet.css"><META
26
HTTP-EQUIV="Content-Type"
27
CONTENT="text/html; charset=ISO-8859-1"><META
29
CONTENT="2011-04-27T21:20:33"></HEAD
35
SUMMARY="Header navigation table"
47
>PostgreSQL 9.1beta1 Documentation</A
56
TITLE="pgtypes Library"
57
HREF="ecpg-pgtypes.html"
66
TITLE="ECPG - Embedded SQL in C"
86
TITLE="ECPG - Embedded SQL in C"
95
TITLE="Error Handling"
96
HREF="ecpg-errors.html"
110
NAME="ECPG-DESCRIPTORS"
111
>33.7. Using Descriptor Areas</A
114
> An SQL descriptor area is a more sophisticated method for processing
125
> statement. An SQL descriptor area groups
126
the data of one row of data together with metadata items into one
127
data structure. The metadata is particularly useful when executing
128
dynamic SQL statements, where the nature of the result columns might
129
not be known ahead of time. PostgreSQL provides two ways to use
130
Descriptor Areas: the named SQL Descriptor Areas and the C-structure
138
NAME="ECPG-NAMED-DESCRIPTORS"
139
>33.7.1. Named SQL Descriptor Areas</A
142
> A named SQL descriptor area consists of a header, which contains
143
information concerning the entire descriptor, and one or more item
144
descriptor areas, which basically each describe one column in the
148
> Before you can use an SQL descriptor area, you need to allocate one:
150
CLASS="PROGRAMLISTING"
151
>EXEC SQL ALLOCATE DESCRIPTOR <TT
158
The identifier serves as the <SPAN
160
>"variable name"</SPAN
163
When you don't need the descriptor anymore, you should deallocate
166
CLASS="PROGRAMLISTING"
167
>EXEC SQL DEALLOCATE DESCRIPTOR <TT
176
> To use a descriptor area, specify it as the storage target in an
180
> clause, instead of listing host variables:
182
CLASS="PROGRAMLISTING"
183
>EXEC SQL FETCH NEXT FROM mycursor INTO SQL DESCRIPTOR mydesc;</PRE
185
If the result set is empty, the Descriptor Area will still contain
186
the metadata from the query, i.e. the field names.
189
> For not yet executed prepared queries, the <TT
193
statement can be used to get the metadata of the result set:
195
CLASS="PROGRAMLISTING"
196
>EXEC SQL BEGIN DECLARE SECTION;
197
char *sql_stmt = "SELECT * FROM table1";
198
EXEC SQL END DECLARE SECTION;
200
EXEC SQL PREPARE stmt1 FROM :sql_stmt;
201
EXEC SQL DESCRIBE stmt1 INTO SQL DESCRIPTOR mydesc;</PRE
205
> Before PostgreSQL 9.0, the <TT
208
> keyword was optional,
216
produced named SQL Descriptor Areas. Now it is mandatory, omitting
220
> keyword produces SQLDA Descriptor Areas,
222
HREF="ecpg-descriptors.html#ECPG-SQLDA-DESCRIPTORS"
241
used to similarly: they produce the result set and the metadata in a
245
> Now how do you get the data out of the descriptor area? You can
246
think of the descriptor area as a structure with named fields. To
247
retrieve the value of a field from the header and store it into a
248
host variable, use the following command:
250
CLASS="PROGRAMLISTING"
251
>EXEC SQL GET DESCRIPTOR <TT
268
Currently, there is only one header field defined:
274
>, which tells how many item
275
descriptor areas exist (that is, how many columns are contained in
276
the result). The host variable needs to be of an integer type. To
277
get a field from the item descriptor area, use the following
280
CLASS="PROGRAMLISTING"
281
>EXEC SQL GET DESCRIPTOR <TT
308
> can be a literal integer or a host
309
variable containing an integer. Possible fields are:
323
> number of rows in the result set
333
> actual data item (therefore, the data type of this field
334
depends on the query)
340
>DATETIME_INTERVAL_CODE</TT
353
>DATETIME_INTERVAL_CODE</TT
354
> will have a value of
381
>TIME WITH TIME ZONE</TT
388
>TIMESTAMP WITH TIME ZONE</TT
395
>DATETIME_INTERVAL_PRECISION</TT
409
> the indicator (indicating a null value or a value truncation)
429
> length of the datum in characters
459
> length of the character representation of the datum in bytes
469
> precision (for type <TT
482
> length of the datum in characters
488
>RETURNED_OCTET_LENGTH</TT
492
> length of the character representation of the datum in bytes
502
> scale (for type <TT
515
> numeric code of the data type of the column
533
statements, the effect of the <TT
540
keywords are different. A Descriptor Area can also be manually built to
541
provide the input parameters for a query or a cursor and
544
>USING SQL DESCRIPTOR <TT
551
is the way to pass the input parameters into a parametrized query. The statement
552
to build a named SQL Descriptor Area is below:
554
CLASS="PROGRAMLISTING"
555
>EXEC SQL SET DESCRIPTOR <TT
579
> PostgreSQL supports retrieving more that one record in one <TT
583
statement and storing the data in host variables in this case assumes that the
584
variable is an array. E.g.:
586
CLASS="PROGRAMLISTING"
587
>EXEC SQL BEGIN DECLARE SECTION;
589
EXEC SQL END DECLARE SECTION;
591
EXEC SQL FETCH 5 FROM mycursor INTO SQL DESCRIPTOR mydesc;
593
EXEC SQL GET DESCRIPTOR mydesc VALUE 1 :id = DATA;</PRE
603
NAME="ECPG-SQLDA-DESCRIPTORS"
604
>33.7.2. SQLDA Descriptor Areas</A
607
> An SQLDA Descriptor Area is a C language structure which can be also used
608
to get the result set and the metadata of a query. One structure stores one
609
record from the result set.
611
CLASS="PROGRAMLISTING"
612
>EXEC SQL include sqlda.h;
615
EXEC SQL FETCH 3 FROM mycursor INTO DESCRIPTOR mysqlda;</PRE
620
> keyword is omitted. The paragraphs about
621
the use cases of the <TT
629
HREF="ecpg-descriptors.html#ECPG-NAMED-DESCRIPTORS"
631
> also apply here with an addition.
639
keyword can be completely omitted if the <TT
644
CLASS="PROGRAMLISTING"
645
>EXEC SQL DESCRIBE prepared_statement INTO mysqlda;</PRE
651
> The general flow of a program that uses SQLDA is:
658
>Prepare a query, and declare a cursor for it.</P
663
>Declare an SQLDA for the result rows.</P
668
>Declare an SQLDA for the input parameters, and initialize them (memory allocation, parameter settings).</P
673
>Open a cursor with the input SQLDA.</P
678
>Fetch rows from the cursor, and store them into an output SQLDA.</P
683
>Read values from the output SQLDA into the host variables (with conversion if necessary).</P
688
>Close the cursor.</P
693
>Free the memory area allocated for the input SQLDA.</P
703
>33.7.2.1. SQLDA Datac Structure</A
706
> SQLDA uses three data structure
726
> PostgreSQL's SQLDA has a similar data structure to the one in
727
IBM DB2 Universal Database, so some technical information on
728
DB2's SQLDA could help understanding PostgreSQL's one better.
737
NAME="ECPG-SQLDA-SQLDA"
738
>33.7.2.1.1. sqlda_t Structure</A
741
> The structure type <TT
745
actual SQLDA. It holds one record. And two or
749
> structures can be connected in a
750
linked list with the pointer in
755
representing an ordered collection of rows. So, when two or
756
more rows are fetched, the application can read them by
767
> The definition of <TT
772
CLASS="PROGRAMLISTING"
779
struct sqlda_struct *desc_next;
780
struct sqlvar_struct sqlvar[1];
783
typedef struct sqlda_struct sqlda_t;</PRE
786
The meaning of the fields is:
800
> It contains the literal string <TT
813
> It contains the size of the allocated space in bytes.
823
> It contains the number of input parameters for a parametrized query
824
case it's passed into <TT
834
> statements using the <TT
838
keyword. In case it's used as output of <TT
849
its value is the same as <TT
863
> It contains the number of fields in a result set.
873
> If the query returns more than one records, multiple linked SQLDA structures
874
are returned, the first record is stored in the SQLDA returned in the
884
> This is the array of the columns in the result set.
897
NAME="ECPG-SQLDA-SQLVAR"
898
>33.7.2.1.2. sqlvar_t Structure</A
901
> The structure type <TT
904
> holds a column value
905
and metadata such as type and length. The definition of the type
909
CLASS="PROGRAMLISTING"
910
>struct sqlvar_struct
916
struct sqlname sqlname;
919
typedef struct sqlvar_struct sqlvar_t;</PRE
922
The meaning of the fields is:
936
> Contains the type identifier of the field. For values,
953
> Contains the binary length of the field. e.g. 4 bytes for <TT
966
> Points to the data. The format of the data is described
968
HREF="ecpg-variables.html#ECPG-VARIABLES-TYPE-MAPPING"
980
> Points to the null indicator. 0 means not null, -1 means
991
> The the name of the field.
1004
NAME="ECPG-SQLDA-SQLNAME"
1005
>33.7.2.1.3. struct sqlname Structure</A
1011
> structure holds a column name. It
1012
is used as a member of the <TT
1016
definition of the structure is:
1018
CLASS="PROGRAMLISTING"
1019
>#define NAMEDATALEN 64
1024
char data[NAMEDATALEN];
1027
The meaning of the fields is:
1031
CLASS="VARIABLELIST"
1040
> Contains the length of the field name.
1050
> Contains the actual field name.
1064
NAME="ECPG-SQLDA-OUTPUT"
1065
>33.7.2.2. Retreiving a Result Set Using an SQLDA</A
1070
> The general steps to retrieve a query result set through an
1081
> structure to receive the result set.</P
1095
> commands to process a query specifying the declared SQLDA.</P
1100
>Check the number of records in the result set by looking at <TT
1103
>, a member of the <TT
1111
>Get the values of each column from <TT
1117
>, etc., members of the <TT
1125
>Go to next row (<TT
1128
> structure) by following the <TT
1131
> pointer, a member of the <TT
1139
>Repeat above as you need.</P
1144
> Here is an example retrieving a result set through an SQLDA.
1147
> First, declare a <TT
1150
> structure to receive the result set.
1152
CLASS="PROGRAMLISTING"
1153
>sqlda_t *sqlda1;</PRE
1157
> Next, specify the SQLDA in a command. This is
1163
CLASS="PROGRAMLISTING"
1164
>EXEC SQL FETCH NEXT FROM cur1 INTO DESCRIPTOR sqlda1;</PRE
1168
> Run a loop following the linked list to retrieve the rows.
1170
CLASS="PROGRAMLISTING"
1171
>sqlda_t *cur_sqlda;
1173
for (cur_sqlda = sqlda1;
1175
cur_sqlda = cur_sqlda->desc_next)
1182
> Inside the loop, run another loop to retrieve each column data
1186
> structure) of the row.
1188
CLASS="PROGRAMLISTING"
1189
>for (i = 0; i < cur_sqlda->sqld; i++)
1191
sqlvar_t v = cur_sqlda->sqlvar[i];
1192
char *sqldata = v.sqldata;
1193
short sqllen = v.sqllen;
1199
> To get a column value, check the <TT
1206
> structure. Then, switch
1207
to an appropriate way, depending on the column type, to copy
1211
> field to a host variable.
1213
CLASS="PROGRAMLISTING"
1214
>char var_buf[1024];
1219
memset(&var_buf, 0, sizeof(var_buf));
1220
memcpy(&var_buf, sqldata, (sizeof(var_buf) <= sqllen ? sizeof(var_buf) - 1 : sqllen));
1223
case ECPGt_int: /* integer */
1224
memcpy(&intval, sqldata, sqllen);
1225
snprintf(var_buf, sizeof(var_buf), "%d", intval);
1238
NAME="ECPG-SQLDA-INPUT"
1239
>33.7.2.3. Passing Query Parameters Using an SQLDA</A
1244
> The general steps to use an SQLDA to pass input
1245
parameters to a prepared query are:
1252
>Create a prepared query (prepared statement)</P
1257
>Declare a sqlda_t structure as an input SQLDA.</P
1262
>Allocate memory area (as sqlda_t structure) for the input SQLDA.</P
1267
>Set (copy) input values in the allocated memory.</P
1272
>Open a cursor with specifying the input SQLDA.</P
1277
> Here is an example.
1280
> First, create a prepared statement.
1282
CLASS="PROGRAMLISTING"
1283
>EXEC SQL BEGIN DECLARE SECTION;
1284
char query[1024] = "SELECT d.oid, * FROM pg_database d, pg_stat_database s WHERE d.oid = s.datid AND (d.datname = ? OR d.oid = ?)";
1285
EXEC SQL END DECLARE SECTION;
1287
EXEC SQL PREPARE stmt1 FROM :query;</PRE
1291
> Next, allocate memory for an SQLDA, and set the number of input
1295
>, a member variable of
1299
> structure. When two or more input
1300
parameters are required for the prepared query, the application
1301
has to allocate additional memory space which is calculated by
1302
(nr. of params - 1) * sizeof(sqlvar_t). The example shown here
1303
allocates memory space for two input parameters.
1305
CLASS="PROGRAMLISTING"
1308
sqlda2 = (sqlda_t *) malloc(sizeof(sqlda_t) + sizeof(sqlvar_t));
1309
memset(sqlda2, 0, sizeof(sqlda_t) + sizeof(sqlvar_t));
1311
sqlda2->sqln = 2; /* number of input variables */</PRE
1315
> After memory allocation, store the parameter values into the
1319
> array. (This is same array used for
1320
retrieving column values when the SQLDA is receiving a result
1321
set.) In this example, the input parameters
1325
>, having a string type,
1329
>, having an integer type.
1331
CLASS="PROGRAMLISTING"
1332
>sqlda2->sqlvar[0].sqltype = ECPGt_char;
1333
sqlda2->sqlvar[0].sqldata = "postgres";
1334
sqlda2->sqlvar[0].sqllen = 8;
1337
sqlda2->sqlvar[1].sqltype = ECPGt_int;
1338
sqlda2->sqlvar[1].sqldata = (char *) &intval;
1339
sqlda2->sqlvar[1].sqllen = sizeof(intval);</PRE
1343
> By opening a cursor and specifying the SQLDA that was set up
1344
beforehand, the input parameters are passed to the prepared
1347
CLASS="PROGRAMLISTING"
1348
>EXEC SQL OPEN cur1 USING DESCRIPTOR sqlda2;</PRE
1352
> Finally, after using input SQLDAs, the allocated memory space
1353
must be freed explicitly, unlike SQLDAs used for receiving query
1356
CLASS="PROGRAMLISTING"
1366
NAME="ECPG-SQLDA-EXAMPLE"
1367
>33.7.2.4. A Sample Application Using SQLDA</A
1370
> Here is an example program, which describes how to fetch access
1371
statistics of the databases, specified by the input parameters,
1372
from the system catalogs.
1375
> This application joins two system tables, pg_database and
1376
pg_stat_database on the database oid, and also fetches and shows
1377
the database statistics which are retreived by two input
1378
parameters (a database "postgres", and oid "1").
1381
> First, declare an SQLDA for input and an SQLDA for output.
1383
CLASS="PROGRAMLISTING"
1384
>EXEC SQL include sqlda.h;
1386
sqlda_t *sqlda1; /* an output descriptor */
1387
sqlda_t *sqlda2; /* an input descriptor */</PRE
1391
> Next, connect to the database, prepare a statement, and declare a
1392
cursor for the prepared statement.
1394
CLASS="PROGRAMLISTING"
1398
EXEC SQL BEGIN DECLARE SECTION;
1399
char query[1024] = "SELECT d.oid,* FROM pg_database d, pg_stat_database s WHERE d.oid=s.datid AND ( d.datname=? OR d.oid=? )";
1400
EXEC SQL END DECLARE SECTION;
1402
EXEC SQL CONNECT TO testdb AS con1 USER testuser;
1404
EXEC SQL PREPARE stmt1 FROM :query;
1405
EXEC SQL DECLARE cur1 CURSOR FOR stmt1;</PRE
1409
> Next, put some values in the input SQLDA for the input
1410
parameters. Allocate memory for the input SQLDA, and set the
1411
number of input parameters to <TT
1415
type, value, and value length into <TT
1432
CLASS="PROGRAMLISTING"
1433
> /* Create SQLDA structure for input parameters. */
1434
sqlda2 = (sqlda_t *) malloc(sizeof(sqlda_t) + sizeof(sqlvar_t));
1435
memset(sqlda2, 0, sizeof(sqlda_t) + sizeof(sqlvar_t));
1436
sqlda2->sqln = 2; /* number of input variables */
1438
sqlda2->sqlvar[0].sqltype = ECPGt_char;
1439
sqlda2->sqlvar[0].sqldata = "postgres";
1440
sqlda2->sqlvar[0].sqllen = 8;
1443
sqlda2->sqlvar[1].sqltype = ECPGt_int;
1444
sqlda2->sqlvar[1].sqldata = (char *)&intval;
1445
sqlda2->sqlvar[1].sqllen = sizeof(intval);</PRE
1449
> After setting up the input SQLDA, open a cursor with the input
1453
CLASS="PROGRAMLISTING"
1454
> /* Open a cursor with input parameters. */
1455
EXEC SQL OPEN cur1 USING DESCRIPTOR sqlda2;</PRE
1459
> Fetch rows into the output SQLDA from the opened cursor.
1460
(Generally, you have to call <TT
1464
in the loop, to fetch all rows in the result set.)
1466
CLASS="PROGRAMLISTING"
1471
/* Assign descriptor to the cursor */
1472
EXEC SQL FETCH NEXT FROM cur1 INTO DESCRIPTOR sqlda1;</PRE
1476
> Next, retrieve the fetched records from the SQLDA, by following
1477
the linked list of the <TT
1482
CLASS="PROGRAMLISTING"
1483
> for (cur_sqlda = sqlda1 ;
1485
cur_sqlda = cur_sqlda->desc_next)
1491
> Read each columns in the first record. The number of columns is
1495
>, the actual data of the first
1496
column is stored in <TT
1506
CLASS="PROGRAMLISTING"
1507
> /* Print every column in a row. */
1508
for (i = 0; i < sqlda1->sqld; i++)
1510
sqlvar_t v = sqlda1->sqlvar[i];
1511
char *sqldata = v.sqldata;
1512
short sqllen = v.sqllen;
1514
strncpy(name_buf, v.sqlname.data, v.sqlname.length);
1515
name_buf[v.sqlname.length] = '\0';</PRE
1519
> Now, the column data is stored in the variable <TT
1523
Copy every datum into host variables, looking
1527
> for the type of the column.
1529
CLASS="PROGRAMLISTING"
1530
> switch (v.sqltype) {
1533
unsigned long long int longlongval;
1536
memset(&var_buf, 0, sizeof(var_buf));
1537
memcpy(&var_buf, sqldata, (sizeof(var_buf) <= sqllen ? sizeof(var_buf)-1 : sqllen));
1540
case ECPGt_int: /* integer */
1541
memcpy(&intval, sqldata, sqllen);
1542
snprintf(var_buf, sizeof(var_buf), "%d", intval);
1551
printf("%s = %s (type: %d)\n", name_buf, var_buf, v.sqltype);
1556
> Close the cursor after processing all of records, and disconnect
1559
CLASS="PROGRAMLISTING"
1560
> EXEC SQL CLOSE cur1;
1563
EXEC SQL DISCONNECT ALL;</PRE
1567
> The whole program is shown
1569
HREF="ecpg-descriptors.html#ECPG-SQLDA-EXAMPLE-EXAMPLE"
1576
NAME="ECPG-SQLDA-EXAMPLE-EXAMPLE"
1580
>Example 33-1. Example SQLDA Program</B
1583
CLASS="PROGRAMLISTING"
1584
>#include <stdlib.h>
1585
#include <string.h>
1586
#include <stdlib.h>
1587
#include <stdio.h>
1588
#include <unistd.h>
1590
EXEC SQL include sqlda.h;
1592
sqlda_t *sqlda1; /* descriptor for output */
1593
sqlda_t *sqlda2; /* descriptor for input */
1595
EXEC SQL WHENEVER NOT FOUND DO BREAK;
1596
EXEC SQL WHENEVER SQLERROR STOP;
1601
EXEC SQL BEGIN DECLARE SECTION;
1602
char query[1024] = "SELECT d.oid,* FROM pg_database d, pg_stat_database s WHERE d.oid=s.datid AND ( d.datname=? OR d.oid=? )";
1605
unsigned long long int longlongval;
1606
EXEC SQL END DECLARE SECTION;
1608
EXEC SQL CONNECT TO uptimedb AS con1 USER uptime;
1610
EXEC SQL PREPARE stmt1 FROM :query;
1611
EXEC SQL DECLARE cur1 CURSOR FOR stmt1;
1613
/* Create a SQLDA structure for an input parameter */
1614
sqlda2 = (sqlda_t *)malloc(sizeof(sqlda_t) + sizeof(sqlvar_t));
1615
memset(sqlda2, 0, sizeof(sqlda_t) + sizeof(sqlvar_t));
1616
sqlda2->sqln = 2; /* a number of input variables */
1618
sqlda2->sqlvar[0].sqltype = ECPGt_char;
1619
sqlda2->sqlvar[0].sqldata = "postgres";
1620
sqlda2->sqlvar[0].sqllen = 8;
1623
sqlda2->sqlvar[1].sqltype = ECPGt_int;
1624
sqlda2->sqlvar[1].sqldata = (char *) &intval;
1625
sqlda2->sqlvar[1].sqllen = sizeof(intval);
1627
/* Open a cursor with input parameters. */
1628
EXEC SQL OPEN cur1 USING DESCRIPTOR sqlda2;
1634
/* Assign descriptor to the cursor */
1635
EXEC SQL FETCH NEXT FROM cur1 INTO DESCRIPTOR sqlda1;
1637
for (cur_sqlda = sqlda1 ;
1639
cur_sqlda = cur_sqlda->desc_next)
1642
char name_buf[1024];
1645
/* Print every column in a row. */
1646
for (i=0 ; i<cur_sqlda->sqld ; i++)
1648
sqlvar_t v = cur_sqlda->sqlvar[i];
1649
char *sqldata = v.sqldata;
1650
short sqllen = v.sqllen;
1652
strncpy(name_buf, v.sqlname.data, v.sqlname.length);
1653
name_buf[v.sqlname.length] = '\0';
1658
memset(&var_buf, 0, sizeof(var_buf));
1659
memcpy(&var_buf, sqldata, (sizeof(var_buf)<=sqllen ? sizeof(var_buf)-1 : sqllen) );
1662
case ECPGt_int: /* integer */
1663
memcpy(&intval, sqldata, sqllen);
1664
snprintf(var_buf, sizeof(var_buf), "%d", intval);
1667
case ECPGt_long_long: /* bigint */
1668
memcpy(&longlongval, sqldata, sqllen);
1669
snprintf(var_buf, sizeof(var_buf), "%lld", longlongval);
1675
memset(var_buf, 0, sizeof(var_buf));
1676
for (i = 0; i < sqllen; i++)
1679
snprintf(tmpbuf, sizeof(tmpbuf), "%02x ", (unsigned char) sqldata[i]);
1680
strncat(var_buf, tmpbuf, sizeof(var_buf));
1686
printf("%s = %s (type: %d)\n", name_buf, var_buf, v.sqltype);
1693
EXEC SQL CLOSE cur1;
1696
EXEC SQL DISCONNECT ALL;
1701
> The output of this example should look something like the
1702
following (some numbers will vary).
1707
datname = template1 (type: 1)
1708
datdba = 10 (type: 1)
1709
encoding = 0 (type: 5)
1710
datistemplate = t (type: 1)
1711
datallowconn = t (type: 1)
1712
datconnlimit = -1 (type: 5)
1713
datlastsysoid = 11510 (type: 1)
1714
datfrozenxid = 379 (type: 1)
1715
dattablespace = 1663 (type: 1)
1716
datconfig = (type: 1)
1717
datacl = {=c/uptime,uptime=CTc/uptime} (type: 1)
1719
datname = template1 (type: 1)
1720
numbackends = 0 (type: 5)
1721
xact_commit = 113606 (type: 9)
1722
xact_rollback = 0 (type: 9)
1723
blks_read = 130 (type: 9)
1724
blks_hit = 7341714 (type: 9)
1725
tup_returned = 38262679 (type: 9)
1726
tup_fetched = 1836281 (type: 9)
1727
tup_inserted = 0 (type: 9)
1728
tup_updated = 0 (type: 9)
1729
tup_deleted = 0 (type: 9)
1731
oid = 11511 (type: 1)
1732
datname = postgres (type: 1)
1733
datdba = 10 (type: 1)
1734
encoding = 0 (type: 5)
1735
datistemplate = f (type: 1)
1736
datallowconn = t (type: 1)
1737
datconnlimit = -1 (type: 5)
1738
datlastsysoid = 11510 (type: 1)
1739
datfrozenxid = 379 (type: 1)
1740
dattablespace = 1663 (type: 1)
1741
datconfig = (type: 1)
1743
datid = 11511 (type: 1)
1744
datname = postgres (type: 1)
1745
numbackends = 0 (type: 5)
1746
xact_commit = 221069 (type: 9)
1747
xact_rollback = 18 (type: 9)
1748
blks_read = 1176 (type: 9)
1749
blks_hit = 13943750 (type: 9)
1750
tup_returned = 77410091 (type: 9)
1751
tup_fetched = 3253694 (type: 9)
1752
tup_inserted = 0 (type: 9)
1753
tup_updated = 0 (type: 9)
1754
tup_deleted = 0 (type: 9)</PRE
1764
SUMMARY="Footer navigation table"
1775
HREF="ecpg-pgtypes.html"
1793
HREF="ecpg-errors.html"
1803
>pgtypes Library</TD
b'\\ No newline at end of file'