*** ./doc/src/sgml/array.sgml.orig Mon Dec 4 01:32:07 2000
--- ./doc/src/sgml/array.sgml Mon Dec 4 01:38:12 2000
***************
*** 153,156 ****
--- 153,194 ----
unspecified length.
+
+ To search for a value in an array, you must check each value of
+ the array. This can be done by hand (if you know the size of the array):
+
+
+ SELECT * FROM sal_emp WHERE pay_by_quarter[1] = 10000 OR
+ pay_by_quarter[2] = 10000 OR
+ pay_by_quarter[3] = 10000 OR
+ pay_by_quarter[4] = 10000;
+
+
+ However, this quickly becomes tedious for large arrays, and is not helpful
+ if the size of the array is unknown. Although it is not part of the primary
+ PostgreSQL distribution, in the contributions directory, there is an extension to
+ PostgreSQL that defines new functions and operators for iterating over array
+ values. Using this, the above query could be:
+
+
+ SELECT * FROM sal_emp WHERE pay_by_quarter[1:4] *= 10000;
+
+
+ To search the entire array (not just specified columns), you could use:
+
+
+ SELECT * FROM sal_emp WHERE pay_by_quarter *= 10000;
+
+
+ In addition, you could find rows where the array had all values equal to
+ 10,000 with:
+
+
+ SELECT * FROM sal_emp WHERE pay_by_quarter **= 10000;
+
+
+ To install this optional module, look in the /contrib/array directory
+ of the PostgreSQL source installation.
+
+
*** ./doc/src/sgml/datatype.sgml.orig Mon Dec 4 01:28:32 2000
--- ./doc/src/sgml/datatype.sgml Mon Dec 4 01:31:51 2000
***************
*** 138,143 ****
--- 138,148 ----
exact numeric with selectable precision
+ oid
+
+ object id (unique identifier for every PostgreSQL object
+
+
path
open and closed geometric path in 2D plane
***************
*** 155,161 ****
serial
! unique id for indexing and cross-reference
text
--- 160,166 ----
serial
! unique integer id for indexing and cross-reference
text
***************
*** 1383,1389 ****
NULL is an
effective substitute. bool can be used in any boolean expression,
and boolean expressions
! always evaluate to a result compatible with this type.
bool uses 1 byte of storage.
--- 1388,1402 ----
NULL is an
effective substitute. bool can be used in any boolean expression,
and boolean expressions
! always evaluate to a result compatible with this type.
!
!
!
! Note that bool values do not have a numeric equivalent.
! PostgreSQL will reject, for example, a boolean value input as an number
! (unless entered as a string, '1' for true, and '0' for false).
! A bool value cannot be CAST into a numeric values.
!
bool uses 1 byte of storage.
*** ./doc/src/sgml/func.sgml.orig Mon Dec 4 01:20:40 2000
--- ./doc/src/sgml/func.sgml Mon Dec 4 01:23:59 2000
***************
*** 88,93 ****
--- 88,103 ----
abs(-17.4)
+ ceil(numeric)
+ numeric
+ smallest integer >= value
+
+
+ floor(numeric)
+ numeric
+ largest integer <= value
+
+
degrees(float8)
float8
radians to degrees
***************
*** 110,115 ****
--- 120,131 ----
float8
base 10 logarithm
log(2.0)
+
+
+ log(numeric, numeric)
+ numeric
+ logarithm base n of m
+ log(5.0, 2.0)
pi()
*** ./doc/src/sgml/oper.sgml.orig Mon Dec 4 01:17:45 2000
--- ./doc/src/sgml/oper.sgml Mon Dec 4 01:19:27 2000
***************
*** 25,39 ****
To view all variations of the "||" string concatenation operator,
try
! SELECT oprleft, oprright, oprresult, oprcode
! FROM pg_operator WHERE oprname = '||';
!
! oprleft|oprright|oprresult|oprcode
! -------+--------+---------+-------
! 25| 25| 25|textcat
! 1042| 1042| 1042|textcat
! 1043| 1043| 1043|textcat
! (3 rows)
--- 25,39 ----
To view all variations of the "||" string concatenation operator,
try
! \do ||
! List of operators
! Op | Left arg | Right arg | Result | Description
! ----+-------------------+-------------------+--------+-----------------------
! || | bit | bit | bit | bitwise concatenation
! || | character | character | text | concatenate
! || | character varying | character varying | text | concatenate
! || | text | text | text | concatenate
! (4 rows)
*** ./doc/src/sgml/syntax.sgml.orig Mon Dec 4 01:08:21 2000
--- ./doc/src/sgml/syntax.sgml Mon Dec 4 01:15:57 2000
***************
*** 435,440 ****
--- 435,446 ----
(e.g. '\tab').
+
+ Backslashes may also be used to insert newlines (\n), tabs (\t),
+ linefeeds (\r), or any arbitrary character (\xxx, where xxx is the character code
+ in octal).
+
+