Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit b06e6f1

Browse files
author
Neil Conway
committed
Change the parameter_types column of the pg_prepared_statements to be
an array of regtype, rather than an array of OIDs. This is likely to be more useful to user, and the type OID can easily be obtained by casting a regtype value to OID. Per suggestion from Tom. Update the documentation and regression tests, and bump the catversion.
1 parent 1ce4c9e commit b06e6f1

File tree

7 files changed

+96
-86
lines changed

7 files changed

+96
-86
lines changed

doc/src/sgml/catalogs.sgml

+58-55
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!--
22
Documentation of the system catalogs, directed toward PostgreSQL developers
3-
$PostgreSQL: pgsql/doc/src/sgml/catalogs.sgml,v 2.116 2006/01/08 07:00:24 neilc Exp $
3+
$PostgreSQL: pgsql/doc/src/sgml/catalogs.sgml,v 2.117 2006/01/16 18:15:30 neilc Exp $
44
-->
55

66
<chapter id="catalogs">
@@ -284,19 +284,20 @@
284284
<entry>
285285
The initial value of the transition state. This is a text
286286
field containing the initial value in its external string
287-
representation. If this field is null, the transition state
288-
value starts out null.
287+
representation. If this field is NULL, the transition state
288+
value starts out NULL.
289289
</entry>
290290
</row>
291291
</tbody>
292292
</tgroup>
293293
</table>
294294

295295
<para>
296-
New aggregate functions are registered with the <command>CREATE
297-
AGGREGATE</command> command. See <xref linkend="xaggr"> for more
298-
information about writing aggregate functions and the meaning of
299-
the transition functions, etc.
296+
New aggregate functions are registered with the <xref
297+
linkend="sql-createaggregate" endterm="sql-createaggregate-title">
298+
command. See <xref linkend="xaggr"> for more information about
299+
writing aggregate functions and the meaning of the transition
300+
functions, etc.
300301
</para>
301302

302303
</sect1>
@@ -1018,7 +1019,7 @@
10181019
<entry><type>bool</type></entry>
10191020
<entry></entry>
10201021
<entry>
1021-
Role may log in, that is, this role can be given as the initial
1022+
Role may log in. That is, this role can be given as the initial
10221023
session authorization identifier.
10231024
</entry>
10241025
</row>
@@ -1561,29 +1562,29 @@
15611562
<entry><structfield>relukeys</structfield></entry>
15621563
<entry><type>int2</type></entry>
15631564
<entry></entry>
1564-
<entry>unused (<emphasis>not</emphasis> the number of unique keys)</entry>
1565+
<entry>Unused (<emphasis>not</emphasis> the number of unique keys)</entry>
15651566
</row>
15661567

15671568
<row>
15681569
<entry><structfield>relfkeys</structfield></entry>
15691570
<entry><type>int2</type></entry>
15701571
<entry></entry>
1571-
<entry>unused (<emphasis>not</emphasis> the number of foreign keys on the table)</entry>
1572+
<entry>Unused (<emphasis>not</emphasis> the number of foreign keys on the table)</entry>
15721573
</row>
15731574

15741575
<row>
15751576
<entry><structfield>relrefs</structfield></entry>
15761577
<entry><type>int2</type></entry>
15771578
<entry></entry>
1578-
<entry>unused</entry>
1579+
<entry>Unused</entry>
15791580
</row>
15801581

15811582
<row>
15821583
<entry><structfield>relhasoids</structfield></entry>
15831584
<entry><type>bool</type></entry>
15841585
<entry></entry>
15851586
<entry>
1586-
True if we generate an OID for each row of the relation.
1587+
True if we generate an OID for each row of the relation
15871588
</entry>
15881589
</row>
15891590

@@ -1592,7 +1593,7 @@
15921593
<entry><type>bool</type></entry>
15931594
<entry></entry>
15941595
<entry>
1595-
True if the table has (or once had) a primary key.
1596+
True if the table has (or once had) a primary key
15961597
</entry>
15971598
</row>
15981599

@@ -1601,15 +1602,15 @@
16011602
<entry><type>bool</type></entry>
16021603
<entry></entry>
16031604
<entry>True if table has rules; see
1604-
<structname>pg_rewrite</structname> catalog.
1605+
<structname>pg_rewrite</structname> catalog
16051606
</entry>
16061607
</row>
16071608

