Skip to content

Commit 30e355f

Browse files
author
Thomas G. Lockhart
committed
Fix path to initdb in installation instructions.
General cleanup for 7.0.
1 parent b2096a5 commit 30e355f

File tree

11 files changed

+1304
-967
lines changed

11 files changed

+1304
-967
lines changed

doc/src/sgml/advanced.sgml

Lines changed: 41 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/advanced.sgml,v 1.9 2000/03/31 03:27:40 thomas Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/advanced.sgml,v 1.10 2000/04/07 13:30:58 thomas Exp $
33
-->
44

55
<chapter id="advanced">
@@ -106,10 +106,10 @@ SELECT c.name, c.altitude
106106
Here the <quote>*</quote> after cities indicates that the query should
107107
be run over cities and all classes below cities in the
108108
inheritance hierarchy. Many of the commands that we
109-
have already discussed (<command>select</command>,
110-
<command>update</command> and <command>delete</command>)
109+
have already discussed (<command>SELECT</command>,
110+
<command>UPDATE</command> and <command>DELETE</command>)
111111
support this <quote>*</quote> notation, as do others, like
112-
<command>alter</command>.
112+
<command>ALTER</command>.
113113
</para>
114114
</sect1>
115115

@@ -118,7 +118,8 @@ SELECT c.name, c.altitude
118118

119119
<para>
120120
One of the tenets of the relational model is that the
121-
attributes of a relation are atomic. <productname>Postgres</productname> does not
121+
attributes of a relation are atomic.
122+
<productname>Postgres</productname> does not
122123
have this restriction; attributes can themselves contain
123124
sub-values that can be accessed from the query
124125
language. For example, you can create attributes that
@@ -129,7 +130,8 @@ SELECT c.name, c.altitude
129130
<title>Arrays</title>
130131

131132
<para>
132-
<productname>Postgres</productname> allows attributes of an instance to be defined
133+
<productname>Postgres</productname> allows attributes of an
134+
instance to be defined
133135
as fixed-length or variable-length multi-dimensional
134136
arrays. Arrays of any base type or user-defined type
135137
can be created. To illustrate their use, we first create a
@@ -149,11 +151,14 @@ CREATE TABLE SAL_EMP (
149151
a <firstterm>text</firstterm> string (name), a one-dimensional
150152
array of <firstterm>int4</firstterm>
151153
(pay_by_quarter), which represents the employee's
152-
salary by quarter and a two-dimensional array of <firstterm>text</firstterm>
154+
salary by quarter and a two-dimensional array of
155+
<firstterm>text</firstterm>
153156
(schedule), which represents the employee's weekly
154-
schedule. Now we do some <firstterm>INSERTS</firstterm>s; note that when
157+
schedule. Now we do some <firstterm>INSERTS</firstterm>s;
158+
note that when
155159
appending to an array, we enclose the values within
156-
braces and separate them by commas. If you know <firstterm>C</firstterm>,
160+
braces and separate them by commas. If you know
161+
<firstterm>C</firstterm>,
157162
this is not unlike the syntax for initializing structures.
158163

159164
<programlisting>
@@ -168,7 +173,8 @@ INSERT INTO SAL_EMP
168173
'{{"talk", "consult"}, {"meeting"}}');
169174
</programlisting>
170175

171-
By default, <productname>Postgres</productname> uses the "one-based" numbering
176+
By default, <productname>Postgres</productname> uses the
177+
"one-based" numbering
172178
convention for arrays -- that is, an array of n elements
173179
starts with array[1] and ends with array[n].
174180
Now, we can run some queries on SAL_EMP. First, we
@@ -228,6 +234,11 @@ SELECT SAL_EMP.schedule[1:2][1:1]
228234
</sect2>
229235
</sect1>
230236

237+
<!--
238+
239+
We haven't had Time Travel for two or three years, so let's stop
240+
mentioning it. - thomas 2000-04-02
241+
231242
<sect1>
232243
<title>Time Travel</title>
233244

@@ -240,21 +251,27 @@ SELECT SAL_EMP.schedule[1:2][1:1]
240251
</para>
241252

242253
<para>
243-
New features such as triggers allow one to mimic the behavior of time travel when desired, without
244-
incurring the overhead when it is not needed (for most users, this is most of the time).
245-
See examples in the <filename>contrib</filename> directory for more information.
254+
New features such as triggers allow one to mimic the behavior of
255+
time travel when desired, without
256+
incurring the overhead when it is not needed (for most users, this
257+
is most of the time).
258+
See examples in the <filename>contrib</filename> directory for
259+
more information.
246260
</para>
247261

248262
<note>
249263
<title>Time travel is deprecated</title>
250264
<para>
251-
The remaining text in this section is retained only until it can be rewritten in the context
252-
of new techniques to accomplish the same purpose. Volunteers? - thomas 1998-01-12
265+
The remaining text in this section is retained only until it can
266+
be rewritten in the context
267+
of new techniques to accomplish the same purpose.
268+
Volunteers? - thomas 1998-01-12
253269
</para>
254270
</note>
255271

256272
<para>
257-
<productname>Postgres</productname> supports the notion of time travel. This feature
273+
<productname>Postgres</productname> supports the notion of time
274+
travel. This feature
258275
allows a user to run historical queries. For
259276
example, to find the current population of Mariposa
260277
city, one would query:
@@ -269,7 +286,8 @@ SELECT * FROM cities WHERE name = 'Mariposa';
269286
+---------+------------+----------+
270287
</programlisting>
271288

272-
<productname>Postgres</productname> will automatically find the version of Mariposa's
289+
<productname>Postgres</productname> will automatically find the
290+
version of Mariposa's
273291
record valid at the current time.
274292
One can also give a time range. For example to see the
275293
past and present populations of Mariposa, one would
@@ -313,18 +331,22 @@ SELECT name, population
313331
abbreviated as ``[,].''
314332
</para>
315333
</sect1>
334+
-->
316335

317336
<sect1>
318337
<title>More Advanced Features</title>
319338

320339
<para>
321-
<productname>Postgres</productname> has many features not touched upon in this
340+
<productname>Postgres</productname> has many features not touched
341+
upon in this
322342
tutorial introduction, which has been oriented toward newer users of
323343
<acronym>SQL</acronym>.
324-
These are discussed in more detail in both the User's and Programmer's Guides.
344+
These are discussed in more detail in both the User's and
345+
Programmer's Guides.
325346
</para>
326347

327348
</sect1>
349+
328350
</chapter>
329351

330352
<!-- Keep this comment at the end of the file

doc/src/sgml/func.sgml

Lines changed: 103 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@
8888
<entry>abs(-17.4)</entry>
8989
</row>
9090
<row>
91-
<entry>sqrt(float8)</entry>
91+
<entry>degrees(float8)</entry>
9292
<entry>float8</entry>
93-
<entry>square root</entry>
94-
<entry>sqrt(2.0)</entry>
93+
<entry>radians to degrees</entry>
94+
<entry>degrees(0.5)</entry>
9595
</row>
9696
<row>
9797
<entry>exp(float8)</entry>
@@ -111,18 +111,36 @@
111111
<entry>base 10 logarithm</entry>
112112
<entry>log(2.0)</entry>
113113
</row>
114+
<row>
115+
<entry>pi()</entry>
116+
<entry>float8</entry>
117+
<entry>fundamental constant</entry>
118+
<entry>pi()</entry>
119+
</row>
114120
<row>
115121
<entry>pow(float8,float8)</entry>
116122
<entry>float8</entry>
117123
<entry>raise a number to the specified exponent</entry>
118124
<entry>pow(2.0, 16.0)</entry>
119125
</row>
126+
<row>
127+
<entry>radians(float8)</entry>
128+
<entry>float8</entry>
129+
<entry>degrees to radians</entry>
130+
<entry>radians(45.0)</entry>
131+
</row>
120132
<row>
121133
<entry>round(float8)</entry>
122134
<entry>float8</entry>
123135
<entry>round to nearest integer</entry>
124136
<entry>round(42.4)</entry>
125137
</row>
138+
<row>
139+
<entry>sqrt(float8)</entry>
140+
<entry>float8</entry>
141+
<entry>square root</entry>
142+
<entry>sqrt(2.0)</entry>
143+
</row>
126144
<row>
127145
<entry>trunc(float8)</entry>
128146
<entry>float8</entry>
@@ -156,6 +174,88 @@
156174
Most of the functions listed for FLOAT8 are also available for
157175
type NUMERIC.
158176
</para>
177+
178+
<para>
179+
<table tocentry="1">
180+
<title>Transcendental Mathematical Functions</title>
181+
<tgroup cols="4">
182+
<thead>
183+
<row>
184+
<entry>Function</entry>
185+
<entry>Returns</entry>
186+
<entry>Description</entry>
187+
<entry>Example</entry>
188+
</row>
189+
</thead>
190+
<tbody>
191+
<row>
192+
<entry>acos(float8)</entry>
193+
<entry>float8</entry>
194+
<entry>arccosine</entry>
195+
<entry>acos(10.0)</entry>
196+
</row>
197+
<row>
198+
<entry>asin(float8)</entry>
199+
<entry>float8</entry>
200+
<entry>arcsine</entry>
201+
<entry>asin(10.0)</entry>
202+
</row>
203+
<row>
204+
<entry>atan(float8)</entry>
205+
<entry>float8</entry>
206+
<entry>arctangent</entry>
207+
<entry>atan(10.0)</entry>
208+
</row>
209+
<row>
210+
<entry>atan2(float8,float8)</entry>
211+
<entry>float8</entry>
212+
<entry>arctangent</entry>
213+
<entry>atan3(10.0,20.0)</entry>
214+
</row>
215+
<row>
216+
<entry>cos(float8)</entry>
217+
<entry>float8</entry>
218+
<entry>cosine</entry>
219+
<entry>cos(0.4)</entry>
220+
</row>
221+
<row>
222+
<entry>cot(float8)</entry>
223+
<entry>float8</entry>
224+
<entry>cotangent</entry>
225+
<entry>cot(20.0)</entry>
226+
</row>
227+
<row>
228+
<entry>sin(float8)</entry>
229+
<entry>float8</entry>
230+
<entry>sine</entry>
231+
<entry>cos(0.4)</entry>
232+
</row>
233+
<row>
234+
<entry>cos(float8)</entry>
235+
<entry>float8</entry>
236+
<entry>cosine</entry>
237+
<entry>cos(0.4)</entry>
238+
</row>
239+
<row>
240+
<entry>cos(float8)</entry>
241+
<entry>float8</entry>
242+
<entry>cosine</entry>
243+
<entry>cos(0.4)</entry>
244+
</row>
245+
<row>
246+
<entry>cos(float8)</entry>
247+
<entry>float8</entry>
248+
<entry>cosine</entry>
249+
<entry>cos(0.4)</entry>
250+
</row>
251+
<row>
252+
<entry>cos(float8)</entry>
253+
<entry>float8</entry>
254+
<entry>cosine</entry>
255+
<entry>cos(0.4)</entry>
256+
</row>
257+
258+
159259
</sect1>
160260

161261
<sect1>

0 commit comments

Comments
 (0)