Skip to content

Commit 705869d

Browse files
committed
Uppercase keywords where appropriate.
1 parent b577056 commit 705869d

File tree

12 files changed

+215
-222
lines changed

12 files changed

+215
-222
lines changed

doc/src/sgml/gist.sgml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ to check that. Other examples also worked, except polygons: I got an
5151
error doing
5252

5353
<ProgramListing>
54-
test=> create index pix on polytmp
55-
test-> using gist (p:box gist_poly_ops) with (islossy);
54+
test=> CREATE INDEX pix ON polytmp
55+
test-> USING GIST (p:box gist_poly_ops) WITH (ISLOSSY);
5656
ERROR: cannot open pix
5757

5858
(PostgreSQL 6.3 Sun Feb 1 14:57:30 EST 1998)
@@ -92,7 +92,7 @@ A few notes on the sources:
9292

9393
<ProgramListing>
9494
-- -- there's a memory leak in rtree poly_ops!!
95-
-- -- create index pix2 on polytmp using rtree (p poly_ops);
95+
-- -- CREATE INDEX pix2 ON polytmp USING RTREE (p poly_ops);
9696
</ProgramListing>
9797

9898
Roger that!! I thought it could be related to a number of

doc/src/sgml/jdbc.sgml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/jdbc.sgml,v 1.25 2001/09/13 15:55:22 petere Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/jdbc.sgml,v 1.26 2001/10/12 23:32:33 momjian Exp $
33
-->
44

55
<chapter id="jdbc">
@@ -2311,21 +2311,21 @@ public void unlink(int oid) throws SQLException
23112311
One of the consequences of this, is that you can have one table
23122312
refer to a row in another table. For example:
23132313
<screen>
2314-
test=> create table users (username name,fullname text);
2314+
test=> CREATE TABLE users (username NAME,fullname TEXT);
23152315
CREATE
2316-
test=> create table server (servername name,adminuser users);
2316+
test=> CREATE TABLE server (servername NAME,adminuser users);
23172317
CREATE
2318-
test=> insert into users values ('peter','Peter Mount');
2318+
test=> INSERT INTO users VALUES ('peter','Peter Mount');
23192319
INSERT 2610132 1
2320-
test=> insert into server values ('maidast',2610132::users);
2320+
test=> INSERT INTO server VALUES ('maidast',2610132::users);
23212321
INSERT 2610133 1
2322-
test=> select * from users;
2322+
test=> SELECT * FROM users;
23232323
username|fullname
23242324
--------+--------------
23252325
peter |Peter Mount
23262326
(1 row)
23272327

2328-
test=> select * from server;
2328+
test=> SELECT * FROM server;
23292329
servername|adminuser
23302330
----------+---------
23312331
maidast | 2610132