16081609
<row>
16091610
<entry><structfield>relhassubclass</structfield></entry>
16101611
<entry><type>bool</type></entry>
16111612
<entry></entry>
1612-
<entry>True if table has (or once had) any inheritance children.</entry>
1613+
<entry>True if table has (or once had) any inheritance children</entry>
16131614
</row>
16141615

16151616
<row>
@@ -1620,7 +1621,7 @@
16201621
Access privileges; see
16211622
<xref linkend="sql-grant" endterm="sql-grant-title"> and
16221623
<xref linkend="sql-revoke" endterm="sql-revoke-title">
1623-
for details.
1624+
for details
16241625
</entry>
16251626
</row>
16261627
</tbody>
@@ -2030,7 +2031,7 @@
20302031
Access privileges; see
20312032
<xref linkend="sql-grant" endterm="sql-grant-title"> and
20322033
<xref linkend="sql-revoke" endterm="sql-revoke-title">
2033-
for details.
2034+
for details
20342035
</entry>
20352036
</row>
20362037
</tbody>
@@ -2131,7 +2132,7 @@
21312132
<entry><type>char</type></entry>
21322133
<entry></entry>
21332134
<entry>
2134-
A code defining the specific semantics of this dependency relationship; see text.
2135+
A code defining the specific semantics of this dependency relationship; see text
21352136
</entry>
21362137
</row>
21372138

@@ -2273,7 +2274,7 @@
22732274
<entry><structfield>description</structfield></entry>
22742275
<entry><type>text</type></entry>
22752276
<entry></entry>
2276-
<entry>Arbitrary text that serves as the description of this object.</entry>
2277+
<entry>Arbitrary text that serves as the description of this object</entry>
22772278
</row>
22782279
</tbody>
22792280
</tgroup>
@@ -2335,7 +2336,7 @@
23352336
<entry><structfield>indisunique</structfield></entry>
23362337
<entry><type>bool</type></entry>
23372338
<entry></entry>
2338-
<entry>If true, this is a unique index.</entry>
2339+
<entry>If true, this is a unique index</entry>
23392340
</row>
23402341

23412342
<row>
@@ -2350,7 +2351,7 @@
23502351
<entry><structfield>indisclustered</structfield></entry>
23512352
<entry><type>bool</type></entry>
23522353
<entry></entry>
2353-
<entry>If true, the table was last clustered on this index.</entry>
2354+
<entry>If true, the table was last clustered on this index</entry>
23542355
</row>
23552356

23562357
<row>
@@ -2385,15 +2386,15 @@
23852386
<entry>Expression trees (in <function>nodeToString()</function> representation)
23862387
for index attributes that are not simple column references. This is a
23872388
list with one element for each zero entry in <structfield>indkey</>.
2388-
Null if all index attributes are simple references.</entry>
2389+
NULL if all index attributes are simple references.</entry>
23892390
</row>
23902391

23912392
<row>
23922393
<entry><structfield>indpred</structfield></entry>
23932394
<entry><type>text</type></entry>
23942395
<entry></entry>
23952396
<entry>Expression tree (in <function>nodeToString()</function> representation)
2396-
for partial index predicate. Null if not a partial index.</entry>
2397+
for partial index predicate. NULL if not a partial index.</entry>
23972398
</row>
23982399
</tbody>
23992400
</tgroup>
@@ -2435,7 +2436,7 @@
24352436
<entry><type>oid</type></entry>
24362437
<entry><literal><link linkend="catalog-pg-class"><structname>pg_class</structname></link>.oid</literal></entry>
24372438
<entry>
2438-
The OID of the child table.
2439+
The OID of the child table
24392440
</entry>
24402441
</row>
24412442

@@ -2444,7 +2445,7 @@
24442445
<entry><type>oid</type></entry>
24452446
<entry><literal><link linkend="catalog-pg-class"><structname>pg_class</structname></link>.oid</literal></entry>
24462447
<entry>
2447-
The OID of the parent table.
2448+
The OID of the parent table
24482449
</entry>
24492450
</row>
24502451

@@ -2556,7 +2557,7 @@
25562557
Access privileges; see
25572558
<xref linkend="sql-grant" endterm="sql-grant-title"> and
25582559
<xref linkend="sql-revoke" endterm="sql-revoke-title">
2559-
for details.
2560+
for details
25602561
</entry>
25612562
</row>
25622563
</tbody>
@@ -2683,7 +2684,7 @@
26832684
<entry><structfield>listenerpid</structfield></entry>
26842685
<entry><type>int4</type></entry>
26852686
<entry></entry>
2686-
<entry>PID of the server process that created this entry.</entry>
2687+
<entry>PID of the server process that created this entry</entry>
26872688
</row>
26882689

26892690
<row>
@@ -2752,7 +2753,7 @@
27522753
Access privileges; see
27532754
<xref linkend="sql-grant" endterm="sql-grant-title"> and
27542755
<xref linkend="sql-revoke" endterm="sql-revoke-title">
2755-
for details.
2756+
for details
27562757
</entry>
27572758
</row>
27582759
</tbody>
@@ -3030,8 +3031,8 @@
30303031
</table>
30313032

30323033
<para>
3033-
Unused column contain zeroes, for example <structfield>oprleft</structfield> is zero for a
3034-
prefix operator.
3034+
Unused column contain zeroes. For example, <structfield>oprleft</structfield>
3035+
is zero for a prefix operator.
30353036
</para>
30363037

30373038
</sect1>
@@ -3123,9 +3124,10 @@
31233124
<para>
31243125
There are not currently any commands that manipulate procedural language
31253126
templates; to change the built-in information, a superuser must modify
3126-
the table using ordinary INSERT, DELETE, or UPDATE commands. It is
3127-
likely that a future release of <productname>PostgreSQL</productname>
3128-
will offer commands to change the entries in a cleaner fashion.
3127+
the table using ordinary <command>INSERT</command>, <command>DELETE</command>,
3128+
or <command>UPDATE</command> commands. It is likely that a future
3129+
release of <productname>PostgreSQL</productname> will offer
3130+
commands to change the entries in a cleaner fashion.
31293131
</para>
31303132

31313133
<para>
@@ -3349,7 +3351,7 @@
33493351
Access privileges; see
33503352
<xref linkend="sql-grant" endterm="sql-grant-title"> and
33513353
<xref linkend="sql-revoke" endterm="sql-revoke-title">
3352-
for details.
3354+
for details
33533355
</entry>
33543356
</row>
33553357
</tbody>
@@ -3552,7 +3554,7 @@
35523554
<entry><type>char</type></entry>
35533555
<entry></entry>
35543556
<entry>
3555-
A code defining the specific semantics of this dependency relationship; see text.
3557+
A code defining the specific semantics of this dependency relationship; see text
35563558
</entry>
35573559
</row>
35583560

@@ -3743,8 +3745,8 @@
37433745
<entry></entry>
37443746
<entry>
37453747
Numerical statistics of the appropriate kind for the
3746-
<replaceable>N</>th <quote>slot</quote>, or null if the slot
3747-
kind does not involve numerical values.
3748+
<replaceable>N</>th <quote>slot</quote>, or NULL if the slot
3749+
kind does not involve numerical values
37483750
</entry>
37493751
</row>
37503752

@@ -3754,7 +3756,7 @@
37543756
<entry></entry>
37553757
<entry>
37563758
Column data values of the appropriate kind for the
3757-
<replaceable>N</>th <quote>slot</quote>, or null if the slot
3759+
<replaceable>N</>th <quote>slot</quote>, or NULL if the slot
37583760
kind does not store any data values. Each array's element
37593761
values are actually of the specific column's data type, so there
37603762
is no way to define these columns' type more specifically than
@@ -3831,7 +3833,7 @@
38313833
Access privileges; see
38323834
<xref linkend="sql-grant" endterm="sql-grant-title"> and
38333835
<xref linkend="sql-revoke" endterm="sql-revoke-title">
3834-
for details.
3836+
for details
38353837
</entry>
38363838
</row>
38373839
</tbody>
@@ -3955,7 +3957,7 @@
39553957
<entry><structfield>tgargs</structfield></entry>
39563958
<entry><type>bytea</type></entry>
39573959
<entry></entry>
3958-
<entry>Argument strings to pass to trigger, each null-terminated</entry>
3960+
<entry>Argument strings to pass to trigger, each NULL-terminated</entry>
39593961
</row>
39603962
</tbody>
39613963
</tgroup>
@@ -4374,12 +4376,12 @@
43744376

43754377
<row>
43764378
<entry><link linkend="view-pg-prepared-statements"><structname>pg_prepared_statements</structname></link></entry>
4377-
<entry>current prepared statements</entry>
4379+
<entry>prepared statements</entry>
43784380
</row>
43794381

43804382
<row>
43814383
<entry><link linkend="view-pg-prepared-xacts"><structname>pg_prepared_xacts</structname></link></entry>
4382-
<entry>currently prepared transactions</entry>
4384+
<entry>prepared transactions</entry>
43834385
</row>
43844386

43854387
<row>
@@ -4684,7 +4686,7 @@
46844686
<entry><type>xid</type></entry>
46854687
<entry></entry>
46864688
<entry>
4687-
ID of the transaction that is holding or awaiting this lock.
4689+
ID of the transaction that is holding or awaiting this lock
46884690
</entry>
46894691
</row>
46904692
<row>
@@ -4693,7 +4695,7 @@
46934695
<entry></entry>
46944696
<entry>
46954697
Process ID of the server process holding or awaiting this
4696-
lock. Null if the lock is held by a prepared transaction.
4698+
lock. NULL if the lock is held by a prepared transaction.
46974699
</entry>
46984700
</row>
46994701
<row>
@@ -4801,10 +4803,9 @@
48014803
<para>
48024804
<structname>pg_prepared_statements</structname> contains one row
48034805
for each prepared statement. Rows are added to the view when a new
4804-
prepared statement is created, and removed when a prepared
4805-
statement is released (for example, via the <xref
4806-
linkend="sql-deallocate" endterm="sql-deallocate-title">
4807-
command).
4806+
prepared statement is created and removed when a prepared statement
4807+
is released (for example, via the <xref linkend="sql-deallocate"
4808+
endterm="sql-deallocate-title"> command).
48084809
</para>
48094810

48104811
<table>
@@ -4825,7 +4826,7 @@
48254826
<entry><type>text</type></entry>
48264827
<entry></entry>
48274828
<entry>
4828-
The identifier of the prepared statement.
4829+
The identifier of the prepared statement
48294830
</entry>
48304831
</row>
48314832
<row>
@@ -4846,16 +4847,18 @@
48464847
<entry><type>timestamptz</type></entry>
48474848
<entry></entry>
48484849
<entry>
4849-
The time at which the prepared statement was created.
4850+
The time at which the prepared statement was created
48504851
</entry>
48514852
</row>
48524853
<row>
48534854
<entry><structfield>parameter_types</structfield></entry>
4854-
<entry><type>oid[]</type></entry>
4855+
<entry><type>regtype[]</type></entry>
48554856
<entry></entry>
48564857
<entry>
4857-
The expected parameter types for the prepared statement in the form of
4858-
an array of type OIDs.
4858+
The expected parameter types for the prepared statement in the
4859+
form of an array of <type>regtype</type>. The OID corresponding
4860+
to an element of this array can be obtained by casting the
4861+
<type>regtype</type> value to <type>oid</type>.
48594862
</entry>
48604863
</row>
48614864
<row>
@@ -4866,7 +4869,7 @@
48664869
<literal>true</literal> if the prepared statement was created
48674870
via the <command>PREPARE</command> SQL statement;
48684871
<literal>false</literal> if the statement was prepared via the
4869-
frontend/backend protocol.
4872+
frontend/backend protocol
48704873
</entry>
48714874
</row>
48724875
</tbody>
@@ -5733,7 +5736,7 @@
57335736
<entry><structfield>definition</structfield></entry>
57345737
<entry><type>text</type></entry>
57355738
<entry></entry>
5736-
<entry>view definition (a reconstructed SELECT query)</entry>
5739+
<entry>view definition (a reconstructed <command>SELECT</command> query)</entry>
57375740
</row>
57385741
</tbody>
57395742
</tgroup>

0 commit comments

Comments
 (0)