doc/src/sgml/libpgtcl.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ given chunk of code for each tuple in the result.
917917
This would work if table <classname>table</> has fields <structfield>control</> and <structfield>name</>
918918
(and, perhaps, other fields):
919919
<ProgramListing>
920-
pg_select $pgconn "SELECT * from table" array {
920+
pg_select $pgconn "SELECT * FROM table" array {
921921
puts [format "%5d %s" array(control) array(name)]
922922
}
923923
</ProgramListing>

doc/src/sgml/libpq++.sgml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.32 2001/09/13 15:55:23 petere Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.33 2001/10/12 23:32:34 momjian Exp $
33
-->
44

55
<chapter id="libpqplusplus">
@@ -794,8 +794,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.32 2001/09/13 15:55:
794794

795795
<programlisting>
796796
PgDatabase data;
797-
data.Exec("create table foo (a int4, b char(16), d double precision)");
798-
data.Exec("copy foo from stdin");
797+
data.Exec("CREATE TABLE foo (a int4, b char(16), d double precision)");
798+
data.Exec("COPY foo FROM STDIN");
799799
data.PutLine("3\tHello World\t4.5\n");
800800
data.PutLine("4\tGoodbye World\t7.11\n");
801801
&amp;...

doc/src/sgml/libpq.sgml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.72 2001/09/13 15:55:23 petere Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.73 2001/10/12 23:32:34 momjian Exp $
33
-->
44

55
<chapter id="libpq">
@@ -302,11 +302,11 @@ PostgresPollingStatusType PQconnectPoll(PGconn *conn)
302302
proceed with the connection sequence. Loop thus: Consider a connection
303303
<quote>inactive</quote> by default. If <function>PQconnectPoll</function> last returned <symbol>PGRES_POLLING_ACTIVE</>,
304304
consider it <quote>active</quote> instead. If <function>PQconnectPoll(conn)</function> last returned
305-
<symbol>PGRES_POLLING_READING</symbol>, perform a select for reading on <function>PQsocket(conn)</function>. If
306-
it last returned <symbol>PGRES_POLLING_WRITING</symbol>, perform a select for writing on
305+
<symbol>PGRES_POLLING_READING</symbol>, perform a SELECT for reading on <function>PQsocket(conn)</function>. If
306+
it last returned <symbol>PGRES_POLLING_WRITING</symbol>, perform a SELECT for writing on
307307
<function>PQsocket(conn)</function>. If you have yet to call <function>PQconnectPoll</function>, i.e. after the call
308308
to <function>PQconnectStart</function>, behave as if it last returned <symbol>PGRES_POLLING_WRITING</symbol>. If
309-
the select shows that the socket is ready, consider it <quote>active</quote>. If it has
309+
the SELECT shows that the socket is ready, consider it <quote>active</quote>. If it has
310310
been decided that this connection is <quote>active</quote>, call <function>PQconnectPoll(conn)</function>
311311
again. If this call returns <symbol>PGRES_POLLING_FAILED</symbol>, the connection procedure
312312
has failed. If this call returns <symbol>PGRES_POLLING_OK</symbol>, the connection has been
@@ -1763,8 +1763,8 @@ int PQendcopy(PGconn *conn);
17631763
As an example:
17641764

17651765
<programlisting>
1766-
PQexec(conn, "create table foo (a int4, b char(16), d double precision)");
1767-
PQexec(conn, "copy foo from stdin");
1766+
PQexec(conn, "CREATE TABLE foo (a int4, b char(16), d double precision)");
1767+
PQexec(conn, "COPY foo FROM STDIN");
17681768
PQputline(conn, "3\thello world\t4.5\n");
17691769
PQputline(conn,"4\tgoodbye world\t7.11\n");
17701770
...
@@ -2270,7 +2270,7 @@ main()
22702270
* fetch rows from the pg_database, the system catalog of
22712271
* databases
22722272
*/
2273-
res = PQexec(conn, "DECLARE mycursor CURSOR FOR select * from pg_database");
2273+
res = PQexec(conn, "DECLARE mycursor CURSOR FOR SELECT * FROM pg_database");
22742274
if (!res || PQresultStatus(res) != PGRES_COMMAND_OK)
22752275
{
22762276
fprintf(stderr, "DECLARE CURSOR command failed\n");
@@ -2541,7 +2541,7 @@ main()
25412541
* fetch rows from the pg_database, the system catalog of
25422542
* databases
25432543
*/
2544-
res = PQexec(conn, "DECLARE mycursor BINARY CURSOR FOR select * from test1");
2544+
res = PQexec(conn, "DECLARE mycursor BINARY CURSOR FOR SELECT * FROM test1");
25452545
if (!res || PQresultStatus(res) != PGRES_COMMAND_OK)
25462546
{
25472547
fprintf(stderr, "DECLARE CURSOR command failed\n");

doc/src/sgml/maintenance.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.4 2001/09/23 04:06:24 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.5 2001/10/12 23:32:34 momjian Exp $
33
-->
44

55
<chapter id="maintenance">
@@ -304,7 +304,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.4 2001/09/23 04:06:24
304304
examine this information is to execute the query
305305
<informalexample>
306306
<programlisting>
307-
select datname, age(datfrozenxid) from pg_database;
307+
SELECT datname, age(datfrozenxid) FROM pg_database;
308308
</programlisting>
309309
</informalexample>
310310
The <literal>age</> column measures the number of transactions from the

doc/src/sgml/perform.sgml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/perform.sgml,v 1.11 2001/10/09 18:46:00 petere Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/perform.sgml,v 1.12 2001/10/12 23:32:34 momjian Exp $
33
-->
44

55
<chapter id="performance-tips">
@@ -95,7 +95,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/perform.sgml,v 1.11 2001/10/09 18:46:00 pet
9595
vacuum analyze, and 7.2 development sources):
9696

9797
<programlisting>
98-
regression=# explain select * from tenk1;
98+
regression=# EXPLAIN SELECT * FROM tenk1;
9999
NOTICE: QUERY PLAN:
100100

101101
Seq Scan on tenk1 (cost=0.00..333.00 rows=10000 width=148)
@@ -106,7 +106,7 @@ Seq Scan on tenk1 (cost=0.00..333.00 rows=10000 width=148)
106106
This is about as straightforward as it gets. If you do
107107

108108
<programlisting>
109-
select * from pg_class where relname = 'tenk1';
109+
SELECT * FROM pg_class WHERE relname = 'tenk1';
110110
</programlisting>
111111

112112
you will find out that <classname>tenk1</classname> has 233 disk
@@ -119,7 +119,7 @@ select * from pg_class where relname = 'tenk1';
119119
Now let's modify the query to add a qualification clause:
120120

121121
<programlisting>
122-
regression=# explain select * from tenk1 where unique1 &lt; 1000;
122+
regression=# EXPLAIN SELECT * FROM tenk1 WHERE unique1 &lt; 1000;
123123
NOTICE: QUERY PLAN:
124124

125125
Seq Scan on tenk1 (cost=0.00..358.00 rows=1007 width=148)
@@ -144,7 +144,7 @@ Seq Scan on tenk1 (cost=0.00..358.00 rows=1007 width=148)
144144
Modify the query to restrict the qualification even more:
145145

146146
<programlisting>
147-
regression=# explain select * from tenk1 where unique1 &lt; 50;
147+
regression=# EXPLAIN SELECT * FROM tenk1 WHERE unique1 &lt; 50;
148148
NOTICE: QUERY PLAN:
149149

150150
Index Scan using tenk1_unique1 on tenk1 (cost=0.00..181.09 rows=49 width=148)
@@ -162,7 +162,7 @@ Index Scan using tenk1_unique1 on tenk1 (cost=0.00..181.09 rows=49 width=148)
162162
Add another condition to the qualification:
163163

164164
<programlisting>
165-
regression=# explain select * from tenk1 where unique1 &lt; 50 and
165+
regression=# EXPLAIN SELECT * FROM tenk1 WHERE unique1 &lt; 50 AND
166166
regression-# stringu1 = 'xxx';
167167
NOTICE: QUERY PLAN:
168168

@@ -177,8 +177,8 @@ Index Scan using tenk1_unique1 on tenk1 (cost=0.00..181.22 rows=1 width=148)
177177
Let's try joining two tables, using the fields we have been discussing:
178178

179179
<programlisting>
180-
regression=# explain select * from tenk1 t1, tenk2 t2 where t1.unique1 &lt; 50
181-
regression-# and t1.unique2 = t2.unique2;
180+
regression=# EXPLAIN SELECT * FROM tenk1 t1, tenk2 t2 WHERE t1.unique1 &lt; 50
181+
regression-# AND t1.unique2 = t2.unique2;
182182
NOTICE: QUERY PLAN:
183183

184184
Nested Loop (cost=0.00..330.41 rows=49 width=296)
@@ -225,8 +225,8 @@ Nested Loop (cost=0.00..330.41 rows=49 width=296)
225225
<programlisting>
226226
regression=# set enable_nestloop = off;
227227
SET VARIABLE
228-
regression=# explain select * from tenk1 t1, tenk2 t2 where t1.unique1 &lt; 50
229-
regression-# and t1.unique2 = t2.unique2;
228+
regression=# EXPLAIN SELECT * FROM tenk1 t1, tenk2 t2 WHERE t1.unique1 &lt; 50
229+
regression-# AND t1.unique2 = t2.unique2;
230230
NOTICE: QUERY PLAN:
231231

232232
Hash Join (cost=181.22..564.83 rows=49 width=296)
@@ -257,9 +257,9 @@ Hash Join (cost=181.22..564.83 rows=49 width=296)
257257
For example, we might get a result like this:
258258

259259
<screen>
260-
regression=# explain analyze
261-
regression-# select * from tenk1 t1, tenk2 t2
262-
regression-# where t1.unique1 &lt; 50 and t1.unique2 = t2.unique2;
260+
regression=# EXPLAIN ANALYZE
261+
regression-# SELECT * FROM tenk1 t1, tenk2 t2
262+
regression-# WHERE t1.unique1 &lt; 50 AND t1.unique2 = t2.unique2;
263263
NOTICE: QUERY PLAN:
264264

265265
Nested Loop (cost=0.00..330.41 rows=49 width=296) (actual time=1.31..28.90 rows=50 loops=1)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